Sunday, December 9, 2012

Snipping Tool: Windows 7 built in screen capture tool

What do you do when you want to capture a screen shot, part of it or some window on windows machine? Don’t you press “Print Screen” button on a key board then do paste into mspaint and do the required capture, highlight or marking? If you have a windows 7 and you still do it this way only, then let me tell you ‘You live in stone era’.  Don’t you know about Snipping Tool?
 
Snipping tool is a free and simple screen capturing tool which comes built in with windows 7. This is another good built tool in Windows 7.

For opening Snipping tool, 
Click windows button and start typing “snipping tool” > You will see “Snipping tool”  under Programs. > Right click on it and select ‘Pin to Start Menu‘ or ‘Pin toTask Bar’ so that you can find it immediately when you need it.


Snipping Tool

When you want to take a snap of something, open a corresponding window and open this tool. There are three simple menus :








New Options

New : Select what you want to capture

     Free Form Snip: Capture free area of any shape.
    Rectangular Snip: Capture rectangular area.
    Window Snip: Capture an open window.
    Full Screen Snip: Captures full screen.
 
Cancel :  Use this if you want to minimize Snipping tool. Particularly when you want to capture different window than currently opened one.
 
Options : Use this to edit some preferences. 

Snip Editing
Once you have captured the snap, this tool opens your snip and provides you options to Save it, Get a new one, Edit it with colorful pens, Highlight area and an Eraser to undo pen and highlight editing.


 One Extra tip, not related to Snipping tool :
“You can take a snap of some window by opening that window and  “Alt + Print Screen” then paste into mspaint !!”

Sunday, December 2, 2012

Free Personal Source and Version Control Solution: Use SVN over Dropbox.

   Want to use some source control and version control tool for your personal use? And don’t want to use public repositories github? And also want to save your all source over a safe, reliable and sharable cloud? Then simplest and free solution is to use SVN, a very good version control tool, and save your SVN repository over your Dropbox account which will save your source over a safer cloud.

   For doing this download and install SVN tortoise client and Dropbox application on your machine. I hope you have an account on Dropbox : a file hosting service operated by Dropbox, Inc. that offers cloud storage, file synchronization, and client software(description copied from Wikipedia). Dropbox takes care of storage, safety, backup and sync for you.

   Once you have installed Dropbox and configured your account, you will be able to see your Dropbox folder on C:\Users\[YourUsername]\Dropbox. By default it syncs all of your Dropbox folders but you can select the folders to be synced from 

Dropbox > Preferences > Advanced > Selective sync.

   Now you are ready to create SVN repository over Dropbox. You just need to follow following simple steps:

1. Go to Dropbox folder, Create a new Folder, it’s your repository so name it accordingly. Right click on this new folder and select
 
Tortoise SVN > Create Repository here
 
Then you will see a dialog saying Repository Created as shown here..
2. Click on ‘Create folder structure’ to create trunk/branches/tags structure inside this new repository.


3. Bang!! Your repository with folder structure is ready now. Click ‘Start Repobrowser’  for opening repo-browser. Remember don’t ever ever ever modify this folder(your repository folder) of your own.  As this folder is SVN repository, it’s structure and data inside it is meant for SVN only.

4. Now you need to add your source code to your own SVN repository.  For that do this :

Right click on your workspace folder > TortoiseSVN >  import > give URL of a folder under trunk (you can copy URL of trunk from repo-browser and add required folder name to it after ‘/’ ) into ‘URL of repository’ > Ok. 

5. You have added your workspace to repository but it’s not versioned yet on your machine. For that right click on workspace folder and SVN Checkout the new imported folder from repository.

6. Once you have mapped your workspace to your local SVN repository, you can use your workspace and commit files as you were committing to standard SVN repository. Those files will just be committed to local repository.

  But don’t be curious about where these files go inside repository folder on your local machine, leave it to the SVN. Also don’t do any modifications to this repository folder. SVN takes care of everything.

