Friday, March 11, 2011

Photoshop retouching images (c) cut image


Crop Image

Once you've scanned an image and open in Photoshop, you can be polished. Start, you get to use cutting tools to cut the appropriate size image so that it can fit its design space.

1. In the rectangular marquee tool button () to keep with the mouse button, then drag to the () and select. And then double-click the crop tool to display its options palette, select Fixed Target Size (repair target size), enter the required image size -3.75 "脳 6".



2. The following drag the marquee around the image to confirm, including the top of the tower and inside the lower right corner of Gondola orange tarpaulin. Note that when you drag the marquee, it always maintain the same proportion as you enter the size.
Because the photo is somewhat distorted in the scanning, and now use the new size before you need to use cutting tools to get it straight.
3. Move the pointer to cut the marquee outside, it clockwise until the marquee and drag the image in parallel.
4. To place the pointer inside the crop marquee, drag it right until the marquee and the image on the right with Qi.

聽聽聽聽聽聽聽聽聽聽 聽聽聽聽聽聽聽聽聽聽聽聽 聽聽聽聽聽 聽聽聽

Initial crop rotation frame marquee marquee mobile

5. If necessary, drag the handle to the right corner handle marquee the size of the fine-tuning.
6. Press the Enter key, the image is finished cutting.



Marquee Marquee cutting fine-tuning

7. Select File> Save, save the file.










Hot Science EDUCATION



Using De EXTERMINATE rabbits annoying ads RMVB movies



what is ntdll.dll



M2TS to WINDOWS Movie Maker



First job out of the ivory tower beginning how the election



Describe the C # call an external process



Prerelease Download ATi Catalyst 5.5



My Favorite Games Kids



M4V to WMV



VBScript ReDim statement



Recommend Office Suites And Tools



VOB To MOV



College student hidden hard to guarantee the right to life and health worries



Monday, October 18, 2010

Compilation of various source - alarm


cseg segment para public''code''
org 100h
alarm proc far

; Memory-resident program to intercept the timer interrupt and display the
; System time in the upper right-hand corner of the display.
; This program is run as''ALARM hh: mm x'', where hh: mm is the alarm time and
; X is''-'' to turn the display off. Any other value of x or no value will
; Turn the clock on

intaddr equ 1ch * 4; interrupt address
segaddr equ 62h * 4; segment address of first copy
mfactor equ 17478; minute conversion factor backup bin bin_old conf config crawler.tar.gz crawler_bin.tar.gz data eshow eshow_sitemap.html generate.sh google.html google.html.md5 log maint news: 10 news: 11 news: 12 news : 13 news: 14 news: 15 news: 16 news: 17 news: 18 news: 2 news: 3 news: 4 news: 5 news: 6 news: 7 news: 8 news: 9 outboundLinksMgr.sql seeds sitemap.html svn tasks tmp xml2dict-2008.6-tar.gz xml2dict-read-only 16
whozat equ 1234h; signature
color equ 14h; color attribute

assume cs: cseg, ds: cseg, ss: nothing, es: nothing
jmp p150; start-up code

jumpval dd 0; address of prior interrupt
signature dw whozat; program signature
state db 0;''-'' = off, all else = on
wait dw 18; wait time - 1 second or 18 ticks
hour dw 0; hour of the day
atime dw 0ffffh; minutes past midnite for alarm
acount dw 0; alarm beep counter - number of seconds (5)
atone db 5; alarm tone - may be from 1 to 255 - the
; Higher the number, the lower the frequency
aleng dw 8080h; alarm length (loop count) may be from 1-FFFF

dhours dw 0; display hours
db'':''
dmins dw 0; display minutes
db'':''
dsecs dw 0; display seconds
db''-''
ampm db 0;''A''or''P''for am or pm
db''m''

tstack db 16 dup (''stack''); temporary stack
estack db 0; end of stack
holdsp dw 0; original sp
holdss dw 0; original ss

p000:; interrupt code
push ax; save registers
push ds
pushf

push cs
pop ds; make ds = cs
mov ax, wait; check wait time
dec ax; zero?
jz p010; yes - 1 second has elapsed
mov wait, ax; not this time
jmp p080; return

