參考網址:EPH的程式日記
sublime 本身內含比較陽春的hex功能,可以用file->reopen with Encoding->hexadecimal看到16進位模式,這樣的模式只能看到16進位碼,缺少了16進位與一般模式的對照
加裝HexViewer插件就可以有對照的功能了
參考網址:EPH的程式日記
sublime 本身內含比較陽春的hex功能,可以用file->reopen with Encoding->hexadecimal看到16進位模式,這樣的模式只能看到16進位碼,缺少了16進位與一般模式的對照
加裝HexViewer插件就可以有對照的功能了
參考網址:itread01
BOM——Byte Order Mark,就是位元組序標記
UTF-8不需要BOM來表明位元組順序,但可以用BOM來表明編碼方式。字元"ZERO WIDTH NO-BREAK SPACE"的UTF-8編碼是EF BB BF。所以如果接收者收到以EF BB BF開頭的位元組流,就知道這是UTF-8編碼了。
UTF- 8編碼的檔案中,BOM佔三個位元組。如果用記事本把一個文字檔案另存為UTF-8編碼方式的話,用UE開啟這個檔案,切換到十六進位制編輯狀態就可以看到開 頭的FFFE了。
參考網址:DelftStack
unset()
函式從 PHP 陣列中刪除一個元素 此函式不會更改索引值。索引值與以前相同。
array_splice()
函式從 PHP 中的陣列中刪除一個元素 array_splice
函式將自動為鍵重新索引。
array_diff()
函式從 PHP 中的陣列中刪除一個元素 此函式不會更改陣列元素的索引。
實作後發現array_diff()會將索引值做一些改變,卻也不是從0開始,可用shuffle()讓索引值重整。
參考網址:https://www.itread01.com/content/1549431727.html
ctrl+/ 註解
Ctrl+Shift+K(shhift+del) 刪除整行 下面的文件會上移
remove_tag: shift+ctrl+;刪除包裹的html標籤(phpstorm: ctrl + shift + del) 所在行留空
雙敗淘汰改成單敗淘汰
將最上面的svg 和最下面的 /svg 註解
找到中間有許多text的地方 留第一行並註解掉,以下全部刪除
其它文件中的text全刪
這樣的做法最上頭的那一個直線會不見(有需要再補囉!)
參考網址:
一直以來,對戰表的產生總是無法順利完成。看到SVG檔的結構,突發奇想,為什麼要跟樹狀結構硬拼呢?
既然有人可以做出樹狀結構的SVG檔了,就直接拿它來用,只要把資料庫中的人名接上去,就可以完成對戰表了。
感謝ren1244寫出這麼好用的程式,並大方分享。
it鐵人賽 D3.js新手開發基本圖表
網頁直接編輯環境 https://jsfiddle.net/
文字跟隨曲線排列 [D3]用 D3.js 畫出 SVG 基本圖形 – 文字 text
HTML dir Attribute 與 CSS writing-mode writing-mode: tb 文字直排
Is it possible to import svg shapes in d3.js?
getBBox() https://www.zhangxinxu.com/github/demo-Snap.svg/demo/basic/Element.getBBox.php 返回元素的边界框描述
儲存檔案時,要把svg放在div中。
參考網址:stackOverFlow
net.bat
Powershell -Command Start-Process powershell -ArgumentList '-File d:\0_as\wsl\net.ps1' -Verb runAs REM pause
net.ps1
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '" $found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; if( $found ){ $remoteport = $matches[0]; } else{ echo "The Script Exited, the ip address of WSL 2 cannot be found"; exit; } #[Ports] #All the ports you want to forward separated by coma $ports=@(80); #[Static ip] #You can change the addr to your ip config to listen to a specific address #$addr='0.0.0.0'; $addr='192.168.1.11'; #$addr='192.168.2.14'; $ports_a = $ports -join ","; #Remove Firewall Exception Rules iex "Remove-NetFireWallRule -DisplayName 'WSL 2 Firewall Unlock' "; #adding Exception Rules for inbound and outbound Rules iex "New-NetFireWallRule -DisplayName 'WSL 2 Firewall Unlock' -Direction Outbound -LocalPort $ports_a -Action Allow -Protocol TCP"; iex "New-NetFireWallRule -DisplayName 'WSL 2 Firewall Unlock' -Direction Inbound -LocalPort $ports_a -Action Allow -Protocol TCP"; for( $i = 0; $i -lt $ports.length; $i++ ){ $port = $ports[$i]; iex "netsh interface portproxy delete v4tov4 listenport=$port listenaddress=$addr"; iex "netsh interface portproxy add v4tov4 listenport=$port listenaddress=$addr connectport=$port connectaddress=$remoteport"; } pause