空数组 $arr=array(); var_dump($arr); gettype():得到变量的类型 echo gettype($arr);//array(0) {} 通过is_array():检测变量是否为数组 var_dump(is_array($arr));//arraybool(true) ...
分类:
编程语言 时间:
2020-01-10 16:01:10
阅读次数:
92
一、准备sql # 创建部门表 create table dept ( id int primary key auto_increment, name varchar(20) ); insert into dept (name) values ('开发部'), (‘市场部’), ('财务部'); # ...
分类:
数据库 时间:
2020-01-10 10:45:05
阅读次数:
75
.net中以扩展CheckBoxListFor为例 public static MvcHtmlString CheckBoxListFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, T ...
分类:
Web程序 时间:
2020-01-10 10:43:37
阅读次数:
114
文章转自 快速开始 my.ini # possible values : production, development app_mode = development [paths] # Path to where grafana can store temp files, sessions, an ...
分类:
其他好文 时间:
2020-01-09 20:25:54
阅读次数:
80
今天写一个小功能,遇到时间绑定,提交的时间时下午,14点以后的,结果返回来是减去12小时的 如:提交2020-01-10 14:30:00,然后返回的是2020-01-10 02:30:00 刚开会以为是后端的问题,后来仔细查看,发现是自己的问题。 moment(values.data).forma ...
分类:
其他好文 时间:
2020-01-09 18:42:41
阅读次数:
223
1.添加数据 INSERT INTO 表名(列名1,列名2) values(值1,,值2); -- 添加一条数据 2.删除数据 DELETE FROM 表名 WHERE 条件; -- 逐条删除,如果不加条件删除所有数据 TRUNCATE TABLE 表名; -- 直接删除表后创建一个表结构一样的表 ...
分类:
数据库 时间:
2020-01-09 17:20:15
阅读次数:
101
传统插入方式为: <insert id="create" parameterType="FcHydrantDetailEntity"> insert into fc_hydrant_detail (id, hydrantId, checkDate, checkUser) values(#{id}, ...
分类:
其他好文 时间:
2020-01-09 17:19:59
阅读次数:
85
原题链接在这里:https://leetcode.com/problems/rotting-oranges/ 题目: In a given grid, each cell can have one of three values: the value 0 representing an empty ...
分类:
其他好文 时间:
2020-01-09 10:19:58
阅读次数:
77
mysql死锁问题分析 线上某服务时不时报出如下异常(大约一天二十多次):“Deadlock found when trying to get lock;”。 Oh, My God! 是死锁问题。尽管报错不多,对性能目前看来也无太大影响,但还是需要解决,保不齐哪天成为性能瓶颈。 为了更系统的分析问题 ...
分类:
数据库 时间:
2020-01-08 18:37:43
阅读次数:
96
Given an integer n, generate all structurally unique BST's (binary search trees) that store values 1 ... n. Example: Input: 3 Output: [ [1,null,3,2], ...
分类:
其他好文 时间:
2020-01-08 12:43:14
阅读次数:
72