一些简单的编程规范 效率 1、函数 为什么要函数? 有一些重复的代码,如果每次都写一遍,代码量大、写的过程麻烦、修改麻烦 常用的代码封装,用的时候直接调用,不需再写一遍 不能为了用函数而用函数 函数的使用场景: 常用的代码:文件读取,压缩 def read_file( file_path, use_ ...
分类:
其他好文 时间:
2020-06-11 13:14:44
阅读次数:
71
P3065 [USACO12DEC]First! G 题目大意:给你$n$个字符串,字符串的总长度不超过$300000$,问你在自定字典序的情况下有哪些字符串的字典序能够最小。 看到这道题第一想法是字典树和判环。字典树是存储字符串的方式,环则是判断矛盾的方式,考虑如何把这两个结合起来。 先看样例: ...
分类:
其他好文 时间:
2020-06-10 21:31:53
阅读次数:
64
说明: <> 中的内容是自己定义的内容 [] 中的内容是可以省略的 field 包含字段名和数据类型,field_name 仅指字段名 table_name 指表名 position 指字段位置,可取值:FIRST、AFTER <field> 修改表名 -- 修改数据表名称。 -- old_tabl ...
分类:
数据库 时间:
2020-06-10 19:12:24
阅读次数:
75
A:Saving Tang Monk 总时间限制: 1000ms 内存限制: 65536kB描述 《Journey to the West》(also 《Monkey》) is one of the Four Great Classical Novels of Chinese literature. ...
分类:
其他好文 时间:
2020-06-09 23:56:43
阅读次数:
153
这就是 docker 官网 tutorial 的一个流程 my first docker app Create a file named Dockerfile with the following contents. FROM node:12-alpine WORKDIR /app COPY . . ...
分类:
其他好文 时间:
2020-06-09 23:41:11
阅读次数:
80
创建好项目。 然后安装Git 随意地方打开Git Bash并Clone Github项目 随后跟着我输入这些命令: $ git add . $ git commit -m "first commit" $ git push -u origin master 其中first commit是注释内容,随 ...
分类:
Web程序 时间:
2020-06-09 20:36:37
阅读次数:
66
package main import ( "fmt" "github.com/gin-gonic/gin" "github.com/jinzhu/gorm" _ "github.com/jinzhu/gorm/dialects/mysql" ) var db *gorm.DB var err er ...
分类:
其他好文 时间:
2020-06-09 18:39:22
阅读次数:
54
一、背景 栈和队列是数据结构中最常用到的两种结构,有非常广泛的运用,该篇文章将通过动画的手段,展示栈和队列相互实现的底层原理,让我们真正搞懂栈和队列的特性。 二、概念 2.1 栈 栈[Stack]:是一种限定仅在表尾进行插入和删除操作的线性表;即后进先出(LIFO-last in first out ...
分类:
其他好文 时间:
2020-06-09 18:34:08
阅读次数:
68
html: <div class="box"> <div class="first">85.719</div> <div class="second">214.281</div> </div> css: .box{ width: 300px; display: flex; } .first{ bac ...
分类:
其他好文 时间:
2020-06-09 14:50:39
阅读次数:
60
The Google search engine has two important features that help it produce high precision results. First, it makes use of the link structure of the Web ...
分类:
Web程序 时间:
2020-06-09 14:21:52
阅读次数:
82