Guiqiang's profileTry out the worldPhotosBlogListsMore Tools Help

Guiqiang Zhang

Occupation
Location
Interests
暂时不知日月
>>谁说的
Photo 1 of 12

Try out the world

I am a possible man
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), 开始学着做得、学得、玩得都很累:)