上一页 1 2 3 4 5 6 7 8 9 ··· 29 下一页
摘要: #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 阅读(117) 评论(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 阅读(303) 评论(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 阅读(128) 评论(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 阅读(374) 评论(0) 推荐(0)
摘要: 在如表 20-3 所示的例子中,一个 session 使用 LOCK TABLE 命令给表 film_text 加了读锁,这 个 session 可以查询锁定表中的记录,但更新或访问其他表都会提示错误;同时,另外一个 session 可以查询表中的记录,但更新就会出现锁等待。 当使用 LOCK TA 阅读全文
posted @ 2020-01-26 17:03 JasonPeng1 阅读(193) 评论(0) 推荐(0)
摘要: 可以利用这个函数与ORDER BY子句一起完成随机抽取某些行的功能。它的原理其实 就是ORDER BY RAND()能够把数据随机排序。 加索引 CHECK TABLE 也可以检查视图是否有错误,比如在视图定义中被引用的表已不存在,举例如 下。 阅读全文
posted @ 2020-01-26 17:01 JasonPeng1 阅读(251) 评论(0) 推荐(0)
摘要: 它的产生主要是由于程序对用户输入的数据没有进行严格的 过滤,导致非法数据库查询语句的执行。 而且,SQL Injection 也很难防范。网站管理员无法通过安装系统补丁或者进行简 单的安全配置进行自我保护,一般的防火墙也无法拦截 SQL Injection 攻击 结果发现,这次记录没有插入成功,给出 阅读全文
posted @ 2020-01-26 17:00 JasonPeng1 阅读(127) 评论(0) 推荐(0)
摘要: MySQL 从 5.0.2 版本开始支持触发器的功能。触发器是与表有关的数据库对象,在满足定义 条件时触发,并执行触发器中定义的语句集合。触发器的这种特性可以协助应用在数据库端 确保数据的完整性。 MySQL 从 5.0.3 开始支持分布式事务,当前分布式事务只支持 InnoDB 存储引擎。一个 分 阅读全文
posted @ 2020-01-26 16:58 JasonPeng1 阅读(231) 评论(0) 推荐(0)
摘要: MyISAM 和 InnoDB 存储引擎的表默认创建的都是 BTREE 索引。默认情况下,MEMORY 存储引擎使用 HASH 索引,但也支持 BTREE 索引。 阅读全文
posted @ 2020-01-26 16:57 JasonPeng1 阅读(139) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 29 下一页