maven 导致文件损坏的问题

1 :gzip格式打包时被损坏:





sun.awt.image.PNGImageDecoder$PNGException: crc corruption






Continue reading maven 导致文件损坏的问题

it-e-01 four kinds of computers

Computers are electronic devices that can follow instructions to accept input, process that
input, and produce information. There are four types of computers: microcomputers, minicomputers,
mainframe computers, and supercomputers.
Microcomputers, also known as personal computers, are small computers that can fit on a desktop.
Portable microcomputers can fit in a briefcase or even in the palm of your hand. Microcomputers are
used in homes, schools, and industry. Today nearly every field uses microcomputers.
One type of microcomputer that is rapidly growing in popularity is the portable computer,
which can be easily carried around. There are four categories of portable computers.
Laptops: laptops, which weigh between 10 and 16 pounds, may be AC-powered, battery-powered,
or both. The AC-powered laptop weighs 12 to 16 pounds. The battery-powered laptop weighs 10 to 15
pounds, batteries included, and can be carried on a shoulder strap.
Notebook PCs: notebook personal computers weigh between 5 and 10 pounds and can fit
into most briefcases. It is especially valuable in locations where electrical connections are not
available. Notebook computers are the most popular portable computers today.
Subnotebooks: subnotebooks are for frequent flyers and life-on-the-road types.[1] Subnotebooks
users give up a full-size display screen and keyboard in exchange for less weight. Weighting between
2 and 6 pounds, these computer fit easily into a briefcase.
Personal Digital Assistants: much smaller than even the subnotebooks. Personal Digital
Assistants (PDAs) weigh from 1 to 4 pounds. The typical PDA combines pen input, writing
recognition, personal organizational tools, and communication capabilities in a very small
Minicomputers, also knows as midrange computers, are desk-sized machines. [2]They fall into
between microcomputers and mainframes in their processing speeds and data-storing capacities.
Medium-size companies or departments of large companies typically use them for specific purposes.
For example, they might use them to do research or to monitor a particular manufacturing process.
Smaller-size companies typically use microcomputers for their general data processing needs, such as
Mainframe computers are larger computers occupying specially wired, air-conditioned rooms
and capable of great processing speeds and data storage. They are used by large organizations
business, banks, universities, government agencies—to handle millions of transactions. For
example, insurance companies use mainframes to process information about millions of policyholders.
Supercomputers are special, high-capacity computers used by very large organizations principally
for research purposes. Among their uses are oil exploration and worldwide weather forecasting.
In general, a computer's type is determined by the following seven factors:

The type of CPU. Microcomputers use microprocessors. The larger computers tend to use
CPUs made up of separate, high-speed, sophisticated components.
The amount of main memory the CPU can use. A computer equipped with a large
amount of main memory can support more sophisticated programs and can even hold several
different programs in memory at the same time.
The capacity of the storage devices. The larger computers systems tend to be equipped
with higher capacity storage devices.
The speed of the output devices. [3]The speed of microcomputer output devices tends to be
rated in terms of the number of characters per second (cps) that can be printed usually in tens
and hundreds of cps. Larger computers' output devices are faster and are usually rated at speeds
of hundreds or thousands of lines that can be printed per minute.
The processing speed in millions of instructions per second (mips). The term instruction
is used here to describe a basic task the software asks the computer to perform while also
identifying the data to be affected. The processing speed of the smaller computers ranges from 7
to 40 mips. The speed of large computers can be 30 to 150 mips or more, and supercomputers
can process more than 200 mips. In other words, a mainframe computer can process your data a
great deal faster than a microcomputer can.
The number of users that can access the computer at one time. Most small computers
can support only a single user, some can support as many as two or three at a time. Large
computers can support hundreds of users simultaneously.
The cost of the computer system. Business systems can cost as little as $500 (for a
microcomputer) or as much as $10 million (for a mainframe) and much more for supercomputer.

Continue reading it-e-01 four kinds of computers

it-e-02 web harvesting