7. Now your source code is inside your Dropbox folder that you should mark for sync from your machine if you are using selective sync. If you do manual sync of your Dropbox then keep good practice to sync this repository folder to Dropbox whenever you do any commit or changes that you must do from repo-browser only. Also keep in mind that this folder on Dropbox should also never be modified manually.

     You also can share this Dropbox folder to your teammates through Dropbox share and your teammates can use this folder directly as SVN repository. 

Thursday, November 22, 2012

How to listen music on mono bluetooth headset on android phone.

    Mono bluetooth headsets have single stream connections, so you can't stream music on them.  But Nokia phones have option to play music via bluetooth which can play music directly on even mono bluetooth headsets.
A2DP bluetooth headsets are dual stream so music can be directly played on them.


     But if you have mono bluetooth headset and android phone you can't listen music on it but only can make and receive calls. You are stuck :( 
But don't worry, there are few apps on android market which enable you to listen music on mono bluetooth  headset.



BTMono Off

     BTmono is very simple and light weight application available on android market, which can stream your media over mono bluetooth headset.


     For using this app switch on your phones bluetooth, connect your bluetooth with paired bluetooth headset, open BTmono app and click on ON button then android robot on the screen will put it's one hand up and you are ready to go. Then just play music and it will be streamed to your mono bluetooth headset.
BTMono On








There are two versions of this app available on the market, free version and paid one. The only difference that matters is what happens when you get a call while listening to music. On free version when you drop a call received while listening to music, music resumes on speaker instead of bluetooth headset and that is little embarrassing eeew. While on paid version music resumes on headset when a call is dropped. so it's your call to choose free or paid version of BTmono.
The music quality on bluetooth headset using this app is not up to mark and that's because it's mono headset.  But remember this app is really helpful to utilise your otherwise useless mono bluetooth headset.

Tuesday, October 30, 2012

How to import and sync Facebook friends's birthdays to Android phone.


         You don’t visit Facebook daily, and miss birthdays of friends?  Want your android phone to remind you your friend’s birthdays?  There are lots of application on the market but you don’t need them and believe me these kind of apps run in background and drain phone's battery and resources. So possibly you should import and synchronize your facebook friends's birthdays to your android phone calendar so that you will be up to date with the birth dates.
       Following are simple few simple steps to import and synchronize facebook friends birthdays to your google calendar and then to android phone calendar.


 1.     Go to your facebook account, on home page at upper left corner, below your profile picture, there will be a link called Events. Click on it. It will open your  facebook events calendar that includes birthdays of your friends.


Facebook : Events link

    2.  On events page at upper right corner, there is Today button with settings logo. Click on settings logo and select export from the option, the way shown in picture.

Facebook : Export Events
    3. This will open 'Export Events and Birthdays' pop up.

Facebook :Copy export link 

    4.  Right click on ‘export your friends’ birthdays’ and select copy link option.

Facebook: Copy link
 5.  Now go to google calendar, that you can go by selecting calendar from top most black strip on google home page. Then on calendar at left hand panel click on other calendars option and select Add by URL.


Google Calendar : Add by URL
       

         6. Pop up for entering URL will be opened, paste the copied URL into the textbox for URL and click Add Calendar.


Google Calendar : add calendar by URL
    
   7.  Then the new calendar ‘Friends’ birthdays’ will be added to your other calendars section on google calendar. Select your favorite  color for this calendar if you want. Now you are done with importing you facebook birthdays to google calendar.

Google Calendar : Added Calendar


       
     8.  Now you need to sync your android calendar app to  google calendar. For that open Calendar application on your android phone. Make sure you have enabled Use data packet I mean an internet access.


9. Select options -> More -> Calendars, it should show you Friends’ Birthdays calendar.



 10. Set Synced, Visible to this new Calendar.
Android : set synced and visible
Android : Birthdays showed in Bold

 11. Now phone will sync this calendar from Google calendar to calendar app and friend’s birthdays will be visible on your phone.



Now you can view friends's birthdays and set notifications for them as per your needs.
     
       

Saturday, October 27, 2012

