做题时间一小时
O(n^2)
2层For 循环
| /* | |
| * A white-list based PAC without regexp, by @janlay | |
| * It's just simple and fast. | |
| * Last update: Sep 1, 2016 | |
| * Special thanks to @Paveo | |
| */ | |
| function FindProxyForURL(url, host) { | |
| // REPLACE PROXY WITH YOUR OWN'S | |
| var PROXY = "PROXY 127.0.0.1:11111;SOCKS 127.0.0.1:11112"; | |
| var DEFAULT = "DIRECT"; |
| #!/bin/bash | |
| ################################################################################ | |
| # Copyright 2013-2015 Aerospike, Inc. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # |
| function uuid4() { | |
| var crypto = window.crypto || window.msCrypto; | |
| if (!isUndefined(crypto) && crypto.getRandomValues) { | |
| // Use window.crypto API if available | |
| var arr = new Uint16Array(8); | |
| crypto.getRandomValues(arr); | |
| // set 4 in byte 7 | |
| arr[3] = arr[3] & 0xFFF | 0x4000; |
| /** | |
| * Definition for singly-linked list. | |
| * function ListNode(val) { | |
| * this.val = val; | |
| * this.next = null; | |
| * } | |
| */ | |
| /** | |
| * @param {ListNode} head | |
| * @return {ListNode} |
| (function() { | |
| var ec = function(a) { | |
| this.B = a || [] | |
| } | |
| ; | |
| ec.prototype.set = function(a) { | |
| this.B[a] = !0 | |
| } | |
| ; | |
| ec.prototype.encode = function() { |
| RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
| RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
| npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache | |
| Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache |
Node.js Benchmark
NODE_ENV=production node --prof index.js 会输出isolate日志
node --prof-process isolate-0x102925000-30026-v8.log > processd.txt 解析日志,生成可阅读的格式
node --prof-process --preprocess isolate-0x102925000-30026-v8.log > processd.json 生成json的格式日志,用 v8 里带的 v8/tools/profview/index.html 打开可以解析
prettier-eslint |
eslint-plugin-prettier |
eslint-config-prettier |
|
|---|---|---|---|
| What it is | A JavaScript module exporting a single function. | An ESLint plugin. | An ESLint configuration. |
| What it does | Runs the code (string) through prettier then eslint --fix. The output is also a string. |
Plugins usually contain implementations for additional rules that ESLint will check for. This plugin uses Prettier under the hood and will raise ESLint errors when your code differs from Prettier's expected output. | This config turns off formatting-related rules that might conflict with Prettier, allowing you to use Prettier with other ESLint configs like eslint-config-airbnb. |
| How to use it | Either calling the function in your code or via [prettier-eslint-cli](https://github.co |
2019-06-03
Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.