思路:m和n如果有公约数,则安全洞存在,无公约数或公约数为1,则无
#include
int gcd(int a,int b)
{
if(b==0)return a;
else
{
int r;
while(b!=0)
{
r=a%b;
a=b;
...
分类:
其他好文 时间:
2014-05-07 02:54:02
阅读次数:
283
import urllib2
urllib2.quote("攻克平台")...
分类:
编程语言 时间:
2014-05-06 23:41:17
阅读次数:
341
public class IsInteger {
private IsInteger(){};
public static boolean isInteger(String value) {
try {
Integer.parseInt(value);
return true;
} catch (N...
分类:
其他好文 时间:
2014-05-06 23:27:37
阅读次数:
348
Python是一种强大的语言,即可浅尝辄止,也可深入挖掘。很适合做科学计算、数据挖掘等等。今天我将简单介绍一下Python的装饰器(Decorators)的用法 。
假设我们想要庆祝下生日,需要邀请一些朋友过来参加。但是你有个讨厌的朋友,叫Joe,必须不能让他来啊。可能首先你想到的是建一个list,然后迭代查找并移除所有的Joe童鞋。这当然是个好方法,但是这里为了介绍装饰器,我们会用@来完成...
分类:
编程语言 时间:
2014-05-06 23:19:53
阅读次数:
371
'''题目:输入某年某月某日,判断这一天是这一年的第几天?
1.程序分析:以3月5日为例,应该先把前两个月的加起来,然后再加上5天即本年的第几天,特殊
情况,闰年且输入月份大于3时需考虑多加一天。
2.程序源代码:
'''
year = int(raw_input('year:\n'))
month = int(raw_input('month:\n'))
day = int(raw_...
分类:
编程语言 时间:
2014-05-06 21:27:14
阅读次数:
465
分形 逃逸时间算法 广义mandelbrot集,终于绘制出来了,圆了毕业设计的梦...
分类:
编程语言 时间:
2014-05-06 21:21:36
阅读次数:
482
1,有几位数字
#include
int main_2_1_digit(){
int n;
while(scanf("%d",&n)){
int count = 0;
if(n==0)
count = 1;
while(n){
count++;
n/=10;
}
printf("%d\n",count);
}
return 0;
}
...
分类:
其他好文 时间:
2014-05-06 21:20:19
阅读次数:
374
可以使用python3中的concurrent模块,如果python环境是2.7的话,需要下载https://pypi.python.org/packages/source/f/futures/futures-2.1.6.tar.gz#md5=cfab9ac3cd55d6c7ddd0546a9f22f453此futures包即可食用concurrent模块。官方文档:http://pythonhosted.org//futures/对于..
分类:
编程语言 时间:
2014-05-06 20:22:07
阅读次数:
725
#vim:tabstop=4shiftwidth=4softtabstop=4
#Copyright2010UnitedStatesGovernmentasrepresentedbythe
#AdministratoroftheNationalAeronauticsandSpaceAdministration.
#Copyright2011JustinSantaBarbara
#AllRightsReserved.
#Copyright(c)2010CitrixSystems,Inc.
#
#Licensed..
分类:
数据库 时间:
2014-05-06 20:19:17
阅读次数:
629
让我们简单Let’s take a look at three (very basic) ways to get a scoped token from Keystone (theOpenStack Identity
Project). Keep in mind that these are just a few ways you can go about this. Before tryin...
分类:
其他好文 时间:
2014-05-06 19:30:32
阅读次数:
359