上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 26 下一页
摘要: #include <stdio.h>struct Ex{ static int gId; int id; Ex(){id=gId++;printf("Ex()-id=%d/n",id);} Ex(const Ex &e){id=gId++;printf("Ex(e)-id=%d,copy from %d/n", id, e.id);} ~Ex(){printf("~Ex()-id=%d/n",id);}};int Ex::gId;void func1(void){ try { throw Ex(); // crea 阅读全文
posted @ 2008-09-05 01:54 quanben 阅读(148) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <stdlib.h>struct A{ int a; int b; int c; A() {a=0; printf("A()/n");} A(int _a) {a=_a;} ~A() {printf("~A()/n");} void *operator new[](unsigned int s) // 无论如何 's'传递的是大小,而不是数组元素个数 // gcc编译环境下这个值是 sizeof((n) * sizeof(A))+4, // 估计这4字节用来作为 阅读全文
posted @ 2008-09-05 01:30 quanben 阅读(133) 评论(0) 推荐(0) 编辑
摘要: The need of error code generation is growing in the field of communication. Both the imitation of real situation and the feasibility of the implementation are in the consideration. The simple Markov model is just one step from the plain one (uniform distribution noise).The model can be described as: 阅读全文
posted @ 2008-08-03 13:52 quanben 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 一个题目(据说又是一个面试题): 三个数的乘法:a*b*c,共有两种结合方式:(a*b)*c,a*(b*c) 四个数的乘法:a*b*c*d,共有五种结合方式:((a*b)*c)*c, (a*(b*c))*d, a*((b*c)*d), a*(b*(c*d)), (a*b)*(c*d) 写一个函数,参数是乘数的个数,返回值是用乘法结合律后可能的结合方式总数。(链接:http://topic.csdn.net/u/20080626/13/4efca1a4-8534-44fd-ae87-f65463e7cb93.html)递归方法没错:f[n]=sigma(k=1:n, f[k]*f[n-k]).. 阅读全文
posted @ 2008-07-15 19:00 quanben 阅读(190) 评论(0) 推荐(0) 编辑
摘要: This collision detection module is straightforward in thinking like most of my works, but I take pleasure of it, and hope that I will have time to refine and expand it and apply it to some interesting projects.The home page of the project: http://code.google.com/p/chaincd/ I also paste some infor... 阅读全文
posted @ 2008-06-27 22:03 quanben 阅读(161) 评论(0) 推荐(0) 编辑
摘要: C or C++ is a language that one can always tweak to dig out something helpful but graceless. Below is an example I recently used to solve the problem of one of my colleagues. I think it is not astounding to sophisticated C programmers that macro can make so much trouble.#include <stdio.h>#defi 阅读全文
posted @ 2008-06-25 19:53 quanben 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 在目前众所周知的国际环境下,最近又见郎咸平教授高论。如果我没有理解错误的话,作为一位研究经济学多年的学者他甚至认为:离开”金融工作者“这个世界完全可以运行,但离开工程师却难以为继。令人无限感慨,或许也给生活无限窘迫的后者以莫大的精神安慰。这又让我回到以前关于纯实物经济理想模型的直觉思考,当时受困于时间变化方面的问题。一个完全不同于现行的银行货币体系,却又不比其简单的情形。我想这应当回归到经济学最原始的有关边际效应的讨论上来。如果能对整个社会物品需求进行跟踪,那么可以形成基于物品空间等价值面的模型。那么社会中的个人或组织的产出对应于相应的向量在该空间中引致的价值增量,而消耗则对应于减量。但是这样 阅读全文
posted @ 2008-06-17 21:31 quanben 阅读(122) 评论(0) 推荐(0) 编辑
摘要: It is revealed that this code doesn't worth the time I spent once it is done.The code of rangemap.h is not provided. It is the most unqualified for being part of the lib.#include <cassert>#include <cstdio>#include <cstring>#include <cstdlib>#include <vector>#include 阅读全文
posted @ 2008-06-06 00:07 quanben 阅读(155) 评论(0) 推荐(0) 编辑
摘要: I found some of the movies I downloaded failed to have any perfectly matching subtitles that can be easily found online, so I have to use some of the closest. But using resync function of vobsub or so is obviously not a way round. With this tool and not too much tuning on it, I guess I may even use 阅读全文
posted @ 2008-05-11 14:16 quanben 阅读(239) 评论(0) 推荐(0) 编辑
摘要: Introduce the author first, the following information is provided by wikipedia, the free encyclopedia:D. Richard Hipp (born April 9, 1961) is best known on the internet as the architect and primary author of SQLite. He and his wife, Ginger G. Wyrick, currently live and work in Charlotte, North Carol 阅读全文
posted @ 2008-04-22 23:50 quanben 阅读(163) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 26 下一页