李一顆@ Code

          Simple is best.

          2008年6月13日 #

          Eclipse Can't Run Because She Is Not a Chinese.

          When you set the default keyboard setting to non English for instance like Chinese IME MS-pinyin 2008 or whatever, you’ll get an  error like “Jvm terminated.Exit code = -1” and a lot other message (maybe the eclipse run environment setting?) pop upped when you try to run eclipse. Maybe  this is a bug about eclipse, and the solution in here is simply like your thought : get back using English as your default setting.

          posted @ 2008-06-13 09:55 mai 閱讀(329) | 評論 (0)編輯 收藏

          2008年1月23日 #

          Newbie's Debian Road

               摘要: This is a stepped summary about my working environment 'debian etch'. I don't want just play with the OS, and I hate hard working, so the linux distributor I chosed must be stable ,easyly understood and simple configured. Based on those clauses, 'debian' is the best suit, except its uglily name. After 3 weeks' testing on my old hard disk, I thought "hmm, IT is!". Now I'm formal accept myself using this as my main OS. Followed is the tips I soloved by google, list here for reference.  閱讀全文

          posted @ 2008-01-23 20:51 mai 閱讀(1280) | 評論 (0)編輯 收藏

          2008年1月17日 #

          A Stupid Way to Reverse Chinese File

          #	ReversFile.py [infile] [outfile]
          #
          #	A stupid way to reverse a chinese text file. just for fun.
          #	If you wanna get the same result, maybe you should only slipt  
          #	input text file to character list and '.reverse' it,
          #         more simpler and clearer than this.
          #Note::	This code have some problem about chinese quotation marks,
          #	cause it's has differnet between left and right. 
          #	So when it been reversed, the result may "unreadable":) Easy fixed but I ignored.
          #	Also about 'Enter' key, ignored too.
          #
          #		writen by Mai 01/17/2008
          # 
          
          # -*- coding: cp936 -*-
          import sys
          
          class revFileFont:
              readLines=[]
              inFile=""
              outFileName=""
              outList=[]
              def __init__(self,fileName,outFile):
                  self.inFile = open(fileName,"r")
                  self.outFileName = open(outFile,"w")
          
          
              def __readToList(self):
                  self.inFile.seek(0)
                  self.inFile
                  for line in self.inFile:
                      self.readLines.append(line.decode("gbk"))
                  rangeList = len(self.readLines)
                  self.readLines.reverse()
                  for i in range(rangeList):
                      rString = self.readLines[i]
                      xi=len(rString)
                      for xii in range(xi):
                          if rString[xi-xii-1]!=u'\n':
                             self.outList.append(rString[xi-xii-1])
                      self.outList.append(u'\n')        
          
              def DoIt(self):
          	"""Reverse file and write it out."""
                  self.__readToList()
                  for i in self.outList:
                      self.outFileName.write(i.encode("gbk"))
                  self.inFile.close()
                  self.outFileName.close()
          
          if __name__ == "__main__":
              argc = len(sys.argv)
              if argc <> 3:
          	print 'Useage:',sys.argv[0],' [inFile]',' [outFile]'
          	sys.exit(1)
              test = revFileFont(sys.argv[1],sys.argv[2])
              test.DoIt()
             #print test.outList
          

          posted @ 2008-01-17 17:37 mai 閱讀(198) | 評論 (0)編輯 收藏

          2008年1月7日 #

          Testing

          Ok, today is the first day here!

          Are the zoudry blog post system worked ok?

          For testing purpose only.



          Mm.....Great!


          How about upload a picture?


           

          damn it! can't works...

          Where can I found a useful web host to post my picture so it can linked here? Any suggestion?

          Using win live writer...

           

           

          seemed works fine.

          BUT,how to delete it from the blog?

          Ok, got it!

          posted @ 2008-01-07 10:00 mai 閱讀(180) | 評論 (0)編輯 收藏

          僅列出標題  
          主站蜘蛛池模板: 江达县| 云龙县| 剑川县| 朝阳市| 贵溪市| 图木舒克市| 巢湖市| 台东县| 崇仁县| 长顺县| 深泽县| 东乌珠穆沁旗| 毕节市| 贡觉县| 旬阳县| 甘德县| 阜新| 佛坪县| 桐梓县| 扶风县| 镇远县| 秭归县| 靖安县| 平罗县| 云南省| 徐汇区| 定兴县| 潮安县| 五台县| 双柏县| 岳西县| 洱源县| 延寿县| 卫辉市| 中西区| 吉木萨尔县| 平湖市| 清流县| 德兴市| 上高县| 龙岩市|