Thursday, 19 April 2007

awk

what does awk do:

  1. deal with text file which is thought of as being made up of records and fields. we can write programing by awk to do anything we want.
  2. we can:execute UNIX command from within a script; process the output from UNIX commands; work with multiple input streams; define functions.
  3. we can combined with sed and shell scripting. compared: shell is very easy and quick to write, but lacks functionality. sed, awk, and shell are designed to be integrated.

invoke:

  1. awk [options] 'script' var=value file(s)
  2. awk [options] -f scriptfile var=value file(s) : we can have more than one -f scriptfile.
assigning values to variables can be:

  1. a literal: awk -f scriptFile count=5
  2. a shell variable: awk -f scriptFile count=$count
  3. A command substitution: awk -f scriptFile count=`who wc-l`

set filed seperator:

  1. using -F
  2. one line can be sperated into different filed and can be refered by variables $1, $2 etc. $0 means the whole record.

awk script consist of patterns and procedure:

  1. a pattern can be : /regular expression/, eg /^...:/ or relational expression, eg $1=="gdm". ~ means match, !~ means don't match, eg awk -F: '$1 ~ /.dm.*/ {print $0}' /etc/passwd. BEGIN specifies procedure to take place before the first input line is processed, END as well, eg awk ‘BEGIN {print “Version 1.0”}’ dataFile. pattern missing, the procedure applies all lines
  2. procedure is arround by {} and seperated by newlines or semi-colons. can be: commands, functions and veriable assignment. procedure missing, printed all lines matched by pattern.

commands used with procedures: 5 types

  1. Assignments of variables or arrays
  2. Commands that print
  3. Built-in functions
  4. Control-flow commands
  5. User-defined functions (in nawk only)


awk Built-in Variables:

  1. FILENAME - current filename
  2. FS - Field separator
  3. NF - Number of fields in current record
  4. NR - Number of current record
  5. RS - Record separator
  6. $0 - Entire input record
  7. $n - nth field in current record

awk operators: $_++_ --_ +_-_!_*_/_%_<_<=_>=_>_!=_==_~_!~_in_$$__?:_=_+=_-+_*=_/=_%=

two ways to usingarrays in awk:

  1. in an assignment statement: myArray[i]++
  2. split() function : n=splict(input,words," ") : splict this input by " "(whitespace) into words.

functions in awk: works in the same way as java: calling a function, no sapce between function name and left bracket.

Wednesday, 18 April 2007

Graphical User Interface Programming

finished

Introduction to GUI Programming

Event-driven Programming: program responds to these events. The order of the events is determined by the user, not the program. This is similar to going to a hardware store to get components for your home improvement project. Most of the components you need already exist. All you need to do is to install them.
Java GUI Programming:A user interacts with a GUI application by causing events. The application must respond to events in the order they arrive.
Three Parts of a GUI Program:
  1. Graphical Components make up the Graphical User Interface.
  2. Listener methods receive the events and respond to them.
  3. Application methods do useful work for the user.

The graphical components are Swing objects. You may use them without change or may extend them to make your own classes. Listener methods and application methods are Java methods that you write. Listener methods respond to events by calling application methods. Application methods are ordinary Java methods that perform useful computations. They receive data from the GUI and send data to the GUI to be displayed, but are not usually themselves concerned with the user interface.

To write a GUI application, keep these three types of software separated (while keeping the big picture in mind). In a big software project an entire team of programmers is assigned to each of the tasks.

Container Classes: A GUI program consists of a collection of graphical components that are all placed inside one or more windows. A container is an object that can hold other GUI components. In Java terminology, a window (such as the browser window you are looking at) is a container. The buttons, sliders, icons and other GUI components are contained (by the container).

AWT Hierarchy: Some of the AWT classes derived from Component are Button, Canvas, and Container. The JComponent class is derived from Container and is one of the base classes of Swing. The JFrame class is derived from the AWT Frame class. It is usually the main container for a GUI application.

