float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
return mix(rand(fl), rand(fl + 1.0), fc);
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
jsoniter "github.com/json-iterator/go" | |
"io" | |
"net" | |
"sync" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hutong | |
import ( | |
"encoding/binary" | |
"fmt" | |
"io" | |
"net" | |
"sync" | |
"sync/atomic" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package balance | |
import ( | |
"runtime" | |
"sync" | |
"sync/atomic" | |
"testing" | |
) | |
const MaxCount = 10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//用obj对象生成JSON | |
let Dump = function(obj) { | |
let __A__=[] | |
let __N__ = 0 | |
console.log(">>>>>>>>>>>") | |
//把Function转换成Object便于生成JSON | |
{ | |
let _CONVERT_ = {} | |
let convFunc = (obj)=>{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!!!backlog){ | |
backlog = console | |
} | |
function space(n){ | |
let str = "" | |
for (let index = 0; index < n; index++) { | |
str = str+" " | |
} | |
return str |