<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>1 on Praveen Lobo</title><link>https://praveenlobo.com/categories/1/</link><description>Recent content in 1 on Praveen Lobo</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 22 Nov 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://praveenlobo.com/categories/1/index.xml" rel="self" type="application/rss+xml"/><item><title>Take Pacman Warnings Seriously</title><link>https://praveenlobo.com/blog/take-pacman-warnings-seriously/</link><pubDate>Fri, 22 Nov 2024 00:00:00 +0000</pubDate><guid>https://praveenlobo.com/blog/take-pacman-warnings-seriously/</guid><description>&lt;p>Take pacman Warnings seriously esp. when kernel is upgraded!&lt;/p>
&lt;p>I have Packer and Vagrant setup to create arch Linux virtual machines. I create new VMs for various tasks and throw them out once done. I do have one or two VMs that I just keep long term. One of those VMs didn&amp;rsquo;t boot up after an update. &lt;code>pacman -Syuu&lt;/code> updated many packages and the kernel was upgraded to 6.11.8. I remember catching some warning in the corner of my eye as I was closing the terminal. I didn&amp;rsquo;t think much about it and went about my business until I tried to boot it up.&lt;/p></description></item><item><title>Hugo Static Site on GitHub - Continuous Integration/Deployment</title><link>https://praveenlobo.com/blog/hugo-static-site-github-continuous-integration-deployment/</link><pubDate>Sat, 25 Jan 2020 00:00:00 +0000</pubDate><guid>https://praveenlobo.com/blog/hugo-static-site-github-continuous-integration-deployment/</guid><description>&lt;p>&lt;em>Original post date: 2018-05-01. Edited to include &lt;a href="https://github.com/lobopraveen/praveenlobo.com/pull/63">changes made in 2020&lt;/a>. I don&amp;rsquo;t build locally anymore so the script is basically unused; however, I did update it to make it slightly better. The Travis script has been updated to make it generic. Only the environment variables need to be changed if anyone else decides to use it.&lt;/em>&lt;/p>
&lt;hr>
&lt;p>After &lt;a href="https://praveenlobo.com/blog/from-wordpress-to-a-static-site-generator/">migrating&lt;/a> the blog to Hugo and making some &lt;a href="https://praveenlobo.com/blog/hugo-static-site-on-github-customizations/">custom changes&lt;/a>, it was time to develop the CI-CD pipeline. The key objectives for my CI-CD pipeline were&lt;/p></description></item><item><title>Get Last Friday Of The Month In Java</title><link>https://praveenlobo.com/blog/get-last-friday-of-the-month-in-java/</link><pubDate>Sun, 05 Aug 2018 20:00:00 +0000</pubDate><guid>https://praveenlobo.com/blog/get-last-friday-of-the-month-in-java/</guid><description>&lt;p>Old wine in new bottle. That is what this post is except that in this case you are better off looking for new wine instead. The new bottle here being gradle, junit, GitLab-CI etc.&lt;/p>
&lt;p>If you didn&amp;rsquo;t get the point, please use &lt;code>java.time&lt;/code> or &lt;code>joda-time&lt;/code> in that order before using mine. Apparently, even &lt;code>calendar&lt;/code> has a &lt;a href="https://stackoverflow.com/a/2545695/319542">slick&lt;/a> way of doing this! Although the algorithm I outline works, the implementation suffers from the same limitations as the original &lt;code>java.util.date or calendar&lt;/code> implementation.&lt;/p></description></item><item><title>Bookmark Tool/Manager Using JavaScript And jQuery Autocomplete</title><link>https://praveenlobo.com/blog/bookmark-tool-using-javascript-and-jquery-autocomplete/</link><pubDate>Thu, 14 Jun 2018 20:00:00 +0000</pubDate><guid>https://praveenlobo.com/blog/bookmark-tool-using-javascript-and-jquery-autocomplete/</guid><description>&lt;blockquote>
&lt;p>How do you manage your bookmarks?&lt;/p>&lt;/blockquote>
&lt;p>This is a regular question usually from new team members for the past ten years or so. My answer has been the same, &amp;ldquo;I use a tool I wrote.&amp;rdquo; followed by, &amp;ldquo;I will send you a link. You can use it from there or just make a copy of your own.&amp;rdquo;&lt;/p>
&lt;p>I remember myself asking that question to others when I first started the job in mid 2000s. Most of my seniors liked to store the links in excel or a word document as we were not allowed to use any browser other than the Internet Explorer (IE) and the bookmarks in IE weren&amp;rsquo;t searchable. No tools were allowed either. This was, and in some cases still is, a common thing at workplaces in enterprises.&lt;/p></description></item><item><title>Markit EDM Classic Matcher Hands On Notes</title><link>https://praveenlobo.com/blog/markitedm-classic-matcher-hands-on-notes/</link><pubDate>Sat, 19 May 2018 23:00:00 +0000</pubDate><guid>https://praveenlobo.com/blog/markitedm-classic-matcher-hands-on-notes/</guid><description>&lt;p>&lt;a href="https://ihsmarkit.com/products/edm.html">IHS Markit&lt;/a> defines Enterprise Data Management (EDM) as&lt;/p>
&lt;blockquote>
&lt;p>EDM is a data management platform for acquiring, validating and distributing trade, operational, risk, financial and customer data. It creates a single version of the truth in a consistent, transparent and fully audited environment. Firms benefit from greater control, ongoing compliance and transparency of their data.&lt;/p>&lt;/blockquote>
&lt;p>Markit has it&amp;rsquo;s own product for Enterprise Data Management called Markit EDM. I have fairly decent exposure to this tool including passing Markit&amp;rsquo;s core introduction and advanced course. Any MEDM person worth their salt would agree that the Data Matcher is the heart of the MEDM. It is also one of the complicated components that is daunting and gets out of hand easily at which point no one wants to touch it! I had limited experience with the matcher as it was already setup by the time I came on board the project and it was being managed by a few other people. This whole post is about my hands-on with the Data Matcher to gain more experience with the component.&lt;/p></description></item><item><title>Hugo Static Site on GitHub - Customizations</title><link>https://praveenlobo.com/blog/hugo-static-site-on-github-customizations/</link><pubDate>Fri, 27 Apr 2018 13:00:00 +0000</pubDate><guid>https://praveenlobo.com/blog/hugo-static-site-on-github-customizations/</guid><description>&lt;p>While working on migrating this site from &lt;a href="https://praveenlobo.com/blog/from-wordpress-to-a-static-site-generator/">WordPress to Hugo&lt;/a>, I did tweak somethings to make it work for my liking. I usually keep things simple so that future changes are as painless as possible, however, I decided to go ahead with these changes as it improved maintainability and reverting these changes are very straight forward.&lt;/p>
&lt;h3 id="hugos-default-publish-directory">Hugo&amp;rsquo;s default publish directory&lt;/h3>
&lt;p>Hugo generates the static site content in &lt;code>public&lt;/code> directory by default. This worked fine for me when I tried hosting this site on GitHub&amp;rsquo;s &lt;code>master&lt;/code> and &lt;code>gh-pages&lt;/code> branches. The only &lt;em>problem&lt;/em> was that the actual source code and the generated content were in two repositories and that is one more than what I wanted to maintain. Using a &lt;code>submodule&lt;/code> approach worked fine, but I think it complicates the setup unnecessarily and is easy to mess up.&lt;/p></description></item><item><title>From WordPress to A Static Site Generator</title><link>https://praveenlobo.com/blog/from-wordpress-to-a-static-site-generator/</link><pubDate>Fri, 20 Apr 2018 00:00:00 +0000</pubDate><guid>https://praveenlobo.com/blog/from-wordpress-to-a-static-site-generator/</guid><description>&lt;p>I have been telling myself that I will get back into blogging &lt;a href="https://praveenlobo.com/blog/holy-crap-missing-in-action">again&lt;/a> and &lt;a href="https://praveenlobo.com/blog/what-have-i-been-up-to-this-summer">again&lt;/a> in vain. I have a bunch of drafts that I have not posted; I keep thinking about posting them and posting my views about &lt;a href="https://praveenlobo.com/tags/current-affairs/">current affairs&lt;/a> and daily life. For some reason I just can&amp;rsquo;t commit to it. I feel like I have hit this big writer&amp;rsquo;s block and I somehow don&amp;rsquo;t want to get out if it. I have been very happy with my personal as well as work life and have been spending time learning and doing things that are fulfilling. I do have a few regrets and one them is not blogging; I wish I had written more that when I looked back I could see how I have evolved over time. Anyway, I getting slightly off-topic.&lt;/p></description></item><item><title>Shell Scripts to Manipulate The File Name Extensions</title><link>https://praveenlobo.com/blog/shell-scripts-to-manipulate-the-file-name-extensions/</link><pubDate>Mon, 02 Oct 2017 20:00:00 +0000</pubDate><guid>https://praveenlobo.com/blog/shell-scripts-to-manipulate-the-file-name-extensions/</guid><description>&lt;p>&lt;small>The &lt;a href="https://github.com/lobopraveen/gists/blob/master/unix/filename_extension_manipulation.md">latest version&lt;/a> of this should be available on &lt;a href="https://github.com/lobopraveen/gists">GitHub repo&lt;/a>. Please report any issues there.&lt;/small>&lt;/p>
&lt;p>The following snippets show how to change the file name extensions on multiple files on UNIX machines. Other commands like &lt;code>rename&lt;/code> and &lt;code>mmv&lt;/code> might offer alternatives when they are available on the systems. The scripts below use &lt;a href="https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html">shell&amp;rsquo;s parameter expansion&lt;/a> to operate on multiple files.&lt;/p>
&lt;ul>
&lt;li>&lt;code>%&lt;/code> in below scripts match shortest from the end of the string.&lt;/li>
&lt;li>&lt;code>%%&lt;/code> matches longest from the end&lt;/li>
&lt;li>&lt;code>#&lt;/code> shortest from the beginning&lt;/li>
&lt;li>&lt;code>##&lt;/code> longest from the beginning&lt;/li>
&lt;/ul>
&lt;p>&lt;code>test&lt;/code> command controls if a rename should occur or not.&lt;/p></description></item><item><title>SQL Error Converting The Data Type</title><link>https://praveenlobo.com/blog/sql-error-converting-the-data-type/</link><pubDate>Fri, 21 Jul 2017 20:00:00 +0000</pubDate><guid>https://praveenlobo.com/blog/sql-error-converting-the-data-type/</guid><description>&lt;p>A team mate of mine approached me asking for help in debugging an issue that has been ongoing for a while. He mentioned that the issue with query he was dealing with was sporadic and doesn&amp;rsquo;t happen in all environments. That sounded interesting. I asked him to pull up a chair so we can go over it together.&lt;/p>
&lt;p>The problem was with a query that used to run fine for a long time and started failing a couple of weeks ago. This had caused manual work for his team each time it failed. The error was with some conversion he said.&lt;/p></description></item><item><title>Using Excel To Compare Multiple XMLs</title><link>https://praveenlobo.com/blog/using-excel-to-compare-multiple-xmls/</link><pubDate>Sun, 05 Oct 2014 00:00:00 +0000</pubDate><guid>https://praveenlobo.com/blog/using-excel-to-compare-multiple-xmls/</guid><description>&lt;p>The VBA code from &lt;a href="https://praveenlobo.com/blog/comparing-two-xmls-in-excel-vba">last post&lt;/a> explains how two XML strings that are already on the spreadsheet can be compared. This can be extended to add a search functionality to search and bring in the XML before running the comparison.&lt;/p>
&lt;h4 id="search-file">Search File:&lt;/h4>
&lt;p>To get a matching line from a file, use VBA code as shown &lt;a href="https://github.com/lobopraveen/gists/blob/master/msexcel/vba_extract_matching_line_from_a_file.vba">here&lt;/a> on the gists repo I maintain. Or just use power query as shown below and place the result in the XML cell. Note that the power query returns all matching lines as opposed to the aforementioned VBA code which returns the first occurrence. The VBA code can be edited to return multiple lines if needed.&lt;/p></description></item><item><title>Comparing Two XMLs In Excel VBA</title><link>https://praveenlobo.com/blog/comparing-two-xmls-in-excel-vba/</link><pubDate>Sat, 20 Sep 2014 00:00:00 +0000</pubDate><guid>https://praveenlobo.com/blog/comparing-two-xmls-in-excel-vba/</guid><description>&lt;p>The easiest way to compare two XML files would be to see if any available tool can do the job. My favorite compare tool to use at work is &lt;a href="https://www.scootersoftware.com/">Beyond Compare&lt;/a> - it supports folders as well as files comparison, supports multiple file formats, and has ton of options. For personal use, I prefer &lt;a href="http://meldmerge.org/">meld&lt;/a> as it is free and gets the job done.&lt;/p>
&lt;p>Although those are wonderful programs, they don&amp;rsquo;t fit every use case. Sometimes you just have to write VBA code to compare two XML &lt;em>strings&lt;/em>.&lt;/p></description></item><item><title>Remove Commas From Values in CSV File</title><link>https://praveenlobo.com/blog/remove-commas-from-values-in-csv-file/</link><pubDate>Mon, 11 Mar 2013 20:00:00 +0000</pubDate><guid>https://praveenlobo.com/blog/remove-commas-from-values-in-csv-file/</guid><description>&lt;p>&lt;small>The &lt;a href="https://github.com/lobopraveen/gists/blob/master/unix/remove_comma_from_values_in_csv_file.md">latest version&lt;/a> of this should be available on &lt;a href="https://github.com/lobopraveen/gists">GitHub repo&lt;/a>. Please report any issues there.&lt;/small>&lt;/p>
&lt;p>CSV files with values that contain commas in them is a pain if the system was built to handle the basic CSV format. This is especially true if the process that has been running for ages fails one day in production and it turns out that the file to process has a value that contains a comma in it.&lt;/p></description></item><item><title>How To Convert JavaScript Local Date to UTC And UTC To Local Date</title><link>https://praveenlobo.com/blog/how-to-convert-javascript-local-date-to-utc-and-utc-to-local-date/</link><pubDate>Tue, 27 Dec 2011 07:04:40 +0000</pubDate><guid>https://praveenlobo.com/blog/how-to-convert-javascript-local-date-to-utc-and-utc-to-local-date/</guid><description>&lt;p>DST is such a pain when it comes to programming. I wish they just get rid of it. It’d be helpful; however, the programmers will still have to deal with the timezones. I was answering questions related to the &lt;a href="https://praveenlobo.com/tags/timer/">timers&lt;/a> on this website and I keep getting a lot of questions on DST and the timezones. Even though it seems easy, this topic is very confusing. There are lot many sources on the Internet and reading them confuses the hell out of me.&lt;/p></description></item><item><title>Daylight Saving Time (DST)</title><link>https://praveenlobo.com/blog/daylight-saving-time-dst-should-be-a-part-of-our-history/</link><pubDate>Wed, 21 Dec 2011 02:03:14 +0000</pubDate><guid>https://praveenlobo.com/blog/daylight-saving-time-dst-should-be-a-part-of-our-history/</guid><description>&lt;p>I was having a conversation with a friend of mine who is convinced that the Daylight Saving Time (DST) change is good and makes perfect sense. I, for one, think that the DST is not useful anymore and it could have been avoided altogether. Just imagine if we didn’t have clocks and a way to time. We would have adjusted our lifestyles automatically to adapt to the nature. Instead of adjusting the clock, we should have adjusted the schedules.&lt;/p></description></item><item><title>Will Google Voice be free in 2012 and beyond?</title><link>https://praveenlobo.com/blog/will-google-voice-be-free-in-2012-and-beyond/</link><pubDate>Fri, 09 Dec 2011 17:41:50 +0000</pubDate><guid>https://praveenlobo.com/blog/will-google-voice-be-free-in-2012-and-beyond/</guid><description>&lt;p>From the &lt;a href="https://praveenlobo.com/blog/does-google-voice-use-minutes-or-data/">recent notes&lt;/a> I made on the Google Voice and how it uses the carrier minutes and data to operate, it should be free in 2012 and beyond.&lt;/p>
&lt;p>Why? Currently, Google Voice is not a VOIP service and it uses the carrier minutes and data to operate which means to make or receive calls the subscriber has to pay the carrier. See the image in &lt;a href="https://praveenlobo.com/blog/does-google-voice-use-minutes-or-data/">that&lt;/a> post. If Google Voice doesn&amp;rsquo;t offer VOIP service and starts charging for the voice calls, the subscriber will be &lt;em>double charged&lt;/em>. For every call made or received, the subscriber has to pay to use Google Voice and then, since Google Voice uses the carrier minutes, has to pay the carrier for using the minutes. If this is exactly how it works, it will be very difficult to justify Google Voice. I&amp;rsquo;d definitely drop Google Voice and, I think, many other will do too.&lt;/p></description></item><item><title>Does Google Voice Use Minutes or Data?</title><link>https://praveenlobo.com/blog/does-google-voice-use-minutes-or-data/</link><pubDate>Thu, 01 Dec 2011 05:55:41 +0000</pubDate><guid>https://praveenlobo.com/blog/does-google-voice-use-minutes-or-data/</guid><description>&lt;p>Does Google Voice Use Minutes or Data? Does Google Voice cost money? How does Google Voice calling or texting work? The answer is Yes, Yes, and I don&amp;rsquo;t know.&lt;/p>
&lt;p>&lt;em>Update: See &lt;a href="https://support.google.com/voice/answer/115063?hl=en">this&lt;/a> for more info&lt;/em>&lt;/p>
&lt;p>Google Voice is an awesome idea and piece of software (if you are willing to give away more self information to Google than you already have). It is not a VOIP service like Google Talk; it is a call management service. It will always cost you money in one way or the other (cellular minutes or data) and you will not be able to make free calls. If you consider cellular data to be free or use wifi, there are workarounds to make it free like using Talkatone or GrooVe IP or other third party apps. These applications use Google Talk free calling feature (VOIP) along with Google Voice, which integrates with Google Talk, to make free calls using only data. Keep in mind that by using more services, you are distributing your own information all over the Internet companies.&lt;/p></description></item><item><title>Java: Get Sub List of Elements between two elements (instead of indexes) in a List</title><link>https://praveenlobo.com/blog/java-get-sub-list-of-elements-between-two-elements-instead-of-indexes-in-a-list/</link><pubDate>Tue, 25 Oct 2011 04:51:59 +0000</pubDate><guid>https://praveenlobo.com/blog/java-get-sub-list-of-elements-between-two-elements-instead-of-indexes-in-a-list/</guid><description>&lt;p>&lt;small>Update: moved the code to &lt;a href="https://github.com/lobopraveen/Java-betterSublist">github&lt;/a>&lt;/small>&lt;/p>
&lt;p>Java List APIs provides a way to get the elements (sub-list) in a List between two indexes using &lt;code>List subList(int fromIndex, int toIndex)&lt;/code>. However, there is no API to get the elements in a List between two list elements &lt;code>List subList(Object fromElement, Object toElement)&lt;/code>. The following code is an example to get the elements (sub-list) &amp;ldquo;between two list elements&amp;rdquo;. This works even if the given element doesn&amp;rsquo;t exist in the List - imagine a list of items with different prices and a sub-list of items between price X and price Y when, say, there are no items with price X or Y.&lt;/p></description></item><item><title>It Needs A Genius To Understand The Simplicity</title><link>https://praveenlobo.com/blog/it-needs-a-genius-to-understand-the-simplicity-r-i-p-dennis-ritchie/</link><pubDate>Fri, 14 Oct 2011 02:41:54 +0000</pubDate><guid>https://praveenlobo.com/blog/it-needs-a-genius-to-understand-the-simplicity-r-i-p-dennis-ritchie/</guid><description>&lt;p>U changed the world; it is because of the people like you we C the world the way it is today. You didn&amp;rsquo;t make billions, but billionaires. You have such an impact not only on those who lived in your lifetime, but also on those who are yet to C the light of the day. Your influence is ubiquitous. The mankind will forever be grateful to you.&lt;/p>
&lt;p>R.I.P. Dennis Ritchie.&lt;/p></description></item><item><title>A couple of ways to tokenize a delimited String in Java</title><link>https://praveenlobo.com/blog/a-couple-of-ways-to-tokenize-a-delimited-string-in-java/</link><pubDate>Fri, 12 Aug 2011 03:54:41 +0000</pubDate><guid>https://praveenlobo.com/blog/a-couple-of-ways-to-tokenize-a-delimited-string-in-java/</guid><description>&lt;h4 id="stringtokenizer">StringTokenizer:&lt;/h4>
&lt;p>It is a legacy class and its use is discouraged in new code. I don&amp;rsquo;t like to use this class even if it weren&amp;rsquo;t a legacy class because it ignores blank tokens. Below code will not output the blank(&amp;quot;&amp;quot;) between &lt;em>A&lt;/em> and &lt;em>In&lt;/em> and the last blank token after &lt;em>Me&lt;/em>.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-Java" data-lang="Java">&lt;span style="display:flex;">&lt;span>StringTokenizer st &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">new&lt;/span> StringTokenizer(&lt;span style="color:#e6db74">&amp;#34;I,Have,A,,In,Me,&amp;#34;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;,&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">while&lt;/span> (st.&lt;span style="color:#a6e22e">hasMoreTokens&lt;/span>()) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>	System.&lt;span style="color:#a6e22e">out&lt;/span>.&lt;span style="color:#a6e22e">println&lt;/span>(st.&lt;span style="color:#a6e22e">nextToken&lt;/span>());
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="split-method">split method:&lt;/h4>
&lt;p>Javadoc suggests &lt;code>split&lt;/code> method of &lt;code>String&lt;/code> or the &lt;code>java.util.regex&lt;/code> package as alternatives. The split method returns the blank tokens in-between two tokens; however, the last blank token(after &lt;em>Me&lt;/em>) will still be missing. We need some extra code to get the last token.&lt;/p></description></item><item><title>How to scroll elements smoothly in JavaScript/jQuery</title><link>https://praveenlobo.com/blog/how-to-scroll-elements-smoothly-in-javascript-jquery-without-plugins/</link><pubDate>Thu, 11 Aug 2011 02:08:01 +0000</pubDate><guid>https://praveenlobo.com/blog/how-to-scroll-elements-smoothly-in-javascript-jquery-without-plugins/</guid><description>&lt;p>There are multitude of ways to scroll the page to bring certain elements to view through code. A few of them below. The code given below can be used to scroll any element with an ID on the page. The &lt;a href="https://praveenlobo.com/media/26-50/38-scroll/ScrollDemo.html">demo&lt;/a> scrolls the page as well as the contents of a &lt;code>DIV&lt;/code> and bring an element to view. These methods also use jQuery&amp;rsquo;s &lt;code>animate()&lt;/code> method. To best view the code in action click on RESET before clicking on the buttons.&lt;/p></description></item><item><title>Comments are beautiful</title><link>https://praveenlobo.com/blog/comments-are-beautiful/</link><pubDate>Wed, 10 Aug 2011 12:57:52 +0000</pubDate><guid>https://praveenlobo.com/blog/comments-are-beautiful/</guid><description>&lt;p>Knowing what the hell you are doing is very important and in the world of programming, letting others know what the hell you are doing is just as important.&lt;/p>
&lt;p>We, at least some of us, code for a living. We cannot support it forever. We might change profession, move on to a &amp;lsquo;grass is greener&amp;rsquo; place, worst yet we might not exist at all! There will always be another person working on our code, making a living trying to fix the issues (that we thought will never exist), making it better suite the &amp;lsquo;current world&amp;rsquo;.&lt;/p></description></item><item><title>WordPress: Moving Some Old Posts To A New Blog</title><link>https://praveenlobo.com/blog/wordpress-moving-some-old-posts-to-a-new-blog/</link><pubDate>Wed, 10 Aug 2011 05:16:33 +0000</pubDate><guid>https://praveenlobo.com/blog/wordpress-moving-some-old-posts-to-a-new-blog/</guid><description>&lt;p>I recently moved a bunch of blog posts to a new blog installation. This wasn&amp;rsquo;t necessary but just an exercise to learn what it takes to move the posts. It was easy after a lot of reading. Here is a checklist I prepared. Hope it helps someone looking for similar stuff. Comments and suggestions are welcome. Use it at your own risk!&lt;/p>
&lt;hr>
&lt;ol>
&lt;li>
&lt;p>&lt;strong>WordPress:&lt;/strong> Install WordPress.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Plugins:&lt;/strong> Install necessary plugins. Enable all of them and set them up. Some plugins do provide an option to import/export settings. Export settings from old blog to a file and replace all occurrences of old blog URL to new blog if needed.&lt;/p></description></item><item><title>Why Are Comments Important?</title><link>https://praveenlobo.com/blog/why-are-comments-important/</link><pubDate>Wed, 10 Aug 2011 03:04:53 +0000</pubDate><guid>https://praveenlobo.com/blog/why-are-comments-important/</guid><description>&lt;p>Around three months ago, I was shocked looking at some newly added code in one of our applications. It was naked. Not a single line of comment whatsoever!! I asked the person who wrote it to explain the code and it turned out that the code is indeed very cleverly written. I&amp;rsquo;d rate the code as top notch if only it had comments. When I demanded an explanation, it turned out that he thinks commenting is an utterly boring task. We had a small chat and after explaining how difficult it is to maintain the code without comments, he agreed to add comments, albeit reluctantly. I saved a copy of the code before he added comments.&lt;/p></description></item><item><title>HTML SELECT/Dropdown with JavaScript/jQuery</title><link>https://praveenlobo.com/blog/html-select-dropdown-with-javascript-jquery/</link><pubDate>Fri, 05 Aug 2011 03:54:08 +0000</pubDate><guid>https://praveenlobo.com/blog/html-select-dropdown-with-javascript-jquery/</guid><description>&lt;p>A list of commonly needed operations on HTML SELECT/Dropdown using JavaScript/jQuery. Let me know if you find it useful or if you have additions/suggestions to improve the list.&lt;/p>
&lt;h3 id="javascript">JavaScript&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-JavaScript" data-lang="JavaScript">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// get the element
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">dd&lt;/span> &lt;span style="color:#f92672">=&lt;/span> document.&lt;span style="color:#a6e22e">getElementById&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;dropdown&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Get the total number of options
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">length&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Get the index of selected option
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">selectedIndex&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// get the value of selected option 
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">options&lt;/span>[&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">selectedIndex&lt;/span>].&lt;span style="color:#a6e22e">value&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Get the selected option/text
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">options&lt;/span>[&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">selectedIndex&lt;/span>].&lt;span style="color:#a6e22e">text&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Reset the dropdoown option; select first option
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">selectedIndex&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Reset the dropdoown option; select last option 
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">selectedIndex&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">length&lt;/span>&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">1&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Create and attach an option dynamically
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">newOption&lt;/span> &lt;span style="color:#f92672">=&lt;/span> document.&lt;span style="color:#a6e22e">createElement&lt;/span>(&lt;span style="color:#e6db74">&amp;#39;option&amp;#39;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// create option/text
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">newOption&lt;/span>.&lt;span style="color:#a6e22e">text&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;new option&amp;#34;&lt;/span>; 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// create option value
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">newOption&lt;/span>.&lt;span style="color:#a6e22e">value&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;new value&amp;#34;&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// attach the option to the dropdown
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">options&lt;/span>[&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">options&lt;/span>.&lt;span style="color:#a6e22e">length&lt;/span>] &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#a6e22e">newOption&lt;/span>; 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Create and attach an option dynamically
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">options&lt;/span>[&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">options&lt;/span>.&lt;span style="color:#a6e22e">length&lt;/span>] &lt;span style="color:#f92672">=&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">new&lt;/span> &lt;span style="color:#a6e22e">Option&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;new option&amp;#34;&lt;/span>,&lt;span style="color:#e6db74">&amp;#34;new value&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Create and attach an option dynamically
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">add&lt;/span>(&lt;span style="color:#66d9ef">new&lt;/span> &lt;span style="color:#a6e22e">Option&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;new option 2&amp;#34;&lt;/span>,&lt;span style="color:#e6db74">&amp;#34;new value 2&amp;#34;&lt;/span>));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Remove all options from the dropdown
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">length&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Remove all options from the dropdown
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">options&lt;/span>.&lt;span style="color:#a6e22e">length&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Remove the first option from the dropdown
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">remove&lt;/span>(&lt;span style="color:#ae81ff">0&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Remove the last option from the dropdown
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">remove&lt;/span>(&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">options&lt;/span>.&lt;span style="color:#a6e22e">length&lt;/span>&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">1&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Remove the last option from the dropdown
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">remove&lt;/span>(&lt;span style="color:#a6e22e">dd&lt;/span>.&lt;span style="color:#a6e22e">length&lt;/span>&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">1&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Remove the dropdown/select element.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// ParentID must be an ID of the parent element.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>document.&lt;span style="color:#a6e22e">getElementById&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;ParentID&amp;#34;&lt;/span>).&lt;span style="color:#a6e22e">removeChild&lt;/span>(&lt;span style="color:#a6e22e">dd&lt;/span>);&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h3 id="jquery">jQuery&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-JavaScript" data-lang="JavaScript">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Reset the dropdoown option; select first option
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">$&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;#dropdown&amp;#34;&lt;/span>).&lt;span style="color:#a6e22e">prop&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;selectedIndex&amp;#34;&lt;/span>,&lt;span style="color:#ae81ff">0&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Reset the options on all SELECT/Drodown elements.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">$&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;select&amp;#34;&lt;/span>).&lt;span style="color:#a6e22e">each&lt;/span>(&lt;span style="color:#66d9ef">function&lt;/span>(){
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">$&lt;/span>(&lt;span style="color:#66d9ef">this&lt;/span>).&lt;span style="color:#a6e22e">find&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;option:first&amp;#34;&lt;/span>).&lt;span style="color:#a6e22e">prop&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;selected&amp;#34;&lt;/span>,&lt;span style="color:#e6db74">&amp;#34;selected&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}); 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Reset the options on all SELECT/Drodown
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// elements to last option
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">$&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;select&amp;#34;&lt;/span>).&lt;span style="color:#a6e22e">each&lt;/span>(&lt;span style="color:#66d9ef">function&lt;/span>(){
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">$&lt;/span>(&lt;span style="color:#66d9ef">this&lt;/span>).&lt;span style="color:#a6e22e">val&lt;/span>(&lt;span style="color:#a6e22e">$&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;option:last&amp;#34;&lt;/span>,&lt;span style="color:#66d9ef">this&lt;/span>).&lt;span style="color:#a6e22e">val&lt;/span>());
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}); 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Get the value of the selected option/text
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">$&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;#dropdown&amp;#34;&lt;/span>).&lt;span style="color:#a6e22e">val&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Get the index of selected option
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">$&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;#dropdown&amp;#34;&lt;/span>).&lt;span style="color:#a6e22e">prop&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;selectedIndex&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Get the selected text
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">$&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;#dropdown option:selected&amp;#34;&lt;/span>).&lt;span style="color:#a6e22e">text&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Get ALL text in the SELECT element; space separated
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">$&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;#dropdown&amp;#34;&lt;/span>).&lt;span style="color:#a6e22e">text&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Select an option with value
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// selects the option with value=&amp;#34;value-2&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">$&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;#dropdown&amp;#34;&lt;/span>).&lt;span style="color:#a6e22e">val&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;value-2&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Add an option
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">$&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;#dropdown&amp;#34;&lt;/span>).&lt;span style="color:#a6e22e">append&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;&amp;lt;OPTION value=&amp;#34;&lt;/span>&lt;span style="color:#a6e22e">value&lt;/span>&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#66d9ef">new&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&amp;gt;option-new&amp;lt;/OPTION&amp;gt;&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Remove the last option from SELECT
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">$&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;#dropdown option:last&amp;#34;&lt;/span>).&lt;span style="color:#a6e22e">remove&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Remove all options from SELECT
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">$&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;#dropdown option&amp;#34;&lt;/span>).&lt;span style="color:#a6e22e">remove&lt;/span>()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Remove the SELECT element from DOM
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">$&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;#dropdown&amp;#34;&lt;/span>).&lt;span style="color:#a6e22e">remove&lt;/span>()&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>O_ops: You have no null items</title><link>https://praveenlobo.com/blog/oops-you-have-no-null-items-google-reader/</link><pubDate>Wed, 03 Aug 2011 13:22:37 +0000</pubDate><guid>https://praveenlobo.com/blog/oops-you-have-no-null-items-google-reader/</guid><description>&lt;p>I was browsing through my RSS subscriptions on Google Reader when it confirmed that I have no &lt;code>null&lt;/code> items.&lt;/p>
&lt;div class='align-center'>
 &lt;figure>&lt;img src="https://praveenlobo.com/media/26-50/36-oops/Google%20Err%20Msg.jpg"
 alt="Google Reader - null items">&lt;figcaption>
 &lt;p>Google Reader - null items&lt;/p>
 &lt;/figcaption>
