Sunday, January 11, 2015

Maven Install


For Windows:

  • You need a Java Development Kit (JDK).
  • Explode maven. say C:\Program Files\Apache Software Foundation/apache-maven-X.X.X
  • Add the following environment variables.
    • Set JAVA_HOME=C:\Program Files\Java\jdk-X.X.X
    • Set Path=%Path%;%JAVA_HOME%\bin
    • Set M2_HOME=C:\Program Files\Apache Software Foundation\apache-maven-X.X.X
    • Set M2=%M2_HOME%\bin
    • Set Path=%Path%;%M2%
  • Run mvn --version

For Linux:

~$ tar -xzvf apache-maven-x.y.z-bin.tar.gz
~$ sudo cp -R /extracted/path/to/maven/apache-maven-x.y.z /usr/local
~$ cd /usr/local/apache-maven-x.y.z/bin/
~$ sudo ln -s /usr/local/apache-maven-x.y.z/bin/mvn /usr/bin/mvn

HTML encoder

If you need to encode HTML/CSS/JavaScript code.

say: To write on blog

Use : http://www.opinionatedgeek.com/DotNet/Tools/HTMLEncode/Encode.aspx

encode your code and paste it to blog post.

Thursday, December 25, 2014

Create Oracle User

--Selct all users
SELECT * FROM ALL_USERS;
SELECT * FROM SYS.USER$;
/
--To change the password for a user
ALTER USER username IDENTIFIED BY new_password;
/
--To Dropping a Database User CASCADE  Objects
DROP USER user2delete CASCADE;
/
--create new user
--This CREATE USER statement would create a new user called user_apn in the Oracle database whose password is user_apn
DROP USER user_apn CASCADE;
/
CREATE USER user_apn IDENTIFIED BY user_apn;
/
GRANT CONNECT, RESOURCE TO user_apn;
/

Thursday, November 20, 2014

Oracle Password Expired

Run the following command

> sqlplus system/admin@localhost/xe

SQL*Plus: Release 11.2.0.2.0 Production on Thu Nov 20 16:36:23 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

ERROR:
ORA-28001: the password has expired

Changing password for system
New password:
Retype new password:

or development you can disable password policy if no other profile was set (i.e. disable password expiration in default one):

ALTER PROFILE "DEFAULT" LIMIT PASSWORD_VERIFY_FUNCTION NULL;

Tuesday, September 23, 2014

Get System ( Desktop / Laptop ) Information


Open the command prompt (windows + R and type cmd) on windows.
The basic command in wmic.

Serial Number

> wmic bios get serialnumber

O/P

SerialNumber
XNNXXXX

Product Id

> wmic os get "SerialNumber"

O/P
SerialNumber
NNNNN-NNN-NNNNNNN-NNNNN

More Info

> wmic computersystem get model,name,manufacturer,systemtype

you can match different options and get more inofrmation.

Tuesday, June 17, 2014

MEAN STACK Setup on Windows

Set up Mean Stack Environment


  • Download node.exe from nodejs.org
  • Download npm-1.4.9.zip from http://nodejs.org/dist/npm/.
  • Explode npm-1.4.9.zip to exploded_npm (say).
  • Move node.exe to exploded_npm.
  • Download Git from http://git-scm.com/downloads and install.
  • Add these entried to your '.gitconfig' file in your user directory (go to %USERPROFILE%):
[http]
    proxy = http://<proxy address>:<proxy port>

[https]
    proxy = https://<proxy address>:<proxy port>
  • Add into the environment variable path
  1.   <GIT_HOME>\Git\bin\
  2.   <NODE_JS_HOME>\npm-1.4.9\
  • open command prompt.
  • run npm.cmd
  • execute command
    > npm config set proxy http://"<username>:<password>"@<proxy address>:<proxy port>
   
  • run command
> mean init mean-tutorial
  • Navigate inside mean-tutorial
> cd mean-tutorial
> npm install

Wednesday, February 5, 2014

JavaEE worspace setup

Followings are the tools and adds-on (server setup could be required e.g sonar)

  • Eclipse (luna) with following add-ons.
    • Subversive (for SVN)
    • TestNG
    • JAutodoc
    • SonarQube
    • Toad Extension