码迷,mamicode.com
首页 >  
搜索关键字:tmp    ( 7796个结果
时间变成多少分钟前
function get_long_time($date){ $curr = time(); $date = strtotime($date); $tmp = $curr - $date; if($tmp < 60){ $re = $tmp.'秒前'; }...
分类:其他好文   时间:2015-07-30 10:46:42    阅读次数:111
shell编程进阶
Shell编程进阶Shell结构以及执行[root@wangchao~]#mkdirshell[root@wangchao~]#cdshell/[root@wangchaoshell]#vimfirst.sh#!/bin/bash##Thefirsttestshellscript##writtenbywangchaols/tmp/echo"Thisisthefirstscript."[root@wangchaoshell]#bashfirst.sh//执行脚本[root@wangc..
分类:系统相关   时间:2015-07-30 02:17:50    阅读次数:356
如何在JS中应用正则表达式
背景:在之前的随笔中写过C#中如何使用正则表达式,这篇随笔主要讲如何在js中应用正则表达式如下代码:1 $("#zhengze").click(function () {2 var tmp = "我是中国人" + '\n' + "我来自beijing";3 ...
分类:Web程序   时间:2015-07-30 00:39:34    阅读次数:133
Hive 安装配置
系统:Ubuntu 64 bit系统step1:创建hive文件目录,并在hive目录下创建tmp,warehouse 和 log目录:Step2:解压hive安装包:Step3:创建配置文件:Step4:修改hive-site.xml:Step5:修改hive-log4j.properties:S...
分类:其他好文   时间:2015-07-30 00:24:59    阅读次数:158
python练习题(一)
一、用python写一个列举当前目录以及所有子目录下的文件,并打印出绝对路径#!/usr/bin/envpythonimportosforroot,dirs,filesinos.walk(‘/tmp‘):fornameinfiles:print(os.path.join(root,name))os.walk()原型为:os.walk(top,topdown=True,onerror=None,followlinks=False)我们..
分类:编程语言   时间:2015-07-29 19:39:41    阅读次数:138
IOS--文件管理NSFileManager
iOS的沙盒机制,应用只能访问自己应用目录下的文件。iOS不像android,没有SD 卡概念,不能直接访问图像、视频等内容。iOS应用产生的内容,如图像、文件、缓存内容等都必须存储在自己的沙盒内。默认情况下,每个沙盒含有3个文件 夹:Documents, Library 和 tmp。Library包含Caches、Preferences目录。 Documents:苹果建议将程序创建产生的文件以...
分类:移动开发   时间:2015-07-29 19:20:16    阅读次数:129
python实现range函数
用python的代码实现range相关的功能.#!/usr/bin/envpython defr(start,end=None,step=1): ifstep>0: ifnotend: start,end=0,start check=lambdax,y:x<y elifstep<0: check=lambdax,y:x>y else: raiseValueError("range()stepargumentmustnotbezero") tmp=[] whi..
分类:编程语言   时间:2015-07-29 06:38:07    阅读次数:318
PHP文件之上传
一、$_FILES数组 $_FILES[“file”][“name”]:上传文件的原始名称。 $_FILES[“file”][“type”]:上传的文件类型。 $_FILES[“file”][“size”]:上传文件的原始大小。 $_FILES[“file”][“tmp_name”]:上传文件后的暂存位置。 $_FILES[“file”][“error”]:如果上传文件有错误,则显示错误代码...
分类:Web程序   时间:2015-07-28 21:19:41    阅读次数:148
JS中如何判断null、undefined与NaN
1.判断undefined:Js代码vartmp=undefined;if(typeof(tmp)=="undefined"){alert("undefined");}说明:typeof 返回的是字符串,有六种可能:"number"、"string"、"boolean"、"object"、"func...
分类:Web程序   时间:2015-07-28 20:55:37    阅读次数:109
Mac服务器服务更新常用的几个shell命令
Mac服务器需要先开启远程登录。开启方式:系统偏好设置->共享 勾选远程登录 常用命令有:拷贝(把本机文件拷贝到远程服务器上) scp -r 本地路径/file userName@192.168.xxx.xx:/tmp #userName为远程服务器用户名称,后面为服务器地址,/tmp为远程服务器的某个目录,有些时候会遇到权限问题,可以考虑先拷贝到/tmp下,登录上远程服务后再进行cp或mv。回车...
分类:系统相关   时间:2015-07-28 13:09:07    阅读次数:176
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!