<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>2012 on thefourtheye.in</title>
    <link>https://thefourtheye.in/posts/2012/</link>
    <description>Recent content in 2012 on thefourtheye.in</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language><atom:link href="https://thefourtheye.in/posts/2012/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Next Palindrome after a 1000000 digit number - SPOJ - PALIN</title>
      <link>https://thefourtheye.in/posts/2012/10/21/next-palindrome-after-1000000-digit/</link>
      <pubDate>Sun, 21 Oct 2012 18:38:00 +0530</pubDate>
      
      <guid>https://thefourtheye.in/posts/2012/10/21/next-palindrome-after-1000000-digit/</guid>
      <description>
&lt;div class=&#39;post&#39;&gt;
&lt;div dir=&#34;ltr&#34; style=&#34;text-align: left;&#34; trbidi=&#34;on&#34;&gt;I always have afraid of the problems which require string processing, to be solved. This is one such problem. The problem description as stated in SPOJ (&lt;a href=&#34;http://www.spoj.pl/problems/PALIN/&#34;&gt;http://www.spoj.pl/problems/PALIN/&lt;/a&gt;) and my solution to this problem is&amp;nbsp;&lt;a href=&#34;http://ideone.com/osqLhp&#34;&gt;http://ideone.com/osqLhp&lt;/a&gt;&amp;nbsp;(I am sure, I can improve this code)&lt;br /&gt;&lt;br /&gt;&lt;h1 style=&#34;background-color: #f6f9e0; color: #000020; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 20px; font-weight: normal; text-align: left;&#34;&gt;&lt;span style=&#34;font-size: 13px; text-align: justify;&#34;&gt;A positive integer is called a&lt;/span&gt;&lt;span style=&#34;font-size: 13px; text-align: justify;&#34;&gt;&amp;nbsp;&lt;/span&gt;&lt;i style=&#34;background-color: transparent; font-size: 13px; text-align: justify;&#34;&gt;palindrome&lt;/i&gt;&lt;span style=&#34;font-size: 13px; text-align: justify;&#34;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;font-size: 13px; text-align: justify;&#34;&gt;if its representation in the decimal system is the same when read from left to right and from right to left. For a given positive integer K of not more than 1000000 digits, write the value of the smallest palindrome larger than K to output. Numbers are always displayed without leading zeros.&lt;/span&gt;&lt;/h1&gt;&lt;br /&gt;&lt;h3 style=&#34;background-color: #f6f9e0; color: #000020; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 15px; text-align: center;&#34;&gt;Input&lt;/h3&gt;&lt;div align=&#34;justify&#34; style=&#34;background-color: #f6f9e0; color: #000020; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; text-align: justify;&#34;&gt;The first line contains integer t, the number of test cases. Integers K are given in the next t lines.&lt;/div&gt;&lt;h3 style=&#34;background-color: #f6f9e0; color: #000020; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 15px; text-align: center;&#34;&gt;Output&lt;/h3&gt;&lt;div align=&#34;justify&#34; style=&#34;background-color: #f6f9e0; color: #000020; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; text-align: justify;&#34;&gt;For each K, output the smallest palindrome larger than K.&lt;/div&gt;&lt;h3 style=&#34;background-color: #f6f9e0; color: #000020; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 15px; text-align: center;&#34;&gt;Example&lt;/h3&gt;&lt;div style=&#34;background-color: #f6f9e0; color: #000020; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; text-align: justify;&#34;&gt;&lt;tt&gt;&lt;b&gt;Input:&lt;/b&gt;&lt;/tt&gt;&lt;br /&gt;2&lt;br /&gt;808&lt;br /&gt;2133&lt;/div&gt;&lt;div style=&#34;background-color: #f6f9e0; color: #000020; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; text-align: justify;&#34;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&#34;background-color: #f6f9e0; color: #000020; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; text-align: justify;&#34;&gt;&lt;tt&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/tt&gt;&lt;br /&gt;818&lt;br /&gt;2222&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;We know that, there is no integral data type which is as sophisticated as to&amp;nbsp;accommodate a 1000000 digits number (a million digits in a number). So only option is to use string. And we also know what palindrome is. A number or a string of characters, is the same when expressed from left to right and right to left. For example, AMMA, MADAM, MALAYALAM, 11, 505, 797979797, ...&lt;br /&gt;&lt;br /&gt;Lets assume the input number as N. If we read through the problem, we are asked to find the next (greater than the number provided) palindrome which exists after the number N. As we see in the examples, 818 is the next big palindrome after 808 and 2222 is the next big palindrome after 2133. If the numbers are small, we can try brute-force approach.&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&#34;text-align: left;&#34;&gt;Brute force approach:&lt;/h3&gt;&lt;br /&gt;&lt;ol style=&#34;text-align: left;&#34;&gt;&lt;li&gt;Read the number N&lt;/li&gt;&lt;li&gt;Increment by 1&lt;/li&gt;&lt;li&gt;Check whether it is a palindrome or not&lt;/li&gt;&lt;li&gt;If Yes, Print the number and exit&lt;/li&gt;&lt;li&gt;If No, goto step 2&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This approach is quite simple and easy to implement. But, this may not work always when we have time constraints. If the number N becomes as big as a 1000000 digit number, program with this approach would produce output after a very long time. We all want our programs to produce outputs so quickly, don&#39;t we?&amp;nbsp;Let us look at the approach which I followed to solve this problem.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&#34;text-align: left;&#34;&gt;My approach:&lt;/h3&gt;&lt;div&gt;&lt;ol style=&#34;text-align: left;&#34;&gt;&lt;li&gt;Read the number as a string and store it in STR and the number of digits as N&lt;/li&gt;&lt;li&gt;Split STR into two halves STR1 and STR3, if the number of digits in STR is odd, the middle digit will be in STR2 otherwise it is empty&lt;/li&gt;&lt;li&gt;If the Reverse of STR1 is greater than STR3, Print STR1 + STR2 + Reverse (STR1) and exit&lt;/li&gt;&lt;li&gt;make all digits of STR3 as &#39;0&#39;&lt;/li&gt;&lt;li&gt;If N is even,&amp;nbsp;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;increment STR1&lt;/li&gt;&lt;li&gt;Goto step 1 with input (Incremented STR1 + STR3)&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;If N is odd,&amp;nbsp;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;increment STR2&lt;/li&gt;&lt;ol&gt;&lt;li&gt;If Incremented STR2 is 10,&amp;nbsp;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;set STR2 as &#34;0&#34;&lt;/li&gt;&lt;li&gt;increment STR1&lt;/li&gt;&lt;li&gt;Goto step 1 with input (Incremented STR1 + STR2 + STR3)&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;If Incremented STR2 is lesser than 10&lt;/li&gt;&lt;ol&gt;&lt;li&gt;Goto step 1 with input (STR1 + STR2 + STR3)&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;div&gt;The observation which I made after analyzing few examples is, if the second half of the number is smaller than the reverse of the first half of the number, just replacing the&amp;nbsp;second half&amp;nbsp;with&amp;nbsp;the reverse of the first half produces the required output. If it is not smaller than the reverse of the first half, increment the first half and then replace the second half with the incremented first half. This is the basic idea but the above algorithm includes all the corner cases.&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;My solution:&lt;/b&gt;&lt;/div&gt;&lt;script type=&#34;text/javascript&#34; src=&#34;http://ideone.com/api/embed.js/link/osqLhp&#34;&gt;&lt;/script&gt;&lt;/div&gt;


