Skip to content

Instantly share code, notes, and snippets.

View sunzsh's full-sized avatar

小山 sunzsh

View GitHub Profile
import java.math.BigDecimal;
import java.util.function.BiFunction;
import java.util.function.Function;
public class BigNumChain {
private BigDecimal value;
public BigNumChain(Object value) {
this.value = convertBigDecimal(value, null);
javascript:(function(){document.querySelector('.hide-article-pos').remove();document.querySelector('.article_content').style.height='initial';})()
@sunzsh
sunzsh / gist:874d2e5e214a660fd5b8f75fea0a5b5a
Last active May 24, 2023 14:53
react文本框赋值方法
javascript:(function(){setNativeValue=function(qs,value){const element=document.querySelector(qs);const valueSetter=Object.getOwnPropertyDescriptor(element,'value').set;const prototype=Object.getPrototypeOf(element);const prototypeValueSetter=Object.getOwnPropertyDescriptor(prototype,'value').set;if(valueSetter&&valueSetter!==prototypeValueSetter){prototypeValueSetter.call(element,value)}else{valueSetter.call(element,value)}element.dispatchEvent(new Event('input',{bubbles:true}))};})();
@sunzsh
sunzsh / gist:e66cbef4f43820a5c2007d5c747c9529
Last active November 9, 2023 15:20
书签栏免登陆复制CSDN博客中代码片段
javascript:$('#content_views').unbind('copy');csdn.copyright.textData='';document.querySelectorAll(".prism,.hljs-button").forEach((b)=>{b.setAttribute('data-title','\u590d\u5236');b.onclick=function(e){navigator.clipboard.writeText(e.target.parentElement.innerText);e.stopPropagation();e.target.setAttribute('data-title','\u590d\u5236\u6210\u529f');setTimeout(()=>{e.target.setAttribute('data-title','\u590d\u5236');},2000)}});document.querySelectorAll("style").forEach((s)=>{if((s.innerText||"").indexOf('#content_views pre')>-1){s.parentElement.removeChild(s)}});