Thursday, 14 September 2017

All Fields Greyed on Unallocated Space

To delete volumes of pen drive giving error of unallocated space

If you are facing error for unallocated space

Go to cmd with administrator privileges

type  DISKPART

type list volume

Check number of removable drive suppose 3.

delete volume 3

And your partition on that drive will be deleted.

Wednesday, 13 September 2017

Basics of Bitcoin and Blockchain

For Blockchain & Bitcoin understanding,


If you are looking for general use of Bitcoins,  https://bitcoin.org/en/

For technical & nontech people, it is always good to understand terms in Plain English.

In case of Bitcoins, it is possible: http://amzn.to/2vTOaMM

These are the books you can refer because reading a tutorial might lead you into Confused state:


For Beginners:            Blockchain Basics: A Non-Technical Introduction in 25 Steps

For implementation:    Blockchain: Blueprint for a New Economy

For Bitcoin & block chain:  Mastering bitcoin programming the open blockchain 2nd edition

For python freaks, here is a treat:  https://github.com/bigchaindb/bigchaindb

If you want to try out Bitcoins for windows, you can download it from here:

https://www.bitcoinunlimited.info/download

Monday, 28 August 2017

Raghupati Raghav Original Version

The version we generally hear is actually "modified" (?) by M.K.Gandhi.

Original one is written by Shrimad Lakshmanacharya.

I have added bits of modification but without losing its sense most of verses from Sanskrit language introduced at the end.

रघुपति राघव राजाराम,
पतित पावन सीताराम

सीताराम सीताराम
भज मन पावन सीताराम
रघुपति राघव राजाराम,
पतित पावन सीताराम

सुंदर विग्रह मेघश्याम,
गंगा तुलसी शालग्राम
रघुपति राघव राजाराम,
पतित पावन सीताराम

भद्रगिरीश्वर सीताराम,
भगत-जनप्रिय सीताराम
रघुपति राघव राजाराम,
पतित पावन सीताराम

जानकीरमणा सीताराम,
जयजय राघव सीताराम
रघुपति राघव राजाराम,
पतित पावन सीताराम
============= Original Part ends =============

जय रघुनन्दन जय श्रीराम
जानकीवल्लभ् राजाराम
रघुपति राघव राजाराम,
पतित पावन सीताराम

दशरथनन्दन राजाराम
कौशलचन्द्र जय श्रीराम
रघुपति राघव राजाराम,
पतित पावन सीताराम


जय श्रीराम !

Tuesday, 10 January 2017

How to reach from Swargate to Vishrantwadi

If you are arriving in the night at swargate between 9:00 to 10:00 pm, you can reach to vishrantwadi quickly as follows:

  1. Take the Pune station bus from outside of Swargate City bus Depot.

    Cost = Swargate to Pune Station = Rs. 10/-
  2. When conductor will say this is the last stop, board there.
  3. Now you are at the bus stand of Pune station. It is a small one and having 3 tracks which is its identity.
  4. You will get next bus within 10-15 min approx for Vishrantwadi and last bus will be on 11:30 pm.

    Cost = Pune Station to Vishrantwadi = Rs. 15/-
Otherwise, you can wait inside City bus Depot for the bus from Swargate to Vishrantwadi which costs Rs 20/- and a long wait time unless you are lucky ;)


Hope this helps,

Happy Journey!

Tuesday, 19 July 2016

Fix/Solution of MySQL 5.7 warning for SSL in Netbeans/Eclipse

If you are running MySQL 5.7.x and Netbeans 8.1 and you come across this warning,

"WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification." 
Don't worry! The culprits are:

1. MySQL 5.7.x (Actually its a good feature but really annoying to new users)

2. MySQL Java Connector Jar File

Solution for Culprit 1:

If your traditional code for JDBC is like:

 /*
  * To make java and mysql connectivity
  */
 package com.java.databases;
 import java.sql.*;
 /**
  *
  * @author mayur
  */
 public class Java2MySQL {
   public static void main(String[] args) {
     String dbname = "ram_db";
     String uname = "root";
     String passw = "ramayan";
     String url = "jdbc:mysql://localhost:3306/";
     String driver = "com.mysql.jdbc.Driver";
     try {
       Class.forName(driver);
       System.out.println("Connection is Registered");
       Connection conn = DriverManager.getConnection(url+dbname, uname, passw);
       System.out.println("Connection is Open");
       conn.close();
       System.out.println("Connection is closed");
     } catch (Exception e) {
       System.err.println("Something is wrong!! Please wait while we fix it");// e.printStackTrace();//(Something is wrong!! Please wait while we fix it);
     }
   }
 }

So the modified code is:

 /*
  * To make java and mysql connectivity
  */
 package com.java.databases;
 import java.sql.*;
 /**
  *
  * @author mayur
  */
 public class Java2MySQL {
   public static void main(String[] args) {
     String dbname = "don_db";
     String uname = "root";
     String passw = "";
     String url = "jdbc:mysql://localhost:3306/"+dbname+"?autoReconnect=true&useSSL=false";
     String driver = "com.mysql.jdbc.Driver";
     try {
       Class.forName(driver);
       System.out.println("Connection is Registered");
       Connection conn = DriverManager.getConnection(url, uname, passw);
       System.out.println("Connection is Open");
       conn.close();
       System.out.println("Connection is closed");
     } catch (Exception e) {
       System.err.println("Something is wrong!! Please wait while we fix it");// e.printStackTrace();//(Something is wrong!! Please wait while we fix it);
     }
   }
 }