</description>
    </item>
    
    <item>
      <title>Infix Expression to Postfix (RPN) Expression Conversion - SPOJ - ONP</title>
      <link>https://thefourtheye.in/posts/2012/10/21/infix-expression-to-postfix-rpn/</link>
      <pubDate>Sun, 21 Oct 2012 17:46:00 +0530</pubDate>
      
      <guid>https://thefourtheye.in/posts/2012/10/21/infix-expression-to-postfix-rpn/</guid>
      <description>
&lt;div class=&#39;post&#39;&gt;
&lt;div dir=&#34;ltr&#34; style=&#34;text-align: left;&#34; trbidi=&#34;on&#34;&gt;&lt;div style=&#34;text-align: justify;&#34;&gt;This was one of our lab exercises in my Engineering first year. That was Data Structures lab. Guess what, this program was agreed as the toughest program of all the programs, by the whole class (our class strength was 63), which we were supposed to finish in that semester and the teacher had the whole program written on the blackboard and later we typed, compiled and executed on the computers. I remember the days, in which I used to memorize the program which solved the same problem for the lab exams.&amp;nbsp;Nostalgic!!!&amp;nbsp;Now, this took me lesser than 15 minutes to get &#34;accepted&#34; in SPOJ&amp;nbsp;:)&lt;/div&gt;&lt;div style=&#34;text-align: justify;&#34;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&#34;text-align: left;&#34;&gt;Here is the problem statement, as stated in SPOJ (&lt;a href=&#34;http://www.spoj.pl/problems/ONP/&#34; style=&#34;text-align: left;&#34;&gt;http://www.spoj.pl/problems/ONP/&lt;/a&gt;). My solution to the same&amp;nbsp;&lt;a href=&#34;http://ideone.com/wCfryC&#34;&gt;http://ideone.com/wCfryC&lt;/a&gt;&lt;/div&gt;&lt;div style=&#34;text-align: justify;&#34;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&#34;text-align: justify;&#34;&gt;&lt;/div&gt;&lt;div align=&#34;justify&#34; style=&#34;background-color: #f6f9e0; color: #000020; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&#34;&gt;Transform the algebraic expression with brackets into RPN form (Reverse Polish Notation). Two-argument operators: +, -, *, /, ^ (priority from the lowest to the highest), brackets ( ). Operands: only letters: a,b,...,z. Assume that there is only one RPN form (no expressions like a*b*c).&lt;/div&gt;&lt;h3 style=&#34;background-color: #f6f9e0; color: #000020; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 15px; text-align: center;&#34;&gt;Input&lt;/h3&gt;&lt;pre style=&#34;background-color: #f6f9e0; color: #000020; font-size: 13px; text-align: left;&#34;&gt;&lt;i&gt;t&lt;/i&gt; [the number of expressions &amp;lt;= &lt;b&gt;100&lt;/b&gt;]&lt;br /&gt;&lt;i&gt;expression&lt;/i&gt; [length &amp;lt;= &lt;b&gt;400&lt;/b&gt;]&lt;br /&gt;[other expressions]&lt;br /&gt;&lt;/pre&gt;&lt;div align=&#34;left&#34; style=&#34;background-color: #f6f9e0; color: #000020; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&#34;&gt;Text grouped in [ ] does not appear in the input file.&lt;/div&gt;&lt;h3 style=&#34;background-color: #f6f9e0; color: #000020; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 15px; text-align: center;&#34;&gt;Output&lt;/h3&gt;&lt;pre style=&#34;background-color: #f6f9e0; color: #000020; font-size: 13px; text-align: left;&#34;&gt;The &lt;em&gt;expression&lt;/em&gt;s in RPN form, one per line.&lt;br /&gt;&lt;/pre&gt;&lt;h3 style=&#34;background-color: #f6f9e0; color: #000020; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 15px; text-align: center;&#34;&gt;Example&lt;/h3&gt;&lt;pre style=&#34;background-color: #f6f9e0; color: #000020; font-size: 13px; text-align: left;&#34;&gt;Input:&lt;br /&gt;3&lt;br /&gt;(a+(b*c))&lt;br /&gt;((a+b)*(z+x))&lt;br /&gt;((a+t)*((b+(a+c))^(c+d)))&lt;br /&gt;&lt;br /&gt;Output:&lt;br /&gt;abc*+&lt;br /&gt;ab+zx+*&lt;br /&gt;at+bac++cd+^*&lt;/pre&gt;&lt;/div&gt;&lt;script type=&#34;text/javascript&#34; src=&#34;http://ideone.com/api/embed.js/link/wCfryC&#34;&gt;&lt;/script&gt;&lt;/div&gt;


