rss
twitter
    Find out what I'm doing, Follow Me :)

Friday, March 11, 2011

Do You Know Series: Part 1

Its been more than 10 months since I had blogged and this post will be a start for DYK series. This involves facts, trivia, useful information from Technology, Software, Programming, Sports, Internet etc. If you already know any of these stuffs, kindly ignore it, others enjoy and learn . Smile. This is Part one of series and I hope many will follow.
1) Lets start with Google Chrome. We all know about Instant search in www.google.com. How many of you know how to invoke it from Chrome’s Omni bar ?? There is a simple way to do (Idea Courtesy: Internet).
  • Download and install Google Chrome dev channel. If you have previously pin the Chrome icon to your taskbar, unpin it.
  • Go to “Start -> All Programs -> Google Chrome“. Right click on the Google Chrome entry and select Properties.
  • Enter “--enable-match-preview” at the end of the shortcut target. Click Ok.
  • Launch chrome now and you will be able to see instant search results as you type. Such an easy thing to do.
2) The second thing I am going to tell is about the usage of operator “==”. The use of this operator is very easy and it may also lead to problems when you use it with strings. ‘==’ doesn’t work well with the strings always in most of the languages like C, PHP etc. Here is an example,
#include<stdio.h>
int main()
{
char a[10]="Hello",b[10]="Hello";
if(a==b)
printf("The strings are equal");
else
printf("The strings are not equal");
return 0;
}


On running the above program, we will get that strings are not equal. This is a very small example and when used in a large or a sufficiently large program leads to bizarre results. So better use strcmp method or equivalent in that programming language in which you code. (I remember studying this in C books, but recently when I had to do some comparison, used == and faced issues. So writing it so that it will be like a brush up of basic stuffs in languages.)

3) The next thing is about an Android App I recently came across and using it quite well. SmSpopup it is. This is an App that intercepts the incoming messages and displays in a pop up box on the phone and it works even when the screen is locked. One can also reply to the message via the same popup(see in screenshots, voice input also included). This is the fastest way of sending and receiving messages and when your Android’s default messaging system is slower(just as mine), this is *the* app for you.
The best part of this is, it is Open Source.

Screens have been taken from project’s Google code website. It is fully customizable and has plenty of settings to tweak and play with.

screenshot1 (1)screenshot2screenshot3screenshot4screenshot5screenshot6



4) The next DYK is regarding another OSS, Notepad++. For those who needs to use Windows in office and those who like it(Smile with tongue out, there will be very less ppl.. But W7 has wonders and we will have an argument about it at a later time).

There are multiple features in this software and it is fully loaded with many plugins one needs to use. Some of these are
  • The compare plugin – A simple button click to compare two files.
  • Column wise selection – Select by clicking Alt+Left mouse button. you can easily select columns.
  • The good one I think is Bookmarking a line. You can bookmark any number of lines and can perform various editing operations. This would be mostly useful in bulk text files where selecting a line and click find. In the Find dialog box, check mark line and press the Find all button. This will bookmark all the lines matching. Then we can delete or cut, copy paste, invert , toggle etc. Here is a screen for it.

Capture


5) Fifth thing looks a bit of techie stuff(Open-mouthed smile), but very easy to understand. You would have heard about Jquery, a JS library which is used for Rapid web development. There are infinite modules with jquery which one can use easily in the websites we design. This DYK is based on my experience, where I am using two jquery modules in a single webpage and one didn’t work properly. I had to Google to find the mistake I was doing- Initialising the class of the jquery twice. Each module comes up with a different version of jquery.js to include. I had included both the js files. What was happening is the second time one includes it, the whole jQuery object gets updated and over writes the plugin you already initiated. So ensure that, you include only one js file of the plugins.

6) The final thing in this part is about shell programming. When you are writing shell scripts, often errors may occur and easiest way to debug those is by use of “bash -x” for running the script. This will tell where the exact error is. Another way of doing this is by including “#!/bin/bash -xv” as the first line of script. Many such tips for debugging are provided in this website(http://www.cyberciti.biz/tips/debugging-shell-script.html).

That’s all for this post folks. If you find any mistakes or have suggestions do mail me or leave a comment and I will look into it. Till next time., –Naveen DS