Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bajins committed Mar 30, 2024
1 parent 20e63be commit c719aec
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deloy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ jobs:
cd ../
ls -lh
cp -r `ls -A | grep -Ev \
".git|.github|.vuepress|.gitattributes|.gitignore|.gitmodules|package.json|README.md|notes-docsify"`\
".git|.github|.vuepress|.gitattributes|.gitignore|.gitmodules\
|package.json|README.md|index.html|notes-docsify"`\
notes-docsify
cp -r .vuepress/public/images .vuepress/public/files notes-docsify
# echo "-------------------------------------------------------------"
Expand Down
8 changes: 8 additions & 0 deletions DBS/关系型SQL标准.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@

## SQL1992

- `COALESCE`
- `CASE`
- `AVG`
- `COUNT`
- `MAX`
- `MIN`
- `SUM`
- `TO_DATE`


## SQL1999
Expand Down
23 changes: 17 additions & 6 deletions DBS/关系型数据库.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,13 @@ ORDER BY u1.column_id
SELECT SYSDATE, SYSTIMESTAMP FROM dual;
SELECT TO_CHAR(TO_TIMESTAMP('2023-05-08 10:10:10', 'yyyy-mm-dd hh24:mi:ss'), 'ww') FROM dual;
-- 得到当天凌晨0点0分0秒的日期
select trunc(sysdate) from dual;
-- 得到这天的最后一秒
select trunc(sysdate) + 0.99999 from dual;
SELECT TRUNC(SYSDATE) FROM DUAL;
-- 获取今天最后的时间(即午夜之前的那一刻)
SELECT TRUNC(SYSDATE) + 0.99999 AS last_time FROM DUAL;
SELECT TRUNC(SYSDATE) + 1 - 1/86400 AS last_time FROM dual;
SELECT TRUNC(SYSDATE) + 1 - INTERVAL '1' SECOND AS last_time FROM DUAL;
SELECT TRUNC(SYSDATE) + INTERVAL '1' DAY - INTERVAL '1' SECOND AS last_time FROM DUAL;
SELECT TRUNC(SYSDATE) + INTERVAL '23' HOUR + INTERVAL '59' MINUTE + INTERVAL '59' SECOND AS last_time FROM DUAL;

-- 获取倒推时间列表
SELECT TRUNC(sysdate - NumToDSInterval(level-1, 'hour'), 'MI') AS ds -- 'day','hour','minute','second'
Expand Down Expand Up @@ -691,13 +695,20 @@ SELECT REPLACE(md5(random()::text || clock_timestamp()::text),'-','');
select to_timestamp('2022-08-02 00:00:00', 'yyyy-MM-dd hh24:mi:ss');
select to_date('2022-08-02 23:59:59', 'yyyy-MM-dd HH24:mi:ss');
select to_char(now(), 'yyyy-MM-dd HH24:mi:ss');
select date_trunc('day', now());
select date_trunc('day', now()) - interval '1d' + ('6 hours')::INTERVAL;
-- 得到当天凌晨0点0分0秒的日期
select date_trunc('day', now());
-- 获取今天最后的时间(即午夜之前的那一刻)
SELECT CURRENT_DATE + INTERVAL '1 day' - INTERVAL '1 microsecond';
SELECT (date_trunc('day', now()) + INTERVAL '1 day' - INTERVAL '1 microsecond')::timestamp;
SELECT DATE_TRUNC('day', CURRENT_TIMESTAMP) + INTERVAL '1 day - 1 microsecond';
SELECT DATE_TRUNC('day', CURRENT_TIMESTAMP) + INTERVAL '1 day' - INTERVAL '1 microsecond';
-- 月末
select date_trunc('month', now() + '1 months') + '-1 days';

-- 获取周数
select extract(week FROM timestamp '2022-01-01') week;
SELECT date_part('week', timestamp '2022-01-01') week;
-- 月末
select date_trunc('month', now() + '1 months') + '-1 days';
-- 遍历两个日期的每一天 https://stackoverflow.com/questions/6870499/generate-series-equivalent-in-mysql
select * from generate_series('2022-09-21 00:00:00'::TIMESTAMP, '2022-09-22 00:00:00'::TIMESTAMP, '1 day');
-- 遍历两个日期的每小时
Expand Down
1 change: 1 addition & 0 deletions IDE/Chromium.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ taskkill /f /im chromedriver.exe
* [swagger-bootstrap-ui](https://chrome.google.com/webstore/detail/swagger-bootstrap-ui/dhkcgihkeepociepfdeeppmdgbdooahh)
* HTML/CSS/JS编辑展示 [https://github.com/chinchang/web-maker](https://github.com/chinchang/web-maker)
* WEB前端助手 [https://github.com/zxlie/FeHelper](https://github.com/zxlie/FeHelper)
* [https://github.com/ha0z1/PixOK](https://github.com/ha0z1/PixOK)
* JSON查看 [https://github.com/tulios/json-viewer](https://github.com/tulios/json-viewer)
* 检测浏览器指纹 [https://github.com/freethenation/DFPM](https://github.com/freethenation/DFPM)
* [https://microsoftedge.microsoft.com/addons/search/谷歌](https://microsoftedge.microsoft.com/addons/search/%E8%B0%B7%E6%AD%8C)
Expand Down
3 changes: 2 additions & 1 deletion Other/免费服务.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,13 @@
- [https://www.freenom.com](https://www.freenom.com)
- [https://github.com/luolongfei/freenom](https://github.com/luolongfei/freenom)
- [https://nic.eu.org](https://nic.eu.org)
- [人人都可申请拥有EU.org免费域名](https://51.ruyo.net/17863.html)
- [https://www.nom.za](https://www.nom.za)
- [免费申请南非 NOM.za 免费域名](https://51.ruyo.net/17968.html)
- [https://names.co.uk](https://names.co.uk)
- [https://www.dynu.com/zh-CN/ControlPanel/DDNS](https://www.dynu.com/zh-CN/ControlPanel/DDNS)


* [免费域名 - 如有乐享](https://51.ruyo.net/tag/%e5%85%8d%e8%b4%b9%e5%9f%9f%e5%90%8d)
* [如何正确绕开备案使用国内机器](https://www.hqsblog.cn/2019/12/15/237.html)


Expand Down

0 comments on commit c719aec

Please sign in to comment.