上一页 1 ··· 74 75 76 77 78 79 80 81 82 ··· 455 下一页
最近有个需求,要检测配置中的那些url的域名是否都正常,即是否都能ping通。 不过配置中url格式是这样的 http://www.something.com:1234/ 。 要ping的是www.something.com。 要把url中的域名抽离出来,一般会想到的是切割字符串,或者用正则表达式。 不过有个更干净利落的方法,就是python标准库自带的urlparse。url的各个部分都可以用这个东东抽离出来。 >> url = 'http://www.something.com:1234/foo/index.html?name=kzc&age=29#second Read More
posted @ 2013-07-23 18:29 javawebsoa Views(213) Comments(0) Diggs(0)
Greg and Graphtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGreg has a weighed directed graph, consisting ofnvertices. In this graph any pair of distinct vertices has an edge between them in both directions. Greg loves playing with the graph an Read More
posted @ 2013-07-23 18:27 javawebsoa Views(327) Comments(0) Diggs(0)
Java Native Interface Specification(JNI) 使用场景: 需要的功能,标准的java不能提供有了一个用其他的语言写好的工具包,希望用java去访问它当需要高性能的功能时(时间是最主要的因素) 通过本地方法(通过JNI),可以完成:创建,检查,和更新java 对象(包括数组和Strings)调用java方法捕捉和抛出异常加载类和获取类信息运行时类型检查 Read More
posted @ 2013-07-22 20:30 javawebsoa Views(239) Comments(0) Diggs(0)
转载请注明出处,谢谢http://blog.csdn.net/ACM_cxlove?viewmode=contents by---cxlove 题意:给出m个整理,因子全部为前t个素数。问有多少个子集,乘积是平方数http://acm.sgu.ru/problem.php?contest=0&problem=200 做法:列方程组,a1,a2,a3……am分别表示bi是否在集合中。对于每一个素因子,建立异或方程组,要求因子个数为偶数,即异或为0。子集个数便是解的个数,高斯消元后求出变元个数num,结果是2^ num-1。除去空集。。还要模拟一下高精度#include #include Read More
posted @ 2013-07-22 20:29 javawebsoa Views(224) Comments(0) Diggs(0)
在Ubuntu环境下,按下Ctrl+D就能最小化所有窗口,立刻显示桌面,类似xp下的显示桌面按钮功能。不过这是需要经过快捷键设置的。以下是设置方法:1.找到“系统设置” 2.进入“快捷键”,找到导航->隐藏所有正常窗口,按自己想要的快捷键修改即可,我使用的是ctrl+D Read More
posted @ 2013-07-22 20:26 javawebsoa Views(261) Comments(0) Diggs(0)
jsp中c标签的使用核心标签库 它是JSTL中的核心库,为日常任务提供通用支持,如显示和设置变量、重复使用一组项目、测试条件和其他操作(如导入和重定向Web内容)。Core标签按功能可分为4种类型: 1变量维护: (1):设置变量值和对象属性。语法如下: 每种设置都有两种方式,总结起来,的4种形式,如下所示: a.使用标记属性设置JSP变量 b.使用标记体设置JSP变量 标记内容 c.使用标记属性设置对象属性 d.使用标记体设置对象属性 标记内容 (2):在指定作用域范围内删除变量。语法如下: 2流程控制:分为条件标签和迭代标签。 条件标签: (1)... Read More
posted @ 2013-07-22 20:22 javawebsoa Views(409) Comments(0) Diggs(0)
jstl中的日期格式化 ${articleDate } The input parameters must match the patterns, or the JSP will thrown an exception. This page does no error handling. Input parameters: Date:2004/04/01:13:30:00Java format:Thu Apr 01 13:30:00 CST 2004 isoDate: 20040531T235959Java format: Mon May 31 23:59:59 CDT 2004 ... Read More
posted @ 2013-07-22 20:20 javawebsoa Views(280) Comments(0) Diggs(0)
git库所在的文件夹(即.git所在的文件夹)中的文件的状态: (1)untracked:未跟踪,此文件在文件夹中,但并没有加入git库,不参与版本控制。 通过”git add”,”git commit”可将它置入跟踪库。 (2)unmodify:文件已经库中,未对文件未修改,即版本库中的文件快照内容与文件夹中文件内容完全一致。这种类型的文件有两个去处,如果它被修改,而成为modified。如果使用”git rm”移出版本库,则成为untracked文件。 (3)modified:文件已修改,仅仅是修改,并没有进行其它操作。这个文件也有两个去... Read More
posted @ 2013-07-22 20:18 javawebsoa Views(235) Comments(0) Diggs(0)
c#中异常捕获catch{}常用的异常类型 Exception 类 描述 SystemException 其他用户可处理的异常的基本类 ArgumentException 方法的参数是非法的 ArgumentNullException 一个空参数传递给方法,该方法不能接受该参数 ArgumentOutOfRangeException 参数值超出范围 ArithmeticException 出现算术上溢或者下溢 ArrayTypeMismatchException 试图在数组中存储错误类型的对象 BadImageFo... Read More
posted @ 2013-07-22 20:15 javawebsoa Views(5090) Comments(0) Diggs(0)
//// SpriteProgressToRadial////------------------------------------------------------------------void SpriteProgressToRadial::onEnter(){ SpriteDemo::onEnter(); CCSize s = CCDirector::sharedDirector()->getWinSize(); CCProgressTo *to1 = CCProgressTo::create(2, 100);//动作时间,显示百分比 CCProgr... Read More
posted @ 2013-07-22 20:14 javawebsoa Views(450) Comments(0) Diggs(0)
上一页 1 ··· 74 75 76 77 78 79 80 81 82 ··· 455 下一页