Home
Yates Zhang
Cancel

Ruby Splat Operator Star

refer to:  https://stackoverflow.com/questions/18289152/what-does-a-double-splat-operator-do * : 叫做 splat operator **:  double splat operator single splat 用法1: a, b = 1,2 a, b = *[1,2] ...

Blockchain 安装solc Install Solc Not Solcjs

solc : https://github.com/ethereum/solidity/releases solcjs :  node package 两者不一样,参数不兼容。 所以,有时候我们需要使用solc 来执行一些命令 安装方法:在上面的  https://github.com/ethereum/solidity/releases中,直接下载二进制文件即可。

Aws 使用aws Cli来上传文件到s3

1. 安装 pip install awscli 2. 登录 aws configure 添加对应的pub key, private key 如何获得 对应的pub key, private key?  (参考:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html&#1...

Linux 替换debian Apt Mirror

refer to: https://mirrors.tuna.tsinghua.edu.cn/help/debian/ bullseye 的mirror: # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-fr...

Linux Nohup的新用法setsid Nohup

refer to: https://unix.stackexchange.com/questions/446625/why-nohup-background-process-is-getting-killed 貌似在最新的版本(ubuntu 20 + )中,仅仅使用 nohup ... & 是不行的 解决办法: 前面加上 setsid 增加 setsid 之前: 加了 sets...

Blockchain Solidity 使用mapping Hash

refer to: https://ethereum.stackexchange.com/questions/65589/return-a-mapping-in-a-getall-function 声明 mapping(address => uint ) whiteList ;  用来声名, key是 address, value是 uint 使用 想要读取它的话,直接声明...

Blockchain Solidity 使用array Length Push Pop Loop

refer to: https://www.tutorialspoint.com/solidity/solidity_arrays.htm https://docs.soliditylang.org/en/v0.8.15/types.html#array-members 在Solidity中,array的长度(length) 都是固定的。跟其他静态语言的使用是一样的。 声明 上来就是个固定长...

Gin框架急速入门

 安装go go 1.17   ( 下载tar, 编译) 1870 tar zxvf go1.17.linux-amd64.tar.gz go 1871 mv go /usr/local/ 1872 sudo mv go /usr/local/ export PATH=$PATH:/usr/local/go/bin 查看环境:  $ go e...

Blockchain Web3 Contract.method.之后的调用顺序

官方文档:https://web3js.readthedocs.io/en/v1.7.3/web3-eth-contract.html#methods-mymethod-send Promievent:  https://github.com/naddison36/promievent 例如, 下面的代码: var Contract = require('web3-eth-cont...

Cloudflare Dns 使用nginx Cloudflare 创建无需配置的ssl Https

传统的https的配置步骤是: 1. (在阿里云上) 购买ssl 证书 2. 下载该证书文件到服务器(.key, .pem, .crt 等等) 3. 在nginx中进行配置。(443 端口, ssl_file 等信息) 现在,使用cloudflare(免费) + 配置域名dns + nginx 80端口配置即可。 1. 在cloudflare上创建对应的site. 2. 确保每个域名都是...