Sudoku is a very simple task. A square table with 9
rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure.
In some of the cell...
分类:
其他好文 时间:
2014-05-26 21:55:25
阅读次数:
299
1、使用free – m命令查看内存使用情况代码如下:total used free shared
buffers cached Mem: 3832 2716 1115 0 95 1483 -/+ buffers/cache: 1137 2695 Swap:
6015 0 6015从上面可以看到内存...
分类:
其他好文 时间:
2014-05-26 11:57:51
阅读次数:
295
1.new、delete、malloc、free关系delete会调用对象的析构函数,和new对应free只会释放内存,new调用构造函数。malloc与free是C++/C语言的标准库函数,new/delete是C++的运算符。它们都可用于申请动态内存和释放内存。对于非内部数据类型的对象而言,光用...
分类:
编程语言 时间:
2014-05-23 08:32:21
阅读次数:
460
Sum square difference
Problem 6
The sum of the squares of the first ten natural numbers is,
12 + 22 + ... + 102 = 385
The square of the sum of the first ten natural numbers is,
(1 + 2 + ....
分类:
其他好文 时间:
2014-05-23 02:22:57
阅读次数:
193
判断二维字符串是否满足下面条件:
on both diagonals of the square paper all letters are the same;
all other squares of the paper (they are not on the diagonals) contain the same letter that is different from the...
分类:
其他好文 时间:
2014-05-23 02:21:01
阅读次数:
294
Use Reentrant Functions for Safer Signal
Handling使用可重入函数进行更安全的信号处理How and when to employ reentrancy to keep your code bug
free何时及如何利用可重入性避免代码缺陷Dipak J...
分类:
其他好文 时间:
2014-05-22 00:33:49
阅读次数:
389
Linux发行版:CentOS、Ubuntu、RedHat、Android、Tizen、MeeGo作者:阳光岛主原文在这儿Linux,最早由Linus
BenedictTorvalds在1991年开始编写。在这之前,Richard Stallman创建了Free Software Foundatio...
分类:
移动开发 时间:
2014-05-21 21:58:57
阅读次数:
670
析构函数和构造函数是一对,就像C语言中的malloc和free,C++中的new和delete一样
先从一个实例说起:
#include
#include
using namespace std;
class Student
{
public:
Student(int n, string nam, char s)
{
num = n;
name = nam;
sex...
分类:
其他好文 时间:
2014-05-21 12:33:43
阅读次数:
259
There are two types of non-blocking thread synchronization algorithms
- lock-free, and wait-free. Their meaning is often confused. In lock-free systems, while any particular computation may be block...
分类:
其他好文 时间:
2014-05-21 10:27:20
阅读次数:
410
通常,子系统都要对其实现细节进行隐藏,在进行细节隐藏的同时,子系统为用户提供了一些关键入口点。程序员
通过调用这些关键的入口点来实现与子系统的通信。因此如果在程序中使用这样的子系统并且在其调用点加上了调
试检查,那么不同花很大力气就可以进行许多错误检查。
当子系统编写完成后,要问自己:“程序员什么情况下会错误地使用这个子系统,在这个子系统中怎样才能自动检
查出这些问题?”...
分类:
编程语言 时间:
2014-05-21 07:04:02
阅读次数:
283