Programming stuff

Linux Command : cp

-a : Preserve the specified attributes such as directory an file mode, ownership, timestamps, if possible additional attributes: context, links, xattr, all.
-v : Explain what is being done.
-r : Copy directories recursively.


Source : http://www.cyberciti.biz/faq/copy-folder-linux-command-line/

How to get Mysql Column Names


How can I see table constraint on Mysql?

I found in stackoverflow.


Show / Hide Android Saft Keyboard

Source : Stackoverflow

Android Programming Tip : How to know key presses in edittext?


Jpa Tip : Transient Fields

Transient entity fields are fields that do not participate in persistence and their values are never stored in the database (similar to transient fields in Java that do not participate in serialization). Static and final entity fields are always considered to be transient. Other fields can be declared explicitly as transient using either the Java transient modifier (which also affects serialization) or the JPA @Transient annotation (which only affects persistence):

Source : objectdb.com

Android Rounded ImageView

I found following code from stackoverflow.


How can I encrypt user password in my Java application?

When you code an application that has a user log-in, you must use encryption. Encryption protects your members who use your application in case of any unauthorized access to members table in database. Firstly members

may use the same password in another web site, it’s quiet common that a lot of user use only one password for all sites. Secondly, even if you can prevent unauthorized access to your database, hackers can still access your members’ information with the passwords they obtained. If you want to learn more about “why do I have to encrypt user password?” you can read this discussion in stackexchange.


So, how can I encrypt password?

You can find a lot of encryption libraries to use in Java. I use Jaspyt library in my Java projects .

You can find some features for Jaspyt below:

  • High-security, standards-based encryption techniques, both for unidirectional and bidirectional encryption. Encrypt passwords, texts, numbers, binaries…
  • Transparent integration with Hibernate.
  • Suitable for integration into Spring-based applications and also transparently integrable with Spring Security.
  • Integrated capabilities for encrypting the configuration of applications (i.e. datasources).
  • Specific features for high-performance encryption in multi-processor/multi-core systems.
  • Open API for use with any JCE provider.

How to use Jaspyt in java projects?

Firstly you have to download Jaspyt files from Jaspyt web site. Then you must add jar file named jasypt-1.9.2 to your project. (1.9.2 is version number, your number may be different.) Add the following lines to your projects.


It’s easy, huh.

With Jasypt, checking a password can be as simple as…


If you use better libraries than Jasypt you can leave a comment below.


Starting MySQL from the Windows Command Line

to start :

shell> C:\Your Mysql Server Path\bin\mysqld

to stop :

shell> C:\Your Mysql Server Path\bin\mysqladmin -u root shutdown


Source : dev.mysql.com


My Development Tools : Wamp Server


WAMP is a windows web development environment that allows you to create web applications with Apache , Php Mysql. (Windows – Apache – Php – Mysql ).  You can install it after you download a compatible file from http://www.wampserver.com/en/ . Wamp is very easy to install and takes about an avarage of 5 minutes to complete depending on your computer’s hardware configuration. If there is an IIS (internet information server) or another application using port 80 already installed, wamp server won’t start apache server after installation. To solve this problem you can change the port used by Apache Server.

How can I change Apache Port in WAMP?

To do this, open http.conf file in wamp directory with text editor. (C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf this is my directory path, your path may be a little different). And change Listen [::0]:80 lines to Listen [::0]:8888. Then click “restart all services” button on Wamp Server tryicon menu. That’s all.

You can test new port with the following Url : http://localhost:8888/


Page 1 of 2

Powered by WordPress & Theme by Anders Norén