討論串[閒聊] 各種神人的code
共 17 篇文章

推噓1(1推 0噓 2→)留言3則,0人參與, 最新作者bluesoul (V10加油啊)時間11年前 (2014/09/23 01:03), 編輯資訊
0
0
3
內容預覽:
這段是正確的. wait.wait(&ClearMutex) 會把ClearMutext解開,然後等待被喚醒. (http://qt-project.org/doc/qt-4.8/qwaitcondition.html#wait). 喚醒後會重新鎖上ClearMutext所以和ClearMutext
(還有122個字)

推噓6(6推 0噓 1→)留言7則,0人參與, 最新作者wasidada (dada)時間11年前 (2014/09/22 22:30), 編輯資訊
0
0
1
內容預覽:
在學時,曾經遇過某位博士班學長教導一位在職班學弟寫判斷式. 如下.... if(A==B==C==D). {. if(B==C==D). {. .... }. }. --. 發信站: 批踢踢實業坊(ptt.cc), 來自: 123.205.139.6. 文章網址: http://www.pt

推噓0(0推 0噓 9→)留言9則,0人參與, 最新作者leolarrel (真.粽子無雙)時間11年前 (2014/09/22 19:08), 編輯資訊
0
0
1
內容預覽:
我也來提供一個.C語言,64bit. struct A {. int8 arg1;. int8 reserve;. int16 reserve2;. int arg2;. int32 arg3;. int32 reserve3;. } __attribute__((packed));. .... 為
(還有73個字)

推噓3(3推 0噓 4→)留言7則,0人參與, 最新作者ccccboom (西西)時間11年前 (2014/09/13 07:15), 編輯資訊
0
0
1
內容預覽:
上個月看到的. if( val == 1 ). func(1);. else if( val == 2 ). func(2);. .... else. func(val);. 這樣寫是為了避開在某種multi thread架構下. 某個global變數沒有做sync造成的bug.... 嗎?. 那時

推噓3(3推 0噓 5→)留言8則,0人參與, 最新作者Ekmund (您好,我是神經病。)時間11年前 (2014/09/13 03:07), 編輯資訊
0
0
1
內容預覽:
小弟也來分享一個好了, 現在是寫MFC.. 前陣子剛接了一位離職前輩的code, 他人很好, 可是每次看他的code都很崩潰.... 因為大概都像這樣:. int Int_DBI_gcNumber_Part1_temp_temp;. int Int_DBI_gcNumber_Part1_temp_A
(還有1912個字)