Skip to content


SCIENCE公布125个科学前沿问题

在庆祝SCIENCE创刊125周年之际,该刊杂志社公布了125个最具挑战性的科学问题,发表在7月1日出版的专辑上。在今后1/4个世纪的时间里,人们将致力于研究解决这些问题。这125个问题如下(前25个被认为是最重要的问题):

1宇宙由什么构成?
2意识的生物学基础是什么?
3为什么人类基因会如此之少?
4遗传变异与人类健康的相关程度如何?
5物理定律能否统一?
6人类寿命到底可以延长多久?
7是什么控制着器官再生?
8皮肤细胞如何成为神经细胞?
9单个体细胞怎样成为整株植物?
10地球内部如何运行?
11地球人类在宇宙中是否独一无二?
12地球生命在何处产生、如何产生?
13什么决定了物种的多样性?
14什么基因的改变造就了独特的人类?
15记忆如何存储和恢复?
16人类合作行为如何发展?
17怎样从海量生物数据中产生大的可视图片?
18化学自组织的发展程度如何?
19什么是传统计算的极限?
20我们能否有选择地切断某些免疫反应?

21量子不确定性和非局部性背后是否有更深刻的原理?
22能否研制出有效的HIV疫苗?
23温室效应会使地球温度达到多高?
24什么时间用什么能源可以替代石油?
25地球到底能负担多少人口?
26宇宙是否唯一?
27是什么驱动宇宙膨胀?
28第一颗恒星与星系何时产生、怎样产生?
29超高能宇宙射线来自何处?
30是什么给类星体提供动力?
31黑洞的本质是什么?
32正物质为何多于反物质?
33质子会衰减吗?
34重力的本质是什么?
35时间为何不同于其他维度?
36是否存在比夸克更小的基本粒子?
37中微子是其自己的反粒子吗?
38是否有解释所有相关电子系统的统一理论?

39人类能够制造最强的激光吗?
40能否制造完美的光学透镜?
41是否可能制造出室温下的磁性半导体?
42什么是高温超导性之后的成对机制?
43能否发展关于湍流动力学和颗粒材料运动学的综合理论?
44是否存在稳定的高原子量元素?
45固体中是否有超流动性?如果有,如何解释?
46水的结构如何?
47玻璃态物质的本质是什么?
48是否存在合理化学合成的极限?
49光电电池的最终效率如何?
50核聚变将最终成为未来的能源吗?
51驱动太阳磁周期的原因是什么?
52行星怎样形成?
53是什么引发了冰期?
54使地球磁场逆转的原因是什么?
55是否存在有助于预报的地震先兆?
56太阳系的其他星球上现在和过去是否存在生命?
57自然界中手性原则的起源是什么?
58能否预测蛋白质折叠?
59人体中的蛋白质有多少存在方式?
60蛋白质如何发现其作用对象?
61细胞死亡有多少种形式?
62是什么保持了细胞内的通行顺畅?
63为什么细胞的成分可以独立于DNA而自行复制?
64基因组中功能不同于RNA的角色是什么?
65基因组中端粒和丝粒的作用是什么?
66为什么一些基因组很大,另一些又相当紧凑?
67基因组中的“垃圾”(“junk”)有何作用?
68新技术能使DNA测序的成本降低多少?
69器官和整个有机体如何了解停止生长的时间?
70除了继承突变,基因组如何改变?
71在胚胎期,不对称现象是如何确定的?
72翼、鳍和面孔如何发育进化?
73是什么引发了青春期?
74干细胞是否位于所有肿瘤的中心?
75肿瘤更容易通过免疫进行控制吗?
76肿瘤的控制比治愈是否更容易?
77炎症是所有慢性疾病的主要原因吗?
78疯牛病会怎样发展?
79脊椎动物在多大程度上依赖先天免疫系统来抵抗传染病?
80对抗原而言,免疫记忆需要延长暴露吗?
81为什么孕妇的免疫系统不拒绝其胎儿?
82什么与有机体的生物钟同步?
83迁徙生物怎样发现其迁移路线?
84为什么要睡眠?
85人类为什么会做梦?
86语言学习为什么存在临界期?
87信息素影响人类行为吗?
88一般麻醉剂如何发挥作用?
89导致精神分裂症的原因是什么?
90引发孤独症的原因是什么?
91阿兹海默症患者的生命能够延续多久?
92致瘾的生物学基础是什么?
93大脑如何建立道德观念?
94通过计算机进行学习的极限是什么?
95有多少个性源于遗传?
96性别倾向的生物学根源是什么?
97生命树是生命之间系统关系最好的表达方式吗?
98地球上有多少物种? 99什么是物种?
100横向转移为什么会发生在众多的物种中以及如何发生?
101谁是世界的共同祖先?
102植物的花朵如何进化?
103植物怎样制造细胞壁?
104如何控制植物生长?
105为什么所有的植物不能免疫一切疾病?
106外界压力环境下,植物的变异基础是什么?
107是什么引起物质消失?
108能否避免物种消亡?
109一些恐龙为什么如此庞大?
110生态系统对全球变暖的反应如何?