As the amount of information on the Web grows, that information becomes ever harder to
keep track of and use. Search engines are a big help, but they can do only part of the work, and
they are hard-pressed to keep up with daily changes.
Consider that even when you use a search engine to locate data, you still have to do the
following tasks to capture the information you need: scan the content until you find the
information, mark the information (usually by highlighting with a mouse), switch to another
application ( such as a spreadsheet, database or word processor), paste the information into that

A better solution, especially for companies that are aiming to exploit a broad swath of data
about markets or competitors, lies with Web harvesting tools.
Web harvesting software automatically extracts information from the Web and picks up
where search engines leave off, doing the work the search engine can't. Extraction tools automate
the reading, copying and pasting necessary to collect information for analysis, and they have
proved useful for pulling together information on competitors, prices and financial data or all
There are three ways we can extract more useful information from the Web.
The first technique, Web content harvesting, is concerned directly with the specific content
of documents or their descriptions, such as HTML files, images or e-mail messages. Since most
text documents are relatively unstructured (at least as far as machine interpretation is concerned),
one common approach is to exploit what's already known about the general structure of
documents and map this to some data model.
The other approach to Web content harvesting involves trying to improve on the content
searches that tools like search engines perform. This type of content harvesting goes beyond
keyword extraction and the production of simple statistics relating to words and phrases in
Another technique, Web structure harvesting, takes advantage of the fact that Web pages
can reveal more information than just their obvious content. Links from other sources that point
to a particular Web page indicate the popularity of that page, while links within a Web page that
point to other resources may indicate the richness or variety of topics covered in that page. This
is like analyzing bibliographical citations— paper that's often cited in bibliographies and other
paper is usually considered to be important.
The third technique, Web usage harvesting, uses data recorded by Web servers about user
interactions to help understand user behavior and evaluate the effectiveness of the Web structure.
General access—pattern tracking analyzes Web logs to understand access patterns and
trends in order to identify structural issues and resource groupings.
Customized usage tracking analyzes individual trends so that Web sites can be personalized
to specific users. Over time, based on access patterns, a site can be dynamically customized for a
user in terms of the information displayed , the depth of the site structure and the format of the
resource presented.

Continue reading it-e-02 web harvesting

读The Definitive ANTLR Reference







'h' 'i' //匹配hi


'h' 'i'//匹配h i,不匹配hi[中间有空格的区别]



ANTLR中表示字符要用“’”单引号括起来,用‘(’ ‘)’来表示括号字符




The token buffer preserves the relative token order regardless of the token channel numbers.


WS : (' ' |'\t' |'\r' |'\n' )+ {skip();$channel=HIDDEN;} ; //这样将匹配丢到hidden chennel可行,那么不行需要再写其他的rule时总是要写WS匹配。例: WS?'hello' WS+ 'how' WS+ 'are' WS+ 'you' -->'hello' 'how' 'are' 'you'.

Method skip( ) in an embedded lexer rule action forces the lexer to throw
out the token and look for another.运行结果似乎是视而不见【抛弃】。





使用antlrworks时,如果出现警告,尽量消除它。尽量列举所有的情况而不要使用多个* ?来匹配。


line 12:15 no viable alternative at input 'xxx'


局部规则可能影响整个规则,特别对于+ *之类的泛匹配例如('a'..'z' | 'A'..'Z')+





rule = TOKEN+



[[...] [...]] 和 ((...) (...))

Continue reading 读The Definitive ANTLR Reference

it-e-03 Computer hardware

