Fork me on GitHub
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页
摘要: js判断页面是否为手机端访问 var ua = navigator.userAgent; var ipad = ua.match(/(iPad).*OS\s([\d_]+)/), isIphone = !ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/), isAn 阅读全文
posted @ 2021-03-31 18:34 君乐豹 阅读(2265) 评论(0) 推荐(0) 编辑
摘要: 一般的版本号中会涉及到多个小数点,且是字符串类型,现有三个版本号,对版本号进行从小到大(由旧到新)排序 原始版本号结构: array(10) { [0]=> string(6) "1.0.10" [1]=> string(6) "1.0.11" [2]=> string(5) "1.0.5" [3] 阅读全文
posted @ 2021-03-02 12:05 君乐豹 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 方法一 :根据订单列表中最大id号生成 方法二 :根据时间生成订单号 阅读全文
posted @ 2021-02-26 17:53 君乐豹 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 很多大牛公司建议select where in中不要超过200,有的说不要超过500.那么问题来了,使用子查询的时候如果结果级超过了500呢。今天做了个测试 下面是测试结果,分别是两个语句查询10次所用的时间 select * from cp_bill_info where id in(select 阅读全文
posted @ 2021-02-24 11:50 君乐豹 阅读(975) 评论(0) 推荐(0) 编辑
摘要: 第一章:小明和他的手机 从前有个人叫小明 小明有三大爱好,抽烟,喝酒…… 咳咳,不好意思,走错片场了。应该是逛知乎、玩王者农药和抢微信红包 我们用一段简单的伪代码,来制造一个这样的小明 class Ming extends Person { private $_name; private $_age 阅读全文
posted @ 2021-02-19 15:45 君乐豹 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 应用场景:处理大量数据(14W条数据)进行批量插入数据库操作,如果14W条数据直接进行插入会导致数据库服务器CPU负载过大、出现慢日志,解决的方法就是对这个字典进行分割,分组去进行插入。 将14W条数据(dict 字典)转为列表(list),列表中的每一组都还是字典,每组150条数据。 python 阅读全文
posted @ 2021-02-19 12:19 君乐豹 阅读(1429) 评论(0) 推荐(0) 编辑
摘要: 访问PHP时生成TXT文件并自动下载。 $filename = "filename.txt"; header("Content-Type: application/octet-stream"); header('Content-Disposition: attachment; filename="' 阅读全文
posted @ 2021-02-07 16:46 君乐豹 阅读(1132) 评论(0) 推荐(0) 编辑
摘要: 原文:https://www.cnblogs.com/cepaAllium/p/11025877.html 阅读全文
posted @ 2021-02-07 16:40 君乐豹 阅读(494) 评论(0) 推荐(0) 编辑
摘要: 目录 有分隔符的字符串拆分 【0】需求 数据库中 num字段值为: 实现的效果:需要将一行数据变成多行 实现的SQL SELECT SUBSTRING_INDEX(SUBSTRING_INDEX('7654,7698,7782,7788',',',help_topic_id+1),',',-1) A 阅读全文
posted @ 2021-01-29 18:42 君乐豹 阅读(1561) 评论(0) 推荐(0) 编辑
摘要: #theta = theta - alpha*(theta*X-Y)*X theta = 1.0 #(alpha 阿尔法) alpha = 0.1 #100次遍历 for i in range(100): #sum/3.0表示求加权平均值 theta = theta + np.sum(alpha*( 阅读全文
posted @ 2021-01-22 18:00 君乐豹 阅读(537) 评论(0) 推荐(0) 编辑
摘要: 1、Layer用js方式定义表单ID列数据,加了个排序的字段sort:true2、结果提示:TypeError n.sort is not a function 3、源代码: ,{field: 'id', width: 80, title: 'ID', sort: true} 4、原因: 你返回的J 阅读全文
posted @ 2021-01-22 17:51 君乐豹 阅读(780) 评论(0) 推荐(0) 编辑
摘要: hello~大家新年好,已经好久没有更博了,刚刚在运行python文件的时候竟然报SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: tr这个错误,其实引起这个错误的原因就是转义 阅读全文
posted @ 2021-01-22 17:48 君乐豹 阅读(799) 评论(0) 推荐(0) 编辑
摘要: 1、问题描述:有时候输出的json,list,等其他格式的数据打印出来数据量很大的情况下很难复制出来。 2、解决思路:print函数里有重定向参数,可以将需要打印的内容,打印到指定的文件中保存下来。一,打开一个文件,二,将内容保存到此文件中。 3、实例: K = 30 # 一,打开一个文件,文件对象 阅读全文
posted @ 2021-01-22 17:43 君乐豹 阅读(755) 评论(0) 推荐(0) 编辑
摘要: 一、case when的使用方法 Case具有两种格式。简单Case函数和Case搜索函数。 第一种 格式 : 简单Case函数 : 格式说明 case 列名 when 条件值1 then 选项1 when 条件值2 then 选项2....... else 默认值 end eg: select c 阅读全文
posted @ 2021-01-15 17:52 君乐豹 阅读(8080) 评论(5) 推荐(2) 编辑
摘要: 很不错的图表库:http://fontawesome.dashgame.com/ 阅读全文
posted @ 2020-12-30 17:54 君乐豹 阅读(92) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页
Live2D