&lt;/figure>
&lt;/div></description></item><item><title>Penny Auction Sites Auto Bidding Script (Sniper)</title><link>https://praveenlobo.com/blog/penny-auction-sites-auto-bidding-script-sniper-how-to-building-and-using-the-script/</link><pubDate>Sat, 30 Jul 2011 23:24:11 +0000</pubDate><guid>https://praveenlobo.com/blog/penny-auction-sites-auto-bidding-script-sniper-how-to-building-and-using-the-script/</guid><description>&lt;p>Part I and II of this post series can be found &lt;a href="https://praveenlobo.com/blog/penny-auction-sites-auto-bidding-script-bid-sniper-how-to-introduction/">here&lt;/a> and &lt;a href="https://praveenlobo.com/blog/penny-auction-sites-auto-bidding-script-sniper-how-to-requirements-preparation/">here&lt;/a> respectively.&lt;/p>
&lt;hr>
&lt;h4 id="5-build-the-script">5. Build the script:&lt;/h4>
&lt;p>Assume that the HTML skeleton given in &lt;a href="https://praveenlobo.com/blog/penny-auction-sites-auto-bidding-script-sniper-how-to-requirements-preparation/">previous post&lt;/a> is indeed the code and when the bid ends the timer gets a class called &lt;code>BIDEND&lt;/code>. Finally, say the code used by the site to place a bid is &lt;code>PennyAuction.placeBid(itemCode);&lt;/code>. With this information build a script.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-JavaScript" data-lang="JavaScript">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Get the codes from the user
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Note : If it&amp;#39;s integer then parseInt method can be used around the prompt.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">itemCode&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#a6e22e">prompt&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Please enter the item code:&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">lowPrice&lt;/span> &lt;span style="color:#f92672">=&lt;/span> parseInt(&lt;span style="color:#a6e22e">prompt&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Please enter the price at which you want to start bidding:&amp;#34;&lt;/span>), &lt;span style="color:#ae81ff">10&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">highPrice&lt;/span> &lt;span style="color:#f92672">=&lt;/span> parseInt(&lt;span style="color:#a6e22e">prompt&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Please enter the price at which you want to stop bidding:&amp;#34;&lt;/span>), &lt;span style="color:#ae81ff">10&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">maxBids&lt;/span> &lt;span style="color:#f92672">=&lt;/span> parseInt(&lt;span style="color:#a6e22e">prompt&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Please enter the maximum number of bids you want to place:&amp;#34;&lt;/span>), &lt;span style="color:#ae81ff">10&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">secondsToPlaceBid&lt;/span> &lt;span style="color:#f92672">=&lt;/span> parseInt(&lt;span style="color:#a6e22e">prompt&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Please enter the remaining time below which a bid should be placed:&amp;#34;&lt;/span>), &lt;span style="color:#ae81ff">10&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Build the identifiers
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">who&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#e6db74">&amp;#34;Winning_&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#a6e22e">itemCode&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">priceID&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#e6db74">&amp;#34;Price_&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#a6e22e">itemCode&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">timerID&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#e6db74">&amp;#34;Timer_&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#a6e22e">itemCode&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">/*
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"> * This method places a bid if the item is in the price range if the timer goes below
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"> * &amp;#34;secondsToPlaceBid&amp;#34; and if the maximum number of bids has not been reached.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"> *
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"> * Note that the &amp;#34;BIDEND&amp;#34; and the &amp;#34;USERNAME&amp;#34; needs to be updated for the site in question.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"> *
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"> */&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">function&lt;/span> &lt;span style="color:#a6e22e">placeBid&lt;/span>() {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (document.&lt;span style="color:#a6e22e">getElementsByClassName&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;BIDEND&amp;#34;&lt;/span>).&lt;span style="color:#a6e22e">length&lt;/span> &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e">// The bid ended; stop bidding.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> &lt;span style="color:#66d9ef">return&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e">// Get the price; strip $ sign
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> &lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">currPrice&lt;/span> &lt;span style="color:#f92672">=&lt;/span> parseInt((document.&lt;span style="color:#a6e22e">getElementById&lt;/span>(&lt;span style="color:#a6e22e">priceID&lt;/span>).&lt;span style="color:#a6e22e">innerHTML&lt;/span>.&lt;span style="color:#a6e22e">substring&lt;/span>(&lt;span style="color:#ae81ff">1&lt;/span>)),&lt;span style="color:#ae81ff">10&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (&lt;span style="color:#a6e22e">currPrice&lt;/span> &lt;span style="color:#f92672">&amp;lt;=&lt;/span> &lt;span style="color:#a6e22e">lowPrice&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e">// Price limit not reached; wake up just in time for next bid
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> &lt;span style="color:#a6e22e">setTimeout&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;placeBid()&amp;#34;&lt;/span>, &lt;span style="color:#ae81ff">8000&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (document.&lt;span style="color:#a6e22e">getElementById&lt;/span>(&lt;span style="color:#a6e22e">who&lt;/span>).&lt;span style="color:#a6e22e">innerHTML&lt;/span> &lt;span style="color:#f92672">!=&lt;/span> &lt;span style="color:#e6db74">&amp;#34;USERNAME&amp;#34;&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e">// You are not the current bidder
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (&lt;span style="color:#a6e22e">maxBids&lt;/span> &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">alert&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;All of the allocated bids have been placed!&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (&lt;span style="color:#a6e22e">currPrice&lt;/span> &lt;span style="color:#f92672">&amp;gt;&lt;/span> &lt;span style="color:#a6e22e">highPrice&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">alert&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Price of the item has exceeded the high price set!&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">secondsRemaining&lt;/span> &lt;span style="color:#f92672">=&lt;/span> parseInt(document.&lt;span style="color:#a6e22e">getElementById&lt;/span>(&lt;span style="color:#a6e22e">timerID&lt;/span>).&lt;span style="color:#a6e22e">innerHTML&lt;/span>.&lt;span style="color:#a6e22e">split&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;:&amp;#34;&lt;/span>)[&lt;span style="color:#ae81ff">2&lt;/span>], &lt;span style="color:#ae81ff">10&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (&lt;span style="color:#a6e22e">secondsRemaining&lt;/span> &lt;span style="color:#f92672">&amp;lt;&lt;/span> &lt;span style="color:#a6e22e">secondsToPlaceBid&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e">// Time to place a bid; update counter &amp;amp; wake up just in time for next bid
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> &lt;span style="color:#a6e22e">PennyAuction&lt;/span>.&lt;span style="color:#a6e22e">placeBid&lt;/span>(&lt;span style="color:#a6e22e">itemCode&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">maxBids&lt;/span> &lt;span style="color:#f92672">=&lt;/span> (&lt;span style="color:#a6e22e">maxBids&lt;/span> &lt;span style="color:#f92672">-&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">setTimeout&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;placeBid()&amp;#34;&lt;/span>, &lt;span style="color:#ae81ff">8000&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> } &lt;span style="color:#66d9ef">else&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e">// Enough time left; wake up later to try
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> &lt;span style="color:#a6e22e">setTimeout&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;placeBid()&amp;#34;&lt;/span>, &lt;span style="color:#ae81ff">500&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> } &lt;span style="color:#66d9ef">else&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e">// You are the current bidder; wake up just in time for next bid(if exists)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> &lt;span style="color:#a6e22e">setTimeout&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;placeBid()&amp;#34;&lt;/span>, &lt;span style="color:#ae81ff">8000&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Call the method defined above to take care of the dirty business
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#a6e22e">placeBid&lt;/span>();&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>This is it. This code should do the trick; Note that &lt;code>BIDEND&lt;/code>, &lt;code>USERNAME&lt;/code> and &lt;code>PennyAuction.placeBid(itemCode);&lt;/code> needs to be updated with respect to the auction site in question.&lt;/p></description></item><item><title>Penny Auction Sites Auto Bidding Script (Sniper)</title><link>https://praveenlobo.com/blog/penny-auction-sites-auto-bidding-script-sniper-how-to-requirements-preparation/</link><pubDate>Sat, 30 Jul 2011 18:26:40 +0000</pubDate><guid>https://praveenlobo.com/blog/penny-auction-sites-auto-bidding-script-sniper-how-to-requirements-preparation/</guid><description>&lt;p>Part I of this post series can be found &lt;a href="https://praveenlobo.com/blog/penny-auction-sites-auto-bidding-script-bid-sniper-how-to-introduction/">here&lt;/a>.&lt;/p>
&lt;hr>
&lt;h4 id="3-requirements-for-the-script">3. Requirements for the script:&lt;/h4>
&lt;ol>
&lt;li>
&lt;p>The script shall have a lower limit to start bidding i.e. the script should not start bidding if the actual price in the bid hasn&amp;rsquo;t crossed a set limit.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The script shall have an upper limit to bidding i.e. it shall stop bidding if the bid price crosses certain limit.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The script shall bid a fixed number of times i.e. the script shall stop bidding if the total number bids placed by it exceeds a preset number even if the upper limit has not been reached.&lt;/p></description></item><item><title>Penny Auction Sites Auto Bidding Script (Bid Sniper)</title><link>https://praveenlobo.com/blog/penny-auction-sites-auto-bidding-script-bid-sniper-how-to-introduction/</link><pubDate>Wed, 27 Jul 2011 04:11:36 +0000</pubDate><guid>https://praveenlobo.com/blog/penny-auction-sites-auto-bidding-script-bid-sniper-how-to-introduction/</guid><description>&lt;p>I wrote a prologue to penny auction sites &lt;a href="https://praveenlobo.com/blog/penny-auction-sites/">beginning of this year&lt;/a>, but never posted the bot script I promised I would! I didn&amp;rsquo;t because I didn&amp;rsquo;t want others to lose money, but shouldn&amp;rsquo;t one use his own judgment before using any advice found on the Internet? Before anything else I would like to warn you - use the information found here at your own risk. I shall not be held liable for any damage - monetary or otherwise. Also, this will not guarantee winning; the auction sites are built smart enough to cheat most users and pick winners rarely and randomly!&lt;/p></description></item><item><title>O_ops: Better Logging To Solve Problems</title><link>https://praveenlobo.com/blog/oops-better-logging-to-solve-problems/</link><pubDate>Wed, 13 Jul 2011 03:52:23 +0000</pubDate><guid>https://praveenlobo.com/blog/oops-better-logging-to-solve-problems/</guid><description>&lt;p>Logging helps in pinpointing the code block that threw an error. Only if they are used correctly. During once such failure, a guy noticed that a script lacked logging and ever promptly promoted the updated script with better logging. A part of the script is shown below.&lt;/p>
&lt;p>Script before:
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>1&amp;gt;&amp;gt;&lt;span style="color:#e6db74">${&lt;/span>LOG&lt;span style="color:#e6db74">}&lt;/span> 2&amp;gt;&amp;gt;&lt;span style="color:#e6db74">${&lt;/span>ERRLOG&lt;span style="color:#e6db74">}&lt;/span> &lt;span style="color:#e6db74">${&lt;/span>BINPATH&lt;span style="color:#e6db74">}&lt;/span>/&lt;span style="color:#e6db74">${&lt;/span>PROGRAMNAME&lt;span style="color:#e6db74">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">if&lt;/span> &lt;span style="color:#f92672">[&lt;/span> $? -ne &lt;span style="color:#ae81ff">0&lt;/span> &lt;span style="color:#f92672">]&lt;/span>; &lt;span style="color:#66d9ef">then&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print &lt;span style="color:#e6db74">&amp;#34;ERROR: Something failed&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> exit &lt;span style="color:#ae81ff">101&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">fi&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/p>
&lt;p>Script after:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>1&amp;gt;&amp;gt;&lt;span style="color:#e6db74">${&lt;/span>LOG&lt;span style="color:#e6db74">}&lt;/span> 2&amp;gt;&amp;gt;&lt;span style="color:#e6db74">${&lt;/span>ERRLOG&lt;span style="color:#e6db74">}&lt;/span> &lt;span style="color:#e6db74">${&lt;/span>BINPATH&lt;span style="color:#e6db74">}&lt;/span>/&lt;span style="color:#e6db74">${&lt;/span>PROGRAMNAME&lt;span style="color:#e6db74">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>echo &lt;span style="color:#e6db74">&amp;#34;Program completed successfully.&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">if&lt;/span> &lt;span style="color:#f92672">[&lt;/span> $? -ne &lt;span style="color:#ae81ff">0&lt;/span> &lt;span style="color:#f92672">]&lt;/span>; &lt;span style="color:#66d9ef">then&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print &lt;span style="color:#e6db74">&amp;#34;ERROR: Something failed&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> exit &lt;span style="color:#ae81ff">101&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">fi&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>The change made it a &amp;ldquo;better&amp;rdquo; script for sure - it never failed again!&lt;/p></description></item><item><title>Why I choose to go against using WordPress Multisite?</title><link>https://praveenlobo.com/blog/why-i-choose-to-go-against-using-wordpress-multisite/</link><pubDate>Sat, 09 Jul 2011 07:58:39 +0000</pubDate><guid>https://praveenlobo.com/blog/why-i-choose-to-go-against-using-wordpress-multisite/</guid><description>&lt;p>When you start out with the WordPress, it&amp;rsquo;s common to assume that each blog needs a separate WordPress installation. But there&amp;rsquo;s a simpler way. WordPress Multisite installation. This lets one have different blogs with just one installation of WordPress. But, why did I choose not to use it?&lt;/p>
&lt;h3 id="advantges-and-disadvantages-of-wordpress-multisite">Advantges and Disadvantages of WordPress Multisite&lt;/h3>
&lt;h4 id="advantages">Advantages:&lt;/h4>
&lt;ol>
&lt;li>
&lt;p>The multisite blogs have all features of a regular blog with just one installation i.e only one database and one set of code-base. Easy to back-up all blogs.&lt;/p></description></item><item><title>JavaScript CountUp/CountDown Timer</title><link>https://praveenlobo.com/blog/javascript-countup-countdown-timer/</link><pubDate>Mon, 27 Jun 2011 20:57:51 +0000</pubDate><guid>https://praveenlobo.com/blog/javascript-countup-countdown-timer/</guid><description>&lt;p>&lt;em>This might be the last one in the JavaScript Counter posts unless I make all-in-one script or a jQuery plugin off of these scripts.&lt;/em>&lt;/p>
&lt;p>This counter acts as a count down as well as count up timer. As soon as the count down goes to 0 i.e. the future date is hit, the counter turns into a count up timer and keeps going. This counter takes a date to count the time to, an ID to put the timer in. It is possible to have more than one timer on a page. &lt;a href="https://praveenlobo.com/media/00-25/06-counters-demo/counter-demo.html">Demo page&lt;/a>.&lt;/p></description></item><item><title>JavaScript CountDown Timer</title><link>https://praveenlobo.com/blog/javascript-countdown-timer/</link><pubDate>Mon, 27 Jun 2011 06:44:13 +0000</pubDate><guid>https://praveenlobo.com/blog/javascript-countdown-timer/</guid><description>&lt;p>This counter takes a date to count the time to, an ID to put the timer in. It is possible to have more than one timer on a page. &lt;a href="https://praveenlobo.com/media/00-25/06-counters-demo/countdown-demo.html">Demo page&lt;/a>.&lt;/p>
&lt;p>As soon as the count down goes to 0 i.e. the future date is hit, the counter stops at 0 years 0 months 0 days 00 hours 00 minutes 00 seconds.&lt;/p>
&lt;p>Please do leave me a comment. Thanks!&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-JavaScript" data-lang="JavaScript">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">/**********************************************************************************************
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># MIT License
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Copyright (c) 2011 Praveen Lobo (praveenlobo.com)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Permission is hereby granted, free of charge, to any person obtaining a copy
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># of this software and associated documentation files (the &amp;#34;Software&amp;#34;), to deal
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># in the Software without restriction, including without limitation the rights
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># copies of the Software, and to permit persons to whom the Software is
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># furnished to do so, subject to the following conditions:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># The above copyright notice and this permission notice shall be included in all
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># copies or substantial portions of the Software.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># THE SOFTWARE IS PROVIDED &amp;#34;AS IS&amp;#34;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># SOFTWARE.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">**********************************************************************************************/&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">function&lt;/span> &lt;span style="color:#a6e22e">CountDown&lt;/span>(&lt;span style="color:#a6e22e">initDate&lt;/span>, &lt;span style="color:#a6e22e">id&lt;/span>){
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">endDate&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">new&lt;/span> Date(&lt;span style="color:#a6e22e">initDate&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">countainer&lt;/span> &lt;span style="color:#f92672">=&lt;/span> document.&lt;span style="color:#a6e22e">getElementById&lt;/span>(&lt;span style="color:#a6e22e">id&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">numOfDays&lt;/span> &lt;span style="color:#f92672">=&lt;/span> [ &lt;span style="color:#ae81ff">31&lt;/span>, &lt;span style="color:#ae81ff">28&lt;/span>, &lt;span style="color:#ae81ff">31&lt;/span>, &lt;span style="color:#ae81ff">30&lt;/span>, &lt;span style="color:#ae81ff">31&lt;/span>, &lt;span style="color:#ae81ff">30&lt;/span>, &lt;span style="color:#ae81ff">31&lt;/span>, &lt;span style="color:#ae81ff">31&lt;/span>, &lt;span style="color:#ae81ff">30&lt;/span>, &lt;span style="color:#ae81ff">31&lt;/span>, &lt;span style="color:#ae81ff">30&lt;/span>, &lt;span style="color:#ae81ff">31&lt;/span> ];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">borrowed&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>, &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">years&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>, &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">months&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>, &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">days&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">hours&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>, &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">minutes&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>, &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">seconds&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">updateNumOfDays&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">updateCounter&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">CountDown&lt;/span>.&lt;span style="color:#a6e22e">prototype&lt;/span>.&lt;span style="color:#a6e22e">updateNumOfDays&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#66d9ef">function&lt;/span>(){
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">dateNow&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">new&lt;/span> Date();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">currYear&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#a6e22e">dateNow&lt;/span>.&lt;span style="color:#a6e22e">getFullYear&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> ( (&lt;span style="color:#a6e22e">currYear&lt;/span> &lt;span style="color:#f92672">%&lt;/span> &lt;span style="color:#ae81ff">4&lt;/span> &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span> &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span> &lt;span style="color:#a6e22e">currYear&lt;/span> &lt;span style="color:#f92672">%&lt;/span> &lt;span style="color:#ae81ff">100&lt;/span> &lt;span style="color:#f92672">!=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span> ) &lt;span style="color:#f92672">||&lt;/span> &lt;span style="color:#a6e22e">currYear&lt;/span> &lt;span style="color:#f92672">%&lt;/span> &lt;span style="color:#ae81ff">400&lt;/span> &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span> ) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">numOfDays&lt;/span>[&lt;span style="color:#ae81ff">1&lt;/span>] &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">29&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">self&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">setTimeout&lt;/span>(&lt;span style="color:#66d9ef">function&lt;/span>(){&lt;span style="color:#a6e22e">self&lt;/span>.&lt;span style="color:#a6e22e">updateNumOfDays&lt;/span>();}, (&lt;span style="color:#66d9ef">new&lt;/span> Date((&lt;span style="color:#a6e22e">currYear&lt;/span>&lt;span style="color:#f92672">+&lt;/span>&lt;span style="color:#ae81ff">1&lt;/span>), &lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">2&lt;/span>) &lt;span style="color:#f92672">-&lt;/span> &lt;span style="color:#a6e22e">dateNow&lt;/span>));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">CountDown&lt;/span>.&lt;span style="color:#a6e22e">prototype&lt;/span>.&lt;span style="color:#a6e22e">datePartDiff&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#66d9ef">function&lt;/span>(&lt;span style="color:#a6e22e">then&lt;/span>, &lt;span style="color:#a6e22e">now&lt;/span>, &lt;span style="color:#a6e22e">MAX&lt;/span>){
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">diff&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#a6e22e">now&lt;/span> &lt;span style="color:#f92672">-&lt;/span> &lt;span style="color:#a6e22e">then&lt;/span> &lt;span style="color:#f92672">-&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">borrowed&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">borrowed&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> ( &lt;span style="color:#a6e22e">diff&lt;/span> &lt;span style="color:#f92672">&amp;gt;&lt;/span> &lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">1&lt;/span> ) &lt;span style="color:#66d9ef">return&lt;/span> &lt;span style="color:#a6e22e">diff&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">borrowed&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> (&lt;span style="color:#a6e22e">MAX&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#a6e22e">diff&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">CountDown&lt;/span>.&lt;span style="color:#a6e22e">prototype&lt;/span>.&lt;span style="color:#a6e22e">calculate&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#66d9ef">function&lt;/span>(){
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">futureDate&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">endDate&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">currDate&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">new&lt;/span> Date();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">seconds&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">datePartDiff&lt;/span>(&lt;span style="color:#a6e22e">currDate&lt;/span>.&lt;span style="color:#a6e22e">getSeconds&lt;/span>(), &lt;span style="color:#a6e22e">futureDate&lt;/span>.&lt;span style="color:#a6e22e">getSeconds&lt;/span>(), &lt;span style="color:#ae81ff">60&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">minutes&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">datePartDiff&lt;/span>(&lt;span style="color:#a6e22e">currDate&lt;/span>.&lt;span style="color:#a6e22e">getMinutes&lt;/span>(), &lt;span style="color:#a6e22e">futureDate&lt;/span>.&lt;span style="color:#a6e22e">getMinutes&lt;/span>(), &lt;span style="color:#ae81ff">60&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">hours&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">datePartDiff&lt;/span>(&lt;span style="color:#a6e22e">currDate&lt;/span>.&lt;span style="color:#a6e22e">getHours&lt;/span>(), &lt;span style="color:#a6e22e">futureDate&lt;/span>.&lt;span style="color:#a6e22e">getHours&lt;/span>(), &lt;span style="color:#ae81ff">24&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">days&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">datePartDiff&lt;/span>(&lt;span style="color:#a6e22e">currDate&lt;/span>.&lt;span style="color:#a6e22e">getDate&lt;/span>(), &lt;span style="color:#a6e22e">futureDate&lt;/span>.&lt;span style="color:#a6e22e">getDate&lt;/span>(), &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">numOfDays&lt;/span>[&lt;span style="color:#a6e22e">futureDate&lt;/span>.&lt;span style="color:#a6e22e">getMonth&lt;/span>()]);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">months&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">datePartDiff&lt;/span>(&lt;span style="color:#a6e22e">currDate&lt;/span>.&lt;span style="color:#a6e22e">getMonth&lt;/span>(), &lt;span style="color:#a6e22e">futureDate&lt;/span>.&lt;span style="color:#a6e22e">getMonth&lt;/span>(), &lt;span style="color:#ae81ff">12&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">years&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">datePartDiff&lt;/span>(&lt;span style="color:#a6e22e">currDate&lt;/span>.&lt;span style="color:#a6e22e">getFullYear&lt;/span>(), &lt;span style="color:#a6e22e">futureDate&lt;/span>.&lt;span style="color:#a6e22e">getFullYear&lt;/span>(),&lt;span style="color:#ae81ff">0&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">CountDown&lt;/span>.&lt;span style="color:#a6e22e">prototype&lt;/span>.&lt;span style="color:#a6e22e">addLeadingZero&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#66d9ef">function&lt;/span>(&lt;span style="color:#a6e22e">value&lt;/span>){
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> &lt;span style="color:#a6e22e">value&lt;/span> &lt;span style="color:#f92672">&amp;lt;&lt;/span> &lt;span style="color:#ae81ff">10&lt;/span> &lt;span style="color:#f92672">?&lt;/span> (&lt;span style="color:#e6db74">&amp;#34;0&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#a6e22e">value&lt;/span>) &lt;span style="color:#f92672">:&lt;/span> &lt;span style="color:#a6e22e">value&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">CountDown&lt;/span>.&lt;span style="color:#a6e22e">prototype&lt;/span>.&lt;span style="color:#a6e22e">formatTime&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#66d9ef">function&lt;/span>(){
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">seconds&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">addLeadingZero&lt;/span>(&lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">seconds&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">minutes&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">addLeadingZero&lt;/span>(&lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">minutes&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">hours&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">addLeadingZero&lt;/span>(&lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">hours&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">CountDown&lt;/span>.&lt;span style="color:#a6e22e">prototype&lt;/span>.&lt;span style="color:#a6e22e">updateCounter&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#66d9ef">function&lt;/span>(){
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">calculate&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">formatTime&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">countainer&lt;/span>.&lt;span style="color:#a6e22e">innerHTML&lt;/span> &lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&amp;lt;strong&amp;gt;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">years&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#e6db74">&amp;#34;&amp;lt;/strong&amp;gt; &amp;lt;small&amp;gt;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span> (&lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">years&lt;/span> &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>&lt;span style="color:#f92672">?&lt;/span> &lt;span style="color:#e6db74">&amp;#34;year&amp;#34;&lt;/span> &lt;span style="color:#f92672">:&lt;/span> &lt;span style="color:#e6db74">&amp;#34;years&amp;#34;&lt;/span>) &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#e6db74">&amp;#34;&amp;lt;/small&amp;gt;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34; &amp;lt;strong&amp;gt;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">months&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#e6db74">&amp;#34;&amp;lt;/strong&amp;gt; &amp;lt;small&amp;gt;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span> (&lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">months&lt;/span> &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>&lt;span style="color:#f92672">?&lt;/span> &lt;span style="color:#e6db74">&amp;#34;month&amp;#34;&lt;/span> &lt;span style="color:#f92672">:&lt;/span> &lt;span style="color:#e6db74">&amp;#34;months&amp;#34;&lt;/span>) &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#e6db74">&amp;#34;&amp;lt;/small&amp;gt;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34; &amp;lt;strong&amp;gt;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">days&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#e6db74">&amp;#34;&amp;lt;/strong&amp;gt; &amp;lt;small&amp;gt;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span> (&lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">days&lt;/span> &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>&lt;span style="color:#f92672">?&lt;/span> &lt;span style="color:#e6db74">&amp;#34;day&amp;#34;&lt;/span> &lt;span style="color:#f92672">:&lt;/span> &lt;span style="color:#e6db74">&amp;#34;days&amp;#34;&lt;/span>) &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#e6db74">&amp;#34;&amp;lt;/small&amp;gt;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34; &amp;lt;strong&amp;gt;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">hours&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#e6db74">&amp;#34;&amp;lt;/strong&amp;gt; &amp;lt;small&amp;gt;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span> (&lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">hours&lt;/span> &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>&lt;span style="color:#f92672">?&lt;/span> &lt;span style="color:#e6db74">&amp;#34;hour&amp;#34;&lt;/span> &lt;span style="color:#f92672">:&lt;/span> &lt;span style="color:#e6db74">&amp;#34;hours&amp;#34;&lt;/span>) &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#e6db74">&amp;#34;&amp;lt;/small&amp;gt;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34; &amp;lt;strong&amp;gt;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">minutes&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#e6db74">&amp;#34;&amp;lt;/strong&amp;gt; &amp;lt;small&amp;gt;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span> (&lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">minutes&lt;/span> &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>&lt;span style="color:#f92672">?&lt;/span> &lt;span style="color:#e6db74">&amp;#34;minute&amp;#34;&lt;/span> &lt;span style="color:#f92672">:&lt;/span> &lt;span style="color:#e6db74">&amp;#34;minutes&amp;#34;&lt;/span>) &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#e6db74">&amp;#34;&amp;lt;/small&amp;gt;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34; &amp;lt;strong&amp;gt;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">seconds&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#e6db74">&amp;#34;&amp;lt;/strong&amp;gt; &amp;lt;small&amp;gt;&amp;#34;&lt;/span> &lt;span style="color:#f92672">+&lt;/span> (&lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">seconds&lt;/span> &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>&lt;span style="color:#f92672">?&lt;/span> &lt;span style="color:#e6db74">&amp;#34;second&amp;#34;&lt;/span> &lt;span style="color:#f92672">:&lt;/span> &lt;span style="color:#e6db74">&amp;#34;seconds&amp;#34;&lt;/span>) &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#e6db74">&amp;#34;&amp;lt;/small&amp;gt;&amp;#34;&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> ( &lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#a6e22e">endDate&lt;/span> &lt;span style="color:#f92672">&amp;gt;&lt;/span> (&lt;span style="color:#66d9ef">new&lt;/span> Date()) ) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">var&lt;/span> &lt;span style="color:#a6e22e">self&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">this&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">setTimeout&lt;/span>(&lt;span style="color:#66d9ef">function&lt;/span>(){&lt;span style="color:#a6e22e">self&lt;/span>.&lt;span style="color:#a6e22e">updateCounter&lt;/span>();}, &lt;span style="color:#ae81ff">1000&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>JavaScript Counter</title><link>https://praveenlobo.com/blog/javascript-counter-count-days-hours-minutes-seconds/</link><pubDate>Mon, 27 Jun 2011 05:44:31 +0000</pubDate><guid>https://praveenlobo.com/blog/javascript-counter-count-days-hours-minutes-seconds/</guid><description>&lt;p>I keep getting requests and I can&amp;rsquo;t help but post another JavaScript related counter! As always, in case of any issues/doubts/suggestions, feel free to leave a comment.&lt;/p>
&lt;h3 id="javascript-counter-to-count-days-hours-minutes-seconds--">JavaScript Counter to Count Days Hours Minutes Seconds -&lt;/h3>
&lt;p>This script is very simple; it takes a date to count the time from/to, an ID to put the timer in. To be very precise, this counter shows the total number of 24 hours intervals between the date-time given and current date-time. It is also possible to have more than one timer on a page. &lt;a href="https://praveenlobo.com/media/00-25/06-counters-demo/daysHMScounter-demo.html">Demo page&lt;/a>.&lt;/p></description></item><item><title>jQuery v1.6 Checkbox issue</title><link>https://praveenlobo.com/blog/jquery-v1-6-checkbox-issue-attr-vs-prop/</link><pubDate>Tue, 14 Jun 2011 06:32:09 +0000</pubDate><guid>https://praveenlobo.com/blog/jquery-v1-6-checkbox-issue-attr-vs-prop/</guid><description>&lt;p>I have been visiting Stackoverflow a lot recently. This is a cool forum where you not only get your questions answered but also learn. Learn a lot, in fact. I always enjoy learning from others&amp;rsquo; experience and mistakes; it&amp;rsquo;s dirty but it is also very easy and fast. This is exactly what Stackoverflow is providing me; an opportunity to learn from others&amp;rsquo; knowledge. I&amp;rsquo;m also having fun with their reputation points.&lt;/p></description></item><item><title>Javascript Counter</title><link>https://praveenlobo.com/blog/javascript-counter-count-days/</link><pubDate>Sun, 12 Jun 2011 00:52:10 +0000</pubDate><guid>https://praveenlobo.com/blog/javascript-counter-count-days/</guid><description>&lt;p>John Watt sent me a request asking if I could help with changing the &lt;a href="https://praveenlobo.com/blog/javascript-countup-timer/">JavaScript CountUp Timer&lt;/a> to show only the number of days in a counter. He also wanted to display the days in 3 digits.&lt;/p>
&lt;p>I did reply with changes but it had a defect due to a last minute change! So, I wrote a clean script which is the reason for this post. One main improvement here is, the script doesn&amp;rsquo;t update every second. Updating the day counter every second is not needed since the number of days doesn&amp;rsquo;t change every second. The below script updates the counter only when the day count mentioned in the counter has to change.&lt;/p></description></item><item><title>How To Remove The /blog/ slug From The Permalinks(URL) Without A Plugin</title><link>https://praveenlobo.com/blog/how-to-remove-the-blog-slug-from-the-permalinksurl-in-wordpress-multisite-installation-without-a-plugin/</link><pubDate>Tue, 24 May 2011 06:58:10 +0000</pubDate><guid>https://praveenlobo.com/blog/how-to-remove-the-blog-slug-from-the-permalinksurl-in-wordpress-multisite-installation-without-a-plugin/</guid><description>&lt;p>What is a blog slug? If you have no clue, this post isn&amp;rsquo;t for you and if you want to know what it is, it is an ugly looking additional &amp;ldquo;/blog/&amp;rdquo; in the permalinks (URLs) in your website that comes free with the multisite feature in WordPress. Why ugly? Because it comes uninvited, it&amp;rsquo;s there and most probably you don&amp;rsquo;t want it.&lt;/p>
&lt;p>How do you remove the additional &amp;ldquo;blog&amp;rdquo; in the URL of your posts? Simple, install some plugin which does it for you? That is what I thought; however, before doing so, I just took a careful look at the &lt;code>wp_options&lt;/code> table. BAM! There it was. After spending about 30 minutes with settings and checking the data in this table, I have figured out a way to solve the blog slug problem without the need for a plugin. No need to change a bit of code. You don&amp;rsquo;t even need to execute any queries. The query and the table values are shown below just to indicate what your action does to the database values. It&amp;rsquo;s a simple process; only step 2 and 3 need your action, you can skip the rest!&lt;/p></description></item><item><title>Keeping Personal and Technical Blogs Separate</title><link>https://praveenlobo.com/blog/keeping-personal-and-technical-blogs-separate-contd/</link><pubDate>Mon, 23 May 2011 06:15:07 +0000</pubDate><guid>https://praveenlobo.com/blog/keeping-personal-and-technical-blogs-separate-contd/</guid><description>&lt;p>&lt;a href="https://praveenlobo.com/blog/keeping-personal-and-technical-blogs-separate/">Continued from here&amp;hellip;&lt;/a>&lt;/p>
&lt;h4 id="advantagesdisadvantages">Advantages/Disadvantages:&lt;/h4>
&lt;p>Advantages of multiple blogs include monetization, ease of finding advertisers, reaching right audience, and building a resource of articles all in the same niche. Disadvantages? Unless you are an expert you will run out of good articles, might have to hire writers. Multiple blogs needs more time in terms of maintenance, updates etc. It needs more resources which cost money.&lt;/p>
&lt;p>You will have enough time on your hand with a single blog and you don&amp;rsquo;t have to worry about all blogs that miss your constant love. Serious technical discussions happen on websites like StackOverflow anyway!&lt;/p></description></item><item><title>Multisite WordPress Installation On Sibling Directories Of An Existing Single Installation</title><link>https://praveenlobo.com/blog/multisite-wordpress-installation-on-sibling-directories-of-an-existing-single-installation/</link><pubDate>Thu, 05 May 2011 05:33:39 +0000</pubDate><guid>https://praveenlobo.com/blog/multisite-wordpress-installation-on-sibling-directories-of-an-existing-single-installation/</guid><description>&lt;h4 id="is-it-possible-to-create-a-blog-in-a-sibling-directory-of-an-already-installed-wordpress-directory-if-yes-how-to-if-not-can-it-be-done-on-a-fresh-installation">Is it possible to create a blog in a sibling directory of an already installed WordPress directory? If yes, how to? If not, can it be done on a fresh installation?&lt;/h4>
&lt;h5 id="1-existing-installation">1. Existing Installation:&lt;/h5>
&lt;p>Assume that the domain is praveenlobo.com and there is an existing WordPress installation in /blog directory (so, praveenlobo.com/blog is a WordPress blog and the root directory at praveenlobo.com is free). Now, is it possible to create a networked site or blog at praveenlobo.com/anotherblog by setting up the network and allowing multisite?&lt;/p></description></item><item><title>Keeping Personal and Technical Blogs Separate</title><link>https://praveenlobo.com/blog/keeping-personal-and-technical-blogs-separate/</link><pubDate>Wed, 27 Apr 2011 04:46:05 +0000</pubDate><guid>https://praveenlobo.com/blog/keeping-personal-and-technical-blogs-separate/</guid><description>&lt;p>&lt;strong>Disclaimer&lt;/strong>: I&amp;rsquo;m no expert in blogging. I do not have much knowledge about the Wordpress framework either. The following post is based on my previous couple of hours of reading on multisite blogging. Feel free to enlighten me in the comment section.&lt;/p>
&lt;h3 id="why">Why?&lt;/h3>
&lt;p>If you are starting/have started blogging as a hobby, at first it may seem that having one blog and blogging everything in it is a good idea. However, after sometime you will feel as if you should keep the posts separate and in their own blogs rather than having them all in under one blog. I was no different; I never gave much time to think about it until one of my readers (second category below) sent me a message.&lt;/p></description></item><item><title>RSS Feed URL Changed</title><link>https://praveenlobo.com/blog/rss-feed-url-changed/</link><pubDate>Mon, 25 Apr 2011 06:14:56 +0000</pubDate><guid>https://praveenlobo.com/blog/rss-feed-url-changed/</guid><description>&lt;p>Dear readers,&lt;/p>
&lt;p>Though there are only a few of you and I&amp;rsquo;m very sure you are very capable of finding it out yourselves, I think I must save your time and tell you that I&amp;rsquo;m moving my RSS Feed address.&lt;/p>
&lt;p>The idea is simple:&lt;/p>
&lt;ol>
&lt;li>I post this post and then&lt;/li>
&lt;li>change my RSS feed address.&lt;/li>
&lt;/ol>
&lt;p>So that, assuming you miss this post, in case you wonder why you are not finding any new unread items in Lobo&amp;rsquo;s blog feed, this is the post you find on the old feed and you know the answer. I have moved!&lt;/p></description></item><item><title>O_ops: Facebook Image Compression Sucks!</title><link>https://praveenlobo.com/blog/oops-facebook-image-compression-sucks/</link><pubDate>Sat, 02 Apr 2011 03:08:10 +0000</pubDate><guid>https://praveenlobo.com/blog/oops-facebook-image-compression-sucks/</guid><description>&lt;p>Facebook [profile picture] image compression not only sucks big time, but it is also stupid. I don&amp;rsquo;t use Facebook as an image storage service, neither do I care about the EXIF data that they strip. I&amp;rsquo;m also okay with their approach to compress each and every image(?), but compressing an image which results in an image size bigger than the originally uploaded image? I think it fits in my O_ops series.&lt;/p></description></item><item><title>O_ops: Never Return null For A Collection in Java</title><link>https://praveenlobo.com/blog/oops-never-return-null-for-a-collection-in-java/</link><pubDate>Fri, 18 Mar 2011 06:50:13 +0000</pubDate><guid>https://praveenlobo.com/blog/oops-never-return-null-for-a-collection-in-java/</guid><description>&lt;p>I was enjoying a small break between the meetings when my a co-worker asked me to help her out with some Java error in the code she was working on. She was giving me walk-through of the code and I small piece of code caught my attention. Apparently, the coder knew not to return null when returning a collection.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">/* Check if the list is null \*/&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">if&lt;/span>(matchingCountryList &lt;span style="color:#f92672">!=&lt;/span> &lt;span style="color:#66d9ef">null&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>	&lt;span style="color:#66d9ef">return&lt;/span> matchingCountryList;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>} &lt;span style="color:#66d9ef">else&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>	&lt;span style="color:#66d9ef">return&lt;/span> &lt;span style="color:#66d9ef">null&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Of course, it was not her code. &amp;#x1f609;&lt;/p></description></item><item><title>O_ops: Re-try again</title><link>https://praveenlobo.com/blog/oops-re-try-again/</link><pubDate>Thu, 03 Feb 2011 07:10:00 +0000</pubDate><guid>https://praveenlobo.com/blog/oops-re-try-again/</guid><description>&lt;p>&lt;div class='align-center'>
 &lt;figure>&lt;img src="https://praveenlobo.com/media/00-25/15-oops/SelfHelp.jpg"
 alt="Infinite loop">&lt;figcaption>
 &lt;p>You can&amp;rsquo;t attempt more than 5 times, please re-try again!&lt;/p>
 &lt;/figcaption>
&lt;/figure>
&lt;/div>

The best part is that once this message comes, the only way to succeed is to call the service center.&lt;/p></description></item><item><title>Working on The Blog</title><link>https://praveenlobo.com/blog/working-on-the-blog/</link><pubDate>Tue, 18 Jan 2011 09:16:58 +0000</pubDate><guid>https://praveenlobo.com/blog/working-on-the-blog/</guid><description>&lt;p>This is a perfect example for a seemingly easy task taking up so much of one&amp;rsquo;s time. I have been busy working on this blog for a last couple of days. I spent so much time and yet there are so many things to do!&lt;/p>
&lt;p>Here is what I have done so far:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Updated feed through &lt;a href="https://feeds.feedburner.com/lobopraveen">FeedBurner&lt;/a>: this was already present, I updated some settings.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Added Google AdSense: there comes a time in everyone&amp;rsquo;s life when they turn greedy. This is my time. &amp;#x1f61b;&lt;/p></description></item><item><title>RELATIVE Performance Evaluation</title><link>https://praveenlobo.com/blog/relative-performance-evaluation/</link><pubDate>Thu, 13 Jan 2011 23:53:47 +0000</pubDate><guid>https://praveenlobo.com/blog/relative-performance-evaluation/</guid><description>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-javascript" data-lang="javascript">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">if&lt;/span>( parseInt(&lt;span style="color:#e6db74">&amp;#34;1&amp;#34;&lt;/span>) &lt;span style="color:#f92672">===&lt;/span> parseInt(&lt;span style="color:#e6db74">&amp;#34;1+&amp;#34;&lt;/span>) ){
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">alert&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Depends on &amp;#39;the context&amp;#39; and is controlled by external factors!&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>} &lt;span style="color:#66d9ef">else&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">alert&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Loser!&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">alert&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Think again!&amp;#34;&lt;/span>);&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Penny Auction Sites</title><link>https://praveenlobo.com/blog/penny-auction-sites/</link><pubDate>Mon, 03 Jan 2011 21:20:12 +0000</pubDate><guid>https://praveenlobo.com/blog/penny-auction-sites/</guid><description>&lt;p>Okay, you must have landed here through some search engine while trying to figure out a way to make a fortune by spending pennies. Those &lt;a href="http://en.wikipedia.org/wiki/Bidding_fee_auction">penny auction sites&lt;/a> are amazing, aren&amp;rsquo;t they? The concept is so clear and it almost sounds like anyone can get one of those shiny new iPads, Macs, Nikkon D90, or Canon EOS 7D on auction just for a few pennies.&lt;/p>
&lt;p>If you haven&amp;rsquo;t got a clue about it, I urge you to read about them. READ ABOUT THEM. DO NOT JUMP INTO BIDDING! I mean, I&amp;rsquo;m just saying. If you want go ahead and spend some money; however, do not hold me responsible for any damage. I have already shouted at you. You are lucky that I warned you; It&amp;rsquo;s kind of sad that nobody warned me!&lt;/p></description></item><item><title>Password Change</title><link>https://praveenlobo.com/blog/password-change-identifying-the-weakest-link-in-the-chain/</link><pubDate>Wed, 15 Dec 2010 08:15:35 +0000</pubDate><guid>https://praveenlobo.com/blog/password-change-identifying-the-weakest-link-in-the-chain/</guid><description>&lt;p>Last evening, I changed my passwords on all accounts on all websites that I frequent. Just curious to know how many did the same. Hopefully someone will come up with the stats soon.&lt;/p>
&lt;p>I always use different passwords on different sites. All of them are at least 10+ character long with minimum one capital, special character, and number in it. Curious to know what my friends do, I brought up this topic briefly. After the discussion, I realized that even those who are into IT, IS, computers etc. use simple, stupid passwords. Most of them even create documents with the id, password combinations and store them on their desktop! Guess what, their systems are not even encrypted!!! When you tell them about the seriousness of the issue, they just look at me and say, &amp;lsquo;I&amp;rsquo;m not dealing with that important data here&amp;rsquo; or &amp;rsquo;nerd&amp;rsquo; or something similar.&lt;/p></description></item><item><title>Autosys and Unix Permission</title><link>https://praveenlobo.com/blog/autosys-and-unix-permission-solved/</link><pubDate>Fri, 05 Nov 2010 04:10:51 +0000</pubDate><guid>https://praveenlobo.com/blog/autosys-and-unix-permission-solved/</guid><description>&lt;p>&lt;a href="https://praveenlobo.com/blog/autosys-and-unix-permission/">Original post with the answer at the end.&lt;/a>&lt;/p></description></item><item><title>Autosys and Unix Permission</title><link>https://praveenlobo.com/blog/autosys-and-unix-permission/</link><pubDate>Thu, 27 May 2010 17:57:27 +0000</pubDate><guid>https://praveenlobo.com/blog/autosys-and-unix-permission/</guid><description>&lt;p>Say Autosys job called &lt;code>jobName&lt;/code> executes with &lt;code>xyz&lt;/code> id. The profile used is &lt;code>profile&lt;/code>; owner of profile is &lt;code>abc&lt;/code> and neither group nor others have execute permission on this profile. &lt;code>jobName&lt;/code> executes &lt;code>jobScript&lt;/code> which is owned by &lt;code>xyz&lt;/code>(both &lt;code>jobName&lt;/code> and &lt;code>jobScript&lt;/code> are owned by &lt;code>xyz&lt;/code>). &lt;code>abc&lt;/code> and &lt;code>xyz&lt;/code> are two users. There is a group &lt;code>abc&lt;/code> as well.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$id abc
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>uid&lt;span style="color:#f92672">=&lt;/span>1234&lt;span style="color:#f92672">(&lt;/span>abc&lt;span style="color:#f92672">)&lt;/span> gid&lt;span style="color:#f92672">=&lt;/span>10&lt;span style="color:#f92672">(&lt;/span>abc&lt;span style="color:#f92672">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$id xyz
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>uid&lt;span style="color:#f92672">=&lt;/span>1234&lt;span style="color:#f92672">(&lt;/span>xyz&lt;span style="color:#f92672">)&lt;/span> gid&lt;span style="color:#f92672">=&lt;/span>10&lt;span style="color:#f92672">(&lt;/span>users&lt;span style="color:#f92672">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ll profile
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>-r-xr+++-- &lt;span style="color:#ae81ff">1&lt;/span> abc abc &lt;span style="color:#ae81ff">1000&lt;/span> &lt;span style="color:#f92672">[&lt;/span>...&lt;span style="color:#f92672">]&lt;/span> profile
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$groups xyz | grep abc
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ll jobScript
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>-r-xr+++-- &lt;span style="color:#ae81ff">1&lt;/span> xyz abc &lt;span style="color:#ae81ff">3000&lt;/span> &lt;span style="color:#f92672">[&lt;/span>...&lt;span style="color:#f92672">]&lt;/span> jobScript
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$autorep -q -J jobName | egrep &lt;span style="color:#e6db74">&amp;#39;command|owner&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>command: jobScript
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>owner: xyz
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>When the Autosys job is executed, it fails with return code 1. This is correct since &lt;code>xyz&lt;/code> doesn&amp;rsquo;t have execute permission on profile.&lt;/p></description></item><item><title>Automate Torrent Download Using Transmission</title><link>https://praveenlobo.com/blog/automate-torrent-download-using-transmission/</link><pubDate>Thu, 27 May 2010 00:00:00 +0000</pubDate><guid>https://praveenlobo.com/blog/automate-torrent-download-using-transmission/</guid><description>&lt;p>A while ago I wrote about &lt;a href="https://praveenlobo.com/blog/swget-a-simple-wget-wrapper">swget - A Simple wget Wrapper&lt;/a> The methods described don&amp;rsquo;t work for torrents. Today I had to download a video which was not available through direct download, but I found a few torrents for the same. After fiddling around with the scheduler available in Transmission I found it to be absolutely useless; it doesn&amp;rsquo;t work!&lt;/p>
&lt;p>After a little search on the net, I found a workaround for this too!&lt;/p></description></item><item><title>Ubuntu 10.04 - Lucid Lynx</title><link>https://praveenlobo.com/blog/ubuntu-10-04-lucid-lynx/</link><pubDate>Mon, 10 May 2010 18:09:03 +0000</pubDate><guid>https://praveenlobo.com/blog/ubuntu-10-04-lucid-lynx/</guid><description>&lt;p>Very first impression(within a minute of installing):&lt;/p>
&lt;blockquote>
&lt;p>WTF, it hung!&lt;/p>&lt;/blockquote>
&lt;p>I had kept &lt;code>/home&lt;/code> on a separate partition for the first time and wanted to check if it works fine for all users. I created an account and set the home folder as &lt;code>/home/irine&lt;/code> and then hit save - switch user - log off - WTF!&lt;/p>
&lt;p>&lt;a href="https://bugs.launchpad.net/ubuntu/&amp;#43;source/fast-user-switch-applet/&amp;#43;bug/574909">Bug #574909&lt;/a>&lt;/p>
&lt;p>Ubuntu 10.04 (Lucid Lynx) is impressive; thanks to all those who made it possible &lt;em>:o)&lt;/em>&lt;/p></description></item><item><title>How I Put My First GIMP Work To Use</title><link>https://praveenlobo.com/blog/how-i-put-my-first-gimp-work-to-use/</link><pubDate>Sun, 02 May 2010 12:23:41 +0000</pubDate><guid>https://praveenlobo.com/blog/how-i-put-my-first-gimp-work-to-use/</guid><description>&lt;p>&lt;a href="https://en.wikipedia.org/wiki/Inline_linking">HotLinking&lt;/a>. If you don&amp;rsquo;t know what it means follow the link and spend a couple of minutes reading about it. For those who are not interested in doing so - hotlinking is somebody else riding your superbike on your petrol without your knowledge and without giving you any credit. Bad analogy? :o)&lt;/p>
&lt;p>How do you make sure you don&amp;rsquo;t allow something which you don&amp;rsquo;t even know is happening? Very simple, using &lt;a href="https://en.wikipedia.org/wiki/Htaccess">.htaccess file&lt;/a> - a directory level configuration file. I&amp;rsquo;m not going to tell you what you have to put in that file; there are innumerable tutorials on the net - just search for &amp;ldquo;hotlink prevention&amp;rdquo;.&lt;/p></description></item><item><title>JavaScript CountUp Timer</title><link>https://praveenlobo.com/blog/javascript-countup-timer/</link><pubDate>Fri, 16 Apr 2010 13:30:03 +0000</pubDate><guid>https://praveenlobo.com/blog/javascript-countup-timer/</guid><description>&lt;small>
_Update (2018):_ I have moved the code to [GitHub - JavaScript Counters](https://github.com/lobopraveen/JavaScript-Counters) AS IS.
&lt;/small>
&lt;p>I was in need of timer to mark &lt;a href="https://praveenlobo.com/blog/quit-smoking/">an important decision&lt;/a>; I did what most of us would do - search on the internet. I found quite a few of them, but I didn&amp;rsquo;t like any of them. Some of them were unnecessarily complicated; a couple of others weren&amp;rsquo;t easily understandable; most of them were using approximation (esp. for months and years).&lt;/p></description></item><item><title>swget - A Simple wget Wrapper</title><link>https://praveenlobo.com/blog/swget-a-simple-wget-wrapper/</link><pubDate>Wed, 17 Mar 2010 19:24:15 +0000</pubDate><guid>https://praveenlobo.com/blog/swget-a-simple-wget-wrapper/</guid><description>&lt;h3 id="the-problem">THE PROBLEM&lt;/h3>
&lt;p>I have BSNL 500C+ broadband connection which gives me 2.5GB of data transfer per month. This limit is sufficient only for usual surfing. 500C+ plan also gives me night unlimited option i.e. the data transferred between 2AM to 8AM is not counted towards the 2.5GB quota per month. I can download around 4GB in this time frame. I use this time to download contents, but the real problem is starting the download at 2AM.&lt;/p></description></item><item><title>OS Switch: Fedora to Ubuntu</title><link>https://praveenlobo.com/blog/os-switch-fedora-to-ubuntu/</link><pubDate>Sat, 02 Jan 2010 16:52:25 +0000</pubDate><guid>https://praveenlobo.com/blog/os-switch-fedora-to-ubuntu/</guid><description>&lt;p>A post about switching the Operating System(OS)? Yeah, why not? After all It&amp;rsquo;s the OS that made one man the richest in the world. It&amp;rsquo;s the OS that has made so many people across the globe dedicate their own resources and time to better it. It&amp;rsquo;s the OS that makes people argue - be it MS vs Linux or different distributions of Linux itself!&lt;/p>
&lt;p>I&amp;rsquo;m not a Linux freak or a guru but an average user helping the open source in a way that most of the people do - by using it! I have been using a personal computer since 2004 and have been using Fedora Core for more than 95% of my personal use. I have tried a lot of different flavours of Linux but no clue why I stuck to Fedora all this time.  No, I&amp;rsquo;m not saying that it is bad; I wouldn&amp;rsquo;t have been using it for such a long time if it was, right? Fedora rocks but I just got bored of it!&lt;/p></description></item><item><title>Yet Another "Hello, world!"?</title><link>https://praveenlobo.com/blog/yet-another-hello-world/</link><pubDate>Tue, 22 Dec 2009 19:31:10 +0000</pubDate><guid>https://praveenlobo.com/blog/yet-another-hello-world/</guid><description>&lt;div class='align-center'>
 &lt;figure>&lt;img src="https://praveenlobo.com/media/00-25/00-bday/Bday.jpg"
 alt="Happy Birthday!">
&lt;/figure>

&lt;/div>

&lt;p>I&amp;rsquo;m bored of &lt;a href="http://en.wikipedia.org/wiki/Hello_world_program">Hello, world!&lt;/a>; I did that over&lt;/p>
&lt;ul>
&lt;li>9000 days&lt;/li>
&lt;li>1300 weeks&lt;/li>
&lt;li>200,000 hours&lt;/li>
&lt;li>13,000,000 minutes&lt;/li>
&lt;li>750,000,000 seconds&lt;/li>
&lt;/ul>
&lt;p>ago. Yeah, about 25 years ago, I did my personal &lt;em>Hello, world!&lt;/em>&lt;/p>
&lt;blockquote>
&lt;p>Hello, world!&lt;/p>&lt;/blockquote>
&lt;p>Yet another &amp;ldquo;Hello, world!&amp;rdquo;? Yes, this time not from me but from this very blog you are reading! &lt;strong>&lt;em>:o)&lt;/em>&lt;/strong>&lt;/p>
&lt;p>On a serious note, I&amp;rsquo;m very happy to start this blog, it was one of the items pending on my &lt;a href="https://praveenlobo.com/bucket-list/">Bucket List&lt;/a> for a long time now. Keep watching this space for the list!&lt;/p></description></item></channel></rss>