111至今共有多少人种,他们之间有何关联?
112是什么提升了现代人类的行为?
113什么是人类文化的根源?
114语言和音乐演化的根源是什么?
115什么是人种,人种如何进化?
116为什么一些国家向前发展,而有些国家的发展停滞?
117政府高额赤字对国家利益和经济增长速度有什么影响?
118政治与经济自由密切相关吗?
119为什么改变撒哈拉地区贫困状态的努力几乎全部失败?
120有没有简单的方法确定椭圆曲线是否存在无穷多解?
121霍奇闭链是代数闭链的和吗?
122数学家将会最终给出Navier-Stokes方程的解吗?
123庞加莱实验能否确定4维空间的球?
124黎曼zeta函数的零解都有a+bi形式吗?
125对粒子物理标准模型的研究是否会停止在量子Yahg-Mills理论上?
(注:最后6个数学问题选自Clay数学研究所提出的新千年问题)
简单归纳统计这125个问题,其中涉及生命科学的问题占46%,关系宇宙和地球的问题占16%,与物质科学相关的问题占14%以上,认知科学问题占9%。其余问题分别涉及数学与计算机科学、政治与经济、能源、环境和人口等。

Posted in Military & History.

hadoop cluster notes

namenode : app port: 9000, web server: 50070
jobtracker: app port:9001, web server:50030

datanode, tasktracker 运行于slaves上

core-sites.xml 用fs-default-name指定namenode
hdfs-sites.xml 指定namenode存放临时文件地址,指定datanode存放临时文件地址

临时文件夹必须存在,启动namenode前需要先先hadoop namenode -format一下

运行输入数据和输出数据都位于hdfs上,需要用hadoop fs -put或者-get 来获取,输出目录不能已存在,需要用-rmr来删除

用ip地址指示机器的话需要在hosts里填上对应关系 不然reduce的时候会出错

Posted in Linux.

亦歌Linux桌面版编译指南

如果你所用的发行版没有可用的qt4.5 package那么请安装qt sdk.

目前已知具备qt4.5的linux发行版有: Ubuntu 9.04
编译过程:
1、 运行下载后的qt sdk安装程序 安装到任意路径(若你希望系统上的不同用户都能使用亦歌桌面版那么请用root权限安装到/usr/share/qt4中)
2、解压缩下载的亦歌src压缩包,进入其目录并使用qmake生成Makefile
例如:  tar -xf linux1g1g_0.9-1.tar.gz
cd linux1g1g
/usr/share/qt4/qt/bin/qmake -o Makefile linux1g1g.pro
3、make生成可执行文件。 如果希望在任意路径下都能运行亦歌桌面版,请手动拷贝到/usr/bin

