- 博客(62)
- 资源 (4)
- 收藏
- 关注
翻译 Floodlight Static Flow Pusher API
Static Flow Pusher API (New)Added by Bethany Kanui, last edited by Alex Reimers on Dec 04, 2012 (view change)show commentWhat is Static Flow Pusher?Static Flow
2014-05-28 14:23:08
2555
1
转载 Java泛型总结
虽然Scala创始人Martin Odersky说当年正是因为Java泛型的丑陋,所以才想到要创建一个新的语言,不过这仍然不妨碍我们学习Java泛型。毕竟即使听说Java泛型不好用,但好不好用还是得会用了才知道。下面是一些有关Java泛型的总结:普通泛型class Point{ // 此处可以随便写标识符号,T是type的简称 private T var ; // var的类型由
2014-05-22 10:55:01
515
原创 python 获取主机mac ip地址
import socketimport uuiddef get_mac_address(): mac=uuid.UUID(int = uuid.getnode()).hex[-12:] return ":".join([mac[e:e+2] for e in range(0,11,2)])hostname=socket.gethostname()myaddr=soc
2014-05-11 15:02:00
1629
转载 python文件操作
一:知识点对文件的访问方式一般有三种模式:读模式('r')、写模式('w')或追加模式('a'). 另外两种可混合使用的模式: 二进制模式(‘b’),读/写模式(‘+’)。 如:‘rb’: 读取二进制文件模式 ‘r+’:可读可写模式写文件的流程:1:可写方式打开文件 2:写文件操作 3:关闭文件读文件流程:1:只读方式打开文件 2:读取文件
2014-05-11 13:52:53
578
转载 使用py2exe生成独立的exe文件
转载▼今天写一个python小脚本,在windows下将当前状态下,所有的task的名字输出到一个文件里,然后将这个脚本转化成exe文件。先看一下python脚本TaskNameList.py: Python代码import subprocess # running the command "tasklist" in cmd.exe
2014-05-05 17:14:12
904
原创 Problem 13:Large sum
题目描述:Work out the first ten digits of the sum of the following one-hundred 50-digit numbers.3710728753390210279879799822083759024651013574025046376937677490009712648124896970078050417018260538
2014-05-04 10:55:37
509
原创 Problem 25:1000-digit Fibonacci number
题目描述:The Fibonacci sequence is defined by the recurrence relation:Fn = Fn1 + Fn2, where F1 = 1 and F2 = 1.Hence the first 12 terms will be:F1 = 1F2 = 1F3 = 2F4 = 3F5 = 5F6 = 8F
2014-05-03 23:40:56
690
原创 Problem 22:Names scores
题目描述:Using names.txt (right click and 'Save Link/Target As...'), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alph
2014-05-03 23:25:15
622
原创 Problem 16:Power digit sum
题目描述:215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.What is the sum of the digits of the number 21000?代码:
2014-05-03 22:57:24
535
原创 Problem 15:Lattice paths
题目描述:Starting in the top left corner of a 22 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.How many such routes are there thr
2014-05-03 22:52:14
578
原创 Problem 14:Longest Collatz sequence
题目描述:The following iterative sequence is defined for the set of positive integers:n n/2 (n is even)n 3n + 1 (n is odd)Using the rule above and starting with 13, we generate the followi
2014-05-03 21:38:05
761
原创 Problem 9:Special Pythagorean triplet
题目描述:A Pythagorean triplet is a set of three natural numbers, a b c, for which,a2 + b2 = c2For example, 32 + 42 = 9 + 16 = 25 = 52.There exists exactly one Pythagorean triplet for which
2014-05-03 21:08:42
522
原创 Problem 10:Summation of primes
题目描述:The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.Find the sum of all the primes below two million.
2014-05-03 20:59:51
546
原创 Problem 8:Largest product in a series
题目描述:Find the greatest product of five consecutive digits in the 1000-digit number.73167176531330624919225119674426574742355349194934969835203127745063262395783180169848018694788518438586156
2014-05-03 20:47:07
539
原创 Problem 12:Highly divisible triangular number
题目描述:The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be:1, 3, 6, 10,
2014-04-30 10:26:26
725
原创 Problem 4:Largest palindrome product
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.Find the largest palindrome made from the product of two 3-digit
2014-04-30 08:42:38
609
原创 100盏灯开关的问题
房间里有100盏电灯,编号为1,2,3……100,每盏灯上有一个按钮,初始时灯全都是关的。 编好号的100位同学由房间外依次走进去,将自己编号的倍数的灯的按钮全部按一次,例如第一位同学把编号是1的倍数的灯的按钮按一下(此时100盏灯全亮),第二位同学把编号是2的倍数的灯的按钮按一下(此时只有50盏灯亮着,50盏被这个人按灭了)……第100位同学把编号是100的倍数的灯(即编号为10
2014-04-20 13:52:02
4300
原创 Vmware下 Mininet Floodlight SDN网络环境搭建
Vmware下 Mininet Floodlight SDN网络环境搭建
2014-04-17 16:46:43
7562
转载 ubuntu 配置JDK环境 安装eclipse
下载登录oracle的网站去下载JDK7http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html 好吧!在下载之前我们要先选中“Accept License Agreement” 然后,才允许我们下载。 等等有好几个linux版本的 JDK,那么
2014-04-16 10:46:18
1334
原创 多态实例
public class Demo03 { public static void main(String[] args) { // TODO Auto-generated method stub B b=new B(); C c=new C(); fun(b); fun(c); } /*多态方法 不同子类参数分别调用不通的子类方法,体现多态性*/ publi
2014-04-11 19:07:12
567
原创 抽象类实例
抽象类用abstract关键字进行修饰,抽象类不能直接创建对象,只能通过抽象类派生出的类来创建对象,抽象类的定义与使用规则:(1)包含一个抽象方法的类必须是抽象类(2)抽象类与抽象方法都要使用abstract进行修饰(3)抽象方法只需声明,不能实现即不能有方法实体(4)抽象类必须被子类继承,子类必须复写抽象类中的全部抽象方法实例代码:
2014-04-11 16:43:15
652
原创 继承实例
public class Demo01 { public static void main(String[] args) { // TODO Auto-generated method stub Cat cat=new Cat("小花","黄色","鱼"); cat.getInfo(); } }
2014-04-11 16:39:02
545
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人