本文譯自 Julio Merino 2018 年七月撰寫的 Rust vs. Go 一文。Julio Merino 是 G 社僱員,在 G 社工作超過 8 年,無論工作內外,都接觸開發不少 Go 語言,並撰寫 [Rust 點評][rust-review]系列文,來聽聽他對 Rust 與 Go 的想法吧。
Thanks Julio Merino for this awesome article!
This file contains hidden or 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
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.7; | |
| interface USDC { | |
| function balanceOf(address account) external view returns (uint256); | |
| function allowance(address owner, address spender) external view returns (uint256); | |
| function transfer(address recipient, uint256 amount) external returns (bool); |
This file contains hidden or 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
| const { expect } = require("chai"); | |
| describe('Staking', function () { | |
| beforeEach(async function() { | |
| [owner, wallet1, wallet2] = await ethers.getSigners(); | |
| Staking = await ethers.getContractFactory('Staking', owner); | |
| Wbtc = await ethers.getContractFactory('Wbtc', wallet1); | |
| staking = await Staking.deploy(); | |
| wbtc = await Wbtc.deploy(); |
I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:
Set my args as follows:
const run = (async () => {
const args = [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-infobars',Infura 提供公開的 Ethereum 主網和測試網路節點。到 Infura 官網申請,只要輸入一點基本資料和 Email,就可以收到 API-key。
This file contains hidden or 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
| <?php | |
| /** | |
| *============================ | |
| * author:Farmer | |
| * time:2017/12/19 | |
| * blog:blog.icodef.com | |
| * function:加密方式 | |
| *============================ | |
| */ |
原文:Linux中国
在今天的文档中,我会列出 7 个步骤(和 50 多个资源)帮助你开启这个令人兴奋的计算机科学领域的大门,并逐渐成为一个机器学习高手。
-- Karlijn Willems
本文导航
This file contains hidden or 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
| /** | |
| * Stack blur filter for fabricjs | |
| * Example: | |
| * obj.filters.push(new fabric.Image.filters.StackBlur(6)); | |
| * obj.applyFilters(canvas.renderAll.bind(canvas)); | |
| * | |
| * Heavily inspired by: | |
| * https://gist.github.com/pierrickouw/2ab679159beee9d80ca6 | |
| * http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html | |
| * uses stackBlurCanvasRGBA function but could be swapped be stackBlurCanvasRGB |
This file contains hidden or 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
| <? | |
| // Link image type to correct image loader and saver | |
| // - makes it easier to add additional types later on | |
| // - makes the function easier to read | |
| const IMAGE_HANDLERS = [ | |
| IMAGETYPE_JPEG => [ | |
| 'load' => 'imagecreatefromjpeg', | |
| 'save' => 'imagejpeg', | |
| 'quality' => 100 |
NewerOlder


