Given an absolute path for a file (Unix-style), simplify it.For example,path="/home/", =>"/home"path="/a/./b/../../c/", =>"/c"public class Solution { ...
分类:
其他好文 时间:
2015-07-13 23:57:11
阅读次数:
159
os(.stat;.path)os.path.split:拆分路径,返回tuple,第一个元素是路径,第二个元素是文件名。os.path.basename:获取文件名(因为多平台适用,因此不一定有后缀)。os.path.dirname:获取路径对应的路径。os.path.splitext:讲路径、文...
分类:
编程语言 时间:
2015-07-13 23:55:15
阅读次数:
202
引言
Kali Linux是基于Debian的Linux发行版, 设计用于数字取证和渗透测试。安装Kali Linux很简单,但是安装VMware Tools的过程就有点麻烦了,因为在安装中途会问你要编译内核模块所需要的内核头文件(Enter the path to the kernel header files for the 3.7-trunk-amd64 kernel)。下面整理一下思...
分类:
系统相关 时间:
2015-07-13 22:35:34
阅读次数:
524
1、建两个表publish:pub_id 和 images:pub_id,image_path;
2、使用gii的crud生成代码
3、在models内Publish.php内写关联函数public function getImage()
{
return $this->hasOne(Images::className(),['pub_id'=>'pub_id']);...
分类:
其他好文 时间:
2015-07-13 22:30:37
阅读次数:
186
一.Android 的简介: 1.Android.mk文件首先需要指定LOCAL_PATH变量,用于查找源文件。由于一般情况下Android.mk和需要编译的源文件在同一目录下,所以定义成如下形式:LOCAL_PATH:=$(call my-dir) 上面的语句的意思是将LOCAL_PATH变量定义...
分类:
移动开发 时间:
2015-07-13 22:05:48
阅读次数:
205
1、打开终端,默认是用户目录,输入以下命令:ls -a显示隐藏文件2、打开.bash_profile,输入以下命令open .bash_profile配置JAVA_HOME,AXIS2_HOME,并将java和axis2的bin目录添加到PATH中,lib目录添加到CLASSPATH中3、保存,重新...
分类:
编程语言 时间:
2015-07-13 21:53:39
阅读次数:
269
1、首先要先导入第三方类库FMdatabase。2、获得存放数据库文件的沙盒地址。#pragma mark - 创建数据库- (void)createAndInitDatabase { NSString *path = [NSString stringWithFormat:@"%@/Documen....
分类:
数据库 时间:
2015-07-13 20:07:50
阅读次数:
150
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 the tota...
分类:
其他好文 时间:
2015-07-13 18:48:42
阅读次数:
103
设置当前exe执行文件为进程工作目录
两种办法:
1, API
void _splitpath(
const char *path,
char *drive,
char *dir,
char *fname,
char *ext
);
这个函数将文件全名(带路径)分解成路径名,文件名,后缀名。
2, ...
分类:
系统相关 时间:
2015-07-13 18:40:09
阅读次数:
380
从github下载下来之后运行,遇到的问题就是下面这个Error:Execution failed for task ':imagepipeline:ndk_build_bitmaps'.
> A problem occurred starting process 'command 'ndk-build.cmd''首先配置一下NDK的系统环境变量NDK_HOME,并且将其添加到PATH里面 不会的看...
分类:
移动开发 时间:
2015-07-13 18:33:46
阅读次数:
252