Python OS文件操作模块常用函数 Python提供了一个os模块,里面包含了很多操作文件和目录的函数全部函数可以用help(os)或是dir(os)查看其用法。 2017-04-12 Python
Linux自定义命令 很多常用的命令,很长的路径输出很麻烦,用户可利用alias,自定指令的别名。 可以利用 alias 来解决 语 法:alias[别名]=[指令名称] 补充说明:若仅输入alias,则可列出目前所有的别名设置。alias的效力仅及于该次登入的操作。若要每次登入是即自动设好别名,可在/etc/profile或自己的~/.bashrc中设定指令的别名。 2017-03-23 Linux
Python2.7的UnicodeEncodeError UnicodeEncodeError: ‘ascii’ codec can’t encode异常错误 这个错误是编码问题,Unicode编码与ASCII编码的不兼容,现在Python脚本文件是由utf-8编码的,但是 Python2的默认是ASCII的,Python默认环境编码通过下面的方法可以获取: 2017-03-22 Python
Python 两个列表合并 有两个列表,分别为: 12names = ['Alice', 'Beth', 'Ceil']numbers = ['2341', '9102', '3158'] 生成一个字典: book = {'Alice': '2341', ' 2017-03-20 Python
Pyhton遍历文件夹 这是一个常用的功能,可以有两种方法,os.walk和os.listdir 文档是这么解释的: os.listdir(path) Return a list containing the names of the entries in the directory given by path. The list is in arbitrary order. It does not include 2017-03-10 Python
Ubuntu 16.04LTS 搭建 Shadowsocks 只针对Ubuntu16以上的版本。 执行很简单,首先是三条命令 123apt updateapt install python-pippip install shadowsocks 2017-02-28 Tools
Android java.lang.OutOfMemoryError: GC overhead limit exceeded 再用 Android Studio 编辑项目的时候,会出现如下错误。 1java.lang.OutOfMemoryError: GC overhead limit exceeded 根据 Sun 的描述: 1"if too much time is being spent in garbage collection: if more than 98% of the tot 2017-02-13 Android