p010: cli; disable interrupts
mov ax, ss; save stack
mov holdss, ax
mov holdsp, sp
mov ax, ds
mov ss, ax; point to internal stack
mov sp, offset estack
sti; allow interrupts

push bx; save other registers
push cx
push dx
push es
push si
push di
push bp

mov ax, 18; reset wait time
mov wait, ax

mov al, state; are we disabled?
cmp al ,''-''
jnz p015; no
jmp p070

p015: mov ah, 0; read time
int 1ah; get time of day
mov ax, dx; low part
mov dx, cx; high part
mov cl, 4
shl dx, cl; multiply by 16
mov bx, ax
mov cl, 12
shr bx, cl; isolate top 4 bits of ax
add dx, bx; now in upper
mov cl, 4
shl ax, cl; multiply by 16
mov bx, mfactor; compute minutes
div bx; minutes in ax, remainder in dx
cmp ax, atime; time to sound the alarm?
jnz p020; no
call p100; yes - beep the speaker twice
push ax
mov ax, acount; get beep count
dec ax; down by 1
mov acount, ax; save beep count
cmp ax, 0; is it zero?
jnz p018; no - keep alarm on
mov ax, 0ffffh; turn off alarm
mov atime, ax
p018: pop ax

p020: mov dsecs, dx; save remainder
mov bx, 60; compute hours
xor dx, dx; zero it
div bx; hours in ax, minutes in dx
mov dmins, dx; save minutes

cmp ax, 0; midnight?
jnz p030; no
mov ax, 12; yes
jmp p040a; set am

p030: cmp ax, 12; before noon?
jb p040a; yes - set am
jz p040p; noon - set pm
sub ax, 12; convert the rest
p040p: mov bl,''p''
jmp p040x

p040a: mov bl,''a''

p040x: mov ampm, bl
aam; fix up hour
cmp ax, hour; top of the hour?
jz p060; no

mov hour, ax
call p120; beep the speaker once

p060: add ax, 3030h; convert hours to ascii
xchg ah, al
mov dhours, ax

mov ax, dmins; get minutes
aam
add ax, 3030h; convert to ascii
xchg ah, al
mov dmins, ax

mov ax, dsecs; get seconds (remainder)
xor dx, dx
mov bx, 60
mul bx
mov bx, mfactor
div bx; seconds in ax
aam
add ax, 3030h
xchg ah, al
mov dsecs, ax

xor ax, ax; check monitor type
mov es, ax
mov ax, es: [410h]; get config byte
and al, 30h; isolate monitor type
cmp al, 30h; color?
mov ax, 0b000h; assume mono
jz p061; its mono

mov ax, 0b800h; color screen address

p061: mov dx, es: [463h]; point to 6845 base port
add dx, 6; point to status port

mov es, ax; point to monitor
mov bh, color; color in bh
mov si, offset dhours; point to time
mov di, 138; row 1, col 69
cld
mov cx, 11; loop count

p062: mov bl, [si]; get next character

p063: in al, dx; get crt status
test al, 1; is it low?
jnz p063; no - wait
cli; no interrupts

p064: in al, dx; get crt status
test al, 1; is it high?
jz p064; no - wait

mov ax, bx; move color & character
stosw; move color & character again
sti; interrupts back on
inc si; point to next character
loop p062; done?

p070: pop bp; restore registers
pop di
pop si
pop es
pop dx
pop cx
pop bx
cli; no interrupts
mov ax, holdss
mov ss, ax
mov sp, holdsp
sti; allow interrupts

p080: popf
pop ds
pop ax
jmp cs: [jumpval]

p100 proc near; beep the speaker twice
call p120
push cx
mov cx, 20000
p105: loop p105; wait around
pop cx
call p120
push cx
mov cx, 20000
p106: loop p106; wait around
pop cx
call p120
ret
p100 endp

p120 proc near; beep the speaker once
push ax
push cx
mov al, 182
out 43h, al; setup for sound
mov al, 0
out 42h, al; low part
mov al, atone; get alarm tone
out 42h, al; high part
in al, 61h
push ax; save port value
or al, 3
out 61h, al; turn speaker on
mov cx, aleng; get loop count
p125: loop p125; wait around
pop ax; restore original port value
out 61h, al; turn speaker off
pop cx
pop ax
ret
p120 endp