JComponent class: Objects of classes based on Container have common characteristics. They can contain components, they themselves can be placed inside containers, they can be displayed on the monitor, they generate events, they register event listeners, and so on. Since all Swing classes have Container as an ancestor, all Swing objects have these characteristics.

Swing JFrames:

Frames: In Java, a frame is a window that has nice borders, various buttons along the top border, and other features. What you usually call a "window" Java calls a "frame". A frame is a container object, so GUI components can be placed in it. a frame object is actually a section of main memory that holds information and methods. With the help of the operating system and the graphics board.

Small GUI Program

First a JFrame is created by invoking its constuctor. The argument to the constructor sets the title of the frame. The setSize(200,100) method call makes the rectangular area 200 pixels wide by 100 pixels high.
The setVisible(true) method call makes the frame appear on the screen. If you forget to do this, the frame object will exist as an object in memory, but no picture will appear on the screen. A call to setVisible(false) makes the frame invisible, but does not destroy the software object.
It is easy to forget to include setVisible(true). If you run your GUI program, and nothing happens, check that you have called this method.

The setDefaultCloseOperation() method picks the action to perform when the "close" button of the frame is clicked. This is the little button usually at the top right of the frame. If you forget to call this method with the appropriate constant, clicks on the close button will be ignored.

Running the GUI Program:

The usual way of writing a GUI is to define your own class by extending the JFrame class.

The drawString() method: When the Java system needs to paint a MyFrame object it first draws most of the picture and then calls paint() in the MyFrame object to do whatever extra the programmer wants. The first part of the work is vital. It involves interacting with the graphics of the computer system and controling the graphics board. The parameter g is a reference to a Graphics object. The Graphics object represents the part of the frame that you can draw on. When the system calls paint(), the system provides a value for this parameter. One of the methods of Graphics is drawString(String st, int X, int Y) which draws a string on the graphics area at location starting X pixels from the left and Y pixels from the top.

Buttons and Actions

JButton->AbstractButton->JComponent->Container->Component->Onject

To construct a JButton object, use new. Then add the button to the frame's content pane. The content pane is a container that represents the main rectangle of the frame. To get a reference to the content pane, use the getContentPane() method of the frame. The add method of a content pane puts a JButton (or other component) into the frame.

The ButtonFrame class does not to define a paint() method because everything in the frame is a Swing component. The system will automatically paint all components in a container when it needs to. If special processing is needed, (as with drawString() in the previous chapter), then you need to override paint().
The program in the previous chapter did not define a constructor because the constructor it inherited from its parent class JFrame was enough to do the job. ButtonFrame adds a components, and this should be done in a constructor.

Layout Manager:

When you add() buttons (and other components) to a content pane, a layout manager automatically decides what size they will be and where they will go. This is convenient, because you can add components without worrying about the details. The layout manager is like a little artist inside the computer. You say what components you want and the layout manager lays them out in the picture.
The layout manager sometimes makes odd choices. However, there are several kinds of layout managers. Each layout manager has a different style of positioning components. Usually there is a layout manager that will do the job you want. If you don't specify otherwise, a default layout manager is used.

Our program will look better if it uses the FlowLayout manager. The FlowLayout manager puts components into the frame row by row in the order they are added.

Event Listener Object

For a program to respond to an event there must be an event listener object for it. The event listener object contains listener methods for various types of events

Event Object

An event listener is an object that "listens" for events from a GUI component, like a button. An event is represented as an object. When the user generates an event, the system creates an event object, which is then sent to the listener that has been registered for the GUI component.

To be able to respond to events, a program must first:
Create an event listener object for the type of event.
Register the listener object with the GUI component that generates the event (or with a component that contains it).

ActionListener

A button listener class must implement the ActionListener interface. ActionListener is an interface (not a class) that contains the single method: public void actionPerformed( ActionEvent evt) ;
The ActionEvent parameter is an Event object that represents an event (a button click). It contains information that can be used in responding to the event. Since ActionListener is an interface, you use it with a class that will implement the actionPerformed() method. It is common to implement the interface in the same class that contains the button(s):

For the ActionListener interface, there is only one method: actionPerformed().

