cat $Filetemp | parallel --pipe 'sed -e "s/[[:space:]]+/ /g"' > standard.txt
Adding --output-24bit to the TiMidity options in Solfege fixes sound problems for me
I am currently trying out GNU Solfege for ear and rhythm training. Solfege uses TiMidity for playback. On my machine, the sound output always started with an annoying crackling for each exercise. Some googling brought up this solution. While that link has nothing to do with Solfege, following its advice helped in my case, too. To remove the crackling in Solfege, I did the following:
In Solfege, open the File > Preferences Menu Choose External Programs Under Audio File Players - MIDI it should say /usr/bin/timidity (or something similar) add --output-24bit to the options for that entry (my complete options for timidity are --output-24bit -idqq %s)
var orginalData = [{name:'jch', age:30, score:90, sex: 1, lesson: 'math'},{ name:'oh', age:31, score: 80, sex:1, lesson: 'math'}, {name:'jia', age:27, score: 70, sex:0, lesson: 'math'}, {name:'jch', age: 30, score: 80, sex: 1, lesson: 'english'}]; | |
const fn_01 = (data, specifiedAge) => data.filter(item => item.age > specifiedAge); | |
const fn_02 = (data, specifiedAge) => data.reduce((prev, curr) => { | |
if (curr.age > specifiedAge) { | |
prev.name.push(curr.name); | |
prev.lesson.push(curr.lesson); | |
} | |
return prev; |
'use strict'; | |
const http = require('http'); | |
const originalString = 'Today we see a good accelerator: http://alchemistaccelerator.com, you can found some thing in the wikipedia, https://en.wikipedia.org/wiki/The_Alchemist_Accelerator. or google it by : https://www.google.com.hk/search?es_sm=91&q=alchemist+accelerator&oq=alchemist+a&gs_l=serp.3.2.0l10.233056.233264.0.235425.2.2.0.0.0.0.134.267.0j2.2.0....0...1c.1j4.64.serp..0.2.265.J6dlgO9eRVI'; | |
function fn(inputString, callback) { | |
// not a strict url match pattern | |
var regex = /https?:\/\/[\d\w\.\/_\-\?&=+#@]+\/?/g; | |
const newContent = []; |
function sendToES(topic, list, noRetry) { | |
let _list = list.splice(0); | |
reqHelper.post('/_bulk', new Buffer(_list.concat('').join(LF)), (resp, code) => { | |
/** 错误处理*/ | |
if (code !== 200) { | |
console.log('HTTP FAILED CODE:', code); | |
dumpDisk(_list); | |
} else if (resp.indexOf('"errors":true,') !== -1) { | |
let errorInfo = []; // errorInfo structure: [{i:index, t: error_type, s: status},{} ...] |
proxy
dropbox proxy MODE [TYPE] [HOST] [PORT] [USERNAME] [PASSWORD] Manually sets proxy settings for Dropbox.
Node js 中通过 arguments 对象修改/增加参数的方法
function foo() {
console.log(arguments);
console.log(arguments['extra']);
}
foo.apply({}, {'0':'arg_1', '1':'arg_2', length: 2});
'use strict'; | |
const zlib = require('zlib'); | |
const orgStr = 'Node is similar in design to, and influenced by, systems like Ruby\'s Event Machine or Python\'s Twisted. Node takes the event model a bit further, it presents an event loop as a runtime construct instead of as a library. In other systems there is always a blocking call to start the event-loop. Typically behavior is defined through callbacks at the beginning of a script and at the end starts a server through a blocking call like EventMachine::run(). In Node there is no such start-the-event-loop call. Node simply enters the event loop after executing the input script. Node exits the event loop when there are no more callbacks to perform. This behavior is like browser JavaScript — the event loop is hidden from the user.HTTP is a first class citizen in Node, designed with streaming and low latency in mind. This makes Node well suited for the foundation of a web library or framework.Just because Node is designed without threads, doesn\'t mean you canno |
# Rime alternative settings | |
# encoding: utf-8 | |
# | |
# difference from default settings: | |
# 1. ascii-style punctuation in half-shape mode | |
# 2. [ ] as paging keys | |
# | |
# save this file as: | |
# (Linux) ~/.config/ibus/rime/alternative.yaml | |
# (Mac OS) ~/Library/Rime/alternative.yaml |
echo -n "test message" | nc -4u -w1 [host] [udp port]