Featured Posts

<< >>

hello scala eric resources

Scala View more PowerPoint from deathxlent

scala domain modeling and architechture

Scala Domain Modeling and Architecture View more presentations from thinkmeta

debian5 test (jdk,envirment) and useually used command

http://www.trendsignals.net/vm/images/debian5.html download vmplayer run it 1)install test: deb pakage install: dpkg -i xx.deb bin pakage insall: ./xxx.bin 2)debian jre/jdk install 3).deb ar p FileName.deb data.tar.gz | tar zxf – 4)understand deeply command on debian / ubuntu apt( considered as system,full spelling :aptitude ) dpkg is a low layer tool,mainly used:install,remove xxx.deb file so,apt-* belong to [...]

Installing node.js 0.6.2 on Fedora 14(reship)

The simple step by step instruction: sudo yum install git view plaincopy to clipboardprint? git clone –depth 1 git://github.com/joyent/node.git cd node git checkout v0.6.2 sudo yum install openssl-devel sudo yum install gcc # you can skip this if you already have gcc sudo yum install gcc-c++ # you can skip this if you already have [...]

hello scala eric resources

Scala

View more PowerPoint from deathxlent

scala domain modeling and architechture

debian5 test (jdk,envirment) and useually used command

http://www.trendsignals.net/vm/images/debian5.html

download vmplayer run it

1)install test:
deb pakage install:
dpkg -i xx.deb
bin pakage insall:
./xxx.bin
2)debian jre/jdk install

3).deb
ar p FileName.deb data.tar.gz | tar zxf -

4)understand deeply command on debian / ubuntu
apt( considered as system,full spelling :aptitude )
dpkg is a low layer tool,mainly used:install,remove xxx.deb file
so,apt-* belong to the higher level tool ,useually used:handle the complex dependition or provide the convernient

useually used command:
a)aptitude(graphical tool) for example:sudo aptitude /sudo apt-file
b)sudo dpkg/apt-get

apt-get update :update software list
apt-get upgrade

5)search cut key:vim,/!

Installing node.js 0.6.2 on Fedora 14(reship)

The simple step by step instruction:

sudo yum install git

view plaincopy to clipboardprint?
git clone –depth 1 git://github.com/joyent/node.git
cd node
git checkout v0.6.2
sudo yum install openssl-devel
sudo yum install gcc # you can skip this if you already have gcc
sudo yum install gcc-c++ # you can skip this if you already have gcc-c++
./configure [ thank you Ed for the heads up! ]
make -j2
make install
export PATH=$PATH:/usr/local/bin:/usr/local #this is to add usr local to your path wher nodejs was installed
sudo visudo
Find Defaults secure_path=/sbin:/bin:/usr/sbin:/usr/bin
go to the end “a” for append, type “:/usr/local/bin”, ESC, “:wq”
curl http://npmjs.org/install.sh |sudo sh #installing npm a very good too to install nodejs packages
sudo yum install mongodb #installing mongodb
#go to the dir where you wish to code and use npm!!
npm install mongodb
npm install mongoose
npm install express
npm install coffee-script
npm install stylus
npm install underscore
npm list
/home/john/someproject
├── coffee-script@1.1.3
├─┬ express@2.5.1
│ ├─┬ connect@1.8.0
│ │ └── formidable@1.0.7
│ ├── mime@1.2.4
│ ├── mkdirp@0.0.7
│ └── qs@0.3.2
├── mongodb@0.9.7-0
├─┬ mongoose@2.3.13
│ ├── colors@0.5.1
│ ├── hooks@0.1.9
│ └── mongodb@0.9.6-23
├─┬ stylus@0.19.3
│ ├── cssom@0.2.0
│ ├── growl@1.1.0
│ └── mkdirp@0.0.7
└── underscore@1.2.2

life meaning->Ten difficulty

Wang Gang ( China Aerospace Changfeng Co., Ltd. president of Chaoyang Power Supply )
1、最难改变的是习惯;
2、最难提高的是素质;
3、最难把握的是机遇;
4、最难控制的是情绪;
5、最难处理的是关系;
6、最难平衡的是心态;
7、最难实现的是梦想;
8、最难遇到的是知己;
9、最难积累的是财富;
10、最难超越的是自己。
面对10难,成功者不断跨越,失败者畏缩不前。
点评:最根本的难处,是如何超越个体生命的局限,实现个体相对于群体的意义,拥有此生有限的时间相对于人类无限生命的记忆——信义联

Manifesto for Agile Software Development(reship)

We are uncovering better ways of developing
software by doing it and helping others do it.
Through this work we have come to value:

Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan

That is, while there is value in the items on
the right, we value the items on the left more.

http://agilemanifesto.org/iso/en/

linux notebook_1

1)change user group: usermod -g group groupname

2)scp

(1) copy file:
format:
scp local_file remote_username@remote_ip:remote_folder
or
scp local_file remote_username@remote_ip:remote_file
or
scp local_file remote_ip:remote_folder
or
scp local_file remote_ip:remote_file
copy directory
format:
scp -r local_folder remote_username@remote_ip:remote_folder
or
scp -r local_folder remote_ip:remote_folder

thread communication example

   /**
     * 子线程循环10次,接着主线程循环100次,接着又回到子线程循环10次,接着回到主线程循环100次
     * ,如此循环50次
     */
public class ThreadCommunication {

    public static void main(String[] args) {
        new ThreadCommunication().test();
    }

    public void test() {
        final Bussiness bi = new Bussiness();
        //sub thead
        new Thread(new Runnable() {
            @Override
            public void run() {
                for (int j = 1; j <= 50; j++) {
                    bi.sub(j);
                }

            }
        }).start();
        //main thread
        for (int j = 1; j <= 50; j++) {
            bi.main(j);
        }
    }

    class Bussiness {
        private boolean checkStat = true;

        public synchronized void sub(int j) {
            while (!checkStat) {    //if/while都行
                try {
                    this.wait();
                } catch (InterruptedException e) {
                    e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                }
            }
            for (int i = 1; i <= 10; i++) {
                System.out.println(“sub ” + i + ” thread start…” + “loop” + j);
            }
            checkStat = false;
            this.notify();
        }

        public synchronized void main(int j) {
            while (checkStat) {
                try {
                    this.wait();
                } catch (InterruptedException e) {
                    e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                }
            }
            for (int i = 1; i <= 100; i++) {
                System.out.println(“main ” + i + “thread start…” + “loop” + j);
            }
            this.checkStat = true;
            this.notify();

        }

    }
}

focus on the deeply research of thead -thread pools

today ,i found the thread framework

Java Concurrency / Multithreading 并行与多线程

http://www.vogella.de/articles/JavaConcurrency/article.html 

test application  excutor framework

continue it

now departure!

rencently,finally departure,perhaps the result is best,i will begin to enter the new environment,i think that the luck is coming… well,everything will be colorful,i expect.