<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;A08BRX08eip7ImA9WhRUFUU.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342</id><updated>2012-01-26T09:57:34.372-05:00</updated><category term="apache" /><category term="resize" /><category term="nsupdate" /><category term="php file download resumable partial" /><category term="selinux" /><category term="system" /><category term="centos" /><category term="mysql" /><category term="php" /><category term="wifi" /><category term="nagios" /><category term="virtualmin" /><category term="directory" /><category term="tag" /><category term="Terracotta" /><category term="歌曲" /><category term="dynamic ip" /><category term="user" /><category term="c" /><category term="dns" /><category term="mac" /><category term="windows" /><category term="mp3" /><category term="中文" /><category term="image" /><category term="c++" /><category term="default" /><category term="bind" /><title>Li's BLOG</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://li-ma.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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>40</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/MLyT" /><feedburner:info uri="blogspot/mlyt" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0cMQns7fip7ImA9Wx9XGEo.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-1884533525813943823</id><published>2011-01-12T17:16:00.002-05:00</published><updated>2011-01-12T17:24:43.506-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-12T17:24:43.506-05:00</app:edited><title>How to synchronize calendar from Lotus Notes to Google Calendar</title><content type="html">&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;I have missed several meetings scheduled in Lotus Notes in the past couple of days. Because I was fully relying on my iPhone to remind me of any upcoming meeting, and Notes Calendar's notification doesn't help that much at all.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;So with our friend Google.com, I found the following solution, hopfully can make all we poor Notes users' life a bit sweeter:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;1. Sync calendar from Notes to Google&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Download this nice open source app from:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;http://sourceforge.net/projects/lntogoogle/&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;No install is required (do need .NET framework, which most of PC already have). Once it is started, simply enter your Google account and Notes login info, then pick a calendar you want to sync the data over (recommend to create a new calendar in Google). Then it can either automatically do the sync or let you control manually. Nice!&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;2. Sync to iPhone&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Somehow iPhone only pick one calendar from my Google account by default. Since I created a new calendar to hold the Notes calendar, I need to let iPhone pick more than Calendar. And here's the solution:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse;"&gt;Goto https://www.google.com/&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse;"&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse;"&gt;calendar/iphoneselect&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse;"&gt;Pick the calendars you want to sync to iPhone and save.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Magically, all the events from my Notes Calendar are in my iPhone now.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse;"&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse;"&gt;&lt;b&gt;3. Reminder&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse;"&gt;Somehow most of my Notes events don't have a reminder. To let my iPhone remind me, Google allows me to setup a default notification for all event, unless reminder has been explicitly set. So I set my default notification to popup in 10 min, which will let my iPhone popup a little message 10 min before my meetings.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse;"&gt;Now my life is back to perfection. Hope the tip helps you too.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse;"&gt;Li&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-1884533525813943823?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/vGyiD9lYNpg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/1884533525813943823/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=1884533525813943823" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/1884533525813943823?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/1884533525813943823?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/vGyiD9lYNpg/how-to-synchronize-calendar-from-lotus.html" title="How to synchronize calendar from Lotus Notes to Google Calendar" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2011/01/how-to-synchronize-calendar-from-lotus.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE4DQn0-fCp7ImA9Wx5SGUw.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-7809029757304304905</id><published>2010-08-15T18:56:00.000-04:00</published><updated>2010-08-15T18:56:13.354-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-15T18:56:13.354-04:00</app:edited><title>How to monitor Java app started as Windows Service</title><content type="html">&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;If you have a Java server running as Windows Service, such as Tomcat, JBoss, etc., it's not possible to run JConsole or JVisualVM to monitor those JVMs, because Windows doesn't allow those apps to see JVM started as Windows Service.&lt;/div&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;There're two ways I fund over the internet:&lt;/div&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;1. You can use&amp;nbsp;&lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx" rel="nofollow" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #0077cc; cursor: pointer; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Sysinternals PsExec.exe&lt;/a&gt;&amp;nbsp;to accomplish this.&lt;/div&gt;&lt;pre class="prettyprint" style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;"&gt;&lt;code style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;psexec&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;exe &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;-&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;i &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;-&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;s c&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;:\&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;visualvm&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;\&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;bin&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;\&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;visualvm&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;exe&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;2. Use interactive Windows Service:&lt;/div&gt;&lt;pre class="prettyprint" style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 13px;"&gt;
&lt;div class="post-header"&gt;&lt;div class="post-header-line-1"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="post-body entry-content"&gt;1. Install a service using sc.exe - that will open a command prompt under local service account by executing this on cmd window

sc create debugservice binpath= "cmd /K start" type= own type= interact

2. sc start debugservice

[on a remote desktop session, this service has to be started only in console session for the command prompt window to pop up]

will print message that [SC] StartService FAILED 1053: but will start a command prompt under local system account.

3. now navigate to %JAVA_HOME%/bin on the command prompt that got opened and type in
jmap -dump:format=b,file=D:\temp\test.hprof&amp;nbsp;&lt;pid of="" service="" tomcat=""&gt;
this will dump the heap to D:\temp folder.

&lt;b&gt;
Be careful dumping heap on a live system as it will lock up the system for the duration of heap dump.&lt;/b&gt;

4. similarly jconsole can be started using that command prompt and connecting to the pid of the tomcat.

