1.用温度计测出用华氏表示的温度#include int main(){float f,c;f=64.0;c=(5.0/9)*(f-32);printf("f=%f\nc=%f\n",f,c);return 0;}2.计算存款利息,有一百元,想存一年。有3种方法:活期,年利率为r1;一年定期,年利率...
分类:
编程语言 时间:
2014-07-05 18:33:54
阅读次数:
191
lambdTesting=lambda x: x*3print(lambdTesting(5))输出 15像C#一样传递lambda表达式:def abc(t,a): return t(a)print(abc(lambdTesting,15))输出:45
分类:
编程语言 时间:
2014-07-05 18:02:49
阅读次数:
196
照着官方的例子试验了一下DragonBone的使用,代码如下: 1 local AnotherScene = class("AnotherScene", function() 2 return display.newScene("AnotherScene") 3 end) 4 5 func...
分类:
其他好文 时间:
2014-07-05 17:40:58
阅读次数:
190
public class A{private Vector aListeners = new Vector();private int value;public int getValue(){return value;}public void setValue(int newValue){if(va...
分类:
其他好文 时间:
2014-07-05 17:27:21
阅读次数:
245
jsp页面中onsubmit="return checklogin();"报错解决方案...
分类:
Web程序 时间:
2014-07-04 08:27:19
阅读次数:
644
$('#ajaxPage').modal('show').css({
width: 'auto',
'margin-left': function () {
return -($(this).width() / 2);
...
分类:
Web程序 时间:
2014-07-04 07:55:30
阅读次数:
273
分解质因数算法 1.从N开始递减,找到满足 : n%i ==0 && n是素数 -> result2.存result到数组,递归执行(n/result)var result = new Array();
var factor = function f(n){
if(n == 1){return ;}
var n1 = n;
while(n1>1){
if(isPrime(n1) && n ...
分类:
其他好文 时间:
2014-07-04 07:21:41
阅读次数:
237
def IsContinuous(seq, num = 5):
zeros = 0; d = 0
seq = sorted(seq)
for i in range(num - 1):
if seq[i] == 0:
zeros += 1
continue
if seq[i] == seq[i + 1]:
return False
d += seq[i + 1]...
分类:
其他好文 时间:
2014-07-04 07:11:20
阅读次数:
171
在使用linux的ramoops驱动模块时,在编译完加载时,会发现驱动加载不成功。明明直接使用的内核代码,为什么会出现这样的情况呢?
首先看一下ramoops的初始化代码:
180 static int __init ramoops_init(void)
181 {
182 return platform_driver_probe(&ramoops_driver, ramoops_pr...
分类:
其他好文 时间:
2014-07-04 00:24:28
阅读次数:
761
Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o...
分类:
其他好文 时间:
2014-07-03 23:51:47
阅读次数:
408