The repaint() method called in actionPerformed()tells the system to repaint the screen sometime soon because we have changed something. The system will do this when it is ready. Don't call paint().

The frame will be the listener for the button.

button's life in a frame:

  • JButton newButton=new JButton(***) ; //create a new JButton object and assign to newButton
  • newButton.addActionListener(this);//addactionlistener
  • getContentPane().add(newButton);//add into JRame
  • public void actionPerformed(ActionEven e){***}//action performeed. everytime, when a even happened, such as mouce moved, if such kind of event has been registed, than a even object is created and have certain action performeed, after performed, then program executes next statement or event, or this performemt will not stop. so we can see is a button is released on show which means relevant actionPerformed has been successed done. if this even is not registed, system just ingnore them.

Buttons and Action Events

setActionCommand() and getActionCommand() method refer to different action, it will pass or return String to distingish different button event. which can help us to deal with different event in actionPerformed() method.

Swing Text Fields and Labels:

A Swing Component: JTextField

A JTextField is a box that contains text. The user can type text into the box and the program can get it and then use it as data. The program can write the results of a calculation to a JTextField.

To enter text into the field you must first click the mouse pointer inside of it. This gives the field the keyboard focus (usually just called focus). When a component has focus, characters from the keyboard are directed to that component. A component gets focus by various means. The user might click it, or the program might give it focus.

JTextArea+JTextField+JEditorPane -> JTextComponent->JComponent->Container->Component->Object

The JLabel Class

In a typical application with a graphical interface, about 40% of the code manages the user interface. The rest of the code is for the application--the reason the program was written. Usually the application code is kept separate from the code that manages the interface. In a big application it would be confusing to mix the two together.

The GUI components from Swing can be used by applets.

It is a good idea to keep the GUI code and the application code in separate modules to help in debugging and understanding the program. This is also helpful if you later need to make changes to the program, say changing it from an application to an applet. The application code can be carried over without change.

The user can type into a JTextField even if it does not have a listener. getText() will still work

JPanel and BoxLayout

Each panel uses its own layout manager for the components it contains. The default layout manager of JPanel is flow layout, which is often ideal. But you may use another layout manager if appropriate.

BoxLayout Layout Manager

BoxLayout. This layout manager aligns components either horizontally or vertically within a pane. BoxLayout(Container box, int axis)
box: the container this layout manager is for axis: BoxLayout.X_AXIS -- for left to right alignment BoxLayout.Y_AXIS -- for top to bottom alignment . box is a reference to the container which will be managed by this layout manager. Often the container is a content pane.

This idea of nesting panels is a powerful one. It may look complicated and tedious, but it is much less so than laying out a design on graph paper and specifying the exact size and location of all the components. Such a design has no flexibility. What happens if you want to add or delete a component? Everything must change. With Java's layout managers everything is dynamically adjusted.

Radio Buttons, BorderLayout, and Glue

Radio Buttons
Usually radio buttons are placed in (1) a panel, to control how they are displayed, and (2) a button group, to control which buttons may be active simultaneously. A button group is an object which must be constructed. Radio buttons are then added to it.

Radio buttons generate action events which require a registered action listener. Do this as with JButtons. Use setActionCommand() to assign a command string to each button. Use addActionListener() to register a listener for each button, usually the same listener for all the buttons in a group. Use getActionCommand() in the action listener to determine which button was pushed.

BorderLayout

BorderLayout.is a frequently used layout manager. The container it manages corresponds to a rectangle on the screen. That rectangle is divided up into five regions:

  • BorderLayout.NORTH,
  • BorderLayout.SOUTH,
  • BorderLayout.EAST,
  • BorderLayout.WEST,
  • BorderLayout.CENTER.

Each region may hold only one component, although that component may be a panel (and usually is). The panel may contain several components. The layout manager adjusts the size of the regions depending on what is in them. You don't have to put a component in each region. If a region has no component in it, it shrinks to a small area.

Class Box

