using_sys.pyimport sysprint ('the command line argument are:')for i in sys.argv: print (i)print ('\n\n the python path is', sys.path, '\n')using_na...
分类:
编程语言 时间:
2015-12-23 16:00:24
阅读次数:
182
题目来源: https://leetcode.com/problems/simplify-path/题意分析: 简化Unix上的绝对路径,也就是多个'/'代表一个,'..'表示返回上一级目录,‘.'代表当前目录。题目思路: 利用栈,把非'/'和'.'push进栈,如果遇到'..'pop掉一个,...
分类:
编程语言 时间:
2015-12-23 14:32:16
阅读次数:
199
getExt($_FILES["path"]["name"]); $svaePath="/www/znm/images/"; $result=$tool->uploadFile($file,$ext,$svaePath); $result= json_decode($r...
分类:
Web程序 时间:
2015-12-23 12:42:09
阅读次数:
327
1,with as,帮助处理异常以及该完成的事情,具体原理是with 会进入一个__enter__, 在__exit__: ex: with open(path) as file: print file.read()很方便。2,raise 显示抛出异常,抛出后不再往下运行。...
分类:
其他好文 时间:
2015-12-23 12:38:02
阅读次数:
143
Powershell ISE在默认状态下有一个不好的地方就是不会显示关于SharePoint的一些智能提示,例如你写一个"get-"后面提示的选项里没有sp开头的一些对象。于是找了一下解决方案。首先打开Powershell ISE, 把下面的代码拷贝到ISE中 1 if (!(test-path $...
分类:
系统相关 时间:
2015-12-23 10:43:32
阅读次数:
153
Question:Given a binary tree, find all paths that sum of the nodes in the path equals to a given numbertarget.A valid path is from root node to any of...
分类:
其他好文 时间:
2015-12-23 10:43:18
阅读次数:
130
1 import urllib 2 import os 3 from bs4 import BeautifulSoup 4 import difflib 5 import time 6 7 while(1): 8 if os.path.exists('d:/new.txt') and o...
分类:
其他好文 时间:
2015-12-23 09:22:44
阅读次数:
218
服务器IP:192.168.1.55:5000#dockerpullresistry#dockerrun-itd-p5000:5000-v/opt/data/registry/:/tmp/registryregistry=============客户端配置#vi/etc/sysconfig/dockerOPTIONS=‘--selinux-enabled-b=kbr0--insecure-registry192.168.1.55:5000‘DOCKER_CERT_PATH=/etc/doc..
分类:
其他好文 时间:
2015-12-23 02:19:28
阅读次数:
274
nginxjs和jpg图片缓存设置listen80;server_namexxxxx;indexindex.htmindex.html;root/to/path/;location~.*\.(js|css)?${expires5d;}location~.*\.(gif|jpg|jpeg|png|bmp|swf)${expires30d;valid_referersnoneblockedwww.xxxx*.xxxxxx;if($invalid_referer){rewrite^/http://ww..
分类:
Web程序 时间:
2015-12-23 02:11:12
阅读次数:
553
一.脚本文件名的查询which----寻找执行文件which [-a] command-a:将所有由PATH目录中可以找到的命令都列出来,而不是只列出第一个\alis后面是命令别名,也就是说,输入ls相当于输入后面的一些内容.说明:这个命令是根据PATH里面的路径去找.且which后面要加的是完整的...
分类:
系统相关 时间:
2015-12-23 00:29:27
阅读次数:
259