- 浏览: 202745 次
- 性别:
- 来自: 北京
最新评论
-
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
文章列表
I have used TortoiseSVN before. It is simple to ignore files and folders with it. With svn command line, it can be done with "svn propedit svn:ignore .".
Vinagre
It is installed by default on ubuntu. You can find it in "Applications->internet->Remote Desktop Viewer". It can't specify color depth.
TigthtVNC
If it is installed, Terminal Server Client can also connect to VNC server. It can't specify color depth.
RealVNC
I ...
Install cscope
sudo apt-get install cscope
Generate cscope.files
LNX=/home/jing/data/road/linux/linus
cd /
find $LNX \
-path "$LNX/arch/*" ! -path "$LNX/arch/x86*" -prune -o \
- ...
Now the 2008 edition can be downloaded from http://www.unix.org/online.html
.
unrar-free
dones not handle some archives in RAR 3.0 format. So I use non-free version which is unrar
. "non-free" means that unrar
is an freeware not open source software. So we can use if for free.
Here is the code.
#include <time.h>
#include <stdio.h>
#define TIME_SIZE 20
int main() {
char buffer[TIME_SIZE];
time_t curtime = time(NULL);
struct tm* loctime = localtime(&curtime);
strftime(buffer, TIME_SIZE, "%4Y/%2m/%2d %2H-%2M-%2S ", loctime);
bu ...
The library for JNI invocation is libjvm.so not libjava.so (on Linux) unless you are using a very old version of Java.
For the intercation from Java to C/C++, no library is needed for compiling and linking since all needed JNI functions are included in jni.h. JNI invocation APIs such as JNI_Create ...
In C and C++, a function can have optional function arguments. For example,
int printf
(const char *template, ...
)
How about we wrapp this function? For example,
int printError(const char* template, ...) {
// additional logic
// an invocation of printf
// additional logic
...
In the root diectory of JDK source code, run the following command.
ctags -R --languages=java --exclude=com --exclude=sunw .
Only java and javax:
ctags -R --languages=java --exclude=com --exclude=sunw --exclude=sun --exclude=launcher --exclude=org .
Add the following line to .vimrc
...
I have a requirement to convert wchar_to Java String with JNI. There is no JNI API to do this job. So some code is needed. After some googling, I find this post http://forums.sun.com/thread.jspa?threadID=5279047
. It gives a long discussion about how to convert wchar_t to Java String. I uses the fol ...
- 2009-12-05 19:41
- 浏览 6173
- 评论(0)
The value for the default custom pallette:
#000000000000:#AAAA00000000:#0000AAAA0000:#AAAA55550000:
#00000000AAAA:#AAAA0000AAAA:#0000AAAAAAAA:#AAAAAAAAAAAA:
#555555555555:#FFFF55555555:#5555FFFF5555:#FFFFFFFF5555:
#55555555FFFF:#FFFF5555FFFF:#5555FFFFFFFF:#FFFFFFFFFFFF
My value for cust ...
- 2009-12-04 17:44
- 浏览 883
- 评论(0)
google-styleguide
Google C++ Style Guide
Python Style Guide
XML Document Format Style Guide
Google's R Style Guide
- 2009-12-03 15:11
- 浏览 680
- 评论(0)
Sometime IBus's input windows can't open. And it can't be started by click "System->Preference->IBus Preferences". Use the following commands to start it.
$ killall ibus-daemon 2>/dev/null
$ ibus-daemon -d &
- 2009-12-01 23:42
- 浏览 889
- 评论(0)
Since I have spent a long time with Java, I tend to think in Java way even when I am playing with C/C++.
GCC allows function declarations without an implementation.
#include <stdio.h>
int def(int);
int abc(int one) {
return one+1;
}
int main(void) {
printf("The number is ...
- 2009-11-29 15:52
- 浏览 739
- 评论(0)
For some reason, I need to understand the following code.
Header File
# include/unicodeobject.h from python source code
#ifndef Py_UNICODE_WIDE
// other code
# define PyUnicode_Decode PyUnicodeUCS2_Decode
// other code
#else
// other code
# define PyUnicode_Decode PyUnicodeUCS4_Decod ...
- 2009-11-25 16:54
- 浏览 952
- 评论(0)