#coding:utf-8#author:Blood_Zero''' 1、获取网页信息 2、解决编码问题,通过charset库(默认不安装这个库文件)'''import urllibimport urllib2url = "http://192.168.1.135/myself/"htm...
分类:
编程语言 时间:
2015-07-15 18:35:16
阅读次数:
146
本文介绍如何用 C 语言来扩展 python。所举的例子是,为 python 添加一个设置字符串到 windows 的剪切板(Clipboard)的功能。我在写以下代码的时候用到的环境是:windows xp, gcc.exe 4.7.2, Python 3.2.3。第一步 撰写C语言的DLL创建一...
分类:
编程语言 时间:
2015-07-12 20:15:15
阅读次数:
167
编译报下面这个错,表明了有重复的内容存在可能是以下情况: Error:Execution failed for task ‘:myapp:dexDebug‘. com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecExcept...
分类:
移动开发 时间:
2015-07-10 17:08:01
阅读次数:
542
1.利用dm-crypt来创建加密文件系统。编写shell脚本
2.编写ansible,playbook文件
3.编写python脚本
首先编写shell脚本
#!/bin/sh
sudo apt-get install dmsetup cryptsetup
sudo modprobe dm-crypt
echo "dd if=/dev/zero of=/home/prod/secr...
分类:
其他好文 时间:
2015-07-10 13:29:46
阅读次数:
139
异常Log:
Error:Execution failed for task ‘:app:dexDebug’.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException:
finished with non-zero exit value 2...
分类:
移动开发 时间:
2015-07-10 13:29:05
阅读次数:
334
错误现象:cc: Internal error: Killed (program cc1)...大体上是因为内存不足,临时使用交换分区来解决吧sudo dd if=/dev/zero of=/swapfile bs=64M count=16sudo mkswap /swapfilesudo swap...
分类:
其他好文 时间:
2015-07-09 19:17:35
阅读次数:
109
题目:
Given an array S of n integers, are there elements a, b, c in S such that a + b + c =
0? Find all unique triplets in the array which gives the sum of zero.
Note:
Elements in a tripl...
分类:
编程语言 时间:
2015-07-09 14:42:02
阅读次数:
129
dd命令可以轻易实现创建指定大小的文件,如ddif=/dev/zeroof=testbs=1Mcount=1000会生成一个1000M的test文件,文件内容为全0(因从/dev/zero中读取,/dev/zero为0源)但是这样为实际写入硬盘,文件产生速度取决于硬盘读写速度,如果欲产生超大文件,速度很慢在某种场景下,我们..
分类:
系统相关 时间:
2015-07-09 01:02:13
阅读次数:
336
Question:Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.No...
分类:
其他好文 时间:
2015-07-08 22:23:17
阅读次数:
111