<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    漢辰攻略

    The palest ink is better than the best memory.

      BlogJava :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
      8 Posts :: 1 Stories :: 3 Comments :: 0 Trackbacks

    2008年7月11日 #

  • C-j: Insert a new line with the same indentation level as the current line
  • RET: Insert a new line with the same indentation level as the current line
  • C-M-a: Go to the beginning of the current function or class
  • C-M-e: Go to the end of the current function or class
  • C-M-h: Mark the current function or class for copying, etc.
  • C-M-x: Execute the current function or class
  • C-c C-b: Submit a bug report
  • C-c C-c: Execute the buffer (i.e., the file being displayed)
  • C-c C-d: Trace the stack of the process being executed
  • C-c C-h: Get context-based help
  • C-c TAB: Indent a highlighted (or marked) region
  • C-c C-k: Mark a block of text. Using this at the head of a class or function definition will mark the entire block.
  • C-c C-l: Shift the region to the left. If the cursor is in the middle of a region, the lower half of the region will shift.
  • C-c RET: Execute the current file, opening a new window to show the output.
  • C-c C-n: Jump to the next statement.
  • C-c C-p: Jump to the previous statement.
  • C-c C-r: Shift the region to the right. If the cursor is in the middle of a region, the lower half of the region will shift.
  • C-c C-s: Execute a Python command.
  • C-c C-t: Toggle shells
  • C-c C-u: Go up one block
  • C-c C-v: List the version of the Python mode
  • C-c C-w: Run PyChecker
  • C-c !: Open the Python interactive shell
  • C-c #: Comment the highlighted (marked) region
  • C-c :: Check the indentation off-set
  • C-c <: Shift the region to the left
  • C-c >: Shift the region to the right
  • C-c ?: Show Python mode documentation
  • C-c |: Execute the highlighted (marked) part of the current program.
  • posted @ 2008-11-12 14:11 漢辰 閱讀(1069) | 評(píng)論 (0)編輯 收藏

    --XX:+DoEscapeAnalysis, off by default
    如果一個(gè)對(duì)象的所有引用都是限于某一局部范圍,去掉對(duì)象上的鎖
    --XX:+UseBiasedLocking, on by default
    對(duì)多次取鎖的操作,比如循環(huán),不釋放Lease即使鎖已被釋放,避免費(fèi)時(shí)的取Lease操作 (最有效)
    --XX:+EliminateLocks, on by default
    如果一段代碼經(jīng)常性的加鎖和解鎖,在解鎖與下次加鎖之間又沒干什么事情,則可以將多次加加鎖解鎖操作合并成一對(duì)。也稱為L(zhǎng)ock Coarsening (鎖粗化)

    http://www.infoq.com/articles/java-threading-optimizations-p1
    posted @ 2008-10-30 15:33 漢辰 閱讀(671) | 評(píng)論 (0)編輯 收藏

    python 有str object 和 unicode object 兩種字符串, 都可以存放字符的字節(jié)編碼,但是他們是不同的type,這一點(diǎn)很重要,也是為什么會(huì)有encode 和decode。

    encode 和 decode在pyhton 中的意義可表示為

                                                                      encode
                                                  unicode -------------------------> str
                                                  unicode <--------------------------str
                                                                      decode
    幾種常用法:
    str_string.decode('codec') 是把str_string轉(zhuǎn)換為unicode_string, codec是源str_string的編碼方式
    unicode_string.encode('codec') 是把unicode_string 轉(zhuǎn)換為str_string,codec是目標(biāo)str_string的編碼方式
    str_string.decode('from_codec').encode('to_codec') 可實(shí)現(xiàn)不同編碼的str_string之間的轉(zhuǎn)換
    比如:

    >>> t='長(zhǎng)城'
    >>> t
    '\xb3\xa4\xb3\xc7'
    >>> t.decode('gb2312').encode('utf-8')
    '\xe9\x95\xbf\xe5\x9f\x8e'

    str_string.encode('codec') 是先調(diào)用系統(tǒng)的缺省codec去把str_string轉(zhuǎn)換為unicode_string,然后用encode的參數(shù)codec去轉(zhuǎn)換為最終的str_string. 相當(dāng)于str_string.decode('sys_codec').encode('codec')。

    unicode_string.decode('codec') 基本沒有意義,unicode 在python里只用一種unicode編碼,UTF16或者UTF32(編譯python時(shí)就已經(jīng)確定),沒有編碼轉(zhuǎn)換的需要。 

    注:缺省codec在site-packages下的sitecustomize.py文件中指定,比如

    import sys
    sys.setdefaultencoding(
    'utf-8')



     

    posted @ 2008-09-09 15:49 漢辰 閱讀(13136) | 評(píng)論 (1)編輯 收藏

    慕名Emacs是很久的事了,上個(gè)周末Google了一天終于把它在Windows下的中文化問題初步解決了。

    網(wǎng)上講述Emacs中文問題的帖子很多,不過很多是過時(shí)的或不完整的,并以Linux下居多。很多.emacs設(shè)置看起來發(fā)生了作用,但是在我的機(jī)器上不是顯示方塊,就是半個(gè)中文字符。前者懷疑未配置好Emacs使其無法讀取系統(tǒng)字體,后者懷疑字符寬度設(shè)置還有問題,苦于無暇深究。

    最后找到一篇Emacs 中文化指南[http://17xie.com/read-103809.html],講述了在Windows下使用了X11的BDF字體配置Emacs的過程,下載安裝了intlfont,改了相應(yīng)的emacs設(shè)置,Bingo!!!,一試就通。不過字庫還是GB2312的,想把Mule-GBK 和BDF 字體配置在一起,未成功。

    貼張圖慶賀一下
    posted @ 2008-07-28 13:47 漢辰 閱讀(939) | 評(píng)論 (0)編輯 收藏

    EMacs常用命令集:
    C-x C-s        當(dāng)前文件存盤
    C-x s        所有文件存盤,根據(jù)提示確認(rèn)是否保存指定文件
    C-x C-b        列出緩存
    C-x C-f        查找文件,如果不存在則新建,如果已打開則切換為當(dāng)前文件
    C-x 數(shù)字        關(guān)閉其它窗,只顯示當(dāng)前主窗體。也可以輸入其它數(shù)打開多窗
    C-x o        切換到另一個(gè)打開的窗
    C-z        臨時(shí)退出,在X中相當(dāng)于最小化,在Console中可以用"fg"或者"%emacs"返回。
    C-x C-c        退出
    C-u 數(shù)字        前綴參數(shù),常用于重復(fù)執(zhí)行命令,如插入8個(gè)*符:C-u 8 *
    M-x recover 文件名<回車>         恢復(fù)文件到上次自動(dòng)保存的狀態(tài),常用于系統(tǒng)崩潰時(shí)
    C-h m        當(dāng)前模式的說明文檔,每種模式都略有些許不同
    C-h i        常用shell命令的說明文檔

    常用移動(dòng)命令:
    C-v        向下翻頁
    C-M-v        另一窗向下翻頁
    M-v        向上翻頁
    C-l        移動(dòng)到光標(biāo)位置
    M- <-        移到文首
    M- ->        移到文尾
    C-a        移到行首        M-a        移到句首
    C-e        移到行尾        M-e        移到句尾
    C-p        上移一行
    C-n        下移一行
    C-b        左移一位        M-b        左移一字
    C-f        右移一位        M-f        右移一字
    常用編輯命令:
    C-k        刪除到當(dāng)前行尾
    M-k        刪除到當(dāng)前句尾
    C-g        中斷執(zhí)行
    C-w       Cut marked region
    A-w       Copy marked region
    C-y        取回所有刪除的行,默認(rèn)顯示最后刪除的行
    M-y        C-y取回所有刪除的行之后,切換顯示之前刪除的行
    C-x C-x  Mark the region from the current cursor to last mark point, 可以方便的重復(fù)Mark
    C-x h      Mark the whole buffer
    C-x u        撤消
    C-x C-a C-l Revert a buffer
    g                刷新Dired mode buffer

    常用查找命令:
    C-s        向前查找
    C-r        向后查找
    M-g M-g Goto a line

    進(jìn)入Hex mode      M-x hexl-mode ,C-c C-c 退出

    換行:

    不嫌煩的,每次M-x toggle-truncate-lines切換換行與不換行
    一勞永逸的,M-x customize-option,輸入truncate-partial-width-windows,將出來的設(shè)置頁面中的參數(shù)改為off,然后保存(Save for future sessions)
    另外說一句,M-x auto-fill-mode也是切換換行模式,不過這是要在文章內(nèi)容里插入回車符號(hào)

    posted @ 2008-07-11 22:16 漢辰 閱讀(422) | 評(píng)論 (0)編輯 收藏

    主站蜘蛛池模板: 日韩精品亚洲aⅴ在线影院| 免费人成年轻人电影| 亚洲男人天堂2018av| 嫩草影院在线播放www免费观看| 久久久久一级精品亚洲国产成人综合AV区 | 91视频免费观看高清观看完整| 亚洲免费日韩无码系列| 人妻仑乱A级毛片免费看| 亚洲美女高清一区二区三区| jizz18免费视频| 亚洲婷婷五月综合狠狠爱| 国内永久免费crm系统z在线| 亚洲AV成人片色在线观看高潮 | 国产在线观看麻豆91精品免费| 亚洲成人黄色在线| 1000部国产成人免费视频| 亚洲国产综合精品一区在线播放| 在线精品自拍亚洲第一区| 国产成人精品久久亚洲高清不卡 | 国产免费久久精品丫丫| 亚洲AV中文无码字幕色三| 99热精品在线免费观看| 亚洲va乱码一区二区三区| 国产精品另类激情久久久免费| 免费一级做a爰片久久毛片潮| 国产成人A亚洲精V品无码| 99re在线这里只有精品免费| 国产成人精品亚洲日本在线| 成人免费无码精品国产电影| 成人免费网站久久久| 亚洲视频在线观看免费| 最新免费jlzzjlzz在线播放| 一级特黄录像免费播放中文版| 国产亚洲精AA在线观看SEE| 日韩在线免费视频| 黄色a级片免费看| 亚洲乱亚洲乱淫久久| 尤物永久免费AV无码网站| a毛片久久免费观看| 久久乐国产综合亚洲精品| 国产亚洲精品高清在线|