----- BEGIN LICENSE -----Andrew WeberSingle User LicenseEA7E-855605813A03DD 5E4AD9E6 6C0EEB94 BC99798F942194A6 02396E98 E62C9979 4BB979FE91424C9D A454...
分类:
其他好文 时间:
2014-07-22 22:54:55
阅读次数:
157
#coding=gbk'''Created on 2014-5-7'''import os.pathinputPath = './input.txt'outPath = './out.txt'bufferSize = 10inputFile = open(inputPath, 'rb')outFil...
分类:
编程语言 时间:
2014-07-18 20:34:41
阅读次数:
246
最近做了一个项目需要把订单的信息显示出来,并且能够把相关信息放到一个.csv 文件中,下载到浏览器。首先我要说明的是.csv 文件,PHP 有专门的函数去解析该类型的文件,相关函数大家可以去官网查看。注意.csv 文件内容的编码格式是gbk格式的,所以有必要对字符格式进行转码。文件的样式如下。
...
分类:
Web程序 时间:
2014-07-18 11:28:48
阅读次数:
308
在开发过程中,可能会遇到文件编码的转换,虽然说开发工具eclipse可以转换编码,但是有的情况却很不方便。比如,原来文件本身的编码是GBK,现在要转换成UTF-8,如果直接在eclipse中把文件编码修改成UTF-8,恭喜你,是乱码,因为不能直接从GBK到UTF-8进行转换,这时就需要我们手动的来转换编码。下面是一个文件编码转换的工具类。
package com.mikan.stuff;
im...
分类:
编程语言 时间:
2014-07-18 11:20:59
阅读次数:
218
无赖右方向键→和End键都在键盘的另一边,每次输入完一个函数,光标在各种括号中间,有什么更好的方式将光标移出来呢?在Sublime Text 2中,我们可以自己设置快捷键: { "keys": ["ctrl+alt+space"], "command": "move", "args": {"by":...
分类:
其他好文 时间:
2014-07-17 17:28:58
阅读次数:
228
Sublime Text 2是一个轻量、简洁、高效、跨平台的编辑器,方便的配色以及兼容vim快捷键等各种优点博得了很多前端开发人员的喜爱,当然也包括我,在看到小飞的介绍后,我就一直在用了。本文推荐一些好用的插件和扩展。Sublime Text 2基本上是共享软件,免费版和收费版基本无区别,只是偶尔会...
分类:
其他好文 时间:
2014-07-17 13:08:20
阅读次数:
217
Searching
To open the search panel for the active file, press
Ctrl + F. Someoptions and actions available through this panel can be controlled from thekeyboard:
Toggle Regular Expression...
分类:
其他好文 时间:
2014-07-16 16:32:20
阅读次数:
187
Search and Replace
Sublime Text features two main types of search:
Search - Single FileSearch - Multiple Files
We’ll examine them in turn, but first let’s talk about a powerful tool for searc...
分类:
其他好文 时间:
2014-07-16 16:18:52
阅读次数:
312
Search and Replace - Multiple Files
Searching
To open the search panel for files, press Ctrl
+ Shift +
F. You can use thekeyboard to control some search panel options and search actions:
...
分类:
其他好文 时间:
2014-07-16 16:17:14
阅读次数:
212
命令行提示符下,python print输出unicode字符时出现以下UnicodeEncodeError:'gbk'codec can't encode character '\u30fb不能输出 unicode 字符,程序中断。解决方法:sys.stdout=io.TextIOWrapper(...
分类:
编程语言 时间:
2014-07-16 16:01:53
阅读次数:
270