<?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:blogger='http://schemas.google.com/blogger/2008' 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-1229961443216954137</id><updated>2024-09-25T20:49:06.139-07:00</updated><category term="Linux"/><category term="RFT RQM"/><category term="SPOJ"/><category term="Shell Scripting"/><category term="ubuntu"/><category term="Debugging"/><category term="Eclipse"/><category term="Java"/><category term="R"/><category term="c++"/><title type='text'>CodeForFun</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>34</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-2131496278753112164</id><published>2014-02-17T03:00:00.003-08:00</published><updated>2014-02-17T03:00:45.934-08:00</updated><title type='text'>Sql procedure to read data from mySQL DB</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Learning :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;mysql procedure to get the data from a table&lt;br /&gt;************************************************************&lt;br /&gt;&lt;span style=&quot;color: #20124d;&quot;&gt;DELIMITER $$&lt;br /&gt;DROP PROCEDURE IF EXISTS sp_transpose_tickets $$&lt;br /&gt;CREATE PROCEDURE sp_transpose_tickets ()&lt;br /&gt;BEGIN&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select eladm.DiagnosisCode,eladm.PatientID from admission eladm;&lt;br /&gt;END$$&lt;br /&gt;DELIMITER ;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;************************************************************ &lt;br /&gt;
where admission== tableName&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;to see what is stored&lt;br /&gt;*******************************&lt;br /&gt;call sp_transpose_tickets()&lt;br /&gt;
*******************************&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/2131496278753112164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2014/02/sql-procedure-to-read-data-from-mysql-db.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/2131496278753112164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/2131496278753112164'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2014/02/sql-procedure-to-read-data-from-mysql-db.html' title='Sql procedure to read data from mySQL DB'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-7894804714677943011</id><published>2013-09-20T05:22:00.001-07:00</published><updated>2013-09-21T07:07:36.268-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="R"/><title type='text'>Run Rserve on eclipse Example java code </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;assuming that you have R installed , bring up the R console by typing &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;R on console (in context of linux)&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;install&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;packages&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Rserve&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;library&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Rserve&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Rserve&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;border: 0px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 14px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;&quot;&gt;Wait for final message at console as below&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;border: 0px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 14px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;&quot;&gt;&lt;b&gt;Rserv started in daemon mode.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;border: 0px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b style=&quot;background-color: transparent; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 18px;&quot;&gt;import org.rosuda.JRI.Rengine;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b style=&quot;background-color: transparent; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 18px;&quot;&gt;import org.rosuda.REngine.REXPMismatchException;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 14px; line-height: 18px;&quot;&gt;import org.rosuda.REngine.REngineException;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b style=&quot;background-color: transparent; text-align: left;&quot;&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;display: inline !important; text-align: justify;&quot;&gt;
&lt;b style=&quot;background-color: transparent; text-align: left;&quot;&gt;&lt;b style=&quot;background-color: transparent;&quot;&gt; class RServerHello {&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b style=&quot;background-color: transparent; text-align: left;&quot;&gt;
&lt;/b&gt;&lt;/div&gt;
&lt;b style=&quot;background-color: transparent;&quot;&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b style=&quot;background-color: transparent;&quot;&gt;&lt;b style=&quot;background-color: transparent; text-align: left;&quot;&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;display: inline !important; text-align: justify;&quot;&gt;
&lt;b style=&quot;background-color: transparent;&quot;&gt;&lt;b style=&quot;background-color: transparent; text-align: left;&quot;&gt;&lt;b style=&quot;background-color: transparent;&quot;&gt; Rengine rengi&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b style=&quot;background-color: transparent;&quot;&gt;&lt;b style=&quot;background-color: transparent; text-align: left;&quot;&gt;
&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b style=&quot;background-color: transparent;&quot;&gt;
&lt;/b&gt;&lt;/div&gt;
import org.rosuda.REngine.Rserve.*; 

publi
cne; // initialized in constructor or autowired

&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b style=&quot;background-color: transparent; text-align: left;&quot;&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;display: inline !important; text-align: justify;&quot;&gt;
&lt;b style=&quot;background-color: transparent; text-align: left;&quot;&gt;&lt;b style=&quot;background-color: transparent;&quot;&gt;eption {&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b style=&quot;background-color: transparent; text-align: left;&quot;&gt;
&lt;/b&gt;&lt;/div&gt;
&lt;b style=&quot;background-color: transparent;&quot;&gt;  try {
&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b style=&quot;background-color: transparent;&quot;&gt;&lt;b style=&quot;background-color: transparent; text-align: left;&quot;&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;display: inline !important; text-align: justify;&quot;&gt;
&lt;b style=&quot;background-color: transparent;&quot;&gt;&lt;b style=&quot;background-color: transparent; text-align: left;&quot;&gt;&lt;b style=&quot;background-color: transparent;&quot;&gt;    RConnection c = new RConnect&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b style=&quot;background-color: transparent;&quot;&gt;&lt;b style=&quot;background-color: transparent; text-align: left;&quot;&gt;
&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b style=&quot;background-color: transparent;&quot;&gt;
&lt;/b&gt;&lt;/div&gt;
public void helloRWorld() throws REXPMismatchEx
cion();// make a new local connection on default port (6311)
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b style=&quot;background-color: transparent;&quot;&gt;         org.rosuda.REngine.REXP x0 = c.eval(&quot;R.version.s&lt;/b&gt;&lt;/div&gt;
double d[] = c.eval(&quot;rnorm(10)&quot;).asDoubles();
  
 tring&quot;);
            System.out.println(x0.asString());
} catch (REngineException e) {
            //manipulation
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b style=&quot;background-color: transparent;&quot;&gt;new RServerHel&lt;/b&gt;&lt;/div&gt;
}     
  
 }
 public static void main(String[] args) throws REXPMismatchException {
  RServerHello hwObj =
 lo();
  hwObj.helloRWorld();
 }
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
}
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 14px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;&quot;&gt;&lt;b&gt;Download RserveEngine.jar and include that as an external jar at configure build path (Right click on your file at project explorer -&amp;gt; Build Path --&amp;gt; configure build path).&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 14px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;&quot;&gt;Your java code now should be free of all errors&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 14px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 14px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;&quot;&gt;Run!!!&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 14px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 14px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;&quot;&gt;It should just work &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 14px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; font-size: 14px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/7894804714677943011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2013/09/rserve-ion-eclipse-example-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/7894804714677943011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/7894804714677943011'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2013/09/rserve-ion-eclipse-example-code.html' title='Run Rserve on eclipse Example java code '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Shinivagalu Tank Bed Layout, Ejipura</georss:featurename><georss:point>12.935832 77.63285</georss:point></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-3048545983839771225</id><published>2013-09-17T05:03:00.001-07:00</published><updated>2013-09-21T07:08:04.536-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>touchpad disabled after upgrading kernel to 3.4.0-030400-generic on Ubuntu 12.04 Dell Vostro-Solved</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Recently i upgraded my kernel of Ubuntu 12.04 LTS from 3.2.xxx to 3.4 for some software installation , however found my Vostro Dell touchpad disabled and mouse non functional&lt;br /&gt;
&lt;br /&gt;
Here are the commands which help me in getting back the control of touchpad&lt;br /&gt;
This command will reload the mouse driver&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 0px; color: #333333; font-family: &#39;Ubuntu Mono&#39;, &#39;Ubuntu Beta Mono A&#39;, Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; color: #222222; font-family: &#39;Ubuntu Mono&#39;, &#39;Ubuntu Beta Mono A&#39;, Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sudo modprobe -r psmouse
sudo modprobe psmouse proto=imps&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 0px; color: #333333; font-family: &#39;Ubuntu Mono&#39;, &#39;Ubuntu Beta Mono A&#39;, Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; color: #222222; font-family: &#39;Ubuntu Mono&#39;, &#39;Ubuntu Beta Mono A&#39;, Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Also this helps only to make it working in current session , to be able to have it working on every boot time as you would have already figured out , we need to add it to /etc/modprobe.d&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 0px; color: #333333; font-family: &#39;Ubuntu Mono&#39;, &#39;Ubuntu Beta Mono A&#39;, Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; color: #222222; font-family: &#39;Ubuntu Mono&#39;, &#39;Ubuntu Beta Mono A&#39;, Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Create a file like sudo vi mouse.conf&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 0px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-size: 14px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: #222222; font-family: Ubuntu Mono, Ubuntu Beta Mono A, Consolas, Bitstream Vera Sans Mono, Courier New, Courier, monospace;&quot;&gt;Add this as a content of file&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 0px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-size: 14px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: #222222; font-family: Ubuntu Mono, Ubuntu Beta Mono A, Consolas, Bitstream Vera Sans Mono, Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;options psmouse proto=imps&lt;/b&gt;&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;border: 0px; color: #222222; font-family: &#39;Ubuntu Mono&#39;, &#39;Ubuntu Beta Mono A&#39;, Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 14px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;code style=&quot;border: 0px; color: #222222; font-family: &#39;Ubuntu Mono&#39;, &#39;Ubuntu Beta Mono A&#39;, Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;save it , hopefully you wont see the problem again , its like adding a service at stratup as per windows definition.&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code style=&quot;border: 0px; color: #222222; font-family: &#39;Ubuntu Mono&#39;, &#39;Ubuntu Beta Mono A&#39;, Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code style=&quot;border: 0px; color: #222222; font-family: &#39;Ubuntu Mono&#39;, &#39;Ubuntu Beta Mono A&#39;, Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Manish&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/3048545983839771225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2013/09/touchpad-disabled-after-upgrading.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/3048545983839771225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/3048545983839771225'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2013/09/touchpad-disabled-after-upgrading.html' title='touchpad disabled after upgrading kernel to 3.4.0-030400-generic on Ubuntu 12.04 Dell Vostro-Solved'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Shinivagalu Tank Bed Layout, Ejipura</georss:featurename><georss:point>12.935832 77.63285</georss:point></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-2173532246857770308</id><published>2013-08-29T03:44:00.003-07:00</published><updated>2013-09-21T07:08:38.347-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>install sqldeveloper on Ubuntu 12.04 LTS</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #575757; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;1.download the oracle from Oracle main Site …Geek alert- Nah no command for this , you need to go register and download !!!&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #575757; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;2.&lt;b&gt;sudo apt-get install alien&lt;/b&gt; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #575757; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(Most probably this would have got already installed while installing oracle)&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #575757; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;3.Logically you have &amp;nbsp;a rpm now so you got to change it to the format ubuntu understands it right ? Alient is your saviour to get that bit done&lt;/span&gt;&lt;/div&gt;
&lt;span id=&quot;docs-internal-guid-7febad04-c9aa-8c26-d230-aa996cf7712c&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #575757; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #575757; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;b&gt;sudo alien --scripts -d sqldeveloper-3.2.20.09.87-1.noarch.rpm&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #575757; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #575757; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;4.Install sql developer from the deb package you have &lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #575757; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;b&gt;sudo dpkg -i sqldeveloper_3.2.20.09.87-2_all.deb&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #575757; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.3742897727272727; margin-bottom: 16pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #575757; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;5.&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #434343; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Create the following directory in your home folder, this where it&#39;s going to store path to the jdk in the next step:&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.3742897727272727; margin-bottom: 16pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #434343; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;b&gt; cd /home/$username&lt;/b&gt;(The system name variable)&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.3742897727272727; margin-bottom: 16pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #434343; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;say in my case cd /home/manish&lt;/span&gt;&lt;/div&gt;
&lt;ol style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;li dir=&quot;ltr&quot; style=&quot;background-color: white; color: #434343; font-family: Arial; font-style: italic; font-variant: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.3742897727272727; margin-bottom: 16pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #434343; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;b&gt;mkdir .sqldeveloper/&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #434343; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Run the sql developer from shell it is gonna ask it to feed path of java Do that , see&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #434343; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;b&gt;echo $JAVA_HOME&lt;/b&gt; and feed that as input&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #434343; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;mostly it is going to look like this&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #434343; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;b&gt;/usr/lib/jvm/java-6-openjdk&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #434343; font-family: Arial; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #434343; font-family: Arial; font-style: italic; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;b&gt;sudo /opt/sqldeveloper/sqldeveloper.sh&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/2173532246857770308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2013/08/install-sqldeveloper-on-ubuntu-1204-lts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/2173532246857770308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/2173532246857770308'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2013/08/install-sqldeveloper-on-ubuntu-1204-lts.html' title='install sqldeveloper on Ubuntu 12.04 LTS'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Shinivagalu Tank Bed Layout, Ejipura</georss:featurename><georss:point>12.935832 77.63285</georss:point></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-4726772108856114601</id><published>2013-08-27T02:19:00.003-07:00</published><updated>2013-08-27T02:19:43.985-07:00</updated><title type='text'>Install latest version of R on Ubuntu [if you have some version already installed and getting ERROR: dependencies ‘mclust’, ‘flexmix’ are not available for package ‘fpc’ on R studio]</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
I had R 2.0.14 on my ubuntu 12.04 LTS and was trying to use the command&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
	
	
	


