VisionOS's Weblog

October 14, 2009

tableware

Filed under: uncategorized — visionos @ 11:19 pm

餐具

fork
spoon
knife

October 6, 2009

Nobel, the world’s most prestigious prize

Filed under: uncategorized — visionos @ 9:54 pm

Nobel, the world’s most prestigious prize

nuclear fission, nuclear fusion

Filed under: uncategorized — visionos @ 9:49 pm

fission vs. fusion
裂变 vs. 聚变

VRML animation

Filed under: uncategorized — visionos @ 6:51 pm

In Matlab, you have
vrplay – Play VRML animation file
Syntax

vrplay
vrplay(filename)
x=vrplay(filename)

vim interactive replacement

Filed under: uncategorized — visionos @ 6:17 am

:%s/old/new/g
Replaces all occurrences of “old” with “new”. To do an interactive replacement (in which you will be asked, for each potential replacement, whether you really want to do it), add a c to the end of the command, e.g., :%s/old/new/gc .

veggie

Filed under: uncategorized — visionos @ 12:30 am

veggie
n. 蔬菜
veggie
n : edible seeds or roots or stems or leaves or bulbs or tubers
or nonsweet fruits of any of numerous herbaceous plant
[syn: {vegetable}]

October 5, 2009

tug-of-war

Filed under: uncategorized — visionos @ 11:04 pm

tug-of-war

n. 拔河
1: any hard struggle between equally matched groups
: a contest in which teams pull of opposite ends of a rope;
the team dragged across a central line loses

Tug of war, also known as tug o’ war, tug war or rope pulling, is a sport that directly puts two teams against each other in a test of strength.

October 1, 2009

Texmacs and SCIM Confliction

Filed under: uncategorized — visionos @ 4:17 pm

If you have both Texmacs and SCIM install in your Linux box, you may encounter this problem:
In Texmacs, if you click on the menu bar or toolbar, you will lose your keypoint input. I took me long time to realize it comes from the confliction of Texmacs and SCIM. Currently I don’t have a neat solution. The hack I am using is to restart SCIM (SCIM System Icon->Right Click->Exit), and then Texmacs will work normally. Just a tip for those who have the same problem.

September 30, 2009

ubuntu dist-upgrade

Filed under: uncategorized — visionos @ 5:42 am

sudo do-release-upgrade

September 28, 2009

[C++] function as template typename

Filed under: uncategorized — visionos @ 4:23 am

In the process of implementing equation and optimization algorithms, I encounter the problem of templaterize the algorithm with function types. The functions can be normal C functions, or function classes. The final solution is like this:

template
class Evaluator {
public:
Evaluator(const Functor& f)
: f_(f) {
}
double eval(int x) {
return f_(x);
}
private:
Functor f_;
};

double f(double x) {
return x * x;
}

class F {
public:
double operator(double x) {
return x * x;
}
};

int main(int argc, char* argv[]) {
Evaluator fevaluator(f);
F f2;
Evaluator Fevaluator(f2);
cout << fevaluator.eval(2) << " " << Fevaluator.eval(2) << endl;
}

« Previous PageNext Page »

Blog at WordPress.com.