</description>
    </item>
    
    <item>
      <title>Store and read static files in Android</title>
      <link>https://thefourtheye.in/posts/2012/10/21/store-and-read-static-files-in-android/</link>
      <pubDate>Sun, 21 Oct 2012 00:45:00 +0530</pubDate>
      
      <guid>https://thefourtheye.in/posts/2012/10/21/store-and-read-static-files-in-android/</guid>
      <description>
&lt;div class=&#39;post&#39;&gt;
&lt;div dir=&#34;ltr&#34; style=&#34;text-align: left;&#34; trbidi=&#34;on&#34;&gt;Recently I was writing an Android application, in which I had to read data from a static text file. I did not know where to keep the file and how to refer that file in the program (in windows/*nix OS we used to provide path to the file in&amp;nbsp;file system). After surfing the internet enough, found a solution to this problem.&lt;br /&gt;&lt;br /&gt;Note: This post helps you to read from a static application specific internal files.&lt;br /&gt;&lt;br /&gt;1) The IDE which I used to develop Android applications is Eclipse and I assume that you already have an Android project opened and the static file to be read.&lt;br /&gt;&lt;br /&gt;2) The name of the static file which I am going to use in this example is dictionary.txt&lt;br /&gt;&lt;br /&gt;3) In the directory structure of an Android project, there will be a directory called &#34;res&#34;. Create a directory called &#34;raw&#34; inside the &#34;res&#34; directory and import the file to be read in that directory. All the files added to the raw folder will be read-only. (And I&amp;nbsp;don&#39;t&amp;nbsp;think we can refer them as files anymore. So that data can be read as shown in step 6). The directory structure might look like this&lt;br /&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;http://4.bp.blogspot.com/-AY2IMv2dumM/UILv-BzXbtI/AAAAAAAABSc/iubW7BFWrvo/s1600/AndroidProjectStructure.png&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;http://4.bp.blogspot.com/-AY2IMv2dumM/UILv-BzXbtI/AAAAAAAABSc/iubW7BFWrvo/s1600/AndroidProjectStructure.png&#34; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: left;&#34;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: left;&#34;&gt;4) After adding the file, just Build the Project and make sure that build is successful.&lt;/div&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: left;&#34;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: left;&#34;&gt;5) Now, in the &#34;gen&#34; directory, inside your package, Open the R.java file. You might get to see something similar to this&lt;/div&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: left;&#34;&gt;&lt;/div&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both;&#34;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both;&#34;&gt;&lt;span style=&#34;font-family: Courier New, Courier, monospace;&#34;&gt;&amp;nbsp; &amp;nbsp; public static final class raw {&lt;/span&gt;&lt;/div&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both;&#34;&gt;&lt;span style=&#34;font-family: Courier New, Courier, monospace;&#34;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public static final int dictionary=0x......;&lt;/span&gt;&lt;/div&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both;&#34;&gt;&lt;span style=&#34;font-family: Courier New, Courier, monospace;&#34;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;6) Now, this static file will be included in the &#34;.apk&#34; file. As to read from the file, the following piece of code would do that job. You may have to add the appropriate try-catch blocks.&lt;br /&gt;&lt;br /&gt;&lt;span style=&#34;font-family: Courier New, Courier, monospace;&#34;&gt;BufferedReader filereader =&amp;nbsp;new BufferedReader(&lt;/span&gt;&lt;br /&gt;&lt;span style=&#34;font-family: &#39;Courier New&#39;, Courier, monospace;&#34;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&#34;font-family: Courier New, Courier, monospace;&#34;&gt;new InputStreamReader (ctx.getResources().openRawResource&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&#34;font-family: &#39;Courier New&#39;, Courier, monospace;&#34;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&#34;font-family: Courier New, Courier, monospace;&#34;&gt;(R.raw.dictionary)));&lt;/span&gt;&lt;br /&gt;&lt;span style=&#34;font-family: Courier New, Courier, monospace;&#34;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&#34;font-family: Courier New, Courier, monospace;&#34;&gt;String lineread = &#34;&#34;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&#34;font-family: Courier New, Courier, monospace;&#34;&gt;while ((lineread = filereader.readLine()) != null)&lt;/span&gt;&lt;br /&gt;&lt;span style=&#34;font-family: Courier New, Courier, monospace;&#34;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&#34;font-family: Courier New, Courier, monospace;&#34;&gt;&amp;nbsp; &amp;nbsp;System.err.println (&#34;Read &#34; + lineread);&lt;/span&gt;&lt;br /&gt;&lt;span style=&#34;font-family: Courier New, Courier, monospace;&#34;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&#34;font-family: &#39;Courier New&#39;, Courier, monospace;&#34;&gt;filereader.close();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&#34;font-family: &#39;Courier New&#39;, Courier, monospace;&#34;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&#34;text-align: left;&#34;&gt;&lt;span style=&#34;font-family: inherit;&#34;&gt;7) In order to view the files in development environment or emulator itself, there is a perspective called DDMS in Eclipse, just switch to that and have your Android Virtual Device started.&lt;/span&gt;&lt;/div&gt;&lt;div style=&#34;text-align: left;&#34;&gt;&lt;span style=&#34;font-family: inherit;&#34;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;http://2.bp.blogspot.com/-G7nW7H78T1U/UIL16OQaSMI/AAAAAAAABSs/9LpSasvcXR4/s1600/DDMS.png&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;371&#34; src=&#34;http://2.bp.blogspot.com/-G7nW7H78T1U/UIL16OQaSMI/AAAAAAAABSs/9LpSasvcXR4/s640/DDMS.png&#34; width=&#34;640&#34; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&#34;text-align: left;&#34;&gt;&lt;span style=&#34;font-family: inherit;&#34;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&#34;text-align: left;&#34;&gt;&lt;span style=&#34;font-family: inherit;&#34;&gt;8) The application specific files can be found in data/data/&amp;lt;your package name&amp;gt;/files&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;


