Saturday 15 October 2016

perssonal

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.Scanner;


public class GolfGame {

/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub

String a[]= new String[4];
String b[]= new String[4];
String c[]= new String[4];
String s1[];
BufferedReader br=new BufferedReader(new FileReader("file.txt"));


for(int i=0; i<4; i++)

{
String s=br.readLine();
s1=s.split(" ");
a[i]=s1[0];
b[i]=s1[1];
c[i]=s1[2];
System.out.println(s1[0]+"::"+s1[1]+"::"+s1[2]);


}


}

}

Saturday 13 August 2016

HikariCP A high-performance JDBC connection pool.

There is nothing faster. There is nothing more correct. HikariCP is a “zero-overhead” production-quality connection pool.
please follow the link
https://brettwooldridge.github.io/HikariCP/

Wednesday 8 June 2016

Playing with Annonymous inner class


Annonymous inner class

Thread T= new Thread()
{};
//annonumous inner class extends Thread class, in short it's  extedns parent Thread

Runnable R= new Runnable()
{
};
is it possible , yes
it's not runnable object it's an object of annonumous class which implement Runnable
else you can't crate an object of Interface

Example

public class AnnnerClass {

public static void main(String[] args) {

A a=new A()
{

public void m1()
{

System.out.println("spicy");
}
};

a.m1();

}
}


public class A {

public void m1()
{
System.out.println("swetty");
}
}
here annonymous A extends A,  and call child class object. 

Monday 18 April 2016

What is Splunk and How Does it Work?



The general idea is that Splunk can take any data, any log, from anywhere in your infrastructure and add it to a searchable, intelligent index through which you can extract all sorts of meaningful data about what's happening. By default, the system will watch all the logged events and return slices of interesting data. For instance, from the dashboard you can see that a specific server name or event type is occurring at a higher than normal frequency. From there, you can drill down and chase the cause of the error from the hypervisor to the storage, networking, and even the VM.

more you can get in below link
https://helgeklein.com/blog/2014/09/splunk-work/


there are some video lecture also available in it. you can  check online

https://www.coursera.org/learn/bigdata-analytics/lecture/rFnSu/how-splunk-works-hands-on-tutorial

If there's gold in log files, Splunk, Inc's Splunk Enterprise will help you to find it. Splunk bridges the gap between simple log management and security information and event management (SIEM) products from vendors such as ArcSight, RSA, Q1 Labs, and Symantec.

http://www.networkworld.com/article/2181089/security-vulnerability-mgmt/splunk-explains-it-all.html

Ref:-

http://www.networkworld.com/article/2181089/security-vulnerability-mgmt/splunk-explains-it-all.html

https://www.coursera.org/learn/bigdata-analytics/lecture/rFnSu/how-splunk-works-hands-on-tutorial

Sunday 27 March 2016

IBM MQ and how it works,

IBM MQ is a family of network software products that IBM launched in March 1992. It was originally called MQSeries, and was renamed WebSphere MQ in 2002 to join the suite of WebSphere products. In April 2014, it was renamed IBM MQ.

https://en.wikipedia.org/wiki/IBM_WebSphere_MQ


Simple Point-to-point application using WebSphere MQ JMS:-


http://www.ibm.com/developerworks/websphere/tutorials/i-mqrad3/i-mqrad3.html

Example of  mq call using java.

http://www.ibm.com/support/knowledgecenter/SSFKSJ/com.ibm.mq.helphome.doc/product_welcome_wmq.htm

Tuesday 24 November 2015

Github

  1. https://github.com/about 