p150:; start of transient code
mov dx, offset copyr
call p220; print copyright
mov ax, 0
mov es, ax; segment 0
mov di, segaddr +2; this program''s prior location
mov ax, es: [di]; get prior code segment
mov es, ax; point to prior program segment
mov di, offset signature
mov cx, es: [di]; is it this program?
cmp cx, whozat
jnz p160; no - install it
call p200; set state & alarm
int 20h; terminate

p160: mov di, segaddr +2; point to int 62h
mov ax, 0
mov es, ax; segment 0
mov ax, ds; get current ds
mov es: [di], ax; set int 62h
mov si, offset jumpval
mov di, intaddr; point to timer interrupt
mov bx, es: [di]; get timer ip
mov ax, es: [di +2]; and cs
mov [si], bx; save prior ip
mov [si +2], ax; and cs
mov bx, offset p000
mov ax, ds
cli; clear interrupts
mov es: [di], bx; set new timer interrupt
mov es: [di +2], ax
sti; set interrupts
push ds
pop es
call p200; set state & alarm
mov dx, offset p150; last byte of resident portion
inc dx
int 27h; terminate

p200 proc near; set state & alarm
mov si, 80h; point to command line
mov ax, 0
mov di, 0ffffh; init hours
mov bh, 0
mov ch, 0
mov dh, 0;: counter
mov es: [state], bh; turn clock on
mov cl, [si]; get length
jcxz p210; it''s zero

p203: inc si; point to next char
mov bl, [si]; get it
cmp bl ,''-''; is it a minus?
jnz p204; no
mov es: [state], bl; turn clock off
push dx
mov dx, offset msg3; print msg
call p220
pop dx
jmp p206

p204: cmp dh, 2; seen 2nd colon?
jz p206; yes - ignore seconds
cmp bl ,'':''; colon?
jnz p205; no
inc dh
cmp dh, 2; second colon?
jz p206; yes - ignore seconds
push cx
push dx
mov cx, 60
mul cx; multiply current ax by 60
pop dx
pop cx
mov di, ax; save hours
mov ax, 0
jmp p206
p205: cmp bl,''0''
jb p206; too low
cmp bl,''9''
ja p206; too high - can be a problem
sub bl,''0''; convert it to binary
push cx
push dx
mov cx, 10
mul cx; multiply current value by 10
add ax, bx; and add latest digit
pop dx
pop cx
p206: loop p203; done yet?
cmp di, 0ffffh; any time to set?
jz p210; no
add ax, di; add hours
cmp ax, 24 * 60
jb p209; ok
mov dx, offset msg1; print error message
call p220
jmp p210

p209: mov es: [atime], ax; save minutes past midnight
mov ax, 5
mov es: [acount], ax; set alarm count
mov dx, offset msg2; print set msg
call p220
p210: ret
p200 endp

p220 proc near; print message
push ax
mov ah, 9
int 21h
pop ax
ret
p220 endp

copyr db''Alarm - Clock'', 10,13 ,''$''
msg1 db''Invalid time - must be from 00:00 to 23:59'', 10,13 ,''$''
msg2 db''Resetting alarm time'', 10,13 ,''$''
msg3 db''Turning clock display off'', 10,13 ,''$''

alarm endp
cseg ends
end alarm







Recommended links:



WINGATE FAQ



Good Ad Blockers



EU: RFID is still unbalanced relationship between the pros and cons



Sunny CHEN wins on: From the opening practice game against Daohao value-added internal strength



Secretary, Ministry of Industry and consumer ZHANG cordial meeting with President of CENTRAL Best In



MKV To DivX



Opening .pst Files Without Outlook



Storage Games Kids



Procurement of essential personnel of the five quality



Looking for a breakthrough signing strangers



Easy to use Adventure And Roleplay



ASP.NET 2.0 at the same time to prevent the same user login



Simple Games Action



Japanese rebirth



MKV To MOV



MPG to Flash