Posted in 1g1g Linux Desktop App. Tagged with , .

unix network programming notes

socket()
bind()
listen() ———-blocked <—-unblock SYN i connect() ———>ACK i+1, SYN j
accept()———-blocked <——unblock ACK j+1

3-way hand-shake

tcp

socket(*.21, *.*) — listening socket
accept() returns new socket (server_addr, 21, client_addr.client.port)

tcp write —- blocked until the buffer in APP have already been copied to the buffer in KERNEL
when the buffer in KERNEL is out of free space, APP be suspended.
data resident in the KERNEL buffer until its ACK has been received.

common [sockaddr] struct and [sockaddr_in]

struct sockaddr{
 uint8_t sa_len;
 sa_family_t sa_family;
 char sa_data[14];
}
struct sockaddr_in{
 //IPv4 socket address struct
}

new generic socket address struct for IPv6

struct sockaddr_storage {
  uint8_t      ss_len;       /* length of this struct (implementation dependent) */
  sa_family_t  ss_family;    /* address family: AF_xxx value */
  /* implementation-dependent elements to provide:
   * a) alignment sufficient to fulfill the alignment requirements of
   *    all socket address types that the system supports.
   * b) enough storage to hold any type of socket address that the
   *    system supports.
   */
};

[wait] and [waitpid] function

#include <sys/wait.h>
 
pid_t wait (int *statloc);
 
pid_t waitpid (pid_t pid, int *statloc, int options);

wait: clean a terminated thread and returns its thread id and exit status
when all child threads are executing, blocked until anyone terminates
waitpid: waitpid gives us more control over which process to wait for and whether or not to block. First, the pid argument lets us specify the process ID that we want to wait for. A value of -1 says to wait for the first of our children to terminate. (There are other options, dealing with process group IDs, but we do not need them in this text.) The options argument lets us specify additional options. The most common option is WNOHANG. This option tells the kernel not to block if there are no terminated children.

notice: SIGCHLD is not queued.
the most proper way to handle zombie child threads are using waitpid with options WNOHANG as below :

 #include    "unp.h"
 
 void
 sig_chld(int signo)
 {
     pid_t    pid;
     int      stat;
 
     while ( (pid = waitpid(-1, &stat, WNOHANG)) > 0)
         printf("child %d terminated\n", pid);
     return;
}

notice: slow system calls such as, accept() read() write() connect(), may be interrupted by signal handling, and return EINTR, we must handle them by redoing them.

Posted in Programming. Tagged with , .

UML notes

<>—–aggregation
<>——-black diamond: composition
<|——- generalization, inheritance
<———- dependency
+ public
- private
# protected
~package

Posted in Programming.

Intro2Algorithm Notes

Part II Sorting
Ch9 Medians and order statistic
finding the minimum and maximum each = N comparison
finding them both = 3/2* N comparison
finding the second smallest = N + lgN -2 comparison :

construct a comparison tree when finding the smallest, then replace the smallest with negative infinite
and follow the tree again.

finding the kth element = O(n)

O(n) on average : adapted quicksort
O(n) on worst case: first divide the array into groups each of 5 elements. sort each group and select the median , sort all the medians and find the median-of-medians, partition the array around the median-of-medians as the pivot.

Part III Data Structures
Ch10 Elementary Data Structures
representing a tree with arbitrary number of children in a binary tree

struct Node{
Node* parent;
Node* left-child;
Node* right-sibling;
}

ch11 Hash Tables
hash function for ordinary string

“pt” = (’p’ * 128 + ‘t’ ) mod a-big-prime

universal hash methods
division method : k mod N, N should be a prime number not too close to an power of 2

Posted in Programming.

memory alignment

alignment

struct{
char data1;
short data2;
int data3;
char data4;
}

==>
struct{
char data1;
char padding1[1]; // short需要align到2byte
short data2;//不需要padding, int已经align到4byte
int data3;
char data4;
char padding2[3];//虽然已经是最后一个元素 但是为了避免用在数组里的问题时 也不得不加上padding
}

