Skip to content

Instantly share code, notes, and snippets.

@xiaobin83
xiaobin83 / ontology_not_support_biginteger_problem.log
Created September 13, 2018 13:17
report "Not support interface to biginteger" when migrate
2018/09/13 21:14:26.312748 [INFO ] GID 1, Config init success
2018/09/13 21:14:29.316920 [INFO ] GID 1, Using account:ALmX48UbcsMEi1Mm4r5GmZsHkUEw97vn3B
2018/09/13 21:14:29.316920 [INFO ] GID 1, Account init success
2018/09/13 21:14:30.004960 [INFO ] GID 1, InitCurrentBlock currentBlockHash 44ffe9d8da0a6b692a8a72617b31fa8fbe5305685892df8dd6a8f5538cc1d05b currentBlockHeight 79398
2018/09/13 21:14:30.053962 [INFO ] GID 1, Ledger init success
2018/09/13 21:14:30.054962 [INFO ] GID 1, tx pool: the current local gas price is 0
2018/09/13 21:14:30.054962 [INFO ] GID 25, txpool-verify actor: started and be ready to receive validator's msg
2018/09/13 21:14:30.054962 [INFO ] GID 1, TxPool init success
2018/09/13 21:14:30.054962 [INFO ] GID 27, txpool-tx actor started and be ready to receive tx msg
2018/09/13 21:14:30.054962 [INFO ] GID 29, stateless-validator: started and be ready to receive txn
@xiaobin83
xiaobin83 / ScrollRectHelper.cs
Created May 4, 2018 11:32
monitor op on scroll rect for behaviors like pull-down-reloading
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ScrollRectHelper : MonoBehaviour
{
public ScrollRect scrollRect;
lua.LuaFunction eventDelegate;
UnityEngine.Events.UnityAction<Vector2> onValueChanged;
package modules
import (
"config"
"utils"
"fmt"
"reflect"
"sync"
gopherjson "github.com/alicebob/gopher-json"
package utils
import (
"sync"
"time"
)
type PoolElem struct {
Value interface{}
}
@xiaobin83
xiaobin83 / CondExpr.lua
Last active April 13, 2018 10:58
evaluate mongo-like expression
local CondExpr = {}
local _M = {}
function CondExpr.New(expr)
local p = {
expr = expr,
}
return setmetatable(p, { __index = _M })
end
@xiaobin83
xiaobin83 / Drawing.cs
Created January 13, 2018 13:20
Drawing lines on GUI, used for drawing graph
using System.Reflection;
using UnityEngine;
// Line drawing routine originally courtesy of Linusmartensson:
// http://forum.unity3d.com/threads/71979-Drawing-lines-in-the-editor
//
// Rewritten to improve performance by Yossarian King / August 2013.
//
// This version produces virtually identical results to the original (tested by drawing
// one over the other and observing errors of one pixel or less), but for large numbers
@xiaobin83
xiaobin83 / Delegate.lua
Created January 8, 2018 10:58
lua delegate stub
return function()
local methods = {}
local meta = {
__add = function(delegates, func)
methods[#methods + 1] = func
return delegates
end,
__sub = function(delegates, func)
for i, f in ipairs(methods) do
if f == func then
@xiaobin83
xiaobin83 / Shd_CoordinatingPlane.shader
Created November 22, 2017 15:23
shadowed scan line mesh plane
// Shader created with Shader Forge v1.38
// Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/
// Note: Manually altering this data may prevent you from opening it in Shader Forge
/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,cmtg:SF,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:3,dpts:2,wrdp:False,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:False,igpj:False,qofs:1,qpre:1,rntp:2,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:928,x:33039,y:32703,varname:node_928,prsc:2|custl-3377-OUT,alpha-2180-OUT;n:type:ShaderForge.SF
@xiaobin83
xiaobin83 / shaderforge-fixlightmap.patch
Created November 15, 2017 10:18
fix shaderforge lightmap (shadowmask, baked-indirect and subtractive)
commit 3a23cbafc92f5dc4b3a1ab04b4a06d0d7733b66f
Author: xiaobin83 <xiaobin.huang@gmail.com>
Date: Wed Nov 15 18:02:07 2017 +0800
fix lightmap issue
diff --git a/Assets/ShaderForge/Editor/Code/_Evaluator/SF_Evaluator.cs b/Assets/ShaderForge/Editor/Code/_Evaluator/SF_Evaluator.cs
index 282d252..59fbd9d 100644
--- a/Assets/ShaderForge/Editor/Code/_Evaluator/SF_Evaluator.cs
+++ b/Assets/ShaderForge/Editor/Code/_Evaluator/SF_Evaluator.cs
diff -ur Code/_Evaluator/SF_Evaluator.cs Code2/_Evaluator/SF_Evaluator.cs
--- Code/_Evaluator/SF_Evaluator.cs 2017-08-15 23:26:41.583391800 +0800
+++ Code2/_Evaluator/SF_Evaluator.cs 2017-10-31 04:13:19.991503000 +0800
@@ -343,6 +343,10 @@
dependencies.NeedFragVertexColor(); // TODO: Check if it really needs to be frag
}
+ if( n is SFN_Vertex ) {
+ dependencies.NeedFragVertex();
+ }