hackerfans

hackerfans

V2EX 第 595090 号会员,加入于 2022-09-23 10:28:19 +08:00
今日活跃度排名 8715
hackerfans 最近回复了
4 小时 26 分钟前
回复了 jeffson 创建的主题 随想 大家多长时间给自己电脑做个保养呢?
不出问题,不保养。
应该不能怪你,可能你的父母也有错,没有正确的引导。
23 天前
回复了 yurman 创建的主题 程序员 请教一下爬虫技术
淘客有 API
作为老乡,惭愧,能存 100W 看得出,生活很节俭。加油
53 天前
回复了 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 性能够用了
64 天前
回复了 red13 创建的主题 GitHub 你们还能访问 github 吗?
北京表示 不行,也是这两星期的事
87 天前
回复了 crazychang 创建的主题 问与答 爬虫相关问题请教
没必要下载,本来就可以显示全文,直接爬取全文文本,生成 PDF 或 WORD
96 天前
回复了 inSpring 创建的主题 Python 大家最近新项目用什么 Web 框架?
django 凑合
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5342 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 19ms · UTC 07:09 · PVG 15:09 · LAX 00:09 · JFK 03:09
Developed with CodeLauncher
♥ Do have faith in what you're doing.