- 博客(12)
- 资源 (1)
- 收藏
- 关注
原创 Mac 上的用户管理命令 dscl
dsclDirectory Service command line utility用于创建、读取、管理目录服务数据语法:dscl [options] datasource [command]列出 /Users 目录下的不以“”开头的用户dscl . list /Users | grep -v '^’删除用户 yarnsudo dscl . -delete /Users/yarn...
2020-11-24 07:53:47
1269
原创 Linux上设置终端远程登录不自动退出
Linux上设置终端远程登录不自动退出Linux上设置终端远程登录不自动退出问题解决方案Linux上设置终端远程登录不自动退出问题Linux上远程登录,默认10分钟没操作会自动退出,原因是默认的TMOUT设置为600,即10分钟使用 echo $TMOUT 查看解决方案在/etc/profile 中设置 TMOUT=0进入profile vi /etc/profile底部添加设置export TMOUT=0wq 保存立即生效 source /etc/profile...
2020-07-11 17:05:40
1849
原创 PyCharm Django Server 无法调试
PyCharm Django Server 无法调试问题描叙: 在 PyCharm 中打开项目 Example, 在 Run —> Edit Configurations 中配置 Django Server , 调试运行无法进入断点, 当前项目的代码也没生效 解决方案: 在 PyCharm —> Preferences —> Django —> Enable Dj...
2018-04-07 15:10:23
4803
2
原创 编程语言类型小结
参考链接:弱类型、强类型、动态类型、静态类型语言的区别是什么无类型: 汇编弱类型、静态类型检查 : C/C++弱类型、动态类型检查: Perl/PHP、VB、JavaScript强类型、静态类型检查 :Java/C#、Scala、F#、Haskel强类型、动态类型检查 :Python, Scheme、Erlang、Ruby、Groovy、Clojure、Magik静态显式类型 :J...
2018-03-02 19:53:24
1867
原创 保存中文
保存中文到txt 使用二进制存储#coding:utf-8s = '中文'f = open("test.txt","wb")f.write(s.encode())f.close()保存到jsonwith open('dmbj.json', 'w', encoding='utf-8') as fp: json.dump(content, fp, indent=4
2018-02-05 22:58:54
269
原创 Ubuntu安装phantomjs运行报错
Ubuntu安装phantomjs运行报错: QXcbConnection: Could not connect to display PhantomJS has crashed. Please read the bug reporting guide at http://phantomjs.org/bug-reporting.html and file a bug report.
2018-01-24 09:55:26
2514
4
原创 phantom 输出中文乱码
解决方案: 1.phantom.outputEncoding=”gbk”; 参考链接 http://blog.youkuaiyun.com/winterto1990/article/details/49158251 https://www.cnblogs.com/wufangfang/p/5326375.html 2.运行命令时,输入 –output-ecoding=gb2312 3.运行时不做设
2018-01-23 11:01:45
1467
原创 pycharm启动 一直index,无法运行
花了几个小时找相关资料,按网上提供答案操作,依然没有解决,最后让它自动更新完才好(大概更新了半小时)参考链接pycharm启动后总是不停的updating indices...indexing?https://www.zhihu.com/question/47427720/answer/152196137pycharm 启动后一直更新index的问题https://www.
2018-01-13 15:10:53
21827
2
原创 UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
Python3中使用urllib.request.build_opener处理请求,输出返回数据报错:UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte原因:在请求header中设置了'Accept-Encoding': 'gzip, deflate'参考链
2018-01-11 10:01:24
3294
原创 在模拟器中同时调试iOS和WatchKit App
有一个方法可以同时调试iOS和WatchKit App:运行WatchKit App;在你的模拟器中打开iOS版App;返回Xcode;选择Debug> Attach to Process > (YOUR iOS App)
2016-05-18 17:39:40
1274
原创 Code Sign error
问题:Building Setting->Code Signing配置正确,但是Build 工程,出现如下错误信息Code Sign error: No matching provisioning profiles found: No provisioning profiles matching the bundle identifier “*.Watch-App-Test” were f
2015-03-16 14:45:19
1171
原创 Mac 上Tilt-Shift 效果的实现代码
- (NSImage *)updateImageFromImage:(CGImageRef)imgRef withTransition:(CGFloat)transition blur:(CGFloat)blur{ CGFloat w = CGImageGetWidth(imgRef
2014-04-16 14:23:07
768
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人