&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: Lucida Console, serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background: #e1e2e5;&quot;&gt;install.packages(&quot;fpc&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: Lucida Console, serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background: #e1e2e5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;background-color: #e1e2e5; line-height: 16px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Lucida Console, serif; font-size: x-small;&quot;&gt;ERROR: dependencies ‘mclust’, ‘flexmix’ are not available for package ‘fpc’&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;background-color: #e1e2e5; line-height: 16px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Lucida Console, serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;background-color: #e1e2e5; line-height: 16px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Lucida Console, serif; font-size: x-small;&quot;&gt;That is where is realized that my R version is old to have these packages and hence the obvious solution is to uninstall and install latest R&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;background-color: #e1e2e5; line-height: 16px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Lucida Console, serif; font-size: x-small;&quot;&gt;These details i found on StackOverflow &amp;nbsp;and it worked for Me&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 100%; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: Lucida Console, serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background: #e1e2e5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Uninstall old R&lt;/div&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sudo apt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; remove r&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;base&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;core&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Adding deb to sources.list&lt;/div&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sudo nano &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;etc&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;apt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sources&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;list    
deb http&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; border: 0px; color: grey; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;//cran.rstudio.com/bin/linux/ubuntu precise/&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
precise is your ubuntu name (may be different)&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Add key to sign CRAN packages&lt;/div&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sudo apt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;key adv &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;keyserver keyserver&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ubuntu&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;com &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;recv&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;keys E084DAB9&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Add specific PPA to the system&lt;/div&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sudo add&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;apt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;repository ppa&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;marutter&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;rdev
sudo apt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; update
sudo apt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; upgrade&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
installing&lt;/div&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sudo apt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; install r&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;base&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
From R to check version&lt;/div&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;version&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
should give you&lt;/div&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;version&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; R version &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3.0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;span style=&quot;color: maroon;&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;2013&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;05&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&lt;span style=&quot;color: maroon;&quot;&gt;16&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Credit Anando Mahto (StackOverflow member)&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/4726772108856114601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2013/08/install-latest-version-of-r-on-ubuntu.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/4726772108856114601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/4726772108856114601'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2013/08/install-latest-version-of-r-on-ubuntu.html' title='Install latest version of R on Ubuntu [if you have some version already installed and getting ERROR: dependencies ‘mclust’, ‘flexmix’ are not available for package ‘fpc’ on R studio]'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-7240569306199167880</id><published>2013-06-06T21:07:00.002-07:00</published><updated>2013-06-06T21:07:39.007-07:00</updated><title type='text'>python connection with mysql DB and data fetch on Linux(Ubuntu)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
At first check the installation of python by firing this command on console&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;gt;$mysql -h 127.0.0.1 -u root -p&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;password: *******&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
PS&lt;b&gt;:&lt;/b&gt;Here my installation of mysqldb is as a root user which is true in most of the cases as mysql come pre packaged with ubuntu 12 , (i am not sure about the earlier versions but u can always test it by firring a simple command &amp;nbsp;&lt;b&gt;which mysql&lt;/b&gt;&amp;nbsp; and figure out if you have already mysql installed)&lt;br /&gt;
&lt;br /&gt;
an empty result ensures that you do not have mysql installed where as the result pointing to a bin location represents that you already &amp;nbsp;have mysql.&lt;br /&gt;
&lt;br /&gt;
Any way there are millions of web pages already available on how &amp;nbsp;to install mysql on ubuntu so i will not get on to it and try to stick to the blog headline which is connection of python script to mysql db to fetch data. (U also need to worry about python installation if it is not part of distribution of linux package you are using. &lt;b&gt;)&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
any way :&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I assume now you have a working mysql and have created a DB and a basic table with some data in it&lt;/div&gt;
&lt;div&gt;
(create simple table with one id and one data column to keep it simple)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
save this script as a python script&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;mport MySQLdb&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;db = MySQLdb.connect(host=&quot;localhost&quot;, # your host, usually localhost&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;user=&quot;root&quot;, # your username&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; passwd=&quot;******&quot;, # your password&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; db=&quot;TestDB&quot;) # name of the data base&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;# you must create a Cursor object. It will let&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;# &amp;nbsp;you execute all the query you need&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;cur = db.cursor()&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;# Use all the SQL you like&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;cur.execute(&quot;SELECT * FROM NODEJSTEST&quot;)&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;# print all the first cell of all the rows&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;for row in cur.fetchall() :&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; print row[0]&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This should be able to return you all the columns from your table&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Error: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if you get in to error of mysqldb not recognised&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
sudo apt-get install python-mysqldb&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Running this will get you out of this error . Some time it appears some time it does not hence i have not included it as a part of regular work. It is also possible that the system it worked , was already configured for it (i work on dev set up which is used by many developers so can not really tell ), so may be its a necessary step. You might want to even do it as a regulr step if you dislike errors :)&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Mail me if you do not find the steps working and we shall work together to get it working&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/7240569306199167880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2013/06/python-connection-with-mysql-db-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/7240569306199167880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/7240569306199167880'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2013/06/python-connection-with-mysql-db-and.html' title='python connection with mysql DB and data fetch on Linux(Ubuntu)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-8133948579585027068</id><published>2013-03-24T22:20:00.002-07:00</published><updated>2013-03-24T22:40:06.277-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Shell Scripting"/><title type='text'>setting &quot;rm&quot; to move files (and folders) to trash-&quot;rm -rf&quot;  Undo</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Step1&lt;/b&gt;. &lt;span style=&quot;background-color: #f4cccc;&quot;&gt;sudo apt-get install trash-cli&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;Trash-cli:&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; text-align: justify;&quot;&gt;This package provides a command line interface trashcan utility compliant with the FreeDesktop.org Trash Specification. It remembers the name, original path, deletion date, and permissions of each trashed file&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;Step2&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #f4cccc; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 20px; text-align: justify;&quot;&gt;sudo gedit /usr/local/bin/trash-rm&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: #f4cccc; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 20px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: UbuntuBeta Mono, Ubuntu Mono, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;in Ubuntu 10.04 i found it to be sbin than bin so command might be&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: UbuntuBeta Mono, Ubuntu Mono, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: #f4cccc; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;sudo gedit /usr/local/sbin/trash-rm&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: #f4cccc; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;b&gt;Step 3&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Paste this content&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;pre class=&quot;source-code&quot; style=&quot;background-attachment: scroll; background-color: #f8ecec; background-image: url(http://netupd8.com/webupd8/2.0/2znsjn5.gif); background-position: 0px 0px; background-repeat: no-repeat no-repeat; border-color: rgb(155, 5, 5); border-style: solid; border-width: 1px 1px 1px 20px; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-top: 10px; max-height: 500px; min-height: 16px; overflow: auto; padding: 28px 10px 10px; width: 507px; z-index: 10000;&quot;&gt;&lt;code style=&quot;margin: 0px; padding: 0px;&quot;&gt;#!/bin/bash
# command name: trash-rm
shopt -s extglob
recursive=1
declare -a cmd
((i = 0))
for f in &quot;$@&quot;
do
case &quot;$f&quot; in
(-*([fiIv])r*([fiIv])|-*([fiIv])R*([fiIv]))
tmp=&quot;${f//[rR]/}&quot;
if [ -n &quot;$tmp&quot; ]
then
#echo &quot;\$tmp == $tmp&quot;
cmd[$i]=&quot;$tmp&quot;
((i++))
fi
recursive=0 ;;
(--recursive) recursive=0 ;;
(*)
if [ $recursive != 0   -a  -d &quot;$f&quot; ]
then
echo &quot;skipping directory: $f&quot;
continue
else
cmd[$i]=&quot;$f&quot;
((i++))
fi ;;
esac
done
&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;trash&lt;/b&gt; &quot;${cmd[@]}&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;b&gt;Save and Exit&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;b&gt;Set Correct executable rights on the created file&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;b&gt;Step:4&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;pre class=&quot;linux-code&quot; style=&quot;background-attachment: scroll; background-color: #f8ecec; background-image: url(http://netupd8.com/webupd8/2.0/lincode2.gif); background-position: 0px 0px; background-repeat: no-repeat no-repeat; border-color: rgb(155, 5, 5); border-style: solid; border-width: 1px 1px 1px 20px; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-top: 10px; max-height: 500px; min-height: 16px; overflow: auto; padding: 28px 10px 10px; width: 522px; z-index: 10000;&quot;&gt;&lt;code style=&quot;margin: 0px; padding: 0px;&quot;&gt;sudo chmod +x /usr/local/bin/trash-rm&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;b&gt;Step 5&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;pre class=&quot;linux-code&quot; style=&quot;background-attachment: scroll; background-color: #e5caca; background-image: url(http://netupd8.com/webupd8/2.0/lincode.gif); background-position: 0px 0px; background-repeat: no-repeat no-repeat; border-color: rgb(155, 5, 5); border-style: solid; border-width: 1px 1px 1px 20px; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-top: 10px; max-height: 500px; min-height: 16px; overflow: auto; padding: 28px 10px 10px; width: 522px; z-index: 10000;&quot;&gt;&lt;code style=&quot;margin: 0px; padding: 0px;&quot;&gt;gedit ~/.bashrc&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;b&gt;Step 6:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;pre class=&quot;source-code&quot; style=&quot;background-attachment: scroll; background-color: #f8ecec; background-image: url(http://netupd8.com/webupd8/2.0/2znsjn5.gif); background-position: 0px 0px; background-repeat: no-repeat no-repeat; border-color: rgb(155, 5, 5); border-style: solid; border-width: 1px 1px 1px 20px; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-top: 10px; max-height: 500px; min-height: 16px; overflow: auto; padding: 28px 10px 10px; width: 522px; z-index: 10000;&quot;&gt;&lt;b style=&quot;text-align: justify; white-space: normal;&quot;&gt;alias rm = &quot;trash-rm&quot;&lt;/b&gt;&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;b&gt;Step7:$bash&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;b&gt;Re run bash on linux terminal to re run the bashrc&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;b&gt;Step8:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;b&gt;Try by creating a file and then using rm -rf &quot;createdFile.txt&quot;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;b&gt;find that file in Trash&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: #f4cccc; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: #f4cccc; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: #f4cccc; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: #f4cccc; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: #f4cccc; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: #f4cccc; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: #f4cccc; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: #f4cccc; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: #f4cccc; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: #f4cccc; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: #f4cccc; font-family: &#39;UbuntuBeta Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 12.727272033691406px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/8133948579585027068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2013/03/setting-rm-to-move-files-and-folders-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/8133948579585027068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/8133948579585027068'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2013/03/setting-rm-to-move-files-and-folders-to.html' title='setting &quot;rm&quot; to move files (and folders) to trash-&quot;rm -rf&quot;  Undo'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-3125384713739694759</id><published>2013-03-19T22:40:00.002-07:00</published><updated>2013-03-19T22:40:36.036-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse"/><title type='text'>ECLIPSE Shortcut for converting lower case to upper and vice versa</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Just a quick short cut which is very useful for developers to convert the selected lower case text to Upper case and vice versa&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;Lower case:&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; border: 0px; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CTRL+SHIFT+Y&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp;(&lt;/span&gt;&lt;strong style=&quot;background-color: white; border: 0px; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CMD+SHIFT+Y&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp;on Mac OS X)&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;Upper case:&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; border: 0px; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CTRL+SHIFT+X&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp;(&lt;/span&gt;&lt;strong style=&quot;background-color: white; border: 0px; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CMD+SHIFT+X&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp;on Mac OS X)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;The good thing here is you can select one or multiple characters/word/lines by using Using&amp;nbsp;+ -&amp;gt;/&amp;lt;-/DownArray and then convert all of it at once.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/3125384713739694759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2013/03/eclipse-shortcut-for-converting-lower.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/3125384713739694759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/3125384713739694759'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2013/03/eclipse-shortcut-for-converting-lower.html' title='ECLIPSE Shortcut for converting lower case to upper and vice versa'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-2469031506147876297</id><published>2012-12-02T21:01:00.000-08:00</published><updated>2012-12-02T21:01:32.222-08:00</updated><title type='text'>Android Installation problem [Can not complete the Install ] Solved</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;b&gt;Problem&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;/div&gt;
&lt;pre style=&quot;font-size: 12px; line-height: normal; max-width: 80em; padding-left: 0.7em; white-space: pre-wrap;&quot;&gt;Cannot complete the install because one or more required items could not be found.
  Software being installed: Android Hierarchy Viewer 18.0.0.v201203301601-306762 (com.android.ide.eclipse.hierarchyviewer.feature.group 18.0.0.v201203301601-306762)
  Missing requirement: Android Hierarchy Viewer 18.0.0.v201203301601-306762 (com.android.ide.eclipse.hierarchyviewer.feature.group 18.0.0.v201203301601-306762) requires &#39;org.eclipse.core.runtime 3.6.0&#39; but it could not be found

Please note same message for  &quot;Android DDMS&quot;,&quot;Android Development Tools&quot; and  &quot;Android Traceview&quot;&lt;/pre&gt;
&lt;pre style=&quot;font-size: 12px; line-height: normal; max-width: 80em; padding-left: 0.7em; white-space: pre-wrap;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;font-size: 12px; line-height: normal; max-width: 80em; padding-left: 0.7em; white-space: pre-wrap;&quot;&gt;Or Duplicate Repository problem where as creating the new Android Project option doesnt appear &lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Head over to&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;Help&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;Install New Software&lt;/code&gt;. Click on Available software sites. Delete the Android repo. Uncheck Indigo &amp;amp; Eclipse updates &amp;amp; recheck them. Now head back to Help -&amp;gt; Check for updates. Once done, add the Android repo again. Accept the license &amp;amp; you should be good to go.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
(Had to do the same yesterday after getting Indigo)&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Source: StackOverFlow: Pasting here as this Solution worked for me after trying a lot of solutions posted over net&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/2469031506147876297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2012/12/android-installation-problem-can-not.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/2469031506147876297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/2469031506147876297'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2012/12/android-installation-problem-can-not.html' title='Android Installation problem [Can not complete the Install ] Solved'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-8396161865801787291</id><published>2012-08-26T18:30:00.001-07:00</published><updated>2012-08-26T18:30:13.380-07:00</updated><title type='text'>TCS fiasco and How to keep your account safe while changing mobile no </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
 
 
 


&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;pre class=&quot;western&quot; style=&quot;text-align: left;&quot;&gt;&lt;pre class=&quot;western&quot;&gt;&lt;b&gt;  24&lt;sup&gt;th&lt;/sup&gt; August and the morning news came out as &lt;span style=&quot;color: #393939;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Techie steals Rs 49L from 3 bank accounts in Chennai. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #393939;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;This news was definately worth the attention as while working with multiple service /Product companies techies like me  do get exposed to sensitive information. Here is what heppned in short and how &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;color: #393939; font-family: Georgia, &#39;Times New Roman&#39;; font-size: 10pt;&quot;&gt;the fraud was done&lt;/b&gt;&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;&lt;b style=&quot;color: #393939; font-family: Georgia, &#39;Times New Roman&#39;; font-size: 10pt;&quot;&gt;
&lt;/b&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: left; margin-right: 1em; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaxMEMGo_Qlhlx33QHldCmyxVzdEG4_d7twk-okhjIfibiSduyeubn_TKqOKY_QlgEl4iQte5o49OB6jMR6be1VT00AomEadu_BfblSJi3x_xyMSsXSfryZ7lv2mQPkgoZ71c5WAxQmks/s1600/a.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;459&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaxMEMGo_Qlhlx33QHldCmyxVzdEG4_d7twk-okhjIfibiSduyeubn_TKqOKY_QlgEl4iQte5o49OB6jMR6be1VT00AomEadu_BfblSJi3x_xyMSsXSfryZ7lv2mQPkgoZ71c5WAxQmks/s640/a.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;TCS Fraud protype&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;pre class=&quot;western&quot;&gt;&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;                        &amp;nbsp;&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;&lt;b&gt; &lt;span style=&quot;color: #393939; font-family: Georgia, &#39;Times New Roman&#39;; font-size: 10pt;&quot;&gt;Now the account and details related to it are in total unsafe hands and is     exposed to the variety of fraud &lt;/span&gt;&lt;span style=&quot;color: #393939; font-family: Georgia, &#39;Times New Roman&#39;; font-size: 10pt;&quot;&gt;which can be done . Now though the likelihood of having access to Bank DB is very less but even a person in million having access  to bank DB with malicious intention can give any bank a very hard time. The only way for the bank to trace back in these situation is to trace  the user            Machine IP where query was executed and me myself being a techie can say it for sure , its a cake walk to  mask my IP and give the Bank guys even a harder time trying to trace the origin of fraud.&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #393939;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;  The point worth mentioning in this TCS fiasco is ,the techie was caught only becasue he/She  gone greedy and started withdrawing large amounts. However if they had kept a little control on their greed, it was close to impossible to figure out . And we will never know if the employee had done small such malicious activity in past and the amount was not big enough to draw attention of bank officials.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;

&lt;span style=&quot;color: #393939;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;  Looking at the pattern however , it exposes the seriousness with which customer&#39;s private data is maintained, and the low level of security practises banks follow in order to save their customers hard earned money.this also brings the necessity  of a strong and capable Real Time online fraud monitoring system where multiple such incidents are coded as  a part of online transaction as well as card swipe process and is capable to stop transaction in any of the possible fraud scenario and is part of core banking system . &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;

&lt;span style=&quot;color: #393939;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;  it will be interesting to see in indian market where changing the mobile number  is such a common process , if one gets access to telecom DB and does a intersection and imaginary scenario something like this &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8cR54b_bkKlz5kj7dJsVQZDIZUa7FZyqhUr5efU6LnDMki-VdKRUjAyVr00WXWHzW8Bc6gQ_mWHCX7DvSMWeEE5nSB4Dhqy_FcdXczrTRcNRtbSnK0s8Qpj43PLxtXGk-gWHKJN3ZnLs/s1600/b.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8cR54b_bkKlz5kj7dJsVQZDIZUa7FZyqhUr5efU6LnDMki-VdKRUjAyVr00WXWHzW8Bc6gQ_mWHCX7DvSMWeEE5nSB4Dhqy_FcdXczrTRcNRtbSnK0s8Qpj43PLxtXGk-gWHKJN3ZnLs/s1600/b.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
 
 
 


&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #3f3f3f; line-height: 0.53cm;&quot;&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The
received out put list is the list of customer whoose transaction
should be &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f3f3f; line-height: 0.53cm;&quot;&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;immideatly
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f3f3f;&quot;&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;&lt;span style=&quot;font-size: 11pt; line-height: 0.53cm;&quot;&gt;
blocked&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 14.545454025268555px; line-height: 20.030302047729492px;&quot;&gt;until&lt;/span&gt;&lt;span style=&quot;font-size: 11pt; line-height: 0.53cm;&quot;&gt;&amp;nbsp;the new number is updated other wise in a matter of
second and effort of two software engineers (One working for Bank and
one working for Telecom ) is capable of adding multiple zeroes in the
49Lakh amount fraud..&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;pre class=&quot;western&quot; style=&quot;line-height: 0.53cm;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #3f3f3f;&quot;&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  For customers , they should immediately give standing instruction to bank/Credit card company to stop doing any sort of transaction unless  they have a working number again.The process might look a little cumbersome to follow but &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #393939;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;as we all know it for a fact that its always  “&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #393939;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;better to be safe than sorry&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #393939;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;“.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class=&quot;western&quot;&gt;
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/8396161865801787291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2012/08/tcs-fiasco-and-how-to-keep-your-account.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/8396161865801787291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/8396161865801787291'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2012/08/tcs-fiasco-and-how-to-keep-your-account.html' title='TCS fiasco and How to keep your account safe while changing mobile no '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaxMEMGo_Qlhlx33QHldCmyxVzdEG4_d7twk-okhjIfibiSduyeubn_TKqOKY_QlgEl4iQte5o49OB6jMR6be1VT00AomEadu_BfblSJi3x_xyMSsXSfryZ7lv2mQPkgoZ71c5WAxQmks/s72-c/a.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-3241813212881882774</id><published>2012-06-24T21:12:00.000-07:00</published><updated>2012-06-24T21:12:12.535-07:00</updated><title type='text'>Count The No of Inversion in merge Sort</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Algo:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;i have followed to do the same&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; list-style-image: initial; list-style-position: initial; margin-bottom: 1em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;Merge sort array A and create a copy (array B)&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Take A[1] and find its position in sorted array B via a binary search. The number of inversions for this element will be one less than the index number of its position in B since every lower number that appears after the first element of A will be an inversion.&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
2a. accumulate the number of inversions to counter variable num_inversions.&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
2b. remove A[1] from array A and also from its corresponding position in array B&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;rerun from step 2 until there are no more elements in A.&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Here’s an example run of this algorithm. Original array A = ( 14, 8, 12, 3, 2)&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
1: Merge sort and copy to array B&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
B = (2,3,8,12,14)&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
2: Take A[1] and binary search to find it in array B&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
A[1] = 14&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
B = (2,3,8,12,14)&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
14 is in the 5th position of array B, thus there are 4 inversions. We know this because 14 was in the first position in array A, thus any lower value element that subsequently appears in array A would have an index of j &amp;gt; i (since i in this case is 1).&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
2.b: Remove A[1] from array A and also from its corresponding position in array B (bold elements are removed).&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
A =&amp;nbsp;( 14, 8, 12, 3, 2)&amp;nbsp;= (8, 12, 3, 2)&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
B =&amp;nbsp;(2,3,8,12,14)&amp;nbsp;= ((2,3,8,12)&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
3: Rerun from step 2 on the new A and B arrays.&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
A[1] = 8&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
B = ((2,3,8,12)&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
8 is now in the 3rd position of array B, thus there are 2 inversions. We know this because 8 was in the first position in array A, thus any lower value element that subsequently appears would have an index of j &amp;gt; i (since i in this case is again 1). Remove A[1] from array A and also from its corresponding position in array B (bold elements are removed)&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
A =&amp;nbsp;(8, 12, 3, 2)&amp;nbsp;= 12,3,2&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
B =&amp;nbsp;(2,3,8,12)&amp;nbsp;= 2,3,12&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Continuing in this vein will give us the total number of inversions for array A once the loop is complete&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Try to code as per Algo , it gives a complete result&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
i am not sharing code as its against the fair code Stanford rule and will share only once the date for submitting assignment is expired&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
however am okay if u need any help in completing this exercise and Java is teh language i prefer to code in&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/3241813212881882774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2012/06/count-no-of-inversion-in-merge-sort.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/3241813212881882774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/3241813212881882774'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2012/06/count-no-of-inversion-in-merge-sort.html' title='Count The No of Inversion in merge Sort'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-9077819847436094590</id><published>2012-05-11T03:50:00.000-07:00</published><updated>2012-05-11T03:51:16.212-07:00</updated><title type='text'>Basic IP Check with Ping using Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
import java.io.BufferedReader;&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import java.io.InputStreamReader;&lt;br /&gt;
import java.net.InetAddress;&lt;br /&gt;
import java.net.UnknownHostException;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class testIp {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static boolean checkIp (String sip)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; String [] parts = sip.split (&quot;\\.&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&quot;Parts length is &quot;+parts.length);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ( parts.length != 4 )&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (String s : parts)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int i = Integer.parseInt (s);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (i &amp;lt; 0 || i &amp;gt; 255)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (pingIp(sip))&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; return false;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private static boolean pingIp(String sip) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;// TODO Auto-generated method stub&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;try {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;InetAddress adr = InetAddress.getByName(sip);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;boolean stat= adr.isReachable(2000);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;return stat;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} catch (UnknownHostException e) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// TODO Auto-generated catch block&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;e.printStackTrace();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} catch (IOException e) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// TODO Auto-generated catch block&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;e.printStackTrace();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return false;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;/**&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; * @param args&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; */&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static void main(String[] args) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;// TODO Auto-generated method stub&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;Enter the IP to be chacked&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;BufferedReader br = new BufferedReader(new InputStreamReader(System.in));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;try {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;String line = br.readLine();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;boolean status=testIp.checkIp(line);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;System.out.println(&quot;Status is &quot;+status);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} catch (IOException e) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// TODO Auto-generated catch block&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;e.printStackTrace();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/9077819847436094590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2012/05/basic-ip-check.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/9077819847436094590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/9077819847436094590'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2012/05/basic-ip-check.html' title='Basic IP Check with Ping using Java'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-8955129004420399223</id><published>2012-05-10T01:31:00.001-07:00</published><updated>2012-05-10T01:31:38.136-07:00</updated><title type='text'>EMMA Report Comparison Shell Based Utility</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
Here i am pasting the Symbolic code for comparing two EMMA Reports where Assumptions are&lt;br /&gt;
1.before.txt ---&amp;gt; the actual report&lt;br /&gt;
2.after.txt----&amp;gt; report after modification&lt;br /&gt;
&lt;br /&gt;
This Script will get in to those twpo reports and show block by Block Comparison&lt;br /&gt;
The idea behind sharing this is that using this Logic a Extensive User Utility script can be developed which can be used to compare EMMA Reports&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function retLineNobefore()&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Str=$1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;while read Line&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;do&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;val=$(grep -n &quot;$Str&quot; | sed -n &#39;s/^\([0-9]*\)[:].*/\1/p&#39;) &amp;nbsp; # this is to Extract just the Line no&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;break&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;done &amp;lt; before.txt&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function retLineNoAfter()&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Str=$1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;while read Line&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;do&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;val=$(grep -n &quot;$Str&quot; | sed -n &#39;s/^\([0-9]*\)[:].*/\1/p&#39;)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;break&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;done &amp;lt; after.txt&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
rm -fr report.txt&lt;br /&gt;
&lt;br /&gt;
retLineNobefore &quot;OVERALL COVERAGE SUMMARY:&quot;&lt;br /&gt;
no1=$val&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
retLineNobefore &quot;OVERALL STATS SUMMARY:&quot;&lt;br /&gt;
no2=$val&lt;br /&gt;
echo &quot;----------------Before-------------------------- &quot; &amp;gt; report.txt&lt;br /&gt;
&lt;br /&gt;
awk &quot;{if((NR&amp;gt;&quot;$no1&quot;)&amp;amp;&amp;amp;(NR&amp;lt;$no2)) print}&quot; before.txt &amp;nbsp;&amp;gt;&amp;gt; report.txt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
retLineNoAfter &quot;OVERALL COVERAGE SUMMARY:&quot;&lt;br /&gt;
no1=$val&lt;br /&gt;
echo $no1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
retLineNoAfter &quot;OVERALL STATS SUMMARY:&quot;&lt;br /&gt;
no2=$val&lt;br /&gt;
echo $no2&lt;br /&gt;
echo &quot;----------------After-------------------------- &quot; &amp;gt;&amp;gt; report.txt&lt;br /&gt;
awk &quot;{if((NR&amp;gt;&quot;$no1&quot;)&amp;amp;&amp;amp;(NR&amp;lt;$no2)) print}&quot; after.txt &amp;nbsp;&amp;gt;&amp;gt; report.txt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/8955129004420399223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2012/05/emma-report-comparison-shell-based.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/8955129004420399223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/8955129004420399223'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2012/05/emma-report-comparison-shell-based.html' title='EMMA Report Comparison Shell Based Utility'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-4073684832071910260</id><published>2012-03-07T01:48:00.001-08:00</published><updated>2012-03-07T01:48:52.034-08:00</updated><title type='text'>Customized page using JIRA which can autorefresh</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
hello All&lt;br /&gt;
recently have been working on a small configuaration change in JIRA which can allow a user to write a gadget whcih can autorefresh it at a given interval .. just so that this post conversation can be helpful for others i am pasting the link as it is .&lt;br /&gt;
in case any problem revert back &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
want to create a customized page using JIRA functionality which can autorefresh it in say 15 sec interval &amp;nbsp;any direction is appreciated&lt;br /&gt;
&amp;nbsp;By Manish Ranjan (1 karma) on Mar 02 at 5:22 a.m.&lt;br /&gt;
jira&lt;br /&gt;
jira-plugins&lt;br /&gt;
answer my own question | add comment&lt;br /&gt;
edit|poke atlassian answer my own question | add comment &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 0&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;4 Answers:&lt;br /&gt;
oldest answers&lt;br /&gt;
newest answers&lt;br /&gt;
popular answers ↑&lt;br /&gt;
oldest answers&lt;br /&gt;
newest answers&lt;br /&gt;
popular answers ↑&lt;br /&gt;
&lt;br /&gt;
I think you have to explain this a little bit more. I have no idea what you want to do... Sorry&lt;br /&gt;
&amp;nbsp;By Thomas-S (616 karma) on Mar 02 at 5:57 a.m.&lt;br /&gt;
add comment&lt;br /&gt;
permanent link add comment&lt;br /&gt;
&lt;br /&gt;
actually i want to write a plugin which will ahev a customized landing page and the page needed to be be refresh at an interval of 15 sec .&lt;br /&gt;
(Mar 02 at 06:16 AM)&lt;br /&gt;
Manish Ranjan&lt;br /&gt;
&lt;br /&gt;
actually i want to write a plugin which will ahev a customized landing page and the page needed to be be refresh at an interval of 15 sec .&lt;br /&gt;
(Mar 02 at 06:16 AM)&lt;br /&gt;
Manish Ranjan&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Is this a jira dashboard you are trying to get to refresh every 15s?&lt;br /&gt;
&lt;br /&gt;
The old skool approach would be to have an HTML page with frames &amp;amp; a piece of javascript that reloaded your target page every 15s but that would be nasty!&lt;br /&gt;
&amp;nbsp;By Matthew Cobby (1.4k karma) on Mar 02 at 11:38 a.m.&lt;br /&gt;
add comment&lt;br /&gt;
permanent link add comment&lt;br /&gt;
&lt;br /&gt;
may be i will have my own gadget doint it for me .. but as of now i am facing another problem where i am able to see my gadget in plugins but not able to add it to the newly created dashboard.&lt;br /&gt;
&lt;br /&gt;
can you also please help me in how can i add my own custom page to JIRA dashboard .. That would be in form a gadget right ?&lt;br /&gt;
&lt;br /&gt;
also say i want to modify the &quot;Assign to me&quot; gadget providded by JIRA for a time less than a min rather than the options provided by JIRA which is atleast 15 mins.. how can i do that ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(Mar 03 at 08:13 AM)&lt;br /&gt;
Manish Ranjan&lt;br /&gt;
&lt;br /&gt;
may be i will have my own gadget doint it for me .. but as of now i am facing another problem where i am able to see my gadget in plugins but not able to add it to the newly created dashboard.&lt;br /&gt;
&lt;br /&gt;
can you also please help me in how can i add my own custom page to JIRA dashboard .. That would be in form a gadget right ?&lt;br /&gt;
&lt;br /&gt;
also say i want to modify the &quot;Assign to me&quot; gadget providded by JIRA for a time less than a min rather than the options provided by JIRA which is atleast 15 mins.. how can i do that ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(Mar 03 at 08:13 AM)&lt;br /&gt;
Manish Ranjan&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 0&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Why not just a meta tag, please see http://en.wikipedia.org/wiki/Meta_refresh&lt;br /&gt;
&amp;nbsp;By Dieter (3.1k karma) on Mar 03 at 9:05 a.m.&lt;br /&gt;
add comment&lt;br /&gt;
permanent link add comment&lt;br /&gt;
&lt;br /&gt;
but to embed the meta tag i need to figure out the source of &quot;assigned to me&quot; jsp right ? i tried but couldnt do the same. i have been doing research on this since wednesday so if i asking something silly am sorry,just to add i have not been able to add my own Custom page to JIRA as mentioned above so i am kinda stuck ..&lt;br /&gt;
(Mar 03 at 09:22 AM)&lt;br /&gt;
Manish Ranjan&lt;br /&gt;
&lt;br /&gt;
but to embed the meta tag i need to figure out the source of &quot;assigned to me&quot; jsp right ? i tried but couldnt do the same. i have been doing research on this since wednesday so if i asking something silly am sorry,just to add i have not been able to add my own Custom page to JIRA as mentioned above so i am kinda stuck ..&lt;br /&gt;
(Mar 03 at 09:22 AM)&lt;br /&gt;
Manish Ranjan&lt;br /&gt;
Oh sorry, i hadn&#39;t seen your comment that you want to override the refresh period of the gadget. My answer was meant for a classical webwork action page, so probably this anwer is not useful.&lt;br /&gt;
(Mar 03 at 11:59 AM)&lt;br /&gt;
Dieter&lt;br /&gt;
Oh sorry, i hadn&#39;t seen your comment that you want to override the refresh period of the gadget. My answer was meant for a classical webwork action page, so probably this anwer is not useful.&lt;br /&gt;
(Mar 03 at 11:59 AM)&lt;br /&gt;
Dieter&lt;br /&gt;
1&lt;br /&gt;
you should search through all gadget.xml files in the Atlassian source tree to find the html and js code that makes up the assigned to me gadget.&lt;br /&gt;
(Mar 03 at 12:04 PM)&lt;br /&gt;
Dieter&lt;br /&gt;
1&lt;br /&gt;
you should search through all gadget.xml files in the Atlassian source tree to find the html and js code that makes up the assigned to me gadget.&lt;br /&gt;
(Mar 03 at 12:04 PM)&lt;br /&gt;
Dieter&lt;br /&gt;
&lt;br /&gt;
when you say altassian source tree you mean in Jira installtion which is at /opt/atlassian/jira right ??i have been trying to backtrace the xml file but no success yet .. will try harder .. thanks for your help .. any pointer to search the same will be really helpfull. Manish&lt;br /&gt;
(2 days ago)&lt;br /&gt;
Manish Ranjan&lt;br /&gt;
&lt;br /&gt;
when you say altassian source tree you mean in Jira installtion which is at /opt/atlassian/jira right ??i have been trying to backtrace the xml file but no success yet .. will try harder .. thanks for your help .. any pointer to search the same will be really helpfull. Manish&lt;br /&gt;
(2 days ago)&lt;br /&gt;
Manish Ranjan&lt;br /&gt;
1&lt;br /&gt;
&lt;br /&gt;
no i mean the source code that you can get when you buy a commerical license. You will not find anything in the installed distribution since the gadget.xmls live in JAR files.&lt;br /&gt;
(yesterday)&lt;br /&gt;
Dieter&lt;br /&gt;
1&lt;br /&gt;
&lt;br /&gt;
no i mean the source code that you can get when you buy a commerical license. You will not find anything in the installed distribution since the gadget.xmls live in JAR files.&lt;br /&gt;
(yesterday)&lt;br /&gt;
Dieter&lt;br /&gt;
&lt;br /&gt;
okay cool .. i do have a commercial license , will look in to that . Thanks for your help&lt;br /&gt;
(yesterday)&lt;br /&gt;
Manish Ranjan&lt;br /&gt;
&lt;br /&gt;
okay cool .. i do have a commercial license , will look in to that . Thanks for your help&lt;br /&gt;
(yesterday)&lt;br /&gt;
Manish Ranjan&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If it&#39;s the assigned to me gadget that you want to change the refresh rate, then there is a really simple answer if you also have Confluence. Edit a page, bring up the macro browser &amp;amp; insert the gadget you want. &amp;nbsp;At the bottom should be an option to refresh, set it anything, it doesn&#39;t matter. &amp;nbsp;Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then look at the macro that has been created in your page. &amp;nbsp;It should have a refresh parameter. Change this to be your new rate e.g. refresh=1 for every minute. &amp;nbsp;If you put something like refresh=true then it will refresh as fast as it can &amp;amp; will massively increase the load on your jira server.&lt;br /&gt;
{gadget:url=http://jira.xxxxxx.com:8080/rest/gadgets/1.0/g/com.atlassian.jira.gadgets:filter-results-gadget/gadgets/filter-results-gadget.xml}filterId=filter-11027&amp;amp;num=10&amp;amp;columnNames=--Default--&amp;amp;isConfigured=true&amp;amp;refresh=1{gadget}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/4073684832071910260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2012/03/customized-page-using-jira-which-can.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/4073684832071910260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/4073684832071910260'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2012/03/customized-page-using-jira-which-can.html' title='Customized page using JIRA which can autorefresh'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-9002613216311007347</id><published>2012-03-07T01:43:00.002-08:00</published><updated>2012-03-07T01:43:24.640-08:00</updated><title type='text'>JIRA-abbreviation, not an acronym</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #555555; font-family: Georgia, &#39;Times New Roman&#39;, Times, serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;a href=&quot;http://www.atlassian.com/software/jira/&quot; style=&quot;color: #557799; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;JIRA&lt;/a&gt;&amp;nbsp;as known to world as&amp;nbsp;&amp;nbsp;bug, issue and project management for a fair while now – it’s almost industry standard and has an&amp;nbsp;&lt;a href=&quot;http://confluence.atlassian.com/display/JIRAEXT/JIRA+Plugins&quot; style=&quot;color: #557799; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;excellent developer community for plugins&lt;/a&gt;. I’m forever asked ‘What does JIRA stand for?’&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #555555; font-family: Georgia, &#39;Times New Roman&#39;, Times, serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #555555; font-family: Georgia, &#39;Times New Roman&#39;, Times, serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 10pt;&quot;&gt;Back in the days when those days when&amp;nbsp;&lt;a href=&quot;http://www.bugzilla.org/&quot; style=&quot;color: #557799; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Bugzilla&lt;/a&gt;&amp;nbsp;ruled the world and the guys at Atlassian dreamed of building a monster capable of beating it, they realised there was only one option – Godzilla. But calling their wonderful new bug and issue tracking system Godzilla was a bit obvious, so they abbreviated the original Japanese name for Godilla – Gojira. So, Gojira became JIRA: King of the issue management systems.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #555555; font-family: Georgia, &#39;Times New Roman&#39;, Times, serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #555555; font-family: Georgia, &#39;Times New Roman&#39;, Times, serif; font-size: 12px; line-height: 18px;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 10pt;&quot;&gt;So when you get asked what does JIRA stands for, just tell them is an abbreviation, not an acronym.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/9002613216311007347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2012/03/jira-abbreviation-not-acronym.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/9002613216311007347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/9002613216311007347'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2012/03/jira-abbreviation-not-acronym.html' title='JIRA-abbreviation, not an acronym'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-7932594277681725410</id><published>2012-01-20T09:23:00.000-08:00</published><updated>2012-01-20T09:23:05.489-08:00</updated><title type='text'>Traffic Solution</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
okay&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgim4hrSEGqTW525krOpPx5xFcIoDflfbrzrWPZDX4ePDVRY1grv3-zH4zMx2RVwSDpKZ2kcF0MKE9D63Vg-Kj9NhMpz9-XvgY0P2l_PVFx-ENqWGgeMRySRbt4TzdFdMG8aLXCgSbpUXk/s1600/picanom-picture-1001_2012-01-20.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgim4hrSEGqTW525krOpPx5xFcIoDflfbrzrWPZDX4ePDVRY1grv3-zH4zMx2RVwSDpKZ2kcF0MKE9D63Vg-Kj9NhMpz9-XvgY0P2l_PVFx-ENqWGgeMRySRbt4TzdFdMG8aLXCgSbpUXk/s320/picanom-picture-1001_2012-01-20.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; This is a sample image of how a Chauraha looks like and hence i have devided it in four quadrants however as per the&amp;nbsp;requirement it can be&amp;nbsp;subdivided/coagulated .&lt;br /&gt;
in center what you see is square a area what we do not want to consider &amp;nbsp;and other than that 1/2/3/4 has sensors which are density measuring sensors&lt;br /&gt;
Defn of density is&lt;br /&gt;
Density=Weight/SQinch&lt;br /&gt;
&lt;br /&gt;
now what these sensors do is they feed data from the circled area to computers and they let teh network learn about the traffic pattern , on that basis we divide the whole traffc 12 hrs say 8-8 in 12 diff zone with diff color codes and ofcourse diff weight as it will translate in to code&lt;br /&gt;
&lt;br /&gt;
now say at any given time section A has 5 bus section B has 11 Cars C has 2 Bus 3 cars and D has only Bikes &amp;nbsp;&amp;nbsp;&lt;br /&gt;
then as per density &amp;nbsp;feeded by the sensors to the Computer the program will be able to decide that its the section one which needs immediate&amp;nbsp;clearance and it will be&amp;nbsp;synchronized&amp;nbsp;with the&amp;nbsp;&amp;nbsp;next stop. with +-2 min this is also a way to let people know that they need to get on to public transport system .&lt;br /&gt;
&lt;br /&gt;
Now this&amp;nbsp;arrangement&amp;nbsp;ill fail if the peopel do not follow traffic rules , yes but that probblem can not be solved unless we hire peopel but hell no , thats not the solution, what we need to do is give the power back to Citizen , if i find a Vehicle offending traffic rule at junction what all i need to do is take a pic of vehicle and send it&lt;br /&gt;
the Image sending location in 90% of teh cases will be also the source of problem /Plate no May be .&lt;br /&gt;
&lt;br /&gt;
Then the snapshot of vehicle can be taken by CCTV cameras at those chaurahas and Charge can be directly sent through email/Phone message.. &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/7932594277681725410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2012/01/traffic-solution.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/7932594277681725410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/7932594277681725410'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2012/01/traffic-solution.html' title='Traffic Solution'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgim4hrSEGqTW525krOpPx5xFcIoDflfbrzrWPZDX4ePDVRY1grv3-zH4zMx2RVwSDpKZ2kcF0MKE9D63Vg-Kj9NhMpz9-XvgY0P2l_PVFx-ENqWGgeMRySRbt4TzdFdMG8aLXCgSbpUXk/s72-c/picanom-picture-1001_2012-01-20.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-5987184485876303752</id><published>2012-01-16T11:55:00.000-08:00</published><updated>2012-01-16T11:55:03.369-08:00</updated><title type='text'>CodeChef/FACTORIAL</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font: normal normal normal 12px/1.4em Arial, sans-serif; line-height: 1.5em; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; text-align: justify;&quot;&gt;
The most important part of a GSM network is so called&amp;nbsp;&lt;em&gt;Base Transceiver Station&lt;/em&gt;&amp;nbsp;(&lt;em&gt;BTS&lt;/em&gt;). These transceivers form the areas called&amp;nbsp;&lt;em&gt;cells&lt;/em&gt;&amp;nbsp;(this term gave the name to the cellular phone) and every phone connects to the BTS with the strongest signal (in a little simplified view). Of course, BTSes need some attention and technicians need to check their function periodically.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font: normal normal normal 12px/1.4em Arial, sans-serif; line-height: 1.5em; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; text-align: justify;&quot;&gt;
The technicians faced a very interesting problem recently. Given a set of BTSes to visit, they needed to find the shortest path to visit all of the given points and return back to the central company building. Programmers have spent several months studying this problem but with no results. They were unable to find the solution fast enough. After a long time, one of the programmers found this problem in a conference article. Unfortunately, he found that the problem is so called &quot;Traveling Salesman Problem&quot; and it is very hard to solve. If we have&amp;nbsp;&lt;var style=&quot;font-style: normal;&quot;&gt;N&lt;/var&gt;&amp;nbsp;BTSes to be visited, we can visit them in any order, giving us&amp;nbsp;&lt;var style=&quot;font-style: normal;&quot;&gt;N&lt;/var&gt;! possibilities to examine. The function expressing that number is called factorial and can be computed as a product 1.2.3.4....&lt;var style=&quot;font-style: normal;&quot;&gt;N&lt;/var&gt;. The number is very high even for a relatively small&amp;nbsp;&lt;var style=&quot;font-style: normal;&quot;&gt;N&lt;/var&gt;.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font: normal normal normal 12px/1.4em Arial, sans-serif; line-height: 1.5em; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; text-align: justify;&quot;&gt;
The programmers understood they had no chance to solve the problem. But because they have already received the research grant from the government, they needed to continue with their studies and produce at least&amp;nbsp;&lt;em&gt;some&lt;/em&gt;&amp;nbsp;results. So they started to study behavior of the factorial function.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font: normal normal normal 12px/1.4em Arial, sans-serif; line-height: 1.5em; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; text-align: justify;&quot;&gt;
For example, they defined the function&amp;nbsp;&lt;var style=&quot;font-style: normal;&quot;&gt;Z&lt;/var&gt;. For any positive integer&amp;nbsp;&lt;var style=&quot;font-style: normal;&quot;&gt;N&lt;/var&gt;,&amp;nbsp;&lt;var style=&quot;font-style: normal;&quot;&gt;Z&lt;/var&gt;(&lt;var style=&quot;font-style: normal;&quot;&gt;N&lt;/var&gt;) is the number of zeros at the end of the decimal form of number&amp;nbsp;&lt;var style=&quot;font-style: normal;&quot;&gt;N&lt;/var&gt;!. They noticed that this function never decreases. If we have two numbers&lt;var style=&quot;font-style: normal;&quot;&gt;N&lt;/var&gt;&lt;sub&gt;1&lt;/sub&gt;&amp;lt;&lt;var style=&quot;font-style: normal;&quot;&gt;N&lt;/var&gt;&lt;sub&gt;2&lt;/sub&gt;, then&amp;nbsp;&lt;var style=&quot;font-style: normal;&quot;&gt;Z&lt;/var&gt;(&lt;var style=&quot;font-style: normal;&quot;&gt;N&lt;/var&gt;&lt;sub&gt;1&lt;/sub&gt;) &amp;lt;=&amp;nbsp;&lt;var style=&quot;font-style: normal;&quot;&gt;Z&lt;/var&gt;(&lt;var style=&quot;font-style: normal;&quot;&gt;N&lt;/var&gt;&lt;sub&gt;2&lt;/sub&gt;). It is because we can never &quot;lose&quot; any trailing zero by multiplying by any positive number. We can only get new and new zeros. The function&amp;nbsp;&lt;var style=&quot;font-style: normal;&quot;&gt;Z&lt;/var&gt;&amp;nbsp;is very interesting, so we need a computer program that can determine its value efficiently.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font: normal normal normal 12px/1.4em Arial, sans-serif; line-height: 1.5em; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; color: #656565; font-family: Arial, Helvetica, sans-serif; font-size: 15px; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 8px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
Input&lt;/h3&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font: normal normal normal 12px/1.4em Arial, sans-serif; line-height: 1.5em; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; text-align: justify;&quot;&gt;
There is a single positive integer&amp;nbsp;&lt;var style=&quot;font-style: normal;&quot;&gt;T&lt;/var&gt;&amp;nbsp;on the first line of input (equal to about 100000). It stands for the number of numbers to follow. Then there are&amp;nbsp;&lt;var style=&quot;font-style: normal;&quot;&gt;T&lt;/var&gt;&amp;nbsp;lines, each containing exactly one positive integer number&lt;var style=&quot;font-style: normal;&quot;&gt;N&lt;/var&gt;, 1 &amp;lt;=&amp;nbsp;&lt;var style=&quot;font-style: normal;&quot;&gt;N&lt;/var&gt;&amp;nbsp;&amp;lt;= 1000000000.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font: normal normal normal 12px/1.4em Arial, sans-serif; line-height: 1.5em; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; color: #656565; font-family: Arial, Helvetica, sans-serif; font-size: 15px; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 8px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
Output&lt;/h3&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font: normal normal normal 12px/1.4em Arial, sans-serif; line-height: 1.5em; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; text-align: justify;&quot;&gt;
For every number&amp;nbsp;&lt;var style=&quot;font-style: normal;&quot;&gt;N&lt;/var&gt;, output a single line containing the single non-negative integer&amp;nbsp;&lt;var style=&quot;font-style: normal;&quot;&gt;Z&lt;/var&gt;(&lt;var style=&quot;font-style: normal;&quot;&gt;N&lt;/var&gt;).&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; color: #656565; font-family: Arial, Helvetica, sans-serif; font-size: 15px; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 8px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
Example&lt;/h3&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font: normal normal normal 12px/1.4em Arial, sans-serif; line-height: 1.5em; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; text-align: justify;&quot;&gt;
Sample Input:&lt;/div&gt;
&lt;pre style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;tt&gt;6
3
60
100
1024
23456
8735373&lt;/tt&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font: normal normal normal 12px/1.4em Arial, sans-serif; line-height: 1.5em; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; text-align: justify;&quot;&gt;
Sample Output:&lt;/div&gt;
&lt;pre style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;tt&gt;0
14
24
253
5861
2183837&lt;/tt&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;tt&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;package com.factorial;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

 /**
  * @param args
  */
 public static void main(String[] args) {
  // TODO Auto-generated method stub
  BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
  try {
   String temp=br.readLine();
   int noofInp=Integer.parseInt(temp);
   int inputArray[]=new int[noofInp];
   for (int i = 0; i &amp;lt; noofInp; i++) {
    temp=br.readLine();
    inputArray[i]=Integer.parseInt(temp);
   }
   for (int i = 0; i &amp;lt; noofInp; i++) {
//    /System.out.println(inputArray[i]);
    int result=calctrailingZeros(inputArray[i]);
    System.out.println(result);
   }
   
  } catch (IOException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
  }
  

 }

 private static int calctrailingZeros(int val) {
  // TODO Auto-generated method stub
  int i=1;
  int result=1;
  int ret=0;
  while(result&amp;gt;=1)
  {
   result=(int) (val/Math.pow(5,i));
   i++;
   ret+=result;
  }
  
  return ret;
  
 }

}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;tt&gt;&lt;br /&gt;&lt;/tt&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/5987184485876303752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2012/01/codecheffactorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/5987184485876303752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/5987184485876303752'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2012/01/codecheffactorial.html' title='CodeChef/FACTORIAL'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-193231694110198426</id><published>2012-01-16T11:53:00.001-08:00</published><updated>2012-01-16T11:53:26.734-08:00</updated><title type='text'>CodeSprint/Coin Toss</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
/* Enter your code here. Read input from STDIN. Print output to STDOUT */&lt;br /&gt;
&lt;br /&gt;
import java.io.BufferedReader;&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import java.io.InputStreamReader;&lt;br /&gt;
import java.text.DecimalFormat;&lt;br /&gt;
&lt;br /&gt;
public class Solution {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static void main (String args[]) throws IOException&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;BufferedReader br = new BufferedReader(new InputStreamReader(System.in));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;try {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;double solutionArray[];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;int anArray[] = new int [2] ;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;String Delims=&quot; &quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;String temp= br.readLine();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;int counter= Integer.parseInt(temp);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;String[] tempArray= new String[counter];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;solutionArray= new double[counter];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;for (int i = 0; i &amp;lt; counter; i++) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;tempArray[i]=br.readLine();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;DecimalFormat df = new DecimalFormat(&quot;##.00&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;for (int lubaluba=0;lubaluba&amp;lt;counter;lubaluba++)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;String andrtemp[]=tempArray[lubaluba].split(Delims);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;anArray[0]=Integer.parseInt(andrtemp[0]);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;anArray[1]=Integer.parseInt(andrtemp[1]);&lt;br /&gt;
//&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;System.out.print(&quot;Parsed values are&quot;+anArray[0]+&quot;and&quot;+anArray[1]);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;if (anArray[0]==(anArray[1])&amp;amp;&amp;amp;(counter==1))&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;String chumma=&quot;0.00&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;System.out.println(chumma);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;System.exit(1);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;if(anArray[0]&amp;gt;anArray[1])&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;{&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;double val1= Math.pow(2, anArray[0]+1);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;double val2= Math.pow(2, anArray[1]+1);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;double sol=val1-val2;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;solutionArray[lubaluba]=sol;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;else if (anArray[0]==(anArray[1]))&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;double chumma=0;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;solutionArray[lubaluba]=chumma;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;for (int i = 0; i &amp;lt; solutionArray.length; i++)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;if (solutionArray[i]==0)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;System.out.println(&quot;0.00&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;else&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;{&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;System.out.println(df.format(solutionArray[i]));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} catch (IOException e) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// TODO Auto-generated catch block&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;e.printStackTrace();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;br.close();&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/193231694110198426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2012/01/codesprintcoin-toss.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/193231694110198426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/193231694110198426'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2012/01/codesprintcoin-toss.html' title='CodeSprint/Coin Toss'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-8259863077995363654</id><published>2012-01-16T11:51:00.001-08:00</published><updated>2012-01-16T11:51:05.857-08:00</updated><title type='text'>Interview Street/String Similarity</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
/* Enter your code here. Read input from STDIN. Print output to STDOUT */&lt;br /&gt;
import java.io.BufferedReader;&lt;br /&gt;
import java.io.InputStreamReader;&lt;br /&gt;
import java.util.Scanner;&lt;br /&gt;
&lt;br /&gt;
public class Solution {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;/**&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; * @author manish&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; */&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static void main(String[] args)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int no=0;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;String[] baseArray;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int[] total;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;try&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;BufferedReader br = new BufferedReader(new InputStreamReader(System.in));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;no = Integer.parseInt(br.readLine());&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;baseArray= new String[no];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;total =new int[no];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;for (int cnt=0;cnt&amp;lt;baseArray.length;cnt++)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;baseArray[cnt]= br.readLine();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;total[cnt] = baseArray[cnt].length();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;for(int count = 0;count &amp;lt;baseArray.length;count++)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;{&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;for (int i = 1; i &amp;lt; baseArray[count].length(); i++)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;String test=baseArray[count].substring(i); &amp;nbsp;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;int retVal=maxMatch(test,baseArray[count]);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;total[count]= total[count]+retVal;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;System.out.print(total[count]+&quot;\n&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;catch(Exception e)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;//System.out.println(&quot;Problem&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
private static int maxMatch(String s,String str)&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;// TODO Auto-generated method stub&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int counter=0;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;char[] main_String = str.toCharArray(); &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;char[] substring = s.toCharArray();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;for (int i = 0; i &amp;lt; substring.length; i++) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if(substring[i]==main_String[i])&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;counter++;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;else&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;return counter;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return counter;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/8259863077995363654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2012/01/interview-streetstring-similarity.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/8259863077995363654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/8259863077995363654'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2012/01/interview-streetstring-similarity.html' title='Interview Street/String Similarity'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-4719431789873730364</id><published>2011-12-17T20:49:00.001-08:00</published><updated>2011-12-17T20:49:53.165-08:00</updated><title type='text'>String To charArray Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
package stringReduction;&lt;br /&gt;
&lt;br /&gt;
import java.io.BufferedReader;&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import java.io.InputStreamReader;&lt;br /&gt;
/*&lt;br /&gt;
&amp;nbsp;* author manish&lt;br /&gt;
&amp;nbsp;* This program will take a String and Convert to char array&lt;br /&gt;
&amp;nbsp;* remove/replace the package name for it to work&lt;br /&gt;
&amp;nbsp;* */&lt;br /&gt;
public class Solution {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static void main(String[] args) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.print(&quot;Hello&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;BufferedReader br = new BufferedReader(new InputStreamReader(System.in));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;try {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;String inputString=br.readLine();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;//System.out.print(inputString);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;char[] cArray = inputString.toCharArray();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (char c : cArray)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(c);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} catch (IOException e) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// TODO Auto-generated catch block&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;e.printStackTrace();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/4719431789873730364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2011/12/string-to-chararray-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/4719431789873730364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/4719431789873730364'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2011/12/string-to-chararray-java.html' title='String To charArray Java'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-2517434852731131344</id><published>2011-09-20T00:27:00.001-07:00</published><updated>2011-09-20T00:28:03.065-07:00</updated><title type='text'>Extracting File Name , Extension , File Name Without Extension In Shell Script</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 13px; line-height: 12px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;post-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; line-height: 18px; margin-bottom: 5px; margin-left: 0px; margin-right: 5px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; width: 660px;&quot;&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
First, get file without path:&lt;/div&gt;
&lt;pre class=&quot;lang-bsh prettyprint&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;basename $fullfile&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
extension&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;##*.}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
filename&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;%.*}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/2517434852731131344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2011/09/extracting-file-name-extension-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/2517434852731131344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/2517434852731131344'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2011/09/extracting-file-name-extension-file.html' title='Extracting File Name , Extension , File Name Without Extension In Shell Script'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-3838006859974465179</id><published>2011-06-24T04:39:00.000-07:00</published><updated>2011-06-24T04:39:02.989-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Compare command in case of linux</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
Found this Good article as a part of book Advance Shell Scripting Guide&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To compare 2 files, we use the&amp;nbsp;&lt;span style=&quot;font-style: italic;&quot;&gt;diff&lt;/span&gt;&amp;nbsp;command. How do we compare 2 directories? Specifically, we want to know what files/subdirectories are common, what are only in 1 directory but not the other.&lt;br /&gt;
&lt;br /&gt;
Unix old-timers may remember the&amp;nbsp;&lt;span style=&quot;font-style: italic;&quot;&gt;dircmp&lt;/span&gt;&amp;nbsp;command. Alas, that command is not available in Linux. In Linux, we use the same&amp;nbsp;&lt;span style=&quot;font-style: italic;&quot;&gt;diff&lt;/span&gt;&amp;nbsp;command to compare directories as well as files.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ diff  ~peter ~george
Only in /home/peter: announce.doc
diff /home/peter/.bashrc /home/george/.bashrc
76,83d72
&amp;lt;
&amp;lt; # Customization by Peter
&amp;lt; export LESS=-m
&amp;lt; export GREP_OPTIONS=&#39;--color=always&#39;
&amp;lt; shopt -s histappend
&amp;lt; shopt -s cmdhist
&amp;lt; export PROMPT_COMMAND=&quot;history -a;$PROMPT_COMMAND&quot;
&amp;lt; #echo keycode 58 = Escape |loadkeys -
Only in /home/george: .mcoprc
Only in /home/peter: .metacity
Only in /home/george: .newsticker-images
Only in /home/peter: .notifier.conf
Only in /home/george: targets.txt
Only in /home/peter: .xsession-errors&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Without any option, diffing 2 directories will tell you which files only exist in 1 directory and not the other, and which are common files. Files that are common in both directories (e.g., .bashrc in the above listing) are diffed to see if and how the file contents differ.&lt;br /&gt;
&lt;br /&gt;
If you are NOT interested in file differences, just add the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;-q&lt;/span&gt;&amp;nbsp;(or&lt;span style=&quot;font-weight: bold;&quot;&gt;--brief&lt;/span&gt;) option.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;diff -q ~peter ~george  |sort
Files /home/peter/.bashrc and /home/george/.bashrc differ
Only in /home/george: .mcoprc
Only in /home/george: .newsticker-images
Only in /home/george: targets.txt
Only in /home/peter: .metacity
Only in /home/peter: .notifier.conf
Only in /home/peter: .xsession-errors
Only in /home/peter: announce.doc&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-style: italic;&quot;&gt;diff&lt;/span&gt;&amp;nbsp;orders its output alphabetically by file/subdirectory name. I prefer to group them by whether they are common, and whether they only exist&lt;br /&gt;
in the first or second directory. That is why I piped the output of&amp;nbsp;&lt;span style=&quot;font-style: italic;&quot;&gt;diff&lt;/span&gt;&amp;nbsp;through&amp;nbsp;&lt;span style=&quot;font-style: italic;&quot;&gt;sort&lt;/span&gt;&amp;nbsp;in the above command.&lt;br /&gt;
&lt;br /&gt;
Note that by default&amp;nbsp;&lt;span style=&quot;font-style: italic;&quot;&gt;diff&lt;/span&gt;&amp;nbsp;does not reach into the subdirectories to compare the files and subdirectories at that level. To change its behavior to recursively go down subdirectories, add&lt;span style=&quot;font-weight: bold;&quot;&gt;-r&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;diff -qr ~peter ~george  |sort&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/3838006859974465179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2011/06/compare-command-in-case-of-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/3838006859974465179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/3838006859974465179'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2011/06/compare-command-in-case-of-linux.html' title='Compare command in case of linux'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-6047213647354096629</id><published>2011-06-23T23:36:00.000-07:00</published><updated>2011-06-23T23:36:41.273-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Usefull copy commands in Linux</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
To make a copy of a file in the current directory, enter:&lt;br /&gt;
&lt;code&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;$ cp file.doc file.doc.bak&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
To copy a file in your current directory into another directory,  enter:&lt;br /&gt;
&lt;code&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;$ cp filename /tmp&lt;br /&gt;
$ ls /tmp/filename&lt;br /&gt;
$ cd /tmp&lt;br /&gt;
$ ls&lt;br /&gt;
$ rm filename&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
To copy a file to a new file and preserve the modification date,  time, and access control list associated with the source file, enter:&lt;br /&gt;
&lt;code&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;$ cp -p filename /path/to/new/location/myfile&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
To copy all the files in a directory to a new directory, enter:&lt;br /&gt;
&lt;code&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;$ cp * /home/tom/backup&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
To copy a directory, including all its files and subdirectories, to  another directory, enter (copy directories recursively):&lt;br /&gt;
&lt;code&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;$ cp -R * /home/tom/backup&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/6047213647354096629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2011/06/usefull-copy-commands-in-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/6047213647354096629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/6047213647354096629'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2011/06/usefull-copy-commands-in-linux.html' title='Usefull copy commands in Linux'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-2466578094809149258</id><published>2011-06-23T23:24:00.000-07:00</published><updated>2011-06-23T23:24:05.669-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Shell Scripting"/><title type='text'>Script to compare and Print Difference between two Directories recursively</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# cmp_dir - program to compare two directories and subDirectiories&lt;br /&gt;
# Manish&lt;br /&gt;
#Please remove Echo statements i had added them for debugging&lt;br /&gt;
# this is the Function part of it&lt;br /&gt;
# Expects two argument as Source directory and target Directory now bachalo is folder which does not exhist in destination&lt;br /&gt;
# so it says folder does not exhist - just copy &amp;nbsp;but test is in source and dest so it gets in to that&lt;br /&gt;
#**********************************&lt;br /&gt;
&lt;br /&gt;
searchF()&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;file=$1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;args=$2&lt;br /&gt;
&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;#echo &quot;in function Search&quot;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;# Process each file in directory_1, comparing it to directory_2&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for filename in $file/*; do&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;fn=$(basename &quot;$filename&quot;)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;arg=&quot;$args/$fn&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;#echo &quot;Hellooooo&quot;$fn&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if [ -f &quot;$filename&quot; ]; then # Checking the File and Comparing the Diff&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if [ ! -f &quot;$arg&quot; ]; then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;echo &quot;$fn is missing from $arg&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;let &quot;missing+=1&quot;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;#sleep 1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;#echo $missing &quot;is the current missing count&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;fi&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;elif [ -d &quot;$filename&quot; ]; then # i need to make it recursive here for directories inside-- i think &lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;#echo &quot;HelloBidu&quot;$filename&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;arg= &quot;$2/$fn&quot;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;let &quot;missing+=1&quot;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;#sleep 1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;#echo $missing &quot;is the current missing count&quot;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;searchF $filename $arg #recusrion&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;fi&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;done&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
}&lt;br /&gt;
#****************************&lt;br /&gt;
# Main Block Starts Here&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
# Check for required arguments&lt;br /&gt;
&lt;br /&gt;
missing=0&lt;br /&gt;
[ $# -ne 2 ] &amp;amp;&amp;amp; &amp;nbsp;echo &quot;usage: $0 directory_1 directory_2&quot; 1&amp;gt;&amp;amp;2 &amp;amp;&amp;amp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; echo &quot;usage: $0 directory_1 directory_2&quot; 1&amp;gt;&amp;amp;2&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Make sure both arguments are directories&lt;br /&gt;
if [ ! -d $1 ]; then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; echo &quot;$1 is not a directory!&quot; 1&amp;gt;&amp;amp;2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ ! -d $2 ]; then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; echo &quot;$2 is not a directory!&quot; 1&amp;gt;&amp;amp;2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#function call&lt;br /&gt;
searchF $1 $2&lt;br /&gt;
echo &quot;$missing files missing&quot;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/2466578094809149258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2011/06/script-to-compare-and-print-difference.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/2466578094809149258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/2466578094809149258'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2011/06/script-to-compare-and-print-difference.html' title='Script to compare and Print Difference between two Directories recursively'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1229961443216954137.post-6437190414685066658</id><published>2011-06-19T21:29:00.001-07:00</published><updated>2011-06-19T21:29:51.927-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>CHM reader on linux UBUNTU</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Need Internet Service on your system&lt;br /&gt;
&lt;br /&gt;
Type this&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #494949; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;&lt;strong&gt;sudo apt-get install xchm&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #494949; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;&lt;strong&gt;and it shoudl do the rest&amp;nbsp;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #494949; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;&lt;strong&gt;Happy Reading :)&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technicalshowoff.blogspot.com/feeds/6437190414685066658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://technicalshowoff.blogspot.com/2011/06/chm-reader-on-linux-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/6437190414685066658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1229961443216954137/posts/default/6437190414685066658'/><link rel='alternate' type='text/html' href='http://technicalshowoff.blogspot.com/2011/06/chm-reader-on-linux-ubuntu.html' title='CHM reader on linux UBUNTU'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10897327780524169105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>