Instantly share code, notes, and snippets.

View H2
## H2 Server
$ java -cp h2-1.4.193.jar org.h2.tools.Server -baseDir /e/Working/SQL/H2/Java/H2-Base -properties /e/Working/SQL/H2/Java/H2-Base
# OR
$ java -cp h2-1.4.193.jar org.h2.tools.Console -baseDir /e/Working/SQL/H2/Java/H2-Base -properties /e/Working/SQL/H2/Java/H2-Base
http://192.168.56.1:8082/login.jsp?jsessionid=127e3c922687e2a50c5750ac4fbb894c
Saved Settings:
Generic H2 (Embedded)
Setting Name:
Generic H2 (Embedded)
Driver Class:
View HSQLDB
## Git Bash ## Create Database
$ java -version
$ cd "E:\Working\SQL\HSQLDB"
$ unzip hsqldb-2.3.4.zip
## Create Database
View SQLite
--Command Line
>sqlite3 -version
3.8.7.2 2014-11-18 20:57:56 2ab564bf9655b7c7b97ab85cafc8a48329b27f93
--OR
>sqlite3 --version
3.8.7.2 2014-11-18 20:57:56 2ab564bf9655b7c7b97ab85cafc8a48329b27f93
> sqlite3
sqlite> .quit
--OR
sqlite> .q
View PostgreSQL
>psql --version
psql (PostgreSQL) 10.5
>psql -V
psql (PostgreSQL) 10.5
> psql -U postgres
$ psql --version
psql (PostgreSQL) 10.5
$ psql -V
View MySQL
$ winpty mysql --version
mysql Ver 14.14 Distrib 5.7.18, for Win64 (x86_64)
$ winpty mysql -V
mysql Ver 14.14 Distrib 5.7.18, for Win64 (x86_64)
$ winpty mysql -u root -p *******************
mysql> exit
# OR
mysql> quit
View Python.py
#Import
from random import randint
#Input
input = str(raw_input("Your hobby: ")
input = raw_input("Sorry, I didn't catch that. Enter again: ")
View Ruby.rb
#Input
print "What?"
input = gets.chomp
input.capitalize!
puts "Your input is #{input}"
#Output:
#What? Ruby
#Your input is Ruby
View Java10.java
// Java 10
/*
1. Local-Variable Type Inference
2. Time-Based Release Versioning
3. Unmodifiable Collections
4. Optional.orElseThrow()
*/
import static java.lang.System.out;
// import java.util.Arrays;
View Java9.java
// Java 9
/*
1. Private Interface Methods
2. Try-With-Resources on Final Variables
3. Diamond Operator for Anonymous Inner Classes
4. SafeVarargs Annotation on Private Methods
5.1 List Factory Method
5.2 Set Interface Factory Methods
5.3 Map Interface Factory Methods
5.4 Map Interface ofEntries() Method
View Java8.java
// Java 8
/*
1. Lambda Expression
2. Method References
3. Default Interface Methods
4. Static Interface Methods
5. Functional Interfaces
6. Stream
*/