Notes: Things to Avoid in C/C++

ref: Things to Avoid in C/C++

  1. gets(): no internal checks means a potential overflow, use fgets() instead
  2. fflush(stdin): effect undefined for input stream
  3. feof() to exit a loop
  4. system(“pause”): no need for this expensive function, use getchar() instead
  5. scanf(): a. leaves stuff in the input buffer to mess up your next input. b. quite a big function. c. for string, same problem as gets(). d. for char, use getchar() instead.
  6. void main()

Alt + SysRq + ?

B: Immediately reboot the system, without unmounting partitions or syncing
R: Switch the keyboard from raw mode, the mode used by programs such as X11 and svgalib, to XLATE mode
S: Sync all mounted filesystems

fix GPS in Google Map

that is cuz too little time is given by google map to FIX a satellite using GPSViewer

Sync Win Mobile 6.1 With Ubuntu

Three Steps:

Install SynCE:
http://www.synce.org/moin/SynceWithUbuntu

Setup SynCE:
http://www.synce.org/moin/SynceSetup/SyncEngine

Setup OpenSync:
http://www.synce.org/moin/SynceSetup/OpenSync

一些安装笔记:
1. python-opensync要降级,默认是3.6,会出现segment fault
2. 每次要先开 synce-sync-engine, 再用synce-create-partnership “sKh Ubuntu” “Contacts,Calendar,Tasks”新建一个通话(不明原因),再用msynctool –sync synce-sync即可同步
3. 可以同步Contacts,Calendar,Tasks,Files