</description>
    </item>
    
    <item>
      <title>Making Lync 2010 to work in Android</title>
      <link>https://thefourtheye.in/posts/2012/10/20/making-lync-2010-to-work-in-android/</link>
      <pubDate>Sat, 20 Oct 2012 13:45:00 +0530</pubDate>
      
      <guid>https://thefourtheye.in/posts/2012/10/20/making-lync-2010-to-work-in-android/</guid>
      <description>
&lt;div class=&#39;post&#39;&gt;
&lt;div dir=&#34;ltr&#34; style=&#34;text-align: left;&#34; trbidi=&#34;on&#34;&gt;Lately I downloaded Lync 2010 from Android Market. But I was not able to make it to connect to my corporate network. I was sure that there is some setting which has to be done properly but not sure what that is. After surfing internet for a while, landed on this page.&amp;nbsp;&lt;a href=&#34;http://support.microsoft.com/kb/2636313&#34;&gt;http://support.microsoft.com/kb/2636313&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is how I made it to work.&lt;br /&gt;&lt;br /&gt;1) Downloaded and installed Lync 2010 from Google Play Store in my Android Gingerbread.&lt;br /&gt;2) Opened Lync 2010&lt;br /&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;http://4.bp.blogspot.com/-J8TjZGecYAM/UIJaQZfnTYI/AAAAAAAABRw/kqO6_vpnaEQ/s1600/LyncHome.png&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;http://4.bp.blogspot.com/-J8TjZGecYAM/UIJaQZfnTYI/AAAAAAAABRw/kqO6_vpnaEQ/s1600/LyncHome.png&#34; /&gt;&lt;/a&gt;&lt;/div&gt;3) Typed my username and password properly. The username should be typed completely, for example, someone@example.com&lt;br /&gt;4) Now press the menu button to be able to select the &#34;Options&#34; option.&lt;br /&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;http://4.bp.blogspot.com/-wzcbOpcpTCg/UIJaQThbq1I/AAAAAAAABR0/bt23KpB6rmM/s1600/LyncOptions.png&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em; text-align: center;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;http://4.bp.blogspot.com/-wzcbOpcpTCg/UIJaQThbq1I/AAAAAAAABR0/bt23KpB6rmM/s1600/LyncOptions.png&#34; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: left;&#34;&gt;5) It will open up a page like this&lt;/div&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;http://1.bp.blogspot.com/-e7Fj7VYhRXs/UIJaQarEjmI/AAAAAAAABR4/RopNt7KMv0c/s1600/LyncOptionsHome.png&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;http://1.bp.blogspot.com/-e7Fj7VYhRXs/UIJaQarEjmI/AAAAAAAABR4/RopNt7KMv0c/s1600/LyncOptionsHome.png&#34; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: left;&#34;&gt;6) Most of the cases, Lync detects the server details automatically. So lets not worry about the server settings now. Press the downward arrow which corresponds to the User name box, which will pull up a simple page like this.&lt;/div&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;http://1.bp.blogspot.com/-8W46PSIG6Q4/UIJaQ1utqVI/AAAAAAAABR8/0sEa-kkKoA0/s1600/LyncUsername.png&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;http://1.bp.blogspot.com/-8W46PSIG6Q4/UIJaQ1utqVI/AAAAAAAABR8/0sEa-kkKoA0/s1600/LyncUsername.png&#34; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: left;&#34;&gt;7) This is the part which was driving me crazy and took three days to figure out. You have to provide the &lt;b&gt;username along with the complete domain name&lt;/b&gt;. The most important thing is, you need to use a &lt;b&gt;backward slash&lt;/b&gt; (\) to separate the domain name and username. My gingerbread did not show (\) character on this page. So I had to copy it from the browser where I was able to type that character. For example, domain\someone&lt;/div&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: left;&#34;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: left;&#34;&gt;I helped many of my friends using Lync this way, on Android and it works on iTouch also.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;