Computer hardware has four parts: the central processing unit (CPU) and memory, storage
hardware, input hardware, and output hardware.
The part of the computer that runs the program is known as the processor or central processing
unit (CPU). In a microcomputer, the CPU is on a single electronic component, the microprocessor
chip, within the system unit or system cabinet. The CPU itself has two parts: the control unit and
the arithmetic-logic unit. In a microcomputer, these are both on the microcomputer chip.
The Control Unit The control unit tells the rest of the computer system how to carry out a
program's instructions. It directs the movement of electronic signals between memory and the
arithmetic-logic unit. It also directs these control signals between the CPU and input and output
The Arithmetic-Logic Unit The arithmetic-logic unit, usually called the ALU, performs
two types of operations—arithmetic and logical. Arithmetic operations are, as you might expect,
the fundamental math operations: addition, subtraction, multiplication, and division. Logical
operations consist of comparisons. That is , two pieces of data are compared to see whether one is
equal to, less than, or greater than the other.
Memory Memory is also known as primary storage, internal storage, it temporarily holds
data, program instructions, and information. One of the most important facts to know about
memory is that part of its content is held only temporarily. In other words, it is stored only as
long as the computer is turned on. When you turn the machine off, the content immediately
vanish. The stored contents in memory are volatile and can vanish very quickly.
Storage Hardware [1]The purpose of storage hardware is to provide a means of storing
computer instructions and data in a form that is relatively permanent, that is, the data is not lost
when the power is turned off—and easy to retrieve when needed for processing.There are four
kinds of storage hardware: floppy disks, hard disks,optical disk,andmagnetic tape.
Floppy Disks Floppy disks are also called diskettes, flexible disks, floppies, or simply

disks. The plastic disk inside the diskette cover is flexible, not rigid. They are flat, circular pieces
of mylar plastic that rotate within a jacket. Data and programs are stored as electromagnetic
charges on a metal oxide film coating the mylar plastic.
Hard Disks Hard disks consist of metallic rather than plastic platters. They are tightly
sealed to prevent any foreign matter from getting inside. Hard disks are extremely sensitive
instruments. The read-write head rides on a cushion of air about 0.000001 inch thick. It is so thin
that a smoke particle, fingerprint, dust, or human hair could cause what is known as a head crash.
A head crash happens when the surface of the read-write head or particles on its surface contact
the magnetic disk surface. A head crash is a disaster for a hard disk. It means that some or all of
the data on the disk is destroyed. Hard disks are assembled under sterile conditions and sealed
from impurities within their permanent containers.
Optical Disks Optical disks are used for storing great quantities of data. An optical disk can
hold 650 megabytes of data—the equivalent of hundreds of floppy disks. Moreover, an optical disk
makes an immense amount of information available on a microcomputer. In optical-disk technology,
a laser beamalters the surface of a plastic or metallic disk to represent data. To read the data, a laser
scans these areas and sends the data to a computer chip for conversion.
Magnetic Tape Magnetic tape is an effective way of making a backup, or duplicate, copy of
your programs and data. We mentioned the alarming consequences that can happen if a hard disk
suffers a head crash. You will lose some or all of your data or programs. Of course, you can always
make copies of your hard-disk files on floppy disks. However, this can be time-consuming and may
require many floppy disks. Magnetic tape is sequential access storage and can solve the problem
mentioned above.
Input Hardware Input devices take data and programs people can read or understand and
convert them to a form the computer can process. This is the machine-readable electronic signals
of 0s and 1s. Input hardware is of two kinds: keyboard entry and direct entry.
Keyboard Entry Data is input to the computer through a keyboard that looks like a
typewriter keyboard but has additional keys. In this method, the user typically reads from an
original document called the source document. The user enters that document by typing on the
Direct Entry :Data is made into machine-readable form as it is entered into the computer,
no keyboard is used. Direct entry devices may be categorized into three areas: pointing devices
(for example, mouse, touch screen, light pen, digitizer are all pointing devices), scanning devices
(for example, image scanner, fax machine, bar-code reader are all scanning devices), and
voice-input devices.
Output Hardware Output devices convert machine-readable information into people-readable
form. Common output devices are monitors, printers, plotters, and voice output.
Monitors Monitors are also called display screen or video display terminals. Most monitors that
sit on desks are built in the same way as television sets, these are called cathode-ray tubes. Another type
of monitor is flat-panel display, including liquid-crystal display (LCD), electroluminescent (EL) display

