-
Notifications
You must be signed in to change notification settings - Fork 0
/
rss.xml
4 lines (4 loc) · 59.1 KB
/
rss.xml
1
2
3
4
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hugo NexT</title><link>/</link><description>Recent content on Hugo NexT</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Mon, 18 Dec 2023 00:00:44 +0800</lastBuildDate><atom:link href="/rss.xml" rel="self" type="application/rss+xml"/><item><title>配置pdf</title><link>/post/config_pdf/</link><pubDate>Mon, 18 Dec 2023 00:00:44 +0800</pubDate><guid>/post/config_pdf/</guid><description>配置pdf Resources &lt;script type=&#34;text/javascript&#34; src=&#34;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&#34;&gt;&lt;/script&gt; &lt;script type=&#34;text/x-mathjax-config&#34;&gt; MathJax.Hub.Config({ tex2jax: {inlineMath: [[&#39;$&#39;, &#39;$&#39;]]}, messageStyle: &#34;none&#34; });&lt;/script&gt; https://oxygentw.net/blog/computer/vscode-markdown-pdf-latex/</description></item><item><title>Chainlink</title><link>/post/chainlink/</link><pubDate>Mon, 13 Nov 2023 00:00:44 +0800</pubDate><guid>/post/chainlink/</guid><description>Chainlink Price Feed (0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419).latestRoundData()
VRF</description></item><item><title>Crypto</title><link>/post/crypto/</link><pubDate>Tue, 05 Sep 2023 00:47:44 +0800</pubDate><guid>/post/crypto/</guid><description>Crypto Digital Signature v,r,s是用于数字签名的创建和验证. 私钥是一整串随机生成的整数, 通过sepc256k1算法产生公钥.(算法曲线x轴对称) pubKey</description></item><item><title>The Ethereum Virtual Machine</title><link>/post/solidity_evm/</link><pubDate>Tue, 05 Sep 2023 00:28:00 +0800</pubDate><guid>/post/solidity_evm/</guid><description>The Ethereum Virtual Machine Internal Function ecrecover https://extremelysunnyyk.medium.com/how-does-ethereum-work-under-the-hood-understanding-evm-basics-in-simple-english-bdba2d888d63</description></item><item><title>UTILS</title><link>/post/utils/</link><pubDate>Fri, 18 Aug 2023 00:47:44 +0800</pubDate><guid>/post/utils/</guid><description>UTILS makeBook: https://www.ruanyifeng.com/blog/2023/08/weekly-issue-266.html</description></item><item><title>Contract Audit</title><link>/post/contract_audit/</link><pubDate>Thu, 10 Aug 2023 00:28:00 +0800</pubDate><guid>/post/contract_audit/</guid><description>Contract Audit 合约审计定位于审计步骤,审计工具和审计中需要注意的地方. 审计步骤: 运行slither工具, 执行测试文件, 人工审计 Slither Detector inheritance-graph call-graph Reentrancy A reentrancy attack is a type of</description></item><item><title>Solidity Language description</title><link>/post/solidity_language_description/</link><pubDate>Thu, 10 Aug 2023 00:28:00 +0800</pubDate><guid>/post/solidity_language_description/</guid><description>Solidity Language Description contract address functions receive()和fallback() 函数调用success和returndata accounts[0].transfer(to=accounts[1].address, amount=1, data=&ldquo;112&rdquo;) pragma solidity ^0.8.9; import &#34;@openzeppelin/contracts/utils/Address.sol&#34;; contract Bridge { } contract Bridge2 { fallback() external{} } interface CC { function</description></item><item><title>blockchain</title><link>/post/blockchain/</link><pubDate>Tue, 20 Jun 2023 00:28:00 +0800</pubDate><guid>/post/blockchain/</guid><description>Blockchain 区块链当前是六层架构:数据层,网络层,共识层,激励层,合约层,应用层 区块链的不可能三角是: 去中心化,安全性和可扩展性 Layer0, 1, 2 Lyaer0 使不同的区块链</description></item><item><title>coolshell</title><link>/post/chenhao/</link><pubDate>Tue, 16 May 2023 05:57:23 +0800</pubDate><guid>/post/chenhao/</guid><description>coolshell 陈浩老师(左耳朵耗子)文章摘录 我做系统架构的一些原则: https://coolshell.cn/articles/21672.html 从一次经历谈TIME_WAIT: https://coolshell.cn/articles/22263.html ETCD的内存问题: https://coolshell.cn/articles/22242.html “一把梭: REST API全用PO</description></item><item><title>security audit in solidity</title><link>/post/security_audit_in_solidity/</link><pubDate>Tue, 09 May 2023 00:00:44 +0800</pubDate><guid>/post/security_audit_in_solidity/</guid><description>security audit in solidity 一个合约审计,首先是将其编译通过,之后是看其测试覆盖率 再通过静态分析工具sliter</description></item><item><title>分布式任务调度</title><link>/post/distributed_scheduler/</link><pubDate>Sun, 27 Nov 2022 01:47:44 +0800</pubDate><guid>/post/distributed_scheduler/</guid><description>分布式任务调度 Resources 扫盲篇-什么是分布式任务调度: https://cloud.tencent.com/developer/article/1828830</description></item><item><title>概率算法</title><link>/post/probability_algorithm/</link><pubDate>Sun, 27 Nov 2022 00:45:44 +0800</pubDate><guid>/post/probability_algorithm/</guid><description>概率算法 一个经典概率算法(用于抽奖等场景) https://www.cnblogs.com/liulangmao/p/4533293.html</description></item><item><title>Uniswap</title><link>/post/uniswap/</link><pubDate>Tue, 01 Nov 2022 00:28:00 +0800</pubDate><guid>/post/uniswap/</guid><description>uniswap uniswapv2 resources https://docs.uniswap.org/protocol/V2/introduction whitepaper: https://uniswap.org/whitepaper.pdf uniswapv2-core uniswapv2-core 架构图: uniswapv2-periphery tips uniswapv2的Oracle uniswapv2版本起,就已经提供了预言机功能,用来计算交易对的时间加权平均价</description></item><item><title>Defence</title><link>/post/defence/</link><pubDate>Fri, 21 Oct 2022 00:28:00 +0800</pubDate><guid>/post/defence/</guid><description>Defence T族(技术研发)通道晋升答辩: https://cloud.tencent.com/developer/article/1786861</description></item><item><title>Lend and Borrow</title><link>/post/lend_and_borrow/</link><pubDate>Mon, 17 Oct 2022 00:28:00 +0800</pubDate><guid>/post/lend_and_borrow/</guid><description>Lend and Borrow 借贷协议方式 NFT借贷协议的3种模式 借贷协议主要解决三个问题: 一是高效地匹配、撮合资金供求双方;二是安全地保管抵押品;三是借款人违约时</description></item><item><title>Transaction Price mechanism</title><link>/post/transaction_price_mechanism/</link><pubDate>Mon, 17 Oct 2022 00:28:00 +0800</pubDate><guid>/post/transaction_price_mechanism/</guid><description>Transaction Price mechanism eip-155之前rlp编码rlp(nonce, gasprice, startgas, to, value, data); eip-155之编码rlp(nonce, gasprice, startgas, to, value, data, chainid, 0, 0); EIP-1559升级</description></item><item><title>Ethereum</title><link>/post/eth/</link><pubDate>Thu, 13 Oct 2022 00:28:00 +0800</pubDate><guid>/post/eth/</guid><description>Ethereum ethereum architecture beacon chain是一个单独的链,它协调所有的sharding chain. 一个beacon chain的block 负责管理1~100的shard bloc</description></item><item><title>MEV</title><link>/post/mev/</link><pubDate>Thu, 13 Oct 2022 00:28:00 +0800</pubDate><guid>/post/mev/</guid><description>MEV 论述 最大可提取价值(MEV)是指通过更改或排除一个区块中的交易顺序,可以从超过标准区块奖励和gas费的区块生产中提取的最大值,这个概念最初</description></item><item><title>Layer2</title><link>/post/layer2/</link><pubDate>Wed, 12 Oct 2022 00:28:00 +0800</pubDate><guid>/post/layer2/</guid><description>Layer2 Layer2技术主要目的是扩展去快乐的性能,同时保留分布式协议的去中心化优势 闪电网络 闪电网络的主要思路十分简单&ndash;将大量交易放到</description></item><item><title>Randao_reveal</title><link>/post/randao_reveal/</link><pubDate>Fri, 07 Oct 2022 00:28:00 +0800</pubDate><guid>/post/randao_reveal/</guid><description>Randao_reveal block header介绍 Mixhash is a hash of the index, nonce, content, and previous node’s hash. This is unique, non-reversible, and of fixed length. It serves to encrypt the data of a particular block. Nonce stands for the Number used only once. It is a unique whole number that shall be used only once in the blockchain. The</description></item><item><title>POS</title><link>/post/pos/</link><pubDate>Tue, 27 Sep 2022 00:28:00 +0800</pubDate><guid>/post/pos/</guid><description>POS POW的出块属性是无过程性的,不论试多少次,它都不会影响挖出下个块的概率。下一个块的出块者,还是需要经历大量的计算。影响当前这个区块的哈希</description></item><item><title>Optimizer in solidity</title><link>/post/optimizer_in_solidity/</link><pubDate>Sun, 25 Sep 2022 00:28:00 +0800</pubDate><guid>/post/optimizer_in_solidity/</guid><description>Optimizer in solidity 合约设计及实现变迁 v1.x版本实现,每次创建同样的合约 v2.x版本实现, 逻辑单独抽象成library,每次创建合约仅包含storage</description></item><item><title>library in solidity</title><link>/post/library_in_solidity/</link><pubDate>Fri, 23 Sep 2022 00:28:00 +0800</pubDate><guid>/post/library_in_solidity/</guid><description>this变量 library MathLib { function multiply(uint a, uint b) public view returns (uint, address) { return (a * b, address(this)); } } contract Example { using MathLib for uint; address public owner = address(this); address public retAddr; function multiplyExample(uint _a, uint _b) public view returns (uint, address) { uint a; (a, retAddr) = _a.multiply(_b); return (a, retAddr); } } resource https://jeancvllr.medium.com/solidity-tutorial-all-about-libraries-762e5a3692f9</description></item><item><title>Protocol</title><link>/post/solidity_protocol/</link><pubDate>Tue, 23 Aug 2022 00:28:00 +0800</pubDate><guid>/post/solidity_protocol/</guid><description>Protocol Permit2 Signature based transfer use ordered, non-monotonic nonces so that signed permits do not need to be transacted in any particular order. PermitTransferFrom结构体中amount和SignatureTransferD</description></item><item><title>Go mod</title><link>/post/go_mod/</link><pubDate>Mon, 02 May 2022 00:05:24 +0800</pubDate><guid>/post/go_mod/</guid><description>Resource go mod使用: https://www.jianshu.com/p/760c97ff644c https://liujiacai.net/blog/2019/10/24/go-modules/?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io 发展历史 GOPATH go env -w GO111MODULE=&#34;off&#34; GOROOT=/usr/local/go GOPATH=/home/dev/project/go /* 按如下路径+导包路径寻找所需要的包 /usr/local/go/src/ */ go build main.go go编译项目时,只会在GOROOT和GOPATH下找</description></item><item><title>Design pattern</title><link>/post/design_pattern/</link><pubDate>Sat, 09 Apr 2022 00:47:44 +0800</pubDate><guid>/post/design_pattern/</guid><description>设计原则SOLID Single Responsibility Principle 表明一个类只具备一个职责 Open Close Principle 一个类应该对扩展开发,修改关闭 //设计一个关于api请求数相关告警类 public class Alert { private AlertRule rule; private Notification</description></item><item><title>Prometheus</title><link>/post/prometheus/</link><pubDate>Thu, 07 Apr 2022 14:51:03 +0800</pubDate><guid>/post/prometheus/</guid><description>Resource prometheus docs: https://prometheus.io/docs/introduction/overview/ pushgateway数据上报: https://www.cnblogs.com/xiaobaozi-95/p/10684524.html</description></item><item><title>mem alloc in golang</title><link>/post/mem_alloc_in_golang/</link><pubDate>Wed, 06 Apr 2022 01:01:00 +0800</pubDate><guid>/post/mem_alloc_in_golang/</guid><description>memory allocate in golang Resource https://tonybai.com/2020/03/10/visualizing-memory-management-in-golang/ Golang什么时候会触发GC: https://www.jianshu.com/p/96a52a8127d9</description></item><item><title>Handle timeout</title><link>/post/handle_timeout/</link><pubDate>Tue, 08 Mar 2022 00:00:44 +0800</pubDate><guid>/post/handle_timeout/</guid><description>超时处理 我们要探讨的问题是:如果我们遇到一个非常非常慢的API调用最终超时,并且我们假设(a)它成功或(b)失败,我们就会遇到错误。超时(或</description></item><item><title>Inventory system design</title><link>/post/inventory_system_design/</link><pubDate>Tue, 08 Mar 2022 00:00:44 +0800</pubDate><guid>/post/inventory_system_design/</guid><description>库存服务设计 需求收集 方案评审 浏览器优化, 限流器使用,监控告警提前预报 设计难点在于库存更新和超时处理 库存更新, mysql+redis: 先更新,再删除缓存 超时处理,m</description></item><item><title>Timer设计</title><link>/post/timer/</link><pubDate>Mon, 07 Mar 2022 00:07:44 +0800</pubDate><guid>/post/timer/</guid><description>定时任务设计 任务队列 + 轮询, cpu耗费较大+空转问题; 四叉堆 + 轮询, 空转问题; 单独时间轮 + tick轮询, cpu耗费+空转问题; 多个时间轮 + t</description></item><item><title>Network</title><link>/post/network/</link><pubDate>Sat, 26 Feb 2022 00:47:44 +0800</pubDate><guid>/post/network/</guid><description>Resource 网络书籍: https://www.zhihu.com/question/19774914 Utils cat /proc/net/bonding/bondx 查看bond状态: https://blog.csdn.net/sdd220/article/details/77199166 bond模式: https://blog.csdn.net/qq_34870631/article/details/80625217 一个网卡配置多个IP: https://blog.csdn.net/qq_34870631/article/details/80625217 配置VLAN #ifcfg-bond0 DEVICE=bond0 NAME=bond0 TYPE=BOND NM_CONTROLLED=no USERCTL=no BONDING_MASTER=yes BOOTPROTO=none #ifcfg-bond0.1102 DEVICE=bond0.1102 VLAN=yes BOOTPROTO=static USERCTL=no NM_CONTROLLED=no ONBOOT=yes IPADDR=30.102.74.20 NETMASK=255.255.254.0 网卡配置: https://www.cnblogs.com/xuanlv-0413/p/14672286.html</description></item><item><title>runtime in golang</title><link>/post/runtime_in_golang/</link><pubDate>Sat, 26 Feb 2022 00:47:44 +0800</pubDate><guid>/post/runtime_in_golang/</guid><description>Resource 聊聊什么是Go runtime.KeepAlive: https://developer.51cto.com/article/692468.html runtime.SetFinalizer https://zhuanlan.zhihu.com/p/76504936 https://www.cnblogs.com/binHome/p/12901392.html</description></item><item><title>Monitor system</title><link>/post/monitor_system/</link><pubDate>Sun, 20 Feb 2022 00:47:44 +0800</pubDate><guid>/post/monitor_system/</guid><description>Resource 大型互联网海量监控系统设计: https://cloud.tencent.com/developer/article/1037231 支付系统设计(六):支付系统的监控与报警: https://toutiao.io/posts/caeqfr/preview 如何设计一个监控平台: https://juejin.cn/post/6957957796088250405 美团外卖自动化业务运维系统建设: https://tech.meituan.com/2017/11/14/digger-share.html</description></item><item><title>Data structure</title><link>/post/data_structure/</link><pubDate>Sat, 19 Feb 2022 00:00:44 +0800</pubDate><guid>/post/data_structure/</guid><description>Resource 跳跃表: https://www.jianshu.com/p/9d8296562806 一致性哈希: 原理: https://segmentfault.com/a/1190000015336117 实现: https://www.cnblogs.com/xrq730/p/5186728.html</description></item><item><title>version change in golang</title><link>/post/version_change_in_golang/</link><pubDate>Tue, 15 Feb 2022 00:47:44 +0800</pubDate><guid>/post/version_change_in_golang/</guid><description>Go1.14 本次更新大多数变化在于工具链的实现,runtime和libraries defer性能提升 在Go1.14之前,Go中的每一个defer函数,</description></item><item><title>C++ 类</title><link>/post/virtual_func_in_c_plus_plus/</link><pubDate>Mon, 14 Feb 2022 00:47:44 +0800</pubDate><guid>/post/virtual_func_in_c_plus_plus/</guid><description>Resource C++对象布局: https://mp.weixin.qq.com/s?__biz=MzkyODE5NjU2Mw==&mid=2247484758&idx=1&sn=4e614430f666f63ab135c13a716d07c1&chksm=c21d37eaf56abefc8d2a1dc3e09a8146d242475cb0900ee5a94ab6a94a991168a887f7351821&scene=178&cur_album_id=1667018561883570181#rd</description></item><item><title>C++11 new feature</title><link>/post/c++11_new_feature/</link><pubDate>Mon, 14 Feb 2022 00:47:44 +0800</pubDate><guid>/post/c++11_new_feature/</guid><description>Resource c++11新特性,所有知识点都在这里了: https://mp.weixin.qq.com/s/kAH-402oYgAa3GAVgJ8EaQ</description></item><item><title>Stack in linux</title><link>/post/stack_in_linux/</link><pubDate>Mon, 14 Feb 2022 00:47:44 +0800</pubDate><guid>/post/stack_in_linux/</guid><description>Resource Linux中的各种栈: https://mp.weixin.qq.com/s?__biz=MzkyODE5NjU2Mw==&mid=2247490208&idx=1&sn=c920ca7b7449222f8dd80efcb88fc36f&chksm=c21d281cf56aa10a7f07ed93c49e334203c00cdfe83acd40c0fb0c7f28fbc8052447cb5d3b44&scene=178&cur_album_id=1667018561883570181#rd</description></item><item><title>进程间通讯</title><link>/post/inter_process_communication/</link><pubDate>Mon, 14 Feb 2022 00:47:44 +0800</pubDate><guid>/post/inter_process_communication/</guid><description>Resource 进程间通信: https://www.jianshu.com/p/c1015f5ffa74</description></item><item><title>Behavior question</title><link>/post/bq/</link><pubDate>Sat, 12 Feb 2022 00:47:44 +0800</pubDate><guid>/post/bq/</guid><description>Resource 什么是BQ行为问题?如何在大厂面试中搞定它?: http://www.360doc.com/content/21/0405/14/44716758_970691903.shtml 应对100道行为面试题,只需3各小故事: https://www.myopt.org/post/%E5%BA%94%E5%AF%B9100%E9%81%93%E8%A1%8C%E4%B8%BA%E9%9D%A2%E8%AF%95%E9%A2%98%EF%BC%8C%E5%8F%AA%E9%9C%803%E4%B8%AA%E5%B0%8F%E6%95%85%E4%BA%8B</description></item><item><title>Linux Kernel Map</title><link>/post/linux/</link><pubDate>Thu, 10 Feb 2022 00:47:44 +0800</pubDate><guid>/post/linux/</guid><description>Resource Linux Kernel Map: https://blog.csdn.net/Rong_Toa/article/details/109430393</description></item><item><title>IPSEC Protocol</title><link>/post/ipsec_protocol/</link><pubDate>Thu, 10 Feb 2022 00:00:44 +0800</pubDate><guid>/post/ipsec_protocol/</guid><description>Resource IPSEC介绍: https://blog.csdn.net/NEUChords/article/details/92968314</description></item><item><title>How to negotiate your package</title><link>/post/how_to_negotiate_your_package/</link><pubDate>Mon, 07 Feb 2022 00:47:44 +0800</pubDate><guid>/post/how_to_negotiate_your_package/</guid><description>Resource Counter Offer Template: https://helloacm.com/an-example-email-to-negotiate-your-package/</description></item><item><title>Bug in etcd</title><link>/post/bug_in_etcd/</link><pubDate>Sun, 06 Feb 2022 00:00:44 +0800</pubDate><guid>/post/bug_in_etcd/</guid><description>记一次ETCD watch问题导致缓存不一致: https://zhuanlan.zhihu.com/p/332618994</description></item><item><title>MQ</title><link>/post/mq/</link><pubDate>Sun, 06 Feb 2022 00:00:44 +0800</pubDate><guid>/post/mq/</guid><description>Resources MQ详解及四大MQ比较: https://www.cnblogs.com/duanxz/p/3143570.html 技术选型 RocketMQ or Kaflka: https://zhuanlan.zhihu.com/p/60196818</description></item><item><title>optimization in golang</title><link>/post/optimization_in_golang/</link><pubDate>Sun, 06 Feb 2022 00:00:44 +0800</pubDate><guid>/post/optimization_in_golang/</guid><description>Resource 聊聊Go内存优化和相关底层机制: https://wudaijun.com/2019/09/go-performance-optimization/</description></item><item><title>rocketmq</title><link>/post/rocketmq/</link><pubDate>Sun, 06 Feb 2022 00:00:44 +0800</pubDate><guid>/post/rocketmq/</guid><description>Resources RocketMQ原理&amp;复杂分布式事务解法: https://www.jianshu.com/p/2838890f3284 rocketMQ消息发送流程: https://www.jianshu.com/p/3779291d8344 RocketMQ: https://www.cnblogs.com/weifeng1463/p/12889300.html</description></item><item><title>关于配置中心、元数据中心和注册中心</title><link>/post/about_configuration_center_metadata_center_and_registry/</link><pubDate>Sat, 05 Feb 2022 00:00:44 +0800</pubDate><guid>/post/about_configuration_center_metadata_center_and_registry/</guid><description>Resources 关于配置中心,元数据中心和注册中心: https://zhuanlan.zhihu.com/p/103476722</description></item><item><title>RabbitMQ</title><link>/post/rabbitmq/</link><pubDate>Fri, 04 Feb 2022 00:00:44 +0800</pubDate><guid>/post/rabbitmq/</guid><description>RabbitMQ作用及其出现背景 作用: 削峰,解耦,异步调用 RabbitMQ特性和好处: 开源 轻量级 面向大多数现代语言的客户端开发库 灵活控制消息</description></item><item><title>disruptor</title><link>/post/disruptor/</link><pubDate>Fri, 14 Jan 2022 00:05:24 +0800</pubDate><guid>/post/disruptor/</guid><description>Resources 高性能队列: https://tech.meituan.com/2016/11/18/disruptor.html jdk中的队列: https://juejin.cn/post/6844903648875528206#heading-13</description></item><item><title>log</title><link>/post/log_framework/</link><pubDate>Fri, 14 Jan 2022 00:05:24 +0800</pubDate><guid>/post/log_framework/</guid><description>Resources log4j架构: http://aofengblog.com/2011/05/02/Apache-Log4j-%E6%9E%B6%E6%9E%84/ golang日志入门与选型: https://segmentfault.com/a/1190000040977469?utm_source=sf-similar-article</description></item><item><title>Difference between atomic and mutex</title><link>/post/difference_between_atomic_and_mutex/</link><pubDate>Tue, 11 Jan 2022 00:45:44 +0800</pubDate><guid>/post/difference_between_atomic_and_mutex/</guid><description>Resources 原子操作和互斥锁的区别: https://cloud.tencent.com/developer/article/1645697</description></item><item><title>split db practice</title><link>/post/split_db_practice/</link><pubDate>Tue, 11 Jan 2022 00:45:44 +0800</pubDate><guid>/post/split_db_practice/</guid><description>Resources: 大众点评订单系统分库分表实践: https://tech.meituan.com/2016/11/18/dianping-order-db-sharding.html</description></item><item><title>zero copy in linux</title><link>/post/zero_copy_in_linux/</link><pubDate>Tue, 11 Jan 2022 00:45:44 +0800</pubDate><guid>/post/zero_copy_in_linux/</guid><description>Resources 深入剖析linux IO原理和几种零拷贝的实现: https://zhuanlan.zhihu.com/p/83398714 Go语言中的零拷贝优化: https://strikefreedom.top/pipe-pool-for-splice-in-go linux io and zero copy: https://strikefreedom.top/linux-io-and-zero-copy</description></item><item><title>io.WriteString()分析</title><link>/post/io_write_string_analysis/</link><pubDate>Sun, 09 Jan 2022 00:45:44 +0800</pubDate><guid>/post/io_write_string_analysis/</guid><description>问题 内存管理在Golang中是棘手的,我们可能相信golang本身已具备内存自动管理功能,可以从此解放出来。但上周的某个功能测试结果让我改变</description></item><item><title>pprof in golang</title><link>/post/pprof_in_golang/</link><pubDate>Sun, 09 Jan 2022 00:45:44 +0800</pubDate><guid>/post/pprof_in_golang/</guid><description>CPU pprof package main import ( &#34;fmt&#34; &#34;net/http&#34; _ &#34;net/http/pprof&#34; &#34;time&#34; ) func main() { go func() { ticker := time.NewTicker(time.Second) for { select { case t := &lt;- ticker.C: fmt.Println(&#34;Current time:&#34;, t) default: } } }() http.ListenAndServe(&#34;:8080&#34;, nil) } #cmdline go run main.go go tool pprof http://127.0.0.1:8080/debug/pprof/profile?seconds=10 go tool pprof -http=:8080 pprof.main.samples.cpu.001.pb.gz Resources pprof: https://go.dev/blog/pprof 使用pprof排查内存泄漏:</description></item><item><title>top command</title><link>/post/top/</link><pubDate>Mon, 03 Jan 2022 14:47:44 +0800</pubDate><guid>/post/top/</guid><description>top命令 进程的优先级 cpu利用率和负载 cpu利用率是对一个时间段内CPU使用情况的统计,通过这个指标可以看出某一个时间段内CPU被占用的情</description></item><item><title>CPU核数</title><link>/post/cpu/</link><pubDate>Mon, 03 Jan 2022 00:47:44 +0800</pubDate><guid>/post/cpu/</guid><description>计算机系统架构 SMP, NUMA, MPP是目前主流得计算机系统架构 SMP 对称多处理架构。在这样得系统中,多个CPU对称工作,无主从关系。所有的CPU共享全部资源</description></item><item><title>code writing</title><link>/post/code_writing/</link><pubDate>Mon, 03 Jan 2022 00:05:24 +0800</pubDate><guid>/post/code_writing/</guid><description>Resources my logging best practices: https://tuhrig.de/my-logging-best-practices/</description></item><item><title>container</title><link>/post/container/</link><pubDate>Sun, 19 Dec 2021 00:28:00 +0800</pubDate><guid>/post/container/</guid><description>容器和虚拟机区别 容器是将进程有效划分的一个独立空间,以便在独立的空间之间平衡资源使用冲突的技术。本质上容器是一种特殊的进程,其核心功能是通过</description></item><item><title>Computer Architecture</title><link>/post/computer_architecture/</link><pubDate>Sun, 21 Nov 2021 10:06:24 +0800</pubDate><guid>/post/computer_architecture/</guid><description>Resources 计算机体系结构基础: https://foxsen.github.io/archbase/%E5%BC%95%E8%A8%80.html#%E4%BB%80%E4%B9%88%E6%98%AF%E8%AE%A1%E7%AE%97%E6%9C%BA</description></item><item><title>VLAN</title><link>/post/vlan/</link><pubDate>Sun, 21 Nov 2021 00:47:44 +0800</pubDate><guid>/post/vlan/</guid><description>Resources 图文并茂VLAN详解: https://blog.51cto.com/u_6930123/2115373 VLAN详解: https://www.jb51.net/network/774813.html</description></item><item><title>Guessing Game</title><link>/post/guess_game/</link><pubDate>Sun, 07 Nov 2021 00:05:24 +0800</pubDate><guid>/post/guess_game/</guid><description>Build a Failr, Oracle-Free(no oracles allowed) Guessing Game in solidity which pits two players against each other in a game where each player tries to guess whether a randomly generated number is high or low.
answer
/** ### reference - random optimize - https://www.cnblogs.com/huahuayu/p/8884165.html - https://blog.csdn.net/weixin_43587332/article/details/ 106743233 - multi people **/ pragma solidity ^0.4.0; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b &gt; 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b &lt;= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c &gt;= a); return c; } } contract GuessData { //address public implementation; mapping(address=&gt;uint256) public player2balance; address[2] public playerSet; uint256[2] inputs; address public lastRoundWinner; uint256 public wager = 0; address public playerA = address(0); address public playerB = address(0); bool public isGameStarted = false; } contract GuessGame is GuessData { using SafeMath for uint256; modifier onlyPlayer() { require(playerSet[0] !</description></item><item><title>求解数组中唯二的两个数字</title><link>/post/xor/</link><pubDate>Sun, 07 Nov 2021 00:05:24 +0800</pubDate><guid>/post/xor/</guid><description>一个数组中,存在两个只出现一次的数字,其余的数字均出现两次,求这两个数字是多少 #求解步骤: #假设两个数分别是a, b c = arr[0] xor arr[1] xor arr[2] xor ... xor arr[n] #获</description></item><item><title>BTC开发资料</title><link>/post/btc/</link><pubDate>Tue, 26 Oct 2021 00:47:44 +0800</pubDate><guid>/post/btc/</guid><description>Resources RPC API Reference: https://developer.bitcoin.org/reference/rpc/index.html btc explorer https://www.oklink.com/btc/address/33WswvHHQMVYUQQiuoN4MYXRrjTh8zuKbq tron api doc: https://developers.tron.network/reference#tronweb-object-1 eos testnet: https://www.alohaeos.com/zh/tools/testnets sign bitcoin cash/sv/abc transaction: https://apexpl.github.io/bitcoin_cash_sv_abc_transaction_signatures.html</description></item><item><title>估算的一些方法</title><link>/post/some_estimate_method/</link><pubDate>Tue, 26 Oct 2021 00:47:44 +0800</pubDate><guid>/post/some_estimate_method/</guid><description>Resources 估算的一些方法: https://mp.weixin.qq.com/s/fH-AJpE99ulSLbC_1jxlqw</description></item><item><title>Floating Point</title><link>/post/floating_point/</link><pubDate>Sat, 16 Oct 2021 00:28:00 +0800</pubDate><guid>/post/floating_point/</guid><description>Resources 15张图带你深入理解浮点数: https://mp.weixin.qq.com/s/DGP4rENdy-N1VyZLS_uV4g 浮点数精度丢失问题详解: https://mp.weixin.qq.com/s/yjEkZrpIOAUAEknKTxC3YQ</description></item><item><title>Business</title><link>/post/business/</link><pubDate>Sat, 16 Oct 2021 00:00:44 +0800</pubDate><guid>/post/business/</guid><description>Resources 对话杨浩涌: https://36kr.com/p/1440631980329603</description></item><item><title>shenjian channel</title><link>/post/shenjian_channel/</link><pubDate>Fri, 15 Oct 2021 00:00:44 +0800</pubDate><guid>/post/shenjian_channel/</guid><description>xx 技术和管理如何平衡 第一,带好团队和做好技术一样,能够成为一个职场人的核心竞争力。代码写得又快又好,交付的系统没有Bug,这样的技术人产品喜</description></item><item><title>Linux内核网络</title><link>/post/linux_kernel_network/</link><pubDate>Wed, 06 Oct 2021 00:47:44 +0800</pubDate><guid>/post/linux_kernel_network/</guid><description>讨论Linux内核网络栈地实现及其原理,深入而详尽地分析网络子系统及其架构。讲解数据包在Linux内核网络栈中的传输过程,阐述其与网络各层及</description></item><item><title>Data Link Layer</title><link>/post/data_link_layer/</link><pubDate>Tue, 05 Oct 2021 10:28:00 +0800</pubDate><guid>/post/data_link_layer/</guid><description>概念 网卡 网卡是一块被设计用来允许在计算机网络上进行通讯的计算机硬件。其拥有MAC地址。工作在数据链路层(L2), 功能一是将数据封装成帧,并通</description></item><item><title>interview</title><link>/post/interview/</link><pubDate>Tue, 05 Oct 2021 10:28:00 +0800</pubDate><guid>/post/interview/</guid><description>Resources 海归软件工程师起飞指南: https://www.sohu.com/a/328902066_747492</description></item><item><title>how to talk about your project</title><link>/post/how_to_talk_about_your_project/</link><pubDate>Fri, 17 Sep 2021 23:45:44 +0800</pubDate><guid>/post/how_to_talk_about_your_project/</guid><description>Resource 石墨文档基于K8S的Go微服务实践(上篇): https://mp.weixin.qq.com/s/2YrW_6My-20_DRyKRnT-tA</description></item><item><title>microservice</title><link>/post/microservice/</link><pubDate>Thu, 16 Sep 2021 00:45:44 +0800</pubDate><guid>/post/microservice/</guid><description>Resources xx: 微服务解决了集中式架构的单体应用等不少问题,比如扩展性、弹性收缩能力、小规模团队的敏捷开发等待,但同时不少项目因为微服务拆分过度,导致项</description></item><item><title>IP</title><link>/post/ip/</link><pubDate>Wed, 15 Sep 2021 00:45:44 +0800</pubDate><guid>/post/ip/</guid><description>虚拟网桥 brctl命令 #查看网桥信息 brctl show #给网桥添加ip ifconfig brtest0 199.199.100.1 ifconfig brtest0 down brctl delbr brtest0 #不需要STP(生成树)协议 brctl stp br0 off 网桥配置: https://www.cnblogs.com/iceocean/articles/1594193.html OSI模型 OSI模</description></item><item><title>Delay Queue</title><link>/post/delay_queue/</link><pubDate>Mon, 06 Sep 2021 00:47:44 +0800</pubDate><guid>/post/delay_queue/</guid><description>Resources delay queue的几种实现简介: https://mp.weixin.qq.com/s/zjmVoj0nM2FZDelYaebdDw 延迟队列rabbitmq实现: https://mp.weixin.qq.com/s/I8I5PJMfDSsLkmLHiuIavw</description></item><item><title>panic in golang</title><link>/post/panic_in_golang/</link><pubDate>Sun, 05 Sep 2021 00:47:44 +0800</pubDate><guid>/post/panic_in_golang/</guid><description>Resources panic的三种触发方式: https://mp.weixin.qq.com/s/cs_jLLoaq4rweVYFbeJoFw panic实现: https://mp.weixin.qq.com/s/-tYjR9K6tWG3aNOeGFsT3Q</description></item><item><title>sync in golang</title><link>/post/sync_in_golang/</link><pubDate>Sun, 05 Sep 2021 00:47:44 +0800</pubDate><guid>/post/sync_in_golang/</guid><description>Resources sync.Once sync.Once()的妙用: https://mp.weixin.qq.com/s/7QyQS9DQj1czA6BVR6ywYA sync.Once()实现原理: https://segmentfault.com/a/1190000039294152 sync.WaitGroup()的实现原理: https://zhuanlan.zhihu.com/p/344973865</description></item><item><title>interface in golang</title><link>/post/interface_in_golang/</link><pubDate>Tue, 31 Aug 2021 00:00:24 +0800</pubDate><guid>/post/interface_in_golang/</guid><description>Resources []int能转换为[]interface吗: https://mp.weixin.qq.com/s/tqR5zMPobm20lao-2QNrVA</description></item><item><title>NAS</title><link>/post/nas/</link><pubDate>Sun, 08 Aug 2021 01:01:00 +0800</pubDate><guid>/post/nas/</guid><description>Resources nas服务器搭建与配置: https://blog.csdn.net/qq_38265137/article/details/83146421</description></item><item><title>PA first lesson</title><link>/post/pa_first_lesson/</link><pubDate>Sun, 08 Aug 2021 01:01:00 +0800</pubDate><guid>/post/pa_first_lesson/</guid><description>入职第一课堂 战略执行: 战略前瞻、商业以实、规划分析、规划执行 管理决策: 管理组织、管理他人、管理自我、管理业务 科技创新: 前言创新、敏捷开发、大</description></item><item><title>git</title><link>/post/git/</link><pubDate>Fri, 06 Aug 2021 00:05:24 +0800</pubDate><guid>/post/git/</guid><description>git submodule add module git submodule add [email protected]:transmissions11/solmate.git lib/solmate cat .gitmodules cat .git/config cat .git/modules git rm --cached remove module git submodule deinit lib/solmate git rm lib/solmate Resources 工作中Git的使用: https://mp.weixin.qq.com/s/mje4XVyuDzspttWdOFC02g git仓库操作: https://mp.weixin.qq.com/s/s_pNeT1lMlVDbjO37Fys4A git仓库过大, clone不下来解决方法: https://www.cnblogs.com/ZhaoWeiNotes/p/13920660.html</description></item><item><title>职业要求</title><link>/post/requirements/</link><pubDate>Fri, 06 Aug 2021 00:05:24 +0800</pubDate><guid>/post/requirements/</guid><description>P9 P5、P6被要求独立完成任务;P7要求前瞻性,能把不同点的事情串在一起,变成一条线;P8则需要有结构化的思维,能把不同的事、交错的线,变成</description></item><item><title>tcp泄漏操作系统信息</title><link>/post/get_os_by_tcp/</link><pubDate>Thu, 05 Aug 2021 00:05:24 +0800</pubDate><guid>/post/get_os_by_tcp/</guid><description>Resources 哈哈!TCP泄露了操作系统信息···: https://mp.weixin.qq.com/s/FIUDFL6zd3Nkf4Vvb6ajLg</description></item><item><title>Sync map在Go中运用</title><link>/post/sync_map_in_go/</link><pubDate>Wed, 04 Aug 2021 23:05:24 +0800</pubDate><guid>/post/sync_map_in_go/</guid><description>Resource Go sync map 的内部实现: https://mp.weixin.qq.com/s/TGBSUYLiuBaoi3pNbN0BOQ sync map详解: https://blog.csdn.net/a348752377/article/details/104972194 RWMutex内部实现: https://sreramk.medium.com/go-sync-rwmutex-internals-and-usage-explained-9eb15865bba</description></item><item><title>他人面试经历</title><link>/post/interview_experience_of_others/</link><pubDate>Sun, 01 Aug 2021 00:00:44 +0800</pubDate><guid>/post/interview_experience_of_others/</guid><description>Resources 一个学渣的阿里之路: https://mp.weixin.qq.com/s/JT9e-inlL9F1bjT40sNaLA 渣渣菜鸡的蚂蚁金服面试经历(一): https://mp.weixin.qq.com/s/bNXyjo9ywdOkAbesNTrMoA 渣渣菜鸡的蚂蚁金服面试经历(一): https://mp.weixin.qq.com/s/D-tvQBRJbYPLwzj7KuvqHg 渣渣菜鸡的有赞面试经历: https://mp.weixin.qq.com/s/wDDsa5na4b3MSdsIgh3upw 面试过阿里等互联网</description></item><item><title>虚拟机知识</title><link>/post/lxc/</link><pubDate>Sun, 01 Aug 2021 00:00:44 +0800</pubDate><guid>/post/lxc/</guid><description>源码安装lxc ``` ``` lxc创建容器 lxc源码安装(./configure --prefix=/xx, 是其lxc-ls存放目录) 容器创建后存放目录 ~/.local/sha</description></item><item><title>Elasticsearch</title><link>/post/elasticsearch/</link><pubDate>Sat, 31 Jul 2021 00:00:44 +0800</pubDate><guid>/post/elasticsearch/</guid><description>Resources elasticsearch亿级数据检索深度优化: https://mp.weixin.qq.com/s/Vp77RZpfnB4TJIg-DmwzUg</description></item><item><title>ETCD</title><link>/post/etcd/</link><pubDate>Sat, 31 Jul 2021 00:00:44 +0800</pubDate><guid>/post/etcd/</guid><description>Resource 基于etcd的分布式锁: https://www.jianshu.com/p/8a4dc6d900cf etcd的watch机制 https://blog.csdn.net/zl1zl2zl3/article/details/79627412 https://www.lixueduan.com/post/etcd/05-watch/ etcd读写请求流程: https://blog.csdn.net/wohu1104/article/details/116244730 只读请求优化: https://mrcroxx.github.io/posts/code-reading/etcdraft-made-simple/6-readonly/ 关于etcd的一些谣言: https://cloud.tencent.com/developer/article/1551687 蚂蚁集团万级规模k</description></item><item><title>Go中的map</title><link>/post/map_in_golang/</link><pubDate>Mon, 19 Jul 2021 00:00:44 +0800</pubDate><guid>/post/map_in_golang/</guid><description>Resource map中的删除: https://mp.weixin.qq.com/s/fTyfcBhRGNo3Q3Gl12_XNw</description></item><item><title>TCP</title><link>/post/tcp/</link><pubDate>Sun, 18 Jul 2021 00:00:44 +0800</pubDate><guid>/post/tcp/</guid><description>Resource 面试必备: https://mp.weixin.qq.com/s/iHW0hj29fBkgviINoEE4nw</description></item><item><title>Go语言的优势和劣势</title><link>/post/advantages_and_disadvantages_in_go/</link><pubDate>Wed, 07 Jul 2021 01:01:00 +0800</pubDate><guid>/post/advantages_and_disadvantages_in_go/</guid><description>Resources GopherChina 2021 Ian说完整泛型实现将在Go1.18发布(会议实录): https://mp.weixin.qq.com/s/RFfa-A0DomH2pXz4arAVnA</description></item><item><title>内存访问</title><link>/post/memory_access/</link><pubDate>Wed, 07 Jul 2021 01:01:00 +0800</pubDate><guid>/post/memory_access/</guid><description>每个程序员都应该知道的CPU知识: https://mp.weixin.qq.com/s/fzFNRUBFlTi3p71CpTopRw 结构体字节对齐: https://mp.weixin.qq.com/s/qHeM_eJ33m-vH6CmqUYnOg</description></item><item><title>Scheduling in Golang</title><link>/post/schdule_in_golang/</link><pubDate>Tue, 29 Jun 2021 00:47:44 +0800</pubDate><guid>/post/schdule_in_golang/</guid><description>gopark and goready https://blog.csdn.net/u010853261/article/details/85887948</description></item><item><title>Tree</title><link>/post/tree/</link><pubDate>Tue, 29 Jun 2021 00:00:44 +0800</pubDate><guid>/post/tree/</guid><description>平衡二叉树 平衡二叉树: 二叉树的每个节点的左右子树的高度差的绝对值不超过1 判断一棵树是否是平衡二叉树 例子: 输入: 给定二叉树 [3,9,20,null,null,15,7] 输出: true 输入: 给定</description></item><item><title>循环移动数组</title><link>/post/loop_move_array/</link><pubDate>Mon, 28 Jun 2021 00:00:44 +0800</pubDate><guid>/post/loop_move_array/</guid><description>循环移动数组 给定一个数组和正整数n(n 小于数组长度), 请求此数组循环左移n个位置, 要求空间复杂度O(1) 例子: 输入: [1, 2, 3, 4, 5] 2 输出: [3, 4, 5,</description></item><item><title>Linux的五种io模型</title><link>/post/io_model_in_linux/</link><pubDate>Sun, 27 Jun 2021 00:47:44 +0800</pubDate><guid>/post/io_model_in_linux/</guid><description>Resource Linux的五种io模型: https://mp.weixin.qq.com/s/qCZKTJB25kSGVhlAnGFaEQ</description></item><item><title>从零开始搭建创业公司后台技术栈</title><link>/post/build_backend_from_zero/</link><pubDate>Sun, 27 Jun 2021 00:47:44 +0800</pubDate><guid>/post/build_backend_from_zero/</guid><description>Resource 从零开始搭建创业公司后台技术栈: https://mp.weixin.qq.com/s/Ukn9AVvxVxB6phKcBykVsw 集团IT技术架构规划方案: https://mp.weixin.qq.com/s/RGvWIlm4SO24ofW5icK3iw</description></item><item><title>调度系统设计</title><link>/post/scheduling_system_design/</link><pubDate>Sun, 27 Jun 2021 00:47:44 +0800</pubDate><guid>/post/scheduling_system_design/</guid><description>Resource 调度系统设计精要: https://www.sohu.com/a/370119881_657921</description></item><item><title>分布式事务之底层原理揭秘</title><link>/post/distributed_transaction/</link><pubDate>Sun, 27 Jun 2021 00:47:44 +0800</pubDate><guid>/post/distributed_transaction/</guid><description>Resource 分布式事务之底层原理揭秘: https://mp.weixin.qq.com/s/jJBlSHLTvxNPl3maYMpccQ</description></item><item><title>技术演讲</title><link>/post/tech_speech/</link><pubDate>Sun, 27 Jun 2021 00:47:44 +0800</pubDate><guid>/post/tech_speech/</guid><description>Resource 技术演讲,如何快速做到80分: https://mp.weixin.qq.com/s/u6gtUF5yz80vRpImVOloaw 聊聊如何做技术分享: https://mp.weixin.qq.com/s/uyrQ528udyhydcB1mRMlOg</description></item><item><title>数据分片</title><link>/post/data_fragment/</link><pubDate>Sun, 27 Jun 2021 00:47:44 +0800</pubDate><guid>/post/data_fragment/</guid><description>Resource 带着问题学习分布式系统之数据分片: https://mp.weixin.qq.com/s/M0QvQ6JVQVZAN8kucPyoaA</description></item><item><title>限流器</title><link>/post/rate_limiter/</link><pubDate>Sun, 27 Jun 2021 00:47:44 +0800</pubDate><guid>/post/rate_limiter/</guid><description>Resource 限流算法实践: https://www.infoq.cn/article/iPxNuQWU3lGwXc8J7tZW</description></item><item><title>虚拟内存</title><link>/post/virtual_memory/</link><pubDate>Sun, 27 Jun 2021 00:47:44 +0800</pubDate><guid>/post/virtual_memory/</guid><description>Resource 虚拟内存: https://mp.weixin.qq.com/s/g5I7un3-lpffAk6UFes8DA</description></item><item><title>职业-他人感想与经历</title><link>/post/career/</link><pubDate>Sun, 27 Jun 2021 00:47:44 +0800</pubDate><guid>/post/career/</guid><description>Resource 结束12年深漂生活!武汉,我来了!: https://mp.weixin.qq.com/s/I5WbUUA2DEZvcFftEw6GrQ 大龄码农的新西兰移民之路: https://mp.weixin.qq.com/s/H49uoTrhWrFVlsgSaPLSBA 北漂8年,撤退杭州: https://mp.weixin.qq.com/s/o9-MkdBZ-7mg3jdRvOLXPg 持炬之人要内观自我: https://mp.weixin.qq.com/s/UL1yHctmVtIvz2PnmAAzNw 你会正确与HR谈薪资吗: https://mp.weixin.qq.com/s/umlWthKW8Ij4jPy0GiCzGw Counter</description></item><item><title>Golang语言遇到的bug</title><link>/post/bug_in_golang/</link><pubDate>Sun, 27 Jun 2021 00:00:44 +0800</pubDate><guid>/post/bug_in_golang/</guid><description>Resource 分析Go time.After 引起内存暴增OOM问题: https://mp.weixin.qq.com/s/jaIdqF0bFpHz_eyPsHjbwQ Go gctrace 引起runtime 调度阻塞: https://mp.weixin.qq.com/s/eHEvVzmpPYXAQgcdd_B55w 高并发场景下 disk io 引发的高时延问题: https://mp.weixin.qq.com/s/e3peaNGwIuNkldvnP0pDug 一个日志打点引发的OOM: https://mp.weixin.qq.com/s/8puLJSJ3GeXnmDlMxdzGgQ 为什</description></item><item><title>Go中的init函数</title><link>/post/init_in_golang/</link><pubDate>Sun, 27 Jun 2021 00:00:44 +0800</pubDate><guid>/post/init_in_golang/</guid><description>Resource init函数: https://studygolang.com/articles/13865?fr=sidebar</description></item><item><title>有赞TCP网络编程最佳实践</title><link>/post/you_zan_tcpwang_luo_bian_cheng_zui_jia_shi_jian/</link><pubDate>Tue, 22 Jun 2021 01:01:00 +0800</pubDate><guid>/post/you_zan_tcpwang_luo_bian_cheng_zui_jia_shi_jian/</guid><description>Reference https://tech.youzan.com/you-zan-tcpwang-luo-bian-cheng-zui-jia-shi-jian/?hmsr=toutiao.io&utm_campaign=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io</description></item><item><title>brownie使用</title><link>/post/brownie/</link><pubDate>Sun, 06 Jun 2021 10:28:00 +0800</pubDate><guid>/post/brownie/</guid><description>Resource brownie networks add development attack20221019 cmd=ganache-cli host=&ldquo;http://127.0.0.1&rdquo; fork=&ldquo; https://mainnet.infura.io/v3/$WEB3_INFURA_PROJECT_ID@15780866" accounts=10 mnemonic=$MNEMONIC port=8545 brownie使用: https://betterprogramming.pub/part-1-brownie-smart-contracts-framework-for-ethereum-basics-5efc80205413#:~:text=Brownie%20is%20a%20robust%2C%20easy,to%20initialize%20or%20integrate%20them .</description></item><item><title>btc地址生成</title><link>/post/btc_address/</link><pubDate>Sun, 06 Jun 2021 10:28:00 +0800</pubDate><guid>/post/btc_address/</guid><description>btc地址生成 Get you public key Perform Sha256 on your Public key Perform RIPEMD160 hashing on the result of Sha256 hash Add version byte in front of RIPEMD160 hash (0x00 for main net, 0x6f for testnet) Perform Sha256 hash on the extended RIPEMD160 hash Perform Sha256 hash on the result of the previous step Take the first 4 byte of the second Sha256 result, i</description></item><item><title>alloc in golang</title><link>/post/alloc_in_golang/</link><pubDate>Sat, 05 Jun 2021 00:00:44 +0800</pubDate><guid>/post/alloc_in_golang/</guid><description>Resource Go内存管理: https://mp.weixin.qq.com/s/PNRhtdS_gZVTtrkkRmx7yA Go内存管理和分配: https://mp.weixin.qq.com/s/6jAVPSnw5UPotCg40CAB8Q</description></item><item><title>escape in golang</title><link>/post/escape_in_golang/</link><pubDate>Sat, 05 Jun 2021 00:00:44 +0800</pubDate><guid>/post/escape_in_golang/</guid><description>Resource 通过Golang内存逃逸分析讨论GC的压力: https://www.jianshu.com/p/10e83dc6cd64?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io</description></item><item><title>System Call</title><link>/post/system_call/</link><pubDate>Sat, 29 May 2021 00:00:44 +0800</pubDate><guid>/post/system_call/</guid><description>Resource 系统调用原理和实现: https://blog.csdn.net/gatieme/article/details/50779184 用户态模式和内核态模式区分: https://blog.csdn.net/github_37382319/article/details/111833529 增加系统调用的方法: https://www.cnblogs.com/yongheng20/p/4947702.html vdso技术: https://lishiwen4.github.io/linux/vdso-and-syscall</description></item><item><title>microservice</title><link>/post/microservice_gateway/</link><pubDate>Thu, 06 May 2021 00:00:44 +0800</pubDate><guid>/post/microservice_gateway/</guid><description>Resources https://mp.weixin.qq.com/s/So_HYu90vGcvE4qU5D9m4g</description></item><item><title>MySQL</title><link>/post/mysql/</link><pubDate>Thu, 06 May 2021 00:00:44 +0800</pubDate><guid>/post/mysql/</guid><description>数据库架构 https://zhuanlan.zhihu.com/p/43736857#:~:text=MySQL%E6%98%AF%E4%B8%80%E4%B8%AA%E5%85%B8%E5%9E%8B%E7%9A%84,Client%E8%B4%9F%E8%B4%A3%E8%BF%9E%E6%8E%A5%E5%88%B0Server%E3%80%82 https://mp.weixin.qq.com/s/zL4QP15W1Zd7HUm_wTbE2Q InnoDB架构 innodb架构: https://xie.infoq.cn/article/48544a3041634ca9ce62eaff4 缓冲池(buffer pool),这次彻底懂了: https://juejin.cn/post/6844903874172551181 自适应哈希: https://www.cnblogs.com/geaozhang/p/7252389.html 写缓冲(change buff</description></item><item><title>system design</title><link>/post/system_design/</link><pubDate>Thu, 06 May 2021 00:00:44 +0800</pubDate><guid>/post/system_design/</guid><description>系统设计开篇 &lt;System Design Interview: An Insider&rsquo;s Guide&gt; Resources 亿级数据库秒级扩容: https://blog.csdn.net/z50L2O08e2u4afToR9A/article/details/89839471 互联网架构高可用: https://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&mid=2651962050&idx=1&sn=f60b8bb833fe3425f5227da42e3b3adf&chksm=bd2d0f1e8a5a8608f81d42a16eea476d0bd4763f84f9a008ed616d1cfa050a4015780f898eb1&scene=21#wechat_redirect 业务层,到底需不需要服务化: https://mp.weixin.qq.com/s/81Phkxg13ligFEWPTwpsfg 无锁缓存,每秒10万并发: https://mp.weixin.qq.com/s/BfuRWaB7RDjpGmQbZdmMZw 第三方服务挂了</description></item><item><title>write an rpc from scratch</title><link>/post/write_an_rpc_from_scratch/</link><pubDate>Fri, 30 Apr 2021 01:01:00 +0800</pubDate><guid>/post/write_an_rpc_from_scratch/</guid><description>Reference write an rpc from scratch: https://alexanderell.is/posts/rpc-from-scratch/</description></item><item><title>golang中的context</title><link>/post/context_in_golang/</link><pubDate>Tue, 27 Apr 2021 00:00:44 +0800</pubDate><guid>/post/context_in_golang/</guid><description>Reference: goroutine如何退出: https://geektutu.com/post/hpg-exit-goroutine.html context包解析: https://mp.weixin.qq.com/s?__biz=MzUxMDI4MDc1NA==&mid=2247486310&idx=1&sn=e1d998f35293e1bf259bf51f2f7ef6bd&scene=21#wechat_redirect</description></item><item><title>Distributed System</title><link>/post/distributed_system/</link><pubDate>Mon, 19 Apr 2021 01:47:44 +0800</pubDate><guid>/post/distributed_system/</guid><description>分布式系统 分布式事务 大致论述: https://www.cnblogs.com/savorboard/p/distributed-system-transaction-consistency.html</description></item><item><title>分布式锁</title><link>/post/distributed_lock/</link><pubDate>Mon, 19 Apr 2021 01:47:44 +0800</pubDate><guid>/post/distributed_lock/</guid><description>实现 分布式锁redis锁和zookeeper锁: https://mp.weixin.qq.com/s/lrSQBK-Kihkj6994kQFpUQ 未分类 企业级高可用分布式锁原理剖析及设计实践 分布式锁应用场景 掌握分布式锁设计核心要点 能够根</description></item><item><title>Redis</title><link>/post/redis/</link><pubDate>Thu, 15 Apr 2021 00:00:44 +0800</pubDate><guid>/post/redis/</guid><description>Redis架构 Redis系统架构中各个处理模块是干什么的?: https://learn.lianglianglee.com/%E4%B8%93%E6%A0%8F/300%E5%88%86%E9%92%9F%E5%90%83%E9%80%8F%E5%88%86%E5%B8%83%E5%BC%8F%E7%BC%93%E5%AD%98-%E5%AE%8C/19%20Redis%E7%B3%BB%E7%BB%9F%E6%9E%B6%E6%9E%84%E4%B8%AD%E5%90%84%E4%B8%AA%E5%A4%84%E7%90%86%E6%A8%A1%E5%9D%97%E6%98%AF%E5%B9%B2%E4%BB%80%E4%B9%88%E7%9A%84%EF%BC%9F.md Redis命令 redis命令目录: http://doc.redisfans.com/ 数据结构和对象 动态字符串 常数复杂度获取字符</description></item><item><title>golang中的defer</title><link>/post/defer_in_golang/</link><pubDate>Fri, 02 Apr 2021 01:01:00 +0800</pubDate><guid>/post/defer_in_golang/</guid><description>Reference defer分析: https://studygolang.com/articles/742 defer实现原理: https://segmentfault.com/a/1190000020614493 defer优化: https://zhuanlan.zhihu.com/p/401339057 deferreturn函数: https://www.modb.pro/db/88823</description></item><item><title>golang中的error</title><link>/post/error_in_goalng/</link><pubDate>Fri, 02 Apr 2021 01:01:00 +0800</pubDate><guid>/post/error_in_goalng/</guid><description>Reference wrapp error解析: https://studygolang.com/articles/23346?fr=sidebar</description></item><item><title>golang中的select</title><link>/post/select_in_golang/</link><pubDate>Fri, 02 Apr 2021 00:00:44 +0800</pubDate><guid>/post/select_in_golang/</guid><description>Reference: select关键字: https://draveness.me/golang/docs/part2-foundation/ch05-keyword/golang-select/</description></item><item><title>golang哈希表</title><link>/post/hashmap_in_golang/</link><pubDate>Wed, 31 Mar 2021 01:01:00 +0800</pubDate><guid>/post/hashmap_in_golang/</guid><description>Reference 理解Golang哈希表的原理: https://juejin.cn/post/6844903793927143438 golang哈希表: https://draveness.me/golang/docs/part2-foundation/ch03-datastructure/golang-hashmap/ golang的for-range(哈希表的遍历): https://draveness.me/golang/docs/part2-foundation/ch05-keyword/golang-for-range/</description></item><item><title>sort algorithm</title><link>/post/sort_algorithm/</link><pubDate>Mon, 22 Mar 2021 00:00:44 +0800</pubDate><guid>/post/sort_algorithm/</guid><description>排序算法复杂度 冒泡排序 将第一个数A跟第二个数B相比较,如果A&gt;B,那么交换A,B位置,接下来将第二个数跟第三个数比较 func bubbleSort(array []int) { length := len(array) for i</description></item><item><title>二分查找</title><link>/post/binary_search/</link><pubDate>Fri, 19 Mar 2021 00:00:44 +0800</pubDate><guid>/post/binary_search/</guid><description>二分查找 从一个从小到大的序列中找寻数goal, 采用二分查找。 思路:选择两个变量,分别赋值区间的首尾;选取区间的中间值与goal相比较,如果g</description></item><item><title>Java线程池实现原理及其在美团业务中的实践</title><link>/post/thread_pooling_practice_in_meituan/</link><pubDate>Mon, 15 Mar 2021 14:47:44 +0800</pubDate><guid>/post/thread_pooling_practice_in_meituan/</guid><description>Java线程池实现原理及其在美团业务中的实践 Portal: https://tech.meituan.com/2020/04/02/java-pooling-pratice-in-meituan.html</description></item><item><title>为什么TCP协议有粘包问题</title><link>/post/why_the_design_tcp_message_frame-%E5%89%AF%E6%9C%AC/</link><pubDate>Mon, 15 Mar 2021 14:47:44 +0800</pubDate><guid>/post/why_the_design_tcp_message_frame-%E5%89%AF%E6%9C%AC/</guid><description>为什么TCP协议有粘包问题 Portal: https://draveness.me/whys-the-design-tcp-message-frame/</description></item><item><title>NAT 穿透</title><link>/post/nat_in_tcp/</link><pubDate>Thu, 11 Mar 2021 14:47:44 +0800</pubDate><guid>/post/nat_in_tcp/</guid><description>NAT穿透在TCP中的运用 Portal: https://www.baseclass.io/huffman-coding/</description></item><item><title>Huffman-coding</title><link>/post/huffman_coding/</link><pubDate>Fri, 05 Mar 2021 15:45:44 +0800</pubDate><guid>/post/huffman_coding/</guid><description>Huffman-coding Portal: https://www.baseclass.io/huffman-coding/</description></item><item><title>一道关于gorotine的死锁问题</title><link>/post/deadlock_in_goroutine/</link><pubDate>Mon, 18 Jan 2021 21:05:24 +0800</pubDate><guid>/post/deadlock_in_goroutine/</guid><description>一道关于goroutine死锁 package main import ( &#34;fmt&#34; &#34;time&#34; ) func main() { ch := make(chan int) go fmt.Println(&lt;-ch) ch &lt;- 5 time.Sleep(2 * time.Second) } 上述结果我选择输出5,分析如下。go关键字启动一个协程A运行,从</description></item><item><title>BTC devguide(3)</title><link>/post/btc_devguide_3/</link><pubDate>Wed, 30 Dec 2020 15:59:00 +0800</pubDate><guid>/post/btc_devguide_3/</guid><description>Operating Modes 比特币软件具有不同级别的安全性和权衡,以验证区块链 Introduction 当前,有两种主要的方法来验证区块链作为客户端:完整节点和SPV客户端。 由于不建议使用</description></item><item><title>BTC devguide(2)</title><link>/post/btc_devguide_2/</link><pubDate>Wed, 30 Dec 2020 15:16:00 +0800</pubDate><guid>/post/btc_devguide_2/</guid><description>Transactions 交易让用户花了satoshis。 每笔交易都由几部分组成,既可以进行简单的直接付款,也可以进行复杂的交易。 Introduction 本节将描述每个部分并演示如何一起</description></item><item><title>BTC devguide(1)</title><link>/post/btc_devguide_1/</link><pubDate>Tue, 29 Dec 2020 18:12:00 +0800</pubDate><guid>/post/btc_devguide_1/</guid><description>Block Chain 区块链系统提供了公共分类帐,有序且带有时间戳记的交易记录。 该系统用于防止重复支出和修改以前的交易记录。 Introduction 比特币 网络 中的每个完整节点都独立</description></item><item><title>Base58Check 编码</title><link>/post/base58check_encoding/</link><pubDate>Tue, 29 Dec 2020 10:28:00 +0800</pubDate><guid>/post/base58check_encoding/</guid><description>本文章翻译自 Base58Check encoding ,如有侵权,请联系 作者 进行删除 Background Base58Check 是一种被用来编码比特币地址的协议 这原始比特币源码解释了为何使用base58而不是base6</description></item><item><title>Cloud Storage</title><link>/post/cloud_storage/</link><pubDate>Sat, 19 Dec 2020 00:28:00 +0800</pubDate><guid>/post/cloud_storage/</guid><description>unkonw 云原生与微服务 云原生本质上是一套知道软件架构涉及的思想,建立在&quot;未来的软件一定生长于云&quot;的核心假设之上。 云原生包括容器</description></item><item><title>Channel在Go中运用</title><link>/post/the_usage_of_channel_in_go/</link><pubDate>Thu, 10 Dec 2020 21:05:24 +0800</pubDate><guid>/post/the_usage_of_channel_in_go/</guid><description>basic usage of channel 使用channel发送接收 package main import &#34;fmt&#34; func main() { jobs := make(chan int, 5) done := make(chan bool) go func() { for { j, more := &lt;-jobs if more { fmt.Println(&#34;received job&#34;, j) } else { fmt.Println(&#34;received all jobs&#34;) done &lt;- true return } } }() for j := 1; j &lt;= 3; j++ {</description></item><item><title>Celery笔记</title><link>/post/celerynote/</link><pubDate>Thu, 26 Nov 2020 15:57:23 +0800</pubDate><guid>/post/celerynote/</guid><description>Getting Started celery is flexible. Almost every part of Celry can be extended or used on its own, Custom pool implementations, serializers, compression schemes, logging, schedulers, consumers, producers, broker transports, and much more. celery中current_app的指向 # main.py from celery import current_app from celery import Celery cel = Celery(&#34;lll&#34;) cel2 = Celery(&#34;bbb&#34;)</description></item><item><title>Linux线程</title><link>/post/linux_thread/</link><pubDate>Tue, 14 Jul 2020 23:45:44 +0800</pubDate><guid>/post/linux_thread/</guid><description>Linux线程 Linux线程的发展 1991年1月发布的Linux2.2内核中,进程是通过系统调用fork创建的,新的进程是原来进程的子进程。</description></item><item><title>哈希算法和密钥保存</title><link>/post/hashalgorithmandkeypreservation/</link><pubDate>Sun, 12 Jul 2020 21:49:52 +0800</pubDate><guid>/post/hashalgorithmandkeypreservation/</guid><description>本文章翻译自 Pradeep Loganathan ,如有侵权,请联系 作者 进行删除 什么是哈希?哈希算法和密钥保存 哈希 哈希是一个单向函数,它将任意长度的数据映射到固定长度的输出摘</description></item><item><title>核酸试剂的复合检测</title><link>/post/compounddetectionofnucleicacidreagent/</link><pubDate>Sun, 05 Jul 2020 23:46:52 +0800</pubDate><guid>/post/compounddetectionofnucleicacidreagent/</guid><description>问题: 100个人,其中一个人是患者;一个人使用一支酸剂测试,患者产生反应,否则不产生反应,至少用几只酸剂可以测试出患者是谁? 答: 1支酸剂测试</description></item><item><title>Build_hugo_site</title><link>/post/build_hugo_site/</link><pubDate>Sat, 04 Jul 2020 14:51:03 +0800</pubDate><guid>/post/build_hugo_site/</guid><description>搭建Hugo博客网站 测试语法 测试图片 API bbb 发布文章 hugo new post/xxxx.md 发布github hugo -t even Reference https://segmentfault.com/a/1190000012975914?utm_source=tag-newest https://juejin.im/post/5e9cf8bd51882538083fec4c#heading-1 https://www.jianshu.com/p/475110a1c811 同even博客: https://edward852.github.io/ hugo添加Algolia搜索支持: https://edward852.github.io/post/hugo%E6%B7%BB%E5%8A%A0algolia%E6%90%9C%E7%B4%A2%E6%94%AF%E6%8C%81/</description></item><item><title/><link>/post/contract_security/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/post/contract_security/</guid><description>j&ndash; title: &ldquo;contract security&rdquo; date: 2022-08-23T00:28:00+08:00 weight: 70 keywords: [] tags: [&ldquo;solidity&rdquo;] categories: [&ldquo;blockchain&rdquo;] author: &ldquo;Clay&rdquo; draft: false contract security 合约安全分为两个部分,一部分是漏洞原理分类,另一部分是实际发生的攻击事件。(合约安全竞赛) 合约事故 Reentrancy</description></item><item><title/><link>/post/dns/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/post/dns/</guid><description>Resource 为什么DNS协议使用UDP?只使用了UDP吗?: https://cloud.tencent.com/developer/article/1818152</description></item><item><title/><link>/post/tcp_kernel_optimize_option/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/post/tcp_kernel_optimize_option/</guid><description>请求url</description></item></channel></rss>