</description>
    </item>
    
    <item>
      <title>Prime Numbers and Basic Primality Tests - SPOJ - Prime1</title>
      <link>https://thefourtheye.in/posts/2012/10/09/prime-numbers-and-basic-primality-tests/</link>
      <pubDate>Tue, 09 Oct 2012 16:40:00 +0530</pubDate>
      
      <guid>https://thefourtheye.in/posts/2012/10/09/prime-numbers-and-basic-primality-tests/</guid>
      <description>
&lt;div class=&#39;post&#39;&gt;
&lt;div dir=&#34;ltr&#34; style=&#34;text-align: left;&#34; trbidi=&#34;on&#34;&gt;&lt;b&gt;Prime numbers&lt;/b&gt; are the numbers which get divided properly (leaving remainder as 0) only by 1 and the same number.&lt;br /&gt;&lt;br /&gt;The same way, numbers which get divided by 1, the same number and other numbers are called &lt;b&gt;composite numbers&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Current state of the art security infrastructures rely on security schemes such as RSA and DSA. They both, in turn, rely heavily on Prime numbers. So prime numbers are so important in the digital world&#39;s security. Lets see few of the algorithms to determine whether the given number is a Prime number or not.&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&#34;text-align: left;&#34;&gt;Basic Tests for Primality&lt;/h3&gt;&lt;div&gt;Lets say, we want to find whether the numbers 101 and 100 are prime numbers are not.&lt;/div&gt;&lt;h4 style=&#34;text-align: left;&#34;&gt;Approach 1&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is the very basic approach and very easy to implement.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&#34;text-align: left;&#34;&gt;&lt;ul style=&#34;text-align: left;&#34;&gt;&lt;li&gt;Read the number n&lt;/li&gt;&lt;li&gt;Loop with i from 2 till n/2 (if it doesn&#39;t divide properly, round off is needed)&lt;/li&gt;&lt;li&gt;if i divides n with out leaving any remainder (remainder is 0)&amp;nbsp;then return false&lt;/li&gt;&lt;li&gt;End Loop&lt;/li&gt;&lt;li&gt;return true&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The idea here is to check whether each and every number from 2 till half of that number [2, n/2] divides the number or not. If any of them divides the number without leaving any remainder, we can declare that the number is NOT a prime number. If no number in that range divides properly, the number is called a Prime number. We check only till n/2, because 2 * n/2 would be n, there would be no number greater than n/2 would divide n properly. In the worst case, It needs n/2 iterations to confirm whether the number is prime or not. In our case, for 101,&amp;nbsp;it is 50.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h4&gt;Approach 2&lt;/h4&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The simplicity of this algorithm would tempt us to use this always. Lets see, if we can improve this. If we observe closely, if the number n is odd, we don&#39;t even have to try any of the even numbers. This would reduce the number of iterations needed by half.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Read the number n&lt;/li&gt;&lt;li&gt;if n is even return false&lt;/li&gt;&lt;li&gt;Loop with i from 3 till n/2, increment i by 2&lt;/li&gt;&lt;li&gt;if i divides n with out leaving any remainder (remainder is 0)&amp;nbsp;then return false&lt;/li&gt;&lt;li&gt;End Loop&lt;/li&gt;&lt;li&gt;return true&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;As we can clearly see, if n is even it can not be a prime number, since if a number is even it is divisible by 2. So we check only the odd numbers starting from 3 till n/2 and we are skipping all the even number &amp;nbsp;by incrementing the loop&#39;s index variable by 2 every time. So the loop would be run for the values 3,5,7,9, 11... Now if we look at the performance of this approach, we just need n/4 iterations to find whether the number is a prime number or not. In our case, for 101, it is 25.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&#34;text-align: left;&#34;&gt;Approach 3&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Lets see, if we can reduce it further from n/4. Lets write down the combinations which would yield 100. {2, 50}, {4, 25}, {5, 20} and {10, 10}. Lets try 256. {2, 128}, {4, 64}, {8, 32}, {16, 16}. In both the cases, atleast one of the numbers is always lesser than equal to the square root of the actual number. (I, honestly, don&#39;t know how to prove this, but this observation works always). So, instead of looping till n/2 we are going to limit the loop at square root of the number. Combining the observation we made in approach 2, presenting approach 3.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Read the number n&lt;/li&gt;&lt;li&gt;if n is even return false&lt;/li&gt;&lt;li&gt;Loop with i from 3 till sqrt (n), increment i by 2&lt;/li&gt;&lt;li&gt;if i divides n with out leaving any remainder (remainder is 0)&amp;nbsp;then return false&lt;/li&gt;&lt;li&gt;End Loop&lt;/li&gt;&lt;li&gt;return true&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In our case, we see a tremendous hike in performance,&amp;nbsp;for the value 101,&amp;nbsp;in the worst case we might have to do only 4 checks.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h4&gt;Approach 4&lt;/h4&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We have already had good performance with approach 3. Lets see if we still can improve it. Lets list the four values with which we may need to divide 101 to determine whether it is prime or not. The values are {2, 3, 5, 7, 9}. We have 2 as well here, since we check whether the input is even or not and 11 is not included because sqrt (101) would be rounded off to 10. The odd item in the list is 9, since we are checking against all the odd number between 2 and sqrt(n). We all know that, any given composite (non-prime) number can be expressed in terms of its prime factors. So we can try and divide the number only with the prime numbers within the range [2, sqrt(n)]. &lt;b&gt;Note:&lt;/b&gt; This approach works only when we have a predetermined list of prime numbers. If we don&#39;t have that its better to stick to approach 3 or have a look at approach 5 below.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h4&gt;Approach 5&lt;/h4&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Lets observe the list the prime numbers a bit.&lt;/div&gt;&lt;div&gt;&lt;span style=&#34;font-family: inherit;&#34;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&#34;font-family: inherit;&#34;&gt;{&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101...}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&#34;font-family: inherit;&#34;&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&#34;font-family: inherit;&#34;&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;Lets rewrite them like this&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&#34;font-family: inherit;&#34;&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;{&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;2, 3, 6*1-1,&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*1+1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*2-1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*2+1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*3-1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*3+1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*4-1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*5-1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*5+1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*6+1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*7-1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*7+1,&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*8-1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*9-1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*10-1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*10+1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*11+1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*12-1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*12+1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*13-1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*14-1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*15-1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*16+1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;6*17-1&lt;/span&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;...}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&#34;background-color: white; line-height: 19.200000762939453px;&#34;&gt;Basically, the prime numbers are of the form &lt;span style=&#34;font-family: inherit;&#34;&gt;(6*x)&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;background-color: white; color: #222222; line-height: 16px;&#34;&gt;&lt;span style=&#34;font-family: inherit;&#34;&gt;±1 (though few of them may not be prime numbers). This reduces the possible values to be looked at, to a greater extent.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&#34;background-color: white; color: #222222; line-height: 16px;&#34;&gt;&lt;span style=&#34;font-family: inherit;&#34;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Read the number n&lt;/li&gt;&lt;li&gt;if n is even return false&lt;/li&gt;&lt;li&gt;if 3 divides n properly return false&lt;/li&gt;&lt;li&gt;Loop with i from 1 till&amp;nbsp;(6 * i) -1 &amp;gt;&amp;nbsp;sqrt&amp;nbsp;(n), increment i by 1 every time&lt;/li&gt;&lt;li&gt;if&amp;nbsp;(6 * i) -1 or&amp;nbsp;(6 * i) + 1&amp;nbsp;divides n with out leaving any remainder (remainder is 0)&amp;nbsp;then return false&lt;/li&gt;&lt;li&gt;End Loop&lt;/li&gt;&lt;li&gt;return true&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This method would be the fastest of all the methods discussed, I believe.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Based on the ideas discussed above, I managed to solved the SPOJ&#39;s PRIME1 problem. The problem description can be found here&amp;nbsp;&lt;a href=&#34;http://www.spoj.pl/problems/PRIME1/&#34; target=&#34;_blank&#34;&gt;http://www.spoj.pl/problems/PRIME1/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Spoiler alert:&lt;/b&gt; This&amp;nbsp;&lt;a href=&#34;http://ideone.com/4n9kB&#34;&gt;http://ideone.com/4n9kB&lt;/a&gt;&amp;nbsp;has my solution to the above mentioned PRIME1 problem.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;script type=&#34;text/javascript&#34; src=&#34;http://ideone.com/api/embed.js/link/4n9kB&#34;&gt;&lt;/script&gt;&lt;/div&gt;


