Monday, October 8, 2012

Single Sign In Web User ID


The time mail reached my mail box on Innovation, my mind has been wondering with the different ideas needs to be present on this… But, routine things came up, busy with daily deliverable and project items. I was searching for some free time to be part of Innovation. So, finally I got some time to share my new idea with all of you now. Hope, this looks small but make you feel interesting.
What is the Problem we are facing in regular days?
We are regularly accessing many number of web sites with different user credentials i.e. different user id and passwords. Some sites accepts few characters as user id, some sites uses email id as user id and some sites require the user id with special characters. As a human being with small mind with a larger body, it is too hard to remember a password along with user Id for a long period of time. It holds good for me but I don’t know about you?
What would be the solution for this?
User  to be registered in a single web site with a user id & password and that would be the reference for other web sites registration, where ever he registers on another web site on the Internet. I require a single step to register on another website instead of filling multiple fields on the web form. Don’t you….?
How to Implement this in real Scenario?
For Example, if user has Gmail ID with all his valid personal data (It should be personally verified and validated by Gmail Team). The other websites should have a look up facility to capture his personal data from the Gmail ID and upon providing gmail id & looks up, it should populate user data into the fields. And, user can simply submits the registration form. The registered web site should use the gmail Id as the user’s login id and gmail pwd would be the password for this website.
(If possible, we can go for Not to store the users personal data  at new website end i.e. The personal data of the user should be stored at Gmail)
How the security will be implemented?
Along with the user Id and password, all the sites which use single step web forms should send a security code to the user’s mobile number which is to be entered by user into a field, hence his credentials will be validated. Hope, user will have more security with pwd and secure code.
What are the Advantages?
1. User can have only one user id for all the websites he register.
2. There no way to use his big brain to remember the passwords for different sites.
3. It is more comfortable for the users and web site managers to have single data on all the websites.
Conclusion:
It is looks simple but implementation would be complex.
Let’s bring all the websites into a single tree….

Monday, October 1, 2012

Copy an Array into another Array in Java

The contents of one array can be copied into another array by using the arraycopy() method of the System class in Java.
The arraycopy() method accepts source array, source length, destination array and destination length.
The following program shows the use of arraycopy() method to copy the contents of one array to another.


package com.Test;

public class ArrayCopyTest{

public static void main(String[] args){
int[] src = new int[] {1, 2, 3, 4, 5};

int[] dest = new int[src.length];

System.arraycopy(src, 0, dest, 0, src.length);

for (int i = 0; i < dest.length; i++){
System.out.println(dest[i]);
}
}
}