and gas-plasma display. An LCD does not emit light of its own. Rather, it consists of crystal molecules.
[2]An electric field causes the molecules to line up in a way that alters their optical properties.
Unfortunately, many LCDs are difficult to read in sunlight or other strong light. A gas-plasma display is
the best type of flat screen. Like a neon light bulb, the plasma display uses a gas that emits light in the
presence of an electric current.
Printers There are four popular kinds of printers: dot-matrix, laser, ink-jet, and thermal.
Dot-Matrix Printer Dot-matrix printers can produce a page of text in less than 10 seconds
and are highly reliable. They form characters or images using a series of small pins on a print
head. The pins strike an inked ribbon and create an image on paper. Printers are available with
print heads of 9, 18, or 24 pins. One disadvantage of this type of printer is noise.
Laser Printer The laser printer creates dotlike images on a drum, using a laser beam light
source. [3]The characters are treated with a magnetically charged inklike toner and then are
transferred from drum to paper. A heat process is used to make the characters adhere. The laser
printer produces images with excellent letter and graphics quality.
Ink-Jet Printer An ink-jet printer sprays small droplets of ink at high speed onto the
surface of the paper. This process not only produces a letter-quality image but also permits
printing to be done in a variety of colors.
Thermal Printer A thermal printer uses heat elements to produce images on heat-sensitive
paper. Color thermal printers are not as popular because of their cost and the requirement of
specifically treated paper. They are a more special use printer that produces near photographic
output. They are widely used in professional art and design work where very high quality color is
Plotters Plotters are special-purpose output devices for producing bar charts, maps, architectural
drawings, and even three-dimensional illustrations. Plotters can produce high-quality multicolor
documents and also documents that are larger in size than most printers can handle. There are four types
of plotters: pen, ink-jet, electrostatic, and direct imaging.
Voice-Output Devices Voice-output devices make sounds that resemble human speech but
actually are pre-recorded vocalized sounds. Voice output is used as a reinforcement tool for
learning, such as to help students study a foreign language. It is used in many supermarkets at the
checkout counter to confirm purchases. Of course, one of the most powerful capabilities is to
assist the physically challenged.

Continue reading it-e-03 Computer hardware

skype4java :

skype4java 地址:

使用jni封装skype com+接口


Win32Connector::protected void initializeImpl() 方法有些问题,其意图是如果没又找到skype库就从包里面解压缩skype.dll到临时文件夹下,但是我不知道为什么作者要用zip遍历,而不是使用类加载器获得资源来解压缩。


