摘要: <?php namespace app\admin\validate; use think\validate; class VideoKeywords extends validate { protected $rule = [ 'keyword' => ['require', 'unique' = 阅读全文
posted @ 2022-07-28 17:23 _迷途 阅读(177) 评论(0) 推荐(0)
摘要: import json import os, sys import platform import time from seleniumwire import webdriver from selenium.webdriver.firefox.firefox_binary import Firefo 阅读全文
posted @ 2022-07-28 17:19 _迷途 阅读(478) 评论(0) 推荐(0)
摘要: SELECT CAST(id AS char) AS id FROM `table_name` 我也不知道为啥会导致自动四舍五入,有知道的吗? 阅读全文
posted @ 2022-07-15 16:09 _迷途 阅读(65) 评论(0) 推荐(0)
摘要: function getDateRange($dateStart,$dateEnd,bool $timestamp=false): array { $dateStartTimeStamp = strtotime($dateStart); $dateEndTimeStamp = strtotime($ 阅读全文
posted @ 2022-04-20 13:18 _迷途 阅读(154) 评论(0) 推荐(0)
摘要: 在Base控制器里写: View::assign('aaa','123'); 阅读全文
posted @ 2022-04-11 15:50 _迷途 阅读(58) 评论(0) 推荐(0)
摘要: db_host = "localhost" db_user = "root" db_pass = "root" db_name = "test" db_port = 3306 db_charset = "utf8" # -*- coding: utf-8 -*- """Python连接到 MySQL 阅读全文
posted @ 2022-03-17 09:47 _迷途 阅读(377) 评论(0) 推荐(0)
摘要: /** * @param $arr array 数组 * @param $key string 唯一键 * @return array */ function getArrayUniqueByKeys(array $arr, string $key):array { if (isset($arr[0 阅读全文
posted @ 2022-03-11 15:53 _迷途 阅读(76) 评论(0) 推荐(0)
摘要: hexdec(uniqid()) hexdec(uniqid()) 阅读全文
posted @ 2022-03-03 13:15 _迷途 阅读(392) 评论(0) 推荐(0)
摘要: 查询用户ID为1的所有子用户: select id, name, parent from (select * from tablename order by parent, id) tablename, (select @pv := '1') initialisation where find_in 阅读全文
posted @ 2022-02-09 15:01 _迷途 阅读(58) 评论(0) 推荐(0)
摘要: /** * 格式化打印:JSON字符串|对象|数组 * @param string|array $data */ public static function Console($data) { if (is_string($data) && 0 < strlen($data) && self::is 阅读全文
posted @ 2022-01-14 15:17 _迷途 阅读(220) 评论(0) 推荐(0)