Guiqiang's profileTry out the worldPhotosBlogListsMore Tools Help

Blog


    January 22

    Oracle XE: Configures more sessions and processes

     

    1. Log on to the database as system administrator (In SQL Plus "connect / as sysdba" will do the job)
    2. Set the number of processes to be 150 (In SQL Plus "alter system set processes=150 scope=spfile")
    3. Unset the number of sessions to remove the 20 session limit (In SQL Plus "alter system reset sessions scope=spfile sid='*'")
    4. Shutdown the database (In SQL Plus "shutdown immediate")
    5. Startup the database (In SQL Plus "startup")
    6. Check the changes have taken effect (in SQL Plus "show parameter sessions" and "show parameter processes") sessions has now been reset to a calculated value.

    Oracle XE:万恶的8080, 我终于可以干掉你了

    Oracle XE (Express Edition)是Oracle给我们程序员的一个好玩具,以前就听说Oracle是数据库老大,但是无缘得见,一窥其貌。

    现在好Oracle XE给我把玩把玩的冲动:)

    既然免单,当然有限制啦

    • Supports up to 4GB of user data

    • May be installed on a server with any amount of memory, but will only use up to 1GB RAM of available memory

    • May be installed on a multiple CPU server, but only executes on one processor in any server

     

    不过 够了。但是有个严重令我不爽的地方,XE包含了一个内部HTTP服务器,尽然用8080端口,那岂不是要我给可爱的Tomcat,JBoss们改端口。

    不爽,及其不爽

    今天我发现,原来可以干掉你,哈哈。

    View The Configuration

    All of the following command should be executed from the SQL command shell (SQLPlus).

    SQL> SELECT dbms_xdb.cfg_get FROM dual;
    

    The command above will fetch the configuration (as an XML document), you can spool it to an XML file and view it in any XML editor (when working with SQLPlus don't forget to set the LONG, LINESIZE and PAGESIZE options before executing the command above).

    Change The Configuration

    To change the HTTP port

    SQL>  call dbms_xdb.cfg_update(
    2      updateXML(dbms_xdb.cfg_get(), 
    3      '/xdbconfig/sysconfig/protocolconfig/httpconfig/http-port/text()', 
    4      3273))
    5      
    

    The command above changes the HTTP port to 3273. What happened here is that we call the cfg_update procedure, which gets a configuration. The configuration is loaded using the cfg_get, but the output of the cfg_get is passed through updateXML before it is handled to the cfg_update procedure.

    October 18

    50+ CSS Best Practices and Coding Guidelines

    What to avoid

    • In-line CSS
    • Absolute font sizes
    • Single quotation marks around paths for images
    • CSS hacks
    • Redeclaring inherited values
    • Applying padding/borders and a fixed width to an element.
    • !important and position: absolute
    • Name classes/IDs based on appearance

    Good style

    • CSS declarations on one line
    • Comment your code
    • Organize your CSS file
    • Indent as necessary
    • Make your code easy to read
    • Use a common naming system
    • Sort declarations alphabetically
    • A ";" is not necessary for the last declaration
    • If declaring a unit of 0 px/em/%/... you can omit the unit
    • Keep containers, properties, selectors and CSS hacks to a minimum
    • Group selectors allow you to select multiple elements at once
    • There often is a handy shorthand notation
    • Shorten hexadecimal colour notation
    • Define pseudo classes for links in the LoVe/HAte-order
    • Define element’s margin, padding or border in TRouBLed-order
    • You can use child selectors
    • Make use of different media types
    • Name classes/IDs based on function, not appearance
    • Learn to exploit the cascading nature of CSS. CSS has sophisticated rules for inheritance of rules
    • You can use attribute selectors. Attribute selectors match elements based on the presence or value of attributes
    • Change capitalization using CSS
    • Order all the elements belonging to the header, main container, footer ... together for better overview
    • Take a look at coding guidelines of big companies
    • Seek inspiration from the gurus of design
    • Take a look at Blueprint, a CSS framework, a lot of great ideas are integrated and commented

    Ease your life

    • Use a CSS cheat sheet
    • Build and test your CSS in the most advanced browser available before testing in others, not after.
    • When in doubt, validate
    • Test embedded, launch imported
    • Keep a library of helpful CSS classes
    • Try out an online CSS compressor, some of the methods that CSS shrinkers employ to squeeze your CSS file size down can be employed in a less extreme way to make your CSS more streamlined
    • Get the web developer toolbar for Firefox
    • Keep a library of helpful CSS classes.
    • Use a CSS framework like 'Blueprint'

    Did you know?

    • You can assign multiple classes to a given element
    • Set constant values throughout a CSS document
      • The simplest option is just to include the color value in every rule you want it in, and use search and replace when you want to change it. This is pretty trivial with a good text editor.
      • Since an element can have more than one class on it, you can make classes for each constant or variable you want to create, then assign these classes to the (X)HTML elements you want to affect. Since an element can have more than one class on it, this shouldn't interfere with any existing uses of the class attribute. Then if you want to change the color, all you need to do is change the class definition.
      • Use a Server-Side Language to Write Out the CSS.
      • There are some examples of CSS server side preprocessor languages now. Switch seems to be the most developed
    • You can add CSS-styling to RSS-feeds
    • You can prevent spam with CSS
    • You can offer customizable design by dynamically creating the css file with php
    • There are ideas for CSS Design Patterns
    October 17

    [ZZ]Things to do when you're a bored developer

    Just a list of things you could do in your spare time that might be fun. This list is just in random order and some of these things might just be fads. A lot of these kind of overlap.

    1. Be productive, grab an idea, develop it, found a startup and sell it to make millionz.
    2. Learn a new Programming Language
    3. Read a book about one.
    4. Write a book about one.
    5. Write a blog/wiki/rss consumer or producer from scratch.
    6. Blog or wiki ideas, tutorials.
    7. Write an irc bot/client.
    8. Read an RFC.
    9. Learn web standards.
    10. Create a website.
    11. Create a cool website.
    12. Create a website that enables people.
    13. Create a website that exploits people.
    14. Create a website that enables you to make millionz^H.
    15. Figure out how to use a new framework (JavaScript, Python, PHP, etc).
    16. Make a Facebook App
    17. Make something else using an api, like Digg, Google, etc.
    18. Make something for Salesforce.com's developer framework (make millionz?)
    19. Make something using Adobe Air or Flex
    20. Add a feature/do something to your favorite open source project.
    21. Create documentation or tutorials for an open source project.
    22. Patch a bug.
    23. Report a bug.
    24. Contribute some other way to an open source project.
    25. Learn vim or emacs (you know you want to).
    26. Learn a new IDE like Eclipse or Visual Studio Express.
    27. Try out a new windows manager or linux distro.
    28. Learn ncurses.
    29. Read up on computer science class notes on Google, Blogs, etc.
    30. Try out a new http server (lighttpd, for instance).
    31. Make a tool for developers (like a color tool or a better paste bin or something original and clever)
    32. Try out a new source control tool (Like git, or others)
    33. Build your favorite open source app from source.
    34. Make (or just try a new) a Firefox extension
    35. Subscribe to a mailing list or join a Google Group for a language/developer topic that interests you.
    36. Go to a local meeting/conference on a developer oriented topic.
    37. Solve programming puzzles like Project Euler
    38. Solve a difficult programming/engineering problem to become famous.
    39. Solve a difficult programming/engineering problem to make millionz^H
    40. Work one a coder-4-hire site and make $5 per hour
    41. Help newbs on forums and get a badge.
    September 27

    养个一条小鲨鱼:)

     

    www.SharkBreak.com

    July 15

    历练

    2006年7月2日,是具有重大意义的日子:) 我结束了18年的寒窗,离开的可爱的浙大校园,成为了浙大校友,走上了另一个人生舞台,开始新的奋斗。
    经过了两个礼拜的蛰伏,修整,后天,也就是2006年7月17日,我将开始三个月的TU(Trilogy University), 开始学着做得、学得、玩得都很累:)
    May 04

    土了,涂了

    不知道何时开始,偶的QQ昵称开始改成了"借我一生", 现在已经忘了当时为啥会起这么一个昵称, 可能是希望不懈努力, 走自己期望的人生之路.
     
    今天跟同学聊天, 突然问我,
    梦也团圆 21:17:36
    恩,你在看《借我一生》?
    借我一生 21:12:43
    ...?
     
    借我一生 21:13:10
    难道借我一生是本书?
     
    梦也团圆 21:19:17
    是啊,你土了
    借我一生 21:14:08
    我的确土了,sigh
     
    借我一生 21:14:15
    谁写的
     
    借我一生 21:14:22
    那我一定要拜读一下
    网上查了一下, 
    《借我一生》是余秋雨对中国文化界的“告别之作”,涉及他和他的家族诸多不为人知的经历,还描绘了记忆中文革时“大揭发”、“大批判”的整人模式……从前辈到自己,作者以平实、真实的记忆组成一部文学作品。
       “我历来不赞成处于创造过程中的艺术家太激动,但写这本书,常常泪流不止。” ——余秋雨语
    April 30

    夜游西湖

    发现我很少晚上游过西湖,今天兴致,拖着未康复的脚踝,去感受了一把,静谧的西湖,远离了城市的喧嚣,飘香的苏堤,是那么地令人心旷神怡。不过可惜还是感觉上差了一点点,好像缺了点什么似的!
     
    哦,对了! 是微风,如果有徐徐微风相伴就好了~~~

    唉,无聊的五一

    郁闷ing,大好艳阳天,大好出游的时节,因为脚伤只能带病在寝,苦命呐~~
     
     
    唉,算了,算了,正好抽这个时间好好看看书,从同学那边拿了本曼昆的《经济学原理》。
     
     
    翻开第一页...
    April 04

    月下老人灵签

    很灵的哦,不信试试
     
     
    上吉
     
    白云初晴,幽鸟相逐。
    以往君尔之日子是昏暗晦涩者。如今一扫所有之酶气。白云亦初晴。幽鸟相逐於太空中。君尔之缘也。必可成。且是令人羡慕者。放手去做可也。

    March 07

    What will 2006 bring you?

    You scored as Love..... U want some love... AND ULL GED IT IN 2006 but...!!!!!!!!!! Ull have to do something... Dont think that love will find u U HAvE TO FIND LOVE...(If ur emo add me veronica_bab@hotmail.com)

    Love....

    90%

    Friends!!!

    80%

    New fashion style (or atleast something new)

    70%

    What will 2006 bring you?
    created with QuizFarm.com

    What is your perfect major?

    You scored as Mathematics. You should be a Math major! Like Pythagoras, you are analytical, rational, and when are always ready to tackle the problem head-on!

    Mathematics

    83%

    Chemistry

    75%

    Philosophy

    75%

    Psychology

    67%

    Engineering

    67%

    Journalism

    50%

    Sociology

    50%

    Biology

    42%

    English

    33%

    Theater

    33%

    Anthropology

    33%

    Linguistics

    25%

    Art

    17%

    Dance

    17%

    What is your Perfect Major? (PLEASE RATE ME!!<3)
    created with QuizFarm.com
    March 06

    Enya

    前几天,从BT上下了16首音乐大师撼动人心的经典极品,其中有一首就是enya水印专辑中的《Orinoco Flow》,真的很好听。她的声音空灵而有层次感,缥缈而有内力,音乐中多是清脆的钢琴和轻声哼唱。听着她的音乐,让我联想到修女,联想到唱诗班,联想到圣洁的教堂,联想到可爱的天使。
    听了orinoco flow, 很不过瘾,又在Kugoo上载了《watermark》,《never》, 《it's in the rain》,《long long journey》。。。
     
    真的很不错,有机会的话,大家可以听听。
     
    附上enya的简介:
    专辑:Enya-《Amarantine》
    1961年5月17日,原名为Eithne Ni Bhraonain的Enya生于爱尔兰,童年在爱尔兰西北部的Donegal县的Gweedore度过。长在音乐世家的Enya家中共有9个兄弟姐妹。除了排行中间的Enya外,家中还有4个女孩和4个男孩。一家人在音乐方面获奖甚多,并闻名于爱尔兰传统音乐圈。

        从小便接受了良好的音乐教育的Enya在1979年离开家乡加入到了乐队Clannad(来自Gweedore的家庭“the family from Gweedore”的缩写)当中担任键盘手。在Clannad期间,Enya共参与了乐队两张专辑的录制。1982年,由于“自己不想再跟着乐队一直往流行方向发展”,Enya离开了Clannad乐队,开始个人发展。

        在接下来的几年中,Enya的主要成绩就是和制作人Nicky Ryan及其妻子Roma Ryan合作制作了BBC电视系列剧《The Celts》的原声大碟。这张动听的原声大碟使个人发展的Enya开始得到了各界的关注。在接下来的1988年,Enya和Ryan夫妇合作的第二张专辑《Watermark》一发行便在排行榜上势如破竹。专辑中的首支单曲《Orinoco Flow》很快就成为英国榜冠军单曲。《Watermark》也排在New Age专辑榜的第二位。本张专辑此后在全球共销售800多万张,至今的销量已达上千万张,一下打响了Enya的国际知名度。专辑此后并在14个国家都取得了白金销量。

        1991年,Enya发行了在《Watermark》之后的另一张成功的专辑《Shepherd Moons》。这张专辑被誉为最好的NEW AGE大碟,也正是凭着这张大碟,恩雅在1992年第一次获得了格莱美最佳New Age专辑奖。1995年12月,Enya第四张专辑《Memory of Trees》出版。《Memory of Trees》成功打入美国榜前十,在发行后的第一年中狂卖了200万张并成为Enya第二张获得格莱美最佳New Age专辑的唱片。1997年,Enya发行首张个人精选集《Paint the Sky with Stars: The Best of Enya》。

        在上张录音室专辑发行五年之后,《A Day Without Rain》于2000年面市。《A Day Without Rain》延续了上张录音室专辑《Memory of Trees》在美国的成功,勇夺Billboard 200专辑榜亚军,成为迄今为止Enya在美国打榜成绩最好的专辑。同时,《A Day Without Rain》也使Enya完成了个人的格莱美“帽子戏法”,再次获得2001年格莱美最佳New Age专辑。2002年,Enya为《Lord of the Rings》电影原声大碟创作了单曲《May It Be》并获得奥斯卡奖提名。2005年,44岁的Enya发行最新录音室专辑《Amarantine》。
    February 22

    可爱的菊花狗狗

    可爱不?
    February 21

    情书

    情书是韩国的金牌综艺节目真的办的不错.和港台的综艺节目不同,韩国综艺节目主要是节目形式和动作的搞笑,而且信息量很大很充实。每次活动请来的差不多都是韩国一线的演员,歌星.
    整个节目分很多环节,其中,有一个环节叫dance battle, 每次都可以看到或绚丽,或优雅,或搞怪的舞蹈,什么复古舞,什么斗鸡舞,真是千奇百怪,逗人发笑.当然,既然叫情人,主要还是以男追女,女争男之类的游戏为主,说不定可以从中学到一些实用的哦.
     
    这个节目真的不错,有机会要看看哦!

    今年有四个情人节

    今年“狗头”、“狗尾巴”横跨两个2月14日西方情人节,再加上今年闰七月的两个七夕中国情人节,狗年的情人节数量果然翻倍.
    这个狗年真是旺旺!
    February 16

    再别康桥

    徐志摩的<<再别康桥>>高中时就知道了, 不过俺没啥文学细胞, 听了,读了,也就罢了. 不过,昨天在电视里听了几位艺术家的朗诵, 诶, 真的不错诶.
     
    而且, 徐志摩和我也算是老乡, 虽然身在不同的时代. 再此希望与朋友共享此文:
     
    轻轻的我走了,  
    正如我轻轻的来;  
    我轻轻的招手,  
    作别西天的云彩。  

    那河畔的金柳  
    是夕阳中的新娘  
    波光里的艳影,  
    在我的心头荡漾。  

    软泥上的青荇,  
    油油的在水底招摇;  
    在康河的柔波里,  
    我甘心做一条水草  

    那树荫下的一潭,  
    不是清泉,是天上虹  
    揉碎在浮藻间,  
    沉淀着彩虹似的梦。  
    寻梦?撑一支长篙,  
    向青草更青处漫溯,  
    满载一船星辉,  
    在星辉斑斓里放歌  
    但我不能放歌,  
    悄悄是别离的笙箫;  
    夏虫也为我沉默,  
    沉默是今晚的康桥!  
    悄悄的我走了,  
    正如我悄悄的来;  
    我挥一挥衣袖,  
    不带走一片云彩。 
     
     
    PS:徐志摩(1896-1931),浙江海宁人。1920年曾留学英国。1923年加入新月社,成为新月社诗派的代表诗人。
        “志摩是蝴蝶,而不是蜜蜂,女人好处就得不着,女人的坏处就使他牺牲了。”   --- 冰心