try {
        } catch(Throwable e) {
            try {
                if(!ConnectorUtils.checkLibraryInPath(LIBFILENAME)) {
                    String dllPath;
                    String tmpDir = System.getProperty("");
                    if(!tmpDir.endsWith("" + File.separatorChar)) {
                        tmpDir = tmpDir + File.separatorChar;
                    dllPath = tmpDir + LIBFILENAME;
                    File dll = new File(dllPath);
                    if(!dll.exists()) {
                        if(!dll.exists()) {
                            throw new RuntimeException("can't load " + dllPath);
            } catch(Exception e1) {
                throw new RuntimeException(e1);

private void extractDll(File destFile) {
        ClassLoader loader = Thread.currentThread().getContextClassLoader();
        InputStream input = loader.getResourceAsStream(LIBFILENAME);
        FileOutputStream output = null;
        try {
            output = new FileOutputStream(destFile);
            byte[] buffer = new byte[1024 * 4];
            long count = 0;
            int n = 0;
            while(-1 != (n = {
                output.write(buffer, 0, n);
                count += n;
        } catch(Exception e) {
            throw new RuntimeException(e);
        } finally {
            try {
                if(null != input) {
            } catch(IOException e) {
            try {
                if(null != output) {
            } catch(IOException e) {


winp.jar 检查是否running

swt.jar 借用OS基础功能

Continue reading skype4java :



出于成本和便捷因素的考虑,目前很多公司和消费者都已经开始使用VoIP的电话服务。根据SearchVoIP网站在2007年6月份进行的一项调查,纯IP PBX系统在2007年第一季度的销售比上一季度上涨了76%。







然而Internet上的主机数量不断稳定增长,最终我们必然需要扩展更大的地址空间。除了巨大的地址容量之外,IPv6还通过IPsec这一基础的协议组件提供更好的安全性能。目前像Windows Vista、Windows Server 2008、Mac OS X 10.3以及其他最新的操作系统都已经默认支持IPv6,这些操作系统的支持可以看作IPv6已经具备了腾飞的基础。



虚拟化已经出现一段时间了,但目前它才真正开始成熟。微软即将推出的Windows Server 2008服务器操作系统将会包含其大力研发的Windows hypervisor技术(Viridian);而VMWare也提供了免费的VMWare Server,红帽和SuSE也计划在下一版本的服务器产品中包含Xen hypervisor技术。我们可以判定,虚拟机的概念将会在未来几年上升到一个全新的阶段。



代表了下一代以太网的Web 2.0采用了SaaS(Software as a Service)模式,它通过互联网提供软件服务,而不需要在每个用户的电脑里单独安装应用程序。一些IT专家已经警告称SaaS将会完全取代企业内IT 管理员的工作,但更广为接受的说法则称SaaS将会把IT管理员从繁重的配置和维护工作中解脱出来,而将精力更加集中地投入到对全局的计划以及融合上。







学习与VPN技术相关的不同的技能十分重要,比如SSL VPN技术就十分有用。我们可以利用健康监测以及隔离远程客户端阻止那些未达到安全要求最低准则的电脑接入局域网,以免其对网络产生危害。



未来一定会出现更快速也更安全的无线技术。你需要了解802.11n,这一新的标准目前还处于开发阶段,但已经确定会在2008年底正式公布。 802.11n能够提供典型的74Mbps吞吐量,最高可达248Mbps,另外它的有效半径也远高于目前的802.11a/b/g标准,可以达到70 米。



然而出于应用软件的原因或者个人喜好,其他用户将会继续使用Windows,另外还有很多用户在混合着使用苹果电脑,尤其是在图形处理领域。 仅仅精通一种平台在今后是不会成为IT专家的;你需要周游于不同的操作系统之间,解决各种问题。

随着VoIP越来越流行,统一通信的概念——不同通信技术的汇合,诸如电子邮件、语音消息、文本短信以及传真等的汇合—— 将会成为下一波技术浪潮的热点。用户今后可以从一个单独的界面上接入所有的通信设备,比如从各种不同的设备上接入电子邮箱,这些设备可以是台式电脑、笔记本电脑、智能手机或者PDA、甚至传统电话。




802.11b 2.4g频段 最大11m/s 一般6.5m/s。

Continue reading [转]未来五年可能流行的十大网络技术

it-e-04 information appliance

An "information appliance (IA)" is any device that can process information, signals,
graphics, animation, video and audio; and can exchange such information with another IA device.
Typical devices could be smartphones, smartcard, PDAs, and so on. Digital cameras, ordinary
cellular phones, set-top boxes, and LCD TVs are not information appliances unless they become
capable of communications and information functions. Information appliances may overlap in
definition or are sometimes referred to as smart devices, mobile devices, wireless devices,
internet appliances, web appliances, handhelds, handheld devices or smart handheld devices.
Early Appliances For a short while during the middle and late 1980s there were a few
models of simple electronic typewriters fitted with screens and some form of memory storage.
These devices had some of the attributes of an information appliance. One of these dedicated
word processor machines, the Canon Cat was actually designed by Jef Raskin as the forerunner
of the idea of the information appliance.
Information appliances tend to be consumer devices that perform only a few targeted tasks
and are controlled by a simple touchscreen interface or push buttons on the device's enclosure.
Open Standard Protocols In an ideal world, any true information appliance would be able to communicate with any other information appliance using open standard protocols and
technologies, regardless of the maker of the software or the hardware. The communications
aspects and all user interface elements would be designed together so that a user could switch
seamlessly from one information appliance to another.

Continue reading it-e-04 information appliance

myeclipse maven web项目建立

开始建立一个gernaeral project,





项目上右键添加web属性,并指定webv root文件夹和context








关于pom中对war plugin的配置此处不叙.



    <attribute name="webrootdir" value="/src/main/webapp" />

Continue reading myeclipse maven web项目建立


Total views.

© 2013 - 2022. All rights reserved.

Powered by Hydejack v6.6.1