问题描述:
将一个字符串:
"key1='value11,value12,value13',key2=value2,key3='value3',key4=value4"
提取成:
[
'use strict'; | |
const fs = require('fs'); | |
const path = require('path'); | |
const mkdirp = require('mkdirp'); | |
const files = fs.readdirSync(__dirname); | |
files.forEach((filename) => { | |
if (filename.includes('\\')) { |
'use strict'; | |
function pad(value) { | |
return (value < 10) ? '0' + value : '' + value; | |
} | |
class Time { | |
constructor(date) { | |
this.d = date; | |
} |
'use strict'; | |
const fs = require('fs'); | |
const path = require('path'); | |
const parse = require('csv-parse'); | |
const co = require('co'); | |
const Project = require('../proxy/project'); | |
var parseCSV = function () { | |
return new Promise((resolve, reject) => { |
问题描述:
将一个字符串:
"key1='value11,value12,value13',key2=value2,key3='value3',key4=value4"
提取成:
[
var exec = require('child_process').exec; | |
var unicode = '中文测试'; // length: 12 | |
var child = exec('echo ' + unicode, { | |
encoding: 'utf8', | |
maxBuffer: 8 | |
}, function(err, stdout, stderr) { | |
console.log(err); | |
console.log(stdout); | |
console.log(stderr); |
var Benchmark = require('benchmark'); | |
var suite = new Benchmark.Suite(); | |
suite | |
.add("new length 0", function () { | |
Buffer.concat([]); | |
}) | |
// add listeners | |
.on('cycle', function (event) { | |
console.log(String(event.target)); |
var Benchmark = require('benchmark'); | |
var suite = new Benchmark.Suite(); | |
var buff = new Buffer(10); | |
var buff100 = new Buffer(100); | |
var buff1000 = new Buffer(1000); | |
var buff8000 = new Buffer(8000); | |
var make_buffers = function (buf, length) { | |
var list = []; |
$ curl -v "http://localhost:1334/path/to/file?key=word"
* Hostname was NOT found in DNS cache
* Trying ::1...
* Connected to localhost (::1) port 1334 (#0)
> GET /path/to/file?key=word HTTP/1.1
> User-Agent: curl/7.37.1
> Host: localhost:1334
> Accept: */*
>
V8HOME = /Users/jacksontian/git/v8 | |
FLAGS = -I$(V8HOME) \ | |
$(V8HOME)/out/x64.release/libv8_{libbase,base,snapshot}.a \ | |
$(V8HOME)/out/x64.release/libicu{uc,i18n,data}.a -stdlib=libstdc++ | |
lexer: | |
clang++ lexer.cpp -o bin/lexer $(FLAGS) |
var Benchmark = require('benchmark'); | |
var suite = new Benchmark.Suite(); | |
var headers0 = []; | |
var headers1 = ['k1', 'v1']; | |
var headers = ['k1', 'v1', 'k1', 'v1', 'k1', 'v1', 'k1', 'v1', 'k1', 'v1', 'k1', 'v1']; | |
// add tests | |
suite.add('apply 0', function () { | |
var raw = []; |