December 09, 2014

Manually Adding Dependency in Spring MicroSoft SQLServer JDBC Driver

Hi Friends,

Today, I’ve spent more than 40 minutes in understanding the process and setting up the SQLServer JDBC Driver in Spring manually

Pre-requisites

Maven (Download from http://maven.apache.org/download.cgi and add the maven path to environment variables)

Procedure

  1. Download the latest Microsoft JDBC driver for SQL Server from the following official link http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774
  2. I’ve selected sqljdbc jar version 4.0
  3. Navigate to the extracted folder where .jar files available in command prompt
  4. Execute the following command
  5. cmd> mvn install:install-file -DgroupId=com.microsoft.sqlserver.jdbc -DartifactId=sqljdbc -Dversion=4.0 -Dpackaging=jar -Dfile="sqljdbc4.jar"
     
  6. Now you should be able to see the downloading and moving the corresponding .jar and .pom files. Then a message “BUILD SUCCESS” will appear in command prompt.
  7. Add the following dependency to your pom.xml
<!-- Database -->
<dependency>
<groupId>com.microsoft.sqlserver.jdbc</groupId>
<agtifactId>sqljdbc</agtifactId>
<version>4.0</version>
</dependency>

    Now you run the project and enjoy the usage of SQLServer Database with Spring.

    Please send your feedback and comments to psrdotcom@gmail.com

    Blogger Labels: Dependency,MicroSoft,SQLServer,JDBC,Driver,Friends,Procedure,Download,Server,version,Navigate,folder,Execute,DgroupId,DartifactId,Dversion,Dfile,message,BUILD,Database,usage,feedback,sqljdbc,groupId,artifactId

    December 08, 2014

    Adding Company (Exchange) e-Mail account in Android Lollipop

    Hi friends,

    Today I’ll be explaining the steps involved in adding an e-mail account in Android 5/L (Lollipop)

    Procedure

    1. To add acount, you can follow any one of the following approaches
      • Click on “eMail”->Settings->”Add Account”
      • Select “Settings”->”Accounts”->”Add Account”
    2. Select “Exchange”
    3. Click “OK”
    4. Enter the e-mail address
    5. Click “Next”
    6. Enter your password details
    7. Browse the certificate if you have your company e-mail certificate
    8. Click “Next”
    9. Enter username as “domainname\userno” if it’s applicable for your company or else it will be your e-mail address itselft which is by default filled in.
      • Ex: lnties\XXXXXX
    10. Change server to your mail server
      • Ex: “mail.larsentoubro.com”
    11. Click “Next”
    12. Select the sync options
    13. Click “Finish”

    Now the sync process will start and fetch your mails.

    You can change the sync options in settings

    Happy e-mailing guys Smile

    Please send your feedback and comments to psrdotcom@gmail.com

    Blogger Labels: Company,Exchange,Mail,account,Android,Lollipop,Procedure,Click,Settings,Select,Accounts,Enter,password,Browse,certificate,XXXXXX,Change,server,options,Finish,feedback,sync

    October 31, 2014

    Change IP Address and DNS from static to DHCP and vice versa in Windows Command Line Dynamically using Batch file script

    Hi friends,

    I was frequently changing my system network from static to dynamic.

    I was fed-up with the manual changes by entering the static IP address and changing it to dynamic.

    I though of creating a batch file, which requests user to select options and proceed further.

     

    I found something on Internet, just modified it for my purpose and thought of sharing with you all.

     

    • Check your network name
      • cmd> netsh interface show interface
    • It will list all the network interfaces connected to your system
      • Select the network which you want to change the settings
    • Modify the below code with appropriate network name, IP address, subnet, gateway and DNS server

    @echo off

    set NETWORK="Local Area Connection"
    set IP=10.9.40.95
    set SUBNET=255.255.255.0
    set GATEWAY=10.9.40.47
    set DNSSERVER=192.168.178.1

    echo Choose:
    echo [S] Set Static IP
    echo [D] Set DHCP
    echo.

    :choice
    SET /P C=[S,D]?
    for %%? in (S) do if /I "%C%"=="%%?" goto S
    for %%? in (D) do if /I "%C%"=="%%?" goto D
    goto choice

    :S
    @echo off
    echo "Setting Static IP Address, Subnet Mask and DNS Server"
    netsh interface ip set address %NETWORK% static %IP% %SUBNET% %GATEWAY% 1
    netsh interface ip set dnsservers %NETWORK% static %DNSSERVER% primary
    netsh interface ip show config
    pause
    goto end

    :D
    @echo off
    echo "Resetting IP Address, Subnet Mask and DNS server For DHCP"
    netsh interface ip set address name=%NETWORK% dhcp
    netsh interface ip set dns %NETWORK% dhcp
    ipconfig /renew

    echo "New IP Address, Subnet Mast and DNS Server for %computername%:"
    netsh interface ip show config
    pause
    goto end

    :end

    Now enjoy the feature of changing IP address with 3 clicks

     

    Please send your feedback and comments to psrdotcom@gmail.com

    Blogger Labels: Change,DHCP,vice,Windows,Command,Line,Batch,script,system,user,options,Internet,purpose,Check,interface,interfaces,Select,settings,Modify,gateway,server,NETWORK,Local,Area,Connection,SUBNET,DNSSERVER,Choose,Static,Mask,Mast,feedback,netsh,goto,config

    October 16, 2014

    Convert windows drive or disk file system from FAT32 to NTFS without losing data

    Hi all,

    I had a problem with my external hard disk when copying some 25GB file.

    I had troubleshoot the problem and understand that, my hard disk file system is FAT32, which can only copy max 4GB single file size

     

    I was thinking without losing my data, how can I change the file system, so that, I copy more than 4GB sized single files

    Then I come across the following commands in Windows

    1) chkdsk : Check disk

    2) convert : Convert disk file system

     

    chkdsk command

    Syntax

    cmd> chkdsk volume_letter: [options]

    Example

    Checks for disk errors and fix it

    cmd> chkdsk I: /f

     

    convert command

    Syntax

    cmd> convert volume_letter: FS:NTFS [options]

    Example

    Convert volume from FAT to NTFS in verbose

    cmd> convert I: /FS:NTFS /V

     

    Possible Errors with solutions

    Insufficient Memory

    Reason

    Nearly 4 GB files in existing FAT32 system

    Solution

    Move the files to local drive, do chkdsk and then convert

     

    References:

    http://ss64.com/nt/chkdsk.html

    http://www.computerhope.com/convert.htm

     

    Blogger Labels: Convert,disk,system,NTFS,data,size,Windows,Check,Syntax,options,Example,Checks,errors,Possible,solutions,Insufficient,Memory,Reason,Solution,Move,References,chkdsk,volume_letter

    August 15, 2014

    Android L Preview on Nexus 7

    Hi all,

    Today I’ve finally loaded the Android L Developer Preview on my Nexus 7 Wi-Fi 32GB

     

    Its so simple to load the Android L. Here is the procedure

     

    Warning

    All the device data will be erased. Please take backup of all your data before doing this upgrade.

    Not all the applications will work since it’s just a developer preview OS version

     

    Pre-requisites

    • Android SDK with latest update
    • Android L Preview OS image
    • Make sure that, your device has more than 60 to 70 percent of battery
    • Enable USB Debugging
    • Connect the device to computer with USB cable. Make sure that, it has detected by computer

     

    If you don’t’ have the pre-requisites, please follow the below procedure

     

    Android SDK Installation & Update

    1. Download the Android SDK from this link
    2. https://developer.android.com/sdk/index.html
    3. Open SDK Manager.exe
    4. Install Tools, Android L Preview, Extras
    5. Update latest version if available

     

    Android L Preview OS Image Download

    1. Download the corresponding Android L OS image for your device from this below link

     

    Installation Process

    1. Extract the downloaded image to a folder
    2. From Android SDK folder, navigate to “platform-tools” folder, copy adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll and fastboot.exe
    3. Paste in the Android L Preview extracted folder
    4. Finally the extracted folder should look like this
      • image
    5. The highlighted files has been copied from SDK->platform-tools folder
    6. Open the command prompt and navigate to OS extracted folder
      • Tip
        • Open the folder in explorer window. Hold “Shift” and right click on mouse
        • Select “Open command Window here” option
    7. Connect the device to computer
    8. Put device into “fastboot” mode by rebooting
      • cmd> adb reboot fastboot
    9. Device gets rebooted to fastboot
    10. If device is locked, then please unlock it
      • cmd> fastboot oem unlock
    11. Now, run the “flush-all” script
      • cmd> flush-all
    12. It takes some time to install the image
    13. After completing the installation process, it asks you to press “enter/return” button to exit
    14. Press enter/return button for confirmation
    15. Device gets restarted, Android L Preview will be displayed on the device
    16. To lock the device, execute following commands
      • cmd> adb reboot fastboot
      • cmd> fastboot oem lock
    17. Like a new device, enter all the details like your Gmail account, Wi-Fi connection etc.
    18. Enjoy the features of Android L Developer Preview OS

     

    Please send your feedback and queries to psrdotcom@gmail.com
    Blogger Labels: Android,Preview,Nexus,Developer,Here,procedure,device,data,version,requisites,Make,Enable,Connect,computer,Installation,Update,Download,index,Open,Manager,Install,Tools,Extras,Image,developers,Extract,folder,From,platform,AdbWinApi,AdbWinUsbApi,Paste,explorer,Hold,Shift,Select,option,mode,script,confirmation,account,connection,Enjoy,feedback,fastboot,Gmail

    August 14, 2014

    Finding IP address to MAC and vice versa on same network (subnet) or different subnet which is reachable by ping

    Hi all,

    After long time I got a chance to write the blog.

     

    This time it is related to networking.

     

    Finding out which all the system up on the network

    Syntax

    cmd> nmap –sP < regex IP >

    Example

    cmd> nmap –sP 192.168.1.*

     

    Finding MAC address of a device which is connected in same network

    Syntax

    cmd> ping <broadcast address>

    cmd> arp –a [ <IP address> ]

     

    Example

    cmd> ping 192.168.1.255

    cmd> arp –a –> Gives all the IP address and MAC address in the same subnet network

    cmd> arp –a 192.168.1.25 –> Give the MAC of the specified IP address

     

    arp –a : Lists all the IP addresses which are recently got into network with its MAC addresses

     

    Finding MAC address of a device which is connected in same network but different subnet

    Syntax

    nbtstat –A <IP address>

    Example

    nbtstat –A 192.168.2.45

     

    Please send your comments and feedback to psrdotcom@gmail.com

    June 04, 2014

    PhoneGap/Cordova iOS App Full Screen/Hide Status Bar completly

    Hi Friends,

    When we are working with cross platform application development like PhoneGap/Cordova, we might be facing issue with status bar.

    Problem:
    Status bar comes on the application though we want to have app in a full screen.

    iOS Solution:
    • Add the following 2 keys in .plist file
      • view controller-based status bar appearance: NO
      • status bar is initially hidden : YES

    I hope this will help you solving your issue.

    Please send your feedback and comments to psrdotcom@gmail.com

    Featured Post

    Java Introdcution

    Please send your review and feedback to psrdotcom@gmail.com