Monday, May 23, 2011

Math that talks about love and sin

This graph, which is a periodic of sine, came across my mind this morning during the reading bible time (or TWA). At first, I doubted if it is related; But after looking at it for a while, it makes some sense actually. 

Well, look at the graph below and tell me what you see/think, or do you have any verse(s) in your mind when seeing this graph. Welcome to leave any comments and I will share mine later :)

Monday, May 16, 2011

jQuery Plugin ( Recently Published )

I've published several jQuery plugin lately and let's share the links here :)

Simple Auto Complete
This  jQuery plug-in can auto-complete input text from data in the page. It can auto-complete the text entered in text input with text entries by searching in another given elements of the page. The search results can be cached to accelerate future searches.

Basic Slideshow
This object is a jQuery plugin for presenting a slide show of images. It can present a slide show made of images already present in the current Web page within given elements. The slide show image caption text is retrieved from a data attribute of each image. The page element where the slide show images will appear is also configurable. 

Flash Messages
This object is a jQuery plug-in that can be used to Flash page elements a number of times. It can make a given page elements appear and disappear a given number of times. The period of time during which the elements show up if configurable.

Install Compass and Sass in Ubuntu 11.04

Here is a tutorial on setting up your environment to use compass and sass in Ubuntu 11.04 ( should be the same as previous version )

1) Install Ruby
sudo apt-get install ruby-full

2) Install Gem
sudo apt-get install rubygems1.8

3) Install Rails, sqlite3 ( optional, but usually I install that as well )
sudo gem install rails
sudo gem install sqlite3

Try to run this to make your system up-to-date
sudo gem update --system  

4) Install Compass
sudo gem install compass

5) Install Sass
sudo gem install sass

6) Create your first project
(If you want to use normal css syntax, scss)
compass create <myproject>

(If you want to use sass syntax)
compass create <myproject> --syntax sass

How to create your first project
  1. cd /path/to/projects_folder
  2. compass create my_test_project
  3. compass watch my_test_project
Now you can open your favorite IDE, and look into the just created "my_test_project".  You will see a bunch of files are created.  By default, the "sass" folder is the place for holding the sass files, while the "stylesheets" folder is the place for the generated css files.  And you can configure those by changing the  "config.rb" if you will.

Some "extensions" that you may want to install after you setup your project
  • (CSS3 PIE)  compass install  compass/pie

Some "gems" you may be interested 

For more information on Compass and Sass, please visit the official documentation - and

Tuesday, May 10, 2011

IE9 Compatibility Feature

This post partially is coming from an email I've received earlier, but since it is useful, so I post it here.
  • IE9 = Browser Mode IE9 + Document mode IE9 Standards
    • Default for the browser
  • IE8 ~= Browser Mode IE8 + Document mode IE8 Standards
    • Approximates IE8
  • IE7 ~= Browser Mode IE7 + Document mode IE7 Standards
    • Approximates IE7
  • Any other combination is unsupported because it doesn’t approximate a supported browser.
  • We’re specifically setting the X-UA-Compatible Meta tag to force the browser to render in IE9 unless someone has used the developer tools override. There’s nothing we can do if someone has chosen to override with the developer tools.

If you are interested in knowing more about how IE9 is determining its Document Mode (underly engine), here is the graph for it.

If you want to run multiple different version of IE from different platform ( like IE in Window Vista and XP ) all in your local machine. You can try the Windows Virtual PC VHDs.