Archive for November, 2008

YouTube: HD Video play back

Sunday, November 30th, 2008

You can change the video playback mode by adding &fmt=XX to the youtube URL (in the embed code or in the browser URL)

HD (720p):


Apparently, the fmt params are:

  • fmt=6 is flv format and 480×360 at a low bitrate.
  • fmt=18 is MP4 and is a higher bitrate, but same resolution.
  • fmt=22 is 720p
<object width=”480” height=”397“>

<param name=”movie” value=”(VIDEO EMBED URL)&ap=%2526fmt%3D22“></param>

<param name=”wmode” value=”window“></param>

<embed src=”(VIDEO EMBED URL)&ap=%2526fmt%3D22” type=”application/x-shockwave-flash” wmode=”window” width=”480” height=”397“></embed>

The (Video Embed URL) =[videoID] (e.g.,

From CNET: YouTube videos go HD with a simple hack
See also:
How To: Watch YouTube Movies in Full 720p HD Glory

Pics: 300 free icons

Saturday, November 29th, 2008

Crystal Clear

jQuery: is hidden (toggle, show, hide)

Friday, November 28th, 2008

To know if a element is hidden or visible, you can use “$.is()” methods and the “:hidden” or the “:visible” filter selector.

alert(“Is myDiv hidden? ” + $(‘#myDivId’).is(‘:hidden’));

More on jQuery selectors

RegEx: Best RegEx Eclipse Plugin QuickRex

Wednesday, November 12th, 2008

Sql: Select rows with duplicate values (select, count, group by, having)

Saturday, November 8th, 2008
select count(lastName), lastName from employee group by lastName having count(lastName) > 1;

Mysql: Java Web App and MySql 5.x UTF-8

Saturday, November 8th, 2008

To fully support UTF-8 with mysql, make sure of the followings:

  1. Set HttpServletRequest UTF-8 character encoding.
  2. Set HttpServletResponse UTF-8 character encoding
    response.setContentType(“text/html; charset=UTF-8″);
  3. Create the Column, Table, or DB need to have the UTF8 charset and collation
    CHARACTER SET utf8 COLLATE utf8_general_ci
  4. THE TRICK: Add the character encoding instruction in your JDBC URL

Related links:

Tomcat: Virtual Hosting and Web App

Sunday, November 2nd, 2008

To map a domain name to a “war” web application.

File: [tomcat-path]/conf/server.xml


<Host name="" appBase="webapps/webappname" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="."/>


Note: This obviously assumes that this domain name is mapped to the specific tomcat instance.

Pics: 1001 Free Icons from FamFamFam

Saturday, November 1st, 2008

One of the best set of free icons on the market! Thank you

Companion Silk I

Companion Silk II

Windows: Changing the LMHOSTS on Vista

Saturday, November 1st, 2008
  • Start Notepad or your text editor as Adminstrator
  • Open and edit the following file