👏 Hello❗️
👍 The good news in the world cryptocurrency❗️
🚀
Binance announced launching a margin trading service
🚀 In honor of this,
Binance team opened AIRDROP 🚀🚀
🚀 Anyone can take part and get prize ❗️
🚀
Hurry up to take part
✅ Information https://bit.ly/2K8I8S7✅ Authoritative t.me/joinchat/KsdfzklB6s33jt7be1fVfg
然後 chat-bridge 需要 PR discord支援
不過呢 以後所有交給我的 bot 都會是 powered by Solaris
其實根本沒人在意用什麼 OS 吧
大家都只要服務不死
典型 Customer 思維(X
例如 Oracle / Indiana / Debian 口味的
這麼說來好像還沒摸過/玩過 Sun 系統,可是好像平常碰不到
現在一台全新的 Oracle SPARC Enterprise 伺服器動輟要十萬港幣 🙈
Amazon 不是有 Annapurna Labs 做 ARM 處理器嗎
講個笑話:Raspberry Pi 專屬 PWM DAC
可是 Raptor Blackbird 也要快五萬台幣
我小時候都用 Allen Disk 不知道是誰寫的
我只有懶得自己實作 DS,想用 STL 時才會用 C++
希望以後你的面試官不要拿 Allen Disk 來問你問題(?
可能你只是比較適合把功能兜出來而不是讓特定計算算很快
翻譯:copy and paste from Stackoverflow
正看著 jserv 作業然後沒頭緒該怎麽解
沒想到我連 abs 這麼簡單的 function 都不會QQ
```
int32_t abs(int32_t x){
return ((x ^ (x >> 31)) - (x >> 31));
}
我們系上都稱轉系為叛徒
雖然大家都釋懷著轉系夢進資管的
考慮極端狀況
- (2^31) - 1
這時候 abs 就死了
我都預設runtime和stdlib絕對有這功能,所以我沒想過他要怎麼算
認真說我覺得討論 intN_t 比討論 long/short/long long 還清楚 (?
我旁邊還一個ticwatch sport開都沒開過
int32物理上就不能表達 +pow(2, 31) 吧…
還有這件事是透過 Underflow 達成的
可是在用工具測試的時候會有 Overflow/Underflow Warning,我也要想怎麽修掉
你讓習慣 -Wall -Wextra -pedantic 的人怎麼活(x
char a[10];
scanf("%s", a);
printf(a);
我覺得,npm上只要有用到native code的,我還沒看過有哪個是warning free的
可是 scanf 那邊有 Overflow 的可能啊
其中 GCC 不管 format string 的事情
我記得以前高中的時候是教 printf("%s", &a);
不過如果很幸運的都沒遇到0x00,不會直接segmentation fault嗎
不過就代表你stack被你讀完了 也是挺不容易的(?
我覺得 Solaris 的服務管理比 systemd 還要 overengineered
manifold service.xml
# [問一堆問題]
svccfg import service.xml
svcadm enable service
# 咦為什麼沒有啓動起來
svcs -a
# 怎麼自己進了 Maintenance mode
svcs -L service
# …… 嗯要自己設定 PATH
vim service.xml
# 再來一次
svccfg import service.xml
svcadm clear svc:/site/service:default
svcadm enable service
# 終於可以……
他要 libvips,他在 Solaris 要自己編譯
不夠的話我可能還要編譯更多的包,有些包沒有在 pkg 裏面
最麻煩就是這些 native modules 了(
我們這學期的程設就是寫遊戲當專案
我覺得我以後應該再也不會寫遊戲了(
在台上的講師怎麼可能領基本薪資R
市場行情這種東西很難說(?
1對1的音樂課一小時1200給你參考,如果我沒記錯的話啦(
Yep,就是寫成 Function 的時候會出現 if/else
#include <stdio.h>
#include <stdint.h>
#include <limits.h>
int32_t abs_test(int32_t x){
return +((x ^ INT_MIN) + 1);
}
int main(void){
printf("%d\n", abs_test(-3));
}
int32_t abs(int32_t x){
return ((x ^ (x >> 31)) + (((x >> 31) ^ INT_MIN) + 1));
}
就可以再更短,也可以滿足上面的條件,就是不用減法跟不產生 branch
hostname : logbot, type : SunOS, platform : sunos, arch : x64, release : 5.11, uptime : 23 days, 03:43:03, loadavg : 0.0, 0.1, 0.1