December 17, 2014

Android insufficient permissions for device

Hi Friends,

I was having an issue when connected my friend's Micromax Doodle to my Ubuntu with the following error
"insufficient permissions for device"

Resolution

  1. Open Terminal
  2. Kill the server by typing the following command
    • $ adb kill-server
  3. Now, start the server
    • $ adb start-server
  4. On your device, a pop-up might come asking for granting the permission
  5. Click on "Yes" for approving the access
  6. Now, check your device status with the following command
    • adb devices
  7. With the above command, you should be able to see devive IMEI and device name
Enjoy the Ubuntu and Android combination :)

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

Pandoc - Easily convery file format from one markup to another markup language

Hi Friends,

Today I come across very useful tool for easily converting/creating different markup languages.

I personally interested in converting/creating HTML, PDF via Latex, MicroSoft Word .docx files

Try Online

To try the conversion online, please click on below link
http://johnmacfarlane.net/pandoc/try
 

Procedure

  1. In "from" dropdown, you can select "Markdown" and "to" dropdown, select "HTML5"
  2. Type the following content
    • % PSR
      PSR Header
      ==========1234

      PSR Sub Heading
      ---------------
      sub heading contents
  3. Click on "convert" button
  4. Now you will be able to see content converted into HTML5 with appropriate tags.

References

http://johnmacfarlane.net/pandoc/

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

December 14, 2014

Install and configure latest Oracle Java JDK 8 and 7 in Ubuntu

Hi friends,

Today, I'll try to explain the way how to install the latest Oracle Java JDK 8 and 7.

Pre-requisites

Ubuntu 12.02 or above

Procedure

We can install in two ways
  1. Using PPA
  2. Manual Installation

PPA installation

  • Open terminal from "Applications" or press key combination "Ctrl+Alt+T"
  • Type the following commands in sequence
    • $ sudo apt-add-repository ppa:webupd8team/java
    • $ sudo apt-get update
  • To install latest JDK 8, type the following command
    • $ sudo apt-get install oracle-java8-installer
  • To install latest JDK 7, type the following command
    • $ sudo apt-get install oracle-java7-installer
  • Once the download complete, it will ask for agree for terms and conditions
  • Click on "OK" to complete the installation

Manual Installation

  • Download the Oracle JDK from the following official link
  • Extract the downloaded zip (Example "jdk-1.8.0.25.tar.gz")
  • It will create a folder with name "jdk-1.8.0.25"
  • Create a folder "java-8-oracle" under "/usr/lib/jvm" folder
    • $ sudo mkdir -p /usr/lib/jvm/java-8-oracle
  • Move the folder contents to /usr/lib/jvm/java-8-oracle
    • $ mv jdk-1.8.0.25/* -rf /usr/lib/jvm/java-8-oracle/

Configure the java executables

Configuration can only be done if more than one JDK is installed.

To configure java execute the following command

$ sudo update-alternatives --config java

Example output if Java 7 and Java 8 installed
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                     Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-7-oracle/jre/bin/java   2         auto mode
  1            /usr/lib/jvm/java-7-oracle/jre/bin/java   2         manual mode
* 2            /usr/lib/jvm/java-8-oracle/jre/bin/java   1         manual mode

Similar way you can do for javac, javaws and other executables

Configure javac

$ sudo update-alternatives --config javac

Configure javaws

$ sudo update-alternatives --config javaws

Happy java coding guys :)

References

  1. http://askubuntu.com/questions/121654/how-to-set-default-java-version
  2. http://askubuntu.com/questions/521145/how-to-install-oracle-java-on-ubuntu-14-04
  3. http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-jdk-6-7-8-or-jre

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

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

    Featured Post

    Java Introdcution

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