December 4th, 2008 by jeremychone | No Comments »
Redirecting from the http.conf
<VirtualHost *:80>
ServerName mydomainname.com
Redirect permanent / http://www.otherdomainname.com/
</VirtualHost>
Posted in Apache | No Comments »
December 3rd, 2008 by jeremychone | No Comments »
- Close Outlook
- Open your c drive. Start > run and type c: and click okay
- Click Tools > Folder Options and click on the View tab.
- Make sure Show Hidden files and Folders is selected, and Hide Operating System files is unchecked.
- Also make sure that hide extensions for known file types is unchecked and click Apply and Okay.
- Click the Search Icon
- Select All Files and Folders.
- In the “All or Part of a file name” box, type *.nk2 and click search.
- Delete any files you find.
- Do another search, this time for *.oab, delete the files you find.
- Click Start > Run, type outlook.exe /cleanprofile and click okay
Posted in Windows | No Comments »
December 2nd, 2008 by jeremychone | No Comments »
You need to encode the video for HDTV 720p, and then upload it.
See also:
Note for Adobe CS4 Premiere:
Choosing the h.264, YouTube preset, and then increase the definition to 720p (by increasing the level) does NOT work (you can upload the video, but you will not get the full HD -fmt=22-). You need to select the following:
- Format: H.264
- Preset: HDTV 720p 23.976
- Change the Frame Rate from 23.976 to 30 (Not sure if this is a must, but read somewhere that YouTube perfers 30fps)
Posted in YouTube | No Comments »
November 30th, 2008 by jeremychone | No Comments »
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): http://www.youtube.com/watch?v=Mgan4rt7ZHw&fmt=22
Regular: http://www.youtube.com/watch?v=Mgan4rt7ZHw
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>
</object>
The (Video Embed URL) = http://www.youtube.com/v/[videoID] (e.g., http://www.youtube.com/v/Mgan4rt7ZHw)
From CNET: YouTube videos go HD with a simple hack
See also:
How To: Watch YouTube Movies in Full 720p HD Glory
Posted in YouTube | No Comments »
November 29th, 2008 by jeremychone | No Comments »
Posted in Pics | No Comments »
November 28th, 2008 by jeremychone | No Comments »
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
Posted in jQuery | No Comments »
November 12th, 2008 by jeremychone | No Comments »
Posted in Eclipse, RegEx | No Comments »
November 8th, 2008 by jeremychone | No Comments »
select count(lastName), lastName from employee group by lastName having count(lastName) > 1;
Posted in Sql | No Comments »
November 8th, 2008 by jeremychone | No Comments »
To fully support UTF-8 with mysql, make sure of the followings:
- Set HttpServletRequest UTF-8 character encoding.
request.setCharacterEncoding(”UTF-8″);
- Set HttpServletResponse UTF-8 character encoding
response.setContentType(”text/html; charset=UTF-8″);
- Create the Column, Table, or DB need to have the UTF8 charset and collation
CHARACTER SET utf8 COLLATE utf8_general_ci
- THE TRICK: Add the character encoding instruction in your JDBC URL
jdbc:mysql://localhost:3306/DATABASENAME?useUnicode=true&characterEncoding=UTF8
Related links:
Posted in Mysql | No Comments »
November 2nd, 2008 by jeremychone | No Comments »
To map a domain name to a “war” web application.
File: [tomcat-path]/conf/server.xml
<Service>….
<Service>….
<Engine>…
<Host name=”www.yourdomain.com” appBase=”webapps/webappname”
unpackWARs=”true” autoDeploy=”true”
xmlValidation=”false” xmlNamespaceAware=”false”>
<Context path=”" docBase=”.”/>
<Alias>yourdomain.com</Alias>
</Host>
</Engine>
</Service>
</Server>
Note: This obviously assumes that this domain name is mapped to the specific tomcat instance.
Posted in Tomcat | No Comments »