Monday, October 11, 2010

Digital Home DIY



Due to different housing, different needs, different individual design, the need for intelligence is also high and low, and because of our intelligent building market is in a stage of development, there are still many problems, such as the overall level of technology is not high , uneven regional development, low levels of industrialization, was not related to technology products to meet market demand and a reasonable delay of the contradictions and so on remain to be resolved; some vendors of products and programs are somewhat mixed; some of the real estate business Smart Home are just some packaging concepts.
Also, because each family income level, a number of different interest and hobbies, is selected as an important basis for intelligent home. In general, choose the professional manufacturer, can be rich in options, but also can be customized to achieve the digital home DIY. For example, the intelligent all-powerful remote control Zarva can home lighting and electrical appliances for centralized wireless control, modified time slot without Zaoqiang, as long as ordinary switch intelligent switch can be replaced.
How can we build a home for their smart then? According to related experts, families intelligent building should be the spirit of "practical-based, appropriate advance" principle, according to their needs and spending power, select a different solution: To facilitate the understanding of all of the smart home, the following order the first professional digital home vendors Zarva Digital (www.zarva.com) of several typical cases, for your reference.

160m2 of Sanshiliangting (well-off families - convenient and comfortable)
This is a comfortable, more suitable for three or five homes. Feature is not very big investment, mainly in a variety of useful functions mainly.

System function
1, remote control lighting and lighting for local implementation of the profile
2, household appliances, lighting, centralized control
3, household appliances, lighting and conditions control the combination of control
4, household appliances, lighting, remote control
5, read to inform communities
6, the family voice
7, video intercom
8, gas leak alarm

Implementation Scheme
This is a residential home based intelligent system solutions, in the community management part of the distribution server and the cell configuration software, in the family need to cultivate the following:
1 position in the living room near the door placed in the controller and the intelligent cable box set the one specific location, see diagram.


2, living room with a versatile remote control, a remote control scenario, a wireless servomotor.
3 bedroom with a versatile remote control, a wireless servomotor.
4, a scenario study using remote control, a wireless servomotor.
5, using an all-round children's room remote control, a wireless servomotor.
6, intelligent switch or intelligent socket as follows: living room, including restaurants, two-bit smart switch 2, smart socket, study, double-switch a smart, intelligent socket two bedroom unit a smart switch, smart socket 3, children's room A smart switch unit can only plug the three, kitchen, a double-digit intelligent switch, bathroom, two double-digit intelligent switch.
7, video intercom and intelligent controller unit in front of the video intercom door machine to achieve.
8, in the kitchen, a gas leak sensor arrangement, and connected to the intelligence in the controller.
300 m2 villa (middle-class families - luxury) Villa diagram is as follows:








System function
1, remote control lighting and lighting for local implementation of the profile
2, household appliances, lighting, centralized control
3, household appliances, lighting and conditions control the combination of control
4, household appliances, lighting, remote control
5, read to inform communities
6, the family voice
7, video intercom
7, gas leak alarm

Implementation Scheme
This is a single family of intelligent system solutions do not provide the same community-related features, such as cell notification, etc., within the family need to cultivate the following:
1, in the first floor near the stairs in the controller and the installation of Smart box set of lines, another scene in the restaurant to configure a remote control, the specific location, see diagram.
2, first floor living room with a versatile remote control, a remote control scenario, a wireless servomotor.
3, second floor bedroom with a versatile remote control, a remote control scenario, a wireless servomotor.
4, third floor bedroom with a versatile remote control, a wireless servomotor, a scenario study, the use of remote control, a wireless servomotor.
5, intelligent switch or intelligent socket as follows:
On the first floor living room including dining, 2 double-intelligent switch and intelligent socket 2;
On the second floor smart switch 2 bedroom units, intelligent socket 4;
Second floor family room double-switch a smart, intelligent socket 2;
On the second floor gym, a two-bit smart switch;
Third floor master bedroom, smart switch unit 2, smart socket 3;
Kitchen, a double-digit intelligent switch, bathroom, double-intelligent switch 4, smart socket 3''intelligent switch 4 corridor;
6, video intercom installed in the villa entrance door machine.
7, a gas leak in the kitchen layout sensors can switch one bathroom, two double-digit intelligent switch, and controller connected to the Intelligence.