Layout managers sometimes jam components together in a way that makes the layout look cramped. The class Box can help in this situation. A Box object is a container similar to a panel, but lacking some features. The default layout manager of Box is BoxLayout. However, the most useful features of class Box are its methods that create invisible components. These components correspond to rectangular areas of the screen. They are used as spacers to separate the visible components. If you have ever set type you know how useful spacers are in creating an attractive page. To create a fixed-sized invisible component use the method: Box.createRigidArea( new Dimension( int width, int height ) )
The parameter to createRigidArea()is a Dimension object, which does little more than hold a width and a height.

All GUI components have a getSize() method that is used to determine the dimensions of the component. The dimensions may change as a program executes, so this is a useful method. To determine the current size of a frame, use: Dimension JFrame.getSize()
Then it can look at the height and width fields of the Dimension object. Using this data it can create a rigid area of appropriate size. If this is too complicated, then use glue.
The glue component is another invisible component that class Box creates. Think of glue as stretchy caulking between components. It keeps them separated, but expands or shrinks as needed.
To create glue use one of the following:

  • Box.createHorizontalGlue()
  • Box.createVerticalGlue()

Class JSlider

JSlider( int orientation, int min, int max, int init )
orientation: SwingConstants.HORIZONTAL or SwingConstants.VERTICAL
min: the minimum value. The value when the slider is at the extreme left (or very bottom) of its range.
max: the maximum value. The value when the slider is at the extreme right (or very top) of its range.
init: the initial value of the slider

  1. JSlide silderV=new JSlide(SwingConstants.HORIZONTAL, 0, 100, 79)
  2. slideV.setMajorTickSpacing(10);
  3. slideV.setMinorTickSpacing(10);
  4. sliderV.setPaintTicks(true);
  5. sliderV.setPaintLabels(true);
  6. sliderV.setSnapToTicks(true);

setPreferredSize()