</description>
    </item>
    
    <item>
      <title>Compiling .NET code in Console mode and Form mode with Mono C# Compiler</title>
      <link>https://thefourtheye.in/posts/2012/10/07/compiling-net-code-in-console-mode-and/</link>
      <pubDate>Sun, 07 Oct 2012 07:49:00 +0530</pubDate>
      
      <guid>https://thefourtheye.in/posts/2012/10/07/compiling-net-code-in-console-mode-and/</guid>
      <description>
&lt;div class=&#39;post&#39;&gt;
&lt;div dir=&#34;ltr&#34; style=&#34;text-align: left;&#34; trbidi=&#34;on&#34;&gt;Compiling .NET code with &lt;a href=&#34;http://en.wikipedia.org/wiki/Mono_(software)&#34; target=&#34;_blank&#34;&gt;Mono&lt;/a&gt;&amp;nbsp;compiler is almost&amp;nbsp;similar&amp;nbsp;to compile with g++/gcc. The basic steps are as follows.&lt;br /&gt;&lt;br /&gt;1) Download and install the Mono for your platform from &lt;a href=&#34;http://www.go-mono.com/mono-downloads/download.html&#34;&gt;http://www.go-mono.com/mono-downloads/download.html&lt;/a&gt;&lt;br /&gt;2) Then write the code (we are going to see how to use c# compiler) with your favorite editor or IDE.&lt;br /&gt;3) Now to compile the code, we simply need to execute a file called mcs under the &amp;lt;installed location of mono&amp;gt;/bin, like this&lt;br /&gt;&lt;br /&gt;&lt;div style=&#34;text-align: center;&#34;&gt;&lt;span style=&#34;font-family: Courier New, Courier, monospace;&#34;&gt;mcs &amp;lt;filename&amp;gt;.cs -out:&amp;lt;filename&amp;gt;.exe&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;4) This will compile .cs file specified and produces the executable &amp;lt;filename&amp;gt;.exe&lt;br /&gt;&lt;br /&gt;But this compilation would produce only console application. That is whenever you execute the application, a terminal or a command window will be opened automatically. We may need to specify one or two options to ask the compiler to compile in forms mode.&lt;br /&gt;&lt;br /&gt;&lt;div style=&#34;text-align: center;&#34;&gt;&lt;span style=&#34;font-family: Courier New, Courier, monospace;&#34;&gt;mcs &amp;lt;filename&amp;gt;.cs -out:&amp;lt;filename&amp;gt;.exe -target:winexe -r:System.Windows.Forms.dll -r:System.Drawing.dll&lt;/span&gt;&lt;/div&gt;&lt;div style=&#34;text-align: center;&#34;&gt;&lt;br /&gt;&lt;/div&gt;The additional options used in this case are, -target and -r. -target specifies compiler that it has to generate a winexe type of application rather than console. -r option refers to the references.&amp;nbsp;&lt;span style=&#34;font-family: &#39;Courier New&#39;, Courier, monospace;&#34;&gt;System.Windows.Forms.dll &lt;/span&gt;&lt;span style=&#34;font-family: inherit;&#34;&gt;and&amp;nbsp;&lt;/span&gt;&lt;span style=&#34;font-family: &#39;Courier New&#39;, Courier, monospace;&#34;&gt;System.Drawing.dll &lt;/span&gt;&lt;span style=&#34;font-family: inherit;&#34;&gt;are the most common references needed when we start building applications with GUI support.&lt;/span&gt;&lt;br /&gt;&lt;span style=&#34;font-family: inherit;&#34;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&#34;font-family: inherit;&#34;&gt;&lt;b&gt;NOTE&lt;/b&gt;: We can even build GUI applications in console mode, but the console/terminal window will show up and will not be closed until the application is running.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;


