-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlanguages.txt
37 lines (34 loc) · 1.2 KB
/
languages.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# MySQL
# connect to the mysql server
$ mysql -u root -p (enter the password to enter the MySQL shell)
# if there are multiple mysql server, you need to specify the ip and port
mysql -h127.0.0.1 -P3306 -uuser -ppassword
mysql>
show databases;
create database <database name>;
# SQLite
# create datebase
$ sqlite3 testDB.db
$ sqlite3 # for entering the sqlite shell
# check the databases
sqlite>
.databases # check all the databases
.quit
# for specific purpose like CREAET, INSERT, SELECT, WHERE, UPDATE, DELETE refer w3school
.schema <table name> # to check the schema
# to output all the data in a good view
.header on
.mode column
.width 10, 20, 10 # to modify the column 1 2 3 width
SELECT * FROM <table name>;
# dump between the .sql file and DB
$ sqlite3 testDB.db .dump > testDB.sql
$ sqlite3 testDB.db < testDB.sql
# CPP
# string length
.length()
# python
# POST multipart/form-data without filename in HTTP request
$ import requests
$ requests.post('http://url', files = {'value_1': (None, '12345'), 'value_2': (None, '67890')})
# for more info, check the 1st answer in https://stackoverflow.com/questions/23120974/python-requests-post-multipart-form-data-without-filename-in-http-request