<div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/" data-layout="button_count" data-size="small" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2F&src=sdkpreparse">分享</a></div>
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
| // in nodeJs | |
| const axios = require('axios') | |
| async function getCurrentGasPrices() { | |
| let response = await axios.get('https://ethgasstation.info/json/ethgasAPI.json') | |
| let prices = { | |
| low: response.data.safeLow / 10, | |
| medium: response.data.average / 10, | |
| high: response.data.fast / 10 | |
| } |
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
| /*! | |
| * Given a set of numeric values, returns a set of integer percents | |
| * | |
| * Algorithm defined by Rahul Narain, translated to JavaScript. | |
| * http://math.stackexchange.com/questions/183476/rounding-of-complementary-percentages#186225 | |
| * | |
| * > round_percents([20.5, 79.5]) | |
| * [21, 79] | |
| * > round_percents([24.8, 25.2, 0.5, 49.5]) | |
| * [25, 25, 1, 49] |
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 inquirer = require('inquirer'); | |
| const quos = [ | |
| { type: 'input', name: 'name', message: '模块名字: ', default: 'demo' }, | |
| { type: 'input', name: 'author', message: '您的姓名?', default: 'somebody' }, | |
| { type: 'input', name: 'rd', message: '后端的姓名?', default: 'rd' }, | |
| { type: 'confirm', name: 'moveon', message: '继续?' } | |
| ]; | |
| const ans = []; |
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
| https://press.one/p/address/v?s=9529a15a1f9a4c35de09d03cea24f2b1874f9e9089255250c8dc7b1ae590fb21f5f7e34d417b239c7c70fadd54bc5809a76d4505a8db8d0611285215ec99999e0&h=6f90b4653addb7460669fe723fa155aea4ab20c6374c522578b02381666d856a&a=4600e32b728e6be3df6b37e73267ebb02586b93b&f=P1&v=2 |
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
| List of Chrome URLs | |
| chrome://accessibility | |
| chrome://appcache-internals | |
| chrome://apps | |
| chrome://blob-internals | |
| chrome://bookmarks | |
| chrome://cache | |
| chrome://chrome | |
| chrome://chrome-urls |
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
| g_LastCtrlKeyDownTime := 0 | |
| g_AbortSendEsc := false | |
| g_ControlRepeatDetected := false | |
| *CapsLock:: | |
| if (g_ControlRepeatDetected) | |
| { | |
| return | |
| } |
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
| .calibre { | |
| font-family: "SF Pro SC","SF Pro Display","SF Pro Icons","PingFang SC","Helvetica Neue","Helvetica","Arial",sans-serif; | |
| text-shadow: none; | |
| color: rgb(68, 68, 17); | |
| font-size: 16px; | |
| line-height: 25px; | |
| margin-right: 0px; | |
| text-align: left; | |
| background: #ededed; | |
| overflow: hidden; |
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
| var images = ["path/to/image", "path/to/image", ... , "path/to/image"], | |
| preloaded = images.length; | |
| _.each(images, function(img) { | |
| var image = $('<img />').attr('src', img); | |
| image.on('load', function(){ | |
| preloaded--; | |
| if (preloaded === 0){ | |
| console.log("All preloaded!"); | |
| } |
NewerOlder