This file contains 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
'use strict'; | |
/* | |
Calculate Levenshtein distance(edit dstance) between str1 and str2. | |
*/ | |
const calculateLevenshteinDistance = (str1, str2) => { | |
// Initialize distance table | |
let distanceTable = new Array(str1.length + 1); | |
for (let row = 0; row < str1.length + 1; row++) { | |
distanceTable[row] = new Array(str2.length + 1); |
This file contains 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
// 標準入力から1行ずつ読み込み | |
var readLineFromStdin = function(callback) { | |
process.stdin.resume(); | |
process.stdin.setEncoding('utf8'); | |
// 入力(の一部)が到着 | |
var fragment = ''; | |
process.stdin.on('data', function(chunk) { | |
if (chunk === '') { | |
return; |
This file contains 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
@echo off | |
rem 指定した作業ディレクトリでCmderを立ち上げるバッチ | |
rem 使い方: Cmder.bat <作業ディレクトリ> | |
rem 本来Cmderは/STARTオプションで起動するディレクトリが指定できるはずだが、 | |
rem 指定を無視してCmderを呼び出したプログラムの作業ディレクトリで起動してしまう。 | |
rem とりあえずの対策として、このバッチでコマンドプロンプトを噛ませることにした。 | |
rem HKEY_CLASSES_ROOT\Directory\shell\Cmder Here\commandに「launch_cmder.bat "%V"」で | |
rem 登録すると、フォルダの右クリックメニューに出てくれて便利。 |
This file contains 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
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
network={ | |
ssid="SSID" | |
#psk="password" | |
psk=2f6a0beddf2f0588ee426b0c3a0e3d9a523bb07a05cb857f85d826da80fa75c4 | |
} |
This file contains 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
Get-ChildItem -Filter "*.flac" | % { ffmpeg.exe -i "$_" -acodec alac "$($_.BaseName).m4a" } |
NewerOlder