This file contains hidden or 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
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 |
This file contains hidden or 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
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 | | |
This file contains hidden or 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
➜ ~ 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 | |
This file contains hidden or 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
➜ ~ 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, |
This file contains hidden or 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
➜ ~ 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, |
This file contains hidden or 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 Boat extends Vehicle { | |
public Boat(String brand){ | |
super(brand); | |
} | |
public String doStuff() { | |
return ("Je suis " + getBrand() + " et je fais glou glou!"); | |
} | |
} |
This file contains hidden or 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
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()); |
This file contains hidden or 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 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!") + "!"); |
This file contains hidden or 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
.... | |
# 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 |
This file contains hidden or 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 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" } }; |
NewerOlder