<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4653070451761456668</id><updated>2012-02-29T15:01:56.907-08:00</updated><category term='.net Remoting'/><category term='MOD_JK'/><category term='Oracle Coherence'/><category term='postgresql'/><category term='Asp.net 4.0'/><category term='Free Tools'/><category term='tutorial'/><category term='SoapUI'/><category term='IPAD'/><category term='Java Performance / JMX / JConsole'/><category term='Lucene;solr;'/><category term='WCF/ASMX TEST'/><category term='Open Source Solution'/><category term='hadoop'/><category term='Nutch'/><category term='Utility'/><category term='linux;putty;ssh'/><category term='SOAPUI;SOAPBox'/><category term='windows Management'/><category term='Tomcat'/><category term='Windows Phone 7'/><category term='tika'/><category term='Windbg'/><category term='WCF'/><category term='IIS 7/7.5'/><category term='j233'/><category term='SqlServer 2008 R2'/><category term='GreenPlum'/><category term='StreamInsight'/><category term='varnish'/><category term='solr;nutch'/><category term='Android'/><category term='Solr'/><category term='J2EE'/><category term='Troubleshotting'/><category term='32/64 Bit Programming'/><category term='Silverlight'/><category term='Cassandra'/><category term='Windows 7'/><title type='text'>My Note on Solutions.</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default?start-index=101&amp;max-results=100'/><author><name>Ryan DH</name><uri>https://profiles.google.com/114235205473318658504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-g3Iv2NzEol4/AAAAAAAAAAI/AAAAAAAAACA/IsxVgJOKp9s/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>166</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-8813167364432936868</id><published>2012-02-29T15:01:00.001-08:00</published><updated>2012-02-29T15:01:57.011-08:00</updated><title type='text'>Crystal report, A generic error occurred in GDI+</title><content type='html'>&lt;p&gt;one day, some app server has the error to render the asp.net Crystal report. It’s a server side problem, So run a debug and attach to the server side w3wp. turn on unhandled exception.    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="661"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#987656" valign="top" width="659"&gt;           &lt;p&gt;mdbg&amp;gt; ca ex              &lt;br /&gt;mdbg&amp;gt; a 2876               &lt;br /&gt;[p#:0, t#:75] mdbg&amp;gt; g               &lt;br /&gt;STOP: Exception thrown               &lt;br /&gt;Exception=System.Runtime.InteropServices.ExternalException               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _className=&amp;lt;null&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _exceptionMethod=&amp;lt;null&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _exceptionMethodString=&amp;lt;null&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _message=&amp;quot;&lt;font color="#ff0000"&gt;&lt;strong&gt;A generic error occurred in GDI+.&amp;quot;&lt;/strong&gt;&lt;/font&gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _data=&amp;lt;null&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _innerException=&amp;lt;null&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _helpURL=&amp;lt;null&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _stackTrace=array [20]               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _watsonBuckets=&amp;lt;null&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _stackTraceString=&amp;lt;null&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _remoteStackTraceString=&amp;lt;null&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _remoteStackIndex=0               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _dynamicMethods=&amp;lt;null&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _HResult=-2147467259               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _source=&amp;lt;null&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _xptrs=0               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _xcode=-532462766               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _ipForWatsonBuckets=2066954414               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _safeSerializationManager=System.Runtime.Serialization.SafeSerializatio               &lt;br /&gt;Manager               &lt;br /&gt;IP: 210 @ System.Drawing.Image.Save - MAPPING_APPROXIMATE               &lt;br /&gt;[p#:0, t#:75] mdbg&amp;gt; w               &lt;br /&gt;Thread [#:75]               &lt;br /&gt;*0. System.Drawing.Image.Save (source line information unavailable)               &lt;br /&gt;1. System.Drawing.Image.Save (source line information unavailable)               &lt;br /&gt;2. CrystalDecisions.Web.HtmlReportRender.ImageObjectRender.SaveImage (source l               &lt;br /&gt;ne information unavailable)&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;then keep going, you will find the foder there, it’s the cr engine which trys to save some file locally.     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-YjZjTs6VCY0/T06uYlCdfCI/AAAAAAAAAKM/S7kEZ-tYj5A/s1600-h/image4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-k0gSkGQTDpc/T06uZAxaQQI/AAAAAAAAAKU/MKt8QjOI_vA/image_thumb2.png?imgmax=800" width="644" height="570" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;then Just check this temp folder to see whether the folder is accessible? whether the app has the access. for this case,     &lt;br /&gt;NObody can access this folder now. so that’s the root case.     &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-8813167364432936868?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/8813167364432936868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=8813167364432936868&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/8813167364432936868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/8813167364432936868'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2012/02/crystal-report-generic-error-occurred.html' title='Crystal report, A generic error occurred in GDI+'/><author><name>Ryan DH</name><uri>https://profiles.google.com/114235205473318658504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-g3Iv2NzEol4/AAAAAAAAAAI/AAAAAAAAACA/IsxVgJOKp9s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/-k0gSkGQTDpc/T06uZAxaQQI/AAAAAAAAAKU/MKt8QjOI_vA/s72-c/image_thumb2.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-457970681821699588</id><published>2012-02-27T11:40:00.001-08:00</published><updated>2012-02-27T11:40:48.475-08:00</updated><title type='text'>Cordbg for .net 4.0</title><content type='html'>&lt;p&gt;I have been using the Cordbg for a while, it works pretty great. just zip those 2 files and drop it to the server, you can do the production debugging.    &lt;br /&gt;    &lt;br /&gt;now, some app has been switched to 4.0 , I need to get the 4.0 cordbg, googled a lot, can’t find it. and it turns on cordbg for .net 4.0 is out, the alternative is MDBG.&lt;/p&gt;  &lt;p&gt;it’s located in&amp;#160; C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\x64   &lt;br /&gt;&amp;#160;&amp;#160; just 3 files beside the .net fx are required to run.    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-9SAVfOqb-0c/T0vcLhv2PII/AAAAAAAAAJc/_Mg0NYYvwMQ/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-qUWEGZAbhos/T0vcMEE-7AI/AAAAAAAAAJk/Yu420OBRPuU/image_thumb%25255B2%25255D.png?imgmax=800" width="623" height="70" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;you can do the same as cordbg, the syntax is most same. Mdbg has more enhancement.    &lt;br /&gt;Mdbg has more conditional breakpoint settings,    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-ZohXVzMSRhg/T0vcM9IEbRI/AAAAAAAAAJs/Sh5jpUJ5CJc/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-LGHyzNeWBP0/T0vcNt4ybDI/AAAAAAAAAJ0/WquZ1n68pSk/image_thumb%25255B5%25255D.png?imgmax=800" width="627" height="209" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;More support for threading and concurrent app troubleshooting.    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-hNEA69QlN8Y/T0vcO9oqPhI/AAAAAAAAAJ8/zDQ-u483s_c/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-cuxhU5JxaOk/T0vcP_gmDsI/AAAAAAAAAKE/PFj4Ipx9ph4/image_thumb%25255B8%25255D.png?imgmax=800" width="611" height="657" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;So no cordbg anymore, try mdbg instead. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-457970681821699588?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/457970681821699588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=457970681821699588&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/457970681821699588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/457970681821699588'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2012/02/cordbg-for-net-40.html' title='Cordbg for .net 4.0'/><author><name>Ryan DH</name><uri>https://profiles.google.com/114235205473318658504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-g3Iv2NzEol4/AAAAAAAAAAI/AAAAAAAAACA/IsxVgJOKp9s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/-qUWEGZAbhos/T0vcMEE-7AI/AAAAAAAAAJk/Yu420OBRPuU/s72-c/image_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-9015896205941151893</id><published>2012-02-24T11:33:00.001-08:00</published><updated>2012-02-24T11:33:53.066-08:00</updated><title type='text'>Install JD GUI eclipse add-in for Eclipse 3.7 timeout</title><content type='html'>&lt;p&gt;Downloaded new eclipse 3.7 and try to install the new plugin JD-GUI,    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-69Hq6Z3z2Vg/T0fmACR5LHI/AAAAAAAAAIs/fWiO9Cuni6g/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-NP3aOQv-eP8/T0fmBqKOOTI/AAAAAAAAAI0/JKwboT_7hAQ/image_thumb%25255B2%25255D.png?imgmax=800" width="809" height="598" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;get the following screen, and it get sucked there,   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-Qe45OjNppnQ/T0fmDR_Iy5I/AAAAAAAAAI8/iKVOXQ7oZ9Y/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-kn43bQd_VQY/T0fmFppZFsI/AAAAAAAAAJE/JubO9F7LJJY/image_thumb%25255B5%25255D.png?imgmax=800" width="814" height="588" /&gt;&lt;/a&gt;    &lt;br /&gt;it keep trying different URl to download Content.jar,    &lt;br /&gt;the fix is cancel the installation, and uncheck the evil option “Contact all updates sites during install to find required software”    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-UqNZ70h5j_w/T0fmGYyjsTI/AAAAAAAAAJM/81AQARBqgLw/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-bk9txEPBUg4/T0fmHlGE8-I/AAAAAAAAAJU/c9_ktKs6C_o/image_thumb%25255B8%25255D.png?imgmax=800" width="739" height="553" /&gt;&lt;/a&gt;    &lt;br /&gt;then the installation will go through quickly. that’s it.     &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-9015896205941151893?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/9015896205941151893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=9015896205941151893&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/9015896205941151893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/9015896205941151893'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2012/02/install-jd-gui-eclipse-add-in-for.html' title='Install JD GUI eclipse add-in for Eclipse 3.7 timeout'/><author><name>Ryan DH</name><uri>https://profiles.google.com/114235205473318658504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-g3Iv2NzEol4/AAAAAAAAAAI/AAAAAAAAACA/IsxVgJOKp9s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/-NP3aOQv-eP8/T0fmBqKOOTI/AAAAAAAAAI0/JKwboT_7hAQ/s72-c/image_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-5907161490402062341</id><published>2012-02-22T15:27:00.001-08:00</published><updated>2012-02-22T15:32:57.010-08:00</updated><title type='text'>How to: test C# Redis client sider , step by step</title><content type='html'>&lt;p&gt;After &lt;a href="http://androidyou.blogspot.com/2012/02/how-to-install-and-test-redis-on-centos.html"&gt;install and test Redis on centos 5&lt;/a&gt;, now let’s write a Simple C# application to do some basis data operation.    &lt;br /&gt;&amp;#160; make sure Nuget is there, and right click your preject to add Sider to the reference.    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-QVLjWm1IF7I/T0V52qUqRDI/AAAAAAAAAHs/n_LrpVLkz-Q/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-R5WJdyUBtyw/T0V53iot0kI/AAAAAAAAAH0/RVkCCJw-GqE/image_thumb%25255B2%25255D.png?imgmax=800" width="794" height="445" /&gt;&lt;/a&gt;    &lt;br /&gt;,with 2 lines of Code,    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-XmPE5Ditd_4/T0V54CbtwXI/AAAAAAAAAH8/ljocffqLRzw/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-PyPZmHVFUmk/T0V55KYwOXI/AAAAAAAAAIE/IIZGqjfoWJg/image_thumb%25255B5%25255D.png?imgmax=800" width="778" height="597" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;you can also see the value from CLI    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-P9fdEbHXwdI/T0V7G-05mrI/AAAAAAAAAIM/j3Q0N3xpI4s/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-2NcNpKFKn5c/T0V7HumfdKI/AAAAAAAAAIU/QQpcmmcA2uk/image_thumb%25255B8%25255D.png?imgmax=800" width="288" height="49" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;it also support Unicode,    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-_lQBLIgt3PU/T0V7IHhcHqI/AAAAAAAAAIc/VtZ5w3rAtuA/s1600-h/image%25255B19%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-S9HjuH06rUk/T0V7Ivk_tVI/AAAAAAAAAIk/PNaPm7lH0mE/image_thumb%25255B11%25255D.png?imgmax=800" width="645" height="338" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;you can pickup the encoding for the unicode in the RedisSetting option.&lt;/p&gt;    &lt;p&gt;More syntax and API , check it out here, &lt;a href="https://github.com/chakrit/sider"&gt;https://github.com/chakrit/sider&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-5907161490402062341?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/5907161490402062341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=5907161490402062341&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5907161490402062341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5907161490402062341'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2012/02/how-to-test-c-redis-client-sider-step.html' title='How to: test C# Redis client sider , step by step'/><author><name>Ryan DH</name><uri>https://profiles.google.com/114235205473318658504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-g3Iv2NzEol4/AAAAAAAAAAI/AAAAAAAAACA/IsxVgJOKp9s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/-R5WJdyUBtyw/T0V53iot0kI/AAAAAAAAAH0/RVkCCJw-GqE/s72-c/image_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-251776861326090317</id><published>2012-02-22T15:19:00.001-08:00</published><updated>2012-02-22T15:19:24.390-08:00</updated><title type='text'>How to: install and test Redis on centos 5</title><content type='html'>&lt;p&gt;Redis is a lightweight key-value data store.&amp;#160; in terms of the key-value support, it offers several popular data collection types. let’s test it quickly. or check it here for the &lt;a href="http://try.redis-db.com/" target="_blank"&gt;real tutorial&lt;/a&gt; , &lt;/p&gt;  &lt;p&gt;Download the source code,   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="546"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="544"&gt;           &lt;p&gt; wget &lt;a href="http://redis.googlecode.com/files/redis-2.4.8.tar.gz"&gt;http://redis.googlecode.com/files/redis-2.4.8.tar.gz&lt;/a&gt;              &lt;br /&gt;tar xvf redis-2.4.8.tar.gz              &lt;br /&gt;cd redis-2.4.8              &lt;br /&gt;make&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;If you don’t have the C compiler, try yum install gcc to install the compiler. this may take a while, C has a lot libs/headers to download and update.     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-PxzfZmwa8s0/T0V3rn9eRQI/AAAAAAAAAFc/cdbZlQ6uxHo/s1600-h/image%25255B37%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-tQ_hXpxHeP4/T0V3tVFP1WI/AAAAAAAAAFk/I9st-jR4pOg/image_thumb%25255B19%25255D.png?imgmax=800" width="713" height="196" /&gt;&lt;/a&gt;    &lt;br /&gt;BY default, Redis pick up the port 6379, you can find it in the redis.conf setting,    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-LRYgVW-7hC4/T0V3uv8nh4I/AAAAAAAAAFs/O2Y9Po28QUE/s1600-h/image%25255B7%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-HHaFfxScoEQ/T0V3vjqS28I/AAAAAAAAAF0/nBdoWPBI3kI/image_thumb%25255B3%25255D.png?imgmax=800" width="589" height="146" /&gt;&lt;/a&gt;    &lt;br /&gt;then start the service ‘src/redis-server redis.conf’ which will run in forground by default.     &lt;br /&gt;    &lt;br /&gt;you can change the settings in redis.conf by change demonize:yes, it will run in background.     &lt;br /&gt;you can tell the port 6379 is picked up the redis,&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-QYCE-QpQg6E/T0V3wUKAO-I/AAAAAAAAAF8/ecQjArSjw10/s1600-h/image%25255B11%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-Rk8gjbd2PHY/T0V3xwvo1iI/AAAAAAAAAGE/8Pl_B3Vxtsc/image_thumb%25255B5%25255D.png?imgmax=800" width="531" height="66" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;Now we can run the CLI client of redis, src/redis-cli    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-tllGAWv16NM/T0V30EEsBZI/AAAAAAAAAGM/iovqBXL0PVE/s1600-h/image%25255B15%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-uztEkbYbdp4/T0V31SYwCNI/AAAAAAAAAGU/Q7xU_EcD_TI/image_thumb%25255B7%25255D.png?imgmax=800" width="795" height="427" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Here is the helloword test, set one key&amp;#160; with one value as string,   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-LN3XnHbCo_Q/T0V32OgLZrI/AAAAAAAAAGc/RiFa42V6wnA/s1600-h/image%25255B19%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-McJKwK0NuE8/T0V33vRyr2I/AAAAAAAAAGk/moR34zP5rkw/image_thumb%25255B9%25255D.png?imgmax=800" width="462" height="88" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We also can define a TTL for this key by put a expire keyword, it will disappear in 120 seconds&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-Ph2gFMg0ua0/T0V34Ehm5JI/AAAAAAAAAGs/TCWI3XDComM/s1600-h/image%25255B24%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-RyoKZVRoLPA/T0V34zTFvzI/AAAAAAAAAG0/2G-RzU2ivjc/image_thumb%25255B12%25255D.png?imgmax=800" width="398" height="110" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;then some other collection data types, like Hash   &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-BhUU1XMTg0A/T0V35apcazI/AAAAAAAAAG8/yk2ADii-v3E/s1600-h/image%25255B28%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-6_TRQO958To/T0V36q1hmqI/AAAAAAAAAHE/7mCtYlQoOmg/image_thumb%25255B14%25255D.png?imgmax=800" width="430" height="128" /&gt;&lt;/a&gt;    &lt;br /&gt;Check whether a key exists    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-_7zBkdndZ84/T0V37iuREDI/AAAAAAAAAHM/wfS2JVucXKY/s1600-h/image%25255B32%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-H63SHDXLrKo/T0V38FMRqUI/AAAAAAAAAHU/0OghLAjdZcE/image_thumb%25255B16%25255D.png?imgmax=800" width="323" height="80" /&gt;&lt;/a&gt;    &lt;br /&gt;get keys and values,    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-RLDaEmt2gPA/T0V38lH3D7I/AAAAAAAAAHc/HYpDSBIwVy0/s1600-h/image%25255B36%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-Q-K0w9FKDrI/T0V3-lIBw2I/AAAAAAAAAHk/_NYt8l9n5Tk/image_thumb%25255B18%25255D.png?imgmax=800" width="367" height="178" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;then we can use a C# app to do the same thing, &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-251776861326090317?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/251776861326090317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=251776861326090317&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/251776861326090317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/251776861326090317'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2012/02/how-to-install-and-test-redis-on-centos.html' title='How to: install and test Redis on centos 5'/><author><name>Ryan DH</name><uri>https://profiles.google.com/114235205473318658504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-g3Iv2NzEol4/AAAAAAAAAAI/AAAAAAAAACA/IsxVgJOKp9s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/-tQ_hXpxHeP4/T0V3tVFP1WI/AAAAAAAAAFk/I9st-jR4pOg/s72-c/image_thumb%25255B19%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-7863903807915488382</id><published>2012-02-21T15:30:00.001-08:00</published><updated>2012-02-21T15:30:31.591-08:00</updated><title type='text'>PhoneAccentBrush in Code</title><content type='html'>&lt;table border="0" cellspacing="0" cellpadding="2" width="511"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="509"&gt;obj.BorderBrush = (Brush) App.Current.Resources[&amp;quot;PhoneAccentBrush&amp;quot;];         &lt;br /&gt;Simple it is.           &lt;br /&gt;          &lt;br /&gt;some controls of the phontext has the same way to pick up static resources          &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-B20tgU71Fn0/T0QpFIBDkgI/AAAAAAAAAFM/ZM-YoDWMYPQ/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-6AecNKDv9L4/T0QpFve2xcI/AAAAAAAAAFU/73kNKPyLnXc/image_thumb%25255B2%25255D.png?imgmax=800" width="608" height="118" /&gt;&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-7863903807915488382?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/7863903807915488382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=7863903807915488382&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/7863903807915488382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/7863903807915488382'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2012/02/phoneaccentbrush-in-code.html' title='PhoneAccentBrush in Code'/><author><name>Ryan DH</name><uri>https://profiles.google.com/114235205473318658504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-g3Iv2NzEol4/AAAAAAAAAAI/AAAAAAAAACA/IsxVgJOKp9s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/-6AecNKDv9L4/T0QpFve2xcI/AAAAAAAAAFU/73kNKPyLnXc/s72-c/image_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-4943968951749353194</id><published>2012-02-20T10:55:00.001-08:00</published><updated>2012-02-20T10:55:18.721-08:00</updated><title type='text'>How to: Notepad Plus, turn off the setting of last opened files</title><content type='html'>&lt;p&gt;Notepad plus is really a plus tool for developers like me, sometimes, I don’t want the tool list all the last opened files. By default , it will remember the last opened files and leave it there next time you open it. like a append only file , keep increasing , never get shrinked&lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://lh5.ggpht.com/-luMhKopP2No/T0KW6zIzkJI/AAAAAAAAAEU/wQqsxWm0Yzk/wlEmoticon-smile%25255B2%25255D.png?imgmax=800" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-TRmvGJYJhnE/T0KW7ae_d2I/AAAAAAAAAEc/zFxmuOtshZM/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-2uJJyiPS5io/T0KW8oQAeOI/AAAAAAAAAEk/uKt8xfWVFiY/image_thumb%25255B2%25255D.png?imgmax=800" width="684" height="637" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To turn off this setting, there is no obvious setting like “disable last opened files”, but there is one option pretty unobvious.&lt;/p&gt;  &lt;p&gt;Under [Setting] –&amp;gt; [Preferences..]-&amp;gt;[MISC]&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-Ijo2arcwVk0/T0KW-Fh9CqI/AAAAAAAAAEs/J8xebIlqhXg/s1600-h/image%25255B10%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-Y9L4RGgDjg0/T0KXBY_ixrI/AAAAAAAAAE0/j-6-T2ZnH0k/image_thumb%25255B6%25255D.png?imgmax=800" width="707" height="388" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Also, there is another option to keep the editor only open last N files, like a fixed FIFO queue.    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-UJsoXZBgr5k/T0KXD1iHQDI/AAAAAAAAAE8/IIhBYKzebIo/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-_VP7N0-dK3I/T0KXFIDhv3I/AAAAAAAAAFE/38tp_2wla7I/image_thumb%25255B8%25255D.png?imgmax=800" width="695" height="385" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-4943968951749353194?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/4943968951749353194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=4943968951749353194&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/4943968951749353194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/4943968951749353194'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2012/02/how-to-notepad-plus-turn-off-setting-of.html' title='How to: Notepad Plus, turn off the setting of last opened files'/><author><name>Ryan DH</name><uri>https://profiles.google.com/114235205473318658504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-g3Iv2NzEol4/AAAAAAAAAAI/AAAAAAAAACA/IsxVgJOKp9s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/-luMhKopP2No/T0KW6zIzkJI/AAAAAAAAAEU/wQqsxWm0Yzk/s72-c/wlEmoticon-smile%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-1301717350217415030</id><published>2012-02-06T17:24:00.001-08:00</published><updated>2012-02-06T17:24:05.416-08:00</updated><title type='text'>Windows Phone 7, File System browser, Isolated storage</title><content type='html'>&lt;p&gt;If you want to do some cache validation, or viewing the sandbox file system of your app, here is one very great tool    &lt;br /&gt;&lt;a href="http://wptools.codeplex.com/"&gt;http://wptools.codeplex.com/&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;you can use this tool to view the Filesystem on the emulator or real device. for real device, it has to connect through Zune.    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-4k1gPTfDRWE/TzB9LRfbV9I/AAAAAAAAADg/ZEFVLmdmEWM/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-aw4gdR4iqLY/TzB9L-2SPjI/AAAAAAAAADo/L1Rfjz0StuY/image_thumb%25255B2%25255D.png?imgmax=800" width="519" height="336" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And you can push or pull fill to and from you PC and Phone. like the Android DDM tools. &lt;/p&gt;  &lt;p&gt;Also, you can install xap to the phone/emulator. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-ViQYNIGDk5k/TzB9MCbz0xI/AAAAAAAAADw/LCm8RKpG4ks/s1600-h/image%25255B8%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-YsI5dYuh4sg/TzB9MWPPTxI/AAAAAAAAAD4/ZGrxdAwtLI0/image_thumb%25255B4%25255D.png?imgmax=800" width="551" height="373" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;kill app, like the ps shell   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-CGo1a0c7kwY/TzB9MvxHLlI/AAAAAAAAAEA/04-TJr9vYa0/s1600-h/image%25255B13%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-jPq-Tdg3NcI/TzB9NP91WBI/AAAAAAAAAEI/RViwIp4joeE/image_thumb%25255B7%25255D.png?imgmax=800" width="527" height="374" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-1301717350217415030?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/1301717350217415030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=1301717350217415030&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/1301717350217415030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/1301717350217415030'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2012/02/windows-phone-7-file-system-browser.html' title='Windows Phone 7, File System browser, Isolated storage'/><author><name>Ryan DH</name><uri>https://profiles.google.com/114235205473318658504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-g3Iv2NzEol4/AAAAAAAAAAI/AAAAAAAAACA/IsxVgJOKp9s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/-aw4gdR4iqLY/TzB9L-2SPjI/AAAAAAAAADo/L1Rfjz0StuY/s72-c/image_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-1806385794257129107</id><published>2012-02-02T10:25:00.001-08:00</published><updated>2012-02-02T10:25:26.207-08:00</updated><title type='text'>A super great SSH shell on windows 7, far more than Putty. Free MobaXterm</title><content type='html'>&lt;p&gt;Just check this link, you will find how amazing this tool is. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://mobaxterm.mobatek.net/"&gt;http://mobaxterm.mobatek.net/&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;I have the features like this I used most on my windows.     &lt;br /&gt;just drag and drop this utility to the windows, you can do the SSH, FTP, VNC RDP to any linux server, it has the multi window support.     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-x3SjRllBFtU/TyrVDuz71WI/AAAAAAAAADQ/V_-svzlin14/s1600-h/image4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-EVlGJ0KobS4/TyrVFSxDuFI/AAAAAAAAADY/_StGU4FT03s/image_thumb2.png?imgmax=800" width="642" height="475" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;view the remote file system, drag and drop.     &lt;br /&gt;Plus it can run bunch of command on windows. like the sed,grep. Super!     &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-1806385794257129107?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/1806385794257129107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=1806385794257129107&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/1806385794257129107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/1806385794257129107'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2012/02/super-great-ssh-shell-on-windows-7-far.html' title='A super great SSH shell on windows 7, far more than Putty. Free MobaXterm'/><author><name>Ryan DH</name><uri>https://profiles.google.com/114235205473318658504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-g3Iv2NzEol4/AAAAAAAAAAI/AAAAAAAAACA/IsxVgJOKp9s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/-EVlGJ0KobS4/TyrVFSxDuFI/AAAAAAAAADY/_StGU4FT03s/s72-c/image_thumb2.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-140649982390986517</id><published>2012-01-31T16:28:00.001-08:00</published><updated>2012-01-31T16:28:23.269-08:00</updated><title type='text'>HP QTP, Click LInk in specified cells in the data grid of siliverlight, SlvTable</title><content type='html'>&lt;table border="0" cellspacing="0" cellpadding="2" width="747"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="745"&gt;SlvTable has the click method, by the x, y has to be the position relative to the parent control (table or the grid here.)         &lt;br /&gt;          &lt;br /&gt;so , get the top location of the table itself, then run some basic math cacaluation, you can click any cells with links,          &lt;br /&gt;          &lt;br /&gt;Here is one snippet to click [3,3] links,          &lt;br /&gt;          &lt;br /&gt;          &lt;p&gt;myx=browser(&amp;quot;HomePage).Page(&amp;quot;Module1&amp;quot;).SlvWindow(&amp;quot;RootVisualWrapper&amp;quot;).SlvTable(&amp;quot;Grid1&amp;quot;).GetCellProperty(3,3,&amp;quot;x&amp;quot;)           &lt;br /&gt;myy=browser(&amp;quot;HomePage).Page(&amp;quot;Module1&amp;quot;).SlvWindow(&amp;quot;RootVisualWrapper&amp;quot;).SlvTable(&amp;quot;Grid1&amp;quot;).GetCellProperty(3,3,&amp;quot;y&amp;quot;)&lt;/p&gt;          &lt;p&gt;parentx=browser(&amp;quot;HomePage).Page(&amp;quot;Module1&amp;quot;).SlvWindow(&amp;quot;RootVisualWrapper&amp;quot;).SlvTable(&amp;quot;Grid1&amp;quot;).GetROProperty(&amp;quot;x&amp;quot;)           &lt;br /&gt;parenty=browser(&amp;quot;HomePage).Page(&amp;quot;Module1&amp;quot;).SlvWindow(&amp;quot;RootVisualWrapper&amp;quot;).SlvTable(&amp;quot;Grid1&amp;quot;).GetROProperty(&amp;quot;y&amp;quot;)&lt;/p&gt;          &lt;p&gt;w=browser(&amp;quot;HomePage).Page(&amp;quot;Module1&amp;quot;).SlvWindow(&amp;quot;RootVisualWrapper&amp;quot;).SlvTable(&amp;quot;Grid1&amp;quot;).GetCellProperty(3,3,&amp;quot;width&amp;quot;)           &lt;br /&gt;h=browser(&amp;quot;HomePage).Page(&amp;quot;Module1&amp;quot;).SlvWindow(&amp;quot;RootVisualWrapper&amp;quot;).SlvTable(&amp;quot;Grid1&amp;quot;).GetCellProperty(3,3,&amp;quot;height&amp;quot;)            &lt;br /&gt;&amp;#160;&lt;/p&gt;          &lt;p&gt;rx=myx + w/2-parentx           &lt;br /&gt;ry=myy + h/2-parenty&lt;/p&gt;          &lt;p&gt;browser(&amp;quot;HomePage).Page(&amp;quot;Module1&amp;quot;).SlvWindow(&amp;quot;RootVisualWrapper&amp;quot;).SlvTable(&amp;quot;Grid1&amp;quot;).Click rx, ry           &lt;br /&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-140649982390986517?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/140649982390986517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=140649982390986517&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/140649982390986517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/140649982390986517'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2012/01/hp-qtp-click-link-in-specified-cells-in.html' title='HP QTP, Click LInk in specified cells in the data grid of siliverlight, SlvTable'/><author><name>Ryan DH</name><uri>https://profiles.google.com/114235205473318658504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-g3Iv2NzEol4/AAAAAAAAAAI/AAAAAAAAACA/IsxVgJOKp9s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-3501488385631038280</id><published>2012-01-20T15:47:00.001-08:00</published><updated>2012-01-20T15:47:11.208-08:00</updated><title type='text'>Oracle Coherence Monitoring, Node max memory keep changing.</title><content type='html'>&lt;p&gt;If you turn on the coherence monitoring by setting the jvm property, -Dtangosol.coherence.management.remote=true, you can check the Coherence status via the JMX client like Jconsole.&amp;#160; I.e you can click the Node of Coherence domain, and see all the Nodes information, like MaxMemory, FreeMemory. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-__4yOGREhzo/Txn88kek3YI/AAAAAAAAEO0/MrHmo6aqS1Y/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-7MyBIqij8po/Txn89Fd6IBI/AAAAAAAAEO8/AvfkVw8sBGA/image_thumb%25255B1%25255D.png?imgmax=800" width="410" height="356" /&gt;&lt;/a&gt;    &lt;br /&gt;always we set up the heap size constant. min and max to the same value, I set it up to 300M here.     &lt;br /&gt;But when I check the node attributes of max and free memory, the max one is not 300M, and sometimes, even keep changing.     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-GC5-pWykWr0/Txn89cQJvhI/AAAAAAAAEPE/fLW4pL2ZV9k/s1600-h/image%25255B7%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-4IEKCcF6h0w/Txn89yadimI/AAAAAAAAEPM/LfzEeWi9_Rk/image_thumb%25255B3%25255D.png?imgmax=800" width="334" height="37" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;then I check the code, to return the MemoryMaxMB, pretty simple, just call runtime to get the maxmemory.     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-5jkQaptxrjE/Txn8-eA3hnI/AAAAAAAAEPU/5I6pHlf-syA/s1600-h/image%25255B12%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-I9fbEz5Nps4/Txn8-1VXoDI/AAAAAAAAEPc/I6Xag0b_LFI/image_thumb%25255B6%25255D.png?imgmax=800" width="776" height="172" /&gt;&lt;/a&gt;    &lt;br /&gt;I created the following bTrace script, and make sure it is calling this code. And I am right.     &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="533"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#908989" valign="top" width="531"&gt;           &lt;p&gt;@OnMethod(clazz = &amp;quot;com.tangosol.coherence.component.net.management.model.localModel.ClusterNodeModel&amp;quot;, method = &amp;quot;getMemoryMaxMB&amp;quot;, location = @Location(value = Kind.RETURN))             &lt;br /&gt;public static void getMemoryMaxMB(@Return int i) {              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; BTraceUtils.println(&amp;quot;get max&amp;quot;);              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; BTraceUtils.println(i);&lt;/p&gt;            &lt;p&gt;}&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;then the question is why the maxmemory here is 287 or some value instead of 300M ?    &lt;br /&gt;I did a another test, change the JVM to Jrockit, what do you expect? it shows 300M. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-kdiSIshzc-o/Txn8_KWLr7I/AAAAAAAAEPk/8MAUjo0iqw8/s1600-h/image%25255B17%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-szLu8B246Gw/Txn8_gjAx_I/AAAAAAAAEPs/ThlhYpuSQBk/image_thumb%25255B9%25255D.png?imgmax=800" width="502" height="198" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;conclusion, the MemoryMaxMB reported here vary by JVM. because each JVM vendor has it’s own implementation of the JVM. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-3501488385631038280?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/3501488385631038280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=3501488385631038280&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3501488385631038280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3501488385631038280'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2012/01/oracle-coherence-monitoring-node-max.html' title='Oracle Coherence Monitoring, Node max memory keep changing.'/><author><name>MyNote on every bits</name><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://lh4.ggpht.com/-7MyBIqij8po/Txn89Fd6IBI/AAAAAAAAEO8/AvfkVw8sBGA/s72-c/image_thumb%25255B1%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-8692747051560904251</id><published>2011-12-14T11:45:00.001-08:00</published><updated>2011-12-14T11:45:45.524-08:00</updated><title type='text'>Cassandra OpsCenter Community features</title><content type='html'>&lt;p&gt;played with the Ops several hours, here are the major feature In my option.   &lt;br /&gt;    &lt;br /&gt;Monitoring the whole cluster status, like req/s, disk capacity, IO     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-yNgFs9VeDJY/Tuj8vhDTh6I/AAAAAAAAEJM/m_Vo0uginMc/s1600-h/image%25255B7%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-HdzGBsnJLi4/Tuj8wztyWAI/AAAAAAAAEJU/dzAv-1kqqzY/image_thumb%25255B5%25255D.png?imgmax=800" width="915" height="581" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Node tool visualization and do maintenance job just a click away. Such as, drain one node, compact, or get one node out of cluster(decommission.), rebalance cluster is only available in enterprise version sadly.    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-u-pe1doAVns/Tuj8yS8CW3I/AAAAAAAAEJc/25a9BSKOVUs/s1600-h/image%25255B39%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-Q7RIshwrzhU/Tuj8zdUWNbI/AAAAAAAAEJk/rpqLl_njF4s/image_thumb%25255B25%25255D.png?imgmax=800" width="781" height="566" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;Clicking the Node, you can do a lot stuff, such as view the multi-DC replications. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-BI2CCbSi3qw/Tuj80JawgEI/AAAAAAAAEJs/rgubBIWg164/s1600-h/image%25255B41%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-CDN66hrURNQ/Tuj80nrUoPI/AAAAAAAAEJ0/Sg4bNyycUCI/image_thumb%25255B27%25255D.png?imgmax=800" width="494" height="461" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Data modeling and explor( create keyspace , and view data), update column family.    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/--kX_HURnD2o/Tuj81XmIdJI/AAAAAAAAEJ8/vDdEs8TauFg/s1600-h/image%25255B43%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-sd8yKt976Nk/Tuj82HcuG0I/AAAAAAAAEKE/SWq2XF8tUiY/image_thumb%25255B29%25255D.png?imgmax=800" width="714" height="445" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Exploring data,   &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-qOVC3bM_Cgs/Tuj82uCV-FI/AAAAAAAAEKM/2FCz2gZRtVo/s1600-h/image%25255B45%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-p_wZaQcSp7Q/Tuj83P0Z_JI/AAAAAAAAEKU/pl58r1A6nlw/image_thumb%25255B31%25255D.png?imgmax=800" width="598" height="241" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;Monitoring again,    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-Ygx-2XRAQLw/Tuj833vTwVI/AAAAAAAAEKY/0vHG5ylG6Vo/s1600-h/image%25255B47%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-uGk9kTI5Gaw/Tuj84sRCZdI/AAAAAAAAEKg/9jUDQBXsBVM/image_thumb%25255B33%25255D.png?imgmax=800" width="944" height="456" /&gt;&lt;/a&gt;&lt;/p&gt;          &lt;p&gt;Actions on node, (like the node tool)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-KkHgqGWzZaI/Tuj85Uau13I/AAAAAAAAEKo/LSevEnktMjc/s1600-h/image%25255B49%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-ODNpud248ZU/Tuj86HtjFmI/AAAAAAAAEK0/XXhJcN_rPU0/image_thumb%25255B35%25255D.png?imgmax=800" width="692" height="462" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-8692747051560904251?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/8692747051560904251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=8692747051560904251&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/8692747051560904251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/8692747051560904251'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/12/cassandra-opscenter-community-features.html' title='Cassandra OpsCenter Community features'/><author><name>MyNote on every bits</name><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://lh6.ggpht.com/-HdzGBsnJLi4/Tuj8wztyWAI/AAAAAAAAEJU/dzAv-1kqqzY/s72-c/image_thumb%25255B5%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-683670625923995457</id><published>2011-12-14T10:20:00.001-08:00</published><updated>2011-12-14T10:20:58.814-08:00</updated><title type='text'>Cassandra Opscenter, connected to the cluster, But No Node information get listed</title><content type='html'>&lt;p&gt;configration is pretty simple for opscenter, just change files under conf fodler, point to correct seed server, then I can query the data from Opscenter now.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-4JkOqT9AtLE/Tujo7g5gGlI/AAAAAAAAEHs/CUo_12fBXzM/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-_FSP_rTjFKk/Tujo8Acz_TI/AAAAAAAAEH0/PyaKydTiQqI/image_thumb%25255B2%25255D.png?imgmax=800" width="807" height="441" /&gt;&lt;/a&gt;    &lt;br /&gt;How ever, the dashboard, there is no node information.    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-K6njWwFTkaI/Tujo8ydqGaI/AAAAAAAAEH8/gsGAU9-qvyE/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-NurPcDG7anA/Tujo9tncNbI/AAAAAAAAEIE/E4UCPLSeuXo/image_thumb%25255B5%25255D.png?imgmax=800" width="826" height="500" /&gt;&lt;/a&gt;    &lt;br /&gt;When I check the logs under opscenter , when it try to get node infrmation from the thift API, get error, that explains why, return no results.     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-t79LKw6w3xA/Tujo-cOO-2I/AAAAAAAAEIM/1UWSfIrxZZk/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-6Bgvxir8vW4/Tujo_PmR5mI/AAAAAAAAEIU/5KqkFOae6jE/image_thumb%25255B8%25255D.png?imgmax=800" width="744" height="547" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;After did a lot testing, I noticed this is because of the version mismatch, for Cassandra cluster, it runs on 1.0 version.     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-yZZqSDtfOBE/Tujo_kEcytI/AAAAAAAAEIY/uktKS1w90T4/s1600-h/image%25255B19%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-rF_7EqaxXjo/Tujo_36C3nI/AAAAAAAAEIk/Bb_znHDC6Dc/image_thumb%25255B11%25255D.png?imgmax=800" width="677" height="32" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;while the ops center version is 1.3.1, you can tell from the console on the left bottom    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-6b0umnJPg9o/TujpAUvUoSI/AAAAAAAAEIs/3ctyNOmjRTM/s1600-h/image%25255B22%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-crPh3tTWFqI/TujpA6GhrpI/AAAAAAAAEI0/_POeKr0TZec/image_thumb%25255B12%25255D.png?imgmax=800" width="168" height="216" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;then I try update the Cassandra to the latest version 1.0.5, it works without any problem.    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-G0Yj8-UOZFM/TujpBuBdjeI/AAAAAAAAEI8/4scI_UXkBZk/s1600-h/image%25255B27%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-pc2Y1MfcKaI/TujpCTYphnI/AAAAAAAAEJE/unCHMCuC3DM/image_thumb%25255B15%25255D.png?imgmax=800" width="907" height="575" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-683670625923995457?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/683670625923995457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=683670625923995457&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/683670625923995457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/683670625923995457'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/12/cassandra-opscenter-connected-to.html' title='Cassandra Opscenter, connected to the cluster, But No Node information get listed'/><author><name>MyNote on every bits</name><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://lh4.ggpht.com/-_FSP_rTjFKk/Tujo8Acz_TI/AAAAAAAAEH0/PyaKydTiQqI/s72-c/image_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-9216372179036007169</id><published>2011-12-14T09:44:00.001-08:00</published><updated>2011-12-14T09:44:47.529-08:00</updated><title type='text'>Cassandra OpsCenter,Failed to load application: libpython2.6.so.1.0</title><content type='html'>&lt;p&gt;Unzip the OpsCenter file, Instal the 2.7 Python, then run the opscenter, failed get the following error.    &lt;br /&gt;    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="685"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#09a950" valign="top" width="683"&gt;           &lt;p&gt;[root@e3 opscenter]# bin/opscenter              &lt;br /&gt;/usr/local/bin/python2.7               &lt;br /&gt;Traceback (most recent call last):               &lt;br /&gt;File &amp;quot;/usr/lib/cassandra/opscenter-1.3.1/lib/py-redhat/2.6/shared/amd64/twisted/application/app.py&amp;quot;, line 631, in run               &lt;br /&gt;runApp(config)               &lt;br /&gt;File &amp;quot;/usr/lib/cassandra/opscenter-1.3.1/lib/py-redhat/2.6/shared/amd64/twisted/scripts/twistd.py&amp;quot;, line 23, in runApp               &lt;br /&gt;_SomeApplicationRunner(config).run()               &lt;br /&gt;File &amp;quot;/usr/lib/cassandra/opscenter-1.3.1/lib/py-redhat/2.6/shared/amd64/twisted/application/app.py&amp;quot;, line 374, in run               &lt;br /&gt;self.application = self.createOrGetApplication()               &lt;br /&gt;File &amp;quot;/usr/lib/cassandra/opscenter-1.3.1/lib/py-redhat/2.6/shared/amd64/twisted/application/app.py&amp;quot;, line 439, in createOrGetApplication               &lt;br /&gt;application = getApplication(self.config, passphrase)               &lt;br /&gt;--- &amp;lt;exception caught here&amp;gt; ---               &lt;br /&gt;File &amp;quot;/usr/lib/cassandra/opscenter-1.3.1/lib/py-redhat/2.6/shared/amd64/twisted/application/app.py&amp;quot;, line 450, in getApplication               &lt;br /&gt;application = service.loadApplication(filename, style, passphrase)               &lt;br /&gt;File &amp;quot;/usr/lib/cassandra/opscenter-1.3.1/lib/py-redhat/2.6/shared/amd64/twisted/application/service.py&amp;quot;, line 400, in loadApplication               &lt;br /&gt;application = sob.loadValueFromFile(filename, 'application', passphrase)               &lt;br /&gt;File &amp;quot;/usr/lib/cassandra/opscenter-1.3.1/lib/py-redhat/2.6/shared/amd64/twisted/persisted/sob.py&amp;quot;, line 210, in loadValueFromFile               &lt;br /&gt;exec fileObj in d, d               &lt;br /&gt;File &amp;quot;bin/start_opscenter.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;               &lt;br /&gt;from opscenterd import opscenterd_tap               &lt;br /&gt;File &amp;quot;build/lib/python2.7/site-packages/opscenterd/opscenterd_tap.py&amp;quot;, line 16, in &amp;lt;module&amp;gt;&lt;/p&gt;            &lt;p&gt;File &amp;quot;build/lib/python2.7/site-packages/opscenterd/Config.py&amp;quot;, line 392, in init_config&lt;/p&gt;            &lt;p&gt;File &amp;quot;build/lib/python2.7/site-packages/opscenterd/events/plugins/CassandraStore.py&amp;quot;, line 12, in &amp;lt;module&amp;gt;&lt;/p&gt;            &lt;p&gt;File &amp;quot;build/lib/python2.7/site-packages/opscenterd/CassandraService.py&amp;quot;, line 17, in &amp;lt;module&amp;gt;&lt;/p&gt;            &lt;p&gt;File &amp;quot;build/lib/python2.7/site-packages/opscenterd/Cluster.py&amp;quot;, line 14, in &amp;lt;module&amp;gt;&lt;/p&gt;            &lt;p&gt;File &amp;quot;build/lib/python2.7/site-packages/opscenterd/AgentServer.py&amp;quot;, line 23, in &amp;lt;module&amp;gt;&lt;/p&gt;            &lt;p&gt;File &amp;quot;build/lib/python2.7/site-packages/opscenterd/HttpUtils.py&amp;quot;, line 10, in &amp;lt;module&amp;gt;&lt;/p&gt;            &lt;p&gt;File &amp;quot;/usr/lib/cassandra/opscenter-1.3.1/lib/py-redhat/2.6/5/amd64/OpenSSL/__init__.py&amp;quot;, line 11, in &amp;lt;module&amp;gt;              &lt;br /&gt;import rand, crypto, SSL, tsafe               &lt;br /&gt;exceptions.ImportError: libpython2.6.so.1.0: cannot open shared object file: No such file or directory&lt;/p&gt;            &lt;p&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;Failed to load application: libpython2.6.so.1.0: cannot open shared object file: No such file or directory&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;When I list the LibPython module under /usr/lib64/libpython* , It only has the 2.4 modue. So we need to install the 2.6 Module required by the opscenter.    &lt;br /&gt;    &lt;br /&gt;1, first, Check my OS, it ‘s Centos 5&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-pOIiST4cCDo/TujghL1Yn-I/AAAAAAAAEG8/sVUz4yYA19s/s1600-h/image%25255B7%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-HOE3QszWydE/TujghnA4YwI/AAAAAAAAEHE/aVCgdLCZRbU/image_thumb%25255B3%25255D.png?imgmax=800" width="393" height="54" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;go to &lt;a href="http://download.fedora.redhat.com/pub/epel/5/x86_64/"&gt;http://download.fedora.redhat.com/pub/epel/5/x86_64/&lt;/a&gt;, download the &lt;a href="http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm"&gt;epel-release-5-4.noarch.rpm&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;2. Update the rpm, “rpm -Uvh epel-release*rpm”&lt;/p&gt;  &lt;p&gt;3. yum install python26-libs&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-llBWjcWHOfg/TujgiJsNPnI/AAAAAAAAEHM/Vq1OitacyKo/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-J-xs7MRixO0/Tujgi2EK1nI/AAAAAAAAEHU/i95gCpp0RhA/image_thumb%25255B5%25255D.png?imgmax=800" width="657" height="295" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once done, you can see the 2.6 modules under the lib folder,   &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-UGcStoyQSOs/TujgjKy-JWI/AAAAAAAAEHc/ijGjtIBaqjA/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-8PjpMqPnk58/Tujgji2PRiI/AAAAAAAAEHk/z5dkW62NoHY/image_thumb%25255B8%25255D.png?imgmax=800" width="547" height="52" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now we can run the opscenter now. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-9216372179036007169?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/9216372179036007169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=9216372179036007169&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/9216372179036007169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/9216372179036007169'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/12/cassandra-opscenterfailed-to-load.html' title='Cassandra OpsCenter,Failed to load application: libpython2.6.so.1.0'/><author><name>MyNote on every bits</name><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://lh3.ggpht.com/-HOE3QszWydE/TujghnA4YwI/AAAAAAAAEHE/aVCgdLCZRbU/s72-c/image_thumb%25255B3%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-413422286220568902</id><published>2011-12-06T11:31:00.001-08:00</published><updated>2011-12-06T11:31:04.328-08:00</updated><title type='text'>How to: write a key mapper or Key transformation utility in 10 minutes</title><content type='html'>&lt;p&gt;Question, need a utility to map or transform the key stoke, say when you press F6, replace the contents with a Mailing address, and Press F7 for the zip code of your city.    &lt;br /&gt;    &lt;br /&gt;&amp;#160; Answer, In C#, it’s easy and not easy. you have to wrap several Native APIs to hook the mapping point into the system, Easy one is it has one Great methods called Sendkeys.Send.     &lt;br /&gt;    &lt;br /&gt;So eventually, we need one file to keep the mapping logic , here I just pickup the .config file, then the code. Code is here,you may just copy and save it as .cs file, then compile it.     &lt;br /&gt;    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="630"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#d0c0c0" valign="top" width="628"&gt;           &lt;p&gt;using System;              &lt;br /&gt;using System.Diagnostics;               &lt;br /&gt;using System.Windows.Forms;               &lt;br /&gt;using System.Runtime.InteropServices;               &lt;br /&gt;using System.Text;               &lt;br /&gt;using System.Collections.Specialized;&lt;/p&gt;            &lt;p&gt;public class KeyMapper              &lt;br /&gt;{               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; private const int WH_KEYBOARD_LL = 13;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; private const int WM_KEYDOWN = 0x0100;&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; private static LowLevelKeyboardProc _proc = HookCallback;              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; private static IntPtr _hookID = IntPtr.Zero;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; private static NameValueCollection mappings;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public static void Main()               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //Check to see no duplicate running               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if(Process.GetProcessesByName(&amp;quot;af&amp;quot;).Length&amp;gt;1)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //keep it small               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Console.SetWindowSize(1,2);&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; mappings = System.Configuration.ConfigurationManager.AppSettings;&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _hookID = SetHook(_proc);              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Application.Run();               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; UnhookWindowsHookEx(_hookID);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; private static IntPtr SetHook(LowLevelKeyboardProc proc)              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; using (Process curProcess = Process.GetCurrentProcess())               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; using (ProcessModule curModule = curProcess.MainModule)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return SetWindowsHookEx(WH_KEYBOARD_LL, proc,               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; GetModuleHandle(curModule.ModuleName), 0);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; private delegate IntPtr LowLevelKeyboardProc(              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int nCode, IntPtr wParam, IntPtr lParam);&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; private static IntPtr HookCallback(              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int nCode, IntPtr wParam, IntPtr lParam)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (nCode &amp;gt;= 0 &amp;amp;&amp;amp; wParam == (IntPtr)WM_KEYDOWN)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int vkCode = Marshal.ReadInt32(lParam);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; String key = ((Keys)vkCode).ToString();&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (mappings[key] != null)              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SendKeys.Send(mappings[key]);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return CallNextHookEx(_hookID, nCode, wParam, lParam);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;            &lt;p&gt;&amp;#160;&lt;/p&gt;            &lt;p&gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; [DllImport(&amp;quot;user32.dll&amp;quot;, CharSet = CharSet.Auto, SetLastError = true)]               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; private static extern IntPtr SetWindowsHookEx(int idHook,               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; LowLevelKeyboardProc lpfn, IntPtr hMod, uint dwThreadId);&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; [DllImport(&amp;quot;user32.dll&amp;quot;, CharSet = CharSet.Auto, SetLastError = true)]              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; [return: MarshalAs(UnmanagedType.Bool)]               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; private static extern bool UnhookWindowsHookEx(IntPtr hhk);&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; [DllImport(&amp;quot;user32.dll&amp;quot;, CharSet = CharSet.Auto, SetLastError = true)]              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; private static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode,               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; IntPtr wParam, IntPtr lParam);&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; [DllImport(&amp;quot;kernel32.dll&amp;quot;, CharSet = CharSet.Auto, SetLastError = true)]              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; private static extern IntPtr GetModuleHandle(string lpModuleName);               &lt;br /&gt;}&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;Config&amp;#160; file, like mine,   &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-LSFQH8PURfY/Tt5tcHAg0nI/AAAAAAAAEFM/jRP2ZW6SU7o/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-Jc2X9W3yFrA/Tt5tcvVKQjI/AAAAAAAAEFU/tNaLAK386Mk/image_thumb%25255B2%25255D.png?imgmax=800" width="430" height="151" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Then we you started the console application.   &lt;br /&gt;wherever you enter F6, it will put a sample address there.    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-OLC7UxvIA2k/Tt5tdKoV5TI/AAAAAAAAEFc/X9ul1EHfcCs/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-IIPcQW8rBDg/Tt5tdpk76EI/AAAAAAAAEFk/bTEagVPqLUo/image_thumb%25255B5%25255D.png?imgmax=800" width="472" height="260" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you can’t compile the code , leave a comment , I will email you the compiled bits.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-413422286220568902?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/413422286220568902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=413422286220568902&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/413422286220568902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/413422286220568902'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/12/how-to-write-key-mapper-or-key.html' title='How to: write a key mapper or Key transformation utility in 10 minutes'/><author><name>MyNote on every bits</name><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://lh3.ggpht.com/-Jc2X9W3yFrA/Tt5tcvVKQjI/AAAAAAAAEFU/tNaLAK386Mk/s72-c/image_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-8554918172582463064</id><published>2011-11-30T11:48:00.001-08:00</published><updated>2011-11-30T11:48:36.278-08:00</updated><title type='text'>Error: Vmplayer, NO Disk, There is no disk in the drive. Please insert a disk into drive \Device\Harddisk2\DR4.</title><content type='html'>&lt;p&gt;One Day I get this error, when I just open the Vmware player, Kept popping up this error when I click the VMs.    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-xRXamsZTQnY/TtaIiE7eo9I/AAAAAAAAEDA/UlfpogaOCgo/s1600-h/image%25255B15%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-h0x_3sWxuB4/TtaIjM5pCmI/AAAAAAAAEDI/bmQxA4N1N0A/image_thumb%25255B9%25255D.png?imgmax=800" width="626" height="533" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Then I run a diskpart from the cmd shell, then call “list disk” it will show all the hard disks and their sizes   &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-1TOuikXj5xs/TtaIjiEicEI/AAAAAAAAEDQ/N8mFAwU5McA/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-n9JYwpCE4UE/TtaIkAy_K0I/AAAAAAAAEDY/3aTWYmLC7Yc/image_thumb%25255B5%25255D.png?imgmax=800" width="465" height="138" /&gt;&lt;/a&gt;    &lt;br /&gt;the disk2 is a weird Disk, Size is 0B.     &lt;br /&gt;    &lt;br /&gt;then checked all my hard disk, I plugged my phone into the USB port. unplug the cable, the disk 2 is gone.    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-o8__1vbCzdk/TtaIkTfYyyI/AAAAAAAAEDc/LSNJYGkzNE8/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-Fs5uVNxSzaA/TtaIk5xyhuI/AAAAAAAAEDk/ddUpMNwLepE/image_thumb%25255B8%25255D.png?imgmax=800" width="461" height="106" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;the error of NO disk was fixed too. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-8554918172582463064?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/8554918172582463064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=8554918172582463064&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/8554918172582463064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/8554918172582463064'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/11/error-vmplayer-no-disk-there-is-no-disk.html' title='Error: Vmplayer, NO Disk, There is no disk in the drive. Please insert a disk into drive \Device\Harddisk2\DR4.'/><author><name>MyNote on every bits</name><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://lh4.ggpht.com/-h0x_3sWxuB4/TtaIjM5pCmI/AAAAAAAAEDI/bmQxA4N1N0A/s72-c/image_thumb%25255B9%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-1463537005113423320</id><published>2011-11-16T10:52:00.001-08:00</published><updated>2011-11-16T13:37:38.002-08:00</updated><title type='text'>How to: Install and Test apache mahout on hadoop</title><content type='html'>&lt;p&gt;Mahout and Hadoop are all java libraries basically, mahout use the Maven tool to build the source code and maintain the dependency.    &lt;br /&gt;So we need make sure we have the following bits ready. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;JDK &lt;/li&gt;    &lt;li&gt;Maven &lt;/li&gt;    &lt;li&gt;Hadoop &lt;/li&gt;    &lt;li&gt;Mahout &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I will start from the fresh centos, then get all those stuff ready step by step.    &lt;br /&gt;    &lt;br /&gt;&lt;font size="5"&gt;&lt;u&gt;&lt;font color="#000000"&gt;install JDK.&lt;/font&gt; &lt;/u&gt;&lt;/font&gt;    &lt;br /&gt;GO to Oracle JDK download site, &lt;a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html"&gt;http://www.oracle.com/technetwork/java/javase/downloads/index.html&lt;/a&gt;, I still prefer the Java 6 instead of 7, pickup one the .bin link, download and run it directly. I will put the java under /usr/lib/jdk6 folder.     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-uyzWVnMpfkA/TsQF1Nm-EiI/AAAAAAAAD04/Xg7uN5sXYAA/s1600-h/image4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-MLj67M5eVfs/TsQF1eNexlI/AAAAAAAAD1A/Vz1KMkkFDpc/image_thumb2.png?imgmax=800" width="823" height="21" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;Export the bin directory to PATH, and jdk6 to JAVA_HOME environment variable.     &lt;br /&gt;    &lt;br /&gt;&lt;font size="5"&gt;Install MAVEN      &lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;Download the binary package from &lt;a href="http://maven.apache.org/download.html"&gt;http://maven.apache.org/download.html&lt;/a&gt;, here I chose the 2.2.1 version which is more stable.&amp;#160; &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-OjDzmiAKeHI/TsQF12_Z7JI/AAAAAAAAD1I/WvSEf0YzvYQ/s1600-h/image%25255B6%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-FVOLrEoxDmU/TsQF2_YaEuI/AAAAAAAAD1Q/3f7idottxeI/image_thumb%25255B3%25255D.png?imgmax=800" width="827" height="140" /&gt;&lt;/a&gt;       &lt;br /&gt;      &lt;br /&gt;Extract the zip file, and link it to /usr/lib/maven, then.       &lt;br /&gt;Export /usr/lib/maven to the PATH. now, you can run mvn –version, to make sure it works at least we can get the version,      &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-liOpZCdWxHk/TsQF3BrNdeI/AAAAAAAAD1Y/svIObb6I1NE/s1600-h/image%25255B11%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-g3nheccKO4U/TsQF3rjb4DI/AAAAAAAAD1g/b3czV9OJrek/image_thumb%25255B6%25255D.png?imgmax=800" width="615" height="96" /&gt;&lt;/a&gt;      &lt;br /&gt;For settings like proxy, check it out here, &lt;a href="http://maven.apache.org/download.html#Maven_Documentation"&gt;http://maven.apache.org/download.html#Maven_Documentation&lt;/a&gt;      &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font size="5"&gt;Install HADOOP.       &lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;you can check this out, if you want to install hadoop as a fully distributd mode, &lt;/font&gt;&lt;a href="http://androidyou.blogspot.com/2011/02/how-to-install-and-hadoop-to-run-in.html"&gt;How to: install and config hadoop to run in fully distributed Mode, Centos&lt;/a&gt;.      &lt;br /&gt;      &lt;br /&gt;here we just have one vm, so keep it easy for the mahout testing. I will use the Cloudera distribution,      &lt;br /&gt;      &lt;br /&gt;Download the repo file for centos 5, &lt;a title="http://archive.cloudera.com/redhat/cdh/cloudera-cdh3.repo" href="http://archive.cloudera.com/redhat/cdh/cloudera-cdh3.repo"&gt;http://archive.cloudera.com/redhat/cdh/cloudera-cdh3.repo&lt;/a&gt; and copy it to yum repo directory.      &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-x1Kz_fuRZCs/TsQF4NS0QQI/AAAAAAAAD1o/xR72GR3E3kk/s1600-h/image%25255B16%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-VddMT9Qhub0/TsQF4YN8POI/AAAAAAAAD1w/h5Lww3QtAU8/image_thumb%25255B9%25255D.png?imgmax=800" width="818" height="230" /&gt;&lt;/a&gt;Now just search hadoop, you will see all the components,we will use the hadoop-0.20-conf-pseudo one.       &lt;br /&gt;yum install&amp;#160; hadoop-0.20-conf-pseudo&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-8tfqRYjwcLg/TsQF471GCoI/AAAAAAAAD14/nnrF4XPGz60/s1600-h/image%25255B21%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-XZgxvgGKsNg/TsQF5dAnXpI/AAAAAAAAD18/VHrBQmPf4vs/image_thumb%25255B12%25255D.png?imgmax=800" width="647" height="351" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;once done, go to /usr/lib/hadoop/conf directory, change the java home to /usr/lib/jdk6 in hadoop-env.sh&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-bSXE9FUBQjw/TsQF-Zqp_HI/AAAAAAAAD2E/D8B5o0-vjjM/s1600-h/image%25255B31%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-A1GalLit-zE/TsQF-0zdbiI/AAAAAAAAD2M/eyeYag3cBTk/image_thumb%25255B18%25255D.png?imgmax=800" width="504" height="93" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;Then run as hdfs, format the namenode, &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-hBT75fwXY4Y/TsQF_ZHI2RI/AAAAAAAAD2U/1eqsZESCBnU/s1600-h/image%25255B35%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-SqsrZedfcQQ/TsQF_9g2PhI/AAAAAAAAD2c/yVMKC02EhHs/image_thumb%25255B20%25255D.png?imgmax=800" width="608" height="431" /&gt;&lt;/a&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;       &lt;br /&gt;then start those daemons like /etc/init.d/hadoop-*, run JPS, you should see all the java process there,        &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-du1bMRDF0Gc/TsQGAVTCk2I/AAAAAAAAD2k/Be9DfrJf488/s1600-h/image%25255B38%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-LXxF7gFx19A/TsQGQpYJ73I/AAAAAAAAD2w/-UOErm3lTqc/image_thumb%25255B21%25255D.png?imgmax=800" width="200" height="103" /&gt;&lt;/a&gt;        &lt;br /&gt;        &lt;br /&gt;now we can run a simple test, go the /usr/lib/hadoop, run &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-O4Y4UYyL3a0/TsQGRHB3CgI/AAAAAAAAD24/0Z7MUgzLk0k/s1600-h/image%25255B42%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-jSsF6SQZmrk/TsQGRbUUzyI/AAAAAAAAD3A/W1jF0JTcQJA/image_thumb%25255B23%25255D.png?imgmax=800" width="541" height="52" /&gt;&lt;/a&gt;    &lt;br /&gt;we can just copy one file there,     &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-nlusEgSoE7Y/TsQGRphWkCI/AAAAAAAAD3I/9nbRGn5GfN4/s1600-h/image%25255B47%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-Or4uvkjlsGI/TsQGSCl4_LI/AAAAAAAAD3Q/sLW-DVtBz6U/image_thumb%25255B26%25255D.png?imgmax=800" width="551" height="28" /&gt;&lt;/a&gt;    &lt;br /&gt;open a browser, go to &lt;a href="http://localhost:50070"&gt;http://localhost:50070&lt;/a&gt;, you can see the file we just uploaded is there,     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-FdtCWEL_1WM/TsQGSX61SxI/AAAAAAAAD3Y/zGpHUoA-Sl8/s1600-h/image%25255B52%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-cAinhsbKHN8/TsQGS-_usPI/AAAAAAAAD3g/2V2xG2TKGUw/image_thumb%25255B29%25255D.png?imgmax=800" width="519" height="202" /&gt;&lt;/a&gt;    &lt;br /&gt;Now , HDFS is ready. we can run a mapreduce job to make sure hadoop is ready.     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-fTLFsZu7gdQ/TsQGTPDBdDI/AAAAAAAAD3o/5kU8fIVSRps/s1600-h/image%25255B57%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-mnDIAZx1w0E/TsQGTiMTklI/AAAAAAAAD3w/46JczfJYH1c/image_thumb%25255B32%25255D.png?imgmax=800" width="665" height="147" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;If no error, we are all set, hadoop is ready.     &lt;br /&gt;    &lt;br /&gt;&lt;font size="5"&gt;Install Mahout.&lt;/font&gt;     &lt;br /&gt;    &lt;br /&gt;Download one source code, you can use svn to clone one trunk copy,&lt;/p&gt;  &lt;pre&gt;svn co http://svn.apache.org/repos/asf/mahout/trunk&lt;/pre&gt;&lt;br /&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;and copy this code to /usr/lib/mahout&lt;br /&gt;  &lt;br /&gt;then run mvn install –DskipTests to compile the source, mvn will figure out the dependency and fetch those jars for you automatically,&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-jiWX7ndllys/TsQGUGaB5cI/AAAAAAAAD34/F5M0XTOngPk/s1600-h/image%25255B62%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-kJt2a0qXyiE/TsQGUjcMQcI/AAAAAAAAD4A/e2x8Z9QAHPE/image_thumb%25255B35%25255D.png?imgmax=800" width="756" height="268" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;it takes time to download all the jar, mileage depends. &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;Here is my MPG, take several minutes, &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-hOQDhVyMvek/TsQGVOP8BlI/AAAAAAAAD4I/EN-QITPbP7Y/s1600-h/image%25255B67%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-f_cCUWZ3l7E/TsQGVXcTF4I/AAAAAAAAD4Q/_0Q00VfEBXU/image_thumb%25255B38%25255D.png?imgmax=800" width="702" height="319" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;Now, export /usr/lib/mahout/bin to PATH , then we can run mahout from the shell. &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;If you cant exectute the mahout, give it one execute permission.&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;run mahout, will list all the options to go with different algorithms. &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-yjvHOYacjNA/TsQGV0gazyI/AAAAAAAAD4Y/PV5b9wjjttg/s1600-h/image%25255B72%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-IECxztpOfQk/TsQGWu-VxXI/AAAAAAAAD4g/cfr3WnHYb4E/image_thumb%25255B41%25255D.png?imgmax=800" width="680" height="539" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Then go the examples folder, run mvn compile&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/-oxdO1Psrxeo/TsQtDaJjc-I/AAAAAAAAD8M/uOGF5U8i30M/s1600-h/image%25255B77%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-DRQhLrh51kE/TsQtENtUHAI/AAAAAAAAD8U/xCnYcR9K_T0/image_thumb%25255B44%25255D.png?imgmax=800" width="577" height="286" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now, you can run some example like the one to classify the news groups. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-Y5DFNGscN5k/TsQtEkKUObI/AAAAAAAAD8c/_ceTGgEPAcw/s1600-h/image%25255B82%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-jaaqmvnPOXQ/TsQtFMgGXUI/AAAAAAAAD8k/-JlZbR1Wb-M/image_thumb%25255B47%25255D.png?imgmax=800" width="652" height="196" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here we didn’t sepecify the HADOOP_HOME, so it will run locally. the shell script will download data, prepare the data, then run the classifier. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-eXDlwDzICVk/TsQtFjQwUdI/AAAAAAAAD8s/p-wUL2tGLaA/s1600-h/image%25255B87%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-wIzw1w4b7bA/TsQtGM6JuiI/AAAAAAAAD80/7yl3iVIhMp4/image_thumb%25255B50%25255D.png?imgmax=800" width="659" height="217" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;when done, it will show the confusion matrix against the testing data. &lt;br /&gt;  &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-XMY-HkYttTc/TsQtGr2zI3I/AAAAAAAAD88/EEYJ1XYMEO4/s1600-h/image%25255B93%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-gD5aSF4Jkec/TsQtIDoUu2I/AAAAAAAAD9E/Hj-fcniZ6-E/image_thumb%25255B54%25255D.png?imgmax=800" width="803" height="426" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-1463537005113423320?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/1463537005113423320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=1463537005113423320&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/1463537005113423320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/1463537005113423320'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/11/mahout-and-hadoop-are-all-java.html' title='How to: Install and Test apache mahout on hadoop'/><author><name>MyNote on every bits</name><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://lh4.ggpht.com/-MLj67M5eVfs/TsQF1eNexlI/AAAAAAAAD1A/Vz1KMkkFDpc/s72-c/image_thumb2.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-7876973440523042441</id><published>2011-11-14T14:20:00.001-08:00</published><updated>2011-11-14T14:20:00.439-08:00</updated><title type='text'>How to: recover the Root password for Centos</title><content type='html'>&lt;p&gt;You may forget the Root password which is hard to believe, but it does happen everyday. here is the tips to recover the root password for Centos.&amp;#160; bad day, no way to get root access.    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-DBY_XP7cSt8/TsGT3yBm_ZI/AAAAAAAADyk/ffl9LKABNo8/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-lldn5qM5Yb8/TsGT4QV4MiI/AAAAAAAADys/JTisEZ7QDNU/image_thumb%25255B2%25255D.png?imgmax=800" width="487" height="247" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now, restart the VM and boot to the geekmode.&amp;#160; by press any key, or CTL+X to the grub mode.    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-QjRGXG9LrOE/TsGT5Npd5kI/AAAAAAAADy0/ALDJHcvAQeI/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-_hxNQERPitk/TsGT6LtqOII/AAAAAAAADy8/Rtg9gA_L1Qc/image_thumb%25255B5%25255D.png?imgmax=800" width="642" height="430" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;Now, Press ‘e’ to edit the command line. we need tell the kernal boot from graphics mode to single user mode    &lt;br /&gt;user arrow key up/down to select the kernal line,    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-qNCy2rMnolQ/TsGT6_PXR5I/AAAAAAAADzE/74j8oXbr06o/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-72aURs0m5-8/TsGT7mhgfpI/AAAAAAAADzM/OB7VmEM_w4A/image_thumb%25255B8%25255D.png?imgmax=800" width="629" height="408" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;Press e, to edit the command line, you will see the follow screen,    &lt;br /&gt;Now, it is on the grphics mode, &lt;font color="#ff0000"&gt;rhgb=red hat graphical boot     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;Let’s change it to single user mode, by replacing the rhgb quiet.     &lt;br /&gt;Before,       &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-8YHFKnzKMDo/TsGT8NseAtI/AAAAAAAADzU/ztQjl0BPyiM/s1600-h/image%25255B18%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-g8WWAkzPILw/TsGT8_m5kLI/AAAAAAAADzc/6d4Ef3IFMzg/image_thumb%25255B10%25255D.png?imgmax=800" width="639" height="233" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/p&gt; &lt;font color="#000000"&gt;   &lt;p&gt;     &lt;br /&gt;after, &lt;a href="http://lh6.ggpht.com/-inHLJkvjEx8/TsGT9XMHiuI/AAAAAAAADzk/flCRPAZPo2o/s1600-h/image%25255B22%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-KwSv2uMMjkU/TsGT-C82h_I/AAAAAAAADzs/04ZmVMdtZHM/image_thumb%25255B12%25255D.png?imgmax=800" width="651" height="235" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Press enter to switch the parent screen. then press b to boot the single mode kernel, you can tell linux single is there     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-QSSwctq6vRA/TsGUBSQcJUI/AAAAAAAADz0/qOjRZ0kaQc0/s1600-h/image%25255B27%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-sOccWDgJ8Rk/TsGUCS1dkDI/AAAAAAAADz8/g0fnBqchBIE/image_thumb%25255B15%25255D.png?imgmax=800" width="649" height="531" /&gt;&lt;/a&gt;      &lt;br /&gt;Once Done, you are in single user mode.       &lt;br /&gt;remember the password this time, no typo please. &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://lh4.ggpht.com/-QmUuUxYzGt0/TsGUC1i3iFI/AAAAAAAAD0E/--tLTJmfnio/wlEmoticon-winkingsmile%25255B2%25255D.png?imgmax=800" /&gt;      &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-cpZ2I6Hymik/TsGUDf_YBuI/AAAAAAAAD0M/LJISEwNxcPw/s1600-h/image%25255B32%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-_mXbfC7W8lc/TsGUD7c3u0I/AAAAAAAAD0U/1npPv-qxU-8/image_thumb%25255B18%25255D.png?imgmax=800" width="731" height="444" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;     &lt;br /&gt;&lt;/p&gt;    &lt;br /&gt;&lt;/font&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-7876973440523042441?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/7876973440523042441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=7876973440523042441&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/7876973440523042441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/7876973440523042441'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/11/how-to-recover-root-password-for-centos.html' title='How to: recover the Root password for Centos'/><author><name>MyNote on every bits</name><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://lh3.ggpht.com/-lldn5qM5Yb8/TsGT4QV4MiI/AAAAAAAADys/JTisEZ7QDNU/s72-c/image_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-5107862920367870253</id><published>2011-10-25T09:41:00.001-07:00</published><updated>2011-10-25T09:41:09.423-07:00</updated><title type='text'>Coherence push replication, com.tangosol.net.DefaultConfigurableCacheFactory cannot be cast to com.oracle.coherence.environment.Environment</title><content type='html'>&lt;p&gt;Coherence has several incubator project, Push replication is one of them which enable you to turn on replication between several standalone clusters. i.e&amp;#160; Cross WAN replication between data centers.    &lt;br /&gt;    &lt;br /&gt;I just read their limited documentation, trying to setup one Master-Slave replication between two separate clusters in my pc. ON the master side, here is the cache configuration. basically load the default coherence config, reference the incubator pof file.     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-Ypt3TkMWRVs/TqbmhsB9iqI/AAAAAAAADjU/NLYvQjxkwys/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-BWoB-URgh8o/TqbmjRMb8oI/AAAAAAAADjc/LaP2HZKi5mk/image_thumb%25255B2%25255D.png?imgmax=800" width="1083" height="531" /&gt;&lt;/a&gt;     &lt;br /&gt;Here is just pickup the &lt;a href="http://coherence.oracle.com/display/INCUBATOR/sync-remote-cluster-publisher-scheme+%283.0.0%29" target="_blank"&gt;remote cluster publisher&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;using the distributed-scheme-with-publishing-cachestore scheme will enable the runtime to capture the entity change to a queue, then flushed to remote cluster using the remove invocation service.     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-hT2q34yOaMU/TqbmjxiciMI/AAAAAAAADjk/jn5Hau1iGOA/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-0IarbWMyNcc/TqbmkdIUyII/AAAAAAAADjs/BAtzrOoPe6s/image_thumb%25255B5%25255D.png?imgmax=800" width="496" height="408" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;All set, when I try to feed some data to the local cache which is Master, long stack trace appears.     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="894"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#999999" valign="top" width="892"&gt;           &lt;p&gt;Map (master): put a 2              &lt;br /&gt;2011-10-25 09:17:19.862/22.446 Oracle Coherence GE 3.7.1.0 &amp;lt;Error&amp;gt; (thread=main, member=2):               &lt;br /&gt;Portable(com.tangosol.util.WrapperException): (Wrapped: Failed request execution for DistributedCacheWithPublishingCacheStore service on Member(Id=1, Timestamp=               &lt;br /&gt;706, Address=192.168.137.1:8090, MachineId=63704, Location=site:E3,machine:androidyou-PC,process:6004, Role=CoherenceServer)) null               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onPutRequest(PartitionedCache.CDB:50)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$PutRequest.run(PartitionedCache.CDB:1)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:1)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:32)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.DaemonPool$Daemon.onNotify(DaemonPool.CDB:63)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at java.lang.Thread.run(Thread.java:619)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at &amp;lt;process boundary&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.io.pof.ThrowablePofSerializer.deserialize(ThrowablePofSerializer.java:57)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3316)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2604)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.io.pof.ConfigurablePofContext.deserialize(ConfigurablePofContext.java:368)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.readObject(Service.CDB:1)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.net.Message.readObject(Message.CDB:1)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.net.message.SimpleResponse.read(SimpleResponse.CDB:6)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.deserializeMessage(Grid.CDB:19)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:31)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at java.lang.Thread.run(Thread.java:619)               &lt;br /&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;Caused by: Portable(java.lang.UnsupportedOperationException)&lt;/font&gt;&lt;/strong&gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at java.util.AbstractMap.put(AbstractMap.java:186)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.util.WrapperObservableMap.put(WrapperObservableMap.java:151)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.postPut(PartitionedCache.CDB:70)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.put(PartitionedCache.CDB:17)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onPutRequest(PartitionedCache.CDB:25)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$PutRequest.run(PartitionedCache.CDB:1)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:1)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:32)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.DaemonPool$Daemon.onNotify(DaemonPool.CDB:63)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at java.lang.Thread.run(Thread.java:619)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at &amp;lt;process boundary&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.io.pof.ThrowablePofSerializer.deserialize(ThrowablePofSerializer.java:57)&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;ON the storage Node, the error that may bring you here,     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="847"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#aaaaaa" valign="top" width="845"&gt;           &lt;p&gt;&amp;lt;/class-scheme&amp;gt;)&lt;strong&gt;&lt;font color="#ff0000"&gt; java.lang.reflect.InvocationTargetException&lt;/font&gt;&lt;/strong&gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2652)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2536)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateAny(DefaultConfigurableCacheFactory.java:3476)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateCacheStore(DefaultConfigurableCacheFactory.java:3324)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateReadWriteBackingMap(DefaultConfigurableCacheFactory.java:1753)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.net.DefaultConfigurableCacheFactory.configureBackingMap(DefaultConfigurableCacheFactory.java:1500)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.net.DefaultConfigurableCacheFactory$Manager.instantiateBackingMap(DefaultConfigurableCacheFactory.java:4111)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.instantiateBackingMap(Partitione               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.setCacheName(PartitionedCache.CD               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ServiceConfig$ConfigListener.entryInsert               &lt;br /&gt;CDB:17)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.util.MapEvent.dispatch(MapEvent.java:266)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.util.MapEvent.dispatch(MapEvent.java:226)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:567)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.util.ObservableHashMap.dispatchEvent(ObservableHashMap.java:229)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.util.ObservableHashMap$Entry.onAdd(ObservableHashMap.java:270)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.util.SafeHashMap.put(SafeHashMap.java:244)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.ServiceConfig$Map.put(ServiceConfig.CDB:43)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$StorageIdRequest.onReceived(PartitionedC               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:34)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:33)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at java.lang.Thread.run(Thread.java:619)               &lt;br /&gt;Caused by: java.lang.reflect.InvocationTargetException               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at java.lang.reflect.Constructor.newInstance(Constructor.java:513)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:694)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2611)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ... 23 more               &lt;br /&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;Caused by: java.lang.ClassCastException: com.tangosol.net.DefaultConfigurableCacheFactory cannot be cast to com.oracle.coherence.environment.Environment                  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at com.oracle.coherence.patterns.pushreplication.PublishingCacheStore.&amp;lt;init&amp;gt;(PublishingCacheStore.java:179)&lt;/font&gt;&lt;/strong&gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ... 29 more               &lt;br /&gt;2011-10-25 09:17:16.120/18.685 Oracle Coherence GE 3.7.1.0 &amp;lt;D5&amp;gt; (thread=Cluster, member=1): Member 2 joined Service DistributedCacheWithPublishingCacheStore wit&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;trying to cast DefautCOnfigurableCacheFactory to Envionment? what is Environment class located, in standard coherence, or Incubator project? Iet me find it out in eclipse.    &lt;br /&gt;It is in the common lib used by push replication,&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-QSWMlTq6SeU/TqbmlNCyAZI/AAAAAAAADj0/DhnM79RXwbI/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-1J3iFdaWFTM/Tqbmli_U_eI/AAAAAAAADj8/OWRZ2wgKQy8/image_thumb%25255B8%25255D.png?imgmax=800" width="666" height="312" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;check the class hierarchy, it’s another cachefactory,    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-ECeMs1PucYY/TqbmmLJL_eI/AAAAAAAADkE/y64gRTv5GMw/s1600-h/image%25255B19%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-C5WidCdWx3Y/TqbmmzFmcfI/AAAAAAAADkM/ukXudXo3ceU/image_thumb%25255B11%25255D.png?imgmax=800" width="582" height="169" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;then change our cachefactory from the default DefautCOnfigurableCacheFactory&amp;#160; to the incubator cache facotry, it will pick up the setting like sync namespace.    &lt;br /&gt;    &lt;br /&gt;Old,     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-FOnNmxZ5ba8/Tqbmnf1i6PI/AAAAAAAADkU/mlVFSgr-2dA/s1600-h/image%25255B24%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-yfTectnkpkw/Tqbmn7ZitPI/AAAAAAAADkc/xgv0ru9SfTk/image_thumb%25255B14%25255D.png?imgmax=800" width="886" height="167" /&gt;&lt;/a&gt;should be,     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-NbZMubRN_x8/TqbmoTB-WVI/AAAAAAAADkk/0WYIVRJ94Zk/s1600-h/image%25255B29%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-TgPKP9CFt9s/TqbmpFfW1GI/AAAAAAAADks/uDrHWxN4axM/image_thumb%25255B17%25255D.png?imgmax=800" width="785" height="165" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;then all back to normal. Hope it helps    &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-5107862920367870253?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/5107862920367870253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=5107862920367870253&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5107862920367870253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5107862920367870253'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/10/coherence-push-replication.html' title='Coherence push replication, com.tangosol.net.DefaultConfigurableCacheFactory cannot be cast to com.oracle.coherence.environment.Environment'/><author><name>MyNote on every bits</name><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://lh3.ggpht.com/-BWoB-URgh8o/TqbmjRMb8oI/AAAAAAAADjc/LaP2HZKi5mk/s72-c/image_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-5494299972637929730</id><published>2011-10-18T18:00:00.001-07:00</published><updated>2011-10-18T18:00:26.807-07:00</updated><title type='text'>Android, Get the Process ID and Thread ID</title><content type='html'>&lt;p&gt;When you debug the Multi-Thread app in android, it will be better that you can tell the activity thread id. so I have one Simple Line of Code to dumpout the logcat message, time, processid, thread id and the message.&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="710"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#897687" valign="top" width="708"&gt;         &lt;p&gt;public static void MLog(String msg) {           &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Log.d(&amp;quot;xxxnew&amp;quot;, String.format(&amp;quot;at %s Process ID %s, Thread ID %s %s&amp;#160;&amp;#160; &amp;quot;, new Date().toString(),&amp;#160; Process.myPid(),Process.myTid(),msg));            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-NO6Lu6DTnG8/Tp4hKGwSm0I/AAAAAAAADhI/U380E1l4Tp0/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-n46Pw6Fo6oY/Tp4hKg_q_vI/AAAAAAAADhQ/yrzCYwsfVXM/image_thumb%25255B2%25255D.png?imgmax=800" width="707" height="51" /&gt;&lt;/a&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-5494299972637929730?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/5494299972637929730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=5494299972637929730&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5494299972637929730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5494299972637929730'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/10/android-get-process-id-and-thread-id.html' title='Android, Get the Process ID and Thread ID'/><author><name>MyNote on every bits</name><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://lh3.ggpht.com/-n46Pw6Fo6oY/Tp4hKg_q_vI/AAAAAAAADhQ/yrzCYwsfVXM/s72-c/image_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-863284042429403172</id><published>2011-10-15T23:14:00.001-07:00</published><updated>2011-10-15T23:14:01.979-07:00</updated><title type='text'>HP Notebook, stuck on booting screen, Status: 0xc00000e9</title><content type='html'>&lt;p&gt;some bad day, My HP pavilion stuck on the booting screen, here is what it looks like,   &lt;br /&gt;Status: 0xc00000e9    &lt;br /&gt;Info: An unexpected I/0 error has occurred.    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-gy_Zfi_az0Y/Tpp2GQRTzoI/AAAAAAAADfA/WCtnzzSp5CY/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-XEhVX_E_eK8/Tpp2G-EjqSI/AAAAAAAADfI/_gPyvF5QL7w/image_thumb%25255B1%25255D.png?imgmax=800" width="629" height="488" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;So basically, it’s an IO error, for sure, should be disk IO error. then I go to the bios, Diagnostics-&amp;gt; hard drive test,    &lt;br /&gt;Get an 303 error, looks like 404 for geeks,     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-Te8W3B_pevI/Tpp2IsnlRII/AAAAAAAADfQ/xGUSJxdZtQ8/s1600-h/image%25255B8%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-ONuvWs70rJ4/Tpp2KGvx0ZI/AAAAAAAADfY/hGVBpGoWyQA/image_thumb%25255B4%25255D.png?imgmax=800" width="696" height="412" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;here is the HP error codes, &lt;a href="http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c01443317"&gt;http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c01443317&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;No magic, the hard drive died, replace a new one will fix the issue.    &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-863284042429403172?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/863284042429403172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=863284042429403172&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/863284042429403172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/863284042429403172'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/10/hp-notebook-stuck-on-booting-screen.html' title='HP Notebook, stuck on booting screen, Status: 0xc00000e9'/><author><name>MyNote on every bits</name><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://lh5.ggpht.com/-XEhVX_E_eK8/Tpp2G-EjqSI/AAAAAAAADfI/_gPyvF5QL7w/s72-c/image_thumb%25255B1%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-4726676588857445407</id><published>2011-10-14T13:31:00.001-07:00</published><updated>2011-10-14T16:26:40.073-07:00</updated><title type='text'>Hadoop Hbase, Test JAVA client and inspect the network flow</title><content type='html'>&lt;p&gt;I just setup three VMS, with the following roles&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="701" bgcolor="#456574"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;192.168.209.130 /HOME&lt;/td&gt;        &lt;td valign="top" width="499"&gt;NameNode, HbaseMaster(Standby server), Region Server, Zookeeper&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;192.168.209.132 /LA&lt;/td&gt;        &lt;td valign="top" width="499"&gt;DateNode, HbaseMaster (Active One), Region Server, Zookeeper&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;192.168.209.133 /NJ&lt;/td&gt;        &lt;td valign="top" width="499"&gt;Zookeeper&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;br /&gt;then I create one basic table, called ‘customer’ with Info as the only one column family.   &lt;br /&gt;  &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-D5wZZcQSBd4/Tpib_fLnwII/AAAAAAAADcM/nJcQnXaqyn4/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-0WKSZnOTYh0/Tpib_5XYJjI/AAAAAAAADcU/QM1JXqkPNk4/image_thumb%25255B1%25255D.png?imgmax=800" width="827" height="120" /&gt;&lt;/a&gt;   &lt;br /&gt;  &lt;br /&gt;then on the client machine which is win 7, I write a simple HBASE client to push some data to the HBASE. client runs on 192.168.209.1, Here is the Code.&amp;#160; &lt;br /&gt;  &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-LDJqPorqrRU/TpicBN8zL2I/AAAAAAAADcc/3PqPS-ZitUc/s1600-h/image%25255B52%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-xz1LRTrdUmU/TpicBoEe91I/AAAAAAAADck/wa08bLr9ZUY/image_thumb%25255B34%25255D.png?imgmax=800" width="568" height="345" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;  &lt;br /&gt;on the client side, you need reference the HBASE jars , and put the conf folder into the classpath. in the client hbase-site.xml, just point to the zookeeper instances. Here I put three ZK quorums.   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-4fVV0Zga9a4/TpicCKeZOyI/AAAAAAAADcs/eBCIHb8SNos/s1600-h/image%25255B17%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-H-whvsmP8AI/TpicCoe-rSI/AAAAAAAADc0/1De4zprJpPM/image_thumb%25255B11%25255D.png?imgmax=800" width="643" height="231" /&gt;&lt;/a&gt;   &lt;p&gt;Then run the program, after done. you can tell from the hbase&amp;#160; shell, 5 records are there.    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-vWqjRxDn-XE/TpicDIgOsHI/AAAAAAAADc8/-aNPWSTXWyA/s1600-h/image%25255B30%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-rVgjihYF4I4/TpicD9kcWRI/AAAAAAAADdE/ymW2SmA4I3w/image_thumb%25255B20%25255D.png?imgmax=800" width="834" height="200" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;from the client, you can tell from the console log. it will first talk to zookeeper, to get which master is active. then&amp;#160; query the root region, then the meta region information.     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-Qdwcl_BrCiw/TpicFI9ribI/AAAAAAAADdM/teeFKlhYnwo/s1600-h/image%25255B35%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-O52jU-OmOxY/TpicF5jRzNI/AAAAAAAADdU/VSPLjhvfXlw/image_thumb%25255B23%25255D.png?imgmax=800" width="1059" height="137" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;after that, it will write data to the corresponding regions server directly.     &lt;br /&gt;    &lt;br /&gt;here is the network flow layout.     &lt;br /&gt;First, setup TCP connection with Zookeeper, to locate the master server.&amp;#160; 2181 is the zookeeper Listening Port.     &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-GZxl47tI2Tk/TpicGUALjzI/AAAAAAAADdc/bMjCXANjInM/s1600-h/image%25255B40%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-oROXcwpfPt8/TpicHJVvITI/AAAAAAAADdk/q7FUXrvpqqU/image_thumb%25255B26%25255D.png?imgmax=800" width="544" height="581" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Then talk to Root region server which is LA to get the region allocation.    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-xFG4a31Bnrg/TpicH00WanI/AAAAAAAADds/U61dIVIndEc/s1600-h/image%25255B45%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-GPTg9j7pINk/TpicIl9VlcI/AAAAAAAADd0/NkgZf397uQ4/image_thumb%25255B29%25255D.png?imgmax=800" width="550" height="459" /&gt;&lt;/a&gt;     &lt;br /&gt;once it has those information, it will cached in memory. then put the data to that regions server directly.     &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-wyPpaxDrkTc/TpicJbQlnEI/AAAAAAAADd8/IqKEGcnsvcs/s1600-h/image%25255B51%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-r6MN7z0znXQ/TpicK9rq60I/AAAAAAAADeE/x51W-vGsMds/image_thumb%25255B33%25255D.png?imgmax=800" width="519" height="381" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;that’s all the client conversation. (client , zookeeper, region server.)&lt;/p&gt;  &lt;p&gt;The general communication flow is that a new client contacts the ZooKeeper ensemble   &lt;br /&gt;(a separate cluster of ZooKeeper nodes) first when trying to access a particular row. It    &lt;br /&gt;does so by retrieving the server name (i.e., hostname) that hosts the -ROOT- region from    &lt;br /&gt;ZooKeeper. With this information it can query that region server to get the server name    &lt;br /&gt;that hosts the .META. table region containing the row key in question. Both of these    &lt;br /&gt;details are cached and only looked up once. Lastly, it can query the reported .META.    &lt;br /&gt;server and retrieve the server name that has the region containing the row key the client    &lt;br /&gt;is looking for.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-4726676588857445407?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/4726676588857445407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=4726676588857445407&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/4726676588857445407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/4726676588857445407'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/10/hadoop-hbase-test-java-client-and.html' title='Hadoop Hbase, Test JAVA client and inspect the network flow'/><author><name>MyNote on every bits</name><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://lh4.ggpht.com/-0WKSZnOTYh0/Tpib_5XYJjI/AAAAAAAADcU/QM1JXqkPNk4/s72-c/image_thumb%25255B1%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-8089299433157590379</id><published>2011-08-27T22:25:00.001-07:00</published><updated>2011-08-27T22:25:48.911-07:00</updated><title type='text'>Oops, Youtube support team are trained monkeys</title><content type='html'>&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-r3_R362p9is/TlnRWrd0EQI/AAAAAAAADIE/HEx-CXvGAUU/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-32BMDP66hzM/TlnRXKIYRVI/AAAAAAAADII/mAaHgCYSipU/image_thumb%25255B2%25255D.png?imgmax=800" width="553" height="420" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;500 Internal Server Error&lt;/h3&gt;  &lt;p&gt;Sorry, something went wrong.   &lt;br /&gt;A team of highly trained monkeys has been dispatched to deal with this situation.&lt;/p&gt;  &lt;p&gt;If you see them, show them this information:&lt;/p&gt;  &lt;pre&gt;WFlEO-pxslLQKQ8jn5sBkCwnuuZg1YYqX9bVND5_m5gRtSxuruNgKsTd17lg&lt;br /&gt;uIm1sVMS98fpTtpzlNX96mH1WLq79xMZUvOLdhFvKX_WGYFfc38YlrkAm23q&lt;br /&gt;kPFJ7mrbT12tQundh7bk1y0TEqJfe0SA336fLvzgVEm1tt8oIf8-ib7CH3QQ&lt;br /&gt;n11bbMFCY1iJgCn1ezZIl1rXHkmuRU9xrlQ4d-XrG1JmJtaRRFY1kklSloUj&lt;br /&gt;JECppOrM0wAaZXFODfOpE_ZQXT0iJk46_YrqBf0-rD7nXYmruWZqU4zcnvWN&lt;br /&gt;tnXr70fXkkBoVohlx-yC7GiBtceyBSPMYhotqQD2gE7JMa_LtCXflVx15Hs3&lt;br /&gt;yfKiDZIcjiaQ5U1L2YHgXwplA4SiOJ2SRM2HI1DO9_9bs9qMKWPvc-OUt3nV&lt;br /&gt;PmZHNdlYW143KHOCRqZv0m19bQ2vxXhZjEHfc8GrLZu3Vz3_y1QvVAt4lj5J&lt;br /&gt;2UPBp6mJvmB3Ouzak6VN1jXSa24n8gXE5VrGNcnWs1GKCpGNd6yRQWpq9shw&lt;br /&gt;BF1eygVB8mZri2xeUBh4vLZ7pwEj06c-qmJr4RItLLXWT8CMqeM6KrYxWr6g&lt;/pre&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-8089299433157590379?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/8089299433157590379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=8089299433157590379&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/8089299433157590379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/8089299433157590379'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/08/oops-youtube-support-team-are-trained.html' title='Oops, Youtube support team are trained monkeys'/><author><name>MyNote on every bits</name><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://lh6.ggpht.com/-32BMDP66hzM/TlnRXKIYRVI/AAAAAAAADII/mAaHgCYSipU/s72-c/image_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-8649597876143438487</id><published>2011-08-22T17:34:00.001-07:00</published><updated>2011-08-22T17:34:11.944-07:00</updated><title type='text'>How To, Auto Suggesting with multi words/terms using solr ShingleFilterFactory</title><content type='html'>&lt;p&gt;Google has one amazing feature called auto sugesstion. basically, when you type one word, even just the prefix of the word, it will list the suggestion for you like this,    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-beInuWn6yp4/TlL1YAL47JI/AAAAAAAADE4/r1r82vQwvN0/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-eDXoRwwDLiw/TlL1YuKl7kI/AAAAAAAADE8/fdTslhKEkDM/image_thumb%25255B2%25255D.png?imgmax=800" width="383" height="184" /&gt;&lt;/a&gt;     &lt;br /&gt;Even further, google has one unknown REST API that you can use to query the auto-completion word lists provided by Google.     &lt;br /&gt;&lt;a href="http://google.com/complete/search?output=toolbar&amp;amp;q=%22intel+s%22"&gt;http://google.com/complete/search?output=toolbar&amp;amp;q=%22intel+s%22&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://lh3.ggpht.com/--kEF8m40h9U/TlL1ZO9QBBI/AAAAAAAADFA/JLu-FgVEKQQ/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-ZLDsW60tD9k/TlL1Z47cqtI/AAAAAAAADFE/Es45VDmb4UU/image_thumb%25255B5%25255D.png?imgmax=800" width="582" height="492" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For Apache Solr, If you want to do the same thing as google does, here is one simple approach. Just using the &lt;a href="http://lucene.apache.org/java/2_4_0/api/contrib-analyzers/org/apache/lucene/analysis/shingle/ShingleFilter.html" target="_blank"&gt;ShingleFilter&lt;/a&gt;,     &lt;br /&gt;    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="629"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#177654" valign="top" width="627"&gt;Create one text field that use this filter,            &lt;br /&gt;            &lt;p&gt;&amp;lt;fieldType name=&amp;quot;text_shingle&amp;quot; class=&amp;quot;solr.TextField&amp;quot; positionIncrementGap=&amp;quot;100&amp;quot;&amp;gt;              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;analyzer&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;tokenizer class=&amp;quot;solr.StandardTokenizerFactory&amp;quot;/&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;filter class=&amp;quot;solr.LowerCaseFilterFactory&amp;quot;/&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;filter class=&amp;quot;solr.&lt;u&gt;ShingleFilterFactory&lt;/u&gt;&amp;quot; maxShingleSize=&amp;quot;4&amp;quot; outputUnigrams=&amp;quot;true&amp;quot;/&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/analyzer&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/fieldType&amp;gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;Then create one field to use that field type   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-ZLfwtesdWXs/TlL1aeFmDLI/AAAAAAAADFI/NhTzIJ_cHwc/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-xL1j9AAE9Ck/TlL1bF_Y12I/AAAAAAAADFM/VsFymwOVWHU/image_thumb%25255B8%25255D.png?imgmax=800" width="647" height="56" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After that, we can post a simple document to the Solr, I will put one wiki page, &lt;a href="http://en.wikipedia.org/wiki/X25-M"&gt;http://en.wikipedia.org/wiki/X25-M&lt;/a&gt; to the solr.&lt;/p&gt;  &lt;p&gt;you can just create one doc and post it to solr using curl &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-PzOqeCtWXyA/TlL1boAllXI/AAAAAAAADFQ/NAacEFvPB64/s1600-h/image%25255B19%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-ZoCqKDrifE8/TlL1ckrJ6aI/AAAAAAAADFU/YHxEaHt0tGc/image_thumb%25255B11%25255D.png?imgmax=800" width="611" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-YVmlDBMuUFk/TlL1dMJOpaI/AAAAAAAADFY/hEGlmnJ1gHs/s1600-h/image%25255B24%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-ljiTnOflDLI/TlL1dhW-olI/AAAAAAAADFc/5AOlxBnoDZI/image_thumb%25255B14%25255D.png?imgmax=800" width="1032" height="100" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Now you can go to the solr admin to check the description terms, you will see those multi-word terms&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-ZGPhq-O58VY/TlL1eD-ESDI/AAAAAAAADFg/K9san8db3GQ/s1600-h/image%25255B29%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-R_vc0GlMBeE/TlL1fRoEJSI/AAAAAAAADFk/DNjLdDo5cfQ/image_thumb%25255B17%25255D.png?imgmax=800" width="954" height="741" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;for application, we can run a facet query to get the keyword list and count.    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-dmPbVh2voOE/TlL1fjWtN8I/AAAAAAAADFo/AyD9zeXgPEc/s1600-h/image%25255B34%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-wy4cS4Fs768/TlL1gWk8LAI/AAAAAAAADFs/yAvu6DrEyTE/image_thumb%25255B20%25255D.png?imgmax=800" width="484" height="494" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://localhost:8080/solrmaster/select/?q=description%3A*&amp;amp;version=2.2&amp;amp;start=0&amp;amp;rows=0&amp;amp;indent=on&amp;amp;facet=true&amp;amp;facet.field=description&amp;amp;facet.prefix=02g2"&gt;http://localhost:8080/solrmaster/select/?q=description%3A*&amp;amp;version=2.2&amp;amp;start=0&amp;amp;rows=0&amp;amp;indent=on&amp;amp;facet=true&amp;amp;facet.field=description&amp;amp;facet.prefix=02g2&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;pretty simple to get started&lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://lh4.ggpht.com/-AEq70t6-IrI/TlL1gvbT_iI/AAAAAAAADFw/jtZXAzOd3xI/wlEmoticon-smile%25255B2%25255D.png?imgmax=800" /&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-8649597876143438487?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/8649597876143438487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=8649597876143438487&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/8649597876143438487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/8649597876143438487'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/08/how-to-auto-suggesting-with-multi.html' title='How To, Auto Suggesting with multi words/terms using solr ShingleFilterFactory'/><author><name>MyNote on every bits</name><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://lh6.ggpht.com/-eDXoRwwDLiw/TlL1YuKl7kI/AAAAAAAADE8/fdTslhKEkDM/s72-c/image_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-7925425566925882743</id><published>2011-08-17T21:44:00.001-07:00</published><updated>2011-08-17T21:44:59.817-07:00</updated><title type='text'>How to, Hadoop , error to start Jobtracker of hadoop, FATAL org.apache.hadoop.mapred.JobTracker: java.lang.RuntimeException: Not a host:port pair: local</title><content type='html'>&lt;p&gt;One day, I just created a fresh centos and download/install the hadoop, by default it runs on local mode. so I just change the config to run in distributed mode. When I run bin/start-all.sh. get the follow errors in the tasktrackr log.    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="861"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td style="background: #908765" valign="top" width="859"&gt;           &lt;p&gt;2011-08-16 21:00:12,136 INFO org.apache.hadoop.mapred.JobTracker: STARTUP_MSG:              &lt;br /&gt;/************************************************************               &lt;br /&gt;STARTUP_MSG: Starting JobTracker               &lt;br /&gt;STARTUP_MSG:&amp;#160;&amp;#160; host = hadoop/192.168.209.131               &lt;br /&gt;STARTUP_MSG:&amp;#160;&amp;#160; args = []               &lt;br /&gt;STARTUP_MSG:&amp;#160;&amp;#160; version = 0.20.2               &lt;br /&gt;STARTUP_MSG:&amp;#160;&amp;#160; build = &lt;a href="https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20"&gt;https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20&lt;/a&gt; -r 911707; compiled by 'chrisdo' on Fri Feb 19 08:07:34 UTC 2010               &lt;br /&gt;************************************************************/               &lt;br /&gt;2011-08-16 21:00:12,280 WARN org.apache.hadoop.conf.Configuration: bad conf file: element not &amp;lt;property&amp;gt;               &lt;br /&gt;2011-08-16 21:00:12,280 WARN org.apache.hadoop.conf.Configuration: bad conf file: element not &amp;lt;property&amp;gt;               &lt;br /&gt;2011-08-16 21:00:12,280 WARN org.apache.hadoop.conf.Configuration: bad conf file: element not &amp;lt;property&amp;gt;               &lt;br /&gt;2011-08-16 21:00:12,299 INFO org.apache.hadoop.mapred.JobTracker: Scheduler configured with (memSizeForMapSlotOnJT, memSizeForReduceSlotOnJT, limitMaxMemForMapTasks, limitMaxMemForReduceTasks) (-1, -1, -1, -1)               &lt;br /&gt;2011-08-16 21:00:12,344 &lt;font color="#ff0000"&gt;&lt;u&gt;FATAL org.apache.hadoop.mapred.JobTracker: java.lang.RuntimeException: Not a host:port pair: local                  &lt;br /&gt;&lt;/u&gt;&lt;/font&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:136)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:123)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at org.apache.hadoop.mapred.JobTracker.getAddress(JobTracker.java:1807)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at org.apache.hadoop.mapred.JobTracker.&amp;lt;init&amp;gt;(JobTracker.java:1579)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at org.apache.hadoop.mapred.JobTracker.startTracker(JobTracker.java:183)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at org.apache.hadoop.mapred.JobTracker.startTracker(JobTracker.java:175)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at org.apache.hadoop.mapred.JobTracker.main(JobTracker.java:3702)               &lt;br /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;it looks like the runtime still pick up the default mapreduce configuration located in the hadoop-x.core.jar, you can get this file by unzipping hadoopcore.jar,     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-IVFtC9QsQ5w/TkyYxE_npPI/AAAAAAAAC_E/wiWCdrGNHcU/s1600-h/image4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-I3ziGtYbXqc/TkyYxWQ4_NI/AAAAAAAAC_I/17_kQPwAexY/image_thumb2.png?imgmax=800" width="628" height="347" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-x4n_ju2f0OE/TkyYxkecutI/AAAAAAAAC_M/GJ8iElidz8o/s1600-h/image9.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-ElAXvB70gso/TkyYx5GaOCI/AAAAAAAAC_Q/o2Hvb_ZSybA/image_thumb5.png?imgmax=800" width="603" height="307" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So the error means it pick up this default setting of Local. Then I read careflly about the mapred-site.xml, here it is.    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-sjrR9NPKeJk/TkyYyByuSBI/AAAAAAAAC_U/eOVslCjWsvI/s1600-h/image14.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-zTzNq8zSQFM/TkyYybKS-rI/AAAAAAAAC_Y/7XgdSi2Uhoo/image_thumb8.png?imgmax=800" width="562" height="263" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It looks like perfect, right, cause I just copied the setting from the default xml, while, I just keep the weird error.    &lt;br /&gt;well, here is final xml that works great, I highlighted the difference, I forgot to put the property tag. so the runtime will ignore this xml and pick up the default settings.     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-ZoQw_9Shvd4/TkyYypLrXrI/AAAAAAAAC_c/wJGEKUk0QiU/s1600-h/image19.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-HgTgNE5PZOg/TkyYy5irilI/AAAAAAAAC_g/iW4SXAWklhs/image_thumb11.png?imgmax=800" width="571" height="256" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;Summary, when you get weird error, check the log first, then make sure those conf xml are in right format that comforts the scheme     &lt;br /&gt;tricky, hah?&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-7925425566925882743?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/7925425566925882743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=7925425566925882743&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/7925425566925882743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/7925425566925882743'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/08/how-to-hadoop-error-to-start-jobtracker.html' title='How to, Hadoop , error to start Jobtracker of hadoop, FATAL org.apache.hadoop.mapred.JobTracker: java.lang.RuntimeException: Not a host:port pair: local'/><author><name>MyNote on every bits</name><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://lh6.ggpht.com/-I3ziGtYbXqc/TkyYxWQ4_NI/AAAAAAAAC_I/17_kQPwAexY/s72-c/image_thumb2.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-6236807986276876621</id><published>2011-08-02T10:45:00.001-07:00</published><updated>2011-08-02T10:48:33.662-07:00</updated><title type='text'>Download Bing.com Daily Wallpaper App for Android</title><content type='html'>&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-LIn4Sr9B_to/Tjg3wveUlLI/AAAAAAAAC4k/eKDk9fwjB00/s1600-h/bing%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="bing" border="0" alt="bing" src="http://lh6.ggpht.com/-6moB-NqFkhc/Tjg3xLvBIOI/AAAAAAAAC4o/55lkjkCWGXQ/bing_thumb.png?imgmax=800" width="214" height="214" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="https://market.android.com/details?id=com.androidyou.bing&amp;amp;feature=search_result"&gt;https://market.android.com/details?id=com.androidyou.bing&amp;amp;feature=search_result&lt;/a&gt;    &lt;br /&gt;Features, &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Save images to use them as your Android wallpaper &lt;/li&gt;    &lt;li&gt;Access and download Bing's daily wallpapers &lt;/li&gt;    &lt;li&gt;Read comments on wallpaper images &lt;/li&gt;    &lt;li&gt;Share images via e-mail or your favorite social networking site &lt;/li&gt;    &lt;li&gt;Recall and view your download history &lt;/li&gt;    &lt;li&gt;set as wallpaper automatically &lt;/li&gt;    &lt;li&gt;background run &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;AD Free Edition,    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-YadDI0VYA6g/Tjg3xRzH1yI/AAAAAAAAC4s/RIM3L0oaG1k/s1600-h/bingdx%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="bingdx" border="0" alt="bingdx" src="http://lh6.ggpht.com/-7oL12aOb7Jk/Tjg3xr1LFgI/AAAAAAAAC4w/YjsF8BsB3qc/bingdx_thumb.png?imgmax=800" width="214" height="214" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-6236807986276876621?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/6236807986276876621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=6236807986276876621&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/6236807986276876621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/6236807986276876621'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/08/download-bingcom-daily-wallpaper-app.html' title='Download Bing.com Daily Wallpaper App for Android'/><author><name>MyNote on every bits</name><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://lh6.ggpht.com/-6moB-NqFkhc/Tjg3xLvBIOI/AAAAAAAAC4o/55lkjkCWGXQ/s72-c/bing_thumb.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-6815382202370817462</id><published>2011-08-01T17:45:00.001-07:00</published><updated>2011-08-01T17:45:29.174-07:00</updated><title type='text'>Exchange 2010 Provisioning using ILM 2007</title><content type='html'>&lt;p&gt;If you just upgraded Exchange to 2010, and still using the ILM 2007. you need install the SP1 and featured package, the only document you can follow is &lt;a title="http://technet.microsoft.com/en-us/magazine/ff472471.aspx" href="http://technet.microsoft.com/en-us/magazine/ff472471.aspx"&gt;http://technet.microsoft.com/en-us/magazine/ff472471.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Basically, for the provisioning to exchange 2010 mailbox. you have call the utility to create a mailbox in your Povision DLL.something like,    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="735"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#6d7b8d" valign="top" width="733"&gt;           &lt;p&gt;void IMVSynchronization.Provision (MVEntry mventry)              &lt;br /&gt;{               &lt;br /&gt;ConnectedMA adMA;               &lt;br /&gt;CSEntry csentry;               &lt;br /&gt;String nickName, mailboxMDB;               &lt;br /&gt;ReferenceValue dn;&lt;/p&gt;            &lt;p&gt;try              &lt;br /&gt;{               &lt;br /&gt;adMA = mventry.ConnectedMAs[&amp;quot;Fabrikam AD MA&amp;quot;];&lt;/p&gt;            &lt;p&gt;nickName = mventry[&amp;quot;mailNickname&amp;quot;].Value;              &lt;br /&gt;mailboxMDB = mventry[&amp;quot;homeMDB&amp;quot;].Value;&lt;/p&gt;            &lt;p&gt;// Construct the distinguished name              &lt;br /&gt;dn = adMA.EscapeDNComponent(&amp;quot;CN=&amp;quot; + mventry[&amp;quot;cn&amp;quot;].Value).Concat(&amp;quot;ou=mailboxes,dc=fabrikam,dc=com&amp;quot;);&lt;/p&gt;            &lt;p&gt;if(0 == adMA.Connectors.Count)              &lt;br /&gt;{               &lt;br /&gt;&amp;#160;&lt;font color="#ff0000"&gt;csentry = ExchangeUtils.CreateMailbox(adMA, dn, nickName, mailboxMDB);&lt;/font&gt;               &lt;br /&gt;}               &lt;br /&gt;}&lt;/p&gt;            &lt;p&gt;// Handle any exceptions              &lt;br /&gt;catch(Exception ex)               &lt;br /&gt;{               &lt;br /&gt;//...               &lt;br /&gt;}               &lt;br /&gt;}&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;For the Magic code in CreateMailBox, you can see the source code. it basically add several attributes there,    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-rVa1CJbI3B8/TjdInLZd4EI/AAAAAAAAC4E/vewhhzDLA5U/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-daRX6UGIOtc/TjdInqDcyRI/AAAAAAAAC4I/CMzxO1biW98/image_thumb%25255B2%25255D.png?imgmax=800" width="644" height="453" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;After that, also you should config the AD ma to run the extension Code , you need to specify the Powershell remote address, and Extension of 2010 or 2007 ,     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-GXhqxCSpRoY/TjdIoHx6GDI/AAAAAAAAC4M/waDZeU8W8OE/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/--SG51NRJA7A/TjdIoYVwSuI/AAAAAAAAC4Q/JhE_F9XoFkI/image_thumb%25255B5%25255D.png?imgmax=800" width="548" height="143" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;After those two major change been applied, the ILM will call the provision code to create the mailbox, and Run the Extension Code for every object listed in the pending export stage of the Connected Space. there are two Extension DLLs in the ILM Extension Folder.     &lt;br /&gt;Extension2007 and Extension2010.dll     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-4sonHlDaKdY/TjdIorVsN5I/AAAAAAAAC4U/RAhbI1baXK4/s1600-h/image%25255B16%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/--jKsv-rMwCM/TjdIpMbXhlI/AAAAAAAAC4Y/BOxEpEI3P0U/image_thumb%25255B8%25255D.png?imgmax=800" width="241" height="37" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;for the code in Exch20xxExtension.dll, it basically call the powershell command remotly on the server you specified in the RPS URI.     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-9zX6ljQN6Ng/TjdIpceiOqI/AAAAAAAAC4c/BcRjPL1V-z0/s1600-h/image%25255B21%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-fmD8dHP8BhE/TjdIp1bKxUI/AAAAAAAAC4g/mLrpHbtdtSk/image_thumb%25255B11%25255D.png?imgmax=800" width="595" height="486" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;basically, call the PowerShell command remotely. &lt;/p&gt;  &lt;p&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="586"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#6d7b8d" valign="top" width="584"&gt;Update-Recipient -Identity &amp;quot;&amp;lt;ExportedDN&amp;gt;&amp;quot;-Credential &amp;lt;PSCredential&amp;gt; -DomainController &amp;lt;Fqdn&amp;gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Here is the pain you may have.     &lt;br /&gt;ILM will call this command for every Object which has some pending export in the MA. even just a title change, it will call the Update-receipent , which may cause the default mailpolicy to run. (in some case, this is not what you want, i.e you have different mail policy. )    &lt;br /&gt;    &lt;br /&gt;however, we have the Extension point.     &lt;br /&gt;you can get the source code of the extension dll, put you logic there, and sign the new dll. which will be picked up by ILM.&amp;#160; &lt;br /&gt;you can do some loggin there, or check wheter the object is required to run the update-recepient command. or even just call you powershell command. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-6815382202370817462?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/6815382202370817462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=6815382202370817462&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/6815382202370817462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/6815382202370817462'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/08/exchange-2010-provisioning-using-ilm.html' title='Exchange 2010 Provisioning using ILM 2007'/><author><name>MyNote on every bits</name><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://lh6.ggpht.com/-daRX6UGIOtc/TjdInqDcyRI/AAAAAAAAC4I/CMzxO1biW98/s72-c/image_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-5177414787422056805</id><published>2011-07-27T09:56:00.001-07:00</published><updated>2011-07-27T09:56:06.490-07:00</updated><title type='text'>How to Install ADB Driver for HTC Inspire 4G</title><content type='html'>&lt;p&gt;following&amp;#160; &lt;a href="http://androidyou.blogspot.com/2011/03/adb-driver-for-htc-wildfire-and-t.html"&gt;ADB Driver for HTC wildfire and T-Mobile G2&lt;/a&gt;, add the entries to the android_winusb.inf,    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="533"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="531"&gt;           &lt;p&gt;; HTC Inspire             &lt;br /&gt;&amp;#160; %SingleAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_0BB4&amp;amp;PID_0CA2              &lt;br /&gt; %CompositeAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_0BB4&amp;amp;PID_0CA2&amp;amp;MI_01              &lt;br /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;then go to device manager, refresh the device to install the driver.&amp;#160; that’s it.     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-xrrM890duFo/TjBDIMb_C1I/AAAAAAAAC1w/Ym6-v9-5ySQ/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-N4oRZJjPwDg/TjBDIVvfs_I/AAAAAAAAC10/k3rxDf85ufQ/image_thumb%25255B1%25255D.png?imgmax=800" width="242" height="74" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It’s there in the device manager,   &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-fIpie1or4A4/TjBDI3RjHsI/AAAAAAAAC14/dspQQ1RPvsM/s1600-h/image%25255B8%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-_sxsJufxRq4/TjBDJT0QbJI/AAAAAAAAC18/9pTgFkc4ZoM/image_thumb%25255B4%25255D.png?imgmax=800" width="357" height="196" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;more about ADB drivers,     &lt;br /&gt;&lt;a href="http://androidyou.blogspot.com/2011/03/adb-driver-for-htc-wildfire-and-t.html"&gt;ADB Driver for HTC wildfire and T-Mobile G2&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://androidyou.blogspot.com/2011/04/how-to-install-adb-driver-for-motorola.html"&gt;My Note on Solutions.: How to: install &lt;b&gt;ADB driver&lt;/b&gt; for Motorola Xoom&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://androidyou.blogspot.com/2011/05/install-adb-driver-for-samsung-galaxy.html"&gt;Install ADB Driver for Samsung galaxy tablet 10.1 from google io /Samsung galaxy SGH-T959&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-5177414787422056805?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/5177414787422056805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=5177414787422056805&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5177414787422056805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5177414787422056805'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/07/how-to-install-adb-driver-for-htc.html' title='How to Install ADB Driver for HTC Inspire 4G'/><author><name>MyNote on every bits</name><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://lh5.ggpht.com/-N4oRZJjPwDg/TjBDIVvfs_I/AAAAAAAAC10/k3rxDf85ufQ/s72-c/image_thumb%25255B1%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-5200555580880004390</id><published>2011-07-22T23:16:00.000-07:00</published><updated>2011-07-22T23:16:23.809-07:00</updated><title type='text'>Android Developers Blog: Multiple APK Support in Android Market</title><content type='html'>&lt;a href="http://android-developers.blogspot.com/2011/07/multiple-apk-support-in-android-market.html"&gt;Android Developers Blog: Multiple APK Support in Android Market&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What a great idea, Android rocks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-5200555580880004390?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://android-developers.blogspot.com/2011/07/multiple-apk-support-in-android-market.html' title='Android Developers Blog: Multiple APK Support in Android Market'/><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/5200555580880004390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=5200555580880004390&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5200555580880004390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5200555580880004390'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/07/android-developers-blog-multiple-apk.html' title='Android Developers Blog: Multiple APK Support in Android Market'/><author><name>MyNote on every bits</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-3354966036287538969</id><published>2011-06-16T14:14:00.001-07:00</published><updated>2011-06-16T14:14:42.532-07:00</updated><title type='text'>How to : Set Android WebView HTTP Referrer programmatically</title><content type='html'>&lt;p&gt;In Android, you may use the webview.LoadData to show html. using the following code, &lt;/p&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="577"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#989876" valign="top" width="575"&gt;         &lt;p&gt;public class WebViewTestActivity extends Activity {&lt;/p&gt;          &lt;p&gt;WebView wv;&lt;/p&gt;          &lt;p&gt;@Override            &lt;br /&gt;protected void onCreate(Bundle savedInstanceState) {             &lt;br /&gt;super.onCreate(savedInstanceState);             &lt;br /&gt;setContentView(R.layout.mainbrownser);             &lt;br /&gt;wv = (WebView) findViewById(R.id.wv);             &lt;br /&gt;wv.getSettings().setJavaScriptEnabled(true);             &lt;br /&gt;wv.loadData(             &lt;br /&gt;&amp;quot;&amp;lt;img src='&lt;a href="http://images.google.com/intl/en_ALL/images/logos/images_logo_lg.gif'"&gt;http://images.google.com/intl/en_ALL/images/logos/images_logo_lg.gif'&lt;/a&gt;&amp;gt;&amp;quot;,             &lt;br /&gt;&amp;quot;text/html&amp;quot;, &amp;quot;UTF-8&amp;quot;);             &lt;br /&gt;}&lt;/p&gt;          &lt;p&gt;}&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;   &lt;br /&gt;When you run the app, you can see the google logo there,     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-VhigSA5y_6I/Tfpx4yd-x3I/AAAAAAAACpk/cRhRIKJzLsY/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-2oxjx2WXgWQ/Tfpx6aKmfoI/AAAAAAAACpo/nYsDJHnCx9c/image_thumb%25255B2%25255D.png?imgmax=800" width="371" height="556" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;however, if you try to access some image whose server will check the referrer, you will be in trouble to viewing the image.     &lt;br /&gt;by default, the webview doesn’t setup the referrer when fetching html resouces,     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-4KTh1svQRzc/Tfpx7RA0rRI/AAAAAAAACps/gKPsfmIRyr4/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-dJBKE8YARGQ/Tfpx8XQv43I/AAAAAAAACpw/1mc-PcOwi2M/image_thumb%25255B5%25255D.png?imgmax=800" width="869" height="260" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;I searched a lot, there is no explicit way to setup the referrer . after checking the webview source code, here is the trick to setup the referrer, using the loaddatawithbaseurl, the baseurl will be the referrer picked by webview     &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/--PtfQ7WTv88/Tfpx9oJvfYI/AAAAAAAACp0/ts4hqq43O8g/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-51jp1Mut3d0/Tfpx-2wYIgI/AAAAAAAACp4/cZqcfWRgRwM/image_thumb%25255B8%25255D.png?imgmax=800" width="909" height="180" /&gt;&lt;/a&gt;Code,&lt;/p&gt;  &lt;p&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="736"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#989876" valign="top" width="734"&gt;           &lt;p&gt;wv.&lt;strong&gt;loadDataWithBaseURL&lt;font color="#ff0000"&gt;(&amp;quot;&lt;/font&gt;&lt;/strong&gt;&lt;a href="http://wwwgoogle.com/myreferrer&amp;quot;"&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;http://wwwgoogle.com/myreferrer&amp;quot;&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;,&lt;/font&gt;&lt;/strong&gt;               &lt;br /&gt;&amp;quot;&amp;lt;img src='&lt;a href="http://images.google.com/intl/en_ALL/images/logos/images_logo_lg.gif?a=1'"&gt;http://images.google.com/intl/en_ALL/images/logos/images_logo_lg.gif?a=1'&lt;/a&gt;&amp;gt;&amp;quot;,               &lt;br /&gt;&amp;quot;text/html&amp;quot;, &amp;quot;UTF-8&amp;quot;,&amp;quot;&amp;quot;);&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;Hope it helps,&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-3354966036287538969?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/3354966036287538969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=3354966036287538969&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3354966036287538969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3354966036287538969'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/06/how-to-set-android-webview-referrer.html' title='How to : Set Android WebView HTTP Referrer programmatically'/><author><name>MyNote on every bits</name><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://lh6.ggpht.com/-2oxjx2WXgWQ/Tfpx6aKmfoI/AAAAAAAACpo/nYsDJHnCx9c/s72-c/image_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-3743716880449031339</id><published>2011-06-13T11:23:00.001-07:00</published><updated>2011-06-13T11:23:35.931-07:00</updated><title type='text'>No provisioned iOS devices are available. Connect an iOS device or choose an iOS simulator as the destination.</title><content type='html'>&lt;p&gt;One day, I want to write a Iphone app for my son, then Just download the latest Xcode, and plug my Iphone to the Mac, supposedly,XCode should run the profile provisioning, I just click to Run the app. However, I get an error,   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-SagCgHZACqs/TfZVmRL-ZjI/AAAAAAAACoY/nqxQk8hh9Qs/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-X_puEEhSrWc/TfZVm5-qFtI/AAAAAAAACoc/lYyTFxCLFs0/image_thumb%25255B1%25255D.png?imgmax=800" width="416" height="148" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt; here, it’s a versioning issue, First, Click Window-&amp;gt;Organizer, check Iphone OS&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-1w-UhUsO4Ps/TfZVnWAZUSI/AAAAAAAACog/KoFbEJ0WT6M/s1600-h/image%25255B8%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-UNCPQHR7l5c/TfZVnmoMzBI/AAAAAAAACok/oqtpXXZAuhk/image_thumb%25255B4%25255D.png?imgmax=800" width="400" height="284" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So for the Phone, It runs on 4.2.1,then make sure project building setting, using the same base level of SDK&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-8w-cGc8XpaU/TfZVocfq-rI/AAAAAAAACoo/5YLcniUcksA/s1600-h/image%25255B15%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-yRvyTuGcly4/TfZVo8YNEPI/AAAAAAAACos/29HZLHRyeF8/image_thumb%25255B7%25255D.png?imgmax=800" width="755" height="242" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt; by default, Xcode use the lastest sdk , that’s why you see the error.     &lt;br /&gt;Switch it to 4.2, then you will see you device in the target list,    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-ZZQnAi4pG8U/TfZVpcgUi4I/AAAAAAAACow/YR7TRPDGQMU/s1600-h/image%25255B20%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-Zjs-_Vd0e5U/TfZVprVPkII/AAAAAAAACo0/TOm-8hXPuYA/image_thumb%25255B10%25255D.png?imgmax=800" width="461" height="167" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-3743716880449031339?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/3743716880449031339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=3743716880449031339&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3743716880449031339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3743716880449031339'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/06/no-provisioned-ios-devices-are.html' title='No provisioned iOS devices are available. Connect an iOS device or choose an iOS simulator as the destination.'/><author><name>MyNote on every bits</name><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://lh4.ggpht.com/-X_puEEhSrWc/TfZVm5-qFtI/AAAAAAAACoc/lYyTFxCLFs0/s72-c/image_thumb%25255B1%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-4664079047812716180</id><published>2011-06-08T16:23:00.001-07:00</published><updated>2011-06-08T16:23:18.287-07:00</updated><title type='text'>How to: Test if an object is of a specified type. instanceof JAVA, C# and Objective C</title><content type='html'>&lt;p&gt;In Java, just using the &lt;strong&gt;instanceof&lt;/strong&gt; keyword.     &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-VgidoqmZh58/TfAEWglaWKI/AAAAAAAACn0/8VpPN6XFNwk/s1600-h/image%25255B15%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-bHLqUIkNrrQ/TfAEXbv77CI/AAAAAAAACn4/iDCMOTVcknc/image_thumb%25255B9%25255D.png?imgmax=800" width="575" height="346" /&gt;&lt;/a&gt;    &lt;br /&gt;In C#, it has the similar syntax, Just called IS&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-VpGepPLuzyM/TfAEXoJtzXI/AAAAAAAACn8/jdDl7prIFF4/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-t5nFsxUzMtI/TfAEYb8fuhI/AAAAAAAACoA/ks4JuSrta0o/image_thumb%25255B2%25255D.png?imgmax=800" width="562" height="374" /&gt;&lt;/a&gt;&lt;/p&gt;      &lt;p&gt;In Objective-C, using keyword iskingofclass,   &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-vDALv2m3g20/TfAEYqXMYiI/AAAAAAAACoE/rmXdUjU4EHk/s1600-h/image%25255B20%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-yyDVwev4isU/TfAEZbewkKI/AAAAAAAACoI/JwQHdJXKfFk/image_thumb%25255B12%25255D.png?imgmax=800" width="570" height="288" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-4664079047812716180?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/4664079047812716180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=4664079047812716180&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/4664079047812716180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/4664079047812716180'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/06/how-to-test-if-object-is-of-specified.html' title='How to: Test if an object is of a specified type. instanceof JAVA, C# and Objective C'/><author><name>MyNote on every bits</name><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://lh5.ggpht.com/-bHLqUIkNrrQ/TfAEXbv77CI/AAAAAAAACn4/iDCMOTVcknc/s72-c/image_thumb%25255B9%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-5472757899626695728</id><published>2011-06-02T11:30:00.001-07:00</published><updated>2011-06-02T13:56:45.064-07:00</updated><title type='text'>How to get the SOS.DLL for silverlight  4.0.60310.0 for windbg</title><content type='html'>&lt;p&gt;If you want to do the Silverlight debugging using windbg, the first thing is you have to get the sos extension for Silverlight.    &lt;br /&gt;When I try to run the command ‘.loadby sos coreclr’    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-AGM2l21bSIQ/TefWvxBi0oI/AAAAAAAACnE/VJz5sf5KIgY/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-P93Ly39G_lk/TefWwZRuKmI/AAAAAAAACnI/vvvjsoxmCMY/image_thumb%25255B2%25255D.png?imgmax=800" width="854" height="66" /&gt;&lt;/a&gt;    &lt;br /&gt;get the error , it can’t find the sos.dll, in the silverlight folder,    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-I_Ky3BzMGc4/TefWw9zNTQI/AAAAAAAACnM/YryPEHDpxsU/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-U0hio84kbo4/TefWxdEDfoI/AAAAAAAACnQ/rIrHvHEpmsw/image_thumb%25255B5%25255D.png?imgmax=800" width="562" height="645" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;I try to google “how to get the sos.dll for silverglight4.’, nothing is helpful, then I spend a little time to figure out how to get the sos.dll. So here is the answer,    &lt;br /&gt;    &lt;br /&gt;1. Install visual studio 2010, if you are a developer, you probably have already installed the IDE    &lt;br /&gt;2. this is important, Download and install the &lt;a href="http://www.microsoft.com/downloads/en/confirmation.aspx?FamilyID=298170d6-567c-4b90-9917-490ffcddba87" target="_blank"&gt;Microsoft Silverlight 4.0 SDK&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;that’s IT.     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-ypAm0lcBjlA/TefWyJig9wI/AAAAAAAACnU/1itWatTie6E/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-1wwh87ZBDO8/TefWysp82zI/AAAAAAAACnY/bzFAAjtDifg/image_thumb%25255B8%25255D.png?imgmax=800" width="652" height="200" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;#1 is very important, if you skip it and install the SDK only, it wont install the sos.dll for you. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-5472757899626695728?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/5472757899626695728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=5472757899626695728&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5472757899626695728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5472757899626695728'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/06/how-to-get-sosdll-for-silverlight.html' title='How to get the SOS.DLL for silverlight  4.0.60310.0 for windbg'/><author><name>MyNote on every bits</name><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://lh3.ggpht.com/-P93Ly39G_lk/TefWwZRuKmI/AAAAAAAACnI/vvvjsoxmCMY/s72-c/image_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-5552510007736380882</id><published>2011-05-31T15:59:00.001-07:00</published><updated>2011-05-31T16:22:49.909-07:00</updated><title type='text'>IronRuby Tutorial, Ruby For C# programmers,Part 1</title><content type='html'>&lt;p&gt;IronRuby is one of the DLR extension on Microsoft .net platform that enable you programming against .net using the Dynamic Language. I will put a very short tutorial, here.    &lt;br /&gt;    &lt;br /&gt;&amp;#160; Download the assemblies or just the installer file from &lt;a title="http://ironruby.codeplex.com/releases/view/49097#DownloadId=159561" href="http://ironruby.codeplex.com/releases/view/49097#DownloadId=159561"&gt;http://ironruby.codeplex.com/releases/view/49097#DownloadId=159561&lt;/a&gt;    &lt;br /&gt;for the installation, it basically puts several .net assemblies to the GAC folder.&amp;#160; &lt;br /&gt;    &lt;br /&gt; Then you can run the IronRuby console, which is the C# version of Irb    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-SkDZBSoigoo/TeVysmPSr-I/AAAAAAAACl0/n0KX89M5coQ/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-I1bCPyeJCMI/TeVyswh6_GI/AAAAAAAACl4/JuFMI52HNCg/image_thumb%25255B2%25255D.png?imgmax=800" width="664" height="379" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;when you run process explorer, you will see the loaded Assemblies,    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-zhw9yT1J2ks/TeVytU8XqBI/AAAAAAAACl8/uR1YJgX1uOk/s1600-h/image%25255B16%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-Nbh_F4al2aU/TeVyt71ez3I/AAAAAAAACmA/yczABFAiNkc/image_thumb%25255B10%25255D.png?imgmax=800" width="642" height="261" /&gt;&lt;/a&gt;    &lt;br /&gt;Ir.exe is a standard .net application,&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-DA1o-uCYYRI/TeVyuZd8suI/AAAAAAAACmE/_W5U4y0pbuI/s1600-h/image%25255B48%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-Ckw0b7REjgM/TeVyu8gMg9I/AAAAAAAACmI/En8YS6MbB8o/image_thumb%25255B30%25255D.png?imgmax=800" width="644" height="359" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;Now, let’s write a basic HelloWorld Ruby application,    &lt;br /&gt;First in Ruby Style,    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-uAOTHAlm_cU/TeVyvE0xu-I/AAAAAAAACmM/RVuBUaVxP84/s1600-h/image%25255B21%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-2ygmv76vUno/TeVyvvoBWDI/AAAAAAAACmQ/cIbt4P_QlYk/image_thumb%25255B13%25255D.png?imgmax=800" width="278" height="73" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;then In C#, we just call System.Console.WriteLine(“Message”). namespace will be mapped to module in Ruby,    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-Yj7OwI1AX_w/TeVyv0LDmcI/AAAAAAAACmU/kOXO8knGKeQ/s1600-h/image%25255B26%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-Nu6o7MHBa_E/TeVywf6BJhI/AAAAAAAACmY/gR6zYITEZqQ/image_thumb%25255B16%25255D.png?imgmax=800" width="373" height="63" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;Now, you can call the standard .net library, like Datetime    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-Y1A4LtnmFCY/TeVywpPOQWI/AAAAAAAACmc/9JE6Fe-vDeA/s1600-h/image%25255B31%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-YLISXUDgU8A/TeVyw1PHyFI/AAAAAAAACmg/y8mUHG1zkR8/image_thumb%25255B19%25255D.png?imgmax=800" width="257" height="45" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;In Ruby, if you want to query the methods of the Object, you can use .methods, we can do this too.     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-u5MYv_-PyIE/TeVyxfGAziI/AAAAAAAACmk/rY2blAA4ZzQ/s1600-h/image%25255B36%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-3Tc31gbF0iE/TeVyxqQUBeI/AAAAAAAACmo/JwJm_6IX-Dw/image_thumb%25255B22%25255D.png?imgmax=800" width="627" height="168" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;if we want to change the Console foreground color, which we cant do in ruby easily,just call system.foreground_color    &lt;br /&gt;here, we can use ruby style naming like foreground_color, or C# style ForegroundColor, the dynamic method dispatcher will delver the call to the right stub,    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-_7sT3FnGWeU/TeVyyMHHUqI/AAAAAAAACms/J96zpU7SBJQ/s1600-h/image%25255B41%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-yrnauccm5yM/TeVyypXa2cI/AAAAAAAACmw/97GSp3y4D54/image_thumb%25255B25%25255D.png?imgmax=800" width="527" height="121" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;To using the Base64 encoding that I used pretty often,    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-QzpqEvCMaBI/TeVyzI14b1I/AAAAAAAACm0/gS3CCkXy8-0/s1600-h/image%25255B49%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-WCZcD4O6xL8/TeVyzXq0WfI/AAAAAAAACm4/35zQgFOh2LA/image_thumb%25255B31%25255D.png?imgmax=800" width="475" height="105" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;in Ruby, it’s easy to subclass to add more methods, say thing error here, I will add one method called writeerror&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-tf_6LiWcs3Y/TeV4R4MtGPI/AAAAAAAACm8/jo_M2tHUcDM/s1600-h/image%25255B55%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-eoFS368nLcQ/TeV4SIIDJaI/AAAAAAAACnA/TgAD-Hv1ogM/image_thumb%25255B35%25255D.png?imgmax=800" width="501" height="149" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-5552510007736380882?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/5552510007736380882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=5552510007736380882&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5552510007736380882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5552510007736380882'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/05/ironruby-tutorial-ruby-for-c.html' title='IronRuby Tutorial, Ruby For C# programmers,Part 1'/><author><name>MyNote on every bits</name><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://lh3.ggpht.com/-I1bCPyeJCMI/TeVyswh6_GI/AAAAAAAACl4/JuFMI52HNCg/s72-c/image_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-5829487784956550360</id><published>2011-05-25T15:42:00.001-07:00</published><updated>2011-05-26T15:05:07.875-07:00</updated><title type='text'>How to: Fix IE9 rendering issues with Google Gmail</title><content type='html'>&lt;p&gt;One day, When I open Gmail, everything is messed up, the rendering is totally wrong, the screenshot looks like this    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-FAY9a1Ea7BQ/Td2F0qE_nnI/AAAAAAAACk8/ORkpxEVDDog/s1600-h/image%25255B13%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-JavJcOeQ0Xo/Td2F1MS-zOI/AAAAAAAAClA/vHHwDFgss58/image_thumb%25255B6%25255D.png?imgmax=800" width="910" height="495" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When I click the about, I use the latest IE9 version. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-lb6TH6FHYM4/Td2F1ocCaII/AAAAAAAAClE/0QlhKYRI-OI/s1600-h/image%25255B18%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-WrV8hlliiDQ/Td2F2SGg6jI/AAAAAAAAClI/__1ybzI9btU/image_thumb%25255B9%25255D.png?imgmax=800" width="371" height="329" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To locate it why, I just click F12 to open the developer tools,    &lt;br /&gt;it picked up&amp;#160; the IE9 Compact Browse mode somehow.     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-oR7AOaighGg/Td2F2hkQRLI/AAAAAAAAClM/RhrI1m4tXOQ/s1600-h/image%25255B26%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-z7DtKsWWiuc/Td2F3EB9oyI/AAAAAAAAClQ/Zo5RjYUQUF8/image_thumb%25255B13%25255D.png?imgmax=800" width="785" height="338" /&gt;&lt;/a&gt;     &lt;br /&gt;Switch it back to regular IE9 Mode will fix the rending issue. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-5829487784956550360?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/5829487784956550360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=5829487784956550360&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5829487784956550360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5829487784956550360'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/05/how-to-fix-ie9-rending-problems-with.html' title='How to: Fix IE9 rendering issues with Google Gmail'/><author><name>MyNote on every bits</name><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://lh4.ggpht.com/-JavJcOeQ0Xo/Td2F1MS-zOI/AAAAAAAAClA/vHHwDFgss58/s72-c/image_thumb%25255B6%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-4151499229467775780</id><published>2011-05-24T22:15:00.001-07:00</published><updated>2011-05-24T22:15:50.714-07:00</updated><title type='text'>ActivityManager: Error: Activity class {com.androidyou.asia/com.androidyou.asia.taballActivity} does not exist.</title><content type='html'>&lt;p&gt;I got this weird&amp;#160; error when I try to run a basic android application, the error console tells nothing but one activity doesn't exist   &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TdyQgg7w5lI/AAAAAAAACks/WjTsUOJopAs/s1600-h/image%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TdyQg8E4MDI/AAAAAAAACkw/HexvOqFZVfI/image_thumb%5B2%5D.png?imgmax=800" width="917" height="214" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;when I check the logcat, nothing related there.     &lt;br /&gt;    &lt;br /&gt;after a lot try, seems put a . in front of the lanuch activity will be the trick,    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TdyQhDPFbKI/AAAAAAAACk0/wWs2pmI2SgA/s1600-h/image%5B12%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TdyQhrQ-_cI/AAAAAAAACk4/L2XNudMsAEo/image_thumb%5B6%5D.png?imgmax=800" width="569" height="119" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-4151499229467775780?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/4151499229467775780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=4151499229467775780&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/4151499229467775780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/4151499229467775780'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/05/activitymanager-error-activity-class.html' title='ActivityManager: Error: Activity class {com.androidyou.asia/com.androidyou.asia.taballActivity} does not exist.'/><author><name>MyNote on every bits</name><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://lh4.ggpht.com/_mYxSKDI3mdA/TdyQg8E4MDI/AAAAAAAACkw/HexvOqFZVfI/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-4212034969449823596</id><published>2011-05-13T10:06:00.001-07:00</published><updated>2011-05-21T22:14:25.477-07:00</updated><title type='text'>Install ADB Driver for Samsung galaxy tablet 10.1 from google io /Samsung galaxy SGH-T959</title><content type='html'>&lt;p&gt;If you want to install the ADB Driver for the samsung tablet you get from google IO, you may find it’s hard to get the correct driver from samsung download site.    &lt;br /&gt;    &lt;br /&gt;I found another trick to do the installation, Download and Install the Samsung Kies which will install the driver for the tablet,     &lt;br /&gt;Download Link, &lt;a title="http://www.samsungapps.com/about/onPc.as?LOCALE=hi_IN" href="http://www.samsungapps.com/about/onPc.as?LOCALE=hi_IN"&gt;http://www.samsungapps.com/about/onPc.as?LOCALE=hi_IN&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TcxLhKogt-I/AAAAAAAACjU/KCI2pKBqXns/s1600-h/image%5B7%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TcxLhs1PZxI/AAAAAAAACjY/hnLIAJYAc44/image_thumb%5B3%5D.png?imgmax=800" width="713" height="236" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After installation of the kies, you will see adb driver is there in the device manager,    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TcxLh8JHP6I/AAAAAAAACjc/J6bxLsA5ids/s1600-h/image%5B12%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TcxLiIc2OzI/AAAAAAAACjg/MEviSg4d7Rs/image_thumb%5B6%5D.png?imgmax=800" width="279" height="143" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;and you can run adb devices, to see your samsung device,    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TcxLikrszNI/AAAAAAAACjk/O6KFpwo9RVg/s1600-h/image%5B16%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TcxLizYsnHI/AAAAAAAACjo/55cXS_-IZl4/image_thumb%5B8%5D.png?imgmax=800" width="220" height="124" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For the galaxy phone , please go to the download site, &lt;a href="http://www.samsung.com/us/downloads"&gt;http://www.samsung.com/us/downloads&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Chose the cell-phone and your model, click the software tab, download the zipped usb driver (has the ADB one too)    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TdFtXojvUUI/AAAAAAAACj8/dX2nvKL7onk/s1600-h/image%5B5%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TdFtYOGWZcI/AAAAAAAACkA/2ETCIBp8r8w/image_thumb%5B3%5D.png?imgmax=800" width="642" height="334" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;More Adb Driver installation Blogs,&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://androidyou.blogspot.com/2011/04/how-to-install-adb-driver-for-motorola.html"&gt;How to: install &lt;b&gt;ADB&lt;/b&gt; driver for Motorola Xoom&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://androidyou.blogspot.com/2011/03/adb-driver-for-htc-wildfire-and-t.html"&gt;&lt;b&gt;ADB&lt;/b&gt; Driver for HTC wildfire and T-Mobile G2&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://androidyou.blogspot.com/2010/07/flashimage-not-found.html"&gt;android update, flash_image not found&lt;/a&gt;      &lt;br /&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-4212034969449823596?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/4212034969449823596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=4212034969449823596&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/4212034969449823596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/4212034969449823596'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/05/install-adb-driver-for-samsung-galaxy.html' title='Install ADB Driver for Samsung galaxy tablet 10.1 from google io /Samsung galaxy SGH-T959'/><author><name>MyNote on every bits</name><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://lh6.ggpht.com/_mYxSKDI3mdA/TcxLhs1PZxI/AAAAAAAACjY/hnLIAJYAc44/s72-c/image_thumb%5B3%5D.png?imgmax=800' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-3359113436239300346</id><published>2011-05-03T16:43:00.001-07:00</published><updated>2011-05-03T16:43:01.018-07:00</updated><title type='text'>Seconds since the Unix epoch in C#/java, the same output of Time() in PHP</title><content type='html'>&lt;p&gt;in Php, there is one Time() function, Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).    &lt;br /&gt;&amp;#160; in C#, there is no built-in function to return seconds since UNix epoch, here is the code snippet to return the same thing&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="666"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#a0a0a0" valign="top" width="664"&gt;int t = (int)DateTime.Now.ToUniversalTime().Subtract(new DateTime(1970, 1, 1, 0, 0, 0)).TotalSeconds; &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;In Java, there is one standard function, &lt;code&gt;System.currentTimeMillis(),which measured in &lt;strong&gt;&lt;u&gt;milliseconds&lt;/u&gt;&lt;/strong&gt;, between the current time and midnight, January 1, 1970 UTC.       &lt;br /&gt;      &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;         &lt;tr&gt;           &lt;td bgcolor="#a0a0a0" valign="top" width="400"&gt;&lt;code&gt;System.currentTimeMillis()/1000&lt;/code&gt;&lt;/td&gt;         &lt;/tr&gt;       &lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-3359113436239300346?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/3359113436239300346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=3359113436239300346&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3359113436239300346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3359113436239300346'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/05/seconds-since-unix-epoch-in-cjava-same.html' title='Seconds since the Unix epoch in C#/java, the same output of Time() in PHP'/><author><name>MyNote on every bits</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-3946746819159405752</id><published>2011-05-03T16:42:00.001-07:00</published><updated>2011-05-03T16:42:50.580-07:00</updated><title type='text'>Adobe Content Server, Error getting license License server communication problem: E_LIC_WRONG_OPERATOR_KEY</title><content type='html'>&lt;p&gt;When I try to finish the fulfillment of one ebook using the digital edition, It returns this error.    &lt;br /&gt;&lt;/p&gt; &lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TcCS9E7jcxI/AAAAAAAACio/PzKf_CyM4rg/s1600-h/image3.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TcCS9ejBT7I/AAAAAAAACis/SS9ESgjeANE/image_thumb1.png?imgmax=800" width="300" height="123" /&gt;&lt;/a&gt;   &lt;p&gt;However, when I test the &lt;a href="http://server:8080/fulfillment/statuscheck"&gt;http://server:8080/fulfillment/statuscheck&lt;/a&gt;, all passed.     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TcCS95HL1jI/AAAAAAAACiw/zmJT4rNEGk0/s1600-h/image8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TcCS-bQpXYI/AAAAAAAACi0/gT0c_gj9V98/image_thumb4.png?imgmax=800" width="744" height="622" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;wrong operater key always means that the p12 file we setup in the c:\config\fulfillment-conf.txt is incorrect.&amp;#160; it doesn’t match the url that do the fulfillment.&lt;/p&gt;  &lt;p&gt;So there could be stupid typo mistake, check the fulfillment-conf make sure the com.adobe.adept.serviceURL is matching the cert url.    &lt;br /&gt;if you want to check the cert url, just click and import it to the certification store and open the certificate mmc&lt;/p&gt;  &lt;p&gt;also it looks like the statuscheck never check the url match the operator certificate which we think it will do.&amp;#160; &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-3946746819159405752?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/3946746819159405752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=3946746819159405752&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3946746819159405752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3946746819159405752'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/05/adobe-content-server-error-getting_03.html' title='Adobe Content Server, Error getting license License server communication problem: E_LIC_WRONG_OPERATOR_KEY'/><author><name>MyNote on every bits</name><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://lh3.ggpht.com/_mYxSKDI3mdA/TcCS9ejBT7I/AAAAAAAACis/SS9ESgjeANE/s72-c/image_thumb1.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-2139402104124057276</id><published>2011-05-03T16:40:00.000-07:00</published><updated>2011-05-03T16:40:20.780-07:00</updated><title type='text'>adobe content server, Error getting license Server communication problem: E_ADEPT_REQUEST_EXPIRED</title><content type='html'>&lt;p&gt;I just wrote a simple C# Bookstore by copying the logic in the sample Php bookstore application, all looks pretty straightforward. when I click download to fulfill the book, the Adobe digital edition returns error.&lt;/p&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TcCSIJBzDXI/AAAAAAAACig/kVNH5nJUkp4/s1600-h/image%5B3%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TcCSIieKENI/AAAAAAAACik/x0HrEF8LWM4/image_thumb%5B1%5D.png?imgmax=800" width="358" height="141" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I recalled in the php program, the client will pass a dateval variable to the fulfillment server, it just pick up the time() function which returns seconds since Unix epoch. so I just create my own edition like    &lt;br /&gt;&lt;br /&gt;int dataval =&amp;#160;&amp;#160; (int)DateTime.Now.Subtract(new DateTime(1970, 1, 1, 0, 0, 0)).TotalSeconds;     &lt;br /&gt;&lt;br /&gt;then when the server get the fulfillment request , it think the time has been passed. Why?    &lt;br /&gt;&lt;br /&gt;here is the trick, the time function that the php sample program uses&amp;#160;&amp;#160; Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 &lt;strong&gt;&lt;u&gt;GMT&lt;/u&gt;&lt;/strong&gt;).    &lt;br /&gt;I am in the PST timezone, so there is 8 hours difference,     &lt;br /&gt;&lt;br /&gt;fixing is easy,change it as,    &lt;br /&gt;&amp;#160; (int)DateTime.Now.&lt;u&gt;&lt;strong&gt;ToUniversalTime().&lt;/strong&gt;&lt;/u&gt;Subtract(new DateTime(1970, 1, 1, 0, 0, 0)).TotalSeconds; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-2139402104124057276?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/2139402104124057276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=2139402104124057276&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/2139402104124057276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/2139402104124057276'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/05/adobe-content-server-error-getting.html' title='adobe content server, Error getting license Server communication problem: E_ADEPT_REQUEST_EXPIRED'/><author><name>MyNote on every bits</name><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://lh5.ggpht.com/_mYxSKDI3mdA/TcCSIieKENI/AAAAAAAACik/x0HrEF8LWM4/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-3172467519593557775</id><published>2011-04-17T09:59:00.000-07:00</published><updated>2011-04-19T09:57:32.215-07:00</updated><title type='text'>Android IntentService, how to write a background service keep polling data and notify Activity for Change.</title><content type='html'>&lt;p&gt;Let me put a simple test application, One activity and One Service. for the service, it will do the background job like networking, computation. and notify the Acidity to do some UI side rendering or notification to User.    &lt;br /&gt;    &lt;br /&gt;first , Create one Simple Android application with just one Activity,     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="553"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#7070a0" valign="top" width="551"&gt;           &lt;p&gt;public class UIActivity extends Activity {              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /** Called when the activity is first created. */               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; TextView tv;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; @Override               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public void onCreate(Bundle savedInstanceState) {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; super.onCreate(savedInstanceState);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; tv=new TextView(this);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; tv.setText(&amp;quot;hello,World&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; setContentView(tv);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;}&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;then Add one Handler in the activity which will be called by the bakcground service when there are any change get triggered,     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="555"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#7070a0"&gt;         &lt;td valign="top" width="553"&gt;           &lt;p&gt;Handler handler=new Handler()              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; @Override               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public void handleMessage(Message msg) {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //get data from msg               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; String result=msg.getData().getString(&amp;quot;result&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; tv.setText(result);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Log.d(&amp;quot;xxxxx&amp;quot;, &amp;quot;get data&amp;quot; + result);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; super.handleMessage(msg);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; };&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;then Create one Service inherited from IntentService, here we defined a timer which will do the periodic checking and send back data change to activity,     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="568"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#7070a0"&gt;         &lt;td valign="top" width="566"&gt;           &lt;p&gt;public class BackService extends IntentService {&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; public BackService()              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; super(&amp;quot;myintentservice&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Messenger messenger;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Timer t=new Timer();               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; @Override               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; protected void onHandleIntent(Intent intent) {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; messenger=(Messenger) intent.getExtras().get(&amp;quot;handler&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; t.schedule(new TimerTask() {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; @Override               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public void run() {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // just call the handler every 3 Seconds               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Message msg=Message.obtain();               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Bundle data=new Bundle();               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; data.putString(&amp;quot;k&amp;quot;, &amp;quot;value&amp;quot; + System.currentTimeMillis() );               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; msg.setData(data);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; try {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; messenger.send(msg);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } catch (RemoteException e) {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // TODO Auto-generated catch block               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; e.printStackTrace();               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }, 100,3000);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;            &lt;p&gt;}&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;for Activity, need to specify the handler through putextra and start the service,     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#7070a0"&gt;         &lt;td valign="top" width="400"&gt;           &lt;p&gt;public void onCreate(Bundle savedInstanceState) {              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; super.onCreate(savedInstanceState);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; tv=new TextView(this);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; tv.setText(&amp;quot;hello,World&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; setContentView(tv);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;u&gt;Intent i=new Intent(this, BackService.class);                &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; i.putExtra(&amp;quot;handler&amp;quot;, new Messenger(this.handler));                 &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; this.startService(i);                 &lt;br /&gt;&lt;/u&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;}               &lt;br /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;remember to register the backservice into the manifest.xml,     &lt;br /&gt;when you run the app, you will see the textview will change every 3 seconds,     &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/Ta2-9cMKF3I/AAAAAAAACh4/lEBi5KqnxnU/s1600-h/image3.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/Ta2-9wdp8_I/AAAAAAAACh8/fnEb92vl8wA/image_thumb1.png?imgmax=800" width="484" height="804" /&gt;&lt;/a&gt;     &lt;br /&gt;run adb logcat XXXXX:D *:S, even the activity is brought to background , the Activity still get the change from service,     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/Ta2--ejgGlI/AAAAAAAACiA/vIZRAANAcW0/s1600-h/image8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/Ta2--6FCmoI/AAAAAAAACiE/mCzpifJksp4/image_thumb4.png?imgmax=800" width="382" height="304" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-3172467519593557775?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/3172467519593557775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=3172467519593557775&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3172467519593557775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3172467519593557775'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/04/android-intentservice-how-to-write.html' title='Android IntentService, how to write a background service keep polling data and notify Activity for Change.'/><author><name>MyNote on every bits</name><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://lh6.ggpht.com/_mYxSKDI3mdA/Ta2-9wdp8_I/AAAAAAAACh8/fnEb92vl8wA/s72-c/image_thumb1.png?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-3346911166352803001</id><published>2011-04-12T17:20:00.001-07:00</published><updated>2011-04-12T17:20:42.694-07:00</updated><title type='text'>How to : QT Hello world localization and I18N</title><content type='html'>&lt;p&gt;When you installed QT SDK, it came with several useful tools to do the I18N and localization, I’ll put a very basic QT program and show the basic steps to localize the app to support different local /languages. &lt;/p&gt;  &lt;p&gt;Create a Basic QT hello world application, make sure all user-visible strings are used as translatable strings (using tr function)    &lt;br /&gt;Create a empty QT Project using QT creator,     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TaTsPHIPguI/AAAAAAAACgg/Dhe3DNbXpCU/s1600-h/image4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TaTsPvxohiI/AAAAAAAACgk/BQ8ue_A2gzs/image_thumb2.png?imgmax=800" width="547" height="378" /&gt;&lt;/a&gt;     &lt;br /&gt;then add a new source file,&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TaTsP9j1kGI/AAAAAAAACgo/p6V-R2Xe1ik/s1600-h/image9.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TaTsQeHokQI/AAAAAAAACgs/dZI0L-Ha-LM/image_thumb5.png?imgmax=800" width="562" height="491" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="585"&gt;&lt;tbody&gt;     &lt;tr bgcolor="#558890"&gt;       &lt;td valign="top" width="583"&gt;         &lt;p&gt;#include &amp;lt;QtGui&amp;gt;&lt;/p&gt;          &lt;p&gt;int main(int argc, char * argv[])            &lt;br /&gt;{             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; QApplication app(argc,argv);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; QPushButton * button=new QPushButton(QObject::tr(&amp;quot;Hello,World!&amp;quot;));             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; button-&amp;gt;show();             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; app.exec();             &lt;br /&gt;}             &lt;br /&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;then run the app by pressing F5, you will see the hello world button,    &lt;br /&gt;&amp;#160;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TaTsQrs4UXI/AAAAAAAACgw/IDIBJh-C9Lc/s1600-h/image14.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TaTsRL8nCMI/AAAAAAAACg4/70I2900aEpA/image_thumb8.png?imgmax=800" width="192" height="161" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now we are going to add the Chinese and Japanese Support to the app.    &lt;br /&gt;    &lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; go the the project folder, Run a command called Lupdate(include in the sdk ), to extract all translatable strings to a file,     &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TaTsRQLjnhI/AAAAAAAACg8/pz9ezgTDtEw/s1600-h/image19.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TaTsSDqDg7I/AAAAAAAAChA/LO1WpHRyT6w/image_thumb11.png?imgmax=800" width="814" height="263" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;here default.ts is just a xml file as the content bellows,    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TaTsSVJXmDI/AAAAAAAAChE/YUxfz4WpkVs/s1600-h/image24.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TaTsSk3Or3I/AAAAAAAAChI/x_tXrX6wIJM/image_thumb14.png?imgmax=800" width="444" height="193" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;&amp;gt;&amp;gt;&amp;gt;now use the linguist tool to translate it into Japanese, run “linguist” In the qt shell or click the tool from start-menu     &lt;br /&gt;open the default.ts, and chose Japanese as the target language,     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TaTsS-ZkxZI/AAAAAAAAChM/1TVY5x-tcyM/s1600-h/image29.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TaTsTVi3rqI/AAAAAAAAChQ/NayUGdOqP0s/image_thumb17.png?imgmax=800" width="423" height="296" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;put the translation for hello world in Japanese, and click to mark done, then Save it as&amp;#160; as jp.ts    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TaTsT2AycgI/AAAAAAAAChU/4UybFLk5zbE/s1600-h/image39.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TaTsUTzxg6I/AAAAAAAAChY/rUzgq10qESg/image_thumb23.png?imgmax=800" width="506" height="494" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Now quite the translation tool and start over again to translate it to Chinese, and export to cn.ts    &lt;br /&gt;&amp;gt;&amp;gt;&amp;gt;compile the cn.ts and jp.ts to binary format using lrelease     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TaTsUnoEv-I/AAAAAAAAChc/xQ-ZpmGaFww/s1600-h/image44.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TaTsVHT-0iI/AAAAAAAAChg/8quIzK4lTxc/image_thumb26.png?imgmax=800" width="518" height="140" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;gt;&amp;gt;&amp;gt; now in the app, load those two qm files,    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="552"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#558890"&gt;         &lt;td valign="top" width="550"&gt;           &lt;p&gt;QApplication app(argc,argv);&lt;/p&gt;            &lt;p&gt;QTranslator translator ;&lt;/p&gt;            &lt;p&gt;QLocale curent;              &lt;br /&gt;if(curent==QLocale::Chinese)               &lt;br /&gt;{               &lt;br /&gt;translator.load(&amp;quot;F:\\helloworld\\cn.qm&amp;quot;);               &lt;br /&gt;app.installTranslator(&amp;amp;translator);               &lt;br /&gt;}               &lt;br /&gt;if(curent==QLocale::Japanese)               &lt;br /&gt;{               &lt;br /&gt;translator.load(&amp;quot;F:\\helloworld\\jp.qm&amp;quot;);               &lt;br /&gt;app.installTranslator(&amp;amp;translator);               &lt;br /&gt;}               &lt;br /&gt;&lt;/p&gt;            &lt;p&gt;&lt;u&gt;&lt;/u&gt;&lt;/p&gt;            &lt;p&gt;&lt;u&gt;&lt;/u&gt;&lt;/p&gt;            &lt;p&gt;QPushButton * button=new QPushButton(QObject::tr(&amp;quot;Hello,World&amp;quot;));              &lt;br /&gt;button-&amp;gt;show();               &lt;br /&gt;app.exec();&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Now, if you setup your current locale to Japanese, you will see the JP version of helloword     &lt;br /&gt;    &lt;br /&gt;or you can change the default local in code,     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#558890"&gt;         &lt;td valign="top" width="400"&gt;QLocale::setDefault(QLocale::Japanese);&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TaTsVWh-kJI/AAAAAAAAChk/HGkiwD7FsOs/s1600-h/image48.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TaTsVu4hrkI/AAAAAAAACho/KKMloltf4Ww/image_thumb28.png?imgmax=800" width="215" height="133" /&gt;&lt;/a&gt; &lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TaTsV6TMa_I/AAAAAAAAChs/WBUvCWphcxE/s1600-h/image53.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TaTsWUceQEI/AAAAAAAAChw/DK99rQx0iEo/image_thumb31.png?imgmax=800" width="188" height="136" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-3346911166352803001?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/3346911166352803001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=3346911166352803001&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3346911166352803001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3346911166352803001'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/04/how-to-qt-hello-world-localization-and.html' title='How to : QT Hello world localization and I18N'/><author><name>MyNote on every bits</name><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://lh3.ggpht.com/_mYxSKDI3mdA/TaTsPvxohiI/AAAAAAAACgk/BQ8ue_A2gzs/s72-c/image_thumb2.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-6489925504023155421</id><published>2011-04-08T10:32:00.001-07:00</published><updated>2011-04-08T10:32:17.627-07:00</updated><title type='text'>How to: install ADB driver for Motorola Xoom</title><content type='html'>&lt;p&gt;Download and install the Driver from Motorola,    &lt;br /&gt;&amp;#160;&lt;a title="http://developer.motorola.com/docstools/USB_Drivers/" href="http://developer.motorola.com/docstools/USB_Drivers/"&gt;http://developer.motorola.com/docstools/USB_Drivers/&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TZ9GknTS7cI/AAAAAAAACf4/LnfzQH7Ifv4/s1600-h/image%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TZ9GlEKpN9I/AAAAAAAACf8/7J0cTcPyDJM/image_thumb%5B2%5D.png?imgmax=800" width="645" height="130" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;in your xoom device, enable the USB debugging under application section settings,    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TZ9GmQmCUhI/AAAAAAAACgA/VkjsA6GWSps/s1600-h/image%5B13%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TZ9GnTtACPI/AAAAAAAACgE/c1F0NKYxfWU/image_thumb%5B7%5D.png?imgmax=800" width="644" height="268" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;then in windows, it will find new device and apply the ADB driver.     &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TZ9Gn8Mai1I/AAAAAAAACgI/Ac1zJJB7P4g/s1600-h/image%5B8%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TZ9GoOk-11I/AAAAAAAACgM/jgKpZ0bxI7M/image_thumb%5B4%5D.png?imgmax=800" width="242" height="95" /&gt;&lt;/a&gt;&lt;/p&gt;      &lt;p&gt;Now you can run adb devices, to see the device is there   &lt;br /&gt;    &lt;br /&gt;for all other non-google device, here is the list of their drivers,    &lt;br /&gt;&lt;a title="http://developer.android.com/sdk/oem-usb.html" href="http://developer.android.com/sdk/oem-usb.html"&gt;http://developer.android.com/sdk/oem-usb.html&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-6489925504023155421?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/6489925504023155421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=6489925504023155421&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/6489925504023155421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/6489925504023155421'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/04/how-to-install-adb-driver-for-motorola.html' title='How to: install ADB driver for Motorola Xoom'/><author><name>MyNote on every bits</name><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://lh5.ggpht.com/_mYxSKDI3mdA/TZ9GlEKpN9I/AAAAAAAACf8/7J0cTcPyDJM/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-7388730062203627483</id><published>2011-04-06T16:21:00.001-07:00</published><updated>2011-04-06T16:21:09.196-07:00</updated><title type='text'>Hadoop: How to install and test PIG</title><content type='html'>&lt;p&gt;like &lt;a href="http://androidyou.blogspot.com/2011/03/how-to-install-and-test-hive-on-hadoop.html"&gt;install and test Hive on hadoop cluster&lt;/a&gt;, Pig is another end-user facing analytical tools for Hadoop. unlike SQL style query for Hive, Pig use the scripting language which will be more familiar to Sys admins.     &lt;br /&gt;    &lt;br /&gt;Download Pig From Yahoo, &lt;a title="http://www.apache.org/dyn/closer.cgi/pig" href="http://www.apache.org/dyn/closer.cgi/pig"&gt;http://www.apache.org/dyn/closer.cgi/pig&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;Unzip the files and go the bin folder, only change is we need to add the hadoop conf folder to the class path. then pig knows how to deal with hadoop cluster,     &lt;br /&gt;    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="400"&gt;           &lt;p&gt; # cygwin path translation              &lt;br /&gt;if $cygwin; then               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; CLASSPATH=`cygpath -p -w &amp;quot;$CLASSPATH&amp;quot;`               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; PIG_HOME=`cygpath -d &amp;quot;$PIG_HOME&amp;quot;`               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; PIG_LOG_DIR=`cygpath -d &amp;quot;$PIG_LOG_DIR&amp;quot;`               &lt;br /&gt;fi              &lt;br /&gt;&lt;/p&gt;            &lt;p&gt;#add hadoop conf folder to the classpath&lt;/p&gt;            &lt;p&gt;&lt;u&gt;export CLASSPATH=$CLASSPATH:/usr/lib/hadoop/conf&lt;/u&gt; &lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;After that, you can run the ./bin/pig to start the shell of Pig,   &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TZz1YJbItaI/AAAAAAAACfw/Us1zHlC4dKs/s1600-h/image%5B2%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TZz1Yx2hECI/AAAAAAAACf0/5v8RSB71vH0/image_thumb%5B2%5D.png?imgmax=800" width="611" height="141" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here are the Pig syntax.    &lt;br /&gt;&lt;a title="http://pig.apache.org/docs/r0.8.0/cookbook.html" href="http://pig.apache.org/docs/r0.8.0/cookbook.html"&gt;http://pig.apache.org/docs/r0.8.0/cookbook.html&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-7388730062203627483?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/7388730062203627483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=7388730062203627483&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/7388730062203627483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/7388730062203627483'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/04/hadoop-how-to-install-and-test-pig.html' title='Hadoop: How to install and test PIG'/><author><name>MyNote on every bits</name><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://lh5.ggpht.com/_mYxSKDI3mdA/TZz1Yx2hECI/AAAAAAAACf0/5v8RSB71vH0/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-6976044464618367973</id><published>2011-04-06T16:12:00.001-07:00</published><updated>2011-04-06T16:14:09.626-07:00</updated><title type='text'>Hadoop, java.lang.ClassCastException: org.apache.hadoop.io.LongWritable cannot be cast to org.apache.hadoop.io.Text</title><content type='html'> If you work on a Mapper which expects the file format of keyvalue, and forget to specify the inputformat to jobconf, you will get the following errors. &lt;br /&gt;&lt;table border="0" cellspacing="0" cellpadding="2" width="706"&gt;&lt;tbody&gt;&lt;tr bgcolor="#909aa0"&gt;&lt;td valign="top" width="704"&gt;&lt;p&gt;java.lang.ClassCastException: org.apache.hadoop.io.LongWritable cannot be cast to org.apache.hadoop.io.Text&lt;br /&gt;at MR.map(MR.java:1)&lt;br /&gt;at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:50)&lt;br /&gt;at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:358)&lt;br /&gt;at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307)&lt;br /&gt;at org.apache.hadoop.mapred.Child.main(Child.java:170)&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;here is why,&lt;br /&gt;&lt;br /&gt;for the jobconf, the default inputformat is TextInputFormat,&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TZzzPN30H2I/AAAAAAAACfg/fDYNGAEflgc/s1600-h/image%5B4%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TZzzPbs4W8I/AAAAAAAACfk/xct0-qQO_Jc/image_thumb%5B2%5D.png?imgmax=800" width="733" height="185" /&gt;&lt;/a&gt;   &lt;p&gt;you will get Key/value type of longwritable/text in your Map function.    &lt;br /&gt;if you put something like Text as the key, you will get the classcast exception &lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="476"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#b1b2c0" valign="top" width="474"&gt;         &lt;p&gt;public void map(&lt;u&gt;Text key&lt;/u&gt;, Text value,             &lt;br /&gt;OutputCollector&amp;lt;Text, Text&amp;gt; collector,             &lt;br /&gt;Reporter paramReporter) throws IOException {             &lt;br /&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;So always remember to specify the InputFormat.    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TZzzP38Gi9I/AAAAAAAACfo/ZvW64GEqn7c/s1600-h/image%5B9%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TZzzQXKn6MI/AAAAAAAACfs/GRyl4OtvSKU/image_thumb%5B5%5D.png?imgmax=800" width="573" height="217" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-6976044464618367973?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/6976044464618367973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=6976044464618367973&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/6976044464618367973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/6976044464618367973'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/04/hadoop-javalangclasscastexception.html' title='Hadoop, java.lang.ClassCastException: org.apache.hadoop.io.LongWritable cannot be cast to org.apache.hadoop.io.Text'/><author><name>MyNote on every bits</name><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://lh6.ggpht.com/_mYxSKDI3mdA/TZzzPbs4W8I/AAAAAAAACfk/xct0-qQO_Jc/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-3443747047258289851</id><published>2011-03-24T17:55:00.001-07:00</published><updated>2011-03-24T17:55:59.053-07:00</updated><title type='text'>How to :Test IIS Media service Smooth streaming tutorial</title><content type='html'>&lt;p&gt;Http for streaming, for IIS, there is the media service, let’s download and install it using the platform installer&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://www.iis.net/media"&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;http://www.iis.net/media&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;using the web platform installer 3.0 (like the Yum for Centos), pick up the media service package and click to install.      &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TYvn0qjWt7I/AAAAAAAACeI/doAmz-j22F4/s1600-h/image8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TYvn1YDawiI/AAAAAAAACeM/fUQ5jtIXqHU/image_thumb5.png?imgmax=800" width="670" height="464" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TYvn2I_ONSI/AAAAAAAACeQ/wj57ou2a-nc/s1600-h/image7.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TYvn3En3SvI/AAAAAAAACeU/ZrFpXDFjq04/image_thumb4.png?imgmax=800" width="679" height="459" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;also install the smooth string client, &lt;/p&gt;    &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TYvn3yhBhuI/AAAAAAAACeY/Q4cH5_6VczM/s1600-h/image9%5B1%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TYvn4xREf-I/AAAAAAAACec/iFTiqSrJl74/image_thumb6.png?imgmax=800" width="666" height="478" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;when done, you will noticed that in install several HttpHandlers to IIS, &lt;/p&gt;    &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TYvn5SL_aXI/AAAAAAAACeg/2h5iCLJHq3c/s1600-h/image14.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TYvn6PbB30I/AAAAAAAACek/7crWm_uPXK8/image_thumb6%5B1%5D.png?imgmax=800" width="642" height="88" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;and check the handler mapping features,&lt;/p&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a0a0a9"&gt;         &lt;td valign="top" width="200"&gt;Path&lt;/td&gt;          &lt;td valign="top" width="200"&gt;Handler&lt;/td&gt;       &lt;/tr&gt;        &lt;tr bgcolor="#a0a0b9"&gt;         &lt;td valign="top" width="200"&gt;*.ism&lt;/td&gt;          &lt;td valign="top" width="200"&gt;Smoothhandler&lt;/td&gt;       &lt;/tr&gt;        &lt;tr bgcolor="#a0a0b9"&gt;         &lt;td valign="top" width="200"&gt;*.isml&lt;/td&gt;          &lt;td valign="top" width="200"&gt;LiveStreamingHandler&lt;/td&gt;       &lt;/tr&gt;        &lt;tr bgcolor="#a0a0b9"&gt;         &lt;td valign="top" width="200"&gt;*.isx&lt;/td&gt;          &lt;td valign="top" width="200"&gt;PlayListHandler&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TYvn6fdBLQI/AAAAAAAACeo/KOHL53M-c1s/s1600-h/image10.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TYvn68z9NkI/AAAAAAAACes/0Lzfmxc95mA/image_thumb7.png?imgmax=800" width="635" height="111" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Also you will see several media tools,&lt;/p&gt;    &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TYvn7b9gQlI/AAAAAAAACew/qEiMGV5FnAs/s1600-h/image24.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TYvn73rfsyI/AAAAAAAACe0/kwToFLqjh9Q/image_thumb12.png?imgmax=800" width="498" height="143" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Now we have the infurscture and components to Host and support the smooth streaming, we need import those assets to the virtual Directory just like other aspx files. &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;encoder&amp;#160; , there is a encoder to encode one raw video file to tens of other formats with different qualities. (used for smooth streaming, when the network bandwidth is great enough, throw the 1080P one to the client. )    &lt;br /&gt;Download encoder full version (Expression Studio 4 Premium (x86) - DVD (English))from your MSDN subscription. note, the free downloadable encoder 3 doesn’t support the smooth streaming encoding. No free lunch,     &lt;br /&gt;    &lt;br /&gt;&amp;gt;&amp;gt;so download Expresion 4, and install the &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5c3c5f97-678c-4c99-a7fc-f84f320c626f&amp;amp;displaylang=en" target="_blank"&gt;Microsoft Expression Encoder 4 with Service Pack 1 (SP1)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Create a new project, import the raw video. search and select all streaming presets and click apply. then click encode to go,    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TYvn8Uvl0gI/AAAAAAAACe4/hw85jsyK5G8/s1600-h/image35.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TYvn88g-L8I/AAAAAAAACe8/h8YdujF1j84/image_thumb16.png?imgmax=800" width="644" height="352" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;this process is a CPU intensive work, try to run on more powerful server with lots cpu cores.     &lt;br /&gt;the output folder looks like this, one ism file and several ismv files based on your presets selectons     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TYvn9cQaTSI/AAAAAAAACfA/bb2cQRt5xFY/s1600-h/image40.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TYvn-NpbsyI/AAAAAAAACfE/pJGGCWH3OLE/image_thumb19.png?imgmax=800" width="578" height="272" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now copy this folder to the iis virtual folder you created,    &lt;br /&gt;then you can see the file listed in the iis add-on , smooth streaming,     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TYvn-opiGwI/AAAAAAAACfI/Jg45YpidJDI/s1600-h/image45.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TYvn_JERjMI/AAAAAAAACfM/uqO35nuxmMg/image_thumb22.png?imgmax=800" width="479" height="506" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;host/runtime is ready, content is there, now need to write a Silverlight client to view the content,     &lt;br /&gt;    &lt;br /&gt;let’s build using&amp;#160; the Microsoft Silverlight Media Framework 2.4, which comes with the built-in streaming player.     &lt;br /&gt;    &lt;br /&gt;create one smooth streaming application( a Silverlight project which has been customized to reference the extensions dll.)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TYvn_hJrv_I/AAAAAAAACfQ/zX-OOjf6cE4/s1600-h/image50.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TYvoAbpJH9I/AAAAAAAACfU/GtyFOu3fCb8/image_thumb25.png?imgmax=800" width="716" height="583" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;replace the ism file with ours,    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="609"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#a0b0c9" valign="top" width="607"&gt;           &lt;pre&gt; &amp;lt;Grid x:Name=&amp;quot;LayoutRoot&amp;quot;&amp;#160; Loaded=&amp;quot;LayoutRoot_Loaded&amp;quot; Background=&amp;quot;White&amp;quot;&amp;gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;smf:SMFPlayer x:Name=&amp;quot;s&amp;quot; AutoPlay=&amp;quot;True&amp;quot;&amp;gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;smf:SMFPlayer.Playlist&amp;gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;media:PlaylistItem DeliveryMethod=&amp;quot;AdaptiveStreaming&amp;quot;&amp;#160; MediaSource=&amp;quot;http://localhost/hellomedia/Wildlife.ism/Manifest&amp;quot;/&amp;gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/smf:SMFPlayer.Playlist&amp;gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/smf:SMFPlayer&amp;gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Grid&amp;gt;&lt;/pre&gt;&lt;br /&gt;        &lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;put a clientaccesspolicy.xml to the iis root folder, &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="614"&gt;&lt;tbody&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;        &lt;td bgcolor="#a0b0c0" valign="top" width="612"&gt;&lt;br /&gt;          &lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt; &lt;br /&gt;            &lt;br /&gt;&amp;lt;access-policy&amp;gt; &lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;&amp;#160; &amp;lt;cross-domain-access&amp;gt; &lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;policy&amp;gt; &lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;allow-from http-request-headers=&amp;quot;*&amp;quot;&amp;gt; &lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;domain uri=&amp;quot;*&amp;quot;/&amp;gt; &lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/allow-from&amp;gt; &lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;grant-to&amp;gt; &lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;resource path=&amp;quot;/&amp;quot; include-subpaths=&amp;quot;true&amp;quot;/&amp;gt; &lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/grant-to&amp;gt; &lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/policy&amp;gt; &lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;&amp;#160; &amp;lt;/cross-domain-access&amp;gt; &lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;&amp;lt;/access-policy&amp;gt;&lt;/p&gt;&lt;br /&gt;        &lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;then click F5 to run, that’s it. &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TYvoFDBRKxI/AAAAAAAACfY/XKmJkkUAJ2s/s1600-h/image15.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TYvoHbJNQNI/AAAAAAAACfc/YPVWFZydXGo/image_thumb10.png?imgmax=800" width="567" height="482" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;in case you can’t see the video, check this out ,&lt;a href="http://androidyou.blogspot.com/2011/03/why-silverlight-smf-player-never-play.html"&gt;why? Silverlight smf player never play.&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-3443747047258289851?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/3443747047258289851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=3443747047258289851&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3443747047258289851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3443747047258289851'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/03/how-to-test-iis-media-service-smooth.html' title='How to :Test IIS Media service Smooth streaming tutorial'/><author><name>MyNote on every bits</name><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://lh3.ggpht.com/_mYxSKDI3mdA/TYvn1YDawiI/AAAAAAAACeM/fUQ5jtIXqHU/s72-c/image_thumb5.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-2891468420347426145</id><published>2011-03-24T17:49:00.001-07:00</published><updated>2011-03-24T17:50:27.017-07:00</updated><title type='text'>why? Silverlight smf player never play.</title><content type='html'>&lt;p&gt;Just installed the SMF sdk and point the ism to my IIS steaming server, click f5 to run the app, it’s a black screen. it never check crossdomain.xml, it never sends out the request &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TYvmfKq7tvI/AAAAAAAACdg/ICCm-c3NraM/s1600-h/image32.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TYvmgsHKn8I/AAAAAAAACdk/GccuGL72VDc/image_thumb18.png?imgmax=800" width="708" height="542" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Click the play, nothing happened, then I run the debug and turn on all exceptions,    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TYvmhJXXU9I/AAAAAAAACdo/Z1q8yhiwYUk/s1600-h/image9.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TYvmhuLAp8I/AAAAAAAACds/_NlmIDAqWHA/image_thumb5.png?imgmax=800" width="735" height="354" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;run again, aha, one dll is missing,&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TYvmivbjivI/AAAAAAAACdw/L4owSAr7kfk/s1600-h/image17.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TYvmjRB6UYI/AAAAAAAACd0/jlYWsf0eaIA/image_thumb9.png?imgmax=800" width="547" height="364" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So you need to install streaming client 1.5, &lt;a href="http://www.iis.net/download/SmoothClient"&gt;http://www.iis.net/download/SmoothClient&lt;/a&gt;     &lt;br /&gt;just serach streaming in the web platform installer ,click and install&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TYvmkIjvGAI/AAAAAAAACd4/l3znSAzsgBA/s1600-h/image%5B1%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TYvmkzO4stI/AAAAAAAACd8/31vrTouLHs4/image_thumb.png?imgmax=800" width="649" height="425" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;after that, reference the dll located in [C:\Program Files (x86)\Microsoft SDKs\IIS Smooth Streaming Client\v1.5\Silverlight] to your project, then rebuild, all set, now the horses can run now, lol&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TYvmowNkujI/AAAAAAAACeA/5Ubwrl9yjk0/s1600-h/image31.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TYvmq-WGukI/AAAAAAAACeE/25Rpr6Nhu7o/image_thumb17.png?imgmax=800" width="580" height="482" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Also, make sure crossdomain.xml is there.&lt;/p&gt;  &lt;p&gt;in case you can’t see the video, check this out ,&lt;a href="http://androidyou.blogspot.com/2011/03/why-silverlight-smf-player-never-play.html"&gt;why? Silverlight smf player never play.&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-2891468420347426145?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/2891468420347426145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=2891468420347426145&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/2891468420347426145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/2891468420347426145'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/03/why-silverlight-smf-player-never-play.html' title='why? Silverlight smf player never play.'/><author><name>MyNote on every bits</name><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://lh4.ggpht.com/_mYxSKDI3mdA/TYvmgsHKn8I/AAAAAAAACdk/GccuGL72VDc/s72-c/image_thumb18.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-912642061479959323</id><published>2011-03-21T16:03:00.001-07:00</published><updated>2011-03-21T16:31:56.161-07:00</updated><title type='text'>How to: install and test Hive on hadoop cluster</title><content type='html'>&lt;p&gt;After we &lt;a href="http://androidyou.blogspot.com/2011/02/how-to-install-and-hadoop-to-run-in.html"&gt;install and config hadoop to run in fully distributed Mode, Centos&lt;/a&gt;, then we will move forward and test Hive.     &lt;br /&gt;    &lt;br /&gt;Download one stable release from &lt;a href="http://hive.apache.org/releases.html" target="_blank"&gt;apache site&lt;/a&gt;, and decompress it.     &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="637"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a0a0b2"&gt;         &lt;td valign="top" width="635"&gt;wget &lt;a title="http://mirror.metrocast.net/apache//hive/stable/hive-0.6.0.tar.gz" href="http://mirror.metrocast.net/apache//hive/stable/hive-0.6.0.tar.gz"&gt;http://mirror.metrocast.net/apache//hive/stable/hive-0.6.0.tar.gz&lt;/a&gt;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr bgcolor="#a0a0c2"&gt;         &lt;td valign="top" width="635"&gt;tar -xvf &lt;a title="http://mirror.metrocast.net/apache//hive/stable/hive-0.6.0.tar.gz" href="http://mirror.metrocast.net/apache//hive/stable/hive-0.6.0.tar.gz"&gt;hive-0.6.0.tar.gz&lt;/a&gt;             &lt;br /&gt;cp –rf hive-0.6.0 /usr/lib/hive             &lt;br /&gt;export PATH=$PATH:/usr/lib/hive/bin             &lt;br /&gt;#need to setup the hadoop home variable             &lt;br /&gt;export HADOOP_HOME=/usr/lib/hadoop&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;then you can run hive command shell,     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TYfZEggE6FI/AAAAAAAACcg/GPpTtklm3x8/s1600-h/image%5B4%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TYfZFGb42AI/AAAAAAAACck/6zbfNy7Q1Ps/image_thumb%5B2%5D.png?imgmax=800" width="673" height="54" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;the hive here is just a standard java application, here is all the arguments to start hive shell,     &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="424"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a0a0c2"&gt;         &lt;td valign="top" width="422"&gt;&lt;strong&gt;/usr/lib/jvm/java/bin/java -Xmx4096m -Dhadoop.log.dir=/usr/lib/hadoop/logs -Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=/usr/lib/hadoop -Dhadoop.id.str= -Dhadoop.root.logger=INFO,console -Djava.library.path=/usr/lib/hadoop/lib/native/Linux-amd64-64 -Dhadoop.policy.file=hadoop-policy.xml -classpath &amp;quot;all the jars&amp;quot; &lt;font color="#ff0000"&gt;org.apache.hadoop.util.RunJar&lt;/font&gt;&lt;/strong&gt; &lt;font color="#ff0000"&gt;/usr/lib/hive/lib/hive-cli-0.6.0.jar&lt;/font&gt; &lt;font color="#00ff00"&gt;&lt;strong&gt;org.apache.hadoop.hive.cli.CliDriver&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="422"&gt;the clidriver is a standard java application to process users commands            &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TYfZFtpKvHI/AAAAAAAACco/6TZHEueYO9w/s1600-h/image%5B37%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TYfZGsUT4ZI/AAAAAAAACcs/_A71B7NbEdw/image_thumb%5B19%5D.png?imgmax=800" width="642" height="328" /&gt;&lt;/a&gt;             &lt;br /&gt;            &lt;br /&gt;By default , hive use the java&amp;#160; derby as the store to keep meta data.             &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TYfZHUeXKpI/AAAAAAAACcw/BV8uJK6rBAs/s1600-h/image%5B13%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TYfZH2_1WhI/AAAAAAAACc0/OaJl1_Q_sSI/image_thumb%5B7%5D.png?imgmax=800" width="583" height="216" /&gt;&lt;/a&gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;given the raw input like this    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="541"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="539"&gt;&amp;quot;01&amp;quot;,&amp;quot;35004&amp;quot;,&amp;quot;AL&amp;quot;,&amp;quot;ACMAR&amp;quot;,86.51557,33.584132,6055,0.001499 &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="539"&gt;we will create a table called rawtable first just with one column to hold all the data, using the syntax of creating table &lt;a href="http://wiki.apache.org/hadoop/Hive/HiveQL"&gt;http://wiki.apache.org/hadoop/Hive/HiveQL&lt;/a&gt;             &lt;br /&gt;            &lt;br /&gt;Create table rawtable(raw string);             &lt;br /&gt;load data inpath ‘/user/hadpoop/input’ into table rawtable;             &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TYfZIfwEo-I/AAAAAAAACc4/Po5LWVJ7iBc/s1600-h/image%5B26%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TYfZJFb6PZI/AAAAAAAACc8/jGqqHVnFHqk/image_thumb%5B12%5D.png?imgmax=800" width="452" height="152" /&gt;&lt;/a&gt;             &lt;br /&gt;            &lt;br /&gt;when you run a simple query, (select count&amp;#160; ( *) from rawtable, you can tell the mr job is invoked to get the results.             &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TYfZJRvUGqI/AAAAAAAACdA/m0tqMnNHYeo/s1600-h/image%5B31%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TYfZKF-bxFI/AAAAAAAACdE/74MJupMySE0/image_thumb%5B15%5D.png?imgmax=800" width="483" height="525" /&gt;&lt;/a&gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;if you check the hdfs file systems, every table you just created will be stored under /user/hive/warehouse/[tablename]    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TYfZKeH2pdI/AAAAAAAACdI/VpLpYCkti_U/s1600-h/image%5B36%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TYfZLOynakI/AAAAAAAACdM/U9WyNv9pJJU/image_thumb%5B18%5D.png?imgmax=800" width="312" height="181" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After that, we can write quite complex query like join, subquery, check it out here, &lt;a href="http://wiki.apache.org/hadoop/Hive/HiveQL"&gt;http://wiki.apache.org/hadoop/Hive/HiveQL&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Besides, CLI , you can run ‘hive –service hwi’ to expose a simple web interface for data accessing, &lt;a href="http://home:9999/hwi"&gt;http://home:9999/hwi&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TYff5uhvujI/AAAAAAAACdQ/bDFzGUpexp8/s1600-h/image%5B42%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TYff6N2dA9I/AAAAAAAACdU/mgCPOIByDPs/image_thumb%5B22%5D.png?imgmax=800" width="706" height="436" /&gt;&lt;/a&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Also, we can start a hive server &lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TYff6fCSArI/AAAAAAAACdY/cyHevNYwIeY/s1600-h/image%5B47%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TYff6-bcnNI/AAAAAAAACdc/u7mEl8kvI7A/image_thumb%5B25%5D.png?imgmax=800" width="650" height="52" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;remote user can use the thrift api or JDBC to connect this DB powered by Hive. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-912642061479959323?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/912642061479959323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=912642061479959323&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/912642061479959323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/912642061479959323'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/03/how-to-install-and-test-hive-on-hadoop.html' title='How to: install and test Hive on hadoop cluster'/><author><name>MyNote on every bits</name><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://lh4.ggpht.com/_mYxSKDI3mdA/TYfZFGb42AI/AAAAAAAACck/6zbfNy7Q1Ps/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-2496976490042065238</id><published>2011-03-17T12:03:00.001-07:00</published><updated>2011-03-17T12:03:49.028-07:00</updated><title type='text'>ADB Driver for HTC wildfire and T-Mobile G2</title><content type='html'>&lt;p&gt;when you see the blog, you may have the problem to install driver for those two Phones, why?&lt;/p&gt;  &lt;p&gt;the download driver might be old and doesn’t contain the information about new released Phones. &lt;/p&gt;  &lt;p&gt;you can open the USB driver folder, there is one file [android_winusb.inf], here is mine by default. two sections are highlighted&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="697"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#a0a0b1" valign="top" width="695"&gt;         &lt;p&gt;           &lt;br /&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;[Google.NTx86]&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;          &lt;p&gt;; HTC Dream            &lt;br /&gt;%SingleAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_0BB4&amp;amp;PID_0C01             &lt;br /&gt;%CompositeAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_0BB4&amp;amp;PID_0C02&amp;amp;MI_01             &lt;br /&gt;%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&amp;amp;PID_0FFF             &lt;br /&gt;; HTC Magic             &lt;br /&gt;%CompositeAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_0BB4&amp;amp;PID_0C03&amp;amp;MI_01             &lt;br /&gt;;             &lt;br /&gt;;Moto Sholes             &lt;br /&gt;%SingleAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_22B8&amp;amp;PID_41DB             &lt;br /&gt;%CompositeAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_22B8&amp;amp;PID_41DB&amp;amp;MI_01             &lt;br /&gt;;             &lt;br /&gt;;Google NexusOne             &lt;br /&gt;%SingleAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_18D1&amp;amp;PID_0D02             &lt;br /&gt;%CompositeAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_18D1&amp;amp;PID_0D02&amp;amp;MI_01             &lt;br /&gt;%SingleAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_18D1&amp;amp;PID_4E11             &lt;br /&gt;%CompositeAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_18D1&amp;amp;PID_4E12&amp;amp;MI_01&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td bgcolor="#b0a9b1" valign="top" width="695"&gt;         &lt;p&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;[Google.NTamd64]&lt;/strong&gt;&lt;/font&gt;             &lt;br /&gt;; HTC Dream             &lt;br /&gt;%SingleAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_0BB4&amp;amp;PID_0C01             &lt;br /&gt;%CompositeAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_0BB4&amp;amp;PID_0C02&amp;amp;MI_01             &lt;br /&gt;%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&amp;amp;PID_0FFF             &lt;br /&gt;; HTC Magic             &lt;br /&gt;%CompositeAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_0BB4&amp;amp;PID_0C03&amp;amp;MI_01             &lt;br /&gt;;             &lt;br /&gt;;Moto Sholes             &lt;br /&gt;%SingleAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_22B8&amp;amp;PID_41DB             &lt;br /&gt;%CompositeAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_22B8&amp;amp;PID_41DB&amp;amp;MI_01             &lt;br /&gt;;             &lt;br /&gt;;Google NexusOne             &lt;br /&gt;%SingleAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_18D1&amp;amp;PID_0D02             &lt;br /&gt;%CompositeAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_18D1&amp;amp;PID_0D02&amp;amp;MI_01             &lt;br /&gt;%SingleAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_18D1&amp;amp;PID_4E11             &lt;br /&gt;%CompositeAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_18D1&amp;amp;PID_4E12&amp;amp;MI_01&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;All you need to do is manually add the Adbinterface information to both seconds, then install the driver again.    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="574"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a0a0b1"&gt;         &lt;td valign="top" width="572"&gt;           &lt;p&gt;; HTC Wildfire              &lt;br /&gt;%SingleAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_0BB4&amp;amp;PID_0C8B               &lt;br /&gt;%CompositeAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_0BB4&amp;amp;PID_0C8B&amp;amp;MI_01&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr bgcolor="#a0a0b1"&gt;         &lt;td valign="top" width="572"&gt;           &lt;p&gt;;T-Mobile G2              &lt;br /&gt;%SingleAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_0BB4&amp;amp;PID_0C91               &lt;br /&gt;%CompositeAdbInterface%&amp;#160;&amp;#160;&amp;#160;&amp;#160; = USB_Install, USB\VID_0BB4&amp;amp;PID_0C91&amp;amp;MI_01&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-2496976490042065238?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/2496976490042065238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=2496976490042065238&amp;isPopup=true' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/2496976490042065238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/2496976490042065238'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/03/adb-driver-for-htc-wildfire-and-t.html' title='ADB Driver for HTC wildfire and T-Mobile G2'/><author><name>MyNote on every bits</name><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>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-2680528404661490940</id><published>2011-03-15T18:02:00.001-07:00</published><updated>2011-03-15T18:04:25.781-07:00</updated><title type='text'>Android Debugging, Start the Gallery App programmatically, decode/decompress AndroidManifest.xml</title><content type='html'>&lt;p&gt;I just create one code snippet to save one Image from internet to SD card using the follow code, after that, I want to open the gallery app to view this Image.    &lt;br /&gt;    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="545"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a0a0b1"&gt;         &lt;td valign="top" width="543"&gt;           &lt;p&gt;URL url = new URL(address);              &lt;br /&gt;Object content = url.getContent();               &lt;br /&gt;InputStream is = (InputStream)content;&lt;/p&gt;            &lt;p&gt;BufferedInputStream bis = new BufferedInputStream(is);              &lt;br /&gt;Bitmap bm = BitmapFactory.decodeStream(bis);               &lt;br /&gt;bis.close();               &lt;br /&gt;is.close();               &lt;br /&gt;iv.setImageBitmap(bm); //bind to UI&lt;/p&gt;            &lt;p&gt;String sdurl = Media.insertImage(getContentResolver(), bm, &amp;quot;pic1&amp;quot;, null);              &lt;br /&gt;//url will be, content://media/external/images/media/29&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;How to Start the Gallery app and show this Image?     &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a0a0b1"&gt;         &lt;td valign="top" width="400"&gt;           &lt;p&gt;Intent intent = new Intent(Intent.ACTION_VIEW);              &lt;br /&gt;intent.setData( Uri.parse(temp));               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;this.startActivity(intent);&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TYAMLRfzdiI/AAAAAAAACbs/vKQs2-qSAdA/s1600-h/image%5B3%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TYAMMqfhvYI/AAAAAAAACbw/dsMyt8QB62A/image_thumb%5B1%5D.png?imgmax=800" width="300" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you don’t know how to start a system activity, here is the trick, using the &lt;a href="http://code.google.com/p/android-apktool/" target="_blank"&gt;aapktool&lt;/a&gt;     &lt;br /&gt;basically, pull the apk from the Phone using the DDMS file browser plug-in, here I am pulling out the gallery apk located in /syste/app/*.apk     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TYAMNVM5VtI/AAAAAAAACb0/6OoU9NNEhhY/s1600-h/image%5B8%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TYAMN1Asa_I/AAAAAAAACb4/mwAqxi7Jx-c/image_thumb%5B4%5D.png?imgmax=800" width="604" height="501" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Download the extract the appktool. then run aapt.    &lt;br /&gt;here is the trick, all activity has the AndroidManifest.xml, in that xml, you can find all the declared intent filters to start this activity. By default , this file is compressed. so you need the appt tool to decompress it. here is how. &lt;/p&gt;  &lt;p&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="476"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a0a0b1"&gt;         &lt;td valign="top" width="474"&gt;aapt dump xmltree Gallery3DGoogle.apk&amp;#160; AndroidManifest.xml &amp;gt;a.txt&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;then in the a.txt, you can see all the declared intent. I just pickup the view one. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TYAMOSUzgiI/AAAAAAAACb8/cuRV89NEi6o/s1600-h/image%5B13%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TYAMO9XfBHI/AAAAAAAACcA/HDoAT_92vWM/image_thumb%5B7%5D.png?imgmax=800" width="874" height="323" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-2680528404661490940?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/2680528404661490940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=2680528404661490940&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/2680528404661490940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/2680528404661490940'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/03/android-debugging-start-gallery-app.html' title='Android Debugging, Start the Gallery App programmatically, decode/decompress AndroidManifest.xml'/><author><name>MyNote on every bits</name><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://lh4.ggpht.com/_mYxSKDI3mdA/TYAMMqfhvYI/AAAAAAAACbw/dsMyt8QB62A/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-720053165302335944</id><published>2011-03-08T15:07:00.001-08:00</published><updated>2011-03-08T15:07:45.950-08:00</updated><title type='text'>How to : install and configure DRBD on two Centos Vms tutorial</title><content type='html'>&lt;p&gt;DRBD is a Linux Kernel module that constitutes a distributed storage system. You can    &lt;br /&gt;use DRBD to share block devices between Linux servers and, in turn, share file systems and data.     &lt;br /&gt;&amp;#160;&amp;#160; in a nutshell, Data change on Master Node will be synced to Slave node in the real time mostly. changes on master will be captured on the kernel level, then push the change to slave node and get network ack when nodes are connected. If network is broken, the data change will be queued locally and flush to remote node when it get online. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TXa2Weh6QAI/AAAAAAAACYk/3c6tjIUlHfw/s1600-h/image4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TXa2W94_GnI/AAAAAAAACYo/CYhFxxyhSjU/image_thumb2.png?imgmax=800" width="609" height="352" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here , I will install and configure a two nodes cluster using two centos vm.&amp;#160; we need make sure both VM are network-reachable. then just install, make and config steps.    &lt;br /&gt;    &lt;br /&gt;Let’s say I have two Nodes, they are Home and LA. I will start the setup from Home&lt;/p&gt;  &lt;p&gt;On Both Nodes, expand the Disk to add more space and create a new partition hda4 with the same size (not required.)    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TXa2XfF4l7I/AAAAAAAACYs/NVZQLOUNZxE/s1600-h/image8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2X-01rqI/AAAAAAAACYw/k60RRz1DAvo/image_thumb4.png?imgmax=800" width="565" height="347" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;expand the disk space , here i&amp;#160; will expend 1G more space.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TXa2YjLtoUI/AAAAAAAACY0/WwWkkuYzD4o/s1600-h/image13.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2ZHZQP3I/AAAAAAAACY4/SgPlqg5nGlk/image_thumb7.png?imgmax=800" width="659" height="430" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;then create the partition hda4    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2ZUYvVjI/AAAAAAAACY8/0XidkaBG6s4/s1600-h/image17.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TXa2Z7sMKqI/AAAAAAAACZA/sxku7YlgF80/image_thumb9.png?imgmax=800" width="548" height="193" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Also make sure each node has two NIC card for failover.    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Now, we will use a GUI tool to install and config the drbd cluster, it’s called DRBD-MC which is a standard java application. It will call yum to install the drbd and push the change the those conf files when user click the gui.    &lt;br /&gt;    &lt;br /&gt;Download the jar file from &lt;a title="http://oss.linbit.com/drbd-mc/" href="http://oss.linbit.com/drbd-mc/"&gt;http://oss.linbit.com/drbd-mc/&lt;/a&gt;, drbc-mc.jar and run the jar file on master node.     &lt;br /&gt;    &lt;br /&gt;java –jar ~/Desktop/drmc-*.jar     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TXa2aR00RRI/AAAAAAAACZE/5qNNVafNGQo/s1600-h/image21.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TXa2ao7fVzI/AAAAAAAACZI/-a3Vucz_SR4/image_thumb11.png?imgmax=800" width="640" height="150" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;the main screen ,&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TXa2daNJj6I/AAAAAAAACZM/NHoezRbtMiM/s1600-h/image29.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TXa2gFVmdlI/AAAAAAAACZQ/9KdMu2j4xTI/image_thumb15.png?imgmax=800" width="781" height="561" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Click the Host wizard and add one master node called Home and enter the root password.    &lt;br /&gt;here is the sweet set of the tool, it prerequisites component is missing, just click install to bring it in. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2grPGDJI/AAAAAAAACZU/_Fe--RXaTxc/s1600-h/image40.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2hT8H3xI/AAAAAAAACZY/GOEO5S9JM7k/image_thumb20.png?imgmax=800" width="800" height="417" /&gt;&lt;/a&gt;     &lt;br /&gt;here is the generated script to install pacemaker     &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="742"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="740"&gt; wget -N -nd -P /etc/yum.repos.d/ &lt;a href="http://www.clusterlabs.org/rpm/epel-5/clusterlabs.repo"&gt;http://www.clusterlabs.org/rpm/epel-5/clusterlabs.repo&lt;/a&gt; &amp;amp;&amp;amp; rpm -Uvh &lt;a href="http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm"&gt;http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm&lt;/a&gt; ; yum -y -x resource-agents-3.* -x openais-1.* -x openais-O.9* -x heartbeat-2.1.* install pacemaker.x86_64 heartbeat.x86_64 &amp;amp;&amp;amp; /sbin/chkconfig --add heartbeat&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;after install drbd and necessary dependency component like pacemaker, click Cluster wizard to create a cluster. I will name it helloworld    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2hu6uFhI/AAAAAAAACZc/Y9BOvR27VgU/s1600-h/image%5B8%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2iIGshcI/AAAAAAAACZg/C3SGl0jTzDc/image_thumb%5B3%5D.png?imgmax=800" width="730" height="442" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And select two available hosts&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TXa2iv6P0xI/AAAAAAAACZk/mmYBp9sCjXk/s1600-h/image%5B13%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2jI_YQXI/AAAAAAAACZo/kycFoPsYPDI/image_thumb%5B6%5D.png?imgmax=800" width="590" height="311" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;chose the default communication protocol. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TXa2jpjXDJI/AAAAAAAACZs/iqD9DagwUgE/s1600-h/image%5B18%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TXa2j27n0II/AAAAAAAACZw/AE1Cpr6-J7w/image_thumb%5B9%5D.png?imgmax=800" width="614" height="362" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Click to add two interfaces   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TXa2kTi5qeI/AAAAAAAACZ0/EQ-Q-mxXx24/s1600-h/image%5B23%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TXa2kueBW8I/AAAAAAAACZ4/OVyAHM9fJgM/image_thumb%5B12%5D.png?imgmax=800" width="527" height="104" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Create the create config button to generate the conf file&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TXa2kxAHYMI/AAAAAAAACZ8/KRFU7kvE0K0/s1600-h/image%5B28%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2lfoD2jI/AAAAAAAACaA/dGCwtEAeF0w/image_thumb%5B15%5D.png?imgmax=800" width="578" height="290" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;after done, click the storge manu, chose the hda4 partition, click the action manu to select the LA mirror device&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TXa2mEl3OrI/AAAAAAAACaE/-E5LpjmCoqU/s1600-h/image%5B33%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TXa2mzjUAPI/AAAAAAAACaI/kwzcwy7DYEs/image_thumb%5B18%5D.png?imgmax=800" width="644" height="267" /&gt;&lt;/a&gt;&lt;/p&gt;      &lt;p&gt;give it a resource name hda4&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TXa2nE_6BiI/AAAAAAAACaM/a_mcjZTJmrY/s1600-h/image%5B38%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2nrBqQWI/AAAAAAAACaQ/Ek8sSjqHPNQ/image_thumb%5B21%5D.png?imgmax=800" width="579" height="445" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;click next then you need to create a metadata, here we will keep the meta data into the device itself&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TXa2oCWuDiI/AAAAAAAACaU/7iVuwP_n6eQ/s1600-h/image%5B43%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TXa2oTeE69I/AAAAAAAACaY/WtPFdcDHq7E/image_thumb%5B24%5D.png?imgmax=800" width="610" height="371" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;then chose Home as the primary node, and create a ext3 filesystem&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2ooPeriI/AAAAAAAACac/qibsn4MsLaI/s1600-h/image%5B48%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TXa2pKrXQWI/AAAAAAAACag/oxWe2zJZuC0/image_thumb%5B27%5D.png?imgmax=800" width="645" height="389" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now the device will be synced from home node to la node.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TXa2pkiVfqI/AAAAAAAACak/Ni_jSS2qs0E/s1600-h/image%5B53%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2p7bdcGI/AAAAAAAACao/uQAXhFIFKsg/image_thumb%5B30%5D.png?imgmax=800" width="634" height="138" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;you can also run service drbd status. or just cat /porc/drbd   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TXa2qZzCuVI/AAAAAAAACas/V1yWHcj5wcA/s1600-h/image%5B59%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2q_J59xI/AAAAAAAACaw/T8rlhyJYnM8/image_thumb%5B34%5D.png?imgmax=800" width="642" height="79" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;from the secondary node, you can tell its role is secondary.     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TXa2rPGJ6NI/AAAAAAAACa0/56YNVBnZC_8/s1600-h/image%5B64%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2rq3-ZzI/AAAAAAAACa4/CgQXS9ZrnUE/image_thumb%5B37%5D.png?imgmax=800" width="644" height="88" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;then wait for the sync to be done.     &lt;br /&gt;    &lt;br /&gt;Now, we can mount the /dev/drbd0 device to a file system.     &lt;br /&gt;mkdir /mnt/drbd/hda4    &lt;br /&gt;mount /dev/drbd0 /mnt/drbd/hda4    &lt;br /&gt;    &lt;br /&gt;then every change to /mnt/drbd/hda4 folder will be synced to secondary node.     &lt;br /&gt;Please note here the secondary is read-only mode, you can’t mount the system unless you switch the role to primary node.    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TXa2sE4RPPI/AAAAAAAACa8/kZH7kEgDA34/s1600-h/image%5B68%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TXa2sQACEoI/AAAAAAAACbA/-1_dkShiH0M/image_thumb%5B39%5D.png?imgmax=800" width="602" height="61" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;let’s create some file on master first.     &lt;br /&gt;touch helloworld.master    &lt;br /&gt;    &lt;br /&gt;then on the primary node, bring down it’s interface to simulate a network error.     &lt;br /&gt;ifdown eth0    &lt;br /&gt;ifdown eth1    &lt;br /&gt;and on the slave node, change its role to primary. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2shb60mI/AAAAAAAACbE/tlCdAfPY8ms/s1600-h/image%5B72%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2tO18K_I/AAAAAAAACbI/rOgMo-ZKxus/image_thumb%5B41%5D.png?imgmax=800" width="915" height="84" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;the cluster is in disconnected state, let’s switch secondary node to take over the primary role&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;drbdadm primary hda4, now secondary has the&amp;#160; primary role.    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TXa2tSPa10I/AAAAAAAACbM/3gnzwzheFBc/s1600-h/image%5B76%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TXa2t1OXQaI/AAAAAAAACbQ/K09SUBEV4yU/image_thumb%5B43%5D.png?imgmax=800" width="908" height="107" /&gt;&lt;/a&gt;    &lt;br /&gt;mount /dev/drbd0 /mnt/drbd/hda4    &lt;br /&gt;then we can mount the device and see the helloworld.master is there.     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TXa2uAaThDI/AAAAAAAACbU/3lHDTwxDoOY/s1600-h/image%5B80%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TXa2ukfhMnI/AAAAAAAACbY/sEwkokl3bGo/image_thumb%5B45%5D.png?imgmax=800" width="383" height="74" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;As I say, drbd is one low level service to enable block level replication. we can use this mechanism to replicate the DB binary log of mysql or wal log of postgres , then we can get some level of High availability. &lt;/p&gt;  &lt;p&gt;If we want to switch back the role ( now LA is the primary node, Home is unknow. )   &lt;br /&gt;    &lt;br /&gt;one LA Node. (invalidate the primary role.)    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TXa2u-sSbeI/AAAAAAAACbc/SiYfTQ8yhOU/s1600-h/image%5B84%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2vc9rw_I/AAAAAAAACbg/W9AfdaTLc38/image_thumb%5B47%5D.png?imgmax=800" width="933" height="134" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;On Home Node , just turn on the network service, ifup eth0, ifup eth1. and run “drbdadm connect hda4”   &lt;br /&gt;all set, role switched back to initial setting. Home is Primary, La is secondary.     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TXa2vnvafRI/AAAAAAAACbk/XRBXF6HNjEA/s1600-h/image%5B89%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TXa2wKTBmNI/AAAAAAAACbo/0X5aNtPWPYo/image_thumb%5B50%5D.png?imgmax=800" width="650" height="176" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;Hope it helps. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-720053165302335944?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/720053165302335944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=720053165302335944&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/720053165302335944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/720053165302335944'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/03/how-to-install-and-configure-drbd-on.html' title='How to : install and configure DRBD on two Centos Vms tutorial'/><author><name>MyNote on every bits</name><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://lh5.ggpht.com/_mYxSKDI3mdA/TXa2W94_GnI/AAAAAAAACYo/CYhFxxyhSjU/s72-c/image_thumb2.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-3922848747015381337</id><published>2011-03-07T16:46:00.001-08:00</published><updated>2011-03-07T17:40:54.112-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='postgresql'/><title type='text'>How To : using Postgresql C# Client Npgsql to access postgresql database</title><content type='html'>&lt;p&gt;After &lt;a href="http://androidyou.blogspot.com/2011/03/how-to-install-and-test-postgresql-on.html"&gt;How to : install and test PostgreSql on Centos&lt;/a&gt;, we need to change several things to enable C# Client Access to the remote DB. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Create a User (login) with a password &lt;/li&gt;    &lt;li&gt;Change the pg_hba.conf to turn on the user access from the giving IP range.&amp;#160; change postgres.conf&amp;#160; to change the listening ip address to * instead of just localhost by default. &lt;/li&gt;    &lt;li&gt;install Npgsql .net assembly on the client machine and write C# code. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;To Create a user demo with password demo&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="699"&gt;&lt;tbody&gt;     &lt;tr bgcolor="#a0a0c2"&gt;       &lt;td valign="top" width="697"&gt;\h Create User # \h will list the help tips for every command          &lt;br /&gt;&lt;font color="#ff0000"&gt;Create User demo superuser login password ’demo’;&lt;/font&gt;           &lt;br /&gt;after that, you can query pg_shdow system table to list all users and their hashed password           &lt;br /&gt;          &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TXV8cgI59VI/AAAAAAAACX8/0ddAp6_QoEY/s1600-h/image3.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TXV8c8XEy0I/AAAAAAAACYA/AMR4Lugi3DY/image_thumb1.png?imgmax=800" width="780" height="127" /&gt;&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;PG_HBA.conf is located in the pgdata directory, here it will /usr/local/pgsql/data    &lt;br /&gt;add one line in the top , to enable demo user from host 192.168.209.1 to access all db with the md5 credential. &lt;/p&gt;  &lt;p&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a0a0c2"&gt;         &lt;td valign="top" width="400"&gt;           &lt;p&gt;host&amp;#160;&amp;#160;&amp;#160; all&amp;#160;&amp;#160;&amp;#160;&amp;#160; demo&amp;#160;&amp;#160;&amp;#160; 192.168.209.1/32&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; md5&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;for postgresql.conf, change the listen address to * include all ips    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a0a0c2"&gt;         &lt;td valign="top" width="400"&gt;           &lt;p&gt;             &lt;br /&gt;#listen_addresses = 'localhost'&amp;#160;&amp;#160; &lt;br /&gt;listen_addresses = '*'&amp;#160;&amp;#160; &lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; the restart the service. “ pg_ctl -D /usr/local/pgsql/data/ restart”     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Download the &lt;a href="http://pgfoundry.org/projects/npgsql/" target="_blank"&gt;NPGsql .net library&lt;/a&gt;, create a C# Console application and reference the download Assembly Npgsql.dll&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TXV8dCxiDeI/AAAAAAAACYE/azjhLaFzO90/s1600-h/image8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TXV8drCY4HI/AAAAAAAACYI/N3xuXGtyzU8/image_thumb4.png?imgmax=800" width="263" height="191" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;all the NPGXXX class are simply the implantation of ado.net standard interface.    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TXV8eEHFhPI/AAAAAAAACYM/JC8QdBiJZaU/s1600-h/image13.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TXV8ewJDk8I/AAAAAAAACYQ/KlZesGwGn3k/image_thumb7.png?imgmax=800" width="642" height="241" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here is 10 lines of code to connect to remote postgresql db hellodb and do a basic query.    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="705"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a0a0c2"&gt;         &lt;td valign="top" width="703"&gt;           &lt;p&gt;string connString = &amp;quot;Server=192.168.209.130;port=5432;user id=demo;password=demo;database=hellodb&amp;quot;;&lt;/p&gt;            &lt;p&gt;using (NpgsqlConnection conn = new NpgsqlConnection(connString))              &lt;br /&gt;{               &lt;br /&gt;conn.Open();&lt;/p&gt;            &lt;p&gt;NpgsqlCommand cmd = new NpgsqlCommand(&amp;quot;SELECT name, countrycode from City limit 10&amp;quot;, conn);              &lt;br /&gt;NpgsqlDataReader reader = cmd.ExecuteReader();               &lt;br /&gt;while (reader.Read())               &lt;br /&gt;{               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Console.WriteLine(&amp;quot;City &amp;quot; + reader.GetString(0) + &amp;quot;Code &amp;quot; + reader.GetString(1));               &lt;br /&gt;}               &lt;br /&gt;}&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;hit f5 to run&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TXV8fKtAviI/AAAAAAAACYU/U5x4H7UKjhU/s1600-h/image%5B5%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TXV8f_nNahI/AAAAAAAACYY/p88qHr9uP_s/image_thumb%5B2%5D.png?imgmax=800" width="354" height="238" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;to my suprice, it use its own data protocol. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TXWArrlb24I/AAAAAAAACYc/BQiBIvL-_Nk/s1600-h/image%5B5%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TXWAsK3leiI/AAAAAAAACYg/j2Vwpp3dINs/image_thumb%5B2%5D.png?imgmax=800" width="796" height="326" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-3922848747015381337?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/3922848747015381337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=3922848747015381337&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3922848747015381337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3922848747015381337'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/03/how-to-using-postgresql-c-client-npgsql.html' title='How To : using Postgresql C# Client Npgsql to access postgresql database'/><author><name>MyNote on every bits</name><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://lh5.ggpht.com/_mYxSKDI3mdA/TXV8c8XEy0I/AAAAAAAACYA/AMR4Lugi3DY/s72-c/image_thumb1.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-8160275396975808735</id><published>2011-03-07T15:14:00.001-08:00</published><updated>2011-03-07T17:40:54.113-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='postgresql'/><title type='text'>How to : install and test PostgreSql on Centos</title><content type='html'>&lt;p&gt;basically, just download and config , then make &amp;amp;&amp;amp; make install. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Download the latest and stable source from Postgresql &lt;a href="http://www.postgresql.org/ftp/source/" target="_blank"&gt;Site&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="598"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a9a9b9"&gt;         &lt;td valign="top" width="596"&gt;           &lt;p&gt;wget &lt;a href="http://wwwmaster.postgresql.org/redir/407/h/source/v9.0.3/postgresql-9.0.3.tar.gz"&gt;http://wwwmaster.postgresql.org/redir/407/h/source/v9.0.3/postgresql-9.0.3.tar.gz&lt;/a&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Unzip the tarball file. &lt;/li&gt; &lt;/ul&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="603"&gt;&lt;tbody&gt;     &lt;tr bgcolor="#a9a9b9"&gt;       &lt;td valign="top" width="601"&gt;         &lt;p&gt;tar -zxf postgresql-9.0.3.tar.gz&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;ul&gt;   &lt;li&gt;run the config, make sure prerequisites are there &lt;/li&gt; &lt;/ul&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="604"&gt;&lt;tbody&gt;     &lt;tr bgcolor="#a9a9b9"&gt;       &lt;td valign="top" width="602"&gt;         &lt;p&gt;yum install openssl-devel            &lt;br /&gt;yum install zlib-devel             &lt;br /&gt;yum install gnu-crypto             &lt;br /&gt;yum install readline-devel             &lt;br /&gt;yum install gcc-objc++&lt;/p&gt;          &lt;br /&gt;./configure –help&amp;#160; # list all options to run the compilation, you can override the installation folder using the –-pre-fix options.           &lt;br /&gt;          &lt;p&gt;           &lt;br /&gt;Fine tuning of the installation directories:             &lt;br /&gt;&amp;#160; --bindir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; user executables [EPREFIX/bin]             &lt;br /&gt;&amp;#160; --sbindir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; system admin executables [EPREFIX/sbin]             &lt;br /&gt;&amp;#160; --libexecdir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; program executables [EPREFIX/libexec]             &lt;br /&gt;&amp;#160; --sysconfdir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; read-only single-machine data [PREFIX/etc]             &lt;br /&gt;&amp;#160; --sharedstatedir=DIR&amp;#160;&amp;#160;&amp;#160; modifiable architecture-independent data [PREFIX/com]             &lt;br /&gt;&amp;#160; --localstatedir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160; modifiable single-machine data [PREFIX/var]             &lt;br /&gt;&amp;#160; --libdir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; object code libraries [EPREFIX/lib]             &lt;br /&gt;&amp;#160; --includedir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; C header files [PREFIX/include]             &lt;br /&gt;&amp;#160; --oldincludedir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160; C header files for non-gcc [/usr/include]             &lt;br /&gt;&amp;#160; --datarootdir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; read-only arch.-independent data root [PREFIX/share]             &lt;br /&gt;&amp;#160; --datadir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; read-only architecture-independent data [DATAROOTDIR]             &lt;br /&gt;&amp;#160; --infodir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; info documentation [DATAROOTDIR/info]             &lt;br /&gt;&amp;#160; --localedir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; locale-dependent data [DATAROOTDIR/locale]             &lt;br /&gt;&amp;#160; --mandir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; man documentation [DATAROOTDIR/man]             &lt;br /&gt;&amp;#160; --docdir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; documentation root [DATAROOTDIR/doc/postgresql]             &lt;br /&gt;&amp;#160; --htmldir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; html documentation [DOCDIR]             &lt;br /&gt;&amp;#160; --dvidir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; dvi documentation [DOCDIR]             &lt;br /&gt;&amp;#160; --pdfdir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; pdf documentation [DOCDIR]             &lt;br /&gt;&amp;#160; --psdir=DIR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ps documentation [DOCDIR]             &lt;br /&gt;&lt;/p&gt;          &lt;p&gt;you can also just run ./configure , it will pick up all default options. &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;ul&gt;   &lt;li&gt;make and make install &lt;/li&gt; &lt;/ul&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="608"&gt;&lt;tbody&gt;     &lt;tr bgcolor="#a9a9b9"&gt;       &lt;td valign="top" width="606"&gt;make &amp;amp;&amp;amp; make install&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;ul&gt;   &lt;li&gt;make sure it’s installed without error, add the bin folder to profile , then we can initialize the db. &lt;/li&gt; &lt;/ul&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="603"&gt;&lt;tbody&gt;     &lt;tr bgcolor="#a9a9b9"&gt;       &lt;td valign="top" width="601"&gt;         &lt;p&gt;In /etc/profile or ~/.profile            &lt;br /&gt;PATH=&amp;quot;/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/pgsql/bin&amp;quot;             &lt;br /&gt;export PATH             &lt;br /&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;ul&gt;   &lt;li&gt;Create postgres user and init the db &lt;/li&gt; &lt;/ul&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr bgcolor="#a9a9b9"&gt;       &lt;td valign="top" width="400"&gt;useradd postgres          &lt;br /&gt;mkdir /usr/local/psql/data           &lt;br /&gt;chown postgres /usr/local/psql/data           &lt;br /&gt;          &lt;br /&gt;          &lt;p&gt;           &lt;br /&gt;[root@home pgsql]# su - postgres             &lt;br /&gt;[postgres@home ~]$ initdb --pgdata=/usr/local/pgsql/data             &lt;br /&gt;&lt;/p&gt;         &lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TXVmsQyeoKI/AAAAAAAACXU/QjVf7uwclPc/s1600-h/image%5B3%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TXVms-5--mI/AAAAAAAACXY/oV6mFOO1oUo/image_thumb%5B1%5D.png?imgmax=800" width="516" height="104" /&gt;&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;ul&gt;   &lt;li&gt;start the service and client &lt;/li&gt; &lt;/ul&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr bgcolor="#a9a9b9"&gt;       &lt;td valign="top" width="400"&gt;         &lt;p&gt;pg_ctl -D /usr/local/pgsql/data start            &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TXVmtVuwUcI/AAAAAAAACXc/eSTZhTi0ZpI/s1600-h/image%5B7%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TXVmwSaej7I/AAAAAAAACXg/O8-OG_LUds0/image_thumb%5B3%5D.png?imgmax=800" width="728" height="66" /&gt;&lt;/a&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Now, DB server is ready, we can use the postgres which is a superuser to create some database.    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a9a9b9"&gt;         &lt;td valign="top" width="400"&gt;Su – postgres            &lt;br /&gt;psql&amp;#160; &lt;br /&gt;\l will list all the database.             &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TXVmw1757wI/AAAAAAAACXk/ErvnBCjPUWo/s1600-h/image%5B11%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TXVmxHfOToI/AAAAAAAACXo/ivFEn-DoOD8/image_thumb%5B5%5D.png?imgmax=800" width="780" height="174" /&gt;&lt;/a&gt;             &lt;br /&gt;            &lt;br /&gt;Create database HelloDB;             &lt;br /&gt;Create database helloDB;             &lt;br /&gt;#connect helloDb             &lt;br /&gt;\c helloDB;             &lt;br /&gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;Here,let’s download some sample data from &lt;a title="http://pgfoundry.org/projects/dbsamples/" href="http://pgfoundry.org/projects/dbsamples/"&gt;http://pgfoundry.org/projects/dbsamples/&lt;/a&gt;     &lt;br /&gt;&lt;a title="world-1.0.tar.gz" href="http://pgfoundry.org/frs/download.php/527/world-1.0.tar.gz"&gt;world-1.0.tar.gz&lt;/a&gt;     &lt;br /&gt;upzip and use \I to install the db from the sql . &lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="400"&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TXVx9PuN7vI/AAAAAAAACXs/KgPEcL0ItOc/s1600-h/image%5B21%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TXVx-X5ImQI/AAAAAAAACXw/E_bMfwbsMEg/image_thumb%5B11%5D.png?imgmax=800" width="822" height="477" /&gt;&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;table city, will list all rows in city table.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TXVx-4PmYmI/AAAAAAAACX0/1ZYJ3gne6EM/s1600-h/image%5B19%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TXVx_eYquZI/AAAAAAAACX4/pw8wzrW8WW8/image_thumb%5B9%5D.png?imgmax=800" width="820" height="252" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I will write a C# application using the standard ado.net library to read the city table. &lt;/p&gt;  &lt;h5&gt;&lt;a href="http://androidyou.blogspot.com/2011/03/how-to-using-postgresql-c-client-npgsql.html"&gt;How To : using Postgresql C# Client Npgsql to access postgresql database&lt;/a&gt;&lt;/h5&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-8160275396975808735?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/8160275396975808735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=8160275396975808735&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/8160275396975808735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/8160275396975808735'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/03/how-to-install-and-test-postgresql-on.html' title='How to : install and test PostgreSql on Centos'/><author><name>MyNote on every bits</name><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://lh3.ggpht.com/_mYxSKDI3mdA/TXVms-5--mI/AAAAAAAACXY/oV6mFOO1oUo/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-7247207737798192105</id><published>2011-02-21T17:39:00.001-08:00</published><updated>2011-02-23T16:54:01.695-08:00</updated><title type='text'>How to: create a hadoop map/reduce job tutorial</title><content type='html'>&lt;p&gt;After we &lt;a href="http://androidyou.blogspot.com/2011/02/how-to-install-and-hadoop-to-run-in.html"&gt;install and config hadoop to run in fully distributed Mode, Centos&lt;/a&gt;, now it’s time to write a hello world program to run on top of the hadoop cluster in distributed mode.     &lt;br /&gt;    &lt;br /&gt;I use the 1.8M text file downloaded from &lt;a title="http://www.census.gov/tiger/tms/gazetteer/zips.txt" href="http://www.census.gov/tiger/tms/gazetteer/zips.txt"&gt;http://www.census.gov/tiger/tms/gazetteer/zips.txt&lt;/a&gt;, here is a file layout.     &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="578"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#a0a0c1" valign="top" width="576"&gt;           &lt;p&gt;&amp;quot;01&amp;quot;,&amp;quot;35004&amp;quot;,&amp;quot;&lt;strong&gt;&lt;font color="#ff0000"&gt;AL&lt;/font&gt;&lt;/strong&gt;&amp;quot;,&amp;quot;&lt;font color="#c0504d"&gt;&lt;strong&gt;ACMAR&lt;/strong&gt;&lt;/font&gt;&amp;quot;,86.51557,33.584132,6055,0.001499               &lt;br /&gt;&amp;quot;01&amp;quot;,&amp;quot;35005&amp;quot;,&amp;quot;&lt;strong&gt;&lt;font color="#ff0000"&gt;AL&lt;/font&gt;&lt;/strong&gt;&amp;quot;,&amp;quot;&lt;strong&gt;&lt;font color="#c0504d"&gt;ADAMSVILLE&lt;/font&gt;&lt;/strong&gt;&amp;quot;,86.959727,33.588437,10616,0.002627               &lt;br /&gt;&amp;quot;01&amp;quot;,&amp;quot;35006&amp;quot;,&amp;quot;AL&amp;quot;,&amp;quot;ADGER&amp;quot;,87.167455,33.434277,3205,0.000793               &lt;br /&gt;&amp;quot;01&amp;quot;,&amp;quot;35007&amp;quot;,&amp;quot;AL&amp;quot;,&amp;quot;KEYSTONE&amp;quot;,86.812861,33.236868,14218,0.003519               &lt;br /&gt;&amp;quot;01&amp;quot;,&amp;quot;35010&amp;quot;,&amp;quot;AL&amp;quot;,&amp;quot;NEW SITE&amp;quot;,85.951086,32.941445,19942,0.004935               &lt;br /&gt;&amp;quot;01&amp;quot;,&amp;quot;35014&amp;quot;,&amp;quot;AL&amp;quot;,&amp;quot;ALPINE&amp;quot;,86.208934,33.331165,3062,0.000758               &lt;br /&gt;&amp;quot;01&amp;quot;,&amp;quot;35016&amp;quot;,&amp;quot;AL&amp;quot;,&amp;quot;ARAB&amp;quot;,86.489638,34.328339,13650,0.003378               &lt;br /&gt;&amp;quot;01&amp;quot;,&amp;quot;35019&amp;quot;,&amp;quot;AL&amp;quot;,&amp;quot;BAILEYTON&amp;quot;,86.621299,34.268298,1781,0.000441               &lt;br /&gt;&amp;quot;01&amp;quot;,&amp;quot;35020&amp;quot;,&amp;quot;AL&amp;quot;,&amp;quot;BESSEMER&amp;quot;,86.947547,33.409002,40549,0.010035               &lt;br /&gt;&amp;quot;01&amp;quot;,&amp;quot;35023&amp;quot;,&amp;quot;AL&amp;quot;,&amp;quot;HUEYTOWN&amp;quot;,86.999607,33.414625,39677,0.00982               &lt;br /&gt;&amp;quot;01&amp;quot;,&amp;quot;35031&amp;quot;,&amp;quot;AL&amp;quot;,&amp;quot;BLOUNTSVILLE&amp;quot;,86.568628,34.092937,9058,0.002242               &lt;br /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;we will write a map reduce job to do a basic summary to list the number of citys in each State.     &lt;br /&gt;    &lt;br /&gt;some configuration change,     &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="632"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#a0a0b1" valign="top" width="630"&gt;Since the file is only 1.8M and we have two datanodes(task nodes), we will override the default block size to 500K, so that two task nodes can run at the same time.            &lt;br /&gt;&amp;gt;&amp;gt;&amp;gt;hdfs-site.xml             &lt;br /&gt;            &lt;p&gt;&amp;lt;property&amp;gt;              &lt;br /&gt;&amp;#160; &amp;lt;name&amp;gt;dfs.block.size&amp;lt;/name&amp;gt;               &lt;br /&gt;&amp;#160; &amp;lt;value&amp;gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;512000&lt;/font&gt;&lt;/strong&gt;&amp;lt;/value&amp;gt;               &lt;br /&gt;&amp;#160; &amp;lt;description&amp;gt;The default block size for new files.&amp;lt;/description&amp;gt;               &lt;br /&gt;&amp;lt;/property&amp;gt;               &lt;br /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;then we use the hadoop command line to push the file to the cluster.     &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a0a0c1"&gt;         &lt;td valign="top" width="400"&gt;hadoop fs –mkdir raw            &lt;br /&gt;hadoop fs –copyFromLocal zip.txt raw&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;then from the name web interface, we can tell the zip.txt has 4 Blocks     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TWMTrowRH0I/AAAAAAAACWM/VjU8GhOot_4/s1600-h/image%5B4%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TWMTsIEyCQI/AAAAAAAACWQ/GMkQttjsi_8/image_thumb%5B2%5D.png?imgmax=800" width="465" height="121" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;Now time to write a simple map/reduce java program.&amp;#160; use your favorite IDE eclipse , create a java project and add the lib of those hadoo*.jar to the project builder lib. and here is my basic program.&amp;#160; I put some comments, here     &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="678"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a0a0b1"&gt;         &lt;td valign="top" width="676"&gt;           &lt;p&gt;             &lt;br /&gt;public class statecount extends Configured implements Tool {&lt;/p&gt;            &lt;p&gt;@Override              &lt;br /&gt;public int run(String[] args) throws Exception {&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; if (args != null &amp;amp;&amp;amp; args.length != 2) {              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.out.println(&amp;quot;statecount&amp;#160;&amp;#160; &amp;lt;input&amp;gt; &amp;lt;output&amp;gt;&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ToolRunner.printGenericCommandUsage(System.out);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return -1;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; Configuration conf = this.getConf();              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; JobConf jobconf = new JobConf(conf, statecount.class);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Path in = new Path(args[0]);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Path out = new Path(args[1]);&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; jobconf.setJobName(&amp;quot;Hello world/City count by State&amp;quot;);              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; jobconf.setMapperClass(SMapClass.class);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; jobconf.setReducerClass(SMapClass.class);&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; FileInputFormat.setInputPaths(jobconf, in);              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; FileOutputFormat.setOutputPath(jobconf, out);&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; jobconf.setInputFormat(TextInputFormat.class);              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; jobconf.setOutputFormat(TextOutputFormat.class);&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; jobconf.setMapOutputKeyClass(Text.class);              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; jobconf.setMapOutputValueClass(LongWritable.class);&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; jobconf.setOutputKeyClass(Text.class);              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; jobconf.setOutputValueClass(Text.class);&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; JobClient.runJob(jobconf);&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; return 0;              &lt;br /&gt;}&lt;/p&gt;            &lt;p&gt;public static void main(String[] args) throws Exception {              &lt;br /&gt;int res = ToolRunner.run(new Configuration(), new statecount(), args);               &lt;br /&gt;System.exit(res);               &lt;br /&gt;}&lt;/p&gt;            &lt;p&gt;public static class SMapClass extends MapReduceBase implements              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Mapper&amp;lt;LongWritable, Text, Text, LongWritable&amp;gt;,               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Reducer&amp;lt;Text, LongWritable, Text, Text&amp;gt; {&lt;/p&gt;            &lt;p&gt;@Override              &lt;br /&gt;public void map(LongWritable key, Text value,               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; OutputCollector&amp;lt;Text, LongWritable&amp;gt; output,               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Reporter paramReporter) throws IOException {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; // &amp;quot;01&amp;quot;,&amp;quot;35004&amp;quot;,&amp;quot;AL&amp;quot;,&amp;quot;ACMAR&amp;quot;,86.51557,33.584132,6055,0.001499&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; String s = value.toString();              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; output.collect(new Text(s.split(&amp;quot;,&amp;quot;)[2]), new LongWritable(1));               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; //Collect AL, 1, here               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; //get the third value which will be the State               &lt;br /&gt;}&lt;/p&gt;            &lt;p&gt;@Override              &lt;br /&gt;public void reduce(Text key, Iterator&amp;lt;LongWritable&amp;gt; values,               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; OutputCollector&amp;lt;Text, Text&amp;gt; output, Reporter paramReporter)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; throws IOException {&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; long i = 0;              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; while (values.hasNext()) {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; i += 1;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Object o = values.next(); //I forget this line, there will be deadloop, reduce never over:(               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; output.collect(key, new Text(&amp;quot;#number of citys&amp;quot; + i));&lt;/p&gt;            &lt;p&gt;}}}              &lt;br /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;then click the export menu to export classes to a jar file , then copy to the name server.     &lt;br /&gt;run “hadoop jar helloworld.jar statecount raw/zip.txt&amp;#160; ouputraw” on name server(job track server.)&lt;/p&gt;  &lt;p&gt;from 50030, we can see two task nodes are running&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TWMTsbIW_kI/AAAAAAAACWU/cHhMfPioUhc/s1600-h/image%5B9%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TWMTs6GxCvI/AAAAAAAACWY/yCyac6y_cJY/image_thumb%5B5%5D.png?imgmax=800" width="696" height="211" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;whole statistics,    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TWMTtRAR5nI/AAAAAAAACWc/bJMtkKSc130/s1600-h/image%5B14%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TWMTuhMnG_I/AAAAAAAACWg/rek_I2K_wiI/image_thumb%5B8%5D.png?imgmax=800" width="523" height="514" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;From the console you sumit job, you can see the job output.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TWMTvl4bXPI/AAAAAAAACWk/5fvyOofO61w/s1600-h/image%5B19%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TWMTwQ-kdDI/AAAAAAAACWo/6zQvskw-FeQ/image_thumb%5B11%5D.png?imgmax=800" width="645" height="324" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;after done, go to filesystem browser from :50070 web portal. we can see the final result.    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TWMTxjJs7wI/AAAAAAAACWs/4qe3mPLCtVw/s1600-h/image%5B24%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TWMTymd-doI/AAAAAAAACWw/I5CmGtPk064/image_thumb%5B14%5D.png?imgmax=800" width="356" height="407" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;if you want to make sure that reduce task is distributed, you can put a hostname into the reduce job and run again.     &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="599"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a0a0c1"&gt;         &lt;td valign="top" width="597"&gt;output.collect(key, new Text(&amp;quot;#number of citys&amp;quot; + i +&lt;font color="#ff0000"&gt;&lt;strong&gt; &amp;quot;on host&amp;quot; + InetAddress.getLocalHost().getHostName() ));                &lt;br /&gt;                &lt;br /&gt;&lt;/strong&gt;&lt;font color="#000000"&gt;and assign the reduce tasks                &lt;br /&gt;&lt;/font&gt;              &lt;p&gt;&lt;font color="#000000"&gt;jobconf.setJobName(&amp;quot;Hello world/City count by State&amp;quot;);                  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; jobconf.setMapperClass(SMapClass.class);                   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; jobconf.setReducerClass(SMapClass.class);                   &lt;br /&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;jobconf.setNumReduceTasks(4);&lt;/strong&gt;&lt;/font&gt;                 &lt;br /&gt;&lt;/p&gt;           &lt;/font&gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;in the output hdfs folder, you will see four files.     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TWMTzX9d5sI/AAAAAAAACW0/FkB_KYLeBvM/s1600-h/image%5B29%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TWMT0WpUdJI/AAAAAAAACW4/iyGfbaA1mEM/image_thumb%5B17%5D.png?imgmax=800" width="695" height="189" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;click one file, this reduce job is executed on host Home&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TWMT1M3NGGI/AAAAAAAACW8/alfZZQoYrbs/s1600-h/image%5B33%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TWMT2DJ2lCI/AAAAAAAACXA/eOH0egoaJDA/image_thumb%5B19%5D.png?imgmax=800" width="441" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Another one is one Host LA&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TWMT3odNrXI/AAAAAAAACXE/DaJYUSzYa8g/s1600-h/image%5B38%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TWMT4cB_MpI/AAAAAAAACXI/ZnUK69SnzYc/image_thumb%5B22%5D.png?imgmax=800" width="373" height="214" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;More Hadoop Blogs&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://androidyou.blogspot.com/2011/02/how-to-create-hadoop-mapreduce-job.html"&gt;How to: create a hadoop map/reduce job tutorial&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://androidyou.blogspot.com/2011/02/how-to-install-and-hadoop-to-run-in.html"&gt;How to: install and config hadoop to run in fully distributed Mode, Centos&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://androidyou.blogspot.com/2011/02/how-to-setup-ssh-authentication-over.html"&gt;How to : setup SSH authentication over keys, hadoop installation&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-7247207737798192105?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/7247207737798192105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=7247207737798192105&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/7247207737798192105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/7247207737798192105'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/02/how-to-create-hadoop-mapreduce-job.html' title='How to: create a hadoop map/reduce job tutorial'/><author><name>MyNote on every bits</name><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://lh6.ggpht.com/_mYxSKDI3mdA/TWMTsIEyCQI/AAAAAAAACWQ/GMkQttjsi_8/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-4034616060333854259</id><published>2011-02-21T16:24:00.001-08:00</published><updated>2011-02-21T16:24:42.597-08:00</updated><title type='text'>how to :eclipse win64 , java.lang.UnsatisfiedLinkError: Can't load library: /C:/eclipse/eclipse64/eclipse/configuration/org.eclipse.osgi/bundles/292/1/.cp/lib/linux/x86/libjd-eclipse.so</title><content type='html'>&lt;p&gt;I found it’s a very tricky issue when you are using jdeclipse add-in, and switching between win 32 and win 64.    &lt;br /&gt;    &lt;br /&gt;one day, I get this error, as attached,     &lt;br /&gt;eclipse win64 , java.lang.UnsatisfiedLinkError: Can't load library: /C:/eclipse/eclipse64/eclipse/configuration/org.eclipse.osgi/bundles/292/1/.cp/lib/linux/x86/libjd-eclipse.so&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TWMCRmkgWTI/AAAAAAAACWE/h3wJnhzB_3k/s1600-h/image%5B3%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TWMCSWHpGdI/AAAAAAAACWI/dm1ZATORKvo/image_thumb%5B1%5D.png?imgmax=800" width="864" height="381" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;How to fix that. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Make sure you download the Right version of Eclipse, on Windows 64 , please download the 64 bit version eclipse and using the 64 bit JVM.     &lt;br /&gt;( in the eclipse.int, put a –vm pathyour64bitjre/bin/java.exe”)&lt;/li&gt;    &lt;li&gt;After you finish the Eclipse download, Download the jdeclipse &lt;a title="http://java.decompiler.free.fr/jd-eclipse/update/jdeclipse_update_site.zip" href="http://java.decompiler.free.fr/jd-eclipse/update/jdeclipse_update_site.zip"&gt;http://java.decompiler.free.fr/jd-eclipse/update/jdeclipse_update_site.zip&lt;/a&gt; and unzip the file to eclipse folder.      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;When you open a Workspace which is generated by 32 bit eclipse, Please chose a new workspace, or manually edit the pref file [workspace]\.metadata\.plugins\org.eclipse.core.runtime\.settings, replace x86 with x86_64.     &lt;br /&gt;otherwise, you will be in a situation that 64 bit host to load 32 bit dll, ( eclipse figure out a wrong system architecture., cached by previous editor)&lt;/li&gt; &lt;/ol&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-4034616060333854259?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/4034616060333854259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=4034616060333854259&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/4034616060333854259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/4034616060333854259'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/02/how-to-eclipse-win64.html' title='how to :eclipse win64 , java.lang.UnsatisfiedLinkError: Can&amp;#39;t load library: /C:/eclipse/eclipse64/eclipse/configuration/org.eclipse.osgi/bundles/292/1/.cp/lib/linux/x86/libjd-eclipse.so'/><author><name>MyNote on every bits</name><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://lh6.ggpht.com/_mYxSKDI3mdA/TWMCSWHpGdI/AAAAAAAACWI/dm1ZATORKvo/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-1894436340551995684</id><published>2011-02-20T10:15:00.000-08:00</published><updated>2011-02-21T10:15:33.612-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utility'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows 7'/><title type='text'>Mac OSX stacks on Windows 7</title><content type='html'>&lt;p&gt;A stack is a Dock item that gives you fast access to a folder. When you click a Stack, the files within spring from the Dock in a fan or a grid, depending on the number of items (or the preference you set). Snow Leopard starts you off with three default Stacks: one for Applications, one for downloads, and the other for documents.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;here is a application stack,    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TWKrrLnQ9BI/AAAAAAAACVs/KgLNYxRHtcU/s1600-h/image%5B3%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TWKrtkvX_RI/AAAAAAAACVw/XxUVhpUHsu8/image_thumb%5B1%5D.png?imgmax=800" width="493" height="304" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you need the same feature in windows 7, there is one free add on called 7Stack. you can get some effect like this&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TWKru1E4fAI/AAAAAAAACV0/EomflXoRR8A/s1600-h/image%5B7%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TWKrv3jlWhI/AAAAAAAACV4/pCdHUedhCfU/image_thumb%5B3%5D.png?imgmax=800" width="319" height="447" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Steps, Download the &lt;a href="http://alastria.com/software/7stacks/" target="_blank"&gt;7Stack&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;create one stack, basically Chose one folder, and assign the options, then click generate , it will create one shortcut. you can drag and drop the shortcut to the taskbar. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TWKrwltDYMI/AAAAAAAACV8/Gmf23qav1IU/s1600-h/image%5B11%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TWKrxKRktAI/AAAAAAAACWA/hDLKd0GPCIY/image_thumb%5B5%5D.png?imgmax=800" width="424" height="323" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-1894436340551995684?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/1894436340551995684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=1894436340551995684&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/1894436340551995684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/1894436340551995684'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/02/mac-osx-stacks-on-windows-7.html' title='Mac OSX stacks on Windows 7'/><author><name>MyNote on every bits</name><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://lh4.ggpht.com/_mYxSKDI3mdA/TWKrtkvX_RI/AAAAAAAACVw/XxUVhpUHsu8/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-1705811466790993033</id><published>2011-02-17T15:20:00.001-08:00</published><updated>2011-02-23T16:54:27.725-08:00</updated><title type='text'>How to: install and config hadoop to run in fully distributed Mode, Centos</title><content type='html'>&lt;p&gt;in order to run the hadoop in fully distributed mode, at least we need two VMs. I will config a hadoop cluster with two Data Nodes , one namenode and secondary namenode.    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="545"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#888890"&gt;         &lt;td valign="top" width="200"&gt;MachineName&lt;/td&gt;          &lt;td valign="top" width="343"&gt;Role&lt;/td&gt;       &lt;/tr&gt;        &lt;tr bgcolor="#a8a890"&gt;         &lt;td valign="top" width="200"&gt;Home (192.168.209.130)&lt;/td&gt;          &lt;td valign="top" width="343"&gt;Primary + Secondary Namenode, Slave(data Node), Job Tracker Node&lt;/td&gt;       &lt;/tr&gt;        &lt;tr bgcolor="#a8a890"&gt;         &lt;td valign="top" width="200"&gt;LA (192.168.209.132)&lt;/td&gt;          &lt;td valign="top" width="343"&gt;Slave Node (Data Node)&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;there are some prerequisites to run hadoop, &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Create Hadoop user and group on each Server. &lt;/li&gt;    &lt;li&gt;on Home Node, generate the ssh key and export the pub key to both servers. hadoop user on home node can access each server (login without password) &lt;/li&gt;    &lt;li&gt;install java 1.6 &lt;/li&gt;    &lt;li&gt;configuration change. (hosts file, hadoop conf directory.) &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;   &lt;br /&gt;for the configuration, basically 3 xml located in the hadoop/conf directory.     &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="503"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a8a890"&gt;         &lt;td valign="top" width="501"&gt;HDFS-Site.xml, the essential configration to HDFS, since we only have two data nodes, change the replciation factor to 2. and assign the path of the name server, you ‘d better keep the file into the hadoop directory, or somewhere else make sure hadoop can update that folder.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr bgcolor="#a8a890"&gt;         &lt;td valign="top" width="501"&gt;           &lt;p&gt;&amp;lt;configuration&amp;gt;              &lt;br /&gt;&amp;#160; &amp;lt;property&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;name&amp;gt;dfs.replication&amp;lt;/name&amp;gt;               &lt;br /&gt;&amp;#160;&lt;font color="#ff0000"&gt;&lt;strong&gt;&amp;#160;&amp;#160; &amp;lt;value&amp;gt;2&amp;lt;/value&amp;gt;                  &lt;br /&gt;&lt;/strong&gt;&lt;/font&gt;&amp;#160; &amp;lt;/property&amp;gt;               &lt;br /&gt;&amp;#160; &amp;lt;property&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;name&amp;gt;dfs.permissions&amp;lt;/name&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;value&amp;gt;false&amp;lt;/value&amp;gt;               &lt;br /&gt;&amp;#160; &amp;lt;/property&amp;gt;               &lt;br /&gt;&amp;#160; &amp;lt;property&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;!-- specify this so that running 'hadoop namenode -format' formats the right dir --&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;name&amp;gt;dfs.name.dir&amp;lt;/name&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#ff0000"&gt;&lt;strong&gt;&amp;lt;value&amp;gt;/usr/lib/hadoop/cache/hadoop/dfs/name&amp;lt;/value&amp;gt;                  &lt;br /&gt;&lt;/strong&gt;&lt;/font&gt;&amp;#160; &amp;lt;/property&amp;gt;               &lt;br /&gt;&amp;lt;/configuration&amp;gt;               &lt;br /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="520"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a8a890"&gt;         &lt;td valign="top" width="518"&gt;Core-site.xml, assign the cluster name, I use name server Home here&lt;/td&gt;       &lt;/tr&gt;        &lt;tr bgcolor="#a8a890"&gt;         &lt;td valign="top" width="518"&gt;           &lt;p&gt;&amp;lt;configuration&amp;gt;              &lt;br /&gt;&amp;#160; &amp;lt;property&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;name&amp;gt;fs.default.name&amp;lt;/name&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;value&amp;gt;&lt;font color="#ff0000"&gt;hdfs://Home:8020&lt;/font&gt;&amp;lt;/value&amp;gt;               &lt;br /&gt;&amp;#160; &amp;lt;/property&amp;gt;&lt;/p&gt;            &lt;p&gt;&amp;#160; &amp;lt;property&amp;gt;              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;name&amp;gt;hadoop.tmp.dir&amp;lt;/name&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;value&amp;gt;/usr/lib/hadoop/cache/${user.name}&amp;lt;/value&amp;gt;               &lt;br /&gt;&amp;#160; &amp;lt;/property&amp;gt;               &lt;br /&gt;&amp;lt;/configuration&amp;gt;               &lt;br /&gt;~               &lt;br /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a8a890"&gt;         &lt;td valign="top" width="400"&gt;mapred-site.xml&lt;/td&gt;       &lt;/tr&gt;        &lt;tr bgcolor="#a8a890"&gt;         &lt;td valign="top" width="400"&gt;           &lt;p&gt;             &lt;br /&gt;&amp;lt;configuration&amp;gt;               &lt;br /&gt;&amp;#160; &amp;lt;property&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;name&amp;gt;mapred.job.tracker&amp;lt;/name&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;value&amp;gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;home:8021&lt;/font&gt;&lt;/strong&gt;&amp;lt;/value&amp;gt;               &lt;br /&gt;&amp;#160; &amp;lt;/property&amp;gt;               &lt;br /&gt;&amp;lt;/configuration&amp;gt;               &lt;br /&gt;~               &lt;br /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;then How can we tell the cluster what are those members? the magic is the masters and slavers file under conf directory    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;   &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a8a890"&gt;         &lt;td valign="top" width="400"&gt;masters            &lt;br /&gt;just put the secondary name server, I will put Home here             &lt;br /&gt;            &lt;br /&gt;slavers,             &lt;br /&gt;both servers, home and LA             &lt;br /&gt;            &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TV2tJYzvKJI/AAAAAAAACVM/CNTcdheBc5M/s1600-h/image3.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TV2tJ5TuxMI/AAAAAAAACVQ/30YGflODvXk/image_thumb1.png?imgmax=800" width="269" height="86" /&gt;&lt;/a&gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;After that, copy the hadoop directory with permission to LA server.    &lt;br /&gt;    &lt;br /&gt;then on the name server , here will be home, run “bin/hadoop nameserver –format”     &lt;br /&gt;once done, make sure no error. &lt;/p&gt;  &lt;p&gt;time to start up the Clusters.    &lt;br /&gt;How to do that, just run “bin/start-all.sh”, the script will check all those server list for their roles, and ssh to that server to start the JVM.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TV2tLKAyu_I/AAAAAAAACVU/qBkKtPfWtRw/s1600-h/image8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TV2tMPlVH-I/AAAAAAAACVY/bOY5_I64gOs/image_thumb4.png?imgmax=800" width="644" height="124" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Basically, as I mentationed in the beginning, in Home server just 5 role with each as a jvm process.    &lt;br /&gt;here is the 5 jvm argument.     &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="649"&gt;&lt;tbody&gt;       &lt;tr bgcolor="#a0a0b0"&gt;         &lt;td valign="top" width="200"&gt;           &lt;p&gt;NameNode&lt;/p&gt;         &lt;/td&gt;          &lt;td valign="top" width="447"&gt;           &lt;p&gt;java&amp;#160; -Dhadoop.log.dir=/usr/lib/hadoop/bin/../logs -Dhadoop.log.file=hadoop-hadoop-namenode-home.log&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -Dhadoop.home.dir=/usr/lib/hadoop/bin/.. -Dhadoop.id.str=hadoop -Dhadoop.root.logger=INFO,DRFA -Djava.library.path=/usr/lib/hadoop/bin/../lib/native/Linux-amd64-64 -Dhadoop.policy.file=hadoop-policy.xml -classpath &lt;strong&gt;&lt;font color="#ff0000"&gt;org.apache.hadoop.hdfs.server.namenode.NameNode                  &lt;br /&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="200"&gt;data node&lt;/td&gt;          &lt;td valign="top" width="447"&gt;           &lt;p&gt;java&amp;#160; -Dhadoop.log.dir=/usr/lib/hadoop/bin/../logs -Dhadoop.log.file=hadoop-hadoop-datanode-home.log&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -Dhadoop.home.dir=/usr/lib/hadoop/bin/.. -Dhadoop.id.str=hadoop -Dhadoop.root.logger=INFO,DRFA -Djava.library.path=/usr/lib/hadoop/bin/../lib/native/Linux-amd64-64 -Dhadoop.policy.file=hadoop-policy.xml -classpath&amp;#160; &lt;font color="#ff0000"&gt;&lt;strong&gt;org.apache.hadoop.hdfs.server.datanode.DataNode&lt;/strong&gt;&lt;/font&gt;               &lt;br /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr bgcolor="#a0a0b0"&gt;         &lt;td valign="top" width="200"&gt;secondary name node&lt;/td&gt;          &lt;td valign="top" width="447"&gt;           &lt;p&gt;java&amp;#160; -Dhadoop.log.dir=/usr/lib/hadoop/bin/../logs -Dhadoop.log.file=hadoop-hadoop-secondarynamenode-home.log -Dhadoop.home.dir=/usr/lib/hadoop/bin/.. -Dhadoop.id.str=hadoop -Dhadoop.root.logger=INFO,DRFA -Djava.library.path=/usr/lib/hadoop/bin/../lib/native/Linux-amd64-64 -Dhadoop.policy.file=hadoop-policy.xml -classpath &lt;strong&gt;&lt;font color="#ff0000"&gt;org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode&lt;/font&gt;&lt;/strong&gt;               &lt;br /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="200"&gt;jobtrackr&lt;/td&gt;          &lt;td valign="top" width="447"&gt;           &lt;p&gt;java&amp;#160; -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote -Dhadoop.log.dir=/usr/lib/hadoop/bin/../logs -Dhadoop.log.file=hadoop-hadoop-jobtracker-home.log -Dhadoop.home.dir=/usr/lib/hadoop/bin/.. -Dhadoop.id.str=hadoop -Dhadoop.root.logger=INFO,DRFA -Djava.library.path=/usr/lib/hadoop/bin/../lib/native/Linux-amd64-64 -Dhadoop.policy.file=hadoop-policy.xml -classpath &lt;font color="#ff0000"&gt;&lt;strong&gt;org.apache.hadoop.mapred.JobTracker&lt;/strong&gt;&lt;/font&gt;               &lt;br /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr bgcolor="#a0a0b0"&gt;         &lt;td valign="top" width="200"&gt;tasktrackr&lt;/td&gt;          &lt;td valign="top" width="447"&gt;           &lt;p&gt;java -Xmx1000m -Dhadoop.log.dir=/usr/lib/hadoop/bin/../logs -Dhadoop.log.file=hadoop-hadoop-tasktracker-home.log -Dhadoop.home.dir=/usr/lib/hadoop/bin/.. -Dhadoop.id.str=hadoop -Dhadoop.root.logger=INFO,DRFA -Djava.library.path=/usr/lib/hadoop/bin/../lib/native/Linux-amd64-64 -Dhadoop.policy.file=hadoop-policy.xml -classpath &lt;strong&gt;&lt;font color="#ff0000"&gt;org.apache.hadoop.mapred.TaskTracker&lt;/font&gt;&lt;/strong&gt;               &lt;br /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;once done, you can access &lt;a href="http://home:50070"&gt;http://home:50070&lt;/a&gt;, to see the cluster is running with two nodes.     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TV2tMRvT1AI/AAAAAAAACVc/lqUhq8nPIaI/s1600-h/image12.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TV2tM3RbunI/AAAAAAAACVg/pH5EGgqgesM/image_thumb6.png?imgmax=800" width="451" height="261" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TV2tNCofxoI/AAAAAAAACVk/qiOD8mi6iaI/s1600-h/image17.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TV2tNyd4eEI/AAAAAAAACVo/tQoEcQ-8Qlo/image_thumb9.png?imgmax=800" width="644" height="106" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;More Hadoop Blogs&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://androidyou.blogspot.com/2011/02/how-to-create-hadoop-mapreduce-job.html"&gt;How to: create a hadoop map/reduce job tutorial&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://androidyou.blogspot.com/2011/02/how-to-install-and-hadoop-to-run-in.html"&gt;How to: install and config hadoop to run in fully distributed Mode, Centos&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://androidyou.blogspot.com/2011/02/how-to-setup-ssh-authentication-over.html"&gt;How to : setup SSH authentication over keys, hadoop installation&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-1705811466790993033?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/1705811466790993033/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=1705811466790993033&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/1705811466790993033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/1705811466790993033'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/02/how-to-install-and-hadoop-to-run-in.html' title='How to: install and config hadoop to run in fully distributed Mode, Centos'/><author><name>MyNote on every bits</name><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://lh3.ggpht.com/_mYxSKDI3mdA/TV2tJ5TuxMI/AAAAAAAACVQ/30YGflODvXk/s72-c/image_thumb1.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-1353328060912159697</id><published>2011-02-16T15:55:00.001-08:00</published><updated>2011-02-23T16:54:44.369-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux;putty;ssh'/><category scheme='http://www.blogger.com/atom/ns#' term='hadoop'/><title type='text'>How to : setup SSH authentication over keys, hadoop installation</title><content type='html'>&lt;p&gt;When you install hadoop, you will required to create one user hadoop with group hadoop. and setup the SSH keys that it can login to the server without enter a password.    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="633"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#9999a5" valign="top" width="631"&gt;#Create one group hadoop            &lt;br /&gt;groupadd hadoop             &lt;br /&gt;#create one user hadoop, create home directory             &lt;br /&gt;useradd –g hadoop –-create-home hadoop             &lt;br /&gt;#login as hadoop             &lt;br /&gt;su – hadoop             &lt;br /&gt;#generate ssh public/private keys             &lt;br /&gt;ssh-keygen –t rsa –P ‘’             &lt;br /&gt;# cp the public key to authorized_keys             &lt;br /&gt;cat .ssh/id_rsa.pub&amp;#160; &amp;gt;&amp;gt; .ssh/authorized_keys             &lt;br /&gt;if you want to enable hadopp to access another server without login using ssh,             &lt;br /&gt;cat the&amp;#160; .put key to the server authorized_keys files             &lt;br /&gt;&lt;font color="#ff0000"&gt;#remember to setup the permission on the authorized_keys , that &lt;/font&gt;&lt;font color="#ff0000"&gt;only owner can read/write, 600 permission, if you missed this step, you will be asked for password, even you setup the pub key to be trusted.&lt;/font&gt;             &lt;br /&gt;chmod 600 .ssh/authorized_keys             &lt;br /&gt;Now, you can login to localhost without password             &lt;br /&gt;            &lt;br /&gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;whole steps as captured.    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TVxj9AyaPcI/AAAAAAAACVE/-VdhVChygAQ/s1600-h/image%5B4%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TVxj_zHu0XI/AAAAAAAACVI/3jT9q4UNihs/image_thumb%5B2%5D.png?imgmax=800" width="644" height="287" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;More Hadoop Blogs&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://androidyou.blogspot.com/2011/02/how-to-create-hadoop-mapreduce-job.html"&gt;How to: create a hadoop map/reduce job tutorial&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://androidyou.blogspot.com/2011/02/how-to-install-and-hadoop-to-run-in.html"&gt;How to: install and config hadoop to run in fully distributed Mode, Centos&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://androidyou.blogspot.com/2011/02/how-to-setup-ssh-authentication-over.html"&gt;How to : setup SSH authentication over keys, hadoop installation&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-1353328060912159697?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/1353328060912159697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=1353328060912159697&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/1353328060912159697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/1353328060912159697'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/02/how-to-setup-ssh-authentication-over.html' title='How to : setup SSH authentication over keys, hadoop installation'/><author><name>MyNote on every bits</name><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://lh6.ggpht.com/_mYxSKDI3mdA/TVxj_zHu0XI/AAAAAAAACVI/3jT9q4UNihs/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-3980381083328845550</id><published>2011-02-16T11:55:00.001-08:00</published><updated>2011-02-16T17:34:58.201-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Coherence'/><title type='text'>Decode Oracle Coherence cache extend protocol, Tangosol.Net.RequestTimeoutException</title><content type='html'>&lt;p&gt;on day, C# applications which use coherence cache extend get an Tangosol.Net.RequestTimeoutException. I spent a lot time to figure out what happened? what’s the potential reason of the requestimeout. whole stack trace    &lt;br /&gt;    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="557"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#a0a0c3" valign="top" width="555"&gt;           &lt;p&gt;Tangosol.Net.RequestTimeoutException: request timed out after 30000 millis&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at Tangosol.Net.Messaging.Impl.Request.RequestStatus.get_Response()&lt;/p&gt;            &lt;p&gt;at Tangosol.Net.Messaging.Impl.Request.RequestStatus.WaitForResponse(Int64 millis)&lt;/p&gt;            &lt;p&gt;at Tangosol.Net.Messaging.Impl.Channel.Request(IRequest request, Int64 millis)&lt;/p&gt;            &lt;p&gt;at Tangosol.Net.Messaging.Impl.Channel.Request(IRequest request)&lt;/p&gt;            &lt;p&gt;at Tangosol.Net.Impl.RemoteNamedCache.BinaryNamedCache.get_Item(Object key)&lt;/p&gt;            &lt;p&gt;at Tangosol.Util.ConverterCollections.ConverterDictionary.get_Item(Object key)&lt;/p&gt;            &lt;p&gt;at Tangosol.Net.Impl.RemoteNamedCache.get_Item(Object key)&lt;/p&gt;            &lt;p&gt;at Tangosol.Net.Impl.SafeNamedCache.get_Item(Object key)&lt;/p&gt;            &lt;p&gt;at CacheClient.CustomerProfile.button12_Click(Object sende&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;    &lt;br /&gt;Question 1, is it a network problem? C# application will talk to proxy node (JVM on another machine), then proxy node talk to storage node to get the data back.     &lt;br /&gt;then I capture the network traffic between C# application and the Proxy jvm node. you can use tcpview to figure out which proxy node has the TCP connection established with the client.     &lt;br /&gt;    &lt;br /&gt;the traffic looks good, request out, and response immediately get back. (so no firewall blackout, no package drop)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TVwrmS1jtiI/AAAAAAAACUk/ex-hcBx00e4/s1600-h/image%5B10%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TVwrnwrjPqI/AAAAAAAACUo/VfPjsR2RjKM/image_thumb%5B6%5D.png?imgmax=800" width="644" height="54" /&gt;&lt;/a&gt;     &lt;br /&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;here, 10.1.111.22 is the client running C# application. It send out the request to Proxy Node (10.1.25.151)    &lt;br /&gt;&amp;#160;&amp;#160; then after 0.024 seconds, it get the response back.(client send out ack in package 7)     &lt;br /&gt;    &lt;br /&gt;all looks great on network level. Then it comes to my second question, are those data valid in the return.     &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TVwrorT0ZJI/AAAAAAAACUs/-Fzcx8NQ4sg/s1600-h/image%5B9%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TVwrppXDkdI/AAAAAAAACUw/pfV4AD-6gJo/image_thumb%5B5%5D.png?imgmax=800" width="698" height="460" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;in this special case, the server returns 38 bytes array here it will be    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="682"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#a0a0c0" valign="top" width="680"&gt;25:90:d0:92:cb:05:00:02:00:6b:03:4c:18:15:a4:37:01:00:4e:04:74:65:73:74:01:42:cf:ff:ce:91:b8:f7:b1:b2:ee:01:40:40            &lt;br /&gt;            &lt;br /&gt;what the encoding mechanism, I can only figure out 1st byte 25 which is 37 means that package data length is 38-1=37, how about the rest?&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;then I use the .net reflector to read the Coherence.dll. and figure out the raw format.    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="527"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="525"&gt;[datalength][chennelid][typeid][versionid][objectitself]&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;it used packed int32 format here.     &lt;br /&gt;I write a Simple c# program. here to decode the channel id and tyepid/versionid     &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="648"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#a0a0c0" valign="top" width="646"&gt;           &lt;p&gt;String s =”25:90:d0:92:cb:05:00:02:00:6b:03:4c:18:15:a4:37:01:00:4e:04:74:65:73:74:01:42:cf:ff:ce:91:b8:f7:b1:b2:ee:01:40:40”;              &lt;br /&gt;byte[] data = new byte[(s.Length + 1) / 3];               &lt;br /&gt;for (int i = 0; i &amp;lt; data.Length; i++)               &lt;br /&gt;{               &lt;br /&gt;data[i] = (byte)               &lt;br /&gt;&amp;#160; ( &amp;quot;0123456789ABCDEF&amp;quot;.IndexOf(s[i * 3]) * 16 + &amp;quot;0123456789ABCDEF&amp;quot;.IndexOf(s[i * 3 + 1]));               &lt;br /&gt;}&lt;/p&gt;            &lt;p&gt;MemoryStream ms = new MemoryStream(data);&lt;/p&gt;            &lt;p&gt;DataReader dr = new DataReader(ms);              &lt;br /&gt;string msg = string.Format(&amp;quot;Package Length&amp;#160; {0} \n Channel ID {1} \n TypeID {2}\n Version id {3} &amp;quot;,               &lt;br /&gt;dr.ReadPackedInt32(), dr.ReadPackedInt32(), dr.ReadPackedInt32(), dr.ReadPackedInt32());               &lt;br /&gt;MessageBox.Show(msg);&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;When run the code, you will see the decoded value.     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TVwrqDYaTkI/AAAAAAAACU0/5bCwe_07j8w/s1600-h/image%5B14%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TVwrrNRcY1I/AAAAAAAACU4/OXAfa89IieE/image_thumb%5B8%5D.png?imgmax=800" width="181" height="197" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;it you try decode the output package sending to proxy, it has the same naming format. &lt;/p&gt;  &lt;p&gt;Client send a package with the Channel ID and receive the response with channelID, if the channel state is maintained incorrectly in the client side, you will get the exception&amp;gt;    &lt;br /&gt;here the reflector code for client&amp;#160; decode message.     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TVwrrsNJVAI/AAAAAAAACU8/qfeZj2hK_UA/s1600-h/image%5B18%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TVwrsQRqBkI/AAAAAAAACVA/XuH-yPuWe4s/image_thumb%5B10%5D.png?imgmax=800" width="800" height="277" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;if the channel =null or is closed, even server returns back the response. it will cause the requestimeoutexception.    &lt;br /&gt;stupid code;(     &lt;br /&gt;    &lt;br /&gt;you can also do the inspecting on the runtime level.     &lt;br /&gt;Define one filter.     &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="711"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#a0a0c0" valign="top" width="709"&gt;public class MyFilterDump : IWrapperStreamFactory           &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public MyFilterDump()            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {            &lt;br /&gt;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public System.IO.Stream GetInputStream(System.IO.Stream stream)            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.Diagnostics.Debug.WriteLine(&amp;quot;Get Response &amp;quot; + stream.Length);            &lt;br /&gt;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataReader dr = new DataReader(stream);            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.Diagnostics.Debug.WriteLine(&amp;quot;Chennel ID &amp;quot; + dr.ReadPackedInt32());            &lt;br /&gt;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; stream.Seek(0, SeekOrigin.Begin);            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return stream;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }            &lt;br /&gt;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public System.IO.Stream GetOutputStream(System.IO.Stream stream)            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.Diagnostics.Debug.WriteLine(&amp;quot;Send Request &amp;quot; + stream.Length);            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return stream;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //did the same thing on input            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;then put it into client-coherence.xml and client-cache-control.xml    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#a0a0c0" valign="top" width="400"&gt;           &lt;p&gt;&amp;lt;coherence xmlns=&amp;quot;&lt;a href="http://schemas.tangosol.com/coherence&amp;quot;"&gt;http://schemas.tangosol.com/coherence&amp;quot;&lt;/a&gt;&amp;gt;               &lt;br /&gt;&amp;lt;cluster-config&amp;gt;               &lt;br /&gt;&amp;lt;filters&amp;gt;               &lt;br /&gt;&amp;lt;filter&amp;gt;               &lt;br /&gt;&amp;lt;filter-name&amp;gt;debugfilter&amp;lt;/filter-name&amp;gt;               &lt;br /&gt;&amp;lt;filter-class&amp;gt;ExtendLib.MyFilterDump, ExtendLib&amp;lt;/filter-class&amp;gt;               &lt;br /&gt;&amp;lt;/filter&amp;gt;               &lt;br /&gt;&amp;lt;/filters&amp;gt;               &lt;br /&gt;&lt;/p&gt; ….             &lt;br /&gt;            &lt;br /&gt;client-cache-control.xml             &lt;br /&gt;            &lt;p&gt;&amp;lt;remote-cache-scheme&amp;gt;              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;scheme-name&amp;gt;extend-dist&amp;lt;/scheme-name&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;service-name&amp;gt;ExtendTcpCacheService&amp;lt;/service-name&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;initiator-config&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;tcp-initiator&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;remote-addresses&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;socket-address&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;address&amp;gt;localhost&amp;lt;/address&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;port&amp;gt;9999&amp;lt;/port&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/socket-address&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/remote-addresses&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/tcp-initiator&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;outgoing-message-handler&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;request-timeout&amp;gt;30s&amp;lt;/request-timeout&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/outgoing-message-handler&amp;gt;               &lt;br /&gt;&amp;#160;&lt;font color="#ff0000"&gt;&amp;#160;&amp;#160; &amp;lt;use-filters&amp;gt;                &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;filter-name&amp;gt;debugfilter&amp;lt;/filter-name&amp;gt;                 &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/use-filters&amp;gt;&lt;/font&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;Have fun@&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-3980381083328845550?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/3980381083328845550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=3980381083328845550&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3980381083328845550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3980381083328845550'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/02/decode-oracle-coherence-cache-extend.html' title='Decode Oracle Coherence cache extend protocol, Tangosol.Net.RequestTimeoutException'/><author><name>MyNote on every bits</name><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://lh3.ggpht.com/_mYxSKDI3mdA/TVwrnwrjPqI/AAAAAAAACUo/VfPjsR2RjKM/s72-c/image_thumb%5B6%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-169462774506847924</id><published>2011-02-14T16:26:00.001-08:00</published><updated>2011-02-16T17:35:20.895-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Open Source Solution'/><title type='text'>How to: resize expand partition on Centos hosted by Vmplayer</title><content type='html'>&lt;p&gt;when you limited size warrning, run “df-h”,&amp;#160; 80% is used on /, we will span the /dev/mapper/volgroup00-logvol00 here. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TVnICW1FrfI/AAAAAAAACTc/EZpJbFDbxYI/s1600-h/image%5B58%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TVnICy6N0wI/AAAAAAAACTg/-Yad59ZAqy8/image_thumb%5B27%5D.png?imgmax=800" width="552" height="104" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;display LVM , “lvdisplay”, there are one volum group volGroup00 with two logic volumes 00 and 01   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TVnIDWxWs2I/AAAAAAAACTk/fBMRYu1vbW0/s1600-h/image%5B7%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TVnIGWi844I/AAAAAAAACTo/PzTVDd7m-m8/image_thumb%5B3%5D.png?imgmax=800" width="636" height="496" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;just one disk with 10G, shut down the VM, and click the utility to expand the disk to 13G&lt;/p&gt;    &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TVnIH6xKtVI/AAAAAAAACTs/YpQ1MGwVmv8/s1600-h/image%5B15%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TVnIIzxeeLI/AAAAAAAACTw/dW_6Up6xVRc/image_thumb%5B7%5D.png?imgmax=800" width="663" height="514" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;run “fdisk /dev/had” to add a lvm partition to the new expended disk.    &lt;br /&gt; p –&amp;gt;print current partition    &lt;br /&gt; n-&amp;gt; add one new partition with primary partation    &lt;br /&gt;t-&amp;gt; toggle the partition type to 8e which is lvm &lt;/p&gt;    &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TVnIJanYiFI/AAAAAAAACT0/Kgymt2qDMnU/s1600-h/image%5B51%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TVnIJ_BdwHI/AAAAAAAACT4/WmwnFTbmjLw/image_thumb%5B22%5D.png?imgmax=800" width="685" height="325" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TVnIKRIUH7I/AAAAAAAACT8/0QpMLzzKMq4/s1600-h/image%5B52%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TVnIKv4B1QI/AAAAAAAACUA/mWR5f2iBgfE/image_thumb%5B23%5D.png?imgmax=800" width="587" height="251" /&gt;&lt;/a&gt;    &lt;br /&gt;press W to save the partition &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TVnILIE9JiI/AAAAAAAACUE/wzrnKno5_-g/s1600-h/image%5B31%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TVnIL3U8GaI/AAAAAAAACUI/t3eDZ1Hp8T0/image_thumb%5B13%5D.png?imgmax=800" width="749" height="323" /&gt;&lt;/a&gt;    &lt;br /&gt;after done, Run Pvcreate to create a new LVM. &lt;/p&gt;        &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TVnIMMU_DnI/AAAAAAAACUM/h34N91_OuwQ/s1600-h/image%5B35%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TVnINQstAAI/AAAAAAAACUQ/94gcEapoK1k/image_thumb%5B15%5D.png?imgmax=800" width="465" height="42" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;if you get error like disk us not found , just reboot the vm   &lt;br /&gt;    &lt;br /&gt;Extend the VolGroup00 , add /dev/hda3 to the group, and extend the /dev/VolGroup00/LogVol00 to the new lvm hda3&lt;/p&gt;    &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TVnINvtNB_I/AAAAAAAACUU/FljrzeyffGs/s1600-h/image%5B47%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TVnIOImV11I/AAAAAAAACUY/B-WH1nQnZ6k/image_thumb%5B20%5D.png?imgmax=800" width="537" height="90" /&gt;&lt;/a&gt;    &lt;br /&gt;run resize2fs , refresh the change.&amp;#160; run df –h again, you will see free space is increased. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TVnIO8Rf23I/AAAAAAAACUc/WdyqUoUCNrE/s1600-h/image%5B62%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TVnIPq3lZrI/AAAAAAAACUg/drO8XJjcCM0/image_thumb%5B29%5D.png?imgmax=800" width="691" height="218" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-169462774506847924?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/169462774506847924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=169462774506847924&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/169462774506847924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/169462774506847924'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/02/how-to-resize-partition-on-centos.html' title='How to: resize expand partition on Centos hosted by Vmplayer'/><author><name>MyNote on every bits</name><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://lh6.ggpht.com/_mYxSKDI3mdA/TVnICy6N0wI/AAAAAAAACTg/-Yad59ZAqy8/s72-c/image_thumb%5B27%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-3791653622573689726</id><published>2011-02-10T11:49:00.001-08:00</published><updated>2011-02-16T17:35:20.896-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Open Source Solution'/><title type='text'>how to install and configure Nginx + PHP FPM</title><content type='html'>&lt;p&gt;Building PHP with FPM Support,    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="497"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#a0a0c2" valign="top" width="495"&gt;           &lt;p&gt;# ./configure --enable-fpm --prefix=/opt/phpfpm              &lt;br /&gt;&lt;/p&gt; Make             &lt;br /&gt;Make Install&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TVRBF8dVC3I/AAAAAAAACSs/PY9gn9_wS1w/s1600-h/image3.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TVRBGlBEYTI/AAAAAAAACSw/wLLu3NNjkd8/image_thumb1.png?imgmax=800" width="504" height="144" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;then you can run the php-fpm by run “php-fpm ”, php-fpm is located in the sbin dir    &lt;br /&gt;if you get error like unable to find the conf file like following ,&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TVRBHDQlQcI/AAAAAAAACS0/MzY0bOumWyU/s1600-h/image%5B12%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TVRBHsZileI/AAAAAAAACS4/7_bi1oD5V-k/image_thumb%5B7%5D.png?imgmax=800" width="688" height="56" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;just rename /opt/phpfmp/etc/php-fpm.conf.default as php-fpm.conf , change the min/max/startserver value    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TVRBIMSE1NI/AAAAAAAACS8/SRPiNDWdt3Y/s1600-h/image%5B11%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TVRBIveD53I/AAAAAAAACTA/TaSzYKBDSL0/image_thumb%5B6%5D.png?imgmax=800" width="696" height="66" /&gt;&lt;/a&gt;     &lt;br /&gt;Also copy the /tmp/php-x/php.ini-production to /opt/phpfpm/php.ini     &lt;br /&gt;run netstat –an |grep 9000     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TVRBJmxc2-I/AAAAAAAACTE/NRrkPUETk6M/s1600-h/image15.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TVRBJ8An4YI/AAAAAAAACTI/Gpw1b_W322w/image_thumb7.png?imgmax=800" width="692" height="64" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now install nginx following &lt;a href="http://androidyou.blogspot.com/2011/02/how-to-install-and-config-nginxphp.html"&gt;install and config Nginx/PhP fastcgi on Centos&lt;/a&gt;     &lt;br /&gt;change the nginx.conf to include fpm for php backend proxy processing. just uncomment the default conf settings,     &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="692"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#a0a0c2" valign="top" width="690"&gt;           &lt;p&gt;location ~ \.php$ {              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; root&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; html;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; fastcgi_pass&amp;#160;&amp;#160; 127.0.0.1:9000;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; fastcgi_index&amp;#160; index.php;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; fastcgi_param&amp;#160; SCRIPT_FILENAME &lt;font color="#ff0000"&gt;/opt/nginx/html/&lt;/font&gt;$fastcgi_script_name;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; include&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; fastcgi_params;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;restart nginx –s restart&lt;/p&gt;  &lt;p&gt;then create one info.php and put it under /opt/ngnix/html    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="699"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#a0a0c2" valign="top" width="697"&gt;&amp;lt;?php phpinfo();?&amp;gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;Now, you can access &lt;a href="http://localhost/info.php"&gt;http://localhost/info.php&lt;/a&gt;, you will get php info page.     &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TVRBKhgsnCI/AAAAAAAACTM/L8k4dsKFMAc/s1600-h/image%5B5%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TVRBLO-LKbI/AAAAAAAACTQ/c2K2tKovGnw/image_thumb%5B2%5D.png?imgmax=800" width="693" height="442" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here is the raw traffic between Nginx and PhpFPM    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TVRBL4XICqI/AAAAAAAACTU/if1ABsTQTig/s1600-h/image%5B10%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TVRBMuhsxmI/AAAAAAAACTY/qDvFiOgyCxw/image_thumb%5B5%5D.png?imgmax=800" width="963" height="433" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you get 404 error no matter how, check the nginx.conf point to the absolute path of the script    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;fastcgi_param&amp;#160; SCRIPT_FILENAME &lt;font color="#ff0000"&gt;/opt/nginx/html/&lt;/font&gt;$fastcgi_script_name;     &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-3791653622573689726?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/3791653622573689726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=3791653622573689726&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3791653622573689726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3791653622573689726'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/02/how-to-install-and-configure-nginx-php.html' title='how to install and configure Nginx + PHP FPM'/><author><name>MyNote on every bits</name><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://lh3.ggpht.com/_mYxSKDI3mdA/TVRBGlBEYTI/AAAAAAAACSw/wLLu3NNjkd8/s72-c/image_thumb1.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-6374776416153849059</id><published>2011-02-09T10:51:00.001-08:00</published><updated>2011-02-16T17:35:20.896-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Open Source Solution'/><title type='text'>How to : install and config Nginx/PhP fastcgi on Centos</title><content type='html'>&lt;p&gt;To Install Nginx, setup the prerequisites as following.    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#a0a0c0" valign="top" width="400"&gt;yum install GCC #C compiler            &lt;br /&gt;yum install pcre* # perl regular expression             &lt;br /&gt;yum install zlib zlib-devel             &lt;br /&gt;yum install openssl openssl-devel&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;Download Nginx From &lt;a title="http://nginx.org/en/download.html" href="http://nginx.org/en/download.html"&gt;http://nginx.org/en/download.html&lt;/a&gt;, and extract to a source folder, I will use /tmp here     &lt;br /&gt;    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#a0a0c0" valign="top" width="400"&gt;wget &lt;a title="http://nginx.org/download/nginx-0.8.54.tar.gz" href="http://nginx.org/download/nginx-0.8.54.tar.gztar"&gt;http://nginx.org/download/nginx-0.8.54.tar.gz              &lt;br /&gt;tar&lt;/a&gt; -zxvf nginx-0.8.54.tar.gz             &lt;br /&gt;cd /tmp/nginx-0.8.54             &lt;br /&gt;            &lt;br /&gt;./configure&amp;#160; --prefix=/opt/nginx             &lt;br /&gt;make &amp;amp;&amp;amp; make install&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;once done, you can run ./nginx –? to show all available options ,     &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TVLiCpPQroI/AAAAAAAACSM/zROdTHSHv0I/s1600-h/image%5B3%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TVLiD8j1yAI/AAAAAAAACSQ/pZ7ss2cv8eE/image_thumb%5B1%5D.png?imgmax=800" width="718" height="272" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;for the default loading, it read the conf file which is&amp;#160; conf/nginx.conf&amp;#160; &lt;br /&gt;&amp;#160; &lt;br /&gt;to start the nginx, just run ./nginx, you will get the helloworld page.     &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TVLiFAWPVSI/AAAAAAAACSU/Q31jcgkDgyE/s1600-h/image%5B7%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TVLiGweBJhI/AAAAAAAACSY/_rwv7Em_U9w/image_thumb%5B3%5D.png?imgmax=800" width="612" height="249" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;here, I changed ngingx.conf a little with a New port 88, and basic proxy forward to Apache,PHP (check installation instructions, &lt;a href="http://androidyou.blogspot.com/2011/02/how-to-install-php-to-apache-web-server.html"&gt;Install PHP to Apache web server&lt;/a&gt;)     &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="587"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#a0a0c0" valign="top" width="585"&gt;           &lt;p&gt;server {              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#ff0000"&gt;&lt;strong&gt;listen&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 88;                  &lt;br /&gt;&lt;/strong&gt;&lt;/font&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; server_name&amp;#160; localhost;&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #charset koi8-r;&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #access_log&amp;#160; logs/host.access.log&amp;#160; main;&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; location / {              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; root&amp;#160;&amp;#160; html;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; index&amp;#160; index.html index.htm;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #error_page&amp;#160; 404&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /404.html;&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; # redirect server error pages to the static page /50x.html              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; error_page&amp;#160;&amp;#160; 500 502 503 504&amp;#160; /50x.html;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; location = /50x.html {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; root&amp;#160;&amp;#160; html;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; # proxy the PHP scripts to Apache listening on 127.0.0.1:80              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;strong&gt;&lt;font color="#ff0000"&gt;location ~ \.php$ {                  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; proxy_pass&amp;#160;&amp;#160; &lt;/font&gt;&lt;/strong&gt;&lt;a href="http://127.0.0.1;"&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;http://127.0.0.1;&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;               &lt;br /&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }                  &lt;br /&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;if I access &lt;a href="http://localhost:88/info.php"&gt;http://localhost:&lt;strong&gt;&lt;font size="4"&gt;88&lt;/font&gt;&lt;/strong&gt;/info.php&lt;/a&gt;, nginx will forward the request to &lt;a href="http://localhost/info.php"&gt;http://localhost/info.php&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TVLiIvyHeCI/AAAAAAAACSc/PeP_CsghgLs/s1600-h/image%5B13%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TVLiKgnuG8I/AAAAAAAACSg/0BrS6VHJvv0/image_thumb%5B7%5D.png?imgmax=800" width="644" height="387" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;But the server header is nginx Now. Also the ngnix has enabled the GZIP support now. ( a great reverse proxy, offloading those cut-off features)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TVLiL9qa7VI/AAAAAAAACSk/68krCE5Blm4/s1600-h/image%5B17%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TVLiMkzolBI/AAAAAAAACSo/4G5EiZKCgiY/image_thumb%5B9%5D.png?imgmax=800" width="485" height="224" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;more how-tos: &lt;/p&gt;  &lt;h5&gt;&lt;a href="http://androidyou.blogspot.com/2011/02/how-to-install-apache-22-on-centos.html"&gt;How to: install apache 2.2 on centos&lt;/a&gt;     &lt;h5&gt;&lt;a href="http://androidyou.blogspot.com/2011/02/how-to-install-php-to-apache-web-server.html"&gt;How To: Install PHP to Apache web server&lt;/a&gt;&lt;/h5&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-6374776416153849059?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/6374776416153849059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=6374776416153849059&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/6374776416153849059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/6374776416153849059'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/02/how-to-install-and-config-nginxphp.html' title='How to : install and config Nginx/PhP fastcgi on Centos'/><author><name>MyNote on every bits</name><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://lh3.ggpht.com/_mYxSKDI3mdA/TVLiD8j1yAI/AAAAAAAACSQ/pZ7ss2cv8eE/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-6006574929774322311</id><published>2011-02-08T17:30:00.001-08:00</published><updated>2011-02-16T17:35:20.897-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Open Source Solution'/><title type='text'>How To: Install PHP to Apache web server</title><content type='html'>&lt;p&gt;After &lt;a href="http://androidyou.blogspot.com/2011/02/how-to-install-apache-22-on-centos.html"&gt;install apache 2.2 on centos&lt;/a&gt; , there is no PHP Module built-in, You have to do the same thing like installing apache, Download the source file , compile and put the modules to the folder that will be picked up by apache. Here is the rough steps,    &lt;br /&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Download and extract the tarball from php.net, &lt;a title="http://us.php.net/get/php-5.3.5.tar.gz/from/this/mirror&amp;#13;&amp;#10;" href="http://us.php.net/get/php-5.3.5.tar.gz/from/this/mirror"&gt;http://us.php.net/get/php-5.3.5.tar.gz/from/this/mirror&lt;/a&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;tar –zxvf php-5.3.5.tar.gz&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;go into the uncompressed php folder and run the config&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;./configure –with-apxs2=/opt/apache/bin/apxs –-prefix=/opt/php&lt;/li&gt;      &lt;li&gt;if needed, yum install libevent-devel libxml2-devel&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Compile and &lt;strong&gt;Test&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;strong&gt;make &amp;amp;&amp;amp; make test&lt;/strong&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Install the module to the modules folder&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;make install&lt;/li&gt;      &lt;li&gt;this will automatically upate apache’s conf/httpd.conf with       &lt;br /&gt;LoadModule php5_module&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; modules/libphp5.so        &lt;br /&gt;Add the handler of php manully.         &lt;br /&gt;AddType application/x-httpd-php .php&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;restart the apache daemon&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;TO test, create a single line file to htdocs/test.php   &lt;br /&gt;    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="400"&gt;&amp;lt;?php phpinfo();?&amp;gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;when access that url , you will get the information of php settings, now you are good to go.    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TVHuQgzaF3I/AAAAAAAACSE/yveewKHr2ag/s1600-h/image%5B3%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TVHuRINtPaI/AAAAAAAACSI/DPEnY6E__yI/image_thumb%5B1%5D.png?imgmax=800" width="773" height="394" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-6006574929774322311?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/6006574929774322311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=6006574929774322311&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/6006574929774322311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/6006574929774322311'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/02/how-to-install-php-to-apache-web-server.html' title='How To: Install PHP to Apache web server'/><author><name>MyNote on every bits</name><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://lh3.ggpht.com/_mYxSKDI3mdA/TVHuRINtPaI/AAAAAAAACSI/DPEnY6E__yI/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-5136451614293603150</id><published>2011-02-08T10:44:00.001-08:00</published><updated>2011-02-16T17:35:20.898-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Open Source Solution'/><title type='text'>How to: Test the apache syslog with the free kiwi syslog server</title><content type='html'>&lt;p&gt;Let’s say you have two OS, one in windows which will host the syslog server, and one Centos OS as the container of Apache , here is the tutorial to test the syslog logging. both on&amp;#160; server side (view the logs) and and client side (turn on logging to syslog)&lt;/p&gt;  &lt;p&gt;Download and install one free version of &lt;a href="http://www.kiwisyslog.com/kiwi-syslog-server-overview/" target="_blank"&gt;kiwi syslog&lt;/a&gt;     &lt;br /&gt;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160; when you run, you will get the GUI to show and filter logs. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TVGO-4LOpGI/AAAAAAAACRk/C3aS71KvWXI/s1600-h/image%5B6%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TVGO_e_poDI/AAAAAAAACRo/FNDzp3SbjUk/image_thumb%5B2%5D.png?imgmax=800" width="564" height="352" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;when the log server runs, it will listen on the UDP port 514.    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TVGO_8IPn1I/AAAAAAAACRs/owo_X-UxVxQ/s1600-h/image%5B7%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TVGPAaztWmI/AAAAAAAACRw/KgM9ZyqxiTM/image_thumb%5B3%5D.png?imgmax=800" width="386" height="47" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;on the Centos, OS level, to Point lone log facility to our kiwi log server&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#a0a0c0" valign="top" width="400"&gt;vi /etc/syslog.conf          &lt;br /&gt;#Add one line           &lt;br /&gt;          &lt;p&gt;localcal6.*&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; @192.168.209.1            &lt;br /&gt;&lt;/p&gt; #restart syslog server           &lt;br /&gt;service syslog restart # or killall –HUP syslogd           &lt;br /&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Now, you can test the syslog setting now, by write several logs to syslog    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#a0a0c0" valign="top" width="400"&gt;logger –p local6.info Hello,errorlog&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;from the kiwi server, you will see the log     &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TVGPAz9Mq5I/AAAAAAAACR0/eDROOtCMPMg/s1600-h/image%5B11%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TVGPCK6sBlI/AAAAAAAACR4/aMWwSTu7fT4/image_thumb%5B5%5D.png?imgmax=800" width="562" height="348" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For the Apache, change the httpd.conf, to point the errorlog and accesslog to our syslog facility local6    &lt;br /&gt;    &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td bgcolor="#a0a0c0" valign="top" width="400"&gt;           &lt;p&gt;#ErrorLog &amp;quot;logs/error_log&amp;quot;              &lt;br /&gt;ErrorLog syslog:local6&lt;/p&gt;            &lt;p&gt;#access Log              &lt;br /&gt;CustomLog &amp;quot;|/usr/bin/logger -p local6.info&amp;quot;&amp;#160; combined               &lt;br /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;Restart the httpd , all logs will be dispatched to our syslog server. (here both error log and access log)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TVGPCk0ag-I/AAAAAAAACR8/4imh9uegSQk/s1600-h/image%5B15%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TVGPDgEH9wI/AAAAAAAACSA/NBXd_9TNfCk/image_thumb%5B7%5D.png?imgmax=800" width="644" height="121" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-5136451614293603150?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/5136451614293603150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=5136451614293603150&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5136451614293603150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5136451614293603150'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/02/how-to-test-apache-syslog-with-free.html' title='How to: Test the apache syslog with the free kiwi syslog server'/><author><name>MyNote on every bits</name><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://lh4.ggpht.com/_mYxSKDI3mdA/TVGO_e_poDI/AAAAAAAACRo/FNDzp3SbjUk/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-5337236865668054547</id><published>2011-02-07T13:47:00.001-08:00</published><updated>2011-02-16T17:35:20.898-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Open Source Solution'/><title type='text'>How to: install apache 2.2 on centos</title><content type='html'>&lt;p&gt;It’s pretty straightforward to install apache 2.2 on centos. download the source file and compile it, then make install. &lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="598"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#a0a0d0" valign="top" width="596"&gt;cd /tmp          &lt;br /&gt;wget &lt;a href="http://download.nextag.com/apache//httpd/httpd-2.2.17.tar.gz"&gt;http://download.nextag.com/apache//httpd/httpd-2.2.17.tar.gz&lt;/a&gt;           &lt;br /&gt;tar zxvf httpd-2.2.17.tar.gz           &lt;br /&gt;then switch to the decompressed folder           &lt;br /&gt;./configure --prefix=/opt/apache           &lt;br /&gt;make           &lt;br /&gt;make install           &lt;br /&gt;#Done           &lt;br /&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;   &lt;br /&gt;After that, start the httpd, there is one apachectl utility to control the start/stop operation of httpd&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="599"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#a0a0d0" valign="top" width="597"&gt;/opt/apache/bin/apachectl start          &lt;br /&gt;#start the httpd daemon&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;then browse to localhost:80, you will get the It works page. (httpd is working and listens on port 80)&amp;#160; &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TVBofME11-I/AAAAAAAACRM/Os-UYcG0H5A/s1600-h/image3.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TVBofiBSzRI/AAAAAAAACRQ/yHM0UaIoFfs/image_thumb1.png?imgmax=800" width="332" height="131" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;you can change the index.html located in the /opt/apache/htdocs/ to something else like hello world. &lt;/p&gt;  &lt;p&gt;run “ps -aux|grep httpd”, you will see the processes.    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TVBogB17RQI/AAAAAAAACRU/p2nZQ4aGadA/s1600-h/image7.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TVBog9NcuwI/AAAAAAAACRY/KDYuJBs-yLA/image_thumb3.png?imgmax=800" width="644" height="158" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;To add the httpd to&amp;#160; service.&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#a0a0d0" valign="top" width="400"&gt;         &lt;p&gt;ln -s /opt/apache/bin/apachectl&amp;#160; /etc/init.d/apache2            &lt;br /&gt;add two lines to the /etc/init.d/apache2             &lt;br /&gt;#chkconfig:3 80 80             &lt;br /&gt;#description:my apache web server&lt;/p&gt;          &lt;p&gt;add it to the chkconfig            &lt;br /&gt;chkconfig –add apache2             &lt;br /&gt;            &lt;br /&gt;now you can query chkconfig –list apache2&lt;/p&gt;          &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TVBohSUXDUI/AAAAAAAACRc/4MxB34J1PpU/s1600-h/image11.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TVBohqzDKoI/AAAAAAAACRg/KESQ-vMXm8c/image_thumb5.png?imgmax=800" width="638" height="34" /&gt;&lt;/a&gt; &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-5337236865668054547?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/5337236865668054547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=5337236865668054547&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5337236865668054547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/5337236865668054547'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/02/how-to-install-apache-22-on-centos.html' title='How to: install apache 2.2 on centos'/><author><name>MyNote on every bits</name><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://lh5.ggpht.com/_mYxSKDI3mdA/TVBofiBSzRI/AAAAAAAACRQ/yHM0UaIoFfs/s72-c/image_thumb1.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-8090554934923585987</id><published>2011-02-06T09:53:00.001-08:00</published><updated>2011-02-16T17:35:20.899-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Open Source Solution'/><title type='text'>linux putty SSH  arrow key not working macbook ubantu, ^[[A</title><content type='html'>&lt;p&gt;Unlike One Simple Windows, there are a lot ad-hoc on Linux. I get a strang behavior with ubantu this Moring, the arrow key to show the last command history never work any more. it shows the escaped encoding, &lt;/p&gt;  &lt;p&gt;Always, when I press the left arrow, it returns the last command history,. But not, it returns ^[[A&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TU7f_LW62tI/AAAAAAAACQ0/fE9fI4oSMak/s1600-h/image3.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TU7f_e4OKII/AAAAAAAACQ4/ZfudymOKWbA/image_thumb1.png?imgmax=800" width="457" height="62" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;First make sure which shell you are using, by run “echo $0”&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TU7f_-xzovI/AAAAAAAACQ8/pHAEYNPOHnk/s1600-h/image6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TU7gAaEEu7I/AAAAAAAACRA/jXeN7efFRaU/image_thumb2.png?imgmax=800" width="159" height="72" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I get a stupid shell –su now. now switch to the bash by run “/bin/bash”&lt;/p&gt;  &lt;p&gt;all works now&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TU7gA4hQ8XI/AAAAAAAACRE/-RGzFQMZEFc/s1600-h/image10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TU7gBNHnE7I/AAAAAAAACRI/Cyg97OU6gqc/image_thumb4.png?imgmax=800" width="411" height="107" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;is it tricky?&lt;/p&gt;  &lt;p&gt;also we can add it to the default profile or .bashrc&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-8090554934923585987?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/8090554934923585987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=8090554934923585987&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/8090554934923585987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/8090554934923585987'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/02/linux-putty-ssh-arrow-key-not-working.html' title='linux putty SSH  arrow key not working macbook ubantu, ^[[A'/><author><name>MyNote on every bits</name><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://lh6.ggpht.com/_mYxSKDI3mdA/TU7f_e4OKII/AAAAAAAACQ4/ZfudymOKWbA/s72-c/image_thumb1.png?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-4193753295110816123</id><published>2011-01-22T22:03:00.001-08:00</published><updated>2011-02-16T17:35:32.419-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utility'/><title type='text'>Copy MacBook MAC and Windows Partition from one Disk to another one</title><content type='html'>&lt;p&gt;I have one 60G SSD HD with the mac OS and bootcamp windows 7 64. at one day, I get&amp;#160; a new 160G SSD, so need to find one way to copy all the bits in MAC and Windows to the new SSD HD. &lt;/p&gt;  &lt;p&gt;first, copy the MAC Os from old disk to the new one.&amp;#160; this is much easy compared with the windows partition. Just connect the second HD using the USB adapter, or external HD enclosure. boot the os to mac, and run the Disk Utility.&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; format the New HD to MAC journal format. &lt;/p&gt;  &lt;p&gt; restore the existing MAC partition to the new HD.&amp;#160; (drag and drop) That’s it. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TTvEaQpF9YI/AAAAAAAACQI/8LzbauqcBTc/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TTvEcEyBDVI/AAAAAAAACQM/bCYvuBTFBs4/image_thumb%5B2%5D.png?imgmax=800" width="554" height="384" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;    &lt;br /&gt;For the windows partition, Need back up it to a external HD using the winclone, then restore.&amp;#160; &lt;br /&gt;Download and install the winclone(it’s free.)     &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TTvEdo97yHI/AAAAAAAACQQ/ebFJh6ffU1Q/s1600-h/image%5B8%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TTvEe1e2JuI/AAAAAAAACQU/4Qd77KKaOqo/image_thumb%5B4%5D.png?imgmax=800" width="527" height="517" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Click preference, to disable the compressing.    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_mYxSKDI3mdA/TTvEh9s6dqI/AAAAAAAACQY/DLIZ202eVms/s1600-h/image%5B12%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TTvEjsui1dI/AAAAAAAACQc/CdQBArRgwg8/image_thumb%5B6%5D.png?imgmax=800" width="679" height="340" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Then click Image button to dump the windows partition to a DMG file.   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TTvEle05oHI/AAAAAAAACQg/A6BNwT8RJco/s1600-h/image%5B16%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TTvEnhTIevI/AAAAAAAACQk/9tZcQ7eOMlE/image_thumb%5B8%5D.png?imgmax=800" width="540" height="539" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;It may take a while depending on your IO and CPU.    &lt;br /&gt;    &lt;br /&gt;once done, Boot with the New HD to mac, create a windows partition using the bootcamp assistant.    &lt;br /&gt;    &lt;br /&gt;then run the winclone to restore the windows partition to the new HD partition.     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TTvEpF_v1ZI/AAAAAAAACQo/6ncRBqpavhI/s1600-h/image%5B20%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TTvEqc7kCcI/AAAAAAAACQs/a4THze3uQwE/image_thumb%5B10%5D.png?imgmax=800" width="536" height="519" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;after that, done. for the first windows run, It may prompt you to run a diskcheck, you may skip it if you believe your HD is pretty reliable. Now you can boot the MAC/Win with the new HD. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-4193753295110816123?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/4193753295110816123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=4193753295110816123&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/4193753295110816123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/4193753295110816123'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/01/copy-macbook-mac-and-windows-partition.html' title='Copy MacBook MAC and Windows Partition from one Disk to another one'/><author><name>MyNote on every bits</name><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://lh5.ggpht.com/_mYxSKDI3mdA/TTvEcEyBDVI/AAAAAAAACQM/bCYvuBTFBs4/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-3464513075530839958</id><published>2011-01-12T16:21:00.001-08:00</published><updated>2011-02-16T17:36:13.037-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='j233'/><title type='text'>Hello world EJB 3.1 with JBOSS</title><content type='html'>&lt;p&gt;I’ve been in the Microsoft world for a while, there are a lot distributed technology in the Microsoft stack. DCOM, COM+,Remoting, ASMX/WCF.&amp;#160; What’s the equivalent term for EJB? I would say that’s dot net remoting. &lt;/p&gt;  &lt;p&gt;for a typical remoting project, we need define the MBR Object, Host it ( single call, singleton or Client control activation.) using different options, (IIS or in-process hosting. the runtime will take care the proxy/sub stuff.)    &lt;br /&gt;    &lt;br /&gt;here I will put a hello world EJB. Jboss will be the role of IIS.     &lt;br /&gt;    &lt;br /&gt;like remoting,First define a Interface (shared as a contract between server and client. )     &lt;br /&gt;&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="659"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#a3a3a9" valign="top" width="657"&gt;         &lt;p&gt;public interface ICalculatorBusinessObjects {            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public int Add(int ... args);             &lt;br /&gt;}&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td bgcolor="#a3a3b9" valign="top" width="657"&gt;then Implement a MBR like remoting.&amp;#160; &lt;br /&gt;          &lt;br /&gt;          &lt;p&gt;&lt;font color="#ff0000"&gt;@Stateless              &lt;br /&gt;@Remote               &lt;br /&gt;&lt;/font&gt;public class CalculatorBeanBase implements ICalculatorBusinessObjects { &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; @Override            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public int Add(int... args) {             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // TODO Auto-generated method stub             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int i=0;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.out.println(&amp;quot;------------------&amp;quot; + &amp;quot;get HIt on Server side, My hashcode&amp;quot; + this.hashCode() );             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; for (int j : args) {             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; i+=j;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return i;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;          &lt;p&gt;}&lt;/p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;like the Microsoft attribute, those @xx are annotations.&amp;#160; the runtime will check thos annotation and enforce some ad-hoc logic. like provide different hosting control, transaction control,etc.    &lt;br /&gt;    &lt;br /&gt;Once Done, need deployed it to a container or server . for .net , it’s just a assembly or a dll. for J2ee, a zip file called EJB jar.&amp;#160; you can click eclipse and export the build to a jar file firstEjb.jar     &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TS5Ff2z9cbI/AAAAAAAACPo/eioHWajSjFs/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TS5FgRKAXUI/AAAAAAAACPs/ZFN_68jTEio/image_thumb%5B1%5D.png?imgmax=800" width="501" height="328" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;then deploy the jar to Jboss.&amp;#160; drag and drop the jar to c:\jboss6\server\default\deploy folder. ( for standard configuration,&amp;#160; c:\jboss6\server\all\deploy&amp;#160; if you run with –c all option.)    &lt;br /&gt;    &lt;br /&gt;the server discovers new bits and host it, also register a JDNI entry.&amp;#160; like the remoting .rem stuff.     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TS5FhXTfINI/AAAAAAAACPw/0RDgh5yYCQA/s1600-h/image%5B12%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TS5Fh2vUzjI/AAAAAAAACP0/6OHPmaK2Fnw/image_thumb%5B6%5D.png?imgmax=800" width="778" height="311" /&gt;&lt;/a&gt;     &lt;br /&gt;the ejb is hosted and ready for client connection now.     &lt;br /&gt;    &lt;br /&gt;for client code, just find the proxy by querying the JNDI server and call the biz logic.     &lt;br /&gt;&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="678"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#a1a3a9" valign="top" width="676"&gt;         &lt;p&gt;import javax.naming.Context;            &lt;br /&gt;import javax.naming.InitialContext;             &lt;br /&gt;import javax.naming.NamingException; &lt;/p&gt;          &lt;p&gt;public class main { &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; public static void main(String[] args) throws NamingException {            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // TODO Auto-generated method stub             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Context context=new&amp;#160; InitialContext();             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ICalculatorBusinessObjects o=(ICalculatorBusinessObjects)context.lookup(&amp;quot;java:CalculatorBeanBase/remote&amp;quot;);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.out.println(o.getClass().getCanonicalName());             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.out.println(o.Add(1,2,3,4,5));             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;          &lt;p&gt;}&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;when you run the jboss, Jboss is also one JNDI server listening one a specific port , 1099 by default.    &lt;br /&gt;    &lt;br /&gt;so you need tell the client, which jndi server we should talk to by put some environment variables like the following.     &lt;br /&gt;&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="540"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#a1b1a1" valign="top" width="538"&gt;         &lt;p&gt;-Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory            &lt;br /&gt;-Djava.naming.provider.url=jnp://localhost:1099             &lt;br /&gt;-Djava.naming.factory.url.pkgs=org.jnp.interfaces &lt;/p&gt;          &lt;p&gt;-Djnp.timeout=0            &lt;br /&gt;-Djnp.sotimeout=0&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;When you run the client, you will get the result as you expected, a simple calculator. but all logic runs on server, the Jboss jvm.   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TS5FixpZj4I/AAAAAAAACP4/1RSOAmnVTG0/s1600-h/image%5B16%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_mYxSKDI3mdA/TS5FjLvrA6I/AAAAAAAACP8/OZX6ba1itzE/image_thumb%5B8%5D.png?imgmax=800" width="459" height="94" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Jboss log.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TS5Fjrm2vyI/AAAAAAAACQA/FdrvpuytmmY/s1600-h/image%5B20%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TS5Fjx3LDHI/AAAAAAAACQE/jZKzIhS6nWg/image_thumb%5B10%5D.png?imgmax=800" width="727" height="73" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;here concludes the basic tutorial. have fun.    &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-3464513075530839958?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/3464513075530839958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=3464513075530839958&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3464513075530839958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/3464513075530839958'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/01/hello-world-ejb-31-with-jboss.html' title='Hello world EJB 3.1 with JBOSS'/><author><name>MyNote on every bits</name><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://lh4.ggpht.com/_mYxSKDI3mdA/TS5FgRKAXUI/AAAAAAAACPs/ZFN_68jTEio/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-8748521313253363310</id><published>2011-01-12T14:23:00.001-08:00</published><updated>2011-02-16T17:36:13.037-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='j233'/><title type='text'>How to : test hibernate data access with SQL Server 2008</title><content type='html'>&lt;p&gt;there are some prerequisites to test the hibernate data access with SQL server. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Hibernate Lib. &lt;a title="http://www.hibernate.org/downloads" href="http://www.hibernate.org/downloads"&gt;http://www.hibernate.org/downloads&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;SQL Server JDBC Driver 3.0 &lt;a title="http://msdn.microsoft.com/en-us/sqlserver/aa937724" href="http://msdn.microsoft.com/en-us/sqlserver/aa937724"&gt;http://msdn.microsoft.com/en-us/sqlserver/aa937724&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;some XML configurations ( hibernate.cfg.xml, POJO.hbm.xml) &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I will provide some snippets as following,    &lt;br /&gt;    &lt;br /&gt;Create a java project, add the jars to the builder path. 101 with Hibernate, first create one POJO ( a basic entity bean with “attributes”), I will create a basic Class called TODO with two attributes, ID and Title.     &lt;br /&gt;&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#b0a0a0" valign="top" width="400"&gt;         &lt;p&gt;package Domain; &lt;/p&gt;          &lt;p&gt;public class TODO { &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; private int ID; &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; private String Title; &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; public void setID(int iD) {            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ID = iD;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; public int getID() {            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return ID;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; public void setTitle(String title) {            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Title = title;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; public String getTitle() {            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return Title;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }             &lt;br /&gt;}&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Then Add one XML mapping for this Class. (the file will used by hibernate to interpret the field-column mapping, ID generation rules.) , always using the naming rules as [ENtity].HBM.XML which is optional.    &lt;br /&gt;for the entitye TODO, will be mapped to a table called TODOs, the ID generation rule is implemented by SQL server( identity column)     &lt;br /&gt;&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="559"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#a0a1a9" valign="top" width="557"&gt;         &lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;            &lt;br /&gt;&amp;lt;!DOCTYPE hibernate-mapping PUBLIC&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;-//Hibernate/Hibernate Mapping DTD 3.0//EN&amp;quot;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;&lt;a href="http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd&amp;quot;"&gt;http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd&amp;quot;&lt;/a&gt;&amp;gt;             &lt;br /&gt;&amp;lt;hibernate-mapping package=&amp;quot;Domain&amp;quot;&amp;gt; &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;class table=&amp;quot;TODOs&amp;quot; name=&amp;quot;TODO&amp;quot;&amp;gt;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;id name=&amp;quot;ID&amp;quot; column=&amp;quot;ID&amp;quot;&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;generator class=&amp;quot;native&amp;quot;&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/generator&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/id&amp;gt; &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;property name=&amp;quot;Title&amp;quot;&amp;gt;&amp;lt;/property&amp;gt; &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/class&amp;gt;            &lt;br /&gt;&amp;lt;/hibernate-mapping&amp;gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160; &lt;br /&gt;then create one file HIbernate.cfg.xml ( the driver used to communicate with sql server. )     &lt;br /&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="720"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#a0a0b0" valign="top" width="718"&gt;         &lt;p&gt;&amp;lt;?xml version='1.0' encoding='utf-8'?&amp;gt;&amp;lt;!DOCTYPE hibernate-configuration PUBLIC&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;-//Hibernate/Hibernate Configuration DTD 3.0//EN&amp;quot;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;&lt;a href="http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd&amp;quot;"&gt;http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd&amp;quot;&lt;/a&gt;&amp;gt;             &lt;br /&gt;&amp;lt;hibernate-configuration&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;session-factory&amp;gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;!-- Database connection settings --&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;property name=&amp;quot;connection.driver_class&amp;quot;&amp;gt;&lt;u&gt;&lt;font color="#ff0000"&gt;com.microsoft.sqlserver.jdbc.SQLServerDriver&lt;/font&gt;&lt;/u&gt;&amp;lt;/property&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;property name=&amp;quot;connection.url&amp;quot;&amp;gt;jdbc:sqlserver://localhost;databaseName=test;integratedSecurity=true; &amp;lt;/property&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;property name=&amp;quot;connection.username&amp;quot;&amp;gt;not required&amp;lt;/property&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;property name=&amp;quot;connection.password&amp;quot;&amp;gt;&amp;lt;/property&amp;gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;!-- JDBC connection pool (use the built-in) --&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;property name=&amp;quot;connection.pool_size&amp;quot;&amp;gt;1&amp;lt;/property&amp;gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;!-- SQL dialect --&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;property name=&amp;quot;dialect&amp;quot;&amp;gt;&lt;font color="#ff0000"&gt;org.hibernate.dialect.SQLServer2008Dialect&lt;/font&gt;&amp;lt;/property&amp;gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;!-- Enable Hibernate's automatic session context management --&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;property name=&amp;quot;current_session_context_class&amp;quot;&amp;gt;thread&amp;lt;/property&amp;gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;!-- Disable the second-level cache --&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;property name=&amp;quot;cache.provider_class&amp;quot;&amp;gt;org.hibernate.cache.NoCacheProvider&amp;lt;/property&amp;gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;!-- Echo all executed SQL to stdout --&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;property name=&amp;quot;show_sql&amp;quot;&amp;gt;true&amp;lt;/property&amp;gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;!-- Drop and re-create the database schema on startup --&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;property name=&amp;quot;hbm2ddl.auto&amp;quot;&amp;gt;&lt;font color="#ff0000"&gt;create-drop&lt;/font&gt;&amp;lt;/property&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;mapping resource=&amp;quot;test/TODO.hbm.xml&amp;quot; /&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/session-factory&amp;gt;             &lt;br /&gt;&amp;lt;/hibernate-configuration&amp;gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Then, read /write to and from DB using the hibernate API. &lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="685"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#a1a2b3" valign="top" width="683"&gt;         &lt;p&gt;package test; &lt;/p&gt;          &lt;p&gt;import org.hibernate.Session;            &lt;br /&gt;import org.hibernate.SessionFactory;             &lt;br /&gt;import org.hibernate.Transaction;             &lt;br /&gt;import org.hibernate.cfg.Configuration; &lt;/p&gt;          &lt;p&gt;public class Main { &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; /**            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; * @param args             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; * @throws ClassNotFoundException             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; */             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public static void main(String[] args) { &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SessionFactory factory = new Configuration().configure(            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;test/hibernate.cfg.xml&amp;quot;).buildSessionFactory();             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Session session = factory.getCurrentSession();             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Transaction trans = session.beginTransaction(); &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Domain.TODO newobj = new Domain.TODO();            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; newobj.setTitle(&amp;quot;FirstTODO&amp;quot;);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; session.save(newobj); &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Domain.TODO newobj2 = new Domain.TODO();            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; newobj2.setTitle(&amp;quot;SecondTODO&amp;quot;);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; session.save(newobj2);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // list all objects &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; java.util.List lists = session.createQuery(&amp;quot;from TODO&amp;quot;).list();            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.out.println(lists.size());             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; for (int i = 0; i &amp;lt; lists.size(); i++) {             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.out.println(((Domain.TODO) lists.get(i)).getTitle());             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; trans.commit(); &lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;          &lt;p&gt;}&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;When you run the program, it will create two records and save it to DB. here is the sql used captured by SQL profiler.    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_mYxSKDI3mdA/TS4pzkYfwJI/AAAAAAAACPg/WRhAU7-ysP4/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_mYxSKDI3mdA/TS4p0MHSV3I/AAAAAAAACPk/Jtc4M0146Bw/image_thumb%5B2%5D.png?imgmax=800" width="531" height="519" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;If you get the error when you run the app,     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;Jan 12, 2011 2:19:19 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI &amp;lt;clinit&amp;gt;     &lt;br /&gt;WARNING: Failed to load the sqljdbc_auth.dll cause :- no sqljdbc_auth in java.library.path      &lt;br /&gt;      &lt;br /&gt;&lt;font color="#0080ff"&gt;that means the JDBC driver need loaded some DLL in order to work with SQL server. just copy this dll [located in the driver auth folder] to the class path folder. or just c:\windows folder.       &lt;br /&gt;this only applies if we use the Windows authentication against sql server instead of sql authentication.         &lt;br /&gt;        &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;lt;property name=&amp;quot;connection.url&amp;quot;&amp;gt;jdbc:sqlserver://localhost;databaseName=test;integratedSecurity=&lt;strong&gt;&lt;u&gt;false&lt;/u&gt;&lt;/strong&gt;; &amp;lt;/property&amp;gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;&lt;font color="#0080ff"&gt;       &lt;br /&gt;        &lt;br /&gt;        &lt;br /&gt;&lt;/font&gt;      &lt;br /&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-8748521313253363310?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/8748521313253363310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=8748521313253363310&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/8748521313253363310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/8748521313253363310'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/01/how-to-test-hibernate-data-access-with.html' title='How to : test hibernate data access with SQL Server 2008'/><author><name>MyNote on every bits</name><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://lh5.ggpht.com/_mYxSKDI3mdA/TS4p0MHSV3I/AAAAAAAACPk/Jtc4M0146Bw/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-7816141921736790662</id><published>2011-01-10T15:48:00.000-08:00</published><updated>2011-02-16T17:37:05.753-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='varnish'/><title type='text'>Varnish Cache , Blocked Proxy access to your Server / IP Address</title><content type='html'>Varnish is one great reverse-proxy to cache and accelerate your web application. If you deployed one varnish instance which is facing internet. you may expose some kind of security threats. &lt;br /&gt;i.e somebody will try to use your instance as a regular proxy. or send junk url to the backend.&lt;br /&gt;&lt;br /&gt;you can simply disable those junk request. &lt;br /&gt;&lt;br /&gt;sub vcl_recv {&lt;br /&gt;//only allow IP address for Global DNS based Loadbalancing Or your hostname&lt;br /&gt;if(!req.http.host ~ "yourwebsite" &amp;&amp; !req.http.host ~"([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})" )&lt;br /&gt;{&lt;br /&gt;set req.http.host = “yourwebsite";&lt;br /&gt;set req.url="/" ;  //redirect to home page. instead of forward to the backend&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4653070451761456668-7816141921736790662?l=androidyou.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidyou.blogspot.com/feeds/7816141921736790662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4653070451761456668&amp;postID=7816141921736790662&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/7816141921736790662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4653070451761456668/posts/default/7816141921736790662'/><link rel='alternate' type='text/html' href='http://androidyou.blogspot.com/2011/01/varnish-cache-blocked-proxy-access-to.html' title='Varnish Cache , Blocked Proxy access to your Server / IP Address'/><author><name>MyNote on every bits</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4653070451761456668.post-764687610621808743</id><published>2011-01-05T16:34:00.001-08:00</published><updated>2011-01-05T16:45:59.674-08:00</updated><title type='text'>using btrace to inspect coherence cluster partition tables</title><content type='html'>&lt;p&gt;If you use the distributed cache scheme of coherence cluster, all the data will be distributed to storage nodes. the partition-count is based on the data size. by default is 257 for data less than 100M. &lt;/p&gt; &lt;a href="http://lh6.ggpht.com/_mYxSKDI3mdA/TSUN54Zt0VI/AAAAAAAACOs/cJHPuIU0UAg/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_mYxSKDI3mdA/TSUN6YE5WRI/AAAAAAAACOw/6blsZdMxdw8/image_thumb%5B1%5D.png?imgmax=800" width="277" height="172" /&gt;&lt;/a&gt;   &lt;p&gt;the partition-count is a setting in the cache-scheme , you can always override the partition-count.    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_mYxSKDI3mdA/TSUN62SKoTI/AAAAAAAACO0/TSRMhNfqYA4/s1600-h/image%5B7%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_mYxSKDI3mdA/TSUN79FmiMI/AAAAAAAACO4/1lrh7oQt4bs/image_thumb%5B3%5D.png?imgmax=800" width="553" height="344" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;here I just changed the partition-count to 13, and setup backup count to 1.&amp;#160; (each copped data will have one backup.)     &lt;br /&gt;    &lt;br /&gt;then hook up the btrace script to any node.     &lt;br /&gt;&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="744"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#a0a0c0" valign="top" width="742"&gt;         &lt;p&gt;@OnMethod(clazz = &amp;quot;com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache&amp;quot;, method = &amp;quot;getStorageAssignments&amp;quot;,            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; location=@Location(value=Kind.RETURN))             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public static void getStorageAssignments(@Return int [][] assignment) {             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; println(&amp;quot;getStorageAssignments&amp;quot;);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;Key \t0\t Primary &amp;quot;);&amp;#160;&amp;#160;&amp;#160; print(assignment[0][0]);&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;\t Backup &amp;quot;);&amp;#160;&amp;#160;&amp;#160; println(assignment[0][1]);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;Key \t1\t Primary &amp;quot;);&amp;#160;&amp;#160;&amp;#160; print(assignment[1][0]);&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;\t Backup &amp;quot;);&amp;#160;&amp;#160;&amp;#160; println(assignment[1][1]);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;Key \t2\t Primary &amp;quot;);&amp;#160;&amp;#160;&amp;#160; print(assignment[2][0]);&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;\t Backup &amp;quot;);&amp;#160;&amp;#160;&amp;#160; println(assignment[2][1]);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;Key \t3\t Primary &amp;quot;);&amp;#160;&amp;#160;&amp;#160; print(assignment[3][0]);&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;\t Backup &amp;quot;);&amp;#160;&amp;#160;&amp;#160; println(assignment[3][1]);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;Key \t4\t Primary &amp;quot;);&amp;#160;&amp;#160;&amp;#160; print(assignment[4][0]);&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;\t Backup &amp;quot;);&amp;#160;&amp;#160;&amp;#160; println(assignment[4][1]);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;Key \t5\t Primary &amp;quot;);&amp;#160;&amp;#160;&amp;#160; print(assignment[5][0]);&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;\t Backup &amp;quot;);&amp;#160;&amp;#160;&amp;#160; println(assignment[5][1]);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;Key \t6\t Primary &amp;quot;);&amp;#160;&amp;#160;&amp;#160; print(assignment[6][0]);&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;\t Backup &amp;quot;);&amp;#160;&amp;#160;&amp;#160; println(assignment[6][1]);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;Key \t7\t Primary &amp;quot;);&amp;#160;&amp;#160;&amp;#160; print(assignment[7][0]);&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;\t Backup &amp;quot;);&amp;#160;&amp;#160;&amp;#160; println(assignment[7][1]);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;Key \t8\t Primary &amp;quot;);&amp;#160;&amp;#160;&amp;#160; print(assignment[8][0]);&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;\t Backup &amp;quot;);&amp;#160;&amp;#160;&amp;#160; println(assignment[8][1]);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;Key \t9\t Primary &amp;quot;);&amp;#160;&amp;#160;&amp;#160; print(assignment[9][0]);&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;\t Backup &amp;quot;);&amp;#160;&amp;#160;&amp;#160; println(assignment[9][1]);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;Key \t10\t Primary &amp;quot;);&amp;#160;&amp;#160;&amp;#160; print(assignment[10][0]);&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;\t Backup &amp;quot;);&amp;#160;&amp;#160;&amp;#160; println(assignment[10][1]);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;Key \t11\t Primary &amp;quot;);&amp;#160;&amp;#160;&amp;#160; print(assignment[11][0]);&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;\t Backup &amp;quot;);&amp;#160;&amp;#160;&amp;#160; println(assignment[11][1]);             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;Key \t12\t Primary &amp;quot;);&amp;#160;&amp;#160;&amp;#160; print(assignment[12][0]);&amp;#160;&amp;#160;&amp;#160; print(&amp;quot;\t Backup &amp;quot;);&amp;#160;&amp;#160;&amp;#160; println(assignment[12][1]);&lt;/p&gt;          &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Let’s start with one proxy node and Two Storage Nodes first.    &lt;br /&gt;here is the partition output. (key is 0-12). Node 1 is the proxy Node, 3 and 2 are the storage node. they just keep the backup data of the others     &lt;br /&gt;&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="411"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#a0a0b1" valign="top" width="409"&gt;         &lt;p&gt;getStorageAssignments            &lt;br /&gt;&lt;font color="#ff0000"&gt;Key&amp;#160;&amp;#160;&amp;#160;&amp;#160; 0&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Primary 3&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Backup 2              &lt;br /&gt;Key&amp;#160;&amp;#160;&amp;#160;&amp;#160; 1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Primary 3&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Backup 2               &lt;br /&gt;Key&amp;#160;&amp;#160;&amp;#160;&amp;#160; 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Primary 3&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Backup 2               &lt;br /&gt;Key&amp;#160;&amp;#160;&amp;#160;&amp;#160; 3&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Primary 3&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Backup 2               &lt;br /&gt;Key&amp;#160;&amp;#160;&amp;#160;&amp;#160; 4&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Primary 3&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Backup 2               &lt;br /&gt;Key&amp;#160;&amp;#160;&amp;#160;&amp;#160; 5&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Primary 3&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Backup 2               &lt;br /&gt;&lt;/font&gt;Key&amp;#160;&amp;#160;&amp;#160;&amp;#160; 6&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Primary 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Backup 3             &lt;br /&gt;Key&amp;#160;&amp;#160;&amp;#160;&amp;#160; 7&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Primary 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Backup 3             &lt;br /&gt;Key&amp;#160;&amp;#160;&amp;#160;&amp;#160; 8&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Primary 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Backup 3             &lt;br /&gt;Key&amp;#160;&amp;#160;&amp;#160;&amp;#160; 9&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Primary 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Backup 3             &lt;br /&gt;Key&amp;#160;&amp;#160;&amp;#160;&amp;#160; 10&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Primary 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Backup 3             &lt;br /&gt;Key&amp;#160;&amp;#160;&amp;#160;&amp;#160; 11&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Primary 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Backup 3             &lt;br /&gt;Key&amp;#160;&amp;#160;&amp;#160;&amp;#160; 12&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Primary 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Backup 3&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;If I add one more Storage nodes with ID=5. the New data node will take care some data. ( this will make sure each data node hold equal pieces of data. )    &lt;br /&gt;&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td bgcolor="#a0a0c0" valign="top" width="400"&gt;         &lt;p&gt;&lt;font color="#ff0000"&gt;Key&amp;#160;&amp;#160;&amp;#160;&amp;#160; 0&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Primary 5&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Backup 2&lt;/font&gt;             &lt;br /&gt;Key&amp;#160;&amp;#160;&amp;#160;&amp;#160; 1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Primary 3&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Backup 5             &lt;br /&gt;&lt;font color="#ff0000"&gt;Key&amp;#160;&amp;#160;&amp;#160;&amp;#160; 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Primary 5&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Backup 2              &lt;br /&gt;&lt;/font&gt;Key&amp;#160;&amp;#160;&amp;#160;&amp;#160; 3&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Primary 3&a
