- 浏览: 208118 次
- 性别:
- 来自: 北京
最新评论
-
fuliang:
more cleanner than before
Big Integer Arithmetic -
yaojingguo:
Hi, Liang LiangThanks for the i ...
Redirect and restore stdout in C -
fuliang:
使用gcc编译.cpp,可以使用-lstdc++选项,这样gc ...
Redirect and restore stdout in C
文章列表
On page 74, there is "The second arg to trec should be a function of three arguments: the current object and the two
recursers. " For CLISP, two arguments are enough. I am using CLISP 2.44.1 on Ubuntu 10.04. Here is the code:
(defun trec (rec &optional (base #'identity))
(lab ...
#official
# deb http://archive.ubuntu.com/ubuntu lucid main universe restricted multiverse
# deb-src http://archive.ubuntu.com/ubuntu lucid main universe restricted multiverse
# deb http://archive.ubuntu.com/ubuntu lucid-security universe main multiverse restricted
# deb-src http://archive.ubu ...
#include <stdio.h>
#define BYTE_LEN 8
unsigned int direct_address_search(int T[], int k) {
int byte_offset = k / BYTE_LEN;
int bit_offset = k % BYTE_LEN;
return (T[byte_offset] >> bit_offset) & 1u;
}
void direct_address_insert(int T[], int k) {
int byte_offs ...
#include <bitset>
#include <iostream>
using namespace std;
int main() {
const bitset<12> mask(2730ul);
cout << "mask = " << mask << endl;
bitset<12> x;
cout << "Enter a 12-bit bitset in binary: " << ...
#include <stdio.h>
enum pointer_tag { LINK, THREAD };
struct node {
char* data;
struct node* lchild;
struct node* rchild;
enum pointer_tag ltag, rtag;
};
void visit(char* data) {
printf("%s ", data);
}
void traverse(struct node* head) {
struct node* ...
#include <stdio.h>
#define RIGHT_SIBLING 0
#define PARENT 1
#define NIL 0
struct node {
int key;
struct node* left_child;
struct node* p;
int flag;
};
int visit_parent(struct node* node);
void visit_children(struct node* node, int children[], int* cp);
void set_no ...
#include <stdio.h>
#define TRAVERSE 0
#define LEFT_BACKTRACK 1
#define RIGHT_BACKTRACK 2
struct node {
int key;
struct node* p;
struct node* left;
struct node *right;
};
void traverse(struct node* node);
void set_node(struct node* node, int key, struct node* p, struc ...
ANT 1.8.2 New Features
- 博客分类:
- java
junt task's test element supports methods attribute. Now it is possible to test a single method.
http://ant.apache.org/manual/Tasks/junit.html
#include <stdio.h>
int next[9];
int key[9];
int prev[9];
int L;
int F;
void print_array();
void print_list(int);
void print_lists();
void create();
void exchange(int, int);
void compactify_list();
void swap_next(int, int);
void swap_key(int, int);
void swap_prev(int, int);
...
cat /proc/partitions
fdisk -l
df -h
cat /proc/cpuinfo
dmesg
#include <stdlib.h>
#include <stdio.h>
void swap(int *a, int *b) {
int temp;
temp = *a;
*a = *b;
*b = temp;
}
void info(int arr[], int len) {
int i;
for (i = 0; i < len; i++)
printf("%d ", arr[i]);
printf("\n");
}
int randint ...
#include <stdio.h>
void info(int A[], int len) {
int i;
for (i = 0; i < len; i++)
printf("%d ", A[i]);
printf("\n");
}
void swap(int *a, int *b) {
int temp = *a;
*a = *b;
*b = temp;
}
void max_heapify(int A[], int i, int len) {
int ...
gedit
====
gedit --encoding=GBK
gvim
====
Add the following text to .vimrc:
set fileencodings=utf-8,gb2312,gbk,gb18030set termencoding=utf-8set encoding=prc