Thursday, 22 January 2015

Fix a clr20r3 Error

1. Click Start button, click All Programs, click Accessories, then right-click Command Prompt, in the right click menu, please click Run as administrator.
2. Type the following commands, press Enter after each line. 

regsvr32 atl.dll
cd C:\WINDOWS\eHome
ehSched /unregServer
ehSched /service
ehRecvr /unregServer
ehRecvr /service
ehRec.exe /unregServer
ehRec.exe /regserver
ehmsas.exe /unregServer
ehmsas.exe /regserver

Monday, 5 January 2015

Building Rest API with Spring Webinar

Watch a webinar on how to build Spring MVC application with Spring REST Api and the questionaire by webinar attendees.

Monday, 22 December 2014

How to generate a random String in Java

The following function can be used to create a random string.
 private String getRandomString(int len){
    final String AB = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";  
    Random rand = new Random();  
    StringBuilder sb = new StringBuilder(len);
    for(int i=0; i<len; i++)
         sb.append( AB.charAt( rand.nextInt(AB.length()) ) );  
    return sb.toString();  

You can call this java utility method to generate a random String of the choice of your own length.

getRandomString(int length); 

Note:Here length is the parameter which accepts the integer type and generates and returns a length character String.

For example:
     This is how you use this utility method.

 String randomStr = getRandomString(4);
 String ranString = getRandomString(8); 

Sample output(s):


Monday, 16 December 2013

Recover files on pendrive that has been changed to shortcuts

Getting back to the topic, to recover your data (which is converted to shortcuts), just follow these simple steps:
  • Connect your pen/flash/external drive to your computer.
  • Go to My Computers and check what drive it is assigned for example F: or G: drive. Lets assume its G: (replace it with correct letter as applicable in your case).
  • Click on “Start” –>”Run”–> type cmd and hit OK. This will start command prompt.
  • Enter the following command and hit “Enter”.
    attrib -H -R -S /S /D G:\*.*
  • Now check the pendrive for the files.
    If the above command doesn't work then use a third-party tools that you can find on the internet. One cool tool i found is Piriform's  Recuva.

    Recuva recovers files deleted from your Windows computer, Recycle Bin, digital camera card, Memory Sticks, or MP3 player. And notably it's free of cost. Post your comments if you found any helpful or better tools.

Sunday, 13 January 2013

How to Install Smarty on Windows

Installing Smarty on Windows

This document assumes that you have configured PHP5, Apache Webserver already.
  1. Download Smarty
  2. Unzip the content of Smarty zip file to smarty folder. So it appears as  C:/server/smarty
  3. Create two folders templates_c  and cache inside it. So it appears as C:/server/smarty/templates_c and C:/server/smarty/cache
  4. Browse to PHP Installation Directory and edit php.ini's include_path and add the location of the libs folder. Example: include_path = ".;C:/server/smarty/libs/;"
  5. Restart IIS/Apache
  6. Create a new folder in htdocs (root) folder and rename it to smarty. C:\server\htdocs\smarty
  7. Create two folders configs and templates inside it. C:\server\htdocs\smarty\configs and C:\server\htdocs\smarty \templates
  8. Smarty configuration is done. Create two scripts index.php and index.tpl to test Smarty template engine.
  9. Place index.php inside C:\server\htdocs\smarty and index.tpl inside C:\server\htdocs\smarty \templates
  10. Open the web browser and type in the URL http://localhost/smarty.



// load Smarty library


$smarty = new Smarty;

$smarty->template_dir = ‘C:\server\htdocs\smarty \templates’;

$smarty->conf ig_dir = ‘C:\server\htdocs\smarty\configs’;

$smarty->cache_dir = ‘C:/server/smarty/cache’;

$smarty->compile_dir = ' C:/server/smarty/templates_c’;







Hello, {$name}



Saturday, 29 December 2012

How to connect GPRS in china mobile

Step 1:

1.Goto settings.
2.CONNECTION->Data accounts.
4.Account name(any name you wish to have).
5.APN->(your accesspoint name e.g."").
6.username and password->(leave it blank).
7.Auth. Typd->Normal.

Now you have successfully configured the internet settings in your phone.Now follow step2 to finish the process to connect to Internet.


1.After editing the settings save and go back for once.
2.Goto Wap settings.
3.Under Wap profiles select CHINA MOBILE WAP.
4.Edit and give home page to
7.Data accounts->select the Data account you saved in step1.
8.Save and Back.
9.Profile settings->select the wap profile you saved in the previous step.
10.Goto your wap browser and select Goto Homepage.HOPE you see Google home page.

Friday, 28 December 2012

How to set HOME variable in windows 7

You need to add an environment variable: This is how i did it on windows 7 and it will be the same for window 8 too.
  • Click start button.
    1. Right click "Computer"
    2. Click "Properties"
    3. Click "Advanced System Settings"
    4. "Environment variables" in "Advanced" tab.
    5. Click the "New" button to create a new variable under user variables pane.
    6. Enter "HOME" in the name field
    7. Enter "%USERPROFILE%" or some other path in the value field. (HOME should point to your home directory e.g. C:\Users\Tom. Ensure correct case!                                                              E.g. "C:\users" instead of "C:\Users" may cause problems!)
    8. Click OK, and OK again. Hurray! You have just added the Home directory on Windows.