Posted in Programming.

memmove implementation

void* memmove(void* p_dst, void* p_src, size_t size){
assert(!dst && !src);
if(dst==src) return dst;
char* dst=static_cast p_dst;
char* src=static_cast p_src;
if(dst>src & dst //第一种overlaop
//从后往前拷贝
}
else{
//从前往后拷贝
}

}

Posted in Programming. Tagged with .

c++ primer plus notes

c++ is a superset of c which has extra OOP and generic programming capability.

K&R C is classic C. new standard for C is ANSI/ISO C, a.k.a C99

#include or #include for older system.

always use long variable for data longer than 32bit for the sake of good portability.

const vs #define : 1 explicitly declared type 2 used in scopes

losing precision of floating number. e.g. 2.34E+22 + 1

function pointer : int* func() –> int* (*func)()

two-dimension array processing function : void func(int arr[][4]) or void func(int (*arr)[4] )

implicit type conversion: using one argument constructor / use explicit keyword to turn it off

copy-constructor: assignment operator should perform deep copy.
copy-constructor should check whether internal static member is changed in ordinary constructor
assignment-operator should avoid copying from self to self
copy-constructor is invoked when 1. passing argument as value 2. return object as value
3

when doing member function overloading, const keyword is also taken into account.
e.g.
const char & operator[](int i) const {return str[i];}
char & operator[](int i) {return str[i];}
the former is for ordinary object, the later is for const object.

assignment and type conversion:
A a; B b; b= a;
1. a is converted to a temporary B object using conversion constructor: B(const A a)
2. the previous temporary B object is assigned to b using assignment operator
more efficient way:
overload the assignment operator letting it able to handle the assignment between A and B objects directly.
e.g.
B & operator=(A const & a)

deep-copying :
1 constructor : use constructor list
2 destructor: apply memberwise deleting automatically.
3 copy-destructor: apply memberwise copying.
4 assignment-operator : explicitly use base class assignment operator as BaseClass::operator=(obj) to copy the portion of base class. Then do memberwise copying.

STL auto_ptr is a possessive smart pointer, which means it will eliminate the pointer copied to it.
need more discussing http://en.wikipedia.org/wiki/Smart_pointer
problem sovled : 1 memory leaking 2 object slicing

difference between memcpy and memmove
whether can handle memory overlapping

difference between private inheritance and containment
1 private inheritance can redefine virtual functions, containment not
2 private inheritance can access protected members, containment not
3 containment can use several objects, private inheritance uses only one

stl container category :
sequence container
1 vector
2 lists
3 deque (double ended queue)
associative containers
1 map
2 multimap
3 set
4 multiset

stl iterator category
input iterator
output iterator
forward iterator
bidirectional iterator
random_access_iteraotor

forward declaration
when using friend class like this: B::foo() is friend class to A
Class B{
void foo(A& a);
}
Class A{
friend void B::foo(A& a);
}
in A’s declaration, the code refers to class B, therefore, B’s declaration must appear before.
However, in B::foo(), it also references class A. Then, forward declaration of A should be used here.
Notice, in B’s declaration, only function prototypes are allowed, otherwise, if a method definition reference A,
the compiler has to inspect the whole content of A, which is unavailable right now.
By the way, making the entire class B a friend doesnt need a forward declaration, because the statement
friend class B;
already indicates that B is a class.

return type is not involved in generating a member function’s signature. that is to say, you can override a function with a different return type, as long as the new return is derived from the previous one.

the default behavior of meeting a uncaught exception is to call terminate() then abort(); set_unexpected(handler) can override this behavior.

Posted in Programming.

相当重要的决定

from now on:
脱离操作系统的看问题 多了解windows的运行原理
转向分布式系统的工程应用
转向更多的工程应用 不再执着于科学

Posted in Life, Feeling & Story.