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
npm i yoga-layout | |
cd node_modules/yoga-layout | |
npm run build:browser | |
find emcc not foind,need install | |
git clone https://github.com/juj/emsdk.git | |
# Enter that directory | |
cd emsdk | |
git pull | |
# Download and install the latest SDK tools. |
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
function awaitall(promise) { | |
//这个能捕捉错误 | |
return promise.then(data => { | |
return [null, data]; | |
}) | |
.catch(err => [err]); | |
} | |
let [err,res]=await awaitall(aysncfn) |
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
传输的数据小于64k 或者设置的缓存大小 tcp快 | |
数据大时,tcp一个包传不完 ,多次 socket.on('data',fn),什么时候传完了,用长度判断不行,需要在最后传一些特殊字符,造成速度慢 | |
http似乎解决了这个问题 | |
tcp的复用 一个socket传输多条cb的数据需要设计id来区分 |
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
toUTCString=toGMTString= Thu, 12 Jan 2017 13:18:37 GMT | |
toLocaleString=toString= Thu Jan 12 2017 21:21:21 GMT+0800 (CST) | |
valueOf=1484227515076 | |
toTimeString=21:25:15 GMT+0800 (CST) | |
toDateString=Thu Jan 12 2017 | |
toJSON=toISOString=2017-01-12T13:30:24.025Z | |
ISO 8601 格式的字符串: YYYY-MM-DDTHH:mm:ss.sssZ。时区总是UTC(协调世界时),加一个后缀“Z”标识。 |
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
[] |
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
从https下发的内容 被https服务器以私钥RSA加密,可用其公钥解密. | |
如果https的整数不是自签名的,需要到其证书签发机构验证其公钥与证书,证书签发机构有多层,要一直验证到root,就是本机内置的信任机构. |
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
openssl.conf文件里面指定 ./demoCA 保存基本信息 | |
首先在工作目录下创建 demoCA demoCA/newcerts demoCA/private | |
在demoCA#创建index.txt文件 touch index.txt | |
在demoCA#创建序列号文件,这里用的01作第一个序列号 echo 01 > serial | |
在demoCA/private 目录下 | |
1.创建 私钥 openssl genrsa -out cakey.pem 1024 | |
2.申请 openssl req -new -out careq.csr -key cakey.pem -keyform PEM | |
3.自签名根证书 openssl x509 -req -in ca-req.csr -out cacert.pem -signkey cakey.pem -CAcreateserial -days 3650 | |
然后 cp cakey.pem ../ |
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
用一句话概括 Apache License 就是, | |
你可以用这代码,但是如果开源你必须保留我写的声明; | |
你可以改我的代码,但是如果开源你必须写清楚你改了哪些; | |
你可以加新的协议要求,但不能与我所公布的协议要求产生冲突; | |
你用这代码干什么我不管,但是你不能让我承担任何责任。 | |
https://kymjs.com/manager/2015/11/21/01/ |
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
也许用 setTheme(android.R.style.Theme_Translucent_NoTitleBar_Fullscreen); | |
内置多个颜色的主体 | |
file android\modules\ui\src\java\ti\modules\kotter\ui\widget\TiUISwitch.java | |
function protected void updateButton(CompoundButton cb, KrollDict d) { | |
if (d.containsKey("tcolor")) { | |
int ncolor=TiConvert.toColor(d, "tcolor"); | |
int xcolor=TiConvert.toColor(d, "xcolor"); |
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
apt install -t jessie-backports openjdk-8-jre-headless ca-certificates-java |
NewerOlder