Skip to content

Instantly share code, notes, and snippets.

mysql> INSERT INTO school (name, country, capacity) VALUES ('Beauxbatons Academy of Magic', 'France', 550 f Witchcraft and Wizardry', 'United Kingdom', 450), ('Ilvermorny School of Witchcraft and Wizardry', 'USA', 300) ou School
Query OK, 8 rows affected (0.01 sec)
Records: 8 Duplicates: 0 Warnings: 0
mysql> SELECT * FROM school; +----+----------------------------------------------+----------+----------------+
| id | name | capacity | country |
+----+----------------------------------------------+----------+----------------+
| 1 | Beauxbatons Academy of Magic | 550 | France |
| 2 | Castelobruxo | 380 | Brazil |
| 3 | Durmstrang Insti
mysql> SELECT * FROM wizard WHERE birthday BETWEEN '1975-01-01' AND '1985-12-31';
+----+-----------+----------+------------+-------------+---------------------------------------+-----------+
| id | firstname | lastname | birthday | birth_place | biography | is_muggle |
+----+-----------+----------+------------+-------------+---------------------------------------+-----------+
| 1 | harry | potter | 1980-07-31 | london | | 0 |
| 2 | hermione | granger | 1979-09-19 | | Friend of Harry Potter | 0 |
| 4 | ron | weasley | 1980-03-01 | | Best friend of Harry | 0 |
| 5 | ginny | weasley | 1981-08-11 | | Sister of Ron and girlfriend of Harry | 0 |
| 6 | fred | weasley | 1978-04-01 | | | 0 |
| 7 | george | weasley | 1978-04-01 | |
➜ ~ nano db.sql
➜ ~ mysql -u root -D wild_db_quest -p
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
...
mysql> DESCRIBE wizard;
+-------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
➜ ~ git:(master) ✗ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
mysql> CREATE DATABASE kaamelott;
mysql> USE kaamelott;
Database changed
mysql> CREATE TABLE knight ( id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
-> name VARCHAR(80) NOT NULL,
➜ ~ git:(master) ✗ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
mysql> CREATE DATABASE kaamelott;
mysql> USE kaamelott;
Database changed
mysql> CREATE TABLE knight ( id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
-> name VARCHAR(80) NOT NULL,
public class Boat extends Vehicle {
public Boat(String brand){
super(brand);
}
public String doStuff() {
return ("Je suis " + getBrand() + " et je fais glou glou!");
}
}
class Classroom {
public static void main(String[] args){
// references to a new instance of the Wilder class
Wilder joe = new Wilder("Joe", false);
Wilder bill = new Wilder("Bill", true);
System.out.println(joe.whoAmI());
public class Decipherer {
public static String messageSecret(String message) {
int messagelength = message.length() / 2;
String substringMessage = message.substring(5, messagelength + 5);
String replaceMessage = substringMessage.replace ("@#?", " ");
return new StringBuilder(replaceMessage).reverse().toString();
}
public static void main(String[] args) {
System.out.println(messageSecret("0@sn9sirppa@#?ia'jgtvryko1") + " " + messageSecret("q8e?wsellecif@#?sel@#?setuotpazdsy0*b9+mw@x1vj") + " " + messageSecret("aopi?sedohtém@#?sedhtmg+p9l!") + "!");
....
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh
ZSH_CUSTOM=/path/to/new-custom-folder
echo "Bourne-again Shell"
alias therm="osx-cpu-temp -c"
source $ZSH/oh-my-zsh.sh
@Devcodpanda
Devcodpanda / Movies.java
Created May 10, 2020 16:44
Java 4 - Tableaux et itération
public class Movies {
public static void main(String[] args) {
String[] nameMovies = { "Indiana Jones and the Kingdom of the Crystal Skull",
"Indiana Jones and the Last Crusade", "Indiana Jones and the Temple of Doom" };
String[][] mainActors = { { "Harrison Ford", "Cate Blanchett", "Karen Allen" },
{ "Harrison Ford", "Sean Connery", "Denholm Elliott" },
{ "Harrison Ford", "Kate Capshaw", "Jonathan Ke Quan" } };