01 2020 档案

摘要:#include <bits/stdc++.h> #include <stdio.h> #include <stdlib.h> #include <queue> using namespace std; const int N = 1010; int father[N]; int isRoot[N] 阅读全文
posted @ 2020-01-31 23:09 JasonPeng1 阅读(116) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include <stdio.h> #include <stdlib.h> #include <queue> using namespace std; const int maxn = 110; struct node{ int v,height; 阅读全文
posted @ 2020-01-30 20:51 JasonPeng1 阅读(157) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include <stdio.h> #include <stdlib.h> #include <queue> using namespace std; const int maxn = 110; struct Node{ int data; int 阅读全文
posted @ 2020-01-29 14:14 JasonPeng1 阅读(132) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include <stdio.h> #include <stdlib.h> #include <queue> using namespace std; const int maxn = 1010; int temp[maxn],initial[ma 阅读全文
posted @ 2020-01-29 13:08 JasonPeng1 阅读(176) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include <stdio.h> #include <stdlib.h> #include <queue> using namespace std; struct node{ int data; node *left; node *right; 阅读全文
posted @ 2020-01-29 12:27 JasonPeng1 阅读(138) 评论(0) 推荐(0)
摘要:项目效果预览: 安装成功的效果图: kibana安装: ES使用的是倒排索引 参考:https://www.yuque.com/gaohanghang/vx5cb2/aa576g#HuZ1N 《Springboot + ElasticSearch 构建博客检索系统》 视频地址:https://www 阅读全文
posted @ 2020-01-28 17:42 JasonPeng1 阅读(1160) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include <stdio.h> #include <stdlib.h> #include <queue> using namespace std; const int MAXN = 110; struct Node{ int weight; v 阅读全文
posted @ 2020-01-27 23:12 JasonPeng1 阅读(113) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include <stdio.h> #include <stdlib.h> #include <queue> using namespace std; const int maxn = 100010; struct node{ //bool lea 阅读全文
posted @ 2020-01-27 22:40 JasonPeng1 阅读(214) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include <stdio.h> #include <stdlib.h> #include <queue> using namespace std; const int maxn = 100010; vector<int> child[maxn] 阅读全文
posted @ 2020-01-27 21:34 JasonPeng1 阅读(115) 评论(0) 推荐(0)
摘要:法1:BFS #include <bits/stdc++.h> #include <stdio.h> #include <stdlib.h> #include <queue> using namespace std; const int maxn = 100010; vector<int> temp 阅读全文
posted @ 2020-01-26 21:32 JasonPeng1 阅读(302) 评论(0) 推荐(1)
摘要:#include <bits/stdc++.h> #include <stdio.h> #include <stdlib.h> #include <queue> using namespace std; const int maxn = 100010; struct node{ double dat 阅读全文
posted @ 2020-01-26 20:32 JasonPeng1 阅读(127) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include <stdio.h> #include <stdlib.h> #include <queue> using namespace std; const int maxn = 100010; vector<int> child[maxn] 阅读全文
posted @ 2020-01-26 20:03 JasonPeng1 阅读(167) 评论(0) 推荐(0)
摘要:配合《SQL进阶教程》做的题 解法1: CASE ... WHEN .. ELSE END; # Write your MySQL query statement below UPDATE salary SET sex = CASE sex WHEN "m" THEN "f" ELSE "m" EN 阅读全文
posted @ 2020-01-26 17:05 JasonPeng1 阅读(371) 评论(0) 推荐(0)
摘要:在如表 20-3 所示的例子中,一个 session 使用 LOCK TABLE 命令给表 film_text 加了读锁,这 个 session 可以查询锁定表中的记录,但更新或访问其他表都会提示错误;同时,另外一个 session 可以查询表中的记录,但更新就会出现锁等待。 当使用 LOCK TA 阅读全文
posted @ 2020-01-26 17:03 JasonPeng1 阅读(186) 评论(0) 推荐(0)
摘要:可以利用这个函数与ORDER BY子句一起完成随机抽取某些行的功能。它的原理其实 就是ORDER BY RAND()能够把数据随机排序。 加索引 CHECK TABLE 也可以检查视图是否有错误,比如在视图定义中被引用的表已不存在,举例如 下。 阅读全文
posted @ 2020-01-26 17:01 JasonPeng1 阅读(207) 评论(0) 推荐(0)
摘要:它的产生主要是由于程序对用户输入的数据没有进行严格的 过滤,导致非法数据库查询语句的执行。 而且,SQL Injection 也很难防范。网站管理员无法通过安装系统补丁或者进行简 单的安全配置进行自我保护,一般的防火墙也无法拦截 SQL Injection 攻击 结果发现,这次记录没有插入成功,给出 阅读全文
posted @ 2020-01-26 17:00 JasonPeng1 阅读(119) 评论(0) 推荐(0)
摘要:MySQL 从 5.0.2 版本开始支持触发器的功能。触发器是与表有关的数据库对象,在满足定义 条件时触发,并执行触发器中定义的语句集合。触发器的这种特性可以协助应用在数据库端 确保数据的完整性。 MySQL 从 5.0.3 开始支持分布式事务,当前分布式事务只支持 InnoDB 存储引擎。一个 分 阅读全文
posted @ 2020-01-26 16:58 JasonPeng1 阅读(203) 评论(0) 推荐(0)
摘要:MyISAM 和 InnoDB 存储引擎的表默认创建的都是 BTREE 索引。默认情况下,MEMORY 存储引擎使用 HASH 索引,但也支持 BTREE 索引。 阅读全文
posted @ 2020-01-26 16:57 JasonPeng1 阅读(117) 评论(0) 推荐(0)
摘要:一般在保存少量字符串的时候,我们会选择 CHAR 或者 VARCHAR;而在保存较大文本时, 通常会选择使用 TEXT 或者 BLOB ,二者之间的主要差别是 BLOB 能用来保存二进制数据,比 如照片;而 TEXT 只能保存字符数据,比如一篇文章或者日记。TEXT 和 BLOB 中有分别包括 TE 阅读全文
posted @ 2020-01-26 16:56 JasonPeng1 阅读(154) 评论(0) 推荐(0)
摘要:和大多数数据库不同,MySQL 中有一个存储引擎的概念,针对不同的存储需求可以选择最 优的存储引擎。本章将详细介绍存储引擎的概念、分类以及实际应用中的选择原则。 插件式存储引擎是 MySQL 数据库最重要的特性之一,用户可以根据应用的需要选择如 何存储和索引数据、是否使用事务等。MySQL 默认支持 阅读全文
posted @ 2020-01-26 16:55 JasonPeng1 阅读(160) 评论(0) 推荐(0)
摘要:INSERT(str ,x,y,instr)函数:将字符串 str 从第 x 位置开始,y 个字符长的子串替换为字符 串 instr IFNULL(value1,value2)函数:这个函数一般用来替换 NULL 值的 阅读全文
posted @ 2020-01-26 16:54 JasonPeng1 阅读(141) 评论(0) 推荐(0)
摘要:“<=>”安全的等于运算符,和“=”类似,在操作数相等时值为 1,不同之处在于即使 操作的值为 NULL 也可以正确比较。 阅读全文
posted @ 2020-01-26 16:53 JasonPeng1 阅读(145) 评论(0) 推荐(0)
摘要:在整数类型中,按照取值范围和存储方式不同,分为 tinyint、smallint、mediumint、int、 bigint 这 5 个类型。如果超出类型范围的操作,会发生“Out of range”错误提示。为了避免此 类问题发生,在选择数据类型时要根据应用的实际情况确定其取值范围,最后根据确定的 阅读全文
posted @ 2020-01-26 16:52 JasonPeng1 阅读(140) 评论(0) 推荐(0)
摘要:修改表名: 在 MySQL 中,update 命令可以同时更新多个表中数据,语法如下 注意:多表更新的语法更多地用在了根据一个表的字段,来动态的更新另外一个表的字段 例如,要 emp表中统计公司的总人数 在此基础上,要统计各个部门的人数 更细一些,既要统计各部门人数,又要统计总人数: 统计人数大于 阅读全文
posted @ 2020-01-26 16:51 JasonPeng1 阅读(4058) 评论(0) 推荐(0)
摘要:Using WebSocket to build an interactive web application This guide walks you through the process of creating a “Hello, world” application that sends m 阅读全文
posted @ 2020-01-26 16:40 JasonPeng1 阅读(359) 评论(0) 推荐(0)
摘要:来自官方文档:https://spring.io/guides/gs/serving-web-content/ This guide walks you through the process of creating a “Hello, World” web site with Spring. Wh 阅读全文
posted @ 2020-01-26 15:04 JasonPeng1 阅读(414) 评论(0) 推荐(0)
摘要:https://jingyan.baidu.com/album/39810a2351460fb636fda6f4.html 阅读全文
posted @ 2020-01-25 22:21 JasonPeng1 阅读(914) 评论(0) 推荐(0)
摘要:课程链接—https://www.imooc.com/video/20548 开发中遇到的问题: 解决方法: 在配置文件(proprites文件或yml文件)中的数据库url中添加: &serverTimezone=UTC如图: 阅读全文
posted @ 2020-01-25 14:07 JasonPeng1 阅读(207) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include <stdio.h> #include <stdlib.h> #include <queue> using namespace std; const int maxn = 110; struct node{ int lchild,rc 阅读全文
posted @ 2020-01-24 16:48 JasonPeng1 阅读(152) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include <stdio.h> #include <stdlib.h> #include <queue> using namespace std; const int maxn = 50; struct node{ int data; node 阅读全文
posted @ 2020-01-23 23:15 JasonPeng1 阅读(116) 评论(0) 推荐(0)
摘要:若直接DFS递归求解,会栈溢出 #include <cstdio> #include <cstring> #include <queue> #include <algorithm> using namespace std; const int maxn=50; struct node{ int da 阅读全文
posted @ 2020-01-21 21:58 JasonPeng1 阅读(271) 评论(0) 推荐(0)
摘要:Getting Started Guides 成果图: 原文: https://spring.io/guides/gs/relational-data-access/#scratch 中文版:https://github.com/SpringForAll/spring-guides-translat 阅读全文
posted @ 2020-01-21 16:32 JasonPeng1 阅读(339) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-01-20 22:46 JasonPeng1 阅读(221) 评论(0) 推荐(0)
摘要:#pragma warning(disable:4996) #include <stdio.h> #include <stdlib.h> #include <queue> using namespace std; struct node{ int x, y, z; }p; int m, n, l, 阅读全文
posted @ 2020-01-19 22:44 JasonPeng1 阅读(102) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; //maxFacSum 记录最大底数之和 int n,k,p,maxFaceSum = -1; vector<int> fac,ans,t 阅读全文
posted @ 2020-01-19 18:08 JasonPeng1 阅读(130) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int maxn = 100005; const int TABLE = 1000010; struct Node{//定义静 阅读全文
posted @ 2020-01-19 17:11 JasonPeng1 阅读(129) 评论(0) 推荐(0)
摘要:自己写的,少了异常处理。 #include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int maxn = 100010; struct Node{//定义静态链表 int data; 阅读全文
posted @ 2020-01-19 00:21 JasonPeng1 阅读(111) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int maxn = 100010; struct Node{//定义静态链表 char data; int next; bo 阅读全文
posted @ 2020-01-18 20:11 JasonPeng1
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int maxn = 1010; struct mouse{ int weight;//质量 int R;//排名 }mous 阅读全文
posted @ 2020-01-18 12:06 JasonPeng1 阅读(153) 评论(0) 推荐(0)
摘要:解法1:(自己码的) #include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAXN = 10000; stack<int> stk; int main(){ int M, 阅读全文
posted @ 2020-01-17 23:37 JasonPeng1 阅读(142) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; //5个map变量分别建立书名,作者,关键词,出版社及出版年份与id的映射关系 map<string,set<int>> mpTitle, 阅读全文
posted @ 2020-01-17 11:43 JasonPeng1 阅读(139) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int maxn = 480005;//最大学生人数 map<int,int> temp; int main(){ int m 阅读全文
posted @ 2020-01-17 10:22 JasonPeng1 阅读(91) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int maxn = 40010;//最大学生人数 bool check(char c){ if(c >= '0' && c< 阅读全文
posted @ 2020-01-16 22:11 JasonPeng1 阅读(154) 评论(0) 推荐(0)
摘要:用了打表的技巧 #include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int maxn = 40010;//最大学生人数 //[0,12]的火星文 string unitDigit 阅读全文
posted @ 2020-01-16 21:33 JasonPeng1 阅读(255) 评论(0) 推荐(0)
摘要:超时主要是这个语句的原因: for(iter = temp[num1].begin();iter != temp[num1].end();++iter){ for(iter1 = temp[num2].begin();iter1 != temp[num2].end();++iter1){ if(*i 阅读全文
posted @ 2020-01-16 13:04 JasonPeng1 阅读(233) 评论(0) 推荐(0)
摘要:没有想到以二维数组 char [N][5] 存放输入的姓名,自己尝试用vector<char> 失败了。 小技巧:如果排序时直接对字符串排序,那么会导致大量的字符串移动,非常耗时间,因此比较合适的做法是使用字符串的下标来代替字符串本身进行排序,这样消耗的时间会少得多 strcmp 的返回值不一定是 阅读全文
posted @ 2020-01-15 23:43 JasonPeng1
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int N = 40005; //vector<vector<int>> const int M = 26*26*26*10 阅读全文
posted @ 2020-01-15 18:31 JasonPeng1 阅读(131) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAXN = 100005; //const int MOD = 1000000007; const int INF 阅读全文
posted @ 2020-01-15 15:12 JasonPeng1
摘要:暴力: #include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int N = 100005; long int temp[N]; int main(){ char temp[N]; 阅读全文
posted @ 2020-01-14 21:03 JasonPeng1 阅读(130) 评论(0) 推荐(0)
摘要:并没有用到双指针遍历 #include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int N = 2000005; long int temp[N]; int main(){ int c 阅读全文
posted @ 2020-01-14 17:54 JasonPeng1
摘要:插入排序: #include <string> using namespace std; const int N = 111; //插入排序 int temp[N]; int main(){ int n; cin>>n; for(int i=0;i<n;++i){ cin>>temp[i]; } i 阅读全文
posted @ 2020-01-14 14:05 JasonPeng1
摘要:二重循环枚举 #include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAX_LEN = 100005; bool cmp(int a,int b){ return a<b; 阅读全文
posted @ 2020-01-13 09:26 JasonPeng1
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAX_LEN = 100005; bool cmp(double a,double b){ return a > b 阅读全文
posted @ 2020-01-10 18:33 JasonPeng1
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAX_LEN = 100005; int main(){ int temp[10]; for(int i =0;i< 阅读全文
posted @ 2020-01-08 21:36 JasonPeng1
摘要:void io_hlt(void); void io_cli(void); void io_out8(int port, int data); int io_load_eflags(void); void io_store_eflags(int eflags); /* ���͓����\�[�X�t 阅读全文
posted @ 2020-01-08 16:15 JasonPeng1
摘要:BIOS >CPU 读磁盘(如果是SSD会特别快,但还是比不上内存快) >CPU读缓冲区地址(也就是把程序装载到内存中) BIOS >CPU 读磁盘(如果是SSD会特别快,但还是比不上内存快) >CPU读缓冲区地址(也就是把程序装载到内存中) .c如何变成机器语言的?(非常重要) C语言的不便之处: 阅读全文
posted @ 2020-01-08 11:32 JasonPeng1 阅读(176) 评论(0) 推荐(0)
摘要:寄存器分为段寄存器和通用寄存器。 可结合《汇编语言》-王爽: CPU最多存储32个字节的数据(只是通用寄存器),如果加上段寄存器也才只有44字节。 4 Makefile入门 阅读全文
posted @ 2020-01-08 09:20 JasonPeng1 阅读(200) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-01-08 09:17 JasonPeng1 阅读(140) 评论(0) 推荐(0)
摘要:思路: two pointers #include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAX_LEN = 100005; bool cmp(int a,int b){ r 阅读全文
posted @ 2020-01-07 18:18 JasonPeng1
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAX_LEN = 10005; int main(){ char fir[MAX_LEN]; char sec[MA 阅读全文
posted @ 2020-01-07 16:51 JasonPeng1 阅读(98) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAX_LEN = 10005; int main(){ int n; cin>>n; int temp[MAX_LE 阅读全文
posted @ 2020-01-07 16:35 JasonPeng1
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAX_LEN = 10005; //char str[MAX_LEN]; //int hashTable[30] = 阅读全文
posted @ 2020-01-07 14:22 JasonPeng1 阅读(162) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAX_LEN = 10005; char str[MAX_LEN]; int hashTable[30] = {0} 阅读全文
posted @ 2020-01-07 13:58 JasonPeng1
摘要:#include<math.h> #include <cstring> #include <cstdio> const int MAX_LEN = 1010; char str[MAX_LEN]; int hashTable[30] = {0}; int main(){ fgets(str,1010 阅读全文
posted @ 2020-01-06 21:24 JasonPeng1 阅读(209) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAX_LEN = 100005; int main(){ int hashTable[256]; for(int i 阅读全文
posted @ 2020-01-06 14:24 JasonPeng1
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAX_LEN = 100005; int main(){ int n; int temp[101]; for(int 阅读全文
posted @ 2020-01-06 13:45 JasonPeng1
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAX_LEN = 100005; int main(){ //bool hashTable[256] = {true 阅读全文
posted @ 2020-01-06 10:07 JasonPeng1
摘要:#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAX_LEN = 2005; void upper(char *s, int length) { int i = 0 阅读全文
posted @ 2020-01-05 20:13 JasonPeng1
摘要:#include <bits/stdc++.h> #include<math.h> using namespace std; const int MAX_LEN = 2005; //const int MAX_D = 31; struct student{ int id; int Cgrade; i 阅读全文
posted @ 2020-01-05 12:44 JasonPeng1
摘要:0. 不要只吸收他人的观点 线性思维的危害性——使你做的决策越来越差。看到的解决方式越来越少 1. 故事1:诞生——发现不喜欢做作业——>引发思考——>为什么不喜欢做作业呢?(非常非常重要的问题) 故事2:当你还在上学时,最喜欢的是什么?——>下课铃声 ,放学铃声 ——>为什么是这样?——>因为我们 阅读全文
posted @ 2020-01-05 10:31 JasonPeng1
摘要:#include <bits/stdc++.h> #include<math.h> using namespace std; const int MAX_LEN = 100005; //const int MAX_D = 31; struct student{ int number; int fir 阅读全文
posted @ 2020-01-05 09:53 JasonPeng1
摘要:#include <bits/stdc++.h> #include<math.h> using namespace std; const int MAX_LEN = 105; //const int MAX_D = 31; int main(){ int a,b; cin>>a; cin>>b; i 阅读全文
posted @ 2020-01-04 23:52 JasonPeng1
摘要:#include <bits/stdc++.h> #include<math.h> using namespace std; const int MAX_LEN = 105; //const int MAX_D = 31; //char temp[MAX_LEN]; //vector<char> r 阅读全文
posted @ 2020-01-03 09:08 JasonPeng1
摘要:#include <bits/stdc++.h> #include<math.h> using namespace std; const int MAX_LEN = 105; //const int MAX_D = 31; int main(){ char temp[MAX_LEN]; for(in 阅读全文
posted @ 2020-01-02 19:18 JasonPeng1
摘要:#include <bits/stdc++.h> #include<math.h> using namespace std; const int MAX_LEN = 100005; //const int MAX_D = 31; struct ID{ char tem[20]; }; int mai 阅读全文
posted @ 2020-01-01 23:34 JasonPeng1
摘要:第二次: #include <bits/stdc++.h> #include <math.h> #include <cstring> #include <cstdio> using namespace std; const int MAX_LEN = 100005; //const int MAX_ 阅读全文
posted @ 2020-01-01 19:38 JasonPeng1
摘要:#include <bits/stdc++.h> #include<math.h> using namespace std; const int MAX_LEN = 100005; //const int MAX_D = 31; int main(){ int n; cin>>n; int Bdig 阅读全文
posted @ 2020-01-01 19:21 JasonPeng1
摘要:#include <bits/stdc++.h> #include<math.h> using namespace std; const int MAX_LEN = 100005; const int MAX_D = 31; int main(){ int a,b,n; cin>>a; cin>>b 阅读全文
posted @ 2020-01-01 19:00 JasonPeng1
摘要: 阅读全文
posted @ 2020-01-01 15:26 JasonPeng1