随笔- 310
文章- 1
评论- 0
阅读-
85655
10 2022 档案
linux 下jq命令
摘要:安装 yum install jq -y 新建文件 vim test.json #加入下面内容,保存 [{"name":"菜鸟教程","url":"www.runoob.com"},{"name":"google","url":"www.google.com"},{"name":"微博","url"
阅读全文
mysql 按指定字段 值排序
摘要:创建表 CREATE TABLE `field_data` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', `name` varchar(255) DEFAULT NULL COMMENT '名称', PRIMARY KEY (`id`) U
阅读全文
php unicode转为汉字
摘要:function u2c($str){ return preg_replace_callback("#\\\u([0-9a-f]{4})#i", function ($r) { return iconv('UCS-2BE', 'UTF-8', pack('H4', $r[1]));},$str);
阅读全文
php 新建对象
摘要:class Car { var $color; function __construct($color="green") { $this->color = $color; } function what_color() { return $this->color; } }
阅读全文
mysql alter
摘要:alter table test modify column `code` varchar(200); alter table test change ret rets varchar(100) DEFAULT NULL COMMENT '返回值'; --修改字段名 ALTER TABLE test
阅读全文
json 格式化输出
摘要:import json d={"a":"我们","b":"test"} print(json.dumps(d)) #{"a": "\u6211\u4eec", "b": "test"} print(json.dumps(d,ensure_ascii=False,indent=2)) """ { "a
阅读全文