Skill - Add shortcut key to button
KeyStroke searchKey = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0);
InputMap searchButtonInputMap = searchButton
.getInputMap(JButton.WHEN_IN_FOCUSED_WINDOW);
searchButtonInputMap.put(searchKey, "searchObject");
ActionMap searchButtonActionMap = searchButton.getActionMap();
searchButtonActionMap.put("searchObject", new ClickAction(searchButton));
Wednesday, December 12, 2012
Performance Checking - How to Count the execution time for the block
Performance Checking - How to Count the execution time for the block
long startTime = System.nanoTime(); // added
long endTime = 0; //added
//Put your testing block here.
endTime = System.nanoTime(); //added
long timeneeded = endTime - startTime; //added
System.out.println("Start Time:"+startTime); //added
System.out.println("End Time:"+endTime); //added
System.out.println("Needed Time:"+timeneeded); //added
long startTime = System.nanoTime(); // added
long endTime = 0; //added
//Put your testing block here.
endTime = System.nanoTime(); //added
long timeneeded = endTime - startTime; //added
System.out.println("Start Time:"+startTime); //added
System.out.println("End Time:"+endTime); //added
System.out.println("Needed Time:"+timeneeded); //added
Wednesday, April 18, 2012
mysql_how to import larger sql file in windows
mysql_how to import larger sql file in windows
Just go to mysql console and write this
mysql> source C:\mydb.sql
Just go to mysql console and write this
mysql> source C:\mydb.sql
Subscribe to:
Posts (Atom)