我有檯高效伺服器但我不在他旁邊——
如何以伺服器虛擬化技術遠端玩轉steam遊戲
wwww
話說想請問, CPU 的 RAM 到 GPU 的 RAM ,理論數值是多快阿?
剛剛用 cudaMemcpy 傳 8388608 個 int 他的測試時間居然寫 0,覺得驚訝 owo
剛剛 call clock() -> 0.028 s
但是
33554432 個 int * 4byte /1024/1024 是 128 GB
照理來說不是應該 4s 才對嗎(?)
我的微積分啦 QQQQQQQQQQQQQQQQQQQQ
8388608*8byte = 67MB
0s 很合理ㄅ
正確數字是 這個
上面是我寫錯ㄖ,寫成我畫圖的數字 owo
據說那是24號要送的公文
然後25才交接
結果處理公文的21到24放假
integral of f(x) dx = integral of f(u) du
@licson 認為 @koru1130 的意思是: 原式 = ∫ u^3 du/(2x+1)
會在 Read 部分卡住,之後直接回應 "連線逾時,中止" (英文)
而我向 net.Conn 寫入一個字串 io.WriteString(*net.Conn, "CAP LS")
有個問題,我嘗試用 net 來向 IRC 伺服器通訊
不過接下來非常奇怪:
// tls=使用 TLS 連線的 net 函式
// 我有設 err handler,此處為 nil
conn, _ := tls.Dial("tcp", "irc.freenode.net:7000")
buff := make([]byte, 2048)
// 確認連線是否成功
// 開始檢查 SASL 能力
// 此處 err == nil
_, errWriting := io.WriteString(conn, "CAP LS")
// 開始接受回應
// 期望取得一字串,包含 "sasl" 字樣
for {
// 此處不接 err,因空回應會導致 io.EOL 錯誤,我不想捕捉。
buflen, _ := conn.Read(buff)
if buflen == 0 {
continue
}
if strings.Contains(string(buff[:buflen]), "sasl") {
break // 進行驗證作業
} else {
goto stopConnection
}
}
因為預期 CAP LS 會回應一串字串,因此想要知道原因。
她可以給我選 Linux/Windows Container 欸
他的 code 跑在 windows10上的linux上開的容器裡的sub namespace裡
我現在在 Windows 上 Dockerize 專案
根本自虐QQ
Docker 本來就是基於 Linux kernel 的容器啊
為什麼要用 Microsoft 的東西去處理,想不開也不是這樣
等等就發生下面的劇情
"Docker buys Portainer"
"Sorry, portainer is no longer available, feel free to try Docker Swarm Enterprise"
((
不我的重點在 Docker 常常買公司然後就把人家的免費服務關掉Orz
docker是那整套cli工具跟image格式之類的總稱
只是沒看過真的有人包for windows的image
[pan93412@Arch-PC ~]$ go run GolangIRCBot.go
2019/01/23 15:21:51 建立連線:連線到 irc.freenode.net:7000 (TLS 連線)
2019/01/23 15:21:57 連線成功:開始進行設定程序
2019/01/23 15:21:57 檢查能力:正在檢查 SASL 能力
ERROR :Closing Link: 127.0.0.1 (Connection timed out)
2019/01/23 15:22:32 檢查能力 [失敗]:SASL 能力不可用。
<nil> <nil>
完整記錄
CAP LS
:tolkien.freenode.net CAP * LS :account-notify extended-join identify-msg multi-prefix sasl
CAP REQ sasl
:tolkien.freenode.net CAP * ACK :sasl
原本有嘗試直接 CAP REQ sasl 直接看 ACK 和 REQ …… 但跟這狀況一樣,也是收不到後續回應。
我測試過好像 \00 會被當成一個 \0 導致後面的 0 不見
@seadog007 import System.Random
import Data.Maybe
millerTest :: Int -> Int -> Int -> Bool
millerTest d n rnd = (n2f (third (until test loop (x0,d0,s0)))) where
n2f (Just x) = x
n2f Nothing = False
a = rnd
third (_,_,x) = x
x0 = (a^d) `mod` n
d0 = d
s0 = Nothing
loop (x,d,s) = (x',d',s') where
x' = (x*x) `mod` n
d' = d*2
s' =
if (x==1)
then Just False
else if (x == n-1)
then Just True
else Nothing
test (x,d,s) = (d==n-1) || isJust s
isPrime :: StdGen -> Int -> Int -> Bool
isPrime rng k n
| n<=1 || n== 4 = False
| n<=3 = True
| otherwise = all (millerTest d n) rnds where
rnds = randomRs (2,n-2) rng
loop x = x `div` 2
cond x = ((x `mod` 2) /= 0)
d = until cond loop (n-1)
*Main> rng = mkStdGen 128309213
*Main> rng
128309214 1
*Main> fn = isPrime rng 10
*Main> fn 87
False
*Main> fn 23
False
是這樣:
AUTHENTICATE (Token)
(Token) 則是 BASE64,以 400 位元切割
格式是 <username>\0<username>\0<password>
regular-authenticate-set = *("AUTHENTICATE" SP 400BASE64 CRLF) "AUTHENTICATE" SP (1*399BASE64 / "+") CRLF
[15:38] >> :tolkien.freenode.net NOTICE * :*** Looking up your hostname...%0A
[15:38] >> :tolkien.freenode.net NOTICE * :*** Checking Ident%0A
[15:38] >> :tolkien.freenode.net NOTICE * :*** Found your hostname%0A
[15:38] << CAP LS%0A
[15:38] << NICK pan93412%0A
[15:38] << USER pan93412 8 * :pan93412%0A
[15:38] >> :tolkien.freenode.net NOTICE * :*** No Ident response%0A
[15:38] >> :tolkien.freenode.net CAP * LS :account-notify extended-join identify-msg multi-prefix sasl%0A
[15:38] << CAP REQ :account-notify extended-join multi-prefix sasl%0A
[15:38] >> :tolkien.freenode.net CAP pan93412 ACK :account-notify extended-join multi-prefix sasl %0A
[15:38] << AUTHENTICATE PLAIN%0A
所以是
var nullChar = "\0"
var code = "pan93412" + nullChar + "pan93412" + nullChar + "神奇密碼"
:tolkien.freenode.net NOTICE * :*** Looking up your hostname...
:tolkien.freenode.net NOTICE * :*** Checking Ident
:tolkien.freenode.net NOTICE * :*** Found your hostname
CAP LS
:tolkien.freenode.net NOTICE * :*** No Ident response
:tolkien.freenode.net CAP * LS :account-notify extended-join identify-msg multi-prefix sasl
CAP LS
:tolkien.freenode.net CAP * LS :account-notify extended-join identify-msg multi-prefix sasl
CAP REQ sasl
:tolkien.freenode.net CAP * ACK :sasl
我自己拿 OpenSSL 驗證其實是可以在 NICK 和 USER 之前先請求能力
irc真的能傳\0嗎...我記得後面的會直接被全部切掉啊
北北基桃竹苗以外都算遠道而來
如果真的是因為機票的話那只提供給非本國國民會眾呢?
怎樣怪啊
有些人說服爸媽總要點時間
早點確定有票比較安心啊
可是到外地跟同一個縣市跑來跑去的程度不太一樣吧?
倒是這樣為什麼宜蘭不在地區限制內(?