<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 :: 首頁 :: 聯系 :: 聚合  :: 管理
      8 Posts :: 1 Stories :: 3 Comments :: 0 Trackbacks

    2008年9月9日 #

  • 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) | 評論 (0)編輯 收藏

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

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

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

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

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

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

    str_string.encode('codec') 是先調用系統的缺省codec去把str_string轉換為unicode_string,然后用encode的參數codec去轉換為最終的str_string. 相當于str_string.decode('sys_codec').encode('codec')。

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

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

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



     

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

    主站蜘蛛池模板: 免费视频成人片在线观看| 免费久久人人爽人人爽av| 亚洲一级毛片免费看| 久久91亚洲精品中文字幕| 你懂的在线免费观看| 亚洲色精品88色婷婷七月丁香 | 无码国模国产在线观看免费| 亚洲中文字幕AV在天堂| 无码一区二区三区AV免费| 97久久国产亚洲精品超碰热| 99精品全国免费观看视频| 亚洲国产欧美国产综合一区| 亚洲国产成人久久综合一区77| 九九九国产精品成人免费视频| 中文字幕精品亚洲无线码一区应用 | 免费久久精品国产片香蕉| 男人j进女人p免费视频| 亚洲综合在线另类色区奇米| 日本卡1卡2卡三卡免费| 亚洲成人网在线观看| 女人18毛片a级毛片免费视频| 国产成人亚洲综合a∨| 精品国产香蕉伊思人在线在线亚洲一区二区| 久久九九免费高清视频 | 亚洲日本人成中文字幕| 女人被免费视频网站| 四虎一区二区成人免费影院网址| 国产亚洲精久久久久久无码77777| 日韩免费的视频在线观看香蕉| 亚洲国产精品美女| 日本特黄a级高清免费大片| rh男男车车的车车免费网站| 久久国产亚洲观看| 成人免费在线视频| 91视频免费网站| 精品久久久久久亚洲精品| 亚洲精品A在线观看| 99久久99热精品免费观看国产| 亚洲heyzo专区无码综合| 黑人精品videos亚洲人| 国内免费高清在线观看|