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
{ | |
"manifest_version": 3, | |
"name": "Move tab", | |
"version": "1.0", | |
"background": { | |
"scripts": [ | |
"service-worker.js" | |
] | |
}, | |
"action": { |
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
chrome.windows.getAll({populate: true, windowTypes: ['normal']}, (windows) => { | |
const tabId = windows[0].tabs[0].id; | |
chrome.debugger.attach({ tabId: tabId }, '1.2', () => { | |
chrome.debugger.sendCommand( | |
{ tabId: tabId }, | |
'Browser.close' | |
); | |
}); | |
}) |
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
let mainId, subId; | |
const detectMainWinodows = () => { | |
chrome.windows.getAll({populate: true, windowTypes: ['normal']}, (windows) => { | |
if (windows.length == 1) return; | |
const sortedWindowIdArray = windows.sort((a, b) => b.tabs.length - a.tabs.length).map((win) => win.id); | |
mainId = sortedWindowIdArray[0]; | |
subId = sortedWindowIdArray[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
echo %~1 | |
rem 指定フォルダ配下(サブフォルダ含む)の全ての対象ファイルに対して処理を行う | |
for /r "%~1\" %%a in ("*.wav") do ( | |
rem ファイル名を画面へ出力 | |
echo 対象ファイル:"%%a" | |
flac --delete-input-file "%%a" | |
if exist "%%a" wavpack -d "%%a" | |
) | |
pause |
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
/** | |
* en: Split camel case by using lookahead and lookbehind Zero-Length Assertions of regular expression | |
* ja:キャメルケースの分割。正規表現のゼロ幅先読みを使用 | |
* | |
* @param hashTag | |
* @return "camelCase" -> {"camel", "Case"}, "EMABiggestFans1D" -> {"EMA", "Biggest", "Fans", "1D"} , "MVDvsSSE" -> {"MVD", "SSE"} | |
* @see <a href="http://msdn.microsoft.com/en-us/library/az24scfc(v=vs.110).aspx#grouping_constructs">Regular Expression Language - Quick Reference</a> | |
* @see <a href="http://stackoverflow.com/questions/7593969/regex-to-split-camelcase-or-titlecase-advanced">java - RegEx to split camelCase or TitleCase (advanced) - Stack Overflow</a> | |
*/ | |
public static String[] splitCamelCase(String hashTag) { |
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
/** | |
* @see <a href="http://en.wikipedia.org/wiki/Riemann_sum#Middle_sum">http://en.wikipedia.org/wiki/Riemann_sum#Middle_sum</a> | |
*/ | |
public static double riemannSum(Function<Double, Double> func, double beginPoint, double endPoint, double interval){ | |
double result = 0; | |
//Middle Sum(Maybe error sum is most minimal) | |
for(double x = beginPoint; x<=endPoint; x+=interval){ | |
result += func.apply(x+interval/2); | |
} | |
result *= interval; |