hackerfans

hackerfans

V2EX 第 595090 号会员,加入于 2022-09-23 10:28:19 +08:00
hackerfans 最近回复了
支持一下
20 天前
回复了 jeffson 创建的主题 问与答 大家多长时间给自己电脑做个保养呢?
不出问题,不保养。
应该不能怪你,可能你的父母也有错,没有正确的引导。
44 天前
回复了 yurman 创建的主题 程序员 请教一下爬虫技术
淘客有 API
作为老乡,惭愧,能存 100W 看得出,生活很节俭。加油
74 天前
回复了 imyasON 创建的主题 程序员 一个 SQL 不会写,大佬帮帮忙
BEGIN
DECLARE month_num INT;

SET month_num = 1; -- Start with January

WHILE month_num <= 12 DO
DECLARE month_str CHAR(2);
SET month_str = LPAD(month_num, 2, '0'); -- Format month as 01, 02, ...

DECLARE count_rows INT;
SET count_rows = (SELECT COUNT(1) FROM attendance_workday WHERE date_ymd LIKE CONCAT('2024', month_str, '%'));

IF count_rows > 0 THEN
-- Perform UPDATE statements for the current month
-- Replace placeholders with actual UPDATE statements for each month
EXECUTE IMMEDIATE CONCAT('UPDATE attendance_workday SET date_ymd = '2024', month_str, '01', ', is_work = '1' WHERE date_ymd LIKE '2024', month_str, '%'');
-- Add similar UPDATE statements for other dates in the month
ELSE
-- Perform INSERT statements for the current month
-- Replace placeholders with actual INSERT statements for each month
EXECUTE IMMEDIATE CONCAT('INSERT INTO attendance_workday (date_ymd, is_work) VALUES (''2024', month_str, '01'', ''1''), (''2024', month_str, '02'', ''1''), ...');
-- Add remaining date-is_work pairs for the month
END IF;

SET month_num = month_num + 1; -- Move to the next month
END WHILE;
END
1 核 2G 1MB 服务器表示 django 性能够用了
85 天前
回复了 red13 创建的主题 GitHub 你们还能访问 github 吗?
北京表示 不行,也是这两星期的事
107 天前
回复了 crazychang 创建的主题 问与答 爬虫相关问题请教
没必要下载,本来就可以显示全文,直接爬取全文文本,生成 PDF 或 WORD
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   986 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 20ms · UTC 20:08 · PVG 04:08 · LAX 13:08 · JFK 16:08
Developed with CodeLauncher
♥ Do have faith in what you're doing.