</description>
    </item>
    
    <item>
      <title>Google Chrome - Bug in Search Display Box</title>
      <link>https://thefourtheye.in/posts/2012/10/06/google-chrome-bug-in-search-display-box/</link>
      <pubDate>Sat, 06 Oct 2012 13:01:00 +0530</pubDate>
      
      <guid>https://thefourtheye.in/posts/2012/10/06/google-chrome-bug-in-search-display-box/</guid>
      <description>
&lt;div class=&#39;post&#39;&gt;
&lt;div dir=&#34;ltr&#34; style=&#34;text-align: left;&#34; trbidi=&#34;on&#34;&gt;&lt;span style=&#34;color: black;&#34;&gt;Lately I have been working with Google Chrome, browsing random stuff. All of a sudden found something weird in the browser. I was searching for a word in the page displayed on screen. It searches properly but the index with which it reports the matches has got negative values. (See the attached screenprint) I was keep on trying to reproduce the same, after reopening the browser, but unfortunately I am not successful yet. I think this happens when I am searching in multiple pages at the same time. Browser decrements the value instead of resetting it when the current index is 1, when user clicks on upward arrowed button.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;http://2.bp.blogspot.com/-3NBpRg4JX9k/UG_cSFzRWhI/AAAAAAAAAyo/yn-KzblY8JM/s1600/Google+Chrome+Search+Bar+Bug.png&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;480&#34; src=&#34;http://2.bp.blogspot.com/-3NBpRg4JX9k/UG_cSFzRWhI/AAAAAAAAAyo/yn-KzblY8JM/s640/Google+Chrome+Search+Bar+Bug.png&#34; width=&#34;640&#34; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;


