Instantly share code, notes, and snippets.

View CS7.x.cs
// CS 7.1
/*
1. async Main method
// The entry point for an application can have the async modifier.
2. default literal expressions
// You can use default literal expressions in default value expressions when the target type can be inferred.
3. Inferred tuple element names
// The names of tuple elements can be inferred from tuple initialization in many cases.
// Finally, the compiler has two options /refout and /refonly that control reference assembly generation.
4. Reference assembly generation
View LINQ.cs
// LINQ
using System
using System.Linq;  
using System.Collections;
using System.Collections.Generic;     
class Query
{
public void Print()
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;