2013年10月10日 星期四

用 mingw rebuild linux network ap, 找不到 netdn.h, inet.h, socket.h

google 到是 在 win32 改用 winsock2.h, 但我還沒有用看看, 我乾脆用 cygwin 

#ifdef WIN32
# include  < winsock2.h >
#else
# include  < netdn.h >
# include  < inet.h >
# include  < socket.h>
# include
# indlude
#endif

gcc 報錯 undefined reference to `errno'

追加一行   #include < errno.h >

gcc 錯誤 「for」 loop initial declarations are only allowed in C99 mode

像這樣的 code, gcc 報錯
for(int i = low; i <= high; ++i)

需要在 cflags 加 -std=c99, 或是不要在 for loop 宣告變數

2013年8月7日 星期三

手勢的文化意義

這兩篇是討論手勢的文化意義
http://ingenira.hubpages.com/hub/How-to-Read-Others-Thoughts-by-Their-Gestures
http://www.languagetrainers.co.uk/blog/2007/09/24/top-10-hand-gestures/


同一個手勢在不同的國家地區, 有可能代表不同的意義.  差異可以大到從表達善意變成有敵意.

有些手勢經過電影電視讓大多數地區所熟知,  但是不能保證不會讓人誤解. 因為他們有自己的傳統意義存在



這個手勢, 在英語系國家代表 OK, good
在法國代表 zero, worthless
在日本代表 money
在希臘北方代表要圈圈叉叉, 是性交的暗示
跟在這些地方也是跟希臘北方類似意思, 意指屁眼.
歐洲地中海地區,德國,土耳其,馬爾他,撒丁島,突尼斯,中東,巴西,巴拉圭












這手勢在英語系國家跟上面那個意思一樣, 是可以互通的.
另外他們想搭便車時也常用這個手勢.

在歐洲的意思是第一, 因為他們扳指頭數1到5時, 是從拇指開始數.

在北希臘跟撒丁島南方, 俄羅斯, 西非,拉丁美洲, 意大利南方, 它的意思跟英語系國家比中指的意思一樣.











在希臘,巴基斯坦,日本, 韓國, 及非洲部份地區, 有叫敵人去甲賽的意思




















這個手勢在好萊屋電影通常是美女勾引男人登門入室的手勢.

但是在菲律賓, 比這個會被抓來砍指頭. 因為你把他當狗了 


在英語系國家這個手勢代表勝利或是"愛與和平",  但是這個手勢以手背對著別人,卻又代表侮辱的意義. 

在意大利比這個手勢放在鼻子前面, 代表陰道


這個手勢在佛教及印度教代表吉祥除魔, 重金屬樂迷代表撒旦. 在歐洲某些國家代表帶綠帽了.  西班牙,葡萄牙,希臘,哥倫比亞,巴西,阿爾巴尼亞,斯洛伐克和捷克.






2013年7月22日 星期一

Android x86 4.2 hotkey list

執行某些APP, 會改變螢幕方向, 更糟的是, 退出APP, 螢幕方向不會還原.

孤狗一下找到 android x86 4.0 的 hotkey, 稍微測一下, 是可以用在 4.2 上

在首頁 Home,

  • POWER 鍵, 按1次 = SUSPEND,  快速按2次 = SHUTDOWN
  • ESC = Go Back
  • ALT+F1 =  Console
  • ALT+F7  = Android 桌面.
  • ALT+TAB = 顯示最近執行APP, 按住 Alt鍵, 按 TAB 選擇 APP
  • CTRL+W = 設定桌面壁紙 wallpaper
  • CTRL+P  = 進入設定.
  • CTRL+M = 管理 Apps
  • WindowsKEY+E =開 Google mail.
  • WindowsKEY+P = 開Google Music Player.
  • WindowsKEY+A = 開計算機.
  • WindowsKEY+S = 開 SMS/MMS.
  • WindowsKEY+L = 開行事曆.
  • WindowsKEY+C = 開連絡人.
  • WindowsKEY+B = 開瀏覽器.
  • WindowsKEY+M = 開 google 地圖.
  • WindowsKEY+SPACE = 開 Search
  •  
  • 螢幕旋轉
    • 按2次 F12 右邊 90º.
    • 按2次 F11 左邊 90º .
    • 按2次 F10 180º.
    • 按2次 F9  0º.

    在瀏覽器, 跟PC 的hot key 一樣.
    • CTRL+N = 加一頁, new tab.
    • CTRL+W = 關一頁, closes the current open tab.
    • CTRL+I = 放大, Zoom-in .
    • CTRL+O = 縮小, zoom-out .
    • CTRL+J = 下載管理員, open download manager.
    • CTRL+R = 刷新, refresh current page.
    • CTRL+F = 尋找, find on page.
    • CTRL+B = 書籤, open bookmarks.
    • CTRL+D = 加書籤, add bookmarks.
    • CTRL+H= 瀏覽記錄, view browsing history.
    • CTRL+S = open social network sharing menu.
    • CTRL+G = page info.
    • CTRL+P = open browser settings.
    • Space = Page Down on web page / view document.
    • Shift+Space = Page Up web page / view document.

     

  •  

     

    2013年7月15日 星期一

    Lubuntu 12.04 開 samba


    要架一台file server 給同事用. 因為找不到 gfx driver, 所以決定裝 lubuntu. 而不是需要 gfx 高效能的 ubuntu.

    但是 lubuntu 的 file manager 實在陽春, 找不到開 samba 的方法.
    孤狗得到結果如下.

    1.  開 synaptic package manager, 加套件 cifs-utils, samba, smbclient, system-config-samba

    2.  在 system tools 會多個 samba, 這個是 samba config gui, 可以指定要 share 的目錄及 user name

    3. user name 可以用 adduser 加入, 除了本地的 password. 還要設 samba password. 這樣才能從遠端登入.

     from a terminal box type sudo smbpasswd -a you'll be asked for a password, use your normal one

    2013年7月2日 星期二

    set Sun JDK PATH in Linux

    below copy from Oracle web site

    To Set PATH on Linux


    Steps
    1. Change to your home directory.
      cd $HOME
    2. Open the .bashrc file.
    3. Add the following line to the file. Replace the JDK directory with the name of your java installation directory.
      export PATH=/usr/java//bin:$PATH
    4. Save the file and exit.
      Use the source command to force Linux to reload the .bashrc file which normally is read only when you log in each time.
      source .bashrc

      Note – Note that if you wish to set the PATH for all users, you need to log in as root in the bash shell and perform the above steps on the .profile file in the etc directory and not the .bashrc file in the home directory.

    追蹤者