The Smart Home program for home environment, home device to provide a shared access centers to realize the smart home environment and equipment management, remote management, centralized management and resource sharing. Achieve arbitrary appliance controls, convenient and efficient information services, personalized security measures. For example Zhaohua home wireless control system remote control all-round variety of consumer electronics devices can be set in a series of button operation, when we want to watch VCD's time in the past to go through a turn on the TV, amplifier and power 鈫?the TV VCD machine will transition to Video 鈫?state power amplifier options for VCD 鈫?Play VCD and other steps. Is only one action: press our custom "look VCD key", you can complete all the steps above.
Meanwhile, the scene can realize remote control of lighting scenarios, the user can control the learning needs of the remote scene lighting condition code to control all the lights to adjust to the specified state and focus on a key, then press the specified key at any time to achieve control of lighting scenes or immediate family ---- brightly lit room or instant gentle into the night; or to the bedroom wall and a half out, the living room the lights ... ... no need to open or turn off the lights one by one , all lighting problems can be solved once situations control. When we leave the house when Zarva intelligence community in the smart home system controller will start its state of security equipment and sent to residential electric alarm server. If the home was broken into and a fire or gas leak, intelligence, information sent to the cell controller immediately to electronic alarm server, the same time, pre-set phone to notify the information to us.
Moreover, these programs are not unattainable. For example, a 100 square meters of housing, if the use of smart home products Zarva Digital transformed into a primary minimum configuration of the "smart house", only a few thousand dollars.





相关链接:



DVR-MS to MPEG



MKV TO Xbox 360



is there a reverse phonebook finding cell phone



QuickTime TO MPEG



Thursday, September 23, 2010

Review: Liu's "marathon" Life



August 7, 2007 afternoon, the Chang'an Club, high-end Finance Forum - "Thought feast" of the "Maestro", I had the honor to see a great admirer of Mr. Liu. At the meeting, Mr. Liu that modest, friendly, modest demeanor impressed me.

A few days ago, Lenovo Group (0992.HK) released fiscal year 2007 to 2008 one-quarter results show, the company achieved operating income of 3.9 billion U.S. dollars, up 13%, and implemented since the acquisition of IBM PC-round profitability around the world, Company pre-tax profit reached 78 million U.S. dollars, net profit of 67 million U.S. dollars. This marks Lenovo in the global exchange standard, hand the Olympic Games, after the successful acquisition of IBM PC, has ushered in a new strategic turning point, successfully achieved leapfrog development - international, and is expected to help the 2008 Olympic Games, Samsung style to achieve The new leap.

A master at that day, Liu voiced his success with the Lenovo Famen - "long-distance running." Indeed, in the past 20 years, too many companies develop faster than the association, there are too many entrepreneurs prospered than Liu. However, many entrepreneurs and enterprises in the sprint, then it stalled for various reasons, even collapsed.

So, what kind of a leader Liu has 20 years of distance runners Lenovo? If more than physical, more than technology, more than courage, more than qualifications, specific energy than the management ideology, Liu higher than in Chinese business person is not specified minority. However, Liu to become the business world, "leading authority" that he had so explained, he said, a pearl and some portraits, some people are not pearls, not as shiny as pearls, but he is a line, can those pearls strung. Business leaders must know their value - you are the line.

In my opinion, Liu was able to be strung piece of Li Qin, Ni Guangnan, Sun Hongbin, Guo Wei, Yang, Zhu Linan, Ms Mary Ma, Chen Guodong, etc. These "pearls" and "line" because of its depth, he established can support his philosophy of life long-term success.

Liu had contacts with the people, not people do not praise his humble, friendly man demeanor. Mr. Qin Shuo writes in his article: "with him, you definitely do not feel that his reputation and prestige from the pressure, Liu 'low' of this step, you brighter future. This is the Chinese culture, called modesty, self-suppression. "

