随笔分类 -  学习笔记

java笔记 SAXParser test - 简单输出
摘要:1importjava.io.IOException;23importjavax.xml.parsers.*;45importorg.junit.Test;6importorg.xml.sax.Attributes;7importorg.xml.sax.InputSource;8importorg.xml.sax.Locator;9importorg.xml.sax.SAXException;10importorg.xml.sax.SAXParseException;11importorg.xml.sax.helpers.*;12131415publicclassTestSAX{1617@T. 阅读全文

posted @ 2012-03-03 23:42 learner

java笔记: collection 分类
摘要:所在package: java.utilbasic types: * Collection: List, Set, Queue # list hold the elements in the way they are inserted # Set can't have duplicated elements# queue: produces the elements in the order determined by a queuing dicipline * Map -- holding key value pairs, List implementations: ArrayLis 阅读全文

posted @ 2012-03-03 13:08 learner

java笔记: array的基本用法
摘要:1importjava.lang.reflect.Array;2importjava.util.ArrayList;3importjava.util.Arrays;4importjava.util.List;56importorg.junit.Test;789publicclassArrayTest{1011publicstaticvoidprint(Stringstr){12System.out.print(str);13}14publicstaticvoidprint(Stringformat,Object...args){15System.out.printf(format,args); 阅读全文

posted @ 2012-03-02 22:52 learner

linux 学习笔记: 更换wubi image
摘要:将用dd生成的*。disk文件, copy 到 /ubuntu/disks/, rename to root.diskboot to wubi, in grub menu, don't use the old menu, go into the command shell of grubinsmod part_msdos # support fat file systeminsmod ntfs # support ntfsset root='(hd0,msdos1)' # if not sure, use ls to check current disks, and f 阅读全文

posted @ 2012-02-26 21:18 learner

linux 学习笔记: 使用dd生成disk image文件
摘要:sudo dd if=/dev/sd[x] of=/xxx.disk bs=512 conv=sync,notrunc若要直接压缩:sudo dd if=/dev/sd[x] bs=512 conv=sync,notrunc | gzip > /mnt/xxx.disk.gz 阅读全文

posted @ 2012-02-26 21:06 learner

python 学习笔记 3
摘要:ch3 使用字符串* format string ==> print format % values* 当format有多个参数时,需要括号 ‘%s + %s = %s' % (1,100,101)* template: s=string.Template('A $v0 must never${v1}') input={'v0':'dog','v1':'bite'} print(s.substitute(input)) or print(s.substitute(v0='dog',v1 阅读全文

posted @ 2012-02-25 13:43 learner

learning notes: how to list all current environment variables in linux
摘要:run ==> envto display one specific var ==> echo $PATHorenv | grep "^PATH=" 阅读全文

posted @ 2012-02-19 14:14 learner

python 学习笔记 2
摘要:第二章 元组和列表 Example 1 x='abc';y=10;z=100.2; arr1=[x,y,30,z] # define an array arr2=[] #define the empty array print(x[0]) # output “a”, string is also an array print(x[-1]) # output “c”, -1 means n-1 (n is the length) print(x[-2]) # ouput 'b', -2, means n-2 print(len(arr1)... 阅读全文

posted @ 2012-02-15 22:04 learner

python 学习笔记 1
摘要:-- 源自Python基础教程-第二版, 人民邮电出版社 Ubuntu 11.10 自带了 python 2.7.2 and python3.2,若要IDLE或其他版本,则可以从Ubuntu Software Center download. Under ubuntu, I can run python(link to python2.7) or python2.7 or python3.2 calculate 1 / 2 in 2.7 , it's 0, in 3.2, it's 0.5. So, remember to use 1.0 / 2.0 o... 阅读全文

posted @ 2012-02-12 21:35 learner

导航