- 博客(21)
- 资源 (1)
- 收藏
- 关注
vim preferences
How to use 4 spaces instead of tab in vim: 1 :set ts=4 2 :set number 3 :set autoindent 4 :set expandtab 5 :set softtabstop=4 6 :set shiftwidth=4:set showmode:set number:...
2010-12-26 15:06:16 149
How to build static library and how to use it in Linux
1. declare the interface of libray: max.h ------------------------------ int max(int,int);2. implement the interface: max.c ------------------------------ #include "max.h" int max(int a, int ...
2010-12-23 08:46:57 144
const
There are two type of const:1. const int *p; <----- pointer 'p' is not const, while to what it points is const.e.g.:int i;const int ci = 5;const int *p;p = &i;p = &ci;*p = 1...
2010-12-22 21:33:14 140
Eclipse
1. highlight warning log message in eclipse console:Configure two separate appenders. One for the levels WARN and higher and one for the levels INFO and lower. Assign them to the std.err and std....
2010-12-22 13:29:40 91
Programming C in Linux
0. install compiler and associate environment.sudo apt-get install build-essentialor install with CD(without internet):sudo apt-cdrom addsudo aptitude updatesudo aptitude install build-es...
2010-12-22 13:28:47 121
Java Advance
1. A class with a given name can only be loaded once by a given classloader. 2. When the JVM is started, three class loaders are used: 1.Bootstrap class loader - loads the core Java librar...
2010-12-22 13:27:40 221
J2EE EJB OpenEJB
1.Generally speaking the only way to get a Container-Managed Resource is via dependency injection or lookup from within a Container-Managed Component. 2. Singleton a.Singletons have an '@Star...
2010-12-22 13:26:46 251
Spring
1. @Autowired vs. setter@Autowired can mark in field or setter, with @Autowired, setter is not necessary;If @Autowired is not apply to property, then setter is necesary for injection. 2. @C...
2010-12-22 13:25:41 144
JPA Toplink
1.persistence.xml--------------------------------------------------------------------------------<?xml version="1.0" encoding="UTF-8"?><persistence version="1.0" xmlns="http://java.s...
2010-12-22 13:25:01 170
Apache Ant
1. Add additional command line arguments for <javac> task:<javac srcdir="${dist}/trsWeb" destdir="${dist}/build/trsWeb" fork="true" classpath="${compile_classpath}" source="1.5&quo
2010-12-22 13:22:47 126
Trouble Shooting
1.Problem: log4j:WARN Document root element "log4j:configuration", must match DOCTYPE root "null".Solution: Add '<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">' to log4j.xml e....
2010-12-22 13:22:13 274
Maven Basic
0. useful commands: mvn install:install-file -DgroupId=org.apache.maven.archetypes -DartifactId=${myArtifactId} -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file mvn deploy:deploy-fi...
2010-12-22 13:20:49 160
Install Ubuntu9.10 in Oracle VirtualBox
1. How to use share folder in VirtualBox for Windows XP -> Ubuntu: a. From VBox menu, Install Guest Additional first (your guest os should be running) b. sudo mkdir /mnt/sf_xp c. sud...
2010-12-22 13:12:44 146
Oracle
1.SHOW USER(or SELECT USER FROM DUAL)/ 2.SELECT USERNAME, USER_ID, PASSWORD FROM DBA_USERS ORDER BY USERNAME/ 3.SELECT DEFAULT_TABLESPACE FROM USER_USERS/ 4.SELECT TABLE_N...
2010-12-22 13:09:44 215
Utility bat scripts
1. To launch a application in command-line without open a cmd window:>start putty -load Ubuntu -l root -pw *** 2. copy /Y file1 directory2 ------ override without warning xcopy /E...
2010-12-22 11:57:32 103
Ubuntu Beginer
Ubuntu version========================================================uname -auname -r Ubuntu rpm / VMware / root / java / vi / putty / jboss============================================...
2010-12-22 00:26:04 156
How to boot up Ubuntu in text terminal mode?
Ubuntu9.10 boot by 'grub', to change the boot mode to text-mode, we just need to change boot settings in '/boot/grub/grub.cfg'. a. #vim /boot/grub/grub.cfg, you will find section like: menuent...
2010-12-22 00:21:08 119
Ubuntu scripts executing sequence after user sign in
1. Before user sign in, the '/etc/rc$runlevel.d/*' will be execute according the runlevel. 2. After user sign in, the Ubuntu9.10 will execute below scripts list below:a. first, the global '/etc/...
2010-12-21 23:03:04 131
typedef
1. primitivetypedef int Integer;Integer i; 2. arraytypedef int Arr[10];Arr a, b, c; 3. function pointer#include<stdio.h> typedef int (*pfn)(int, int); void main(){i...
2010-12-21 22:52:39 91
Install ttylinux
1. gcc tbz ftp: ftp://ftp.int.ru/pub/FreeBSD/ports/i386/packages-8-stable/lang/2. mount cdrom: mount /dev/hdc /mnt/cdrom Install ttylinux in VritualBox1. download http://ttylinux.net/Downlo...
2010-12-19 21:15:32 199
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人