Technical explanation:
a. as tomcat service is installed under local system account, jconsole / jmap cannot connect to the service when these are started under the windows logged in user.
b. So the command prompt interactive service is installed as a local system service and when that service is started, it opens the command prompt under local system account.
c. And hence any process started from that command prompt will be started under local system account and hence be able to access any local system services.&lt;/pid&gt;&lt;/div&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-7809029757304304905?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/QGzgXZU8RMM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/7809029757304304905/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=7809029757304304905" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/7809029757304304905?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/7809029757304304905?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/QGzgXZU8RMM/how-to-monitor-java-app-started-as.html" title="How to monitor Java app started as Windows Service" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2010/08/how-to-monitor-java-app-started-as.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YFSXY5cSp7ImA9WxFSGUg.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-6809381106099282358</id><published>2010-04-21T13:10:00.004-04:00</published><updated>2010-04-22T13:58:38.829-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-22T13:58:38.829-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Terracotta" /><title>Run Terracotta Server as Windows Service</title><content type="html">&lt;a href="http://www.terracotta.org/"&gt;Terracotta&lt;/a&gt; is a JVM-level Java clustering solution. Lots of Java frameworks and libraries, such as Ehcache, Quartz, Web Session, have been offering clustered version over this nice platform.&lt;br /&gt;
&lt;br /&gt;
This document describes steps to install Terracotta Server as a Windows Service that can be managed and executed just as any other standard Windows services, including auto startup when Windows is started and management through standard service management UI and command.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Setup Procedure&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;b&gt;Preparation&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
1. Download and install JDK&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Goto http://java.sun.com to download JDK 1.6.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;As of now, JDK 1.6.0_u17 is certified and recommended.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Install JDK to c:\java\jdk_1.6.0_17&lt;br /&gt;
&lt;br /&gt;
2. Download and install Terracotta &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Open source version can be downloaded from http://www.terracotta.org.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Enterprise commercial version can be downloaded by contacting sales@terracottatech.com.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;If download is in form of tar.gz file, untar it to c:\terracotta, such as c:\terracotta\terracotta-3.2.1_1.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;If download is in jar form, double click the file to start installation. Follow installation steps to install&amp;nbsp;Terracotta to to c:\terracotta, such as c:\terracotta\terracotta-3.2.1_1.&lt;br /&gt;
&lt;br /&gt;
3. If Terracotta License file is needed, copy it to Terracotta Installation Folder, such as&amp;nbsp;\terracotta\terracotta3.2.1_1.&lt;br /&gt;
&lt;br /&gt;
4. Download Windows Resource Kit Tools&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Go to http://www.microsoft.com to search and download Windows Resource Kit Tools that is suitable to the targeted Windows version.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Run the installer and install it to the default folder.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Copy anysrv.exe to c:\terracotta\terracotta-3.2.1_1\bin&lt;br /&gt;
&lt;br /&gt;
5. Make sure sc.exe is included in your Windows installation. Otherwise, download it from Microsoft’s website&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Configuration&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
1. Create tc-config.xml to be used by Terracotta Server, place it to bin folder under Terracotta installation home folder.&lt;br /&gt;
&lt;br /&gt;
2. Create Registration file&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Create a text file with any text editor, copy paste the following text into the file and save it as tcservice.reg. &lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
REGEDIT4&lt;br /&gt;
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Terracotta\Parameters]&lt;br /&gt;
"Application"="\"C:\\Java\\jdk1.6.0_17\\bin\\java.exe\\"&lt;br /&gt;
"AppParameters"="-cp c:\\terracotta\\terracotta-3.2.1_1\\lib\\tc.jar -server -Xms4G –Xmx4G -XX:+HeapDumpOnOutOfMemoryError  -Dtc.install-root=c:\\terracotta\\terracotta-3.2.1_1 com.tc.server.TCServerMain"&lt;br /&gt;
"AppDirectory"="c:\\terracotta\\terracotta-3.2.1_1\\"&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #666666;"&gt;Note:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #666666;"&gt;If you need to pass more parameters to TC server, yon can do so by appending them to the AppParameters section. For example, if I want to specify a tc-config.xml and a server name, I can change the AppParameters to:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="color: #666666;"&gt;"AppParameters"="-cp c:\\terracotta\\terracotta-3.2.1_1\\lib\\tc.jar -server -Xms4G –Xmx4G -XX:+HeapDumpOnOutOfMemoryError -Dtc.install-root=c:\\terracotta\\terracotta-3.2.1_1 com.tc.server.TCServerMain &lt;b&gt;-f c:\\terracotta\\my-tc-config.xml -n Server1&lt;/b&gt;"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Install Service&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
1. Create Windows Service&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Open a command prompt window as System Administrator.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Run the following command:&lt;br /&gt;
&lt;code&gt;sc.exe create Terracotta binPath= “c:\terracotta\terracotta-3.2.1_1\bin\srvany.exe” type= own start= auto DisplayName= “Terracotta Server 3.2.1_1”&lt;/code&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;It will create a new Windows Service named Terracotta which will be started automatically when Windows is started.&lt;br /&gt;
&lt;br /&gt;
2. Modify service parameter, so it will start Terracotta Server&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;In the same command prompt box, run:&lt;br /&gt;
&lt;code&gt;regedit tcserver.reg&lt;/code&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;It will modify the newly created service to run Terracotta Server as a Java application.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Test&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
1. In Windows Service Management window, start the service. Make sure there’s no error popped up&lt;br /&gt;
&lt;br /&gt;
2. Run dev-console.bat from Terracotta Installation folder and connect to server_name 9520.&amp;nbsp;Developer’s console should be able to login and display the standard Terracotta management interface.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Trouble Shooting&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;1. Pay attention to quotation signs and garbage characters when copy&amp;amp;paste code snippet from this article&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;2. To test run the service manually&lt;/i&gt;&lt;br /&gt;
Since Windows doesn't provide any console based information when starting service, it could be very difficult to trouble shoot problems.&lt;br /&gt;
If your service does not start as expected, it is highly recommended to run the service manually just to make sure everything is configured correctly.&lt;br /&gt;
To do so, you can follow the following steps:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Open a Commend Shell&lt;/li&gt;
&lt;li&gt;Go to folder defined by AppDirectory&lt;/li&gt;
&lt;li&gt;Run the Application with AppParameters&lt;/li&gt;
&lt;/ol&gt;In my example, it will be:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;CD c:\terracotta\terracotta-3.2.1_1&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;C:\Java\jdk1.6.0_17\bin\java.exe -cp c:\terracotta\terracotta-3.2.1_1\lib\tc.jar -server -Xms4G –Xmx4G -XX:+HeapDumpOnOutOfMemoryError -Dtc.install-root=c:\terracotta\terracotta-3.2.1_1 com.tc.server.TCServerMain&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-6809381106099282358?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/eOcQX2dH3HA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/6809381106099282358/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=6809381106099282358" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/6809381106099282358?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/6809381106099282358?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/eOcQX2dH3HA/run-terracotta-server-as-windows.html" title="Run Terracotta Server as Windows Service" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2010/04/run-terracotta-server-as-windows.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUICSXY7eCp7ImA9WxBaFk0.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-1458569627004705014</id><published>2010-03-26T08:46:00.000-04:00</published><updated>2010-03-26T08:46:08.800-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-26T08:46:08.800-04:00</app:edited><title>Install ColdFusion 8 on Snow Leopard</title><content type="html">I need to test something in ColdFusion 8 on my MacBook Pro with Snow Leopard. After I downloaded and unzipped the installer, the installer simply did not run. I double click on the ColdFusion 8 Installer.app from Finder, nothing happened. I guess the Install Anywhere script which was used to create installer for CF 8 might have issue with Snow Leopard.&lt;br /&gt;
&lt;br /&gt;
From internet, there're lots of articles about how run CF8 in Snow Leopard, no one really talked about installation part. Hope I'm not the only one that had this problem.&lt;br /&gt;
&lt;br /&gt;
Anyway, I do managed to find a way to do the installation. Here's what I did:&lt;br /&gt;
1. Open a Terminal&lt;br /&gt;
2. cd ColdFusion\ 8\ Installer.app&lt;br /&gt;
3. cd Contents/Resources/Java&lt;br /&gt;
4. java -cp ./IAClasses.zip:Execute.zip:installscript.zip:. com.zerog.ia.installer.Main&lt;br /&gt;
5. Follow the steps and I was able to finish setup and run CF8 &lt;br /&gt;
&lt;br /&gt;
Cheers!&lt;br /&gt;
&lt;br /&gt;
Li&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-1458569627004705014?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/VGFF3CbiWOA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/1458569627004705014/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=1458569627004705014" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/1458569627004705014?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/1458569627004705014?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/VGFF3CbiWOA/install-coldfusion-8-on-snow-leopard.html" title="Install ColdFusion 8 on Snow Leopard" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2010/03/install-coldfusion-8-on-snow-leopard.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMDQ3Y7eSp7ImA9WxNbE0g.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-982742797133039289</id><published>2009-11-16T00:46:00.002-05:00</published><updated>2009-11-16T00:47:52.801-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-16T00:47:52.801-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="selinux" /><category scheme="http://www.blogger.com/atom/ns#" term="mysql" /><category scheme="http://www.blogger.com/atom/ns#" term="php" /><title>PHP cannot connect to mysql when run inside Apache</title><content type="html">I ran into a very strange issue when Apache/PHP/MySQL.&lt;br /&gt;
What happend was my php code suddenly cannot connect to mysql on another machine any more. The error message is:&lt;br /&gt;
&lt;pre&gt;mysqli_connect() [function.mysqli-connect]: (HY000/2003): Can't connect to MySQL server on '218.241.156.222' (13)&lt;/pre&gt;The strange thing was that if I connect mySQL from command line, even run the same code by php directly from command line, it worked just fine.&lt;br /&gt;
&lt;br /&gt;
After searched around, I finally found the answer. Looks like it has something to do with SELinux settings.&lt;br /&gt;
&lt;br /&gt;
To fix the issue, I only need to run:&lt;br /&gt;
&lt;pre&gt;setsebool httpd_can_network_connect_db 1&lt;/pre&gt;&lt;br /&gt;
Before I ran the script, the file content of /selinux/booleans/httpd_can_network_connect_db was:&lt;br /&gt;
0 0&lt;br /&gt;
&lt;br /&gt;
After I ran the script, content changed to:&lt;br /&gt;
1 1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-982742797133039289?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/XDXvlum_DLk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/982742797133039289/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=982742797133039289" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/982742797133039289?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/982742797133039289?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/XDXvlum_DLk/php-cannot-connect-to-mysql-when-run.html" title="PHP cannot connect to mysql when run inside Apache" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2009/11/php-cannot-connect-to-mysql-when-run.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQHSX8-eip7ImA9WxNbEEs.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-906145945357343446</id><published>2009-11-07T21:20:00.006-05:00</published><updated>2009-11-12T17:18:58.152-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-12T17:18:58.152-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="中文" /><category scheme="http://www.blogger.com/atom/ns#" term="tag" /><category scheme="http://www.blogger.com/atom/ns#" term="歌曲" /><category scheme="http://www.blogger.com/atom/ns#" term="mp3" /><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><title>Trick to let iTune handle Chinese song names and tags correctly in Mac OS X</title><content type="html">When play Chinese songs in iTune, it always tends to show the song information, such as name, artist, album, etc. as garbage text.&lt;br /&gt;
&lt;br /&gt;
When I was running Mac OSX Tiger and Leopard, the trick I used was to open iTune application information by right-click and choose Get Info.&lt;br /&gt;
In the information windows, remove all languages except Chinese. So next time, when iTune is started, it starts in Chinese mode. And it handles all Chinese songs correctly.&lt;br /&gt;
&lt;br /&gt;
In Snow Leopard, the language selection is missing in Get Info dialog. It took me a few weeks to find the new trick.&lt;br /&gt;
&lt;pre&gt;cd /Applications/iTunes.app/Contents/Resources
mkdir lang_bak
mv *.lproj lang_bak
cp -r lang_bak/zh_CN.lproj .
&lt;/pre&gt;&lt;br /&gt;
Then start iTune, you will get it in Chinese mode again and just as the trick before, all Chinese songs are handled correctly.&lt;br /&gt;
&lt;br /&gt;
Hope these tricks can be helpful to Chinese Mac users.&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;br /&gt;
&lt;br /&gt;
BTW: If you speak other language and suffers the sames kind of problem, I guess you can try to delete all other languages other than your preference. Hopefully that will work for you too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-906145945357343446?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/QaO14bNBkDA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/906145945357343446/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=906145945357343446" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/906145945357343446?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/906145945357343446?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/QaO14bNBkDA/trick-to-let-itune-handle-chinese-song.html" title="Trick to let iTune handle Chinese song names and tags correctly in Mac OS X" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2009/11/trick-to-let-itune-handle-chinese-song.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UHR3w5cCp7ImA9WxJRFUs.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-8298646092842841890</id><published>2009-05-17T08:47:00.001-04:00</published><updated>2009-05-17T09:00:36.228-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-17T09:00:36.228-04:00</app:edited><title>Monitor detailed SQL transactions issued by Hibernate</title><content type="html">Hibernate help us translate access to Java objects from HQL to native SQL and automatically take care of object relationships, which saves developers lots of time, but at the same time, hide lots of details, such as how cross table queries are created, how tables are related and, very important, what data parameters are used for each prepared statetment is called.&lt;br /&gt;To show SQL commands generaeted by Hibernate, we can normally use Hibernate config:&lt;br /&gt;&lt;code&gt;&lt;property name="hibernate.show_sql"&gt;true&lt;/property&gt;&lt;/code&gt;&lt;br /&gt;With this setting, Hibernate dumps all SQL it executed against DB as below:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;Hibernate: select device0_.iid as iid1_0_, device0_.iname as iname1_0_, device0_.iip as iip1_0_, device0_.iinfourl as iinfourl1_0_, device0_.istate as istate1_0_, device0_.irecordState as irecordS6_1_0_, device0_.idevlocation as idevloca7_1_0_ from ieai_device device0_ where device0_.iid=?&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;However, if you want to see what exact value is passed into the SQL statement, and further more, what result was returned from the SQL command, we need to do more.&lt;br /&gt;Basically we need to set log4j settings of the follow two Hibernate classes into DEBUG:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;org.hibernate.SQL&lt;br /&gt;org.hibernate.Type&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;So the log4j.properties file will have the following settings:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;log4j.logger.org.hibernate.SQL=DEBUG,console&lt;br /&gt;log4j.logger.org.hibernate.type=DEBUG,console&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then Hibernate will dump debug information as below:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;76033 [DEBUG] AbstractBatcher.log(): - select device0_.iid as iid1_0_, device0_.iname as iname1_0_, device0_.iip as iip1_0_, device0_.iinfourl as iinfourl1_0_, device0_.istate as istate1_0_, device0_.irecordState as irecordS6_1_0_, device0_.idevlocation as idevloca7_1_0_ from ieai_device device0_ where device0_.iid=?&lt;br /&gt;Hibernate: select device0_.iid as iid1_0_, device0_.iname as iname1_0_, device0_.iip as iip1_0_, device0_.iinfourl as iinfourl1_0_, device0_.istate as istate1_0_, device0_.irecordState as irecordS6_1_0_, device0_.idevlocation as idevloca7_1_0_ from ieai_device device0_ where device0_.iid=?&lt;br /&gt;76033 [DEBUG] NullableType.nullSafeSet(): - binding '3' to parameter: 1&lt;br /&gt;76043 [DEBUG] NullableType.nullSafeGet(): - returning 'Device3' as column: iname1_0_&lt;br /&gt;76044 [DEBUG] NullableType.nullSafeGet(): - returning '192.168.0.12' as column: iip1_0_&lt;br /&gt;76044 [DEBUG] NullableType.nullSafeGet(): - returning 'http://www.infolexllc.com/site/' as column: iinfourl1_0_&lt;br /&gt;76047 [DEBUG] NullableType.nullSafeGet(): - returning '1' as column: istate1_0_&lt;br /&gt;76047 [DEBUG] NullableType.nullSafeGet(): - returning '2' as column: irecordS6_1_0_&lt;br /&gt;76048 [DEBUG] NullableType.nullSafeGet(): - returning 'test device location' as column: idevloca7_1_0_&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;If you are a newbie in Hibernate, you will be amazed to see what is going on underneath by Hibernate, either in a positive and encouraging way or a very bad negative way.&lt;br /&gt;&lt;br /&gt;Cheers!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-8298646092842841890?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/QYEZavhS17o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/8298646092842841890/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=8298646092842841890" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/8298646092842841890?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/8298646092842841890?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/QYEZavhS17o/monitor-detailed-sql-transactions.html" title="Monitor detailed SQL transactions issued by Hibernate" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2009/05/monitor-detailed-sql-transactions.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcCQH09eyp7ImA9WxJREks.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-8042849265470519914</id><published>2009-05-13T21:19:00.002-04:00</published><updated>2009-05-13T21:21:01.363-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-13T21:21:01.363-04:00</app:edited><title>Customize Eclipse JVM in Mac</title><content type="html">On Windows, we can change eclipse.ini under eclipse folder to put extra parameters for JVM.&lt;br /&gt;On Mac, the ini file is located at:&lt;br /&gt;eclipse/Eclipse.app/Contents/MacOS/eclipse.ini&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-8042849265470519914?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/VreY9U3bcrI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/8042849265470519914/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=8042849265470519914" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/8042849265470519914?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/8042849265470519914?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/VreY9U3bcrI/customize-eclipse-jvm-in-mac.html" title="Customize Eclipse JVM in Mac" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2009/05/customize-eclipse-jvm-in-mac.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEAR3s8fSp7ImA9WxJSFEo.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-4535176231842083857</id><published>2009-05-04T11:30:00.004-04:00</published><updated>2009-05-04T18:04:06.575-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-04T18:04:06.575-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="dynamic ip" /><category scheme="http://www.blogger.com/atom/ns#" term="nsupdate" /><category scheme="http://www.blogger.com/atom/ns#" term="dns" /><category scheme="http://www.blogger.com/atom/ns#" term="centos" /><category scheme="http://www.blogger.com/atom/ns#" term="bind" /><title>How to bing dyanmic IP to a subdomain</title><content type="html">We have a server with dedicated IP address in my company's headquarter. There're a couple of branches at other locations. We need to setup servers in each branch and allow accessing to those servers through dedicated subdomain name. But we do not have static IP for those branches, so it's not possible to bind any IP in our DNS server at headquarter.&lt;br /&gt;&lt;br /&gt;If you have the same need as we are, here's what we did to resolve the problem.&lt;br /&gt;&lt;br /&gt;Basically we need to setup DNS Update service at branch site to perform remote DNS update to headquarter to update IP of subdomains used by branch site periodically, so headquarter's DNS will always know the correct IP of each branch server.&lt;br /&gt;&lt;br /&gt;For example, our main domain is infolexllc.com, and we need to setup a branch server at New York which will be called ny.infolexllc.com, here's what we do at servers at both ends (both CentOS 5.X):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;At branch site(where only dynamic IP is available):&lt;/span&gt;&lt;br /&gt;1. Install NS Update:&lt;br /&gt;&lt;pre&gt;yum install bind-utils&lt;/pre&gt;&lt;br /&gt;2. Create folder to hold related files and scripts:&lt;br /&gt;&lt;pre&gt;mkdir /root/nsupdate&lt;br /&gt;cd /root/nsupdate&lt;/pre&gt;&lt;br /&gt;3. create key files for NS update&lt;br /&gt;&lt;pre&gt;dnssec-keygen -a HMAC-MD5 -b 512 -n USER ny.infolexllc.com&lt;br /&gt;Kny.infolexllc.com.+157+47223&lt;/pre&gt;&lt;br /&gt;4. You should have two new files created under the current folder:&lt;br /&gt;&lt;pre&gt;Kny.infolexllc.com.+157+47223.key  Kny.infolexllc.com.+157+47223.private&lt;/pre&gt;&lt;br /&gt;5. create a new shell file: donsupdate.sh:&lt;br /&gt;&lt;script src=http://www.codetie.com/code.php?style=net_beans5.css&amp;id=100181&amp;height=400&gt;&lt;/script&gt;&lt;br /&gt;Make sure you change value of the script based-on your own environment.&lt;br /&gt;6. Open the newly generated key file Kny.infolexllc.com.+157+47223.key&lt;br /&gt;&lt;pre&gt;ny.infolexllc.com. IN KEY 0 3 157 QLwMCWdqUJ/ZOsOsdF4Dj/mYD2XwmqSrPL540JE3dwG7FXZwrJulOp16 Y0SySnfOo7+5s1mhZhUiAHxVOSoXnQ==&lt;/pre&gt;&lt;br /&gt;Remember the key string started from QlwMC.. all the way to the ending ==&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;On headquarter server:&lt;/span&gt;&lt;br /&gt;7. Modify named comnfiguration to allow remote DNS update from ny.infolexllc.com&lt;br /&gt;&lt;br /&gt;Open /etc/named.conf&lt;br /&gt;Find zone "infolexllc.com" {&lt;br /&gt;Insert the following section in the configuration file before the zone:&lt;br /&gt;key ny.infolexllc.com.{&lt;br /&gt;    algorithm hmac-md5;&lt;br /&gt;    secret "QLwMCWdqUJ/ZOsOsdF4Dj/mYD2XwmqSrPL540JE3dwG7FXZwrJulOp16 Y0SySnfOo7+5s1mhZhUiAHxVOSoXnQ==";&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;Insert the following lines at end of the infolexllc.com zone:&lt;br /&gt;        allow-update {&lt;br /&gt;                key  ny.infolexllc.com. ;&lt;br /&gt;                };&lt;br /&gt;&lt;br /&gt;Restart DNS server:&lt;br /&gt;&lt;pre&gt;/etc/init.d/named restart&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now the headquarter DNS server should allow remote DNS update from ny.infolexllc.com&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;On branch server:&lt;/span&gt;&lt;br /&gt;8. Test DNS update script:&lt;br /&gt;run &lt;pre&gt;donsupdate.sh&lt;/pre&gt;&lt;br /&gt;You should see messages like below:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Detected IP address is:123.123.123.123&lt;br /&gt;IP has been changed or one hour has been passed, save the flag and do update...&lt;br /&gt;Creating key...&lt;br /&gt;before getaddrinfo()&lt;br /&gt;Outgoing update query:&lt;br /&gt;;; -&gt;&gt;HEADER&lt;&lt;- opcode: UPDATE, status: NOERROR, id:      0&lt;br /&gt;;; flags: ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0&lt;br /&gt;;; UPDATE SECTION:&lt;br /&gt;ny.infolexllc.com. 0 ANY A &lt;br /&gt;ny.infolexllc.com. 84600 IN A 123.123.123.123&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Reply from update query:&lt;br /&gt;;; -&gt;&gt;HEADER&lt;&lt;- opcode: UPDATE, status: NOERROR, id:  25321&lt;br /&gt;;; flags: qr ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 1&lt;br /&gt;;; TSIG PSEUDOSECTION:&lt;br /&gt;ny.infolexllc.com. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 123123123123 300 16 ABCabcABCabc123+12aBcde== 25321 NOERROR 0 &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The status: NOERROR indicates a succeful update.&lt;br /&gt;If you see any other error in status, go check /var/log/messages on head quarter server to find clue.&lt;br /&gt;&lt;br /&gt;9. Test the new domain:&lt;br /&gt;&lt;pre&gt;ping ny.infolexllc.com&lt;/pre&gt;&lt;br /&gt;You should see the new domain can be resolved to the dynamic IP currently assigned to branch server.&lt;br /&gt;&lt;br /&gt;10. Once update script is working, you can create a cron job on branch server to run the script every 10 minutes. The script itself will check if IP has not been changed in the past hour, it will skip remote update.&lt;br /&gt;&lt;br /&gt;I've done this for our branch servers several times. It works very well so far. I hope this set up can help resolving your problem. Feel free to let me know f you have any feedback or question.&lt;br /&gt;&lt;br /&gt;Cheers!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-4535176231842083857?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/_nBTFH3eBX0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/4535176231842083857/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=4535176231842083857" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/4535176231842083857?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/4535176231842083857?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/_nBTFH3eBX0/how-to-bing-dyanmic-ip-to-subdomain.html" title="How to bing dyanmic IP to a subdomain" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2009/05/how-to-bing-dyanmic-ip-to-subdomain.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cMSHo_eSp7ImA9WxJTFEQ.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-1361050671765207876</id><published>2009-04-23T10:58:00.002-04:00</published><updated>2009-04-23T11:04:49.441-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-23T11:04:49.441-04:00</app:edited><title>How to match lines that does not start with certain string(s)</title><content type="html">I had a task to parse a huge log file and needed to pick up only those lines started with certain strings like:&lt;br /&gt;CPU_ALL&lt;br /&gt;ZZZZ&lt;br /&gt;etc.&lt;br /&gt;&lt;br /&gt;So I fired up Eclipse, opened the file, and opened Find/Replace dialog box. In the dialog, I tried to replace:&lt;br /&gt;&lt;pre&gt;^\b(?!CPU_ALL)(?!ZZZZ)\w+\b.*$&lt;/pre&gt;&lt;br /&gt;with &lt;br /&gt;&lt;pre&gt;Blank&lt;/pre&gt;&lt;br /&gt;So Eclipse find all strings that does not start with CPU_ALL nor ZZZZ and replaced those lines with space.&lt;br /&gt;&lt;br /&gt;I was able to do another Replace of ^\n$ with Blank, so all blank lines got removed. But some how Eclipse complaint I had incompatible end of lines. So I opened the text file with my favorite text editor Notepad++ and ran its "Remove blank lines" plugin to get the job done.&lt;br /&gt;&lt;br /&gt;The key here is &lt;br /&gt;&lt;pre&gt;(?!CPU_ALL)&lt;/pre&gt;&lt;br /&gt;which matches string that does not start with "CPU_ALL".&lt;br /&gt;And another &lt;pre&gt;(?!ZZZZ)&lt;/pre&gt; right after allows me to exclude another string.&lt;br /&gt;&lt;br /&gt;Cheers!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-1361050671765207876?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/cILIh7k4qpQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/1361050671765207876/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=1361050671765207876" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/1361050671765207876?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/1361050671765207876?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/cILIh7k4qpQ/how-to-match-lines-that-does-not-start.html" title="How to match lines that does not start with certain string(s)" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2009/04/how-to-match-lines-that-does-not-start.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EBQH86cSp7ImA9WxVUGEk.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-2851770893768688898</id><published>2009-03-23T16:51:00.002-04:00</published><updated>2009-03-23T16:54:11.119-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-23T16:54:11.119-04:00</app:edited><title>How to write a servlet filter</title><content type="html">Since you can call HttpServletResponse.getWriter() only once, it is a little bit tricky to add more output in servlet filter, because it is very likely your call to getWriter to be failed.&lt;br /&gt;&lt;br /&gt;Come examples about filter can be found at:&lt;br /&gt;http://download.oracle.com/docs/cd/A97329_03/web.902/a95878/filters.htm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-2851770893768688898?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/DDUQix6EEuc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/2851770893768688898/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=2851770893768688898" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/2851770893768688898?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/2851770893768688898?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/DDUQix6EEuc/how-to-write-servlet-filter.html" title="How to write a servlet filter" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2009/03/how-to-write-servlet-filter.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcNQnk8fCp7ImA9WxVUEkw.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-420807868094863623</id><published>2009-03-16T09:49:00.002-04:00</published><updated>2009-03-16T10:01:33.774-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-16T10:01:33.774-04:00</app:edited><title>Tips on svnmailer</title><content type="html">svnmailer is a great tool to help admin monitor changes made in SVN repositories.&lt;br /&gt;There're zillions of nice articles/docs on how to config it. So I won't bother adding one more here.&lt;br /&gt;Only a couple of tips that I hope can help myself and you trouble-shooting it:&lt;br /&gt;&lt;br /&gt;1. To remove =3D kind of characters in email&lt;br /&gt;Looks like the current version of svnmailer (1.08x) and Python 2.4.3 will generate characters like =3D to replace special character = in the notification email. This is caused by the default encoding used by svnmailer (quoted-printable). The quick fix is to set it to utf8.&lt;br /&gt;To apply the quick fix, open mailer.conf file, put the following setting in &lt;b&gt;[defaults]&lt;/b&gt; section:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;mail_transfer_encoding = 8bit&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;2. To test svnmailer without really committing anything into the repository:&lt;br /&gt;After your configured svnmailer, you probably want to test the settings, but do not want to really commit anything into the repository. A quick command, which was actually suggested by svnmailer doc, is:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;sudo -u apache ./post-commit [Repo Path] [Ver No.]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;e.g.:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;sudo -u apache ./post-commit /var/svn/2009 55&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;will send notification of change 55 of repository /var/svn/2009 to the designated email address.&lt;br /&gt;&lt;br /&gt;Cheers!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-420807868094863623?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/wFHAebSa4VE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/420807868094863623/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=420807868094863623" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/420807868094863623?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/420807868094863623?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/wFHAebSa4VE/tips-on-svnmailer.html" title="Tips on svnmailer" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2009/03/tips-on-svnmailer.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUABR3wycCp7ImA9WxVWFE8.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-5336634483058410825</id><published>2009-02-23T17:04:00.000-05:00</published><updated>2009-02-23T17:22:36.298-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-23T17:22:36.298-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="virtualmin" /><category scheme="http://www.blogger.com/atom/ns#" term="apache" /><category scheme="http://www.blogger.com/atom/ns#" term="nagios" /><title>Nagios killed all web sites created by virtualmin</title><content type="html">I have a bunch of domains running on a Linux box. They are managed by &lt;a href="http://www.virtualmin.com/"&gt;VirtualMin&lt;/a&gt;. Each site has its own user name, group and home folder.&lt;br /&gt;For example, site &lt;a href="http://www.infolexllc.com"&gt;www.infolexllc.com&lt;/a&gt; under VirtualMin has user name and groups infolex as well as home folder /home/infolex.&lt;br /&gt;The document root of the site is /home/infolex/public_html.&lt;br /&gt;Everything was working great until I installed Nagios, hoping it could help me monitor status of my server.&lt;br /&gt;But after Nagios was installed, all my sites on this server became unaccessible. when I pointed my browser to:&lt;br /&gt;http://www.infolexllc.com&lt;br /&gt;I got 403 error saying there's no permission to access the site.&lt;br /&gt;&lt;br /&gt;I remember I ran into similar issue on a client's server before. So I found log I wrote down about two years ago. Looks like Nagios somehow removed user apache from group apache. Therefore, Apache server lost access right to website's document root which was owned by apache.apache.&lt;br /&gt;&lt;br /&gt;So I guess similar thing must happened to my server also. I checked owner of /home/infolex/public_html, it's infolex.infolex.&lt;br /&gt;&lt;br /&gt;I check groups apache belongs to, they are:&lt;br /&gt;&lt;pre&gt;apache, nagois, nagiocmd&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So I added apache back top group infolex by:&lt;br /&gt;&lt;pre&gt;/usr/sbin/usermod -a -G infolex apache&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I did the same to all other virtual hosts on the same server.&lt;br /&gt;&lt;br /&gt;Then restart Apache. Everything is back to work!&lt;br /&gt;&lt;br /&gt;I'm still having problem with Nagois itself so far. Will post more if I ran into anything worth to share.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-5336634483058410825?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/6j0wbVnFxpc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/5336634483058410825/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=5336634483058410825" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/5336634483058410825?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/5336634483058410825?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/6j0wbVnFxpc/nagois-killed-all-web-sites-created-by.html" title="Nagios killed all web sites created by virtualmin" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2009/02/nagois-killed-all-web-sites-created-by.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cASXYzeSp7ImA9WxVXF0Q.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-4598211051283298064</id><published>2009-02-16T10:40:00.000-05:00</published><updated>2009-02-16T10:44:08.881-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-16T10:44:08.881-05:00</app:edited><title>Google Gear slows down WIFI?!</title><content type="html">Man! if you read my previous post, you already know I have been fighting WIFI slowness on my Mac for many days.&lt;br /&gt;&lt;br /&gt;I installed a 16Mbps Comcast business broadband service about two weeks ago. Since then, I noticed my MacBook Pro's WIFI speed drops down to only 100Kbps almost all the time. It's only good for a very short period of time after I restart router, blindly changed some setting on my MacBook Pro or router.&lt;br /&gt;There were many times I thought the problem got resolved, I even posted a BLOG to celebrate it :). But after a few more minutes, the problem always comes back! My hair got almost pulled out completely and my mind became crazy!&lt;br /&gt;&lt;br /&gt;Finally from last night, I noticed ping time in my network was very unreliable:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;64 bytes from 192.168.0.5: icmp_seq=1757 ttl=64 time=0.933 ms&lt;br /&gt;64 bytes from 192.168.0.5: icmp_seq=1758 ttl=64 time=1095.138 ms&lt;br /&gt;64 bytes from 192.168.0.5: icmp_seq=1759 ttl=64 time=102.211 ms&lt;br /&gt;64 bytes from 192.168.0.5: icmp_seq=1760 ttl=64 time=1451.482 ms&lt;br /&gt;64 bytes from 192.168.0.5: icmp_seq=1761 ttl=64 time=467.000 ms&lt;br /&gt;64 bytes from 192.168.0.5: icmp_seq=1762 ttl=64 time=1859.467 ms&lt;br /&gt;64 bytes from 192.168.0.5: icmp_seq=1763 ttl=64 time=861.624 ms&lt;br /&gt;64 bytes from 192.168.0.5: icmp_seq=1764 ttl=64 time=1.828 ms&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I started thinking maybe I should try close all application one at a time and see if any of them had any impact on the thing.&lt;br /&gt;So I left a terminal open, with ping running, so I could see change of ping speed. At the same time, I started to close applications I run, such as Adium, Skype, Firefox... Wait! after Firefox was close, the ping speed turned back to a normal range:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;64 bytes from 192.168.0.5: icmp_seq=453 ttl=64 time=2.267 ms&lt;br /&gt;64 bytes from 192.168.0.5: icmp_seq=454 ttl=64 time=1.001 ms&lt;br /&gt;64 bytes from 192.168.0.5: icmp_seq=455 ttl=64 time=1.004 ms&lt;br /&gt;64 bytes from 192.168.0.5: icmp_seq=456 ttl=64 time=0.987 ms&lt;br /&gt;64 bytes from 192.168.0.5: icmp_seq=457 ttl=64 time=1.197 ms&lt;br /&gt;64 bytes from 192.168.0.5: icmp_seq=458 ttl=64 time=1.008 ms&lt;br /&gt;64 bytes from 192.168.0.5: icmp_seq=459 ttl=64 time=1.245 ms&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It got be Firefox! &lt;br /&gt;&lt;br /&gt;Then another question comes back. Why did Firefox behave pretty good before? And I cannot live without it.&lt;br /&gt;&lt;br /&gt;That's when I realized I installed GoogleGear to enable offline access to my gmail account almost the same time when I installed Comcast. Could that plugin be a problem? Easy to know. I removed this plugin. And everything is back to normal, even with Firefox running! I enabled/disabled it many times just to confirm. And looks like &lt;strong&gt;IT WAS GOOGLEGEAR THAT CAUSED ALL MY HAIR-LOSS!&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I will report the problem to our google friend. In the mean time, in case you are losing your hair as I was. Hope this post helps.&lt;br /&gt;&lt;br /&gt;Li&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-4598211051283298064?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/qVCYaU6cOHI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/4598211051283298064/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=4598211051283298064" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/4598211051283298064?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/4598211051283298064?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/qVCYaU6cOHI/google-gear-slows-down-wifi.html" title="Google Gear slows down WIFI?!" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2009/02/google-gear-slows-down-wifi.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEDSHs4fyp7ImA9WxVXE08.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-8079960705465115407</id><published>2009-02-10T20:43:00.000-05:00</published><updated>2009-02-10T22:24:39.537-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-10T22:24:39.537-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="dns" /><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><category scheme="http://www.blogger.com/atom/ns#" term="wifi" /><title>WIFI slowness of my Macbook Pro</title><content type="html">My Macbook Pro (2007 edition)'s WIFI turned to be very slow recently. Speed test (http://www.speedtest.net) sometime report only 10K download while I have 15M Comcast broadband.&lt;br /&gt;I struggled many days and tried different ways I could imagine, even bough a new router, problem still unresolved.&lt;br /&gt;&lt;br /&gt;Today, I tried to check /var/log/system.log and found lots of error messages like:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Feb  9 01:10:06 li-mac-2 mDNSResponder[22]: AppendDNSNameString: Illegal empty label in name "."&lt;br /&gt;Feb  9 01:10:06 li-mac-2 mDNSResponder[22]: RegisterSplitDNS: bad domain .&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then I Googled the keywords:&lt;strong&gt;mDNSResponder[22]: RegisterSplitDNS: bad domain .&lt;/strong&gt; and found a hint at:&lt;br /&gt;&lt;a href="http://discussions.apple.com/message.jspa?messageID=6911574"&gt;http://discussions.apple.com/message.jspa?messageID=6911574&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Followed suggestion from the site, I finally managed to resolve my issue. Since the DNS error msg is gone, my MacBook Pro could do 14Mbps on wifi.&lt;br /&gt;&lt;br /&gt;Here's summary of what I did:&lt;br /&gt;1. run scutil --dns and saw something like:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;DNS configuration&lt;br /&gt;&lt;br /&gt;resolver #1&lt;br /&gt;  nameserver[0] : 192.168.0.1&lt;br /&gt;  order   : 200000&lt;br /&gt;&lt;br /&gt;resolver #2&lt;br /&gt;domain : .&lt;br /&gt;options : pdns&lt;br /&gt;timeout : 5&lt;br /&gt;order : 150000&lt;br /&gt;&lt;br /&gt;resolver #3&lt;br /&gt;  domain : local&lt;br /&gt;  options : mdns&lt;br /&gt;  timeout : 2&lt;br /&gt;  order   : 300000&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;2. Open Keychain Access&lt;br /&gt;3. Click on System at left side&lt;br /&gt;4. Find and delete item named &lt;strong&gt;DNS Key&lt;/strong&gt;&lt;br /&gt;5. Reboot&lt;br /&gt;6. Problem resolved!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-8079960705465115407?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/3G8RJtTVXqc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/8079960705465115407/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=8079960705465115407" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/8079960705465115407?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/8079960705465115407?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/3G8RJtTVXqc/wifi-slowness-of-my-macbook-pro.html" title="WIFI slowness of my Macbook Pro" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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>4</thr:total><feedburner:origLink>http://li-ma.blogspot.com/2009/02/wifi-slowness-of-my-macbook-pro.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UFR3ozfSp7ImA9WxVRF04.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-7886080810774421075</id><published>2009-01-23T14:24:00.000-05:00</published><updated>2009-01-23T14:33:36.485-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-23T14:33:36.485-05:00</app:edited><title>Thread-safe singlton instantiation</title><content type="html">Very often that we need to get instance of a single which is initialized Lazily, meaning only when it is first be needed.&lt;br /&gt;&lt;br /&gt;What we normally do is:&lt;br /&gt;&lt;br /&gt;&lt;script src=http://www.codetie.com/code.php?style=net_beans5.css&amp;id=100006&amp;height=400&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;After reading a scary article about Java memory model, I realized this code does not always work in a multi-threaded environment:&lt;br /&gt;http://www.ibm.com/developerworks/library/j-jtp03304/&lt;br /&gt;and&lt;br /&gt;http://www.ibm.com/developerworks/java/library/j-jtp02244.html&lt;br /&gt;and&lt;br /&gt;http://www.javaworld.com/jw-02-2001/jw-0209-double.html&lt;br /&gt;&lt;br /&gt;The idea is complicated, but to describe it in a simple sentence, I would say:&lt;br /&gt;&lt;i&gt;Because modern compiler might reorder execution sequence of the commands, the code might fail under certain hardware/software environment.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;So a safer solution is:&lt;br /&gt;&lt;script src=http://www.codetie.com/code.php?style=net_beans5.css&amp;id=100007&amp;height=400&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;Because JVM guarantee initialization and execution order static inner classes, this solution is not only safe, but also faster than using &lt;code&gt;volatile&lt;/code&gt; or &lt;code&gt;synchronized&lt;/code&gt; keywords.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-7886080810774421075?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/Zz8JcLowrnY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/7886080810774421075/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=7886080810774421075" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/7886080810774421075?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/7886080810774421075?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/Zz8JcLowrnY/thread-safe-singlton-instantiation.html" title="Thread-safe singlton instantiation" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2009/01/thread-safe-singlton-instantiation.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEIMQHg8eCp7ImA9WxVRFk4.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-5164031266088092943</id><published>2009-01-22T10:01:00.000-05:00</published><updated>2009-01-22T10:03:01.670-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-22T10:03:01.670-05:00</app:edited><title>Javascript compressors</title><content type="html">I ran into a nice websites that compares JS compressors on the fly. Cool stuff. So I write down here as a reference for myself, and you, just in case:&lt;br /&gt;http://compressorrater.thruhere.net/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-5164031266088092943?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/rU2BIlQRBak" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/5164031266088092943/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=5164031266088092943" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/5164031266088092943?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/5164031266088092943?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/rU2BIlQRBak/javascript-compressors.html" title="Javascript compressors" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2009/01/javascript-compressors.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8BR3Y7cCp7ImA9WxVSGUk.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-1563877073385665991</id><published>2009-01-14T09:35:00.000-05:00</published><updated>2009-01-14T09:37:36.808-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-14T09:37:36.808-05:00</app:edited><title>Style check for Javascript files</title><content type="html">Like PMD/StyleCheck for Java, I finally found a tool to perform coding style check and also to find common mistakes from JavaScript files:&lt;div&gt;http://www.javascriptlint.com&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Check their sample and doc for details. It's not so comprehensive/powerful as PMD/StyleCheck, but should be a good start for JS.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-1563877073385665991?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/479n3ZamiXw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/1563877073385665991/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=1563877073385665991" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/1563877073385665991?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/1563877073385665991?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/479n3ZamiXw/style-check-for-javascript-files.html" title="Style check for Javascript files" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2009/01/style-check-for-javascript-files.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcNQHw9eyp7ImA9WxVSF0w.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-1085541289143538116</id><published>2009-01-11T18:49:00.000-05:00</published><updated>2009-01-11T18:54:51.263-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-11T18:54:51.263-05:00</app:edited><title>Change default Java version on Mac</title><content type="html">The default Java on Mac (as of today) is 1.5.&lt;br /&gt;I went to Apple's site and downloaded 1.5 update which includes 1.6 64bit. But the download page specifically said it does not change Mac's default setting.&lt;br /&gt;In order to use the new Java 1.6 as the default JVM, need to do the following after the update is downloaded and installed:&lt;br /&gt;&lt;br /&gt;1. Run /Aplication/Utilities/Java/Java Preferences&lt;br /&gt;This is screen on my MacBookPro:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_UPINbBj2TGo/SWqGZQJT2oI/AAAAAAAAAsw/80vfkNCq1d0/s1600-h/Picture+1.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 218px;" src="http://1.bp.blogspot.com/_UPINbBj2TGo/SWqGZQJT2oI/AAAAAAAAAsw/80vfkNCq1d0/s320/Picture+1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5290188480688937602" /&gt;&lt;/a&gt;&lt;br /&gt;2. Click and drag Jave SE 6 64-bit to top of both list, and exit the program.&lt;br /&gt;&lt;br /&gt;Now open a terminal, run&lt;br /&gt;&lt;pre&gt;java -version&lt;/pre&gt;&lt;br /&gt;The result should be:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;java version "1.6.0_07"&lt;br /&gt;Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)&lt;br /&gt;Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-1085541289143538116?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/bAAbZyDjteU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/1085541289143538116/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=1085541289143538116" title="15 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/1085541289143538116?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/1085541289143538116?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/bAAbZyDjteU/change-default-java-version-on-mac.html" title="Change default Java version on Mac" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_UPINbBj2TGo/SWqGZQJT2oI/AAAAAAAAAsw/80vfkNCq1d0/s72-c/Picture+1.png" height="72" width="72" /><thr:total>15</thr:total><feedburner:origLink>http://li-ma.blogspot.com/2009/01/change-default-java-version-on-mac.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIDSXk8fip7ImA9WxVTGEk.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-8052186856710261737</id><published>2009-01-01T15:04:00.000-05:00</published><updated>2009-01-01T15:09:38.776-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-01T15:09:38.776-05:00</app:edited><title>RAR command line - to exclude files and folders</title><content type="html">After many try&amp;fail, I finally figured how to exclude files and subfolders when archiving with RAR command line.&lt;br /&gt;Basically I tried to archive a folder with .svn subfolders. I definitely want to exclude them from the archive. But when I tried:&lt;br /&gt;&lt;pre&gt;rar a -r -x.svn myarchive &lt;/pre&gt;&lt;br /&gt;It did not exclude any .svn folders in second or deeper level of folder hierarchy.&lt;br /&gt;Now the correct way is:&lt;br /&gt;&lt;pre&gt;rar a -r  -x.svn -x*/.svn -x*/.svn/* -x*/anotherSubFolder -x*/anotherSubFolder/* myarchive&lt;/pre&gt;&lt;br /&gt;It will exclude all folder and subfolders with name .svn or anotherSubFolder.&lt;br /&gt;Happy Year 2009!&lt;br /&gt;&lt;br /&gt;Li&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-8052186856710261737?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/wyfz2RsH7p0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/8052186856710261737/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=8052186856710261737" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/8052186856710261737?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/8052186856710261737?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/wyfz2RsH7p0/rar-command-line-to-exclude-files-and.html" title="RAR command line - to exclude files and folders" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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>3</thr:total><feedburner:origLink>http://li-ma.blogspot.com/2009/01/rar-command-line-to-exclude-files-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4NRX09fSp7ImA9WxVTEU8.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-3679798774487314732</id><published>2008-12-24T09:25:00.000-05:00</published><updated>2008-12-24T09:29:54.365-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-24T09:29:54.365-05:00</app:edited><title>Why do we do final in Java?</title><content type="html">Noticed lots of nice opensource code and Java style checker suggested to use &lt;span style="font-weight:bold;"&gt;final&lt;/span&gt; and &lt;span style="font-weight:bold;"&gt;static&lt;/span&gt; as much as possible.&lt;br /&gt;I kinda understand why to use static, especially for methods, but not sure why final will help.&lt;br /&gt;After a bit of google, I found the following claim at:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;http://www.javaperformancetuning.com/tips/final.shtml#REF1&lt;br /&gt;&lt;br /&gt;From: http://www.protomatter.com/nate/java-optimization/&lt;br /&gt;Various tips. (Page last updated 1999?, Added 2000-10-23, Author Nate Sammons, Publisher Sammons). Tips:&lt;br /&gt;&lt;br /&gt;Method call times: static 220ns; final 300ns; instance 550ns; interface methods 750ns; synchronized methods 1,500ns. [But times vary enormously depending on the VM and context].&lt;br /&gt;Use static final methods where possible. [And do functional programming too ;-)]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Since the note was added around 1999 and 2000, I'm wondering it still stand true or not.&lt;br /&gt;&lt;br /&gt;Now matter what, I will try my best to apply this policy to my code. But if anyone can explain why to me, it will make me feel much better.&lt;br /&gt;&lt;br /&gt;Thanks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-3679798774487314732?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/6fwu1ntw_QE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/3679798774487314732/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=3679798774487314732" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/3679798774487314732?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/3679798774487314732?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/6fwu1ntw_QE/why-do-we-do-final-in-java.html" title="Why do we do final in Java?" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2008/12/why-do-we-do-final-in-java.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcERHY7eip7ImA9WxRVE0k.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-8840874402653522415</id><published>2008-11-10T13:31:00.001-05:00</published><updated>2008-11-10T13:33:25.802-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-10T13:33:25.802-05:00</app:edited><title>Create free ringtune for iPhone</title><content type="html">I got my iPhone for over 4 months now, and one of the biggest problem (beside of my love on it) is my favorite Ringtones in my previous phones cannot be installed on it.&lt;br /&gt;&lt;br /&gt;Finally I ran into a site today and found the working, easy and free way to upload my ringtones:&lt;br /&gt;http://www.ismashphone.com/2008/08/ringtone-iphone.html&lt;br /&gt;&lt;br /&gt;The key is actually to use a free service provided by:&lt;br /&gt;http://audiko.net&lt;br /&gt;&lt;br /&gt;Great tool and thank you very much for sharing with us!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-8840874402653522415?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/XnR_7vxdoxk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/8840874402653522415/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=8840874402653522415" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/8840874402653522415?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/8840874402653522415?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/XnR_7vxdoxk/create-free-ringtune-for-iphone.html" title="Create free ringtune for iPhone" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2008/11/create-free-ringtune-for-iphone.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAESXs8fSp7ImA9WxVREEo.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-9131921025017738334</id><published>2008-10-23T23:28:00.000-04:00</published><updated>2009-01-15T21:25:08.575-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-15T21:25:08.575-05:00</app:edited><title>Pidgin log file to Adium log converter</title><content type="html">Because I'm a business owner, need to keep in touch with many of my clients, partners and employees with all different kinds of IMs(MSN, Yahoo, AIM, GTalk, Jabber, etc.). I have been using Pidgin(both Windows and Linux) to work as my All-in-one IM clients for many many years, and accumulated tons of log files through Pidgin's html log plugin. And those logs are invaluable asset to me and my business.&lt;br /&gt;&lt;br /&gt;I switched to Mac in the past year and use Adium (http://www.adiumx.com/) to handle my multiple IM accounts. But I was never able to find a way to convert my Pidgin logs to Adium.&lt;br /&gt;&lt;br /&gt;So I finally decided to write one myself. The script is written in PHP, you need to modify some configuration parameters before it is executed:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$srcDir= Where the original Pidgin log files and folders are located&lt;br /&gt;$destDir= Where to save converted Adium log files to&lt;br /&gt;$masterAlias=array("Li","Li Ma","马力");//List all Alias names you ever used in all different IM accounts and in history. Very important to make conversions right&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Once the script is configured, you can run it by:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;php adium_convert.php&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;A log file will also be created when error occurs.&lt;br /&gt;&lt;br /&gt;You also need to copy converted Adium logs to where your current Adium's log folder, which is normally:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;~/Library/Application\ Support/Adium\ 2.0/Users/Default/Logs/&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The complete code is:&lt;br /&gt;&lt;br /&gt;&lt;script src=http://www.codetie.com/code.php?style=city_lights.css&amp;id=100004&amp;height=400&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;The script was designed to resolve my issues first. Since we have to convert Pidgin log from html format, which is not very well formatted all the time, this converter might not work 100% for your case. It took me many days to make it work for all my log files. So please make sure you verify the converted log files after you run the script. Also make sure you keep the origina log files just in case.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;br /&gt;&lt;br /&gt;Li&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-9131921025017738334?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/mjtvsSlwckw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/9131921025017738334/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=9131921025017738334" title="34 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/9131921025017738334?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/9131921025017738334?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/mjtvsSlwckw/pidgin-log-file-to-adium-log-converter.html" title="Pidgin log file to Adium log converter" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2008/10/pidgin-log-file-to-adium-log-converter.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IDR3gzeyp7ImA9WxRaFEk.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-7138924200483867573</id><published>2008-10-05T10:00:00.000-04:00</published><updated>2008-12-16T11:39:36.683-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-16T11:39:36.683-05:00</app:edited><title>Check object that has been locked in Oracle</title><content type="html">select oracle_username,object_id,session_id from v$locked_object;&lt;br /&gt;select object_name from dba_objects where object_id = &lt;the&gt;;&lt;br /&gt;&lt;br /&gt;&lt;the&gt; is the id of object that was returned from the first query.&lt;br /&gt;&lt;br /&gt;Or to combine them into one script:&lt;br /&gt;select l.oracle_username,l.object_id, object_name, l.session_id  from v$locked_object l, dba_objects where dba_objects.object_id = l.object_id;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-7138924200483867573?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/_pJ0JqPoNhM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/7138924200483867573/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=7138924200483867573" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/7138924200483867573?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/7138924200483867573?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/_pJ0JqPoNhM/check-object-that-has-been-locked-in.html" title="Check object that has been locked in Oracle" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2008/10/check-object-that-has-been-locked-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08AQn8ycSp7ImA9WxdQGUk.&quot;"><id>tag:blogger.com,1999:blog-3217705202527179342.post-8079344179164168486</id><published>2008-06-20T03:05:00.000-04:00</published><updated>2008-06-20T03:10:43.199-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-20T03:10:43.199-04:00</app:edited><title>Allow Linux box in intranet to access internet via a gateway server</title><content type="html">I have three servers in a intranet environment. One(A) can access internet directly. Others(B andC) are connected to A.&lt;br /&gt;&lt;br /&gt;In order to allow B and C access internet, do the following settings:&lt;br /&gt;1. vi /etc/resolve.conf&lt;br /&gt;Add the following text in it:&lt;br /&gt;&lt;pre&gt;nameserver &amp;lt;a's IP&amp;gt;&lt;/pre&gt;&lt;br /&gt;2. vi /etc/sysconfig/network&lt;br /&gt;Add&lt;br /&gt;&lt;pre&gt;GATEWAY= &amp;lt;a's IP&amp;gt;&lt;/pre&gt;&lt;br /&gt;3. Run /etc/init.d/network restart&lt;br /&gt;&lt;br /&gt;Do the three steps on both B and C. Then they should both be able to access internet.&lt;br /&gt;Try it by ping yahoo.com.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3217705202527179342-8079344179164168486?l=li-ma.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/MLyT/~4/3mxUJ6MrGEE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://li-ma.blogspot.com/feeds/8079344179164168486/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3217705202527179342&amp;postID=8079344179164168486" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/8079344179164168486?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3217705202527179342/posts/default/8079344179164168486?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/MLyT/~3/3mxUJ6MrGEE/allow-linux-box-in-intranet-to-access.html" title="Allow Linux box in intranet to access internet via a gateway server" /><author><name>Li Ma</name><uri>http://www.blogger.com/profile/06928876072731845880</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><feedburner:origLink>http://li-ma.blogspot.com/2008/06/allow-linux-box-in-intranet-to-access.html</feedburner:origLink></entry></feed>