</description>
    </item>
    
    <item>
      <title>Google Chrome – Search term repeats automatically</title>
      <link>https://thefourtheye.in/posts/2012/09/30/google-chrome-search-term-repeats/</link>
      <pubDate>Sun, 30 Sep 2012 12:10:00 +0530</pubDate>
      
      <guid>https://thefourtheye.in/posts/2012/09/30/google-chrome-search-term-repeats/</guid>
      <description>
&lt;div class=&#39;post&#39;&gt;
&lt;div dir=&#34;ltr&#34; style=&#34;text-align: left;&#34; trbidi=&#34;on&#34;&gt;All of a sudden, my Google Chrome (&lt;span style=&#34;font-family: inherit;&#34;&gt;version&amp;nbsp;&lt;span style=&#34;color: #303942;&#34;&gt;22.0.1229.79 m&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;color: #303942; font-family: &#39;Segoe UI&#39;, Tahoma, sans-serif; font-size: 12px;&#34;&gt;)&amp;nbsp;&lt;/span&gt;started appending the same search term twice whenever I type in the address bar. I was looking for a way to fix it for long time and got it today.&amp;nbsp; I believe it is because of the search engine settings (honestly, I don’t know what went wrong). To fix it&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Right click anywhere on the address bar in Google Chrome  &lt;/li&gt;&lt;li&gt;Select “Edit search engines…”  &lt;/li&gt;&lt;li&gt;That might show something similar to this&lt;br /&gt;&lt;a href=&#34;http://lh5.ggpht.com/-43FnHQFzsnY/UGfnsul7UdI/AAAAAAAAAyQ/q-xiajaGtMM/s1600-h/image%25255B7%25255D.png&#34;&gt;&lt;img alt=&#34;image&#34; border=&#34;0&#34; height=&#34;560&#34; src=&#34;http://lh3.ggpht.com/-_TTCDtwKgw4/UGfnuKbbNKI/AAAAAAAAAyY/FewZv7xQWyM/image_thumb%25255B2%25255D.png?imgmax=800&#34; style=&#34;background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&#34; title=&#34;image&#34; width=&#34;693&#34; /&gt;&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;If Google is the default search engine, move the cursor over any other search engine and click on “Make Default”  &lt;/li&gt;&lt;li&gt;Move the cursor over the Google’s entry and you will find a cross mark at the right end. A click on it would remove the entry. Just click on it.  &lt;/li&gt;&lt;li&gt;Now in the Other search engines section, type Google in the first two boxes and then type &lt;a href=&#34;http://www.google.com/search?hl=en&amp;amp;q=%s&#34; title=&#34;http://www.google.com/search?hl=en&amp;amp;q=%s&#34;&gt;http://www.google.com/search?hl=en&amp;amp;q=%s&lt;/a&gt; in the third box and press Enter.  &lt;/li&gt;&lt;li&gt;The Google entry would have got added to the default search settings. Make it as the default search engine.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Enjoy Google’s search service :)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;


</description>
    </item>
    
  </channel>
</rss>
