我遇到一狀況,在一段長20行的code裡出了會隨機發作的包,而且我還找不出源頭
console.log(err, response ? response.statusCode : null, body)
var i;
if (err || response.statusCode !== 200) {
self.lastOffset = null;
self.emit('error', err || new Error('unexpect response code: ' + response.statusCode + ' ' + body));
} else {
try {
body = JSON.parse(body)
} catch (err) {
self.lastOffset = null;
self.emit('error', err);
}
if (body.ok !== true || !Array.isArray(body.result)) {
self.lastOffset = null;
self.emit('error', new Error('bad response format: ' + body));
} else {
body.result.forEach(function (update) {
if (update.update_id >= self.lastOffset) {
self.lastOffset = update.update_id
}
if (update.message) {
self.emit('message', update.message)
} else if (update.inline_query) {
self.emit('inline_query', update.inline_query)
} else if (update.chosen_inline_result) {
self.emit('chosen_inline_result', update.chosen_inline_result)
}
})
}
}
if (self.pollingEnabled) {
// console.log('current offset: ' + self.lastOffset)
clearTimeout(self.pollingTimeoutId);
self.pollingTimeoutId = setTimeout(checkTimeout, self.pollingTimeout);
self.currentPollRequest = self._poll(timeout, self.lastOffset + 1, handle);
}
})到底甚麼情況下,可以讓
console.log(err, response ? response.statusCode : null, body)
跑完之後跑不到
self.emit('message', update.message)
,而且沒輸出任何錯誤訊息啊
try {
body = JSON.parse(body)
} catch (err) {
self.lastOffset = null;
self.emit('error', err);
}
if (body.ok !== true || !Array.isArray(body.result)) {
這邊會不會async導致try還沒跑完就先跑if?
console.log那行的輸出
null 200 '{"ok":true,"result":[{"update_id":968988106,\n"message":{"message_id":140907,"from":{"id":138628781,"first_name":"DaLun","username":"excfergodst"},"chat":{"id":-1001033293696,"title":"YSITD","username":"YSITD","type":"supergroup"},"date":1460305225,"text":"Sublime \\u55ce ?"}}]}'
我用 Node 的時候很常發生不符合自己要的狀況 ..
無論是哪個語言,我想隨機出現+低機率的bug都很崩潰啦...
例如要用 for loop 去處理陣列的時候
陣列最後還是空白的
@koru1130 邏輯應該比你好,因為他寫出來的東西還沒有這種問題
說真的 callback 不就 A 結束後 call B 嗎
我相信亞米有理解 callback 吧,而且 php 也有 anonymous function 阿
就是 服務生他媽的把我的菜送上來 你的菜來了 而已啊
if (dinner.delivered) { eat() }
你不會像thead一樣影分身去拿菜,但你一定幹過服務生,菜怎麼這麼慢送
Js 的callback設計不良也是有可能射後不理
真的要追求整齊可以把 function 分開檔案define
然後去一個一個 require
然後自己丟 function 給 q
為什麼 coffee 的分支不用咖啡名命名啊XDDD
例如 latte espresso 之類
Coffee歐,寫起來跟python一樣爽,但是debug起來比js 崩潰兩倍
可以在每個大功能那邊加一個console.log "section 9 success" 之類的
前面有fatal error 就出不來 可以判斷位置 然後再細分
去自己compile再看一下就沒問題了
我之前真的是這樣XDDDD 語法差超多
像是
Class Myclass
constructor: ->
我討厭 Coffee 一點的就是
箭頭不能放下一行
但是要小心有時候生出來的 code 跟自己要的不一樣
然後最後不要最後放迴圈,不然會compile出奇葩東西
我記得蜜罐(honeypot)的意思不是這個……?
a = (arr)-> for i in arr i * i
然後 debug 不需要移掉阿,使用者又看不到
而且這樣後面管理找問題不是比較方便嗎
他會把for迴圈中每次最後的值,放進陣列,然後給你
怎麼看都應該是讓function去return i*i
(其實一開始是剛好)
hush 跟青峯聲音真的很像
覺得 telegram 應該要有 travis ci 的 bot
有 osx 使用者覺得 .DS_Store 該不該留嗎
就像windows的desktop.ini一樣的鬼東西
話說推薦學 swift 還是 react native
Meteor 高中生抽卡就是用 React Native
這樣: 'Meteor.Today' + md5(password)
Ntfs上會用alternative stream存,所以不會多出一個檔案
然後剛剛去找了 ._. 真正的意思
.__. usually means that whatever said was not funny or it was annoying. i would give that face to people that are being a smart alack
This should be fixed now! Thanks for your help!
ZSH 預設 alias please=sudo XDD
GitHub Students Package 能多久後重領嗎?
除了上次大掃除蘿莉繪師之外(´°̥̥̥̥̥̥̥̥ω°̥̥̥̥̥̥̥̥`)
OS X 上推薦什麼 android emulator
開發 APP 用
@Sciuridae 有空幫更新Limitfree
@chris1004tw 要用隻 poster bot 嗎?
來說說大家對 meteor.today 的看法(?
反正編譯氣到最後都會把他optimize成c class
etonline @etonline 4月9日
@eastdakota @PeterDaveHello Looks like HiNet is really hard to work with, need to go though TWGate and TPIX from SeedNet..25ms domestic
CF機器放在Mega-iAdvantage (399 Chai Wan Road, Chai Wan, HK) 和 Equinix HK1 (17/F 168 Yeung Uk Road, Tsuen Wan, HK)
Industrial Vocational High School
【抵制陸貨】今天你買一臺陸產的電器,明天監聽通話的設備里就有你的一塊錢。今天你買一桶陸產的奶粉,明天質量監督局領導的桌上就多著你買的一條煙。今天你買一雙陸產的皮鞋,明天城管隊員的皮靴上就有你的血汗。今天你買一輛陸產的汽車,明天官二代的進口跑車將碾過誰的身軀?——抵制陸貨從我做起
@YamiOdymel 你的頭貼怎麼變這麼沒存在感www
倒是,M10 不曉得CA狀況(我這台確定無CA,但中華4G摸塔也夠了)
成句:php是世界上最好的语言
JC ฅ(ↀᆺↀ)ฅ 3 小時前
「为什么在笑话里这个程序员不说 C++ / Python / Haskell 或者别的什么语言是最好的而要说 PHP是最好的呢?」——因为说任何其他语言「最好」都并不好笑啊。
幹。好賤
http://www.plurk.com/p/lkomw7
系統說明 版本:sfs3.0(2002-10-1)
我剛剛查NCC網站想核對基地台頻率,也碰到憑證被Chrome擋
sfs.boe.ttct.edu.tw
來挖寶喔 (X
bat osu relax bot file parse快完成ㄌ
只剩下Timer還有按的功能
var a;
a+="test";
console.log(a);
=>undefinedtest
有人會batㄇ
我現在需要可以抓毫秒ㄉtimer支援
在 JavaScript 任何東西跟 String 加都會變 String
像是
+{} => NaN
~{} => -1
+[] => 0
@x21999125x 格式要nickname + \0 + username + \0 + password
nickname[null char]username[null char]password
for(var i=1;i<=1000000;i++){
}
console.log(i);
說真的 JavaScript 跟 Node.js 是不是不一樣?
JavaScript 沒有想 Node.js 一樣這麼會亂跳
呃,不是,只是有寫 JavaScript function 是非同步
Node.js 只是 JavaScript 的其中一種環境
The client is using the PLAIN SASL mechanism with authentication identity jilles, authorization identity jilles and password sesame.
然後解出來就是 jilles[NUL]jilles[NUL]seasame
我現在遇到一個問題
學校要教程式作業(Java)
但是我Linux的eclipse是存成UTF-8
但是Windows卻用big5讀取
所以非英文字元就會亂碼
何解?
大概是這樣
owo
owwwwwo
owwwwwwwwwwwwwwwwwwwwwwwwo
那個 VOZE 有踩到任何問題的話
這邊開放直接回報(?
LG G5&Friends
Life’s good, when you play more.
我本來想說要再收一隻5C的 結果看到只有A6 就打消念頭了
HTC 10 要發表了誒
怒買 iPhone SE 壓壓驚
然後Apple KeyBoard就有機械式鍵盤就對了 www
以Apple的財力 買下這種公司對他來說應該是小Case (O
等等庫克說 阿不就是手邊零錢就可以買的公司嗎 (X
好啦 不用買Razer 買Cherry整間就好 (O
我覺得如果阿婆出什麼冰箱、電視螢幕、水龍頭、廚具、文具、喇叭、等各大周邊商品 可能會有一堆人去買 (?
> server 8.8.8.8
預設伺服器: google-public-dns-a.google.com
Address: 8.8.8.8
> openbittorent.com
伺服器: google-public-dns-a.google.com
Address: 8.8.8.8
未經授權的回答:
名稱: openbittorent.com
Address: 141.8.226.22
> server 8.8.4.4
預設伺服器: google-public-dns-b.google.com
Address: 8.8.4.4
> openbittorent.com
伺服器: google-public-dns-b.google.com
Address: 8.8.4.4
未經授權的回答:
名稱: openbittorent.com
Address: 141.8.226.22
> server 168.95.1.1
預設伺服器: dns.hinet.net
Address: 168.95.1.1
> openbittorent.com
伺服器: dns.hinet.net
Address: 168.95.1.1
未經授權的回答:
名稱: openbittorent.com
Address: 141.8.226.22
> server 168.95.192.1
預設伺服器: hntp1.hinet.net
Address: 168.95.192.1
> openbittorent.com
伺服器: hntp1.hinet.net
Address: 168.95.192.1
未經授權的回答:
名稱: openbittorent.com
Address: 141.8.226.22
中華居然開始解析openbittorent.com了
nslookup openbittorrent.com 168.95.1.1
Server: 168.95.1.1
Address: 168.95.1.1#53
*** Can't find openbittorrent.com: No answer
umm又是只有你嗎?
我知道為什麼了 openbittorent.com
> server 8.8.8.8
預設伺服器: google-public-dns-a.google.com
Address: 8.8.8.8
> openbittorrent.com
伺服器: google-public-dns-a.google.com
Address: 8.8.8.8
未經授權的回答:
名稱: openbittorrent.com
Address: 151.80.2.53
> server 8.8.4.4
預設伺服器: google-public-dns-b.google.com
Address: 8.8.4.4
> openbittorrent.com
伺服器: google-public-dns-b.google.com
Address: 8.8.4.4
未經授權的回答:
名稱: openbittorrent.com
Address: 151.80.2.53
> server 168.95.1.1
預設伺服器: dns.hinet.net
Address: 168.95.1.1
> openbittorrent.com
伺服器: dns.hinet.net
Address: 168.95.1.1
名稱: openbittorrent.com
> server 168.95.192.1
預設伺服器: hntp1.hinet.net
Address: 168.95.192.1
> openbittorrent.com
伺服器: hntp1.hinet.net
Address: 168.95.192.1
名稱: openbittorrent.com
> server 208.67.222.222
預設伺服器: resolver1.opendns.com
Address: 208.67.222.222
> openbittorrent.com
伺服器: resolver1.opendns.com
Address: 208.67.222.222
未經授權的回答:
名稱: openbittorrent.com
Address: 151.80.2.53
> server 208.67.220.220
預設伺服器: resolver2.opendns.com
Address: 208.67.220.220
> openbittorrent.com
伺服器: resolver2.opendns.com
Address: 208.67.220.220
未經授權的回答:
名稱: openbittorrent.com
Address: 151.80.2.53
之前海豹發的那個BTC賭博網站OpenDNS就有擋
驗證DNS資料來源的真確性 (origin authentication of DNS data) :
完整性的確保 (Integrity assurance)
不存在的驗證 (authenticated denial of existence)
apple beats razer 感覺很配阿XD
2620:0:ccc::2
2620:0:ccd::2
OpenDNS伺服器在香港的樣子Google理所當然在台灣
IPv4發他自己的是很久以前就可以做到的
IPv6是近期才開始有Router在做轉發
我現在是用6to4,天殺的Hinet表示什麼都要光世代才能申請
@james58899 我的臨時主機爲甚麼還是一片空白
@licson 現在有哪一家DDNS有提供IPv6跟IPv4的?
@chris1004tw 用CloudFlare啦
API要用哪隻阿
Global API Key
Origin CA Key
@licson
2016/4/11 下午9:02:38:
E_INVLDINPUT You must include an `a' parameter, with a value of wl|chl|nul|ban|comm_news|devmode|sec_lvl|ipv46|ob|cache_lvl|fpurge_ts|async|mirage2|img.q|minify|stats|zone_check|zone_ips|zone_ss|vote_ss|app|ip_lkup|set|app_req|app_req_list|app_version|ers
我遇到了奇扒事...我被windows拒絕存取自己創的檔案 .-.
就算是權限是system,windows預設應該也不擋執行啊.... 不知道是不是 cyngin 幹得好事
不然當初 explore.exe 死掉我是怎麼重開的啊...
CF DDNS測試好了 看看上Tomato可不可以
不對阿 自幹上CloudFlare 但還是沒有DDNS IPv6阿...
Oh, please don’t let me die
Ready for your touch
這句超好聽www
有夠奇扒,不過windows上有tmux替代品嘛...
@james58899 我說 現在不能預測的有那些
正在看c9 on windows的功能剩多少...shell跟 package manager都沒有的環境真的能用嘛...
@james58899 他劇情已經算比較難預測得了吧
原廠ASUS FW 就有Stateless跟Stateful可以選
我在說IPv6流量很低 暫時沒借個需要全部都用IPv6
@chris1004tw 中華保證到機房的流量是什麼意思?
是說 cywgin 的 bash,無法辨識 /r/n 的檔案
> server 8.8.8.8
預設伺服器: google-public-dns-a.google.com
Address: 8.8.8.8
> www.google.com.tw
伺服器: google-public-dns-a.google.com
Address: 8.8.8.8
未經授權的回答:
名稱: server.3cyber.com
Addresses: 2400:6180:0:d0::dc:4001
103.253.147.28
Aliases: www.google.com.tw.3cyber.com
> server 168.95.1.1
預設伺服器: dns.hinet.net
Address: 168.95.1.1
> www.google.com.tw
伺服器: dns.hinet.net
Address: 168.95.1.1
未經授權的回答:
名稱: server.3cyber.com
Addresses: 2400:6180:0:d0::dc:4001
103.253.147.28
Aliases: www.google.com.tw.3cyber.com
怎麼nslookup全部都會被返回一個伺服器 但是用其他瀏覽器都正常
正常的話10Gbps可以塞一千戶家庭的正常上網流量
他又不是NTT/PCCW/Tata/...那些Carrier
@YamiOdymel 踢喵加ingress支援好不好
denny在台北拉1000個cf,等於我台南拉一個,越偏遠的地方越好賺啊
@GoneTone <---------他要問的 (O
@BirkhoffLee 你交 @GoneTone 怎麼判斷 (X
以後有關Cytus VOEZ Demmo 找你就對惹 (X
還沒進公司就被報了一個 bug 說進去要報
今天就處理啦XDD
@koru1130 豪可憐 沒人要跟你說晚安(拍拍
話說什麼時候才會有不需要大量資料就能識別圖像的AI阿 (望
靠 OP 欸
不能多用點心嗎 都 2016 了 還做出那種 2000 年的東西
Google 前陣子有開簡單的 API 出來給大家用啦
@DennyHuang 我以為你是fanily (ou
steam上的 睡你媽拉幹 是誰啊?剛剛被敲,互助會的? 7個共同好友,好像有點多,應該是熟人啊,但我半點印象都沒有
或是把疑似病毒網站網址戳一輪,你會被資安通報+斷網(X
就算是用百度的 p2p client,速度都不到10k
我建議連中國資源要找人當跳板,btw之前找licson借的也主要是這種目的
到高雄去 兩張信用卡 一張悠遊卡 一張一卡通 超煩躁...
@DennyHuang 你可以想辦法把晶片取出來www
我現在是這樣沒錯啦 本來的悠遊卡已經被我冷落很久了
<- 在香港實驗過拿一疊 RFID 卡 他照樣吃到八達通可以 work
我現在錢包裡有 悠遊卡
icash
icash 2
一卡通
/log@ysitdbot find -r 4/11 4/11 -t #ysitd
Page 1 of total 174 Pages. Time Zone is +08:00