This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static org.junit.Assert.assertArrayEquals; | |
import static org.junit.Assert.assertFalse; | |
import static org.junit.Assert.assertTrue; | |
import java.util.Arrays; | |
import org.apache.commons.lang3.StringUtils; | |
import org.junit.Test; | |
public class SplitTest { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doskey 127=start c:\software\putty\putty.exe -ssh 10.20.172.XXX -l clstradm -pw XXXXXX | |
doskey 129=start c:\software\putty\putty.exe -ssh 10.20.172.XXX -l clstradm -pw XXXXXX | |
doskey wsedit=gvim ws.bat | |
doskey git=cd $1 $t C:\PROGRA~2\Git\bin\sh.exe --login -i | |
doskey eclipse=start c:\software\eclipse\eclipse.exe | |
doskey sqldeveloper=start C:\software\sqldeveloper\sqldeveloper.exe | |
doskey ldap=start "C:\software\ApacheDirectoryStudio-2.0.0.v20161101-M12-win32.win32.x86_64\ApacheDirectoryStudio\ApacheDirectoryStudio.exe" | |
doskey anypoint3.7=start C:\software\AnypointStudio\AnypointStudio.exe | |
doskey robomongo=start C:\software\robomongo-0.9.0-windows-x86_64-0786489\Robomongo.exe | |
doskey cpt127=\software\putty\pscp $1\$2 xxxxxxx@10.20.172.XXX:/data/logs/bpt/in/$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Leader Mapping | |
let mapleader="\<Space>" | |
set guifont=Consolas:h9:cANSI:qDRAFT | |
set mouse=c | |
colorscheme torte | |
set guioptions=egmL | |
set number | |
set relativenumber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DeadLockTest { | |
private static Object o1 = "Lock 1" , o2 = "Lock 2"; | |
public static void main(String[] args) { | |
new Thread() { | |
public void run(){ | |
synchronized (o2) { | |
print(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* File : sudoku.c | |
* Using coding samples show in the Richard Buckland' lecture | |
* series on Higher computing (http://www.youtube.com/watch?v=Rxvv9krECNw) | |
* (lecture 22 and 21 ) | |
* Created on: May 12, 2009 | |
* Author: Asela | |
*/ | |
#include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* NumberReader.c | |
* | |
* Created on: May 5, 2009 | |
* Author: Asela | |
* | |
* shows the way to read integers for integer values | |
* ( form INT_MIN+1 to INT_MAX ) | |
*/ | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedWriter; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStreamWriter; | |
import java.util.concurrent.ThreadLocalRandom; | |
import java.util.stream.IntStream; | |
class OneBillionIntegerFileGenerator { | |
public static void main(String[] args) throws IOException { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
class OneBillionIntegerStatistics { | |
public static void main(String[] args) throws IOException { | |
try (BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream("numbers_1B.in")))) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestStackSize { | |
public static void main(String[] args) { | |
System.out.println(IntStream.generate(() -> { | |
AtomicInteger i = new AtomicInteger(0); | |
try { | |
new TestStackSize().call(i); | |
} catch (Throwable e) { | |
return i.get(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP PROCEDURE create_tables; | |
DELIMITER $$ | |
CREATE PROCEDURE create_tables ( ) | |
BEGIN | |
DECLARE counter BIGINT DEFAULT 0; | |
DROP TABLE IF EXISTS `user_test`; | |
CREATE TABLE `user_test` ( | |
`user_id` int(11) unsigned NOT NULL AUTO_INCREMENT, |
OlderNewer