自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Python的专栏

Python保存中文

  • 博客(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 1170

原创 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 1610

原创 PyCharm Django Server 无法调试

PyCharm Django Server 无法调试问题描叙: 在 PyCharm 中打开项目 Example, 在 Run —> Edit Configurations 中配置 Django Server , 调试运行无法进入断点, 当前项目的代码也没生效 解决方案: 在 PyCharm —> Preferences —> Django —> Enable Dj...

2018-04-07 15:10:23 4490 1

原创 编程语言类型小结

参考链接:弱类型、强类型、动态类型、静态类型语言的区别是什么无类型: 汇编弱类型、静态类型检查 : 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 1803

原创 保存中文

保存中文到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 245

原创 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 2455 4

原创 phantom 输出中文乱码

解决方案: 1.phantom.outputEncoding=”gbk”; 参考链接 http://blog.csdn.net/winterto1990/article/details/49158251 https://www.cnblogs.com/wufangfang/p/5326375.html 2.运行命令时,输入 –output-ecoding=gb2312 3.运行时不做设

2018-01-23 11:01:45 1421

原创 pycharm启动 一直index,无法运行

花了几个小时找相关资料,按网上提供答案操作,依然没有解决,最后让它自动更新完才好(大概更新了半小时)参考链接pycharm启动后总是不停的updating indices...indexing?https://www.zhihu.com/question/47427720/answer/152196137pycharm 启动后一直更新index的问题https://www.

2018-01-13 15:10:53 21789 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 3262

原创 在模拟器中同时调试iOS和WatchKit App

有一个方法可以同时调试iOS和WatchKit App:运行WatchKit App;在你的模拟器中打开iOS版App;返回Xcode;选择Debug> Attach to Process > (YOUR iOS App)

2016-05-18 17:39:40 1199

原创 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 1134

原创 Mac 上Tilt-Shift 效果的实现代码

- (NSImage *)updateImageFromImage:(CGImageRef)imgRef                   withTransition:(CGFloat)transition                             blur:(CGFloat)blur{   CGFloat w = CGImageGetWidth(imgRef

2014-04-16 14:23:07 749

Mac app中图片任意角度的旋转和裁剪

Mac app 中图片任意的旋转和裁剪例子

2014-04-17

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除