会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
JasonPeng1
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
···
29
下一页
2020年1月27日
树的遍历——A1106.Lowest Price in Supply Chain(25) 求树的深度最小的叶子结点 与A1190类似
摘要: #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)
2020年1月26日
树的遍历——A1094 The Largest Generation(25)(树的静态结构——> vector<int> Node[maxn]来表示)
摘要: 法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)
树的遍历——A1079.Total Sales of Supply Chain(25) 与A1090类似
摘要: #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)
树的遍历——A1090 Highest Price in Supply Chain(25) 求树的深度最大的叶子节点(使用vector<Int> temp[maxn]来当作树)
摘要: #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)
LeetCode 数据库
摘要: 配合《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)
《深入浅出Mysql》—— 第二十章 锁问题
摘要: 在如表 20-3 所示的例子中,一个 session 使用 LOCK TABLE 命令给表 film_text 加了读锁,这 个 session 可以查询锁定表中的记录,但更新或访问其他表都会提示错误;同时,另外一个 session 可以查询表中的记录,但更新就会出现锁等待。 当使用 LOCK TA
阅读全文
posted @ 2020-01-26 17:03 JasonPeng1
阅读(193)
评论(0)
推荐(0)
《深入浅出Mysql》——第三篇 优化篇 第十七章 常用SQL技巧和常见问题 + 第十八章 SQL优化 + 第十九章 优化数据库对象
摘要: 可以利用这个函数与ORDER BY子句一起完成随机抽取某些行的功能。它的原理其实 就是ORDER BY RAND()能够把数据随机排序。 加索引 CHECK TABLE 也可以检查视图是否有错误,比如在视图定义中被引用的表已不存在,举例如 下。
阅读全文
posted @ 2020-01-26 17:01 JasonPeng1
阅读(251)
评论(0)
推荐(0)
《深入浅出Mysql》——第十五章 SQL中的安全问题 + 第十六章 SQL Mode 及相关问题
摘要: 它的产生主要是由于程序对用户输入的数据没有进行严格的 过滤,导致非法数据库查询语句的执行。 而且,SQL Injection 也很难防范。网站管理员无法通过安装系统补丁或者进行简 单的安全配置进行自我保护,一般的防火墙也无法拦截 SQL Injection 攻击 结果发现,这次记录没有插入成功,给出
阅读全文
posted @ 2020-01-26 17:00 JasonPeng1
阅读(127)
评论(0)
推荐(0)
《深入浅出Mysql》——第十二章 存储过程和函数 + 第十三章 触发器 + 第十四章 事物控制和锁定语句
摘要: MySQL 从 5.0.2 版本开始支持触发器的功能。触发器是与表有关的数据库对象,在满足定义 条件时触发,并执行触发器中定义的语句集合。触发器的这种特性可以协助应用在数据库端 确保数据的完整性。 MySQL 从 5.0.3 开始支持分布式事务,当前分布式事务只支持 InnoDB 存储引擎。一个 分
阅读全文
posted @ 2020-01-26 16:58 JasonPeng1
阅读(231)
评论(0)
推荐(0)
《深入浅出Mysql》——第九章 字符集 + 第十章 索引的设计和使用 + 第十一章 视图
摘要: 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
下一页
公告