In the August 7 meeting at the Masters, and his dialogue with Taiwan's entrepreneurs are COFCO chairman of Ning, Pan Gang, chairman of Yili Group, General Manager Mao Zhong Fang too kitchenware group, but he is very modest way from time to time young entrepreneurs to start than his speech. In particular, the details worth mentioning is that when Mr. Ning offensive to look at state-owned enterprises in the past, when Mr. Liu Any reference in state-owned enterprises is insufficient, we must first seek a friendly manner Ning understanding.







Recommended links:



DivX to iPod



3 Accounting in a drama, colorful festival Foshan accounting



Comments Icons



ASF to MPG



The face of the new law, HR policies IN place to deal with the



View from the MIS MIS success or failure of their OWN



Taiwan's UMC case: killing monkey to scare?



Wei Zhe: Interpretation of the four key words Alibaba 2008



novice school Linux shell to delete the directory



Young professionals entering the workplace to learn the three key issues



OGM to AVI



"Reverse flow" into "bad money drives out good money" dilemma



Articles About Art - Screen Savers



Longhorn CAN be run on some old computer



Domain name Registration norms into their public phase of consolidation



Thursday, September 16, 2010

Hide IP address detection and Experience


Formal various "hack" before, hackers will take all means to detect (you can also say "reconnaissance") each other's host information in order to determine what the most effective way to use their own purposes. To see how hackers learn the most basic network information - each other's IP address; and users how to prevent leakage of your own IP

First, access to IP

"IP" Net users as an important marker, a hacker first need to know. Method of obtaining more, hackers will be the situation for different networks to different methods, such as: use the Ping command in the LAN, Ping each other in the name of the network acquired IP; the Internet using IP version of the QQ displayed directly. The most "cow", is the most effective way is to intercept and analyze each other's network data packets. Using Windows 2003's Network Monitor to capture network data packets, may be more difficult for ordinary users to understand the hex code of 16, while the knowledge for understanding the network hackers, they can find and directly through the software analysis intercepted IP packet header information, then that information about a specific IP.

Second, hide IP

Although the method of multiple IP surveillance, but users can hide IP's method is also diverse. Take the deal with the most efficient "packet analysis" is concerned, it can be installed to automatically remove the sending IP packet header information of the "Norton Internet Security 2003". But using the "Norton Internet Security" some shortcomings, such as: it serious drain on resources and reduce computer performance; in some forums, or visit the Web site will be affected; not suitable for Internet cafe users and so on.

Now individual users hide IP using the most popular method is to use the proxy should be, because using a proxy server, "redirect service" will send out packets been changed, resulting in "packet analysis" methods fail. Some easy to leak user IP network software (QQ, MSN, IE, etc.) support the use of proxy connect Internet, in particular, QQ use "ezProxy" connection such as proxy software, IP version of QQ can not show the IP address. Here the author describes a relatively simple proxy for individual software users - newbies IP hidden devices, as long as the "proxy server" and "proxy server" enter the correct proxy server address and port, you can use on the http proxy, QQ more suitable as IE and IP-leak case.

But to use a proxy server, also has some disadvantages, such as: will affect the speed of network communication; need to network a computer can provide proxy capabilities, if the user can not find such a proxy server can not use proxy (Find proxy server, You can use "proxy hunter" and other tools scan a network proxy server).

Although the agent can effectively hide the users IP, but advanced hacker can bypass the proxy, find each other's real IP address of the circumstances under which the user which method to use hide IP, also because in the circumstances.






Recommended links:



The accounting date of establishment of a free report - 1.1. Understanding the function of several r



Articles about Teaching And Training Tools



e-cology In the Pan Micro Series 27



Mito Xiu Funeral Flowers To Create Poignant Picture Of Non-mainstream



Premier Web Servers



m2ts YOUTUBE



blackberry divx



Best Inventory And Barcoding



Bonus Of Sight [2]



ts format



Policy of Spring



Clipboard Tools reviews



Fireworks produced blue and white porcelain button



Master is not highly educated does not mean that high-income elite



"Deceiving" Or "enlightened Approach"



Competitive Intelligence, the fourth competition



Vob to youtube



Wednesday, July 28, 2010

Ulead SmartSaver Pro 3.0 Cheats bit of communication (12)



3. Production Zhe Zhao

