Error info:Gen already exists but is not a source folder.Workaround-1:1. Right click project, and select "Properties"2. Select "Java Build Path"3. Ope...
分类:
其他好文 时间:
2014-07-09 19:29:27
阅读次数:
182
00编写一个程序,统计当前目录下每个文件类型的文件数import osall_files = os.listdir(os.curdir)type_dict =dict()for each_file in all_files: if os.path.isdir(each_file): ...
分类:
其他好文 时间:
2014-07-09 18:46:33
阅读次数:
215
settings里的设置PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname('__file__')))MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media')MEDIA_URL = '/med...
分类:
其他好文 时间:
2014-07-09 17:55:20
阅读次数:
1986
python中的Module是比较重要的概念。常见的情况是,事先写好一个.py文 件,在另一个文件中需要import时,将事先写好的.py文件拷贝 到当前目录,或者是在sys.path中增加事先写好的.py文件所在的目录,然后import。这样的做法,对于少数文件是可行的,但如果程序数目很 多,层级...
分类:
编程语言 时间:
2014-07-08 22:24:51
阅读次数:
257
TiQuery 是一个基于JQuery 的在Titanium上使用的 javascript 库TiQuery 为TI 提供了很快捷的方法:// Utilities$.info('My message');$.error('my error message');$.include('path/to/f...
分类:
其他好文 时间:
2014-07-08 22:11:01
阅读次数:
239
一、入口文件ThinkPHP采用单一入口模式进行项目部署和访问入口文件代码 1 二、配置文件data/conf/config.php db.php,cache.php配置格式config.php1 'db,cache', //拓展配置 3 'COOKIE_PATH' => '...
分类:
Web程序 时间:
2014-07-08 21:46:13
阅读次数:
422
题目
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent
a number.
An example is the root-to-leaf path 1->2->3 which represents the number 123.
Find ...
分类:
其他好文 时间:
2014-07-08 21:43:08
阅读次数:
219
编译nginx-1.5.10一般需要以下库的支持:pcre,zlib,openssl
此次编译nginx-1.5.10使用的库版本分别为pcre-8.34;openssl-1.0.0l;zlib-1.2.8将这些看和nginx放在同一目录如下图
在nginx添加一个shell脚本文件runscript.sh
#!/bin/sh
BUILD_PATH=../release
CC_P...
分类:
其他好文 时间:
2014-07-08 15:50:03
阅读次数:
227
获取、改变当前目录:
原型为:
#include //头文件
char *getcwd(char *buf, size_t size); //获取当前目录,相当于pwd命令
int chdir(const char *path); //修改当前目录,即切换目录,相当于cd命令
其中getcwd()函数:将当前的工作目录绝对路径复制到参数buf所指的内存空间,参数size为buf的空...
分类:
编程语言 时间:
2014-07-08 15:39:25
阅读次数:
155
1.首先定位mysql的my.ini配置文件,查找datadir的位置#Path to the database rootdatadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data/"一般情况下,该文件夹是隐藏,需要显示所有文件。2.将data目录下的文件...
分类:
数据库 时间:
2014-07-08 11:36:20
阅读次数:
195