上一页 1 2 3 4 5 6 7 8 9 ··· 22 下一页
  2018年6月27日
摘要: # solidity 合约注意事项## 1. 栈深度EVM 栈深度1024字(1024*256字节)## 2. solidity 局部变量个数不能超过16因为提供的指令集对于栈深度的访问不能超过16,也就是说最多把第16个字换到栈顶进行操作.## 3.内存费用占用 EVM 的内存越大,收费越高,收费是内存大小的平方,具体计算方式未知.## 4.delete 关键字delete 作用相当于将变量的值... 阅读全文
posted @ 2018-06-27 10:19 baizx 阅读(1146) 评论(0) 推荐(0) 编辑
  2018年6月18日
摘要: 一条命令深度清理你的mac mac 用了一段时间后很快发现硬盘空间不够了,就想找一些磁盘清理的工具,但是发现居然都是收费的. 就手工操作吧.方法其实非常简单. 就一条命令, 他会列出所有目录超过1G的文件夹,然后你逐个分析就可以了. 看看哪些文件夹不应该那么大. 通过此方法我就找到了一个莫名其 阅读全文
posted @ 2018-06-18 12:57 baizx 阅读(2524) 评论(0) 推荐(0) 编辑
  2018年6月12日
摘要: # 将以太坊封装为 ERC20 TOKEN很多 DAPP 都是在处理 ERC20接口的 token, 其实很容易将以太坊封装为 ERC20,这样就可以统一处理, 至少我目前在做的雷电网络就是这么处理的.主要内容复制在网络https://programtheblockchain.com/posts/2018/05/26/wrapping-ether-in-an-erc20-token/直接上代码,核... 阅读全文
posted @ 2018-06-12 20:09 baizx 阅读(373) 评论(0) 推荐(0) 编辑
  2018年5月18日
摘要: # golang Subprocess testsSometimes you need to test the behavior of a process, not just a function.```gofunc Crasher() { fmt.Println("Going down in flames!") os.Exit(1)}```To test this code, we ... 阅读全文
posted @ 2018-05-18 23:03 baizx 阅读(249) 评论(0) 推荐(0) 编辑
  2018年5月16日
摘要: # go 笔记# defer defer 的参数绑定是在 defer 时,而不是在执行时,和 go 是一样的。```gofor i := 0; i < 5; i++ { defer fmt.Printf("%d ", i)}```会输出4 3 2 1 0# make && newmake 只能应用于 slice,map,channel,返回的不是指针。以 slice 为例,一个 slice ... 阅读全文
posted @ 2018-05-16 23:34 baizx 阅读(174) 评论(0) 推荐(0) 编辑
  2018年5月13日
摘要: # 如何使用 geth1.8来监听合约事件# 新功能介绍geth1.8版本带来了新的事件处理方式,使用 abigen 可以自动生成包含合约事件监听以及过滤相关代码.这样就不用自己去写代码解析 log.比如:```bashabigen --sol token.sol --pkg token --out token.go```# 一个例子通过监听谁给我转账,来说明如何使用新的接口## 创建 Filte... 阅读全文
posted @ 2018-05-13 17:52 baizx 阅读(451) 评论(0) 推荐(0) 编辑
  2018年5月8日
摘要: # 如何使用 Channel例子来自于[Concurrency is not parallelism](https://talks.golang.org/2012/concurrency.slide)#Google Search: A fake framework## v1.0 ```govar ( Web = fakeSearch("web") Image = fakeSearch(... 阅读全文
posted @ 2018-05-08 23:27 baizx 阅读(565) 评论(0) 推荐(0) 编辑
  2018年5月7日
摘要: # 修改vscode caipeiyu.writeCnblog ,简化博客发布# 1. 安装caipeiyu.writeCnblogvscode的博客园文章发布插件WriteCnblog : https://marketplace.visualstudio.com/items?itemName=caipeiyu.writeCnblog# 2. 修改扩展## 2.1 修改```cd .vscode/... 阅读全文
posted @ 2018-05-07 15:38 baizx 阅读(432) 评论(0) 推荐(0) 编辑
摘要: # TheDao 简化版解释## the Dao 合约```contract f1{ function transfer() { if (acccount[m]>=100) { m.send(100) account[m]-=100 } }}```# send 会调用 m 的 fallback 函数但是 m... 阅读全文
posted @ 2018-05-07 15:15 baizx 阅读(253) 评论(0) 推荐(0) 编辑
  2018年4月5日
摘要: 最近装了 firefox,电脑配置不太高,chrome 太吃内存了。 但是发现 SwitchyOmega的 pac 模式无法工作, "这篇文章" 提到了两个思路, 其中network.dns.disableIPv6 to true经验证无效, 通过把pac 路径删掉,直接用内容可以工作,不知道为什么 阅读全文
posted @ 2018-04-05 09:46 baizx 阅读(1558) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 22 下一页