会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
in_the_way
博客园
首页
新随笔
联系
管理
订阅
2018年4月10日
python 编码问题
摘要: 中文iso8859-1编码转utf8编码 str.encode("gbk").decode('gbk').encode('utf-8') 原理: utf8编码的文本可以用iso8859-1的编码表示,但是反过来不行。iso8859-1是单字节编码,而utf8是定长编码,从utf8转化成iso8859
阅读全文
posted @ 2018-04-10 11:08 in_the_way
阅读(118)
评论(0)
推荐(0)
2018年2月24日
django 框架中应用 redis 集群
摘要: 1. 在 setting.py 中添加 :
阅读全文
posted @ 2018-02-24 17:03 in_the_way
阅读(798)
评论(0)
推荐(0)
2018年2月11日
redis lrem 问题
摘要: pool = redis.ConnectionPool(host='localhost', port=6379, decode_responses=True)r = redis.Redis(connection_pool=pool)r.lrem('key', 1, 'value') # 删除链表 k
阅读全文
posted @ 2018-02-11 16:20 in_the_way
阅读(309)
评论(0)
推荐(0)
2018年2月8日
crontab 中不能执行定时任务的问题
摘要: */1 * * * * cd /data/application/cmdb_test/script && python sync_user.py > /home/deploy/cmdb.log # 每分钟执行一次,sync_user.py 问题是:cd /data/application/cmdb_
阅读全文
posted @ 2018-02-08 17:01 in_the_way
阅读(157)
评论(0)
推荐(0)
2018年2月7日
mkdir -p 参数的使用
摘要: ssh root@%s -o ConnectTimeout=2 "ssh root@%s ConnectTimeout=2 "if [ ! -d /root/scripts ]; then mkdir /root/scripts; fi"" # 有语法错误 改变思路:(mkdir -p 参数) ss
阅读全文
posted @ 2018-02-07 16:38 in_the_way
阅读(2164)
评论(0)
推荐(0)
2017年8月9日
8/9
摘要: 1.要出始化添加时的多选框,不能使用 row[],要 用两次 http 请求 2.要对某一列进行特殊处理,就对某一列 做一个 formatter 3.降低进程数,可以降低 cpu的使用率 4.健康检查的接口的 crvf 防攻击问题,返回json字符串
阅读全文
posted @ 2017-08-09 08:47 in_the_way
阅读(137)
评论(0)
推荐(0)
2017年8月8日
8/8
摘要: 1.块状显示 2.下拉框单选 3.复选下拉框 4.idc 弹框 5.select的默认选项
阅读全文
posted @ 2017-08-08 08:51 in_the_way
阅读(329)
评论(0)
推荐(0)
2017年8月7日
8/7 工作总结
摘要: 1.利用 ansible 自动化工具,获取相应主机的信息 (1) 调用接口得到相应的 ip 链表 (http 协议) (2)调用 ansible python api 利用 ssh 协议获取相应ip的网络信息,系统信息(json 解析数据) 1 class MyInventory(Inventory
阅读全文
posted @ 2017-08-07 23:46 in_the_way
阅读(386)
评论(0)
推荐(0)
2016年5月23日
Linux中的find指令
摘要: find find是最常见和最强大的查找命令,在磁盘中查找文件,用它找到任何你想找的文件,就是速度有点慢。 find path -option [ -print ] [ -exec -ok command ] {} \; path是文件的路径,option 是各个参数,[]中内容是附加项可有可无;
阅读全文
posted @ 2016-05-23 17:44 in_the_way
阅读(312)
评论(0)
推荐(0)
2016年5月16日
堆排序
摘要: 堆排序 堆排序: template<class T> void _AdjustDown(T* arr, size_t size, size_t index) { size_t child = index * 2 + 1; while (child < size) { if (child + 1 <
阅读全文
posted @ 2016-05-16 10:34 in_the_way
阅读(419)
评论(0)
推荐(0)
下一页
公告