The layout managers have control over the size of components, but often do their job better if you indicate a preferred size. This is done with setPreferredSize( new Dimension( int width, int height )
If this is not used, the graphical representation of a slider often has its labels and tick marks crowded together

A listener for a slider implements the ChangeListener interface. This interfaces has a single method: public void stateChanged(ChangeEvent evt)
An object that implements the interface must be registered with the slider in order to receive events: slider.addChangeListener( ChangeListener lstn )
There may be several sliders in your user interface. They all generate change events. If one change listener listens to all these events it is convenient to give the sliders names so that the events can be sorted out correctly. (Another way is to register its own listener with each slider). A name is a string that can be assigned to any object that inherits from class Component. Assign it using: component.setName( String name )
Of course you must make sure that components that share the same listener have unique names.

The Object getSource() Method

An event object contains a reference to the component that generated the event. To extract that reference from the event object use: Object getSource()
Since the return type of getSource() is Object you typically use a type cast with it: // listener method
public void stateChanged( ChangeEvent evt )
{
JSlider source;
source = (JSlider)evt.getSource();
. . . .
}
Now that you have a reference to whichever slider caused the event you can use any of the slider's methods.

Assume that the slider has a name you have set using setName(). The name of the slider is a string that is stored as part of its data. To ask the slider for its name use: String getName()
Then, to get the value of the slider use int getValue()
The value is an int between the minimum and maximum value of the slider.

In the previous application the number in the text box changes continuously as the knob is moved. Usually this is desirable. But sometimes the application calls for a great deal of work and you don't want to do it for each change event. There are (potentially) hundreds of change events generated in moving the knob from one value to the next. While the value is still changing the listener should discard the event. boolean getValueIsAdjusting()
This method returns true while the knob is still moving.

Tuesday, 17 April 2007

sed

introduction:

before this we have two method to deal with text. one is to search by using grep, however we can only show the orgainal text on screan, no modify; the other is to edit using emacs, however we need to open a new window, and all behaviour will be record which means the orgainal one can be changed easly. now, we have another one named sed which can combine both advantages.


character:

  1. work on terminal as command, so will not need to open a new window.
  2. deal with file stored in your computer or online.
  3. it is a lightweight stream editor, so will not using too much memoy, the result will show on scream as stdout
  4. Sed works by performing any number of user-specified editing operations ("commands") on the input data. Sed is line-based, so the commands are performed on each line in order. And, sed writes its results to standard output (stdout); it doesn't modify any input files.

what does sed do:

  1. edit input stream. the orgainal source stay same, only patch match be modified.
  2. produce results on standard output. modifed date can show on scream or pipled.

how does sed work:

  1. make a copy of orginal file. and the left steps are works on this copy not the orgainal one
  2. input the first line into internal bufffer.
  3. act command on this line and print result on scream or file. if there are more than one command being act on one line, it will execute it in sequence, which means the result of former command can be picked by the next command.
  4. input the next line and repeat step 2 and 3 until the while file has been acted.

how to run it from command line:

  1. sed [-n] [-e] 'command' file(s)
  2. sed [-n] -f scriptfile file(s)

formating : using regular excpressions

  1. ^, $, ., *, ?, [], [^]
  2. \{m, n\} :repeat m or more than m times, but no more than n times.
  3. \(, \) : group operator or regin of interest, and alwoys using with \n. often \n appear after \(, \), \n mean nth of \(, \).

sed command syntax: sed [address[,address]] [!]command [arguments]

  1. sed can have 0, 1, or 2 address. and can be line number, symbol or regular expression in slash. no address means applying to each input line. one address meanwhile applying to any line match this address. twp comma_separated address means form one certain line to another certain line. an address followed by ! means DO NOT match this address.
  2. we can put more than one sed element in a command. if first command change the buffer, the will refer to this new stuff.

flag to command:

  1. g: global or all occurences of something
  2. p: print pattern space to stdout if substitution succeddful
  3. n: replace the nth occurence of pattern with replacement text.
  4. w filename: write the pattern space of line that are changed to resultsfile if substitution succcessful.

example:

  1. sed '/^#/d' myfile delecte all line starting with # as comment.
  2. sed '/on/,/5050/d' xinetd.confsed will print the text after 5050. sed -n '/on/,/5050/d' xinetd.confsed will print nothing. sed -n '/on/,/5050/p' xinetd.confsed will print out text between on and 5050. sed '/on/,/5050/p' xinetd.confsed will print the line between on and 5050 each for twice, becasue we first print current line into buffer again, then in 5050, print again.
  3. s/.*// means subtitute all text found for an empty string
  4. who sed -n ‘s/.*(\(.*\))/\1/p’ sort > machines.txt

using different delimiters:

  1. sed tries to match the longest expression!
  2. using non-'>' character: sed -e 's/<[^>]*>//g' UST.html

character classes-posix compliant sed:

  1. sed ‘s/[[:space:]]//g’ myfile
  2. how can we just select but not subtitution or other?



Monday, 16 April 2007

google_doc

I am so happy to finish my job today to create all elements i will need later, including all posts post today and all labels.
In this process, I find a quite fine tool and have to admire how great google is, that is google doc&document, which means you can use word, excell, and so on online, compared to OFFICE, we need to instal and maintain them, however you do not need to worried about these, only to using it and save online, when we using OFFICE, one problem is that the font we using on this pc maybe not instal on that pc, your word and others will fail to appear. however, it does not happened again, because all google doc&document are using same standand. maybe it will completely take market, because it can implement nearly all functions which OFFICE have, and the speed is fast at least when I use in IT_room. The favor is that we can create pdf by this, which is OFFICE can not succee. I can write pdf, modify it and read it then save on google. quite funny.
welcome to using it:http://docs.google.com/

Ubiquitous_link

at the begaining of this semester, Donlad know i am internesting in Ubiquitous computer, so he gave me links to his two friends.
London Knowledge Lab
Mark Levene
George Roussos
meanwhile, there are several link to some conferences:
Ubicomp 2007
Ubiquitous Computing (UC)
Pervasive & Ubiquitous Computing Course

dbs_notes

bonny_wong's_notes_in_cn

language_teacher

when I come to Uk, maybe this web will be quite usefull, because it can not only help me to know more friends, but also more money. I search on this, and many people in nottinghame where I will head to, wish to learn Mandarin.
weblink here.

鸟哥的linux

鸟哥的linux

mit_open_course

mit_open_course:麻省理工开放课程

convention_c_code_and_mips_code

a few days ago, i did a really stupid thing to do convention between c and mips code. I should pay more attention not to do such things again
Cconvention_c_code_and_mips_code.doc

computer_science_architecture_tool

liyang_hu's_webprogrammed_introduction_to_MIPS_assembly_language
MIPS architecture
计算机项目研究所列表

link_to_other_or_link_to_me

me:
name:en_version==Shao_Jianhua; cn_version==邵建华
nickname==Dustin
msn==dustin_shaojianhua@hotmail.com
mail==dustin.shaojianhua@gmail.com
qq==175190516
this_web_link==http://shaojianhua.bloggerspaces.com

==============================================
**********************************************************
==============================================
friends
wu_chengdong: crystal

haskell_tool

haskell_98_report
Learning Haskell
hoogle
Haskell Reference

java_review_and_exam_review

java_review_last_semester
java_exam_review
both of them has be sant to my mailbox

java_learning_tool

java api 1.5 en
java_api_1.5_cn
java_game_tutorial
free_game_source_code_in_java
Dictionary_of_Algorithms_and_Data_Structures
Bruce_Eckel's_book_page
java_office_web_training

blog_this_song

http://www.blogthissong.com/index.php

no promise

no promises
---shayne ward

hey baby, when we are together,

doing things that we love.

every time you're near i feel like i'm in heaven,

feeling high

i don't want to let go, girl.

i just need you to know girl.
i don't wanna run away,

baby you're the one i need tonight,

no promises.

baby, now i need to hold you tight,

i just wanna die in your arms

here tonight

hey baby, when we are together,

doing things that we love.

everytime you're near i feel like i'm in heaven,

feeling high

i don't want to let go, girl.

i just need you to know girl.

i don't wanna run away,

baby you're the one i need tonight,

no promises.

baby, now i need to hold you tight,

i just wanna die in your arms

i don't wanna run away,

i want to stay forever,

thru time and time..

no promises

i don't wanna run away,

i don't wanna be alone

no promises

baby, now i need to hold you tight,

now and forever my love

no promises

i don't wanna run away,

baby you're the one i need tonight,

no promises.

baby, now i need to hold you tight,

i just wanna die in your arms

i don't wanna run away,

baby you're the one i need tonight,

no promises.

baby, now i need to hold you tight,

i just wanna die in your arms

here tonight.


说说blogger

Blogger是一个博客,现在属于google。 他非常适于构建自己的博客,也就是说可以通过写代码就可以完成几乎所有的事情,我之前向这么做,当然你也可以使用已经构建好的模板,就像我现在一样 。 他的设计模式和我现在学的java 很类似,其实现在很多东西也都在这样趋向。他本身提供一些特定的变量,也就是你可以在dashboard里面所作的动作,例如发贴,形式设定等,然后你可以通过写一个模板或用已有的模板,来利用它的这些变量达到你所想要得功能。但并不是所有变量你现在都已经接触到了,我们可以去blogger的help页面去查找几乎所有的变量.这就像java中提供了一个api,你可以通过使用它里面的东西组合成一大堆新的东西。也可以非常像是在实现并扩建一个接口。所以熟悉面向对象编程的高手来说应该不是一个问题。当然我之前没用过别的任何博客,所以也许别的也是这样,我却不知道。
我在这里说说我这几天捣鼓这个blogger的一些东西吧,因为期间我顺便学了一些html,css和javascript,之前,我所作的网页都是通过使用工具软件来做,所以很多低层次的东西我是完全不知道的。首先你要去弄这个blogger,有一个资源是非常有用的,也就是他的帮助文档,学java的时候大家都知道,他的帮助文档api是非常有用的。你可以在里面发现一些基本用法,当然还有低层次的东西,例如系统所使用的变量,这样你就可以通过使用这些变量来少做很多事情。然后还有一个很好的资源就是他的默认模板,随便选一个来分析一下,你就会发现一些共性的东西,如果你只是想简单的增加一些功能或更改布局,那就只需要在这些模板代码里面改几个数字或换几个链接。附件里的就是我分析的第一个模板template.html.
我的blogger是通过ftp发布的,因为由于政策的原因,中国是不能浏览这个页面,那他就来一个对策,通过ftp域名榜定,所以其实如果你有时间,你可以自己在本地构建好自己想要得网页,然后结合他的部分变量,然后上传到你的ftp上,那你就既可以让你的页面非常好看,功能非常强大,也可以使用blogger本身的一些功能。我就是我原来的初衷,但我学习上时间不太好安排,所以就算了。我的ftp提供是bloggerspaces,你可以去参阅一下他完整的教程。
在来说说他的内部,blogger是通过调用你的模板,结合自己数据库里面的数据来同步生成html和archieve文件,同时他使用了atom和css格式来规范你的信息。你可以通过察看你的ftp就知道了。在html中,他有一个indix.html,也就是首页,blogger在你每次修改或发新贴或有新的评论,也就是有改动的时候,系统都会对你的页面进行更改,archieve.html也是一样,每个贴为一个html页面,然后每个月的帖放在一个文件下,然后一年的帖放在一个文件目录下。最上层的,就是每天的archieve.html。此外,最上层还有一个atom.xml和css.xml文件,他们就是用来管理你的这些所有文件用的。我之前对html,xhtml,css,xml一无所知的,但花了一个下午的时间,来阅读一个网站,我就觉得其实网页编程的基础还不时很难,如果你只是想看懂网页代码的话,我觉得这个w3c网站还是很不错的。其实你还可以从上面学到别的很多东西,例如flash。里面的酷站欣赏也很不错,可是大多是都是用flash作的,公司商业嘛,可以理解。
最后在来说说模板,模版里面的东西其实也不多的,用到最多的无非就是两个东西,一个html语言,还有一个css语言,html语言实现的基础执行,css实现的是一个基本框架。所以你在css里面设计好页面由几部分组成,每一部分里面的字体,图片,填充等。然后再html语言里面放上我前面提到的系统提供的变量或别的一些你想要得东西。你去看看你就会觉得不难得,真的。我当初在search的时候,发现还有一个链接也听不错的, 你可以去看看。现在的模板所执行的标准其实也几乎都是一样的,他的标准是w3的标准。
我这里再提一个免费工具,可以提供另外一种连接显示方式,具体方法参看主页,说的已经很详细了。
关于blogger就先说到这里。

My first post

It is my first time to force myself to write something, more exactly, I should record something everyday. I got a poor memory, but born in a info crash society, which means such kind of me will be forget by everybody. But I do not want, I should thank our some predecessors they invent computer, some produce internet, and other improve it, also, I should thank my parents, they took so much money on my studying on computer science. I can and should use this tool for my study or my life or I will be lost in such kind of society. So one afternoon, yes, last week, I encourage myself to create a blog which only need two utility function, one is can make labels, because I want to record my reading and thoughts often, other is tool. I use google and online dict because I am fresh man in computer and not good at English learning. My parents give me poor ability in language learning expect programming languages. So, this is my third wish in my blog, I can write in English a lot and I should do like this. The last reason for me to choose this services is that I need to go aboard uk for two year. This blog can show in different language, I want a fast-speed web, if not, I can not bear. So I choose google again. After registration, I find I can do anything on this, change template, even write by myself. So I try to write my code, before this, actually I did some web building, but all these work are done by certain software, such as Dreamware, Flash and firework, even Photoshop. These tools are designed for expert and advanced usage, but I am a new man, so I should using code, my original purpose is to using it anywhere and anytime and in any computer, I should remove flash because it is too slow, remove beautiful image since they are two large, and then only leave text and basic color. I wear glasses, but still need to face to scream everyday, what I should do, see some green sometime to relax, maybe stupid, but I did it. This is my own spaces for record, so I do not plan to publish to public. It seems my USB become portable, that is summer why I use blog. Ok, many mistake, some are really stupid, if somebody ready them and catch these bug, please comment ot email to me.