Well, a website image optimization is easy to get up too! Here we will introduce the optimization mode, the mask option. Through the mask can be JPG, GIF or PNG to create a transparent area, you can choose a color designated transparent areas can also be highlighted by an image mask to the image area and a transparent color (default is the end user to select the image color) to replace the region, you can use the toolbox on the "Add transparent zone" straw to add transparent areas using the "erase the transparent region" rubber to erase the transparent area.

Here, we do a GIF animation and a still photo to make a form like box, promising ah.

First: In Photoshop, create a picture as the box and the Memory of six letters image, and then Ulead Gifanimator animation wizard in the box below as to add subtitles Memory rolling.



Figure 018: a good image processing in Photostop



Figure 019: Make a good roll in the Gifanimator subtitles







Recommended links:



Swf Files



Avc player



PREMIER Screen Savers



Trojan horse is how to WORK



Wizard Vertical Market Apps



"Sacred 2 Fallen Angel" mission concert details



He Weifang: Why Do I Write An Open Letter



Carrefour Business Golden Rule



flv to Avi



.swf File



More than to see PR value of the exchange of links matters need attention



MR. Chen will be back in the more terrible



IM: Decisive Force's Crowded



Thursday, July 15, 2010

On the open source Jetty Servlet Container



Jetty is a Java language using the open source servlet container, it is Java-based web content such as JSP and servlet to provide operating environment. Jetty servlet container as an optional feature is an additional, but it really is because it is known as a can be embedded into other Java code in the servlet container designed. This means that Jetty development team will provide as a set of Jar files out, so you can code your own will into an object instance of the servlet container and can manipulate the container object.

Jetty servlet container in not really a new face, it has emerged from 1998. Jetty is released under the Apache 2.0 open source protocol, you can free software and commercial software to use Jetty.

MyEclipse 6.5 below describes the whole process to use jetty.

Environment: Windows XP + JDK 1.6.11 + MyEclipse 6.5 + jetty-7.0.0pre3

1. Open myEclipse, new java project Jetty, and logs build webapps folder (and src at the same level), established under the src config, servlet and test folder in the webapps directory to establish manage the work as a web directory.

2. Will be $ (ROOT) jetty-7.0.0pre3lib three jar packages under the accession project classpath, the $ (Root): jetty-7.0.0pre3libjsp-2.1 of the four-jar package to join the project classpath, copy $ ( ROOT) jetty-7.0.0pre3etc under jetty.xml, webdefault.xml and realm.properties to srcconfig, the same copy $ (ROOT) jetty-7.0.0pre3contexts under the under the test.xml to srcconfig and renamed manage.xml.

3. Modify jetty.xml, manage.xml, these configuration files with jetty.xml, webdefault.xml and realm.properties path to srcconfig, and in the webapps / manage under the new index.jsp.

4. In the test directory under the new Start.java, the code is as follows:



1 import org.mortbay.jetty .*;
2
3 import java.io. *;
4
5 import org.mortbay.jetty.handler .*;
6
7 import org.mortbay.xml .*;
8
9 public class start (
10
11 public static void main (String args []) (
12
13 Server server = new Server (8080);
14
15 server.setHandler (new DefaultHandler ());
16
17 XmlConfiguration cfg = null;
18
19 try (
20
21 cfg = new XmlConfiguration (new FileInputStream (". / Src / com / greysh / config / jetty.xml"));
22
23 cfg.configure (server);
24
25 server.start ();
26
27 System.out.println ("Jetty Started ...");
28
29) catch (FileNotFoundException e) (
30
31 e.printStackTrace ();
32
33)
34
35 catch (IOException e) (
36
37 e.printStackTrace ();
38
39) catch (Exception e) (
40
41 e.printStackTrace ();
42
43)
44
45)
46
47) run the Start class, using IE to access http://localhost:8080/, click / manage ---> org.mortbay.jetty.webapp.WebAppContext @ 1275d39 (/ manage, file: / D: / Program% 20Files / MyEclipse% 206.5/workspace/Jetty/webapps/manage /), then you can successfully run the Jetty.
If you want to run in the Jetty servlet, operation is as follows: