<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-11973746</id><updated>2011-08-26T02:27:49.011-07:00</updated><title type='text'>Wei's tips</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>53</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-11973746.post-1599501854776351059</id><published>2011-07-06T02:44:00.000-07:00</published><updated>2011-07-06T02:55:09.382-07:00</updated><title type='text'>compile mpich2</title><content type='html'>If you are using gcc version &gt;= 4.3 to compile mpich2-1.3, which can be downloaded from http://www.mcs.anl.gov/research/projects/mpich2, you are likely to get tons of multiple definition errors. It took me quite a while to figure out the reason and the solution. This is caused by the --std=gnu99 used in hwloc. But using gnu99 will change the meaning of "extern inline" used in many c header files as explained in http://gcc.gnu.org/gcc-4.3/porting_to.html. Knowing this, the solution is quite simple: using the following command to configure:&lt;br /&gt;&lt;br /&gt;CFLAGS=-fgnu89-inline ./configure&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-1599501854776351059?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/1599501854776351059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=1599501854776351059' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/1599501854776351059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/1599501854776351059'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2011/07/compile-mpich2.html' title='compile mpich2'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-2547972480549740233</id><published>2011-04-13T01:15:00.000-07:00</published><updated>2011-04-13T01:40:15.138-07:00</updated><title type='text'>Effective alternative minimum tax bracket</title><content type='html'>2010 AMT bracket for the alternative minimum taxable income (AMT income)&lt;br /&gt;assumming no qualified dividend or long term capital gain.&lt;br /&gt;&lt;table border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;from&lt;/td&gt;&lt;td&gt;to&lt;/td&gt;&lt;td&gt;bracket&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;72,450&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;72,450&lt;/td&gt;&lt;td&gt;150,000&lt;/td&gt;&lt;td&gt;0.26&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;150,000&lt;/td&gt;&lt;td&gt;227,960&lt;/td&gt;&lt;td&gt;0.325&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;227,960&lt;/td&gt;&lt;td&gt;439,800&lt;/td&gt;&lt;td&gt;0.35&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;439,800&lt;/td&gt;&lt;td&gt;above&lt;/td&gt;&lt;td&gt;0.28&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;The strange thing is that the tax rate decreases for high AMT income. This is due to the fact that the "Exemption Amount" (Form 6251 line 29) is reduced when the AMT income is between 150,000 and 439,800.&lt;br /&gt;&lt;br /&gt;References:&lt;br/&gt;&lt;br /&gt;&lt;a href="http://www.irs.gov/pub/irs-pdf/f6251.pdf"&gt;Form 6251&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://www.irs.gov/pub/irs-pdf/i6251.pdf"&gt;Form 6251 Instruction&lt;/a&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-2547972480549740233?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/2547972480549740233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=2547972480549740233' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/2547972480549740233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/2547972480549740233'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2011/04/effective-alternative-minimum-tax.html' title='Effective alternative minimum tax bracket'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-5331018090740790788</id><published>2010-05-28T00:29:00.000-07:00</published><updated>2010-05-28T00:45:17.708-07:00</updated><title type='text'>rogue virus leading to antispy-guide.net</title><content type='html'>My wife's computer was infected by a rogue virus. It's constantly asking to buy anti-virus software from antispy-guide.net. And it blocked the execution of other program by saying they are infected.&lt;div&gt;The only exception is browser. You can still open a browser. Apparently, they don't want to block the way so that the infected user can purchase their software.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is how I dealt with it:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In explorer, copy \windows\system32\taskmgr.exe to some other place. Then rename it as firefox.exe and run it. Now the task manager appears. In the task manager find and kill a process with a very strange name which unfortunately I forgot what exactly it is. And I also deleted the corresponding .exe file from the file system. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now everything is back to normal. I am not sure this is a permanent fix. But so far so good.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-5331018090740790788?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/5331018090740790788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=5331018090740790788' title='34 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/5331018090740790788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/5331018090740790788'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2010/05/rogue-virus-leading-to-antispy-guidenet.html' title='rogue virus leading to antispy-guide.net'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>34</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-1624759258025904251</id><published>2010-04-22T18:37:00.000-07:00</published><updated>2010-09-15T11:27:59.666-07:00</updated><title type='text'>Increase limit on RLIMIT_NOFILE or other resources</title><content type='html'>Use setrlimit() to change the soft limit. But there is a hard limit which the setrlimit can not increase beyond.&lt;br /&gt;&lt;br /&gt;In order to change the hard limit, you need to change the setting in following file&lt;br /&gt;/etc/security/limits.conf&lt;br /&gt;&lt;br /&gt;The syntax of the lines is as follows:&lt;br /&gt;&lt;br /&gt;[domain] [type] [item] [value]&lt;br /&gt;&lt;br /&gt;Use man limits.conf to see detailed explanation.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can use command 'lsof -p [pid]' to see files opened by process pid.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-1624759258025904251?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/1624759258025904251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=1624759258025904251' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/1624759258025904251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/1624759258025904251'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2010/04/increase-limit-on-rlmitnofile-or-other.html' title='Increase limit on RLIMIT_NOFILE or other resources'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-8129990137452353028</id><published>2010-04-22T18:36:00.000-07:00</published><updated>2010-04-22T18:37:43.754-07:00</updated><title type='text'>Install Gnome On centos machine</title><content type='html'>Citing from&lt;br /&gt;&lt;a href="http://wiki.centos.org/FAQ/CentOS5#head-e99a7921ab6ce47e1cbf7d8cc8cadecf92b7ce94"&gt;&lt;br /&gt; http://wiki.centos.org/FAQ/CentOS5#head-e99a7921ab6ce47e1cbf7d8cc8cadecf92b7ce94&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;yum --exclude=nautilus-sendto groupinstall "GNOME Desktop Environment"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-8129990137452353028?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/8129990137452353028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=8129990137452353028' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/8129990137452353028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/8129990137452353028'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2010/04/install-gnome-on-centos-machine.html' title='Install Gnome On centos machine'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-3123625312540549783</id><published>2010-02-12T11:43:00.000-08:00</published><updated>2010-02-12T11:45:50.632-08:00</updated><title type='text'>NX broken session</title><content type='html'>If the remote server is restarted during an NX session, then you will encounter error when establishing a new session. You need to go to /usr/NX/var/db/running and delete files in the directory.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-3123625312540549783?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/3123625312540549783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=3123625312540549783' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/3123625312540549783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/3123625312540549783'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2010/02/nx-broken-session.html' title='NX broken session'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-3123383935952063747</id><published>2010-01-29T15:43:00.000-08:00</published><updated>2010-01-29T15:45:50.459-08:00</updated><title type='text'>Passing Special Characters to Commands</title><content type='html'>Citing from &lt;a href="http://dsl.org/cookbook/cookbook_5.html#SEC50"&gt;The Linux Cookbook: Tips and Techniques for Everyday Use&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Some characters are reserved and have special meaning to the shell on their own. Before you can pass one of these characters to a command, you must quote it by enclosing the entire argument in single quotes (`'').&lt;br /&gt;&lt;br /&gt;For example, here's how to pass `Please Stop!' to a command:&lt;br /&gt;&lt;br /&gt;'Please Stop!'&lt;br /&gt;When the argument you want to pass has one or more single quote characters in it, enclose it in double quotes, like so:&lt;br /&gt;&lt;br /&gt;"Please Don't Stop!"&lt;br /&gt;To pass special characters as a string, give them as:&lt;br /&gt;&lt;br /&gt;$'string'&lt;br /&gt;where string is the string of characters to be passed. Special backslash escape sequences for certain characters are commonly included in a string, as listed in the following table.&lt;br /&gt;ESCAPE SEQUENCE  DESCRIPTION&lt;br /&gt;\a  Alert (rings the system bell).&lt;br /&gt;\b  Backspace.&lt;br /&gt;\e  Escape.&lt;br /&gt;\f  Form feed.&lt;br /&gt;\n  Newline.&lt;br /&gt;\r  Carriage return.&lt;br /&gt;\t  Horizontal tab.&lt;br /&gt;\v  Vertical tab.&lt;br /&gt;\\  Backslash.&lt;br /&gt;\NNN  Character whose ASCII code is NNN in octal (base 8).&lt;br /&gt;To demonstrate the passing of special character sequences to tool, the following examples will use the figlet tool, which displays the text you give as an argument in a "font" made up of text characters (see Horizontal Text Fonts).&lt;br /&gt;&lt;br /&gt;To pass a backslash character as an argument to figlet, type:&lt;br /&gt;$ figlet $'\\' [RET]&lt;br /&gt;To pass a form feed character followed by a pilcrow sign character (octal character code 266) to figlet, type:&lt;br /&gt;$ echo $'\f\266' [RET]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-3123383935952063747?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/3123383935952063747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=3123383935952063747' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/3123383935952063747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/3123383935952063747'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2010/01/passing-special-characters-to-commands.html' title='Passing Special Characters to Commands'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-8883146247378827875</id><published>2009-04-08T16:54:00.000-07:00</published><updated>2009-04-08T17:02:53.998-07:00</updated><title type='text'>Binary numerical file IO in PERL</title><content type='html'>#following is a simple example&lt;br /&gt;open FP, '&gt;a.bin';&lt;br /&gt;binmode FP; #make it binary file&lt;br /&gt;@values=(3.2,3.3,3.4);  #list of floating values&lt;br /&gt;$a=pack 'f3' , @values;   #pack as 32bit floating point value&lt;br /&gt;                                         #use 'd' for 64bit floating point&lt;br /&gt;syswrite(FP,$a,12);  #save to file&lt;br /&gt;close FP;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-8883146247378827875?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/8883146247378827875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=8883146247378827875' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/8883146247378827875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/8883146247378827875'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2009/04/binary-numerical-file-io-in-perl.html' title='Binary numerical file IO in PERL'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-7769143081567190048</id><published>2009-02-17T13:04:00.000-08:00</published><updated>2009-02-17T14:36:21.435-08:00</updated><title type='text'>US Government Balance</title><content type='html'>Federal Reserve balance sheet: &lt;a href="http://www.federalreserve.gov/releases/h41/current/h41.htm"&gt;http://www.federalreserve.gov/releases/h41/current/h41.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;US Treasury Monthly Statement: &lt;a href="http://www.fms.treas.gov/mts/"&gt;http://www.fms.treas.gov/mts/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-7769143081567190048?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/7769143081567190048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=7769143081567190048' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/7769143081567190048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/7769143081567190048'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2009/02/us-government-balance.html' title='US Government Balance'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-5503251011441789261</id><published>2008-08-05T23:11:00.000-07:00</published><updated>2008-08-05T23:26:59.116-07:00</updated><title type='text'>Styling form file input</title><content type='html'>Due to certain security considerations, it is very difficult to change the style of file input.&lt;br /&gt;Here is a good post on how to do it.&lt;br /&gt;&lt;a href="http://www.quirksmode.org/dom/inputfile.html"&gt;http://www.quirksmode.org/dom/inputfile.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Following is quoted from above article:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Take a normal &lt; type="file"&gt; &lt;li&gt;To this same parent element, add a normal &lt;&gt; and an image, which have the correct styles. Position these elements absolutely, so that they occupy the same place as the &lt; type="file"&gt;.&lt;/li&gt;&lt;li&gt;Set the z-index of the &lt; type="file"&gt; to 2 so that it lies on top of the styled input/image. &lt;/li&gt;&lt;li&gt;Finally, set the opacity of the &lt; type="file"&gt; to 0. The &lt; type="file"&gt; now becomes effectively invisible, and the styles input/image shines through, but you can still click on the "Browse" button. If the button is positioned on top of the image, the user appears to click on the image and gets the normal file selection window.&lt;br /&gt;(Note that you can't use visibility: hidden, because a truly invisible element is unclickable, too, and we need the &lt; type="file"&gt; to remain clickable) &lt;/li&gt;&lt;li&gt;When the user has selected a file, the visible, fake input field should show the correct path to this file, as a normal &lt; type="file"&gt; would. It's simply a matter of copying the new value of the &lt; type="file"&gt; to the fake input field, but we need JavaScript to do this. &lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-5503251011441789261?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/5503251011441789261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=5503251011441789261' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/5503251011441789261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/5503251011441789261'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2008/08/styling-form-file-input.html' title='Styling form file input'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-5418115334734625642</id><published>2008-08-05T15:49:00.000-07:00</published><updated>2008-08-05T15:52:29.696-07:00</updated><title type='text'>Linking with static runtime libraries with MFC</title><content type='html'>In Visual C++, due to some conflicts between libcmt.lib and nafxcw.lib, you need to&lt;br /&gt;make following changes in Linker-&gt;Input&lt;br /&gt;&lt;br /&gt;Additional Dependencies: nafxcw.lib libcmt.lib&lt;br /&gt;Ignore specific libraries: libcmt.lib nafxcw.lib&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-5418115334734625642?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/5418115334734625642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=5418115334734625642' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/5418115334734625642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/5418115334734625642'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2008/08/linking-with-static-runtime-libraries.html' title='Linking with static runtime libraries with MFC'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-8947883460731078476</id><published>2008-05-28T19:38:00.000-07:00</published><updated>2008-05-28T19:40:13.752-07:00</updated><title type='text'>Using C99 support in Intel Compiler</title><content type='html'>C99 only works for C. Not C++. So the code must be compiled as C code not C++ code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-8947883460731078476?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/8947883460731078476/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=8947883460731078476' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/8947883460731078476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/8947883460731078476'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2008/05/using-c99-support-in-intel-compiler.html' title='Using C99 support in Intel Compiler'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-599862584848394157</id><published>2008-04-24T21:10:00.000-07:00</published><updated>2008-04-24T21:26:26.302-07:00</updated><title type='text'>javascript variable scope</title><content type='html'>The scope of a variable is the current function or, for variables declared outside a function, the current application.&lt;br /&gt;Aassigning a value to an undeclared variable implicitly declares it as a global variable.&lt;br /&gt;&lt;br /&gt;Each function is associated with its closure chain&lt;br /&gt;A variable is undefined if cannot be found in the current closure chain,&lt;br /&gt;and the access attemp will generate error.&lt;br /&gt;&lt;br /&gt;The global function 'eval' uses current closure chain to evaluate the string.&lt;br /&gt;If a function is still accessible, its function closure chain is still in memory.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-599862584848394157?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/599862584848394157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=599862584848394157' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/599862584848394157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/599862584848394157'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2008/04/javascript-variable-scope.html' title='javascript variable scope'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-7424549899414613107</id><published>2008-04-22T16:58:00.000-07:00</published><updated>2008-04-22T17:05:28.377-07:00</updated><title type='text'>Image flicker in IE6</title><content type='html'>This is due to IE 6 keeps check for the background image specified in css property everty time the element is moved over. Note that IE 5 or IE 7 do not have this problem.&lt;br /&gt;&lt;br /&gt;A good post about this problem is at &lt;a href="http://www.mister-pixel.com/"&gt;http://www.mister-pixel.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The solution is to add following javascript code inside the HEAD of the page:&lt;br /&gt;try {&lt;br /&gt;document.execCommand("BackgroundImageCache", false, true);&lt;br /&gt;} catch(err) {}&lt;br /&gt;&lt;br /&gt;This fix works only with Internet Explorer 6, Service Pack 1 or newer.&lt;br /&gt;Also, the fix does not apply if you change the background image on :hover. It only prevents the flicker of the same background image, when changing other rules inside the :hover state. But you can still change the background position.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-7424549899414613107?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/7424549899414613107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=7424549899414613107' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/7424549899414613107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/7424549899414613107'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2008/04/image-flicker-in-ie6.html' title='Image flicker in IE6'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-8157219226015749002</id><published>2007-09-13T19:21:00.000-07:00</published><updated>2007-09-13T19:24:33.851-07:00</updated><title type='text'>Save file using different extensions in MS Word</title><content type='html'>Usually, MS Word will append a fixed extension for a given file type. If you want to use a different extension, you need to enclose the file name in quotes. For example, "textfile.dat" will force MS Word to use dat as extension.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-8157219226015749002?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/8157219226015749002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=8157219226015749002' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/8157219226015749002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/8157219226015749002'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2007/09/save-file-using-different-extensions-in.html' title='Save file using different extensions in MS Word'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-6248840445184184921</id><published>2007-09-13T18:54:00.000-07:00</published><updated>2007-09-13T18:57:28.545-07:00</updated><title type='text'>Open a file by drag-and-drop in MS Word</title><content type='html'>Unlike many other editors, for MSWord, the file should be dropped in the menu area.&lt;br /&gt;It should not be dropped in document area. If it's dropped in document area,&lt;br /&gt;it will become an embedded file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-6248840445184184921?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/6248840445184184921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=6248840445184184921' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/6248840445184184921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/6248840445184184921'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2007/09/open-file-by-drag-and-drop-in-ms-word.html' title='Open a file by drag-and-drop in MS Word'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-2247894558821968269</id><published>2007-08-31T00:22:00.000-07:00</published><updated>2007-08-31T00:51:37.459-07:00</updated><title type='text'>File Security tab in Windows XP</title><content type='html'>The security tab for the file property disappears in certain Windows XP installations. Here is how to display the security tab&lt;br /&gt;Citing from&lt;br /&gt;&lt;a href="http://www.microsoft.com/windowsxp/using/security/learnmore/accesscontrol.mspx"&gt;http://www.microsoft.com/windowsxp/using/security/learnmore/accesscontrol.mspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To display the Security tab&lt;br /&gt;•&lt;br /&gt;Open Folder Options in Control Panel. (Click Start, click Control Panel, click Appearance and Themes, and then click Folder Options.)&lt;br /&gt;•&lt;br /&gt;On the View tab, under Advanced settings, clear the Use simple file sharing [Recommended] check box.&lt;br /&gt;By using the access control feature available in Windows XP Professional, you can help ensure that only the people you want to access the files and folders on your network are able to get to them&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-2247894558821968269?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/2247894558821968269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=2247894558821968269' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/2247894558821968269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/2247894558821968269'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2007/08/file-security-tab-in-windows-xp.html' title='File Security tab in Windows XP'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-116950712618194072</id><published>2007-01-22T14:58:00.000-08:00</published><updated>2007-01-22T15:05:26.486-08:00</updated><title type='text'>Misleading median income</title><content type='html'>Suppose your income is at the top 20% percentile. You think your income are quite good?&lt;br /&gt;Not necessarily.&lt;br /&gt;&lt;br /&gt;Consider following senario:&lt;br /&gt;&lt;br /&gt;You are in a BIG established company, you have a stable income of, let's say, $100k/year.&lt;br /&gt;However, each of your 9 buddies are in a startup company, each only get a $80k/year salary each year.&lt;br /&gt;Suppose each year one of your buddy's company go IPO, then one of them get $1M from stock options.&lt;br /&gt;&lt;br /&gt;Then you are one of the top 20% earners among these 10 persons, because only one get higher income than you because of the stock option.&lt;br /&gt;But wait.&lt;br /&gt;After 9 years, you earned $100k x 9 = $900k&lt;br /&gt;But each of your buddies earned $80k x 9 + $1M = $1720k&lt;br /&gt;Now you are lowest one among these 10 persons.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-116950712618194072?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/116950712618194072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=116950712618194072' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/116950712618194072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/116950712618194072'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2007/01/misleading-median-income.html' title='Misleading median income'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-116531226089009825</id><published>2006-12-05T01:37:00.000-08:00</published><updated>2006-12-05T01:51:01.316-08:00</updated><title type='text'>use MPICH on linux</title><content type='html'>Setup environment (assuming csh or tcsh)&lt;br /&gt;setenv PATH mpi_install_dim/bin:$PATH&lt;br /&gt;&lt;br /&gt;Setup ssh:&lt;br /&gt;1. Setup host authentication (by administrator), following two files are relevant. See ssh manual page for detail.&lt;br /&gt;/etc/ssh/ssh_known_hosts&lt;br /&gt;/etc/ssh/ssh_host_rsa_key&lt;br /&gt;&lt;br /&gt;2. Setup user authentication (by user)&lt;br /&gt;ssh-keygen -b 1024 -t rsa&lt;br /&gt;cp .ssh/is_rsa.pub .ssh/authorized_keys&lt;br /&gt;&lt;br /&gt;If ssh is setup correctly, following command should be able to run without entering password:&lt;br /&gt;ssh remosthostname date&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-116531226089009825?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/116531226089009825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=116531226089009825' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/116531226089009825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/116531226089009825'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2006/12/use-mpich-on-linux.html' title='use MPICH on linux'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-115826340705855605</id><published>2006-09-14T12:49:00.000-07:00</published><updated>2006-09-15T02:49:49.663-07:00</updated><title type='text'>Economic data source</title><content type='html'>Briefing.com Economic Calendar &lt;a href="http://www.briefing.com/Investor/Public/MarketAnalysis/Calendars/EconomicCalendar.htm"&gt;http://www.briefing.com/Investor/Public/MarketAnalysis/Calendars/EconomicCalendar.htm&lt;/a&gt;&lt;br /&gt;Yahoo Economic Calendar &lt;a href="http://biz.yahoo.com/c/e.html"&gt;http://biz.yahoo.com/c/e.html&lt;/a&gt;&lt;br /&gt;Bureau of Labor Statistics &lt;a href="http://www.bls.gov/home.htm"&gt;http://www.bls.gov/home.htm&lt;/a&gt;&lt;br /&gt;Schedule of Releases &lt;a href="http://www.bls.gov/schedule/home.htm"&gt;http://www.bls.gov/schedule/home.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;U.S. Import and Export Price Indexes  &lt;a href="http://www.bls.gov/mxp/"&gt;http://www.bls.gov/mxp/&lt;/a&gt;&lt;br /&gt;Consumer Price Indexes (CPI) &lt;a href="http://www.bls.gov/cpi/"&gt;http://www.bls.gov/cpi/&lt;/a&gt;&lt;br /&gt;Productivity and Costs &lt;a href="http://www.bls.gov/lpc/"&gt;http://www.bls.gov/lpc/&lt;/a&gt;&lt;br /&gt;Producer Price Index &lt;a href="http://www.bls.gov/ppi/"&gt;http://www.bls.gov/ppi/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-115826340705855605?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/115826340705855605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=115826340705855605' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/115826340705855605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/115826340705855605'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2006/09/economic-data-source.html' title='Economic data source'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-115592843860239278</id><published>2006-08-18T12:13:00.000-07:00</published><updated>2006-09-14T16:08:28.890-07:00</updated><title type='text'>conflict of matlab with Intel IPP</title><content type='html'>If you use latest version of IPP with matlab 7.1,&lt;br /&gt;then you need make sure your IPP\bin and IPP\bin\win32 is ahead of MATLAB's directory in the PATH environment variable.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-115592843860239278?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/115592843860239278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=115592843860239278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/115592843860239278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/115592843860239278'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2006/08/conflict-of-matlab-with-intel-ipp.html' title='conflict of matlab with Intel IPP'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-115592820003981151</id><published>2006-08-18T12:06:00.000-07:00</published><updated>2006-08-18T12:10:01.930-07:00</updated><title type='text'>linux email forwarding</title><content type='html'>Create a file named .forward at home directory with the following content:&lt;br /&gt;\username, emailname@abc.com&lt;br /&gt;&lt;br /&gt;Of couse, you need to change username, emailname and abc.com to suitable value&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-115592820003981151?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/115592820003981151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=115592820003981151' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/115592820003981151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/115592820003981151'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2006/08/linux-email-forwarding.html' title='linux email forwarding'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-114878403309869758</id><published>2006-05-27T19:38:00.000-07:00</published><updated>2006-05-27T19:40:33.353-07:00</updated><title type='text'>Defragment windows system files</title><content type='html'>Windows Disk defragmenter does not defragment system files. &lt;br /&gt;A good tool PageDefrag at http://www.sysinternals.com/Utilities/PageDefrag.html can do this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-114878403309869758?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/114878403309869758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=114878403309869758' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/114878403309869758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/114878403309869758'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2006/05/defragment-windows-system-files.html' title='Defragment windows system files'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-114878391745075818</id><published>2006-05-27T19:33:00.000-07:00</published><updated>2006-05-27T19:38:43.686-07:00</updated><title type='text'>Optimize the System Cache Size</title><content type='html'>System Key: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ Session ManagerMemory Management]&lt;br /&gt;Value Name: LargeSystemCache&lt;br /&gt;Data Type: REG_DWORD (DWORD Value)&lt;br /&gt;Value Data: "0" for Desktops; "1" for Servers&lt;br /&gt;&lt;br /&gt;Reference: http://www.winguides.com/registry/display.php/931/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-114878391745075818?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/114878391745075818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=114878391745075818' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/114878391745075818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/114878391745075818'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2006/05/optimize-system-cache-size.html' title='Optimize the System Cache Size'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-114629581696660026</id><published>2006-04-29T00:27:00.000-07:00</published><updated>2006-12-01T22:48:09.873-08:00</updated><title type='text'>Commandline utility for WinZip .zip and WinRAR.rar files</title><content type='html'>For .zip: &lt;a href="http://www.info-zip.org/UnZip.html"&gt;unzip&lt;/a&gt; and &lt;a href="http://www.info-zip.org/Zip.html"&gt;zip&lt;/a&gt; are good commandline substitute for winzip&lt;br /&gt;For .rar &lt;a href="http://www.softpedia.com/get/Compression-tools/PowerArchiver-Command-Line.shtml"&gt;PowerArchiver Command Line 4.01&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-114629581696660026?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/114629581696660026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=114629581696660026' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/114629581696660026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/114629581696660026'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2006/04/commandline-utility-for-winzip-zip-and.html' title='Commandline utility for WinZip .zip and WinRAR.rar files'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-114501042905445062</id><published>2006-04-14T03:05:00.000-07:00</published><updated>2006-09-06T20:03:52.063-07:00</updated><title type='text'>Notes on using GnuPG</title><content type='html'>1. generate key-pair of yourself using&lt;br /&gt;gpg --gen-key&lt;br /&gt;&lt;br /&gt;2. Download desired file and its signature. The signature is supposed from person Joe&lt;br /&gt;The desired file: abc.tar.gz&lt;br /&gt;Its signature: abc.tar.gz.sig&lt;br /&gt;&lt;br /&gt;3. Obtain the public key of Joe using&lt;br /&gt;gpg --import KEY-FILE&lt;br /&gt; or&lt;br /&gt;gpg --keyserver pgpkeys.mit.edu --recv-key KEY-ID&lt;br /&gt;&lt;br /&gt;Here KEY-FILE is the name of the file for the public key of Joe. This file needs to be obtained from Joe or other trusted source.&lt;br /&gt;KEY-ID is the id of the public key of Joe. It should be obtained from Joe or other trusted source.&lt;br /&gt;&lt;br /&gt;4. Verify that the signature using is signed using the public key&lt;br /&gt;gpg --verify abc.tar.gz.sig&lt;br /&gt;&lt;br /&gt;5. Make sure the key actually belongs to Joe by confirming the key fingerprint of the public key. The ultimate confirmation is by face to face communication.&lt;br /&gt;gpg --fingerprint KEY-ID&lt;br /&gt;&lt;br /&gt;6. If you trust Joe and are sure the public key belongs to Joe, you can sign the public key of Joe using&lt;br /&gt;gpg --sign-key KEY-ID&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-114501042905445062?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/114501042905445062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=114501042905445062' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/114501042905445062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/114501042905445062'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2006/04/notes-on-using-gnupg.html' title='Notes on using GnuPG'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-114497690087512132</id><published>2006-04-13T17:56:00.000-07:00</published><updated>2006-04-13T20:13:48.840-07:00</updated><title type='text'>point vs. rate for mortgage</title><content type='html'>n: morgage term in number of years&lt;br /&gt;m: number of years to closing&lt;br /&gt;p: paid point&lt;br /&gt;&lt;br /&gt;let t= n *annual_rate&lt;br /&gt;    s= m* annual_rate&lt;br /&gt;&lt;br /&gt;p is equivalent to an increase of t to d+dt&lt;br /&gt;Assuming no closing cost then&lt;br /&gt;&lt;br /&gt;dt ~ c*p&lt;br /&gt;c=t*(exp(t)-1)/(exp(t)-exp(t-s)-s)&lt;br /&gt;&lt;br /&gt;So paying point p is equivalent to an increase of annual rate of p*(1/n)*c&lt;br /&gt;&lt;br /&gt;example 1:&lt;br /&gt;annual rate = 0.06&lt;br /&gt;term = 30 years&lt;br /&gt;closing until 30 years&lt;br /&gt;&lt;br /&gt;t = 0.06*30 = 1.8&lt;br /&gt;s = 0.06*30 = 1.8&lt;br /&gt;c = 1.8 *(exp(1.8)-1)/(exp(1.8)-exp(1.8-1.8)-1.8) = 2.797&lt;br /&gt;suppose paid point is 0.01 (1 point)&lt;br /&gt;then the effective annual rate of this mortgage is&lt;br /&gt;0.06 + 0.01 * (1/30) * 2.797 = 0.06093 = 6.093%&lt;br /&gt;&lt;br /&gt;example 2:&lt;br /&gt;Everything same as example 1 except that&lt;br /&gt;closing afte 10 years&lt;br /&gt;s = 0.06*10 = 0.6&lt;br /&gt;c = 1.8 *(exp(1.8)-1)/(exp(1.8)-exp(1.8-0.6)-0.6) = 4.268&lt;br /&gt;then the effective annual rate of this mortgage is&lt;br /&gt;0.06 + 0.01 * (1/30) * 4.268 = 0.06142 = 6.142%&lt;br /&gt;&lt;br /&gt;example 3:&lt;br /&gt;Everything same as example 1 except that&lt;br /&gt;closing afte 5 years&lt;br /&gt;s = 0.06*5 = 0.3&lt;br /&gt;c = 1.8 *(exp(1.8)-1)/(exp(1.8)-exp(1.8-0.3)-0.3) = 7.169&lt;br /&gt;then the effective annual rate of this mortgage is&lt;br /&gt;0.06 + 0.01 * (1/30) * 7.169 = 0.06239 = 6.239%&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-114497690087512132?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/114497690087512132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=114497690087512132' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/114497690087512132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/114497690087512132'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2006/04/point-vs-rate-for-mortgage.html' title='point vs. rate for mortgage'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-114483053964413892</id><published>2006-04-12T01:24:00.000-07:00</published><updated>2006-04-12T02:25:25.846-07:00</updated><title type='text'>Time zone in Java</title><content type='html'>PST is same as GMT-08:00&lt;br /&gt;PDT is same as GMT-07:00&lt;br /&gt;&lt;br /&gt;EST is same as GMT-05:00&lt;br /&gt;EDT is same as GMT-04:00&lt;br /&gt;&lt;br /&gt;This mean that for example, &lt;br /&gt;20060412 13:00:00 PST is one hour later than 20060412 13:00:00 PDT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;These time zone string can be parsed by java.util.SimpleDataFormat class&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-114483053964413892?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/114483053964413892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=114483053964413892' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/114483053964413892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/114483053964413892'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2006/04/time-zone-in-java.html' title='Time zone in Java'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-114469693673579556</id><published>2006-04-10T12:12:00.000-07:00</published><updated>2006-04-10T12:22:18.336-07:00</updated><title type='text'>Cookie file format of Internet explorer</title><content type='html'>Cookies are at C:\Documents and Settings\[user name]\Cookies&lt;br /&gt;&lt;br /&gt;Cookie name&lt;br /&gt;Cookie value&lt;br /&gt;Host/path for the web server setting the cookie&lt;br /&gt;Flags&lt;br /&gt;Exirpation time (low)&lt;br /&gt;Expiration time (high)&lt;br /&gt;Creation time (low)&lt;br /&gt;Creation time (high)&lt;br /&gt;Record delimiter (*)&lt;br /&gt;&lt;br /&gt;Conversion of the time to the number of seconds &lt;br /&gt;elapsed since midnight (00:00:00), January 1, 1970,&lt;br /&gt;&lt;br /&gt;t = 1e-7*(high*pow(2,32)+low) - 11644473600&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;&lt;a href="http://sourceforge.net/project/showfiles.php?group_id=78332"&gt;Galleta - An Internet Explorer Cookie Analysis Tool &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-114469693673579556?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/114469693673579556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=114469693673579556' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/114469693673579556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/114469693673579556'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2006/04/cookie-file-format-of-internet.html' title='Cookie file format of Internet explorer'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-113822845740596513</id><published>2006-01-25T14:32:00.000-08:00</published><updated>2006-01-25T14:34:18.116-08:00</updated><title type='text'>Pagesize setting for LaTex slides using prosper</title><content type='html'>Use option "-t A4" for dvips to avoid incomplete slide.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-113822845740596513?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/113822845740596513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=113822845740596513' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113822845740596513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113822845740596513'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2006/01/pagesize-setting-for-latex-slides.html' title='Pagesize setting for LaTex slides using prosper'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-113816007960756853</id><published>2006-01-24T19:34:00.000-08:00</published><updated>2006-01-24T19:34:42.133-08:00</updated><title type='text'>Using image in LaTex</title><content type='html'>Convert the image file to jpeg format.&lt;br /&gt;Use jpeg2ps to convert it to eps file.&lt;br /&gt;Then it can be easily used in LaTex&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-113816007960756853?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/113816007960756853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=113816007960756853' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113816007960756853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113816007960756853'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2006/01/using-image-in-latex.html' title='Using image in LaTex'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-113227938749159710</id><published>2005-11-17T18:01:00.000-08:00</published><updated>2005-12-23T13:01:51.316-08:00</updated><title type='text'>Tax for mutual fund</title><content type='html'>Some special rules:&lt;br /&gt;1. To qualify for the qualified dividend (taxed at same rate as long term captical gain), the fund must be held for at least 61 days.&lt;br /&gt;2. Upon selling of a fund held not more than 6 months, part of short term capital loss (if there's any) must be treated as long term captital loss to the limit of long term captital gain distributions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A good guide is at&lt;br /&gt;&lt;a href="http://fairmark.com/mutual/"&gt;http://fairmark.com/mutual/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;At the same site, tax information for other investment can also be found.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-113227938749159710?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/113227938749159710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=113227938749159710' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113227938749159710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113227938749159710'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/11/tax-for-mutual-fund.html' title='Tax for mutual fund'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-113204429158474946</id><published>2005-11-15T00:36:00.000-08:00</published><updated>2005-11-15T00:44:51.603-08:00</updated><title type='text'>Notes on Yahoo finance historical prices</title><content type='html'>The adj close is the actual close multiplied by split multiplier and dividend multiplier&lt;br /&gt;See following page for explanation.&lt;br /&gt;&lt;a href="http://help.yahoo.com/help/us/fin/quote/quote-12.html"&gt;http://help.yahoo.com/help/us/fin/quote/quote-12.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;IMPORTANT NOTE: Historical dividend is also adjusted by split multiplier and dividend multiplier&lt;br /&gt;&lt;br /&gt;CSV file for historical price can be retrieved by (SPY as example)&lt;br /&gt;&lt;a href="http://ichart.finance.yahoo.com/table.csv?s=SPY"&gt;http://ichart.finance.yahoo.com/table.csv?s=SPY&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;HTML page for historical price&lt;br /&gt;&lt;a href="http://finance.yahoo.com/q/hp?s=SPY"&gt;http://finance.yahoo.com/q/hp?s=SPY&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-113204429158474946?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/113204429158474946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=113204429158474946' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113204429158474946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113204429158474946'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/11/notes-on-yahoo-finance-historical.html' title='Notes on Yahoo finance historical prices'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-113202626978902284</id><published>2005-11-14T19:43:00.000-08:00</published><updated>2005-11-14T19:44:29.803-08:00</updated><title type='text'>List of Video Surveillance Companies</title><content type='html'>There is good Google answer at:&lt;br /&gt;&lt;a href="http://answers.google.com/answers/threadview?id=508926"&gt;http://answers.google.com/answers/threadview?id=508926&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-113202626978902284?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/113202626978902284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=113202626978902284' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113202626978902284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113202626978902284'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/11/list-of-video-surveillance-companies.html' title='List of Video Surveillance Companies'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-113093237683066623</id><published>2005-11-02T03:50:00.000-08:00</published><updated>2005-11-02T03:52:56.830-08:00</updated><title type='text'>Can people short in an IRA account?</title><content type='html'>The answer is NO.&lt;br /&gt;Reason (adapt from &lt;a href="http://invest-faq.com/articles/ret-plan-trad-ira.html"&gt;http://invest-faq.com/articles/ret-plan-trad-ira.html&lt;/a&gt;)&lt;br /&gt;The restriction comes from the combination of the following three facts. First, the law governing IRAs says that if any part of an IRA is used as collateral, the entire IRA is considered distributed and thus subject to income tax and penalties. Second, the rules imposed by the Federal Reserve Board et al. say that short sales have to take place in a margin account. Third and finally, margin accounts require that you pledge the account as collateral. So if you try to turn an IRA into a margin account, you'll void the IRA; but without a margin account, you can't sell short.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-113093237683066623?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/113093237683066623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=113093237683066623' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113093237683066623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113093237683066623'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/11/can-people-short-in-ira-account.html' title='Can people short in an IRA account?'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-113081528512024269</id><published>2005-10-31T19:21:00.000-08:00</published><updated>2005-10-31T19:21:25.410-08:00</updated><title type='text'>How to get information about land</title><content type='html'>Find the website for county assessor's office. Then look for what you need.&lt;br /&gt;For Santa Clara county, it's at http://www.sccgov.org/ari&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-113081528512024269?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/113081528512024269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=113081528512024269' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113081528512024269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113081528512024269'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/10/how-to-get-information-about-land.html' title='How to get information about land'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-113081511837404468</id><published>2005-10-31T19:17:00.000-08:00</published><updated>2005-10-31T19:18:38.386-08:00</updated><title type='text'>How to find information about a person, address, or phone number</title><content type='html'>The following website is exellent:&lt;br /&gt;http://www.reversephonedirectory.com/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-113081511837404468?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/113081511837404468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=113081511837404468' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113081511837404468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113081511837404468'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/10/how-to-find-information-about-person.html' title='How to find information about a person, address, or phone number'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-113021899676939737</id><published>2005-10-24T22:40:00.000-07:00</published><updated>2005-10-24T22:43:16.776-07:00</updated><title type='text'>Verizon DSL conflicts with NetBeans javadoc help</title><content type='html'>Cause : Motive SmartBridge (installed with Verizon support center) take over ALT-F1 globally.&lt;br /&gt;Solution : uninstall Verizon support center.&lt;br /&gt;&lt;br /&gt;See following page about Motive SmartBridge&lt;br /&gt;http://www.intelliot.com/blog/archives/2004/06/05/motive-smartbridge/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-113021899676939737?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/113021899676939737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=113021899676939737' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113021899676939737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/113021899676939737'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/10/verizon-dsl-conflicts-with-netbeans.html' title='Verizon DSL conflicts with NetBeans javadoc help'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-112866684067779006</id><published>2005-10-06T23:31:00.000-07:00</published><updated>2005-10-06T23:34:00.683-07:00</updated><title type='text'>FILE privilege for mysql</title><content type='html'>FILE privilege can only be granted globally (using ON *.* syntax). &lt;br /&gt;Same for the following privileges&lt;br /&gt;PROCESS, RELOAD, REPLICATION CLIENT, REPLICATION SLAVE, SHOW DATABASES, SHUTDOWN, and SUPER privileges&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-112866684067779006?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/112866684067779006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=112866684067779006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112866684067779006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112866684067779006'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/10/file-privilege-for-mysql.html' title='FILE privilege for mysql'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-112858308156862120</id><published>2005-10-06T00:17:00.000-07:00</published><updated>2005-10-06T00:22:00.480-07:00</updated><title type='text'>Viewing Javadoc in Eclipse</title><content type='html'>&lt;a href="http://www.cs.laurentian.ca/badams/c1047/eclipse-tutorials/javadoc-tutorial.html"&gt;Eclipse IDE Javadoc Configuration Tutorial&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-112858308156862120?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/112858308156862120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=112858308156862120' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112858308156862120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112858308156862120'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/10/viewing-javadoc-in-eclipse.html' title='Viewing Javadoc in Eclipse'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-112847715942746634</id><published>2005-10-04T18:24:00.000-07:00</published><updated>2005-10-04T19:19:20.786-07:00</updated><title type='text'>Tax for employee stock option</title><content type='html'>There are several types of stock incentive&lt;br /&gt;1. Incentive stock option&lt;br /&gt;2. Restricted stock&lt;br /&gt;A good article about incentive stock option http://www.fairmark.com/execcomp/iso.htm&lt;br /&gt;For restricted stock, see http://www.rowbotham.com/stock_options/restricted_stock.htm&lt;br /&gt;&lt;br /&gt;Key points&lt;br /&gt;For incentive stock option, &lt;br /&gt;1. No tax until exersize. No tax for receiving, vesting ISO.&lt;br /&gt;2. When exercize, no REGULAR tax. There is tax for AMT, difference between market price and exercise price recognized as ordinary income&lt;br /&gt;3. When sell, if qualifying for special holding requirement (&gt;1 years after exercize, &gt;2 years after receiving ISO), For REGULAR tax, taxed as capital gain with exercize price as tax basis. For AMT, taxed as capital gain with market price when exercising as tax basis.&lt;br /&gt;4. When sell, if qualified as Qualified Small Business Stock, half the gain recognized as capital gain for REGULAR tax. 7% of the excluded gain need to be reported for AMT.&lt;br /&gt;&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;Instruction for AMT, for 6251&lt;br /&gt;&lt;br /&gt;Line 12 - Qualified Small Business Stock&lt;br /&gt;If you claimed the exclusion under section 1202 for gain on qualified small business stock held more than 5 years, multiply the excluded gain (as shown on Schedule D (Form 1040)) by 7% (.07). Enter the result on line 12 as a positive amount.&lt;br /&gt;&lt;br /&gt;Line 13 - Exercise of Incentive Stock Options&lt;br /&gt;For the regular tax, no income is recognized when an incentive stock option (ISO), as defined in section 422(b), is exercised. However, this rule does not apply for the AMT. Instead, you generally must include on line 13 the excess, if any, of:&lt;br /&gt;  1. The fair market value of the stock acquired through exercise of the option (determined without regard to any lapse restriction) when your rights in the acquired stock first become transferable or when these rights are no longer subject to a substantial risk of forfeiture, over&lt;br /&gt;  2. The amount you paid for the stock including any amount you paid for the ISO used to acquire the stock.&lt;br /&gt;Note. Even if your rights in the stock are not transferable and are subject to a substantial risk of forfeiture, you may elect to include in AMT incomethe excess of the stock's fair market value (determineed without regard to any lapse restriction) over the exercise price upon the transfer to you of the stock acquired through exercise of the option. You must make the election by the 30th day after the date of the transfer. See Pub. 525, Taxable and Nontaxable Income, for more details.&lt;br /&gt;  If you acquired stock by exercising an ISO and you disposed of that stock in the same year, the tax treatment under the regular tax and the AMT is the same, and no adjustment is required.&lt;br /&gt;  Increase your AMT basis in any stock axquired through the exercise of an ISO by the amount of the adjustment. Keep adequate records for both the AMT and regular tax so that you may figure your adjustment. Seethe instructions for 16.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Topic 427 - Stock Options http://www.irs.gov/taxtopics/tc427.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-112847715942746634?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/112847715942746634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=112847715942746634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112847715942746634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112847715942746634'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/10/tax-for-employee-stock-option.html' title='Tax for employee stock option'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-112842168664983283</id><published>2005-10-04T03:22:00.000-07:00</published><updated>2005-10-04T03:45:14.073-07:00</updated><title type='text'>URL Redirection</title><content type='html'>Simple way to do page redirection is&lt;br /&gt;&amp;lt;html&gt;&lt;br /&gt;&amp;lt;head&gt;&lt;br /&gt;&amp;lt;meta http-equiv="refresh" content="5; URL=http://my_new_web_address"&gt; &lt;br /&gt;&amp;lt;/head&gt;&lt;br /&gt;&amp;lt;/html&gt;&lt;br /&gt;&lt;br /&gt;But user will notice the transition page&lt;br /&gt;&lt;br /&gt;For more complicated see a good article about this is at &lt;a href="http://blogs.msdn.com/david.wang/archive/2005/08/01/HOWTO_Common_URL_Redirection_Techniques_for_IIS_Summary.aspx"&gt;HOWTO: Common URL Redirection Techniques for IIS, Summary&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;One of ways mention in the article is to use 302 redirect response. See for example:&lt;br /&gt;&lt;a href="http://www.404-error-page.com/301-apache-httpd.conf-redirect.shtml"&gt;Working with 301 and 302 Redirects&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.internetofficer.com/302-redirect.html"&gt;302 Redirect&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-112842168664983283?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/112842168664983283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=112842168664983283' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112842168664983283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112842168664983283'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/10/url-redirection.html' title='URL Redirection'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-112807034691101855</id><published>2005-09-30T01:49:00.000-07:00</published><updated>2006-10-09T20:32:37.933-07:00</updated><title type='text'>Employee Invention</title><content type='html'>CALIFORNIA LABOR CODE (http://www.leginfo.ca.gov/.html/lab_table_of_contents.html)&lt;br /&gt;DIVISION 3 Article 3.5&lt;br /&gt;&lt;br /&gt;2870. (a) Any provision in an employment agreement which provides&lt;br /&gt;that an employee shall assign, or offer to assign, any of his or her&lt;br /&gt;rights in an invention to his or her employer shall not apply to an&lt;br /&gt;invention that the employee developed entirely on his or her own time&lt;br /&gt;without using the employer's equipment, supplies, facilities, or&lt;br /&gt;trade secret information except for those inventions that either:&lt;br /&gt;(1) Relate at the time of conception or reduction to practice of&lt;br /&gt;the invention to the employer's business, or actual or demonstrably&lt;br /&gt;anticipated research or development of the employer; or&lt;br /&gt;(2) Result from any work performed by the employee for the&lt;br /&gt;employer.&lt;br /&gt;(b) To the extent a provision in an employment agreement purports&lt;br /&gt;to require an employee to assign an invention otherwise excluded from&lt;br /&gt;being required to be assigned under subdivision (a), the provision&lt;br /&gt;is against the public policy of this state and is unenforceable.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2871. No employer shall require a provision made void and&lt;br /&gt;unenforceable by Section 2870 as a condition of employment or&lt;br /&gt;continued employment. Nothing in this article shall be construed to&lt;br /&gt;forbid or restrict the right of an employer to provide in contracts&lt;br /&gt;of employment for disclosure, provided that any such disclosures be&lt;br /&gt;received in confidence, of all of the employee's inventions made&lt;br /&gt;solely or jointly with others during the term of his or her&lt;br /&gt;employment, a review process by the employer to determine such issues&lt;br /&gt;as may arise, and for full title to certain patents and inventions&lt;br /&gt;to be in the United States, as required by contracts between the&lt;br /&gt;employer and the United States or any of its agencies.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2872. If an employment agreement entered into after January 1,&lt;br /&gt;1980, contains a provision requiring the employee to assign or offer&lt;br /&gt;to assign any of his or her rights in any invention to his or her&lt;br /&gt;employer, the employer must also, at the time the agreement is made,&lt;br /&gt;provide a written notification to the employee that the agreement&lt;br /&gt;does not apply to an invention which qualifies fully under the&lt;br /&gt;provisions of Section 2870. In any suit or action arising&lt;br /&gt;thereunder, the burden of proof shall be on the employee claiming the&lt;br /&gt;benefits of its provisions.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.methvenlaw.com/Handout_for_Avoiding_Legal_Problems_With_Employee_In_California.html"&gt;Avoiding Legal Problems with Employees In California&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-112807034691101855?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/112807034691101855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=112807034691101855' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112807034691101855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112807034691101855'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/09/employee-invention.html' title='Employee Invention'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-112592391856575068</id><published>2005-09-05T05:35:00.000-07:00</published><updated>2006-03-05T21:36:52.696-08:00</updated><title type='text'>Configure JDBC datasource for Tomcat 5.5.*</title><content type='html'>1. Do not modify server.xml.&lt;br /&gt;2. Copy JDBC driver, dbcp and collections jars to common/lib.&lt;br /&gt;3. Add the following to your web.xml in your application:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4" xsi="http://www.w3.org/2001/XMLSchema-instance" schemalocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" &amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;resource-ref&amp;gt;&lt;br /&gt;&amp;lt;description&amp;gt;DB Connection&amp;lt;/description&amp;gt;&lt;br /&gt;&amp;lt;res-ref-name&amp;gt;jdbc/dbTest&amp;lt;/RES-REF-NAME&amp;gt;&lt;br /&gt;&amp;lt;res-type&amp;gt;javax.sql.DataSource&amp;lt;/RES-TYPE&amp;gt;&lt;br /&gt;&amp;lt;res-auth&amp;gt;Container&amp;lt;/RES-AUTH&amp;gt;&lt;br /&gt;&amp;lt;/RESOURCE-REF&amp;gt;&lt;br /&gt;&amp;lt;/WEB-APP&amp;gt;&lt;br /&gt;&lt;br /&gt;4. Create new context.xml under META-INF and paste the following:&lt;br /&gt;&lt;br /&gt;&amp;lt;context reloadable="true" path="/dbtest" debug="5" crosscontext="true" docbase="dbtest"&amp;gt;&lt;br /&gt;&amp;lt;logger timestamp="true" suffix=".txt" prefix="localhost_realtorApp_log." classname="org.apache.catalina.logger.FileLogger"&amp;gt;&lt;br /&gt;&amp;lt;resource username="joe" password="XXXX" url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true" type="javax.sql.DataSource" auth="Container" name="jdbc/dbTest" driverclassname="com.mysql.jdbc.Driver" maxwait="5000" maxactive="4" maxidle="2"&amp;gt;&lt;br /&gt;&amp;lt;/context&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-112592391856575068?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/112592391856575068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=112592391856575068' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112592391856575068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112592391856575068'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/09/configure-jdbc-datasource-for-tomcat.html' title='Configure JDBC datasource for Tomcat 5.5.*'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-112348249709982010</id><published>2005-08-07T23:25:00.000-07:00</published><updated>2005-09-26T17:44:42.026-07:00</updated><title type='text'>How to keep the LaTex compilation window open in WinEdt</title><content type='html'>At Menu -&gt; Options -&gt; Execution Modes, Click 'BATCH' Button&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;Menu -&gt; Options -&gt; Configuration Wizard -&gt; Start -&gt; Tex Configuration Wizard -&gt; 'BATCH Execution Mode'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-112348249709982010?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/112348249709982010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=112348249709982010' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112348249709982010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112348249709982010'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/08/how-to-keep-latex-compilation-window.html' title='How to keep the LaTex compilation window open in WinEdt'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-112319223547492510</id><published>2005-08-04T14:35:00.000-07:00</published><updated>2005-08-04T15:08:14.876-07:00</updated><title type='text'>Extract wav from wmv using Windows Media Format SDK</title><content type='html'>Modify the AudioPlayer example in the Media Format SDK 9.&lt;br /&gt;There are several things needed to be done:&lt;br /&gt;1. Call IWMReaderAdvanced::SetUserProvidedClock(TRUE) so that the program can use IWMReaderAdvanced::DeliverTime to request the reader to process the stream as fast as possible (ignore actual time)&lt;br /&gt;2. Call IWMReaderAdvanced::DeliverTime in OnTime call back to request the reader process more data&lt;br /&gt;3. Select the audio stream. Get IWMProfile interface by QueryInterface on IWMReader interface. Get the number of streams by IWMProfile::GetStreamCount. Get config (IWMStreamConfig) of each stream by IWMProfile::GetStream. Get the stream type by IWMStreamConfig::GetStreamType. Look for stream with type WMMEDIATYPE_Audio. Get stream number using IWMStreamConfig::GetStreamNumber. Use IWMReaderAdvanced::SetManualStreamsSelection(TRUE) to enable manual stream selection. Use IWMReaderAdvanced::SetStreamsSelected to select the audio stream.&lt;br /&gt;4. Modify OnSample function to write the wav samples to a file.&lt;br /&gt;5. Remove unnecessary part of the program&lt;br /&gt;&lt;br /&gt;Note: AudioPlayer sample use asynchronous reader (IWMReader). It might be easier to use the synchronous reader (IWMSyncReader) obtained by WMCreateSyncReader.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-112319223547492510?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/112319223547492510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=112319223547492510' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112319223547492510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112319223547492510'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/08/extract-wav-from-wmv-using-windows.html' title='Extract wav from wmv using Windows Media Format SDK'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-112189958980524229</id><published>2005-07-20T15:43:00.000-07:00</published><updated>2005-07-20T15:46:29.810-07:00</updated><title type='text'>Adding JDK Javadoc to NetBeans IDE</title><content type='html'>Download JDK documentation from http://java.sun.com/j2se/1.5.0/download.jsp&lt;br /&gt;Unzip the zip file to the JDK directory&lt;br /&gt;In NetBeans IDE&lt;br /&gt;1. Choose Tools &gt; Java Platform Manager from the main window.&lt;br /&gt;2. Select the platform to which you want to add Javadoc in the left panel of the dialog box.&lt;br /&gt;3. In the Javadoc tab, click Add ZIP/Folder and specify the location of the Javadoc files.&lt;br /&gt;4. Click Close.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-112189958980524229?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/112189958980524229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=112189958980524229' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112189958980524229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112189958980524229'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/07/adding-jdk-javadoc-to-netbeans-ide.html' title='Adding JDK Javadoc to NetBeans IDE'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-112189735336988082</id><published>2005-07-20T15:06:00.000-07:00</published><updated>2005-07-20T15:09:13.373-07:00</updated><title type='text'>Adding CLASSPATH in NetBeans</title><content type='html'>In the Projects window, right-click the project node and choose Properties.&lt;br /&gt;Click Libraries in the left panel of the Project Properties dialog box.&lt;br /&gt;Adding library path in the right panel.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-112189735336988082?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/112189735336988082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=112189735336988082' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112189735336988082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112189735336988082'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/07/adding-classpath-in-netbeans.html' title='Adding CLASSPATH in NetBeans'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-112130701111587834</id><published>2005-07-13T18:36:00.000-07:00</published><updated>2005-10-04T03:46:29.696-07:00</updated><title type='text'>Setup Tomcat with Apache</title><content type='html'>Requires following steps&lt;br /&gt;1. install JDK ,&lt;br /&gt;j2se 5.0 &lt;a href="http://java.sun.com/j2se/1.5.0/index.jsp"&gt;http://java.sun.com/j2se/1.5.0/index.jsp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. install Apache http server&lt;br /&gt;Apache 2.0 &lt;a href="http://httpd.apache.org/download.cgi"&gt;http://httpd.apache.org/download.cgi&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3. install Tomcat&lt;br /&gt;Tomcat 5.x &lt;a href="http://jakarta.apache.org/tomcat/index.html"&gt;http://jakarta.apache.org/tomcat/index.html&lt;/a&gt;&lt;br /&gt;Be sure to use j2se 5.0 for Tomcat 5. Otherwise a compatibility package needs to be installed.&lt;br /&gt;Without compatibility package, tomcat 5 will not run with earlier version of j2se.&lt;br /&gt;&lt;br /&gt;Compatibility package:&lt;br /&gt;&lt;a href="http://ftp.wayne.edu/apache/jakarta/tomcat-5/v5.5.9/bin/jakarta-tomcat-5.5.9-compat.zip"&gt;http://ftp.wayne.edu/apache/jakarta/tomcat-5/v5.5.9/bin/jakarta-tomcat-5.5.9-compat.zip&lt;/a&gt;&lt;br /&gt;unzip it can copy to Tomcat directory&lt;br /&gt;&lt;br /&gt;After installation, if everything is right, following pages can be viewed:&lt;br /&gt;&lt;a href="http://localhost:8080/"&gt;http://localhost:8080/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://localhost:8080/jsp-examples/"&gt;http://localhost:8080/jsp-examples/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;4. install a connector, in this case JK&lt;br /&gt;&lt;a href="http://jakarta.apache.org/site/downloads/downloads_tomcat-connectors.cgi"&gt;http://jakarta.apache.org/site/downloads/downloads_tomcat-connectors.cgi&lt;/a&gt;&lt;br /&gt;copy mod_jk-1.2.14-apache-2.0.54.so to the ${apache_home}/modules, rename it to mod_jk.so.&lt;br /&gt;&lt;br /&gt;5. configure and test&lt;br /&gt;&lt;br /&gt;Add following line to ${tomcat_home}/conf/server.xml, in the &amp;lt;Engine&gt; section,&lt;br /&gt;&amp;lt;Listener className="org.apache.jk.config.ApacheConfig"  modjk="C:/Program Files/Apache Group/Apache2/modules/mod_jk.so" /&gt;&lt;br /&gt;&lt;br /&gt;Create a file ${tomcat_home}/conf/jk/workers.properties&lt;br /&gt;worker.list=ajp13&lt;br /&gt;worker.ajp13.port=8009&lt;br /&gt;worker.ajp13.host=localhost&lt;br /&gt;worker.ajp13.type=ajp13&lt;br /&gt;&lt;br /&gt;Add a line to the end of ${apache_home}/conf/httpd.conf&lt;br /&gt;Include "C:/Program Files/Apache Software Foundation/Tomcat 5.5/conf/auto/mod_jk.conf"&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;Using Apache HTTP with Apache Tomcat(&lt;a href="http://johnturner.com/howto/apache-tomcat-howto.html"&gt;http://johnturner.com/howto/apache-tomcat-howto.html&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Server Configuration Reference&lt;br /&gt;&lt;a href="http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/index.html"&gt;http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/index.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For application deployment (Application directory structure setup)&lt;br /&gt;&lt;a href="http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html#Automatic%20Application%20Deployment"&gt;http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html#Automatic%20Application%20Deployment&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Jakarta Tomcat Connector - Apache HowTo&lt;br /&gt;&lt;a href="http://jakarta.apache.org/tomcat/connectors-doc/howto/apache.html"&gt;http://jakarta.apache.org/tomcat/connectors-doc/howto/apache.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Jakarta Tomcat Connector - Workers HowTo&lt;br /&gt;&lt;a href="http://jakarta.apache.org/tomcat/connectors-doc/howto/workers.html"&gt;http://jakarta.apache.org/tomcat/connectors-doc/howto/workers.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-112130701111587834?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/112130701111587834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=112130701111587834' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112130701111587834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/112130701111587834'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/07/setup-tomcat-with-apache.html' title='Setup Tomcat with Apache'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-111647996708511778</id><published>2005-05-18T22:11:00.000-07:00</published><updated>2005-05-18T22:19:27.090-07:00</updated><title type='text'>USB-400 Wireless Adapter</title><content type='html'>I finally get my USB Wireless Adapter working properly without the original installation disk and documentation.&lt;br /&gt;&lt;br /&gt;The adapter has a model name USB-400. There is no manufacturer name.&lt;br /&gt;Finally, I found the manual, driver &amp; utility can be download from&lt;br /&gt;&lt;a href="http://www.syntaxgroups.com/support/downloads.php"&gt;http://www.syntaxgroups.com/support/downloads.php&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-111647996708511778?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/111647996708511778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=111647996708511778' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/111647996708511778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/111647996708511778'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/05/usb-400-wireless-adapter.html' title='USB-400 Wireless Adapter'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-111281783780964931</id><published>2005-04-06T13:01:00.000-07:00</published><updated>2005-04-06T13:03:57.810-07:00</updated><title type='text'>Install TAO</title><content type='html'>Prerequirement:&lt;br /&gt;   PETSC must be installed&lt;br /&gt;&lt;br /&gt;edit : include/tao_sys.h&lt;br /&gt;    search for the line:&lt;span style="font-family:courier new;font-size:85%;"&gt; &lt;/span&gt;&lt;span style="color:#006600;"&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;extern int PetscLogInfo(void *,const char*,...);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;    change to:&lt;span style="font-family:courier new;"&gt; &lt;span style="font-size:85%;color:#006600;"&gt;extern int PetscLogInfo(void *,const char[],...);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;    This is because the prototype in tao_sys.h is different from that in&lt;br /&gt;petsclog.h of PETSC&lt;br /&gt;&lt;br /&gt;Run the following commands&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;color:#006600;"&gt;export TAO_DIR=`pwd`&lt;br /&gt;export BOPT=O_c++&lt;br /&gt;export PETSC_ARCH=cygwin-intel&lt;br /&gt;make all&lt;br /&gt;make tao_testexamples &gt;&amp; examples.log&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;check for errors in examples.log&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-111281783780964931?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/111281783780964931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=111281783780964931' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/111281783780964931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/111281783780964931'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/04/install-tao.html' title='Install TAO'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-111281754679373294</id><published>2005-04-06T12:51:00.000-07:00</published><updated>2005-04-06T12:59:06.800-07:00</updated><title type='text'>Install PETSC on Intel Microsoft Windows 2000</title><content type='html'>&lt;span style="font-family:courier new;font-size:85%;"&gt;This note describes how to install PETSC on a machine with following specs:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;CPU: Pentium 4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;OS: Windows 2000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Compiler : Intel Compiler&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Math : Intel MKL&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;MPI  : MPICH&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Shell: cygwin &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Prerequirement:&lt;br /&gt;    install MKL: MKL should be in C:\Program Files\intel, with directory name MKL70, MKL61 or MKL, make sure ia32/mkl_c_dll.lib should be the only one library needed&lt;br /&gt;    install MPICH: MPICH should be in C:\Program Files\MPICH&lt;br /&gt;&lt;br /&gt;edit :     &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;     search in *.py for 'C:\Program' and 'cygdrive', change drive letter  for your pre-installed software&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;edit : ${PETSC_DIR}/makefile    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;    search for the FIRST "MINFO_", change MINFO_ to ${MINFO}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;    remove the next few lines until line: -@$(RM) MINFO MINFO_ &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;    change this line to:  -@$(RM) MINFO &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;    This is because unknown problem with sed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;environment:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;    adding the MKL DLL directorty to PATH&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;    before entering cygwin, run vcvars32 first to set the environment&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;entering cygwin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;go to root of PETSC&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;run following commands:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;    PETSC_DIR=`pwd`; export PETSC_DIR&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;    config/configure.py --with-fc=0 -with-vendor-compilers=intel&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;    make BOPT=O_c++ all&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;    make BOPT=O_c++ test&lt;br /&gt;NOTE: configure.py will use flag -TP for compiling both .c and .cpp files.&lt;br /&gt;&lt;br /&gt;If everything is right, configure.py should automatically locate pre-installed&lt;br /&gt;MKL and MPICH.  The end of ${PETSC_DIR}/configure.log should look like&lt;br /&gt;following:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Compilers:&lt;br /&gt;C Compiler: /cygdrive/c/users/xw/work/petsc-2.2.1/bin/win32fe/win32fe icl --nodetect -MT&lt;br /&gt;C++ Compiler: /cygdrive/c/users/xw/work/petsc-2.2.1/bin/win32fe/win32fe icl --nodetect -MT -GX -GR -TP&lt;br /&gt;PETSc:&lt;br /&gt;**&lt;br /&gt;** Configure has determined that your PETSC_ARCH must be specified as:&lt;br /&gt;** ** PETSC_ARCH: cygwin-intel&lt;br /&gt;**&lt;br /&gt;**&lt;br /&gt;** Configure has determined that your PETSC_DIR must be specified as:&lt;br /&gt;** ** PETSC_DIR: /cygdrive/c/users/xw/work/petsc-2.2.1&lt;br /&gt;**&lt;br /&gt;** Please make the above changes to your environment or on the command line for make.&lt;br /&gt;**&lt;br /&gt;BLAS/LAPACK: /cygdrive/c/Program\ Files/Intel/MKL70/ia32/lib/mkl_c_dll.lib&lt;br /&gt;MPI:&lt;br /&gt;Type: Default MPICH install location (C:\Program Files\MPICH with MS compatible SDK&lt;br /&gt;Version: 1.2&lt;br /&gt;Includes: ['/cygdrive/c/Program\\ Files/MPICH/SDK/include']&lt;br /&gt;Library: ['/cygdrive/c/Program\\ Files/MPICH/SDK/lib/mpich.lib', 'ws2_32.lib']&lt;br /&gt;Python Configure Actions&lt;br /&gt;These are the actions performed by configure on the filesystem&lt;br /&gt;-----------------------------------------------------------------&lt;br /&gt;PETSc:&lt;br /&gt;Build : Set default architecture to cygwin-intel in bmake/variables&lt;br /&gt;Build : Set default optimization to g in bmake/common/bopt_&lt;br /&gt;File creation : Generated list of jobs for testing in bmake/cygwin-intel/jobs&lt;br /&gt;File creation : Generated list of jobs for testing in bmake/cygwin-intel/ejobs&lt;br /&gt;File creation : Generated list of jobs for testing in bmake/cygwin-intel/rjobs&lt;br /&gt;File creation : Created bmake/cygwin-intel/configure.py for automatic reconfiguration&lt;br /&gt;Framework:&lt;br /&gt;Substitution : bmake/config/rules.in was substituted to produce bmake/cygwin-intel/rules&lt;br /&gt;Substitution : bmake/config/packages.in was substituted to produce bmake/cygwin-intel/packages&lt;br /&gt;Substitution : bmake/config/variables.in was substituted to produce bmake/cygwin-intel/variables&lt;br /&gt;File creation : Created configure header bmake/cygwin-intel/petscconf.h&lt;br /&gt;File creation : Created C specific configure header bmake/cygwin-intel/petscfix.h&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-111281754679373294?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/111281754679373294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=111281754679373294' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/111281754679373294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/111281754679373294'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/04/install-petsc-on-intel-microsoft.html' title='Install PETSC on Intel Microsoft Windows 2000'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11973746.post-111281703372223820</id><published>2005-04-06T12:35:00.000-07:00</published><updated>2005-04-06T12:50:33.726-07:00</updated><title type='text'>How to show tootips of a toolbar in a dialog window?</title><content type='html'>It is easy to add a toolbar to a dialog window. However, it takes some effort to make the tooltips of the toolbar to work. Here are the steps needed to be taken.&lt;br /&gt;&lt;br /&gt;1. Add the following line to the message map in the header file of the dialog box&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;color:#33cc00;"&gt;&lt;span style="color:#006600;"&gt;afx_msg BOOL OnToolTipText(UINT nID, NMHDR* pNMHDR, LRESULT* pResult);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;2.  Add the following line to the cpp file of the dialog box&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;color:#006600;"&gt;ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipText )&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:times new roman;color:#000000;"&gt;3.  Add following line to InitDialog()&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;font-size:85%;color:#006600;"&gt;EnableTooltips();&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;4.  Add the following function&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;color:#006600;"&gt;BOOL CConfBrowser_MFCDlg::OnToolTipText(UINT, NMHDR* pNMHDR, LRESULT* pResult)&lt;br /&gt;{&lt;br /&gt;  TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR;&lt;br /&gt;  UINT nID =pNMHDR-&gt;idFrom;&lt;br /&gt;  if (pTTT-&gt;uFlags &amp; TTF_IDISHWND)&lt;br /&gt;  {&lt;br /&gt;    // idFrom is actually the HWND of the tool&lt;br /&gt;    nID = ::GetDlgCtrlID((HWND)nID);&lt;br /&gt;  }&lt;br /&gt;  if (nID)&lt;br /&gt;  {&lt;br /&gt;    pTTT-&gt;lpszText = MAKEINTRESOURCE(nID);&lt;br /&gt;    pTTT-&gt;hinst = AfxGetResourceHandle();&lt;br /&gt;    return(TRUE);&lt;br /&gt;  }&lt;br /&gt;  return(FALSE);&lt;br /&gt;}&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11973746-111281703372223820?l=weitips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://weitips.blogspot.com/feeds/111281703372223820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11973746&amp;postID=111281703372223820' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/111281703372223820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11973746/posts/default/111281703372223820'/><link rel='alternate' type='text/html' href='http://weitips.blogspot.com/2005/04/how-to-show-tootips-of-toolbar-in.html' title='How to show tootips of a toolbar in a dialog window?'/><author><name>wavingblue</name><uri>http://www.blogger.com/profile/09505021289135720720</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