You will find that we have appended [+dbname+"?autoReconnect=true&useSSL=false" ] to the part after URL of database.

Example:

 Connection con = DriverManager.getConnection
 ("jdbc:mysql://localhost:3306/"+dbname+"?autoReconnect=true&useSSL=false","root","");

Solution for Culprit 2:

Change the driver version of mysql connector other than 5.1.39. I have checked for 5.1.38,5.1.36.

Just use these versions and you program will be free from warning.

I have tested this with Eclipse also.

Hope this will help you !

Saturday, 3 October 2015

Installing CUDA on Ubuntu 12.x/14.x Distros

Hi All,

This has been a long time that I have not published articles.  I am trying to learn CUDA for Parallel programming architecture.

First few words about CUDA [a/c to my understanding]:

Compute Unified Device Architecture[CUDA] is technology developed by NVIDIA. The purpose of

CUDA is to let the processor for executing the programs/instructions in parallel manner. Simple !!



Now let's see most cumbersome task that we all are waiting for Install NVIDIA SDK on Ubuntu

To test are NVIDIA  drivers going to work fine for us,

first we will Install ubuntu as under windows installation.

Copy cuda_6.5.14_linux_64.run on desktop of ubuntu.

Log in as root

run update for ubuntu
# apt-get update

To install compiler
# apt-get install build-essential

To switch to Text,

Alt+Ctrl+F1

Enter username and password

login as root.

stop GUI service

# service lightdm stop

# chmod +777 cuda_6.5.14_linux_64.run

# ./cuda_6.5.14_linux_64.run

if absolute path demanded by NVIDIA, press y

and enter for /home/user option.

It will say installation skipped

then reboot with

# reboot -h

Now, again with GUI do following steps:

Login as root.

Switch to text console

Alt+Ctrl+f1

login as root

# service lightdm stop

#./cuda_6.5.14_linux_64.run

now reboot system manually

Now after system gets booted, enter two commands as general user:

 export PATH=/usr/local/cuda-6.5/bin:$PATH
 export LD_LIBRARY=/usr/local/cuda-6.5/lib64:$LD_LIBRARY_PATH

Now we are ready to run our hello world program for NVIDIA CUDA.

As the name suggests. the extension of our program will be .cu

So copy-paste "hello world" from this link in gedit

http://computer-graphics.se/hello-world-for-cuda.html

Save to desired directory.

Now time to compile and run.

compile with:  nvcc -cuda hello.cu
run with:      ./a.out

You output will be:

Hello World !!

Ta..Da... CUDA has been installed successfully.

Installing FreeGLUT in CodeBlock



Install FreeGLUT (Be Careful )

1.       Download : http://www.transmissionzero.co.uk/software/freeglut-devel/
From above location, download freeglut-mingw.zip
Extract the file in any folder.

2.       Now create two copies of GNU GCC Compiler.

a.       First is 32 bits and copy following files as directed:
        
File
From (FreeGLUT\)
To(MinGW32\)
freeglut.dll
bin
bin and C:\Windows\System32\
Freeglut.h
Freeglut_ext.h
Freeglut_std.h
glut.h  (optional as in previous step)
include\GL
include\GL
libfreeglut.a
libfreeglut_static.a
lib
lib

b.      Second one, 64 bits is other copy for it do as follows:

      File
From (FreeGLUT\)
To(MinGW64\)
freeglut.dll
bin\x64
bin and C:\Windows\SysWOW64\
Freeglut.h
Freeglut_ext.h
Freeglut_std.h
glut.h
include\GL
include\GL
libfreeglut.a
libfreeglut_static.a
lib\x64
lib

3.       Now move to settings of Compiler in CB.
a.  For 32 bits Compiler version,

Don’t forget to update Toolchain Executables as per need ,here, C:\TDM-GCC-32

Linker Settings =>Link Libraries
C:\TDM-GCC-32\lib\libfreeglut.a
C:\TDM-GCC-32\lib\libfreeglut_static.a

In “Other Linker Options”
-lOpenGL32 -lglu32 –lfreeglut

Search Directories Tab => Compiler
C:\TDM-GCC-32\include
Search Directories Tab => Linker
C:\TDM-GCC-32\lib

b.  For 64 bits Compiler version,
Don’t forget to update Toolchain Executables as per need ,here, C:\TDM-GCC-64

For toolchain Executables (in order of appearance)
gcc.exe
g++.exe
g++.exe
ar.exe
windres.exe
mingw32-make.exe

Linker Settings =>Link Libraries
C:\TDM-GCC-64\lib\libfreeglut.a
C:\TDM-GCC-64\lib\libfreeglut_static.a

In “Other Linker Options”
-lOpenGL32 -lglu32 –lfreeglut

Search Directories Tab => Compiler
C:\TDM-GCC-64\include
Search Directories Tab => Linker
                  C:\TDM-GCC-64\lib

4.       Now, create empty project with choosing compiler suitable to your OS. Right click on Project and go to the project properites and Build Targets => build type => GUI application
5.       Now download and extract this zip file:
6.       And place *.h and *.cpp files into CB project locations.
7.       Now again confirm Compiler from Rt Click on project => Build options.
8.       Now rebuild => build => run.

                You will get this output: