LINUKS BLOG

Make progress is the topic for ever...

My Photo
Name:
Location: China

It's a fans of computer/ Computer is my favorite/ Making progress is the topic for ever...

Wednesday, February 28, 2007

Good mood

Phase a good mood to embrace your life.
Have a good mood not only be fit for your health,but also convenience your way to success.
Only when you have a good mood, the person around you would happy with you.If the your relation complex,your career will be success now and later.
Yesterday:
construct method,void method,and new a object.abstract class.

Tuesday, February 27, 2007

Home is warm

Home is warm,but if you stay home for long ,you will find you are lonely.
From i go to school away from my family, i was only 12 years,and year by year.The small child has grown up.

Wednesday, February 21, 2007

回家
树欲静而风不止,子欲养而亲不待。别忘了,有人在盼你回家。

终于可以回家了...

Tuesday, February 20, 2007

Abstract

public class 学习别人超越自己{
状态 闪光点=null,优点=null, 好方法=null;
public 学习别人超越自己(){
闪光点=new 状态();
优点=new 状态();
好方法=new 状态();

System.out.println("Learn the "+闪光点+优点+好方法+"in heart");
}

void 发现(){

System.out.println("I find a "+闪光点+优点+好方法+"from xxx");
}

void 称赞(){
System.out.println("xxx,you are great!!");
}

public static void main(String[] args){
学习别人超越自己 学习=new 学习别人超越自己();
学习.发现();
学习.称赞();

}
}

Monday, February 19, 2007

面向对象编程

//面向对象编程

class 抽象化模型{
状态:
行为(){
System.out.print("面向对象编程");
}

public static void main(String[] args){
new 行为();
}
}

Sunday, February 18, 2007

Our school's satellite photo

EastCampus:


WestCampus:


Our school's photo took by the satellite from the google earth:


And the photo maybe took by the satellite before the most high building finished.
The dormitory building we had stayed were there;and i can see the classroom building which we had studied in;and the eating room.
When saw these,the only mood is sorrow.Four years,could not have nothing,but the pretty remember things.

Thursday, February 15, 2007

Mood is gray

Today is a cloudy.And my mood is gray.
Have a bad sleep yesterday night.perhaps,watch TV too late to ensure a well sleep.But, it's not the primary reason i think.The Chinese new year's day is coming,but me, spent the new year's day with my family for 23 years.However, this year,i will spend the new year's day in a distant place.Don't think much,only the life in front of the eye...
I can't bear really.

程序人生

程序人生:
虽然就目前来说我还不是一个程序员来者,但我有一种渴望,甚至是强烈的渴望.希望有一天,我真的能够做我想做的事情.用程序来谱写我的人生:
也许,程序是一个有序的程式,而我的人生是无序的.可我却有着一种冲动,想让我无序的人生有序化.有些程序人是这么说的:程序就是人生,人生就是程序.我也希望我的人生能够有序化,但我不想让它程序化.所谓的程序化就是让他受制于一定的模式化,有些时候是一种教条的作法.而我唯一的想法就是能够使我的人生有序化,有着一定的目的去发展去,去进步.当然我是不太希望,它具有像程序一样的,对于一件事反来覆去的毫无意义的重复性.
也许有时候我应该学着去用程序思想去思考一些事情,比如说:面向对象思想.世间的一切都是对象.人,狗,汽车,树...等等,所有的一切一切都是对象.
有些道理,也许想的多了,它也就真的大彻大悟了.

Tuesday, February 13, 2007

Some small point of knowladge

final,general final int N=30; private
array, String s[]=new String[i];
make progress everyday,you will be clever.And record the daily of the point acknowledge.
It's a small acknowledge,though there's no one can understand it.As long as i understand,it's enough.

Monday, February 12, 2007

转义字符

转义字符:

ddd 1到3位8进制数据所表示的字符(ddd)

uxxxx 1到4位16进制数所表示的字符(xxxx)

' 单引号字符

\ 反斜杠字符

r 回车

n 换行

f 走纸换页

t 横向跳格 System.out.println("t"+x+"t"+y); Like this print the table style.

b 退格

Sunday, February 11, 2007

Find a question

When i do the program the day before yesterday.
I find a question like this:
“This Method Has a Constructor Name” Warning in Eclipse.
The reason may be that I give a method the same name with the class.
class Sign{
public String Sign(int score){
...
}
}
The answer from the forum like this:
If you get annoyed when Eclipse alerts you about your unit tests that “This method has a constructor name”, you can set it to ignore these warnings in Window / Preferences / Java / Compiler / Error/Warnings - set “Methods with a Constructor Name” to “Ignore”.

It’s generally a bad idea to switch off warnings but in this case I think the JUnit syntax is confusing Eclipse so it’s easier to just switch them off.

Friday, February 09, 2007

A small question of "accessed in a static way."

A small question of "accessed in a static way."
There is a exist example on the forum of sun:
Hi, I am working on a little java class that accesses another class to display the day of the week.

The code looks like this

import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Scanner;


public class DateTime
{

public static void main(String [] args){

WeekDay WD = new WeekDay();
Calendar currentDate =new GregorianCalendar();
int currentWeekDay = currentDate.get(Calendar.DAY_OF_WEEK );

String name =null ;

Scanner keyboardInput =new Scanner(System.in );
System.out .println("What is your name?");

name =keyboardInput.nextLine();

System.out .println("Hello, "+name+" it is "+ WD.getWeekDay(currentWeekDay) +".");

}
}


The program runs but in eclipse it shows a little yellow line under WD.getWeekDay(currentWeekDay) with a warning that says "the static method getWeekDay(int) from the type WeekDay should be accessed in a static way." Does anyone know what my prob is?

And the answer is like this:

try

System.out.println("Hello, "+name+" it is "+ WeekDay.getWeekDay(currentWeekDay) +".");

Also, if you follow any of the java coding standards, please start variables with a lower case: The variable WD should be wd

You need to configure the Eclipse compiler in the Preferences->Java->Compiler and disable some error and warning options (e.g., non-static access to static members)
The address of the content is :http://forum.java.sun.com/thread.jspa?threadID=774561&tstart=60

It gave two plans to solve the problem.I would choose the first answer if choose the most suitable answer.For the second answer may modify the standard to modify the eclipse setting.It's not promoted.
Then have a look at the question i meet:
It is a static method in the main class.I put it into a new class ,and import it in the main class.But then it appear the warn information of "the static method xxx from xxx should be accessed in a static way." I fix it as above, and know about it should not use a static method like this.And find a new problem of warn information because the new class' name should not equal the new class' method's name.

Thursday, February 08, 2007

Logic thinking

Learn the logic thinking in programming.
Some time,it need some logic to program.For example,the real society is a mass,and the problem is complex.When you get the material of the reality,you should be clearly in the complex condition.So you should have some logic thinking to become a programmer.
But how to learn the logic in the programming.First of all,one can't learn the logic in a confirm period.The reality and the time is not permit.So the best way to do it is exercise in the daily .
For example,you must make clearly the complex question.And scratch the primary keys in the question.Make sure that work out it with one eye in the next time.

Wednesday, February 07, 2007

Object thinking

public class example{
public static void main(String[] args){
Random random=new Random();
float x=random.nextFloat();
int n=(int)(50*x+50);
switch(n/10){
case 9: System.out.println("A"+sign(n)+"You are great!"); break;
case 8: System.out.println("B"+sign(n)+"A nice work!"); break;
case 7: System.out.println("C"+sign(n)+"You can do better!"); break;
case 6: System.out.println("D"+sign(n)+"Congratulations!"); break;
default: System.out.println("Please work harder!");
}
}
public static String sign(int score){
if(n%10<2) return("-");
else if(n%10>7) return("+");
else return("");
}
}

Write the above,to say to me that please remember the orient object thinking in the heart.
Everything is a object,and object is everything.
The program passage above show that "sign(n)" is a class.And because lack the object thinking, I can't work out it at first.

Making progress is the main topic for ever!

Tuesday, February 06, 2007

Buy another phone

I want to buy a mobile phone for my brother.

Mobile phone in the modern society is popular.It is a common communication tool for people.It will not signify the wealth.At once,I have the idea of the mobile signify the person's position.And some idea in my mind is stubborn,and as long as the mistake it brought didn't influence huge,I would not improve it.It's a example above.
I want to buy a phone.First of all,isn't expensive.And a smart phone.Maybe it is the need for my desire,and decide by the condition of my reality.
Remember that my siemens mobile blogged in the previous blog.I admire siemens mobile for their technology and the attitude to do thing.Although the siemens' mobile business bought by benq,but i remember siemens mobile for ever.
Which mobile should i buy? At first,i want to buy a brand.Otherwise,it's common in the society.So i find the smart phone of doopod.With windows mobile OS,and some lower production isn't expensive.

Sunday, February 04, 2007

Record the diary

Record the diary.

Do everything is a process.Don't impetuous to do anything.Whatever everything ,as long as you want to get,little by little,you will get it at last.
The life is a long period,and can't do everything in a short time.
Today,the computers in my hospital infected some virus.Except finding the main reason,we have to repair it .
But it is a long process,need some time ,need patience.But some people can't do it,though he was not the fresh person since get the job.

Thursday, February 01, 2007

Basketball,

Basketball,

Although it's a tall men's game,though i am not a tall or strong men,but i Begin to love it since the senior high school.

Not for it's a interesting game,but it's a game which can train the body.

I like silence sometime,especial when i want to silence.But if silence for the long time ,I will be more like to take exercise.By it ,i can break the silence mood.

because it's a violent game,can't forbid hurt the body.But as long as didn't hurt serious,i was happy.