import base64f = open("m1.jpg", "rb")res = f.read()s = base64.b64encode(res)f = open("hello.txt","w")f.write(s)
分类:
编程语言 时间:
2014-10-22 12:54:16
阅读次数:
424
import sysimport os.path os.environ['DJANGO_SETTINGS_MODULE'] = 'dalihelp.settings'sys.path.append(os.path.join(os.path.dirname(__file__),'dalihelp'))...
分类:
编程语言 时间:
2014-10-22 12:51:09
阅读次数:
156
1 #######################################定义变量######################################################### 2 $CurrentPath = $MyInvocation.MyCommand.Path.....
分类:
其他好文 时间:
2014-10-22 12:43:42
阅读次数:
308
今天在编译android NDK工程的时候,在jni文件夹下的cpp文件中报了一大堆错误,诸如:Unresolved inclusion: 、Type 'jint' could not be resolved、Type 'jintArray' could not be resolved等,根据经验,这样的错误肯定是没有包含相应的头文件导致的。
解决方案:
选中工程,右键->Properties,点击C/C++ General展开,点击Path and Symbo...
分类:
移动开发 时间:
2014-10-22 11:06:58
阅读次数:
203
1.安装jdk 下载:去oracle官网,或者百度jdk下载,地址就不贴了 环境变量配置: a. 系统变量→新建 JAVA_HOME 变量。变量值填写jdk的安装目录(E:\Java\jdk1.7.0) b.系统变量→寻找 Path 变量→编辑在变量值最后输入 %JAVA_HOME...
分类:
系统相关 时间:
2014-10-22 10:03:33
阅读次数:
223
当vs升级到更新的版本后,运行原来无误的程序会出现一系列问题。例如:打不开iostream文件,lib文件,系统找不到文件等等出现这类问题的原因是,编译环境的include path和library path还指向原来版本vs的路径。所以要在配置文件中进行修改。打开:C:\Users\your us...
分类:
其他好文 时间:
2014-10-22 10:03:04
阅读次数:
185
首先将VisualStudio安装目录vc中bin、lib、include目录添加到环境变量path中 遇到的问题: 1.fatal error LNK1104: cannot open file ‘uuid.lib‘ 找到了本机uuid.lib的所在路径:C:\Program Files (x86)\Microsof...
分类:
编程语言 时间:
2014-10-22 07:41:23
阅读次数:
170
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsum =...
分类:
其他好文 时间:
2014-10-22 07:36:22
阅读次数:
218
之前文章提到写时复制(copy-on-write)技术,要实现这种功能,针对上文中Handle代码,需要将size_t * use这个抽象出来,封装成一个引用计数类,提供写时复制功能。CUseCount类实现如下: 1 class CUseCount 2 { 3 public: 4 ...
分类:
其他好文 时间:
2014-10-22 06:23:50
阅读次数:
208
堆快照 -Xmx10M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=C:\m.hprof 在系统发生错误时,运行第三方脚本 -XX:OnOutOfMemoryError=c:\reset.bat 获取GC信息 简要: -verbose:gc -XX:+PrintGC 详细: -X...
分类:
其他好文 时间:
2014-10-22 01:09:59
阅读次数:
186