- 博客(8)
- 收藏
- 关注
原创 Python - how to fetch data from mysql database 从数据库读取数据
pip install mysql-connector-pythonimport mysql.connectordef fetchData(): word = input("Enter word: ") con = mysql.connector.connect( user = "ardit700_student", password = "ardit700_student", host = "108.167.14
2020-10-25 20:52:56 232
原创 C# Class - Field, Property, Method
ClassesField, property, methods are members in classesclass Forest {//A constructor with parameters are built to creat object and set those values at once public Forest(string name, string biome, int area) { this.Name = name; this.Biome = biome;
2020-10-06 09:05:20 237
原创 C# - Method & Loop
MethodsMethod Declaration:the method nameparameter typesparameter orderparameter namesreturn typeoptional modifiers//y and z are optional parameters.static int AddSomeNumbers(int x, int y = 3, int z = 2){ return x + y + z;}Methods that do n
2020-10-05 18:54:41 233
原创 C# - Basic & Control Flow
Basic variables and operationRead lineConsole.WriteLine("Enter your name: ");name = Console.ReadLine();Variables and Typesstring foo = "Hello";int x = 5;Console.WriteLine(foo);double x = 81;Console.Write(Math.Sqrt(x));bool a = (2>1);bool b =
2020-10-05 18:12:40 169
原创 Unity - Basic1
playerControllerMove the vehicle forwardvoid Update(){//Move the vehicle forwardtransform.Translate(0,0,1);}void Update(){//Move the vehicle forwardtransform.Translate(Vector3.forward);}Edit -> Project Settings -> InputMap user input w
2020-10-05 17:30:42 163
原创 SQL - DELETE
DELETE Statement1. 单表删除用于单个数据表中的删除行DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM tbl_name [[AS] tbl_alias] [PARTITION (partition_name [, partition_name]...)] [WHERE where_condition] [ORDER BY...] [LIMIT row_count]2. 按照特定顺序删除(一定数目)例如下面这个例子,筛选出符合wher
2020-08-30 00:42:15 213
原创 SQL 窗口函数
什么是窗口函数?需要在每组内排名时,例如每个部门按照业绩来排名,可以使用SQL的窗口函数功能。和GROUP BY 不同,窗口函数不会减少数据的行数,窗口函数基本语法如下:<窗口函数> over (partition by <用于分组的别名> order by <用于排序的列名>)1. 专用窗口函数rank()dense_rank()row_number()他们的区别是碰到相同大小的值得时候,编号的方式不同,分别形如:1,1,1,4,5…1,1,1,2
2020-08-28 23:33:02 179
原创 SQL - limit & limit offset
SQL - limit & limit offset单用 LIMIT用LIMIT OFFSET单用 LIMIT有两个数字参数时,跳过前面m条数据,从m+1开始读取n条数据select * from table limit m, n;例如m=2, n=1时,读取“导管”这个数据:项目Value电脑$1600手机$12导管$1有一个数字参数时,返回前m行数据select * from table limit m;例如m=2时,读取“
2020-08-28 23:07:07 104
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人