jQuery - Difference between :eq() and :nth-child() selectors.


    In jQuery many times :nth-child(n)  pseudo-class selector is easily confused with :eq(n), even though the two can result in dramatically different matched elements.

   With :nth-child(n), first all children are counted, regardless of what they are, and the specified element is selected only if it matches the selector attached to the pseudo-class. With :eq(n) only the selector attached to the pseudo-class is counted, not limited to children of any other element, and the nth one is selected.

    In other worlds, with :nth-child(n), first all elements those are children are considered and among the children, nth child is considered then it’s checked if it matches the selector which is attached with :nth-child(n). On the other hand with :eq(n) first the attached selector is resolved to set of elements and among those elements nth element is selected independent of considering children or not.


    Also there is another important difference, that is :nth-child() is 1 indexed means indexing count starts with 1 so nth means actual nth one. While :eq() is 0 indexed with indexing starting with 0 so nth element is actually (n+1)th. This is so because jQuery's implementation of :nth-child(n) is strictly derived from the CSS specification and for all other selector expressions including :eq() however, jQuery follows JavaScript's "0-indexed" counting. 

   Let's see following simple example: 


<table>
          <tr><td>Table1-row1</td></tr>
          <tr><td>Table1-row2</td></tr>
          <tr><td>Table1-row3</td></tr>
</table>
<table>
          <tr><td>Table2-row1</td></tr>
          <tr><td>Table2-row2</td></tr>
          <tr><td>Table2-row3</td></tr>
          <tr><td>Table2-row4</td></tr>
</table>

In above tables $(“tr:nth-child(3)”) will select two elements :


         <tr><td>Table1-row3</td></tr>
And

        <tr><td>Table2-row3</td></tr>

While $(“tr:eq(3)”) will select only single element :


        <tr><td>Table2-row1</td></tr>
   
 Please try following fiddle also, run it and click a button to see what it selects. It also shows how :even and nth-child(even) are different.






Saturday, October 20, 2012

Drawbacks of an Android Operating System.

      You might have read, heard or even seen many great features of an Android operating system. You might have heard about what things you can do with Android device. You might have heard how many applications are there on Android market. But now I would detail few down sides, drawbacks of an Android operating system or say devices.
       I have used android 2.2 only, but these drawbacks are quite general to be seen across other versions also.
       I am not comparing Android with other mobile operating systems but for sure you will observe these while using an Android device. So following are few drawbacks of an Android operating system.


It hangs a lot :


      You are doing something on your Android phone and suddenly it stops responding and gives whuiii whuiii kind of two or more vibrations (this happens with my Samsung phone, might not be the case with other phones but there will be some other way) and you say “Not Again !!!”. Many times devises restarts of its own after it hangs, which takes my soul out. Still it’s Ok but when it hangs, stops responding and you even can’t shut it down, I hate that frustration.
     The device mainly hangs by applications and services running out of memory. On Android when you close an application by pressing back button, many applications still continue running in background. There is concept of service in Android, which means a process running behind the scene and that continuously consumes battery as well as memory. 



Battery backup is very low – Battery consumption is very high :


     If your device is kind of low budget phone, this is the main problem you would face. This is not only caused by device hardware but also by Android operating system, as this operating system runs lots of processes in background may be like widgets, services and many system threads. Battery backup becomes worst when you start using Internet on your device, so most of the time you need to disable data packet when you are not using it just for saving the battery. And many times you need to compromise with use of your mobile for saving battery or because of low battery.

Low end phones can’t install few applications – compatibility issue :


     Yes there are lots of Apps on Android market but, are they all useful? No, I mean you would get incompatibility issue with many applications for low end devices or old versions of android OS. This is mainly happening because of many versions of android and large difference between features and hardware requirements across the versions. You may want to install a good action game but for that you need compatible OS and compatible device.

Rooting voids warranty :


     Rooting an Android device is the best way to utilize it to the great extent. Rooting allows upgrading android version, installing good custom ROMs. But rooting voids the phone warranty that’s why many people are afraid of doing it.

