Skip to content
Permalink
Browse files

feat: udpate 05/11

  • Loading branch information...
alterhu2020 committed May 14, 2019
1 parent a3639b6 commit 728e5e437f24489d411ffaa499db9226c2688089
Showing with 247 additions and 2 deletions.
  1. +6 −2 docs/.vuepress/sidebar.js
  2. +93 −0 docs/blog/2019/05-10-what.md
  3. +138 −0 docs/blog/2019/05-11-what.md
  4. +1 −0 docs/blog/tools/ps.md
  5. +9 −0 docs/blog/video/the-thunder.md
@@ -12,6 +12,7 @@ module.exports ={
title: '2019年',
collapsable: false,
children: [
'2019/05-11-what',
'2019/05-10-what',
'2019/05-09-what',
'2019/05-06-what',
@@ -37,6 +38,7 @@ module.exports ={
collapsable: false,
path: '/blog/video/',
children: [
'video/the-thunder',
'video/arctic',
'video/as-far-as-my-feet-carry-me',
['video/game-of-the-thrones','权利的游戏(终结篇)']
@@ -46,11 +48,13 @@ module.exports ={
title: '友情链接',
collapsable: false,
children: [
['http://www.ruanyifeng.com/blog/','阮一峰博客'],
['http://www.ruanyifeng.com/blog/','阮一峰博客-前端'],
['https://www.jianshu.com/u/4ca93d60a9fe', 'IT晴天-前端'],
['https://github.com/vuejs/awesome-vue','awesome vue'],
['https://ionicframework.com/docs/components','Ionic Vue Components'],
['https://github.com/vueComponent/ant-design-vue-awesome','awesome ant-design-vue'],
['https://github.com/ulivz/awesome-vuepress','awesome-vuepress']
['https://github.com/ulivz/awesome-vuepress','awesome-vuepress'],
['https://tool.lu/', '工具集']
]
}
]
@@ -44,3 +44,96 @@ title: 5月10日整理
}
```

## 上传的图片右上角加上一个删除的按钮

```
<div style="position: relative">
<img src="http://www.google.co.in/images/srpr/logo4w.png" />
<img src="http://wecision.com/enterprise/images/icons/closeIcon.png" style="position: absolute; top: 4px; right: 5px"/>
</div>
```


## Mysql 树查询,递归查询,查询子节点

1. 树查询的一个讲解: [mariadb](https://mariadb.com/kb/en/library/recursive-common-table-expressions-overview/)
2. mysql解决方案: [statckoverflow](https://stackoverflow.com/questions/20215744/how-to-create-a-mysql-hierarchical-recursive-query)


[一个详细的讲解递归的例子文章:](https://www.cnblogs.com/elevenlang/p/3490844.html)

```
with recursive cte (PanoUserKey, PanoManagerUserKey) as (
select
pum.PanoUserKey,
pum.PanoManagerUserKey
from PanoUserManager pum
where pum.PanoManagerUserKey = 258
union all
select
pum.PanoUserKey,
pum.PanoManagerUserKey
from PanoUserManager pum
inner join cte
on pum.PanoManagerUserKey = cte.PanoUserKey
)
select * from cte;
```

**讲解**步骤:

1. CTE支持递归查询,定义一个递归CTE至少需要两个(可能更多)查询:第一个查询称为定位点成员,第二个查询称为递归成员

1.1 至少定义两个查询,第一个查询是定位查询,定位查询只被调用一次, 第二个查询为递归成员

- 此处的定位查询只返回谁的上级是 258的员工,只执行一次,获取当前结果
- 第二个递归查询,在第一次定位查询后, cte返回的结果集是上级258的员工的结果集。
- 然后与总的结果表进行内联,内联的条件是这次的查询的节点id对应的总结果的父节点id(**注意因为我们需要得到的是父节点下面的所有子节点**,所以是当前结果的节点id对应总结果的父节点id,这个同定位查询的子查询后面的字段一致),返回上一次调用的结果中返回的直接下属。
- 接下来的就是多次调用递归查询与总表一直在递归查询,直到无法再查询到结果集为止。


### 其他参考SQL语句

- 定位查询可以是任意查询SQL

```sql
WITH CTE_TEMP --公用表表达式(Common Table Expression)
as(
select * FROM ProvinceCity_Test where value LIKE '%西安%'
union ALL
SELECT a.* FROM ProvinceCity_Test a
INNER JOIN CTE_TEMP b ON a.ID = b.ParentID --父子级关系,递归,递归部分不允许使用外部联接(不允许使用left join等)
)
SELECT * FROM CTE_TEMP -- CTE后面必须直接跟使用CTE的SQL语句(如select、insert、update等),否则,CTE将失效。
```

- 递归查询中查询结果分隔符

[参考递归查询结果分隔符](https://blog.csdn.net/dufemt/article/details/80773394)

![alter](https://img-blog.csdn.net/20180622145111389?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2R1ZmVtdA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)

```sql
with RECURSIVE cte as
(
select a.id,cast(a.name as varchar(100)) from tb a where id='002'
union all
select k.id,cast(c.name||'>'||k.name as varchar(100)) as name from tb k inner join cte c on c.id = k.pid
)select id,name from cte ;
```


## 建表规范参考阿里巴巴手册

1. UNSIGNED属性就是将数字类型无符号化,与C、C++这些程序语言中的unsigned含义相同。例如,INT的类型范围是-2 147 483 648 ~ 2 147 483 647, INT UNSIGNED的范围类型就是0 ~ 4 294 967 295


## raspberry上没有mariadb 10.3支持

> MariaDB's 10.3 builds are only for i386 (32-bit), amd64 (64-bit) and ppc64el (PowerPC). Your Pi has an ARM processor which needs a particular build for that architecture.
官方没有发布对应的这种包。
@@ -0,0 +1,138 @@
---
title: 5月11日整理
---


## ionic常用css工具集

[参考官方css工具集](https://ionicframework.com/docs/layout/css-utilities)

- 内间距

1. 子元素上下左右间距 padding
1. 子元素无间距 no-padding
2. 子元素上下间距 padding-vertical
3. 子元素左右间距 padding-horizontal

- 外间距

1. 与外元素间距16px margin
2. 与外元素无间距 no-margin
3. 上下元素间距16px margin-vertical
4. 左右元素间距16px margin-horizontal

- 行元素排列顺序 div包裹元素

1. text-left
2. text-right
3. text-start
4. text-end
5. text-center
6. text-justify
7. text-wrap
8. text-nowrap
9. text-uppercase
10. text-lowercase
11. text-capitalize

```
<ion-col>
<div class="ion-text-nowrap">
<h3>text-nowrap</h3>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</div>
</ion-col>
```

- 边角间距

1. no-border

- flex布局

## ionic的card组件样式

默认的card的周围有灰色的阴影,采用如下样式将对应的灰色去掉:

```
.card {
/*border-radius:10px;*/
/*box-shadow: 1px 8px 11px rgba(131, 131, 131, 0.25), 0 8px 8px rgba(124, 124, 124, 0.22);*/
}
.card, .list-inset {
overflow: hidden;
margin: 20px 10px;
border-radius: 2px;
background-color: #fff;
}
/** 去掉周围阴影**/
.card {
padding-top: 1px;
padding-bottom: 1px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
/*box-shadow: none !important;*/
border: none !important;
border-style: none !important;
}
.card .item {
border-left: 0;
border-right: 0;
}
.card .item:first-child {
border-top: 0;
}
.card .item:last-child {
border-bottom: 0;
}
.padding .card, .padding .list-inset {
margin-left: 0;
margin-right: 0;
}
.card .item:first-child, .list-inset .item:first-child, .padding > .list .item:first-child {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.card .item:first-child .item-content, .list-inset .item:first-child .item-content, .padding > .list .item:first-child .item-content {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.card .item:last-child, .list-inset .item:last-child, .padding > .list .item:last-child {
border-bottom-right-radius: 2px;
border-bottom-left-radius: 2px;
}
.card .item:last-child .item-content, .list-inset .item:last-child .item-content, .padding > .list .item:last-child .item-content {
border-bottom-right-radius: 2px;
border-bottom-left-radius: 2px;
}
.card .item:last-child, .list-inset .item:last-child {
margin-bottom: -1px;
}
.card .item, .list-inset .item, .padding > .list .item, .padding-horizontal > .list .item {
margin-right: 0;
margin-left: 0;
}
.card .item.item-input input, .list-inset .item.item-input input, .padding > .list .item.item-input input, .padding-horizontal > .list .item.item-input input {
padding-right: 44px;
}
.padding-left > .list .item {
margin-left: 0;
}
.padding-right > .list .item {
margin-right: 0;
}
```
@@ -13,3 +13,4 @@ title: PhotoShop CC 2018

![ps-resize](./img/ps-resize.png)

### 图片如何压缩大小?
@@ -0,0 +1,9 @@
---
title: 破冰行动
---

## 破冰行动的剧情简介

境外某跨国贩毒集团勾结东山当地不法分子进行大规模的地下冰毒生产,以达到将大量冰毒销往中国内陆省份及海外以获取高额利润的目的。 在此复杂危险的环境下,以李飞为代表的缉毒警不畏牺牲拼死撕开当地毒贩和保护伞织起的那张巨大的地下毒网,并冲破重重迷局,为“雷霆扫毒专项行动”的顺利展开扫清障碍。

目前看了两集,感觉剧情还算紧凑,其中的情节挺真实的。。。尤其是第二集中围堵的枪战场面。。。

0 comments on commit 728e5e4

Please sign in to comment.
You can’t perform that action at this time.