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
REGEDIT4 | |
[HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionFontSubstitutes] | |
"Arial"="Arial" | |
"Arial CE,238"="PMingLiU" | |
"Arial CYR,204"="PMingLiU" | |
"Arial Greek,161"="PMingLiU" | |
"Arial TUR,162"="PMingLiU" | |
"Courier New"="Courier New" | |
"Courier New CE,238"="PMingLiU" |
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
[system.reflection.assembly]::LoadWithPartialName("System.IO.Compression") | |
[system.reflection.assembly]::LoadWithPartialName("System.IO.Compression.ZipFile") | |
$CsCode = @' | |
using System; | |
using System.Net; | |
using System.IO; | |
using System.IO.Compression; |
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
#include <Napi.h> | |
#include "TestFunc.h" | |
#include <functional> | |
#include <vector> | |
#include <memory> | |
#include <unordered_map> | |
using Handle = unsigned long long; | |
using Context = struct context |
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
function findIntersection(str1, str2){ | |
const intersections = []; | |
var intersection; | |
let distance = 0; | |
let patternStart = false; | |
while(distance <= str1.length - 1){ | |
if(!patternStart){ | |
if(str1[str1.length - 1 - distance] == str2[0]){ | |
let subStr1 = str1.substring(str1.length - 1-distance); | |
if(str2.indexOf(subStr1) == 0){ |
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
var getProgressBar = (function(){ | |
var wm = new WeakMap(); | |
function _getVal(obj, key){ | |
var _obj = wm.get(obj); | |
if(typeof _obj == 'undefined'){ | |
return undefined; | |
} |
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
var Recorder = (function(){ | |
var wm = new WeakMap(); | |
function _getVal(obj, key){ | |
var _obj = wm.get(obj); | |
if(typeof _obj == 'undefined'){ | |
return undefined; | |
} | |
return _obj[key]; |
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
openssh-server docker |
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
/** | |
* 在使用electron main進程跟renderer進程時,遇上一個困擾 | |
* 就是如果在主進程必須等待渲染進程的資料才能繼續下一步時, | |
* 勢必要阻塞主進城的執行順序,等待渲染進程的資料。 | |
* 因ipcMain監聽事件是非同步的,亦即事件的處理方法必須在callback函式裡面處理, | |
* 所以必須把ipcMain的部分使用Promise進行封裝,才可以有辦法做成同步化, | |
* 以我的例子中,在主進程使用selenium webdriver,獲取captcha的圖片, | |
* 等待渲染進程輸入captcha code,由主進程的selenium進行提交, | |
* 考慮的狀況有: | |
* 1. 提交第一次,captcha code即驗證無誤,進行下一步驟 |
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
FROM alpine:latest AS builder | |
WORKDIR /root | |
RUN apk update | |
RUN apk add curl wget | |
RUN export BRANCH=$(curl -L http://dl-cdn.alpinelinux.org/alpine | \ | |
grep -E 'v[0-9]+\.[0-9]+' | \ | |
sed -e 's/<[^>]*>//g' -e 's/\/.*//g' | \ | |
sort -V | \ |
NewerOlder