Dalvik Cache – Limited phone memory :


     Android version 2.2 and onward you can install app on SD card. How great! that means you will never run out of phone memory, but is it the reality? Even if you install app on SD card, some considerable part of the app remains on phone memory, they call it Dalvik Cache. It’s a design funda, they use it for app to be fast. But they neglected the fact that they are using phone memory for that, which is kind of limited on many phones. So this also puts another restriction on how many applications you can install on your device.

Android is not an Enterprise person’s phone:

     
     Unlike BlackBerry and iPhone, Android wasn't considered to be an enterprise phone. It’s not that useful for enterprise applications and functionalities. Say like you want to connect your phone to your company’s enterprise WiFi network or want to configure  your office outlook mailbox on your phone, it’s a great a pain to get it done on android phone. At least it’s not as easy as it is on BB or iPhone. 

Data packet enable doesn't work :


      This is a small thing but irritates a lot. When you want to enable ‘Use packet data’, you go to Settings -> Wireless and networks -> Mobile networks -> Use packet data and select this option and expect data transfer to be enabled but many of the times nothing happens even after waiting for some time. Then trying deselect –select multiple times, it may start but if you have a bad day you need to restart your device and that sucks.

    Besides these few drawbacks there are many great features of Android operating system. And I still love Android.

Thursday, October 18, 2012

Google launches free SMS service on Gmail in India.


       Google has now extended free SMS service on Gmail to India. Google had first made this feature available to its users in some African countries in 2011. This service is started for Indian users from Oct 10 2012.



       By using this service users can send free SMSs through Google chat. Responses to these SMSs will be received to Gmail and also will be stored in Gmail chat history just like other chat messages. Yes, this is free service, every user is availed at the beginning with the credit of 50 SMSs and that is maximum credit any user can have. On sending one SMS credit is deduced by one. The maximum limit is kept to avoid misuse of the service for marketing or spamming.
       When you get reply to your SMS sent from this service, your SMS credit is increased by 5 and again max credit is 50. So you can get SMS credit by sending message to yourself and replying to it. Or you can chat with your friend using this service, so that you will never run out of the credit. Also when you run out of credit your account will be credited be 1 after 24 hours, giving you a chance to restart using this service.


      This service is available with almost all major mobile operators in India. This service is available only on Gmail website but not yet on the standalone Google Talk app.
        In order to send an SMS to a contact, hold mouse on your contact from contact list at chat panel at the bottom left corner. Which will popup contact’s detail. This popup has downward arrow for more actions at bottom right corner. Click on that arrow and it shows ‘send SMS’ option. Click on ‘send SMS’, this asks user’s mobile number, enter it and you are ready to send him free SMS from Gmail. Once mobile number is added chat panel shows mobile icon for that contact if he is offline. Then click on contact and type in message in chat window for sending SMS. And if contact for whom you have added mobile number is online and still you want to send SMS, click on More option in chat window and select ‘send text(SMS)’.
     If Gmail Chat SMS recipients in India do not wish to receive any messages on SMS from any Gmail user, they can stop the service from sending them messages by texting 'STOP' to +918082801060. To reactivate the service they can SMS 'START' to the same number.
     Enjoy texting.

Friday, August 24, 2012

Microsoft reveals a new logo. A change or a new beginning after 25 years.

Microsoft revealed it's new logo on 23th August 2012. The technology giant has changed it's logo after 1987, after long 25 years. This new logo appeals changes to it's new range of products form Windows 8 to Windows Phone 8 to Microsoft Office 2013. It's more like Windows new Metro UI, UI with tiles; So the logo has four colored tiles.






Microsoft has got colored logo first time and first time it has got some picture in it. Otherwise it was always been black text and only text 'Microsoft'.
The logo has changed for 5th time, you can see the changes in the logo over the years in the image down here.The new logo is in the font 'Segoe'. Note the characters 'f' and 't', they are left attached like last in logo.
       Microsoft's Jeff hansen revealed this new logo saying
