Wednesday, February 15, 2017

Get rid of windows user getting locked everytime

If  you have recently changed your password and your user id is getting locked on a windows system in a LAN network.
 Then, this can be due to your connection  to a network share.
 The connection is using the old password from cache and  locking your ID  everytime .

Procedure to fix is as below :

type "net use" in command prompt
This will display all your connected sessions to network share

Now, Disconnect the network drive
Once again , type "net use" in command prompt .

Now type "klist purge" in command prompt.
This will remove the Kerberos authentication ticket from the machine . This was the one which was locking you everytime.

Thats it.

Thursday, February 2, 2017

Learning Java

Static methods in java belong to the class (not an instance of it). They use no instance variables and will usually take input from the parameters, perform actions on it, then return some result. 

Instances methods are associated with objects and, as the name implies, can use instance variables.


My Observation:
 If you try to invoke a static method using an instance object, you only get a warning that static method must be accessed in  a static way . Code will still run.  


An abstract class can have method implementations.
 

An abstract method does not have any implementation.
Serialization will convert the object into byte array and that can be saved  on disk which can be deserialized later . 

EJB is a part of JAVA EE or J2EE (Enterprise edition) .
J2SE is the standard edition of JAVA.
Hibernate is the open source api developed in Java only .
Basically in EJB , you have a remote interface ( to call the EJB remotely ) ,
a local interface or Home interface  ( to call the EJB locally ) and an implementation class.

A message driven bean only has an implementation class.

All the three Enterprise Java Bean's namely session bean, entity bean and message driven beans are collectively called as Enterprise beans as well .

sql commands

Find version of Oracle database instance 
 
SELECT * FROM V$VERSION
or
SELECT version FROM V$INSTANCE
 
 
Find the current ORACLE_SID you are logged in 
 
sqlplus sys as sysdba;

select name from v$database;
select instance from v$thread;
select ora_database_name from dual;
 
Find the current schema name you are logged in 

select sys_context('userenv','instance_name') from dual; 
select user from dual; 
select * from global_name; 
 
 
Find location of alert logs, alert log file name will be alert_ORACLE_SID.log
 
show parameter background;  
 
 
To find out the location of diagnostic info like trace , logs etc. 
select * from v$diag_info; 

Wednesday, February 1, 2017

MicroSoft Office Tips and Tricks

In Word 2013 and Word 2010 you can go to specific page in the Word document using the Find and Replace dialog.
To display the Find and Replace dialog, Navigate to Home menu and click on the drop down arrow under Find menu at the right corner


Microsoft excel go to next line in cell
  1. Double-click the cell in which you want to insert a line break.
  2. Click the location where you want to break the line.
  3. Press Alt+Enter to insert the line break.