Given amxnmatrix, if an element is 0, set its
entire row and column to 0. Do it in place.click to show follow up.Follow up:Did
you use extra space?A s...
分类:
其他好文 时间:
2014-05-12 08:22:51
阅读次数:
255
原文:一些有用的javascript实例分析(二) 1 5 求出数组中所有数字的和 2
window.onload = function () 3 { 4 var oBtn =
document.getElementsByTagName("button")[0]; 5 var oInput = do...
分类:
编程语言 时间:
2014-05-12 07:20:18
阅读次数:
417
p2pcli.c
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define ERR_EXIT(m) do { perror(m...
分类:
其他好文 时间:
2014-05-11 07:13:56
阅读次数:
750
getchar的返回值
这样的代码有什么问题:
char c;
while((c = getchar()) != EOF)....
getchar返回值变量必须是int型。因为EOF通常定义为-1,二十进制为255的字符会被符号扩展,和EOF比较时会相等,从而
过早第结束输入。
feof函数的使用
为什么这些代码最后一行复制了两遍?
#include
#inclu...
分类:
编程语言 时间:
2014-05-11 06:22:53
阅读次数:
422
import time
import SimpleHTTPServer
import SocketServer
BYTES_PER_SECOND=160*1024
class MyHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_GET(self):
"""Serve a GET re...
分类:
其他好文 时间:
2014-05-10 03:36:34
阅读次数:
276
#includeusing namespace std;const int maxn =
30000+100;int F[maxn], D[maxn], S[maxn];void set(int n){ for(int i =0 ;i
>P; char c; int a, b; while(P--)...
分类:
其他好文 时间:
2014-05-10 02:56:28
阅读次数:
313
1. C99标准规定了如下关键字:auto _Bool break case char
_Complexconst continue default restrict do ...
分类:
编程语言 时间:
2014-05-10 02:27:27
阅读次数:
422
#include
#include
#include
#ifndef VIRTUAL
#define VIRTUAL
#endif
#ifndef DELETE
#define DELETE(X) do { free(X);X = NULL; } while(0)
#endif
#define NEW(TYPE,pInstance,SUBTYPE) struct TYPE* pInst...
分类:
编程语言 时间:
2014-05-09 22:29:48
阅读次数:
455
Function cuttextlen(intext, lens)
If Len(intext)
cuttextlen = intext
Else
tmptext = intext
GetTexts = ""
Do While Not Len(tmptext)
GetTexts = GetTexts + Left(tmptext, lens)
tmptext = Right...
分类:
其他好文 时间:
2014-05-09 22:22:08
阅读次数:
320
一、数学库
1. 随机数
math.randomseed(os.time()); -- 设置随机种子
for i=1, 100 do
print(math.random(-1000,1000)); -- 随机区间 [-1000,1000], math.random(1000) 表示 [1,1000]
end;
2. 最大,最小值
math.max...
分类:
其他好文 时间:
2014-05-09 20:58:11
阅读次数:
669