"signal the heritage but also signal the future - a newness and freshness."  
Well said man.

     This logo is more influenced by  Windows 8's Metro UI. Windows 8's logo also has four tilted tiles, remember ? This new UI is gonna change completely how world has been using PC. Though this UI is designed optimally for tablets, it looks and feels great on PC and mobiles too.  Company's new products and even their many sites are now following this kind of UI, and keep in mind this is gonna be the future.
      This logo is already out on company's site www.micosoft.com, it's official facebook and twitter pages as well as many of it's offices.
      Watch following video about launch of this new logo.

Saturday, July 28, 2012

OCJP Exam Details, Syllabus, Book and Dumps.


 OCJP stands for Oracle Certified Java Programmer. This is the basic certification in the field of java. Say, you want to be an Android programmer, J2EE programmer or in any other Java technology, this certification is the most basic one. For many other certifications OCJP is kind of  prerequisite. Believe me it's  good to have it in your resume in early stages of your career.
              The latest version of OCJP is OCJP 6, which is for jdk version 6. The syllabus for OCJP is basic or say core java only. There are many books  in the market for OCJP preparation. But  "Sun Certified Programmer For Java 6 Study Guide" by Kathy Sierra is simple and good one. Yes! That book with thinking statue on it's front cover.
You can download soft copy of that book from here.
             The exam is for 150 minutes with 72 questions. Passing score is just 61%. There used to be drag and drop questions, even you will find many in books and dumps. I said “there used to be”, because I think recently these kind of questions have been removed from the exam. But it’s good to be on safer site and prepare few of their type.


The syllabus for scjp is as follows :
  1.  Declaration and access control
  2.  Object declaration
  3.  Assignments
  4.  Operators
  5.  Flow control, exceptions and assertions
  6.  String ,I/O, formatting and parsing
  7.  Generics and collections
  8.  Inner classes
  9.  Threads
           These are just names of the chapters from the book which covers all the syllabus. Actually you need not to worry about exact syllabus, as that is generally stated in very vague form which is very unclear from exam point of view. At first glans this seems too easy, but tiny details of java covered in the syllabus are quite tricky and interesting to learn.
             I would suggest you to read this book and solve questions from it for detailed knowledge of the language. But if you don't have that much time or interest in it, you also can read dumps for OCJP. You can also solve these dumps after reading the book, just for extra fun.
You can download dumps for OCJP 6 from here.
                                        


                                               ALL THE BEST                                                                      

Friday, May 25, 2012

How to hide media files from a scanner in android.


There are 3 methods,  I know, which are useful to hide your media files on an Android device so that those will not b shown in Gallery.
You can choose according to level of privacy you want, and how frequently you need those files.

1.Use some app from the market (Play) :


 There are many applications on the market for hiding media files on your device.Those are most secure and give best privacy.
This is the simplest method.
But some day, your friends will see this app on your device and will come to know that, you are hiding something and would say “what a shame! What are those files hmmmm? You dirty !”


 

 

 

2. put those files in a folder with name starting with ‘.’  Dot.


.name
If you have used Linux you must be knowing that, a directory with a name starting with ‘.’ Is hidden one.
So create such a folder, using some file manager. Then copy your files you want to hide, into this directory.But you need some file manager app like Astro for this, but no need of separate hiding app and there are many other purposes of file manager ok.Also nobody would find media hiding app on your device, so they will think you are a good boy.
But be careful about choosing location of the folder, otherwise some extra curious friend of you may catch your files and you too.




3.use .nomedia named file


It’s same as second method but quite risky one. Say you want to use something different, which is android specific, then you can try this. But remember this is quite risky because of known bug in android.
For this method, create a folder somewhere using some file manager. Inside that create a file with name “.nomedia”, after that a scan will run. Then you can droop your  those files in this folder. This folder will not be scanned by next any scans and content will not be shown in Gallery.
It’s not that simple, if you place .nomedia file in a folder containing some file, those all files will b deleted, that is the bug, I now that exist in android version upto 2.2 (froyo), don’t have idea if that exist for other versions. So be careful and first place .nomedia file and then drop your personal files into the folder.


