码迷,mamicode.com
首页 >  
搜索关键字:do while    ( 38720个结果
【LeetCode】Set Matrix Zeroes
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实例分析(二)
原文:一些有用的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
socket实现的一个基本点对点聊天程序
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
《你必须知道的495个C语言问题》笔记--标准输入输出
getchar的返回值 这样的代码有什么问题: char c; while((c = getchar()) != EOF).... getchar返回值变量必须是int型。因为EOF通常定义为-1,二十进制为255的字符会被符号扩展,和EOF比较时会相等,从而 过早第结束输入。 feof函数的使用 为什么这些代码最后一行复制了两遍? #include #inclu...
分类:编程语言   时间:2014-05-11 06:22:53    阅读次数:422
史上最简单的带流控功能的http server
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
poj1988
#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
C语言之关键字
1. C99标准规定了如下关键字:auto _Bool break case char _Complexconst continue default restrict do ...
分类:编程语言   时间:2014-05-10 02:27:27    阅读次数:422
C语言实现状态设计模式
#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
Lua 常用库函数
一、数学库 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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!