To understand GitHub, you must first have an understanding of Git. Git is an open-source version control system that was started by Linus Trovalds – the same person who created Linux. Git is similar to other version control systems – Subversion, CVS, and Mercurial to name a few.

  1. What is the difference between Git and GitHub? 
    Git is a version control system; think of it as a series of snapshots (commits) of your code. You see a path of these snapshots, in which order they where created. You can make branches to experiment and come back to snapshots you took.
    GitHub, is a web-page on which you can publish your Git repositories and collaborate with other people.
  2. Is Git saving every repository locally (in the user's machine) and in GitHub?
    No, it's only local. You can decide to push (publish) some branches on GitHub.
  3. Can you use Git without GitHub? If yes, what would be the benefit for using GitHub?
    Yes, Git runs local if you don't use GitHub. An alternative to using GitHub could be running Git on files hosted on Dropbox, but GitHub is a more streamlined service as it was made especially for Git.
  4. How does Git compare to a backup system such as Time Machine?
    It's a different thing, Git lets you track changes and your development process. If you use Git with GitHub, it becomes effectively a backup. However usually you would not push all the time to GitHub, at which point you do not have a full backup if things go wrong. I use git in a folder that is synchronized with Dropbox.
  5. Is this a manual process, in other words if you don't commit you won't have a new version of the changes made?
    Yes, committing and pushing are both manual.
  6. If are not collaborating and you are already using a backup system why would you use Git?
    • If you encounter an error between commits you can use the command git diff to see the differences between the current code and the last working commit, helping you to locate your error.
    • You can also just go back to the last working commit.
    • If you want to try a change, but are not sure that it will work. You create a branch to test you code change. If it works fine, you merge it to the main branch. If it does not you just throw the branch away and go back to the main branch.
    • You did some debugging. Before you commit you always look at the changes from the last commit. You see your debug print statement that you forgot to delete.
    • Reference:-



Monday 2 November 2015

Best of Eclipse

How to do static import in Eclipse - Java

Do you know what is shortcut of doing static import in Eclipse? Well I didn't know before, but today I come to know that shortcut Ctrl+Shift+M (Source > Add Import) can not only be used to add missing...

Jar Artifiact Dependency Search Not Working in Eclipse - Solved

Recently I face an strange issue while using Maven in Eclipse via M2Eclipse plugin. I have created a Maven Java project in Eclipse and subsequently tried to add Spring framework as dependency, to my...

How to See difference between two Files in Eclipse - Text Comparision

One of the common task for every programmer is is to compare two files and find out difference between them. You would do this while comparing same file from different release version or from different...

Eclipse Not Able To Connect Internet, Market Place - Configure Connection Proxy Settings

If you are using Eclipse in your company, you might have faced issues, where Eclipse is not able to connect to internet. Since most of companies uses proxy for connecting to Internet, its important to...

Eclipse No Java Virtual Machine was found Windows JRE JDK 64 32 bit Error

One of my reader was installing Eclipse in his Windows 7 x86 machine and emailed me about this error "A java Runtime Environment (JRE) or Java Development kit (JDK) must be available in order to run...

What is java.library.path , How to set in Eclipse IDE

java.library.path is a System property, which is used by Java programming language, mostly JVM, to search native libraries, required by project. Similar to PATH and Classpath environment variable, java.library.path...

How to Increase Console Buffer Size in Eclipse IDE - Output and Debug Console

By default Eclipse IDE has limit on console output, also known as console buffer size. Which means, your Eclipse console will overfill quickly, if you are running a Java server program, which usually...

How to Fix Must Override a Superclass Method Error Eclipse IDE Java | @Override annotation With interface methods

One of annoying error while overriding Java method in Eclipse IDE is must override a superclass method error , This error is quite frequent when importing Java  projects and still I haven't seen...

How to fix Failed to load Main-Class manifest attribute from jar - Java Eclipse Netbeans Tutorial

If you have tried creating JAR file and running Java program form command line you may have encountered "Failed to load Main-Class manifest attribute from jar" , This error which haunts many Java programmer...

How to decompile class file in Java and Eclipse - Javap command example

Ability to decompile a Java class file is quite helpful for any Java developer who wants to look into the source of any open source or propriety library used in project. Though I always prefer to attach...

How to attach source in eclipse for Jars, debugging and code look-up – JDK Example

Attaching source of any Jar in Eclipse e.g. JDK or open source libraries like Spring framework is good idea because it help during debugging and code development. As a Java programmer at least you should...

How to escape String literal in Java using Eclipse IDE

Whenever you paste String in Eclipse which contains escape characters,  to store in a String variable or just as String literal it will ask to manually escape special characters like single quotes,...

How to comment uncomment single line and block of code in Java - Eclipse Tips Tricks

Knowing Eclipse shortcut to comment and uncomment single line or block of code can save you lot of time while working in Eclipse. In fact I highly recommend every Java programmer to go through these...

Eclipse shortcut to System.out.println in Java program - Tips

Eclipse IDE provides quick shortcut keys to print System.out.println statement in Java but unfortunately not every Java programmers are familiar of that.  Even programmers with 3 to 4 year of experience...

Eclipse shortcut to remove all unused imports in Java file

How to remove all unused imports in Eclipse Eclipse IDE gives warning "The import XXX is never used" whenever it detect unused import in Java source file and shows a yellow underline. Though unused...

Finally Eclipse supports JDK7 in Eclipse Indigo 3.7.1

Much awaited release of Eclipse with JDK7 is now over, Eclipse has announce release of version Indigo 3.7.1 which will support JDK7.though I already have downloaded Netbeans with JDK7 support I was...

10 Tips to Debug Java Program in Eclipse

How to debug java program in Eclipse Debugging is a must have skill for any java developer. Having ability to debug java program enables to find you any subtle bug which is not visible during code...

How to setup Java remote debugging in Eclipse

How to remote debug Java program in Eclipse Remote debugging is not a new concept and many of you are aware of this just for who don’t know what is remote debugging? It’s a way of debugging any process...

Top 30 Eclipse Keyboard Shortcuts for Java Programmer

This tutorial is about 30 Eclipse keyboard shortcuts, this list is by no means complete and I will suggest you guys to share eclipse shortcuts listed other than here to make this more useful. Eclipse...


Read more: http://javarevisited.blogspot.com/search/label/Eclipse#ixzz3qMJukWfa