Saturday, April 21, 2012

How to create your own jQuery plugin !

Once you know jQuery, it’s simple to create your own plugin. Depending on the complexity of your plugin, you need to take care of following steps. For learning purpose it’s good to go step by step and know why do we do what we do for creating your own plugin.

1. Cross Library Safety :

(function($){

//Here $ means jQuery

})(jQuery)

This will mean $ in that particular function is jQuery, so that there will be no conflict when you or someone else is using your jQuery plugin along with other java script libraries which may use $ for their own purpose.

2.Adding function property to the jQuery.fn object :

Here you will add your plugin to $fn object as a property which makes your plugin usable. Use your plugin name here.

(function( $ ) {
  $.fn.myPlugin = function() {
  
    //your plugin stuff here

  };
})( jQuery );

3.this is a  available object :

this variable  is available directly inside your function code so …
 this.fadeIn() works here, 
so no need to use $(this) for simple plugins.

4.Better use each to iterate over elements given by Selector :

this.each(function() {
        ///Some code here
    });
so that the selector on which your plugin is called when selects multiple elements, this will get applied to all of them.

5.To maintain chainability the plugin should return this keyword :


return this.each(function(parameters) {
         var $this = $(this);
      //code using $this 
    });

So hence forth you will be using $(this), through say variable $this.
Chainability allows to perform some actions on the same element(s) one by one, which simplifies the way your plugin would be used.



6. Multiple options with default values :

For more complex plugins providing multiple attributes, it’s better to provide default values for attributes..

(function( $ ){

  $.fn.tooltip = function( options ) {  
    // Create some defaults, extending them with any options that were provided
    var settings = $.extend( {
      'location'         : 'top',
      'background-color' : 'blue'
    }, options);

    return this.each(function() {        
//use settings[“location”]  or settings.location
      // Tooltip plugin code here
    });
  };
})( jQuery );

Calling it

$('div').tooltip({
  'location' : 'left'
});

 So if you have provided default options, you can use those in your code, now it's not necessary for user to provide values for all the attributes.

Here $.extend is used which accepts two object, here first one will be default values object and second one will be one provided by the user with his values. $.extend will merge second object into first, so that if values for some options are not provided then it will take default ones.

7.Multiple Methods in plugin with NAMESPACING :

(function( $ ){

  var methods = {
    init : function( options ) { 
      // code
    },
    show : function( ) {
      // code    },
    hide : function( ) { 
      // code
    },
    update : function( content ) { 
      // code    }
  };

  $.fn. myPlugin = function( method ) {
    
    // Method calling logic
    if ( methods[method] ) {
      return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 ));
    } else if ( typeof method === 'object' || ! method ) {
      return methods.init.apply( this, arguments );
    } else {
      $.error( 'Method ' +  method + ' does not exist on jQuery.tooltip' );
    }    
  
  };

})( jQuery );

// calls the init method
$('div'). myPlugin (); 

// calls the init method
$('div'). myPlugin ({
  foo : 'bar'
});

Call these methods by first passing the string name of the method, and then passing any additional parameters you might need for that method. This type of method encapsulation and architecture is a standard in the jQuery plugin .

Calling this,

$('div'). myPlugin ('hide'); 
$('div'). myPlugin ('update', 'This is the new myPlugin content!'); 

8.Bind an event :
If you want your plugin to bind an event, use following way (please namespace it )
And have a method like destroy as shown below to unbind what is "bind" earlier.

init : function( options ) {

       return this.each(function(){
         $(window).bind('resize.myPlugin', methods.reposition);
       });

     },
     destroy : function( ) {

       return this.each(function(){
         $(window).unbind('. myPlugin ');
       })

     },
     reposition : function( ) { 
       // ... 
     },
$('#fun'). myPlugin ();
// Some time later...
$('#fun'). myPlugin ('destroy');


So now decide on your plugin idea and start writing it.
Best of Luck.