it-e-42 Algorithm Design and Implementation

This course introduces a set of fundamental design principles and problem-solving techniques
for the construction and implementation of computer algorithms. Problem solutions are developed
in a design language such as Pseudocode and then coded in a high-level structured programming
language. (Consult the Computer Science Department for the language currently in use.) Topics
such as problem specification, top-down design with stepwise refinement, standard data types,
control structures, subprograms, modular design, and parameter passing are presented through a
study of specific example algorithms. Style, documentation, solution robustness, and conformance
with specifications are emphasized throughout.
Prerequisites: High school algebra I & II.

The purpose of this course is to present a coherent set of tools and techniques for the
development of computer solutions to simple problems in data manipulation and report
generation. Upon completion of the course, a student should be able to: analyze a problem
statement for completeness and clarity; use the method of top-down, modular, structured design
to develop a hierarchy chart (structure chart) and a set of Pseudocode modules for a problem
solution; convert this solution into source code in the designated high-level language in
accordance with a well-defined set of style rules; debug and test the program; and provide clear
documentation for the result.

the "problem-solving universe"
operational definition of computer (specifically, electronic digital stored-program
components of a typical computer
fundamental computer capabilities (read, write, store, compute, compare)
formulating precise specifications for a problem and its solution
preconditions and post conditions

specification of user requirements in measurable terms
tools for algorithm development
algorithm design languages (Pseudocode, flowcharts)
top-down design and stepwise refinement (including contrast with bottom-up
structure charts (hierarchy charts)
subprograms (procedures, functions) and the modular design of algorithms
standard control structures:
sequence, decision, loop (pre-test, post-test, count- controlled), module
nested control structures
decision tables, decision trees
identifiers, variables, constants, expressions
typing and structuring of data
standard data types:
numeric (integer vs. real)
character, character string
file type (for sequential text files)
record types
array types
primitive data structures:
simple variables
record variables
character strings
some common algorithmic techniques
the Initialize/Process/Terminate (IPT) paradigm
file operations (create, open, close, read, write)
sequential processing of data records
end-of-file testing
report generation (headers, footers, page breaks, simple control breaks)

use of counters and accumulators
numeric computations (evaluating formulas, generating sequences, printing
exchanging (swapping) data values
complex decisions and branching
testing and validating data
use of 'flag' variables
finding maximum and minimum values
array manipulations (filling, summing, searching, printing)
uses of record variables
communication between modules:
formal parameters, arguments, parameter passing, inheritance
coding algorithms in a high-level language
overall structure of a program (including stylistic layout)
internal and external documentation
nesting of procedures and functions
declarations, formal parameter lists
file variables and file operations
input/output (keyboard and file)
translation of standard control structures
arithmetic expressions
assignment statements, type compatibility
boolean expressions
implementing an algorithm on the computer
transcribing a pseudocode algorithm into a programming language
log-in procedures, customizing the account
creating a source file
compiling the program; compilation errors
generation of test data
executing the program; run-time (execution) errors


1, stepwise  ['step,waiz]
adv. 逐步地;阶梯式地

2, clarity  ['klæriti]
n. 清楚,透明

3, refinement  [ri'fainmənt]
n. 精致,高尚,精巧

4, arithmetic  [ə'riθmətik, ,æriθ'metik]
n. 算术,算法

Continue reading it-e-42 Algorithm Design and Implementation

it-e-41 Some Rules for Well-drawn Flow Charts

Well-drawn flow charts are easy to read. Here are a few rules for well-drawn flow charts:
Every flowchart has a START symbol and a STOP symbol.
The flow of sequence is generally from the top of the page to the bottom of the page. This
can vary with loops which need to flow back to an entry point.
Use arrow-heads on connectors where flow direction may not be obvious.
There is only one flow chart per page.
A page should have a page number and a title.
A flow chart on one page should not break and jump to another page.
A flow chart should have no more than around 15 symbols (not including START and

Continue reading it-e-41 Some Rules for Well-drawn Flow Charts

web 工具 资源























我精选的cheet sheet:

jquery cheetsheet

php cheetsheet

正则 cheetsheet












– 马克鳗 可以很方便的为设计稿添加标记,双击、滚轮、拖动…



Sublime Text 2


Continue reading web 工具 资源



   1. <!--[if !IE]><!--> 除IE外都可识别 <!--<![endif]-->
   2. <!--[if IE]> 所有的IE可识别 <![endif]-->
   3. <!--[if IE 5.0]> 只有IE5.0可以识别 <![endif]-->
   4. <!--[if IE 5]> 仅IE5.0与IE5.5可以识别 <![endif]-->
   5. <!--[if gt IE 5.0]> IE5.0以及IE5.0以上版本都可以识别 <![endif]-->
   6. <!--[if IE 6]> 仅IE6可识别 <![endif]-->
   7. <!--[if lt IE 6]> IE6以及IE6以下版本可识别 <![endif]-->
   8. <!--[if gte IE 6]> IE6以及IE6以上版本可识别 <![endif]-->
   9. <!--[if IE 7]> 仅IE7可识别 <![endif]-->
10. <!--[if lt IE 7]> IE7以及IE7以下版本可识别 <![endif]-->
11. <!--[if gte IE 7]> IE7以及IE7以上版本可识别 <![endif]—>


Continue reading html标记判断IE版本的方法





div {


<img src="data:image/png;base64, 
















@font-face {
	font-family: Delicious;
	src: url('Delicious-Roman.otf');


ie支持.eot (Embedded OpenType) 和.ote

其他支持TrueType 和OpenType (.ttf, .otf)


font-family: Gentium;
src: url("data:font/

Continue reading base64数据和@font-face

HTML5 Quick Learning Guide


HTML5 Quick Learning Guide
Just what you need to know to quickly
move from HTML / XHTML to HTML5
Brought to you by
Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License
HTML5 syntax is compatible with both HTML4 and XHTML1. Want to close
empty elements with a slash? Go for it. Rather not? Then don't. Want to use
lower case? Upper case? Take your pick. In other words, you really don't have
to change the way you handle these things, so don't worry, ok?
HTML5 doctype is much simpler:
New way:
<!doctype html>
Old ways:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
Meta charset tag is much simpler:
New way:
<meta charset="UTF-8">
Old way:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-
8" />
Divs are now used for styling rather than structure; HTML5 includes several
new structural elements that help define parts of the document. Let's take a
look at the main new structural elements that you'll probably use right away.
(Note that included in the head is an HTML5 shiv that allows us to style elements in IE,
and a basic CSS style is also included so we can help browsers that aren't caught up yet to
render the new block-level elements as block-level elements. For now, it's easiest just to
automatically include them. Understanding why can come later.)
Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License
Main Structural Elements You'll Use Most Often in HTML5
Although these sound like “positions” in a document, and very often will be
used in that way, they really are about grouping and not positioning. You might
have 3 <sections> in a page, with each <section> having its own <header> and
<footer> for instance. (Note that these elements – like classes – can be used
more than once on a page).
But to keep things simple, for this document's purpose, let's just think of a
very basic document that contains a top header, a menu for navigation, a
content section that contains a couple of articles, a sidebar, and a footer.
In HTML4 or XHTML, you probably would have used divs, classes and ids to
group each of those areas. You can and should still use divs, classes and ids for
styling reasons, but they may no longer be as necessary as before for
structural purposes. Some documents may be able to get by without them
completely, while most will probably still need them for styling. But again, for
the purposes of learning the quick facts to create a simple HTML5 document,
let's keep this really basic.
Here's a simple way to code a very basic document that contains a top header,
a menu for navigation, a content section that contains a couple of articles, a
sidebar, and a footer in HTML5.
Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License
<!doctype html>
<meta charset="utf-8">
<title>Very Basic Document</title>
<!--[if IE]><script src=""></script><![endif]-->
<style>header, footer, section, aside, nav, article {display: block;}</style>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Products</a></li>
<li><a href="#">Contact Us</a></li>
<h1><a href="#">Very Basic Document</a></h1>
<h2>A tag line might go here</h2>
<h3><a href="#">First Article Title</a></h3>
<img src="images/flower.jpg" alt="flower">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. </p>
<h3><a href="#">Second Article Title</a></h3>
<img src="images/tree.jpg" alt="tree">
<p>Praesent libero. Sed cursus ante dapibus diam.</p>
<h4>Connect With Us</h4>
<li><a href="#">Twitter</a></li>
<li><a href="#">Facebook</a></li>
<p>All rights reserved.</p>
Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License
As you can see, the structure is fairly simple, and you can style these new
structural elements in the CSS. However, because you may have some of these
structural elements within different groupings on a page (such as several
sections having different headers and footers), you may want to style each
differently. In that case, you can still assign ids and classes just as you would
in HTML4 or XHTML.
The point of the structural elements is to designate structure after all;
presentation is dealt with in the CSS in whatever manner works best for you,
using ids and classes.
So what are the actual definitions of these new structural elements?
<header> represents a group of introductory or navigational aids. (Things
you'd usually wrap in a H1, H2, Hx, etc)
<nav> represents a section of the document intended for navigation. (Like a
<section> represents a generic document or application section. It can be
used together with the h1, h2, h3, h4, h5, and h6 elements to indicate the
document structure. (Just a logical grouping such as a content section)
<article> represents an independent piece of content of a document, such as
a blog entry or newspaper article. (Independent is the key word here. If the
piece of content could make sense plucked out of this document and placed
somewhere else, it's probably an article)
<aside> represents a piece of content that is only slightly related to the rest
of the page. (Usually a sidebar, but could be another type of content that
isn't directly related to the main content)
<footer> represents a footer for a section and can contain information about
the author, copyright information, et cetera. (You know, like... a footer)
Of course, HTML5 comes with other interesting elements such as the video and
audio elements, plus new and changed elements and attributes, but all of
those belong in a separate cheat sheet. This one is to get you up and running
fast, so there you have it. Just the basics that will let you quickly move from
HTML4 or XHTML to HTML5 right now!
Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License
If you want to delve into the finer points, I recommend starting with the W3C
draft, entitled HTML5 differences from HTML4 located at
This document created by
We'd love to have you follow us at and
please bookmark and share our site within your social networks (twitter,
facebook, stumbleupon, delicious, etc).
Feel free to share this document with others, keeping in mind that
this document is licensed under the Creative Commons
Attribution-Noncommercial-No Derivative Works 3.0 United
States License (
Share it; don't sell it. Share it; don't change it.
Pretty simple, yes? :)
Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License

文章可以转载,但是必须遵循Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United
States License




<!doctype html>

<meta charset="UTF-8">




Continue reading HTML5 Quick Learning Guide

it-e-40 Algorithms and Flowcharts

The computer scientist Niklaus Wirth stated that:
Programs = Algorithms + Data
The algorithm is part of the blueprint or plan for the computer program; an algorithm is:
"An effective procedure for solving a problem in a finite number of steps."
It is effective, which means that an answer is found and it finishes, that is it has a finite
number of steps. A well-designed algorithm will always provide an answer, and it may not be the
answer you want but there will be an answer. It may be that the answer is that there is no answer.
A well-designed algorithm is also guaranteed to terminate.
The key features of an algorithm are:
Sequence (also known as Process),
Decision (also known as Selection)
Repetition (also known as Iteration or Looping)
In 1964 the mathematicians Corrado Bohm and Guiseppe Jacopini demonstrated that any
algorithm can be stated using sequence, decision and repetition. The work of Bohm and Jacopini
was of great importance since it eventually led to the disciplines of structured program design
that are much used today.
Sequence means that each step or process in the algorithm is executed in the specified order.
In an algorithm each process must be in the correct place, otherwise the algorithm will most
probably fail.
The Decision constructsIf ... then, If ... then ... else ...
In algorithms the outcome of a decision is either true or false, and there is no in between.
The outcome of the decision is based on some condition that can only result in a true or false
The decision takes the form: if proposition then process
A proposition in this sense is a statement, which can only be true or false. It is either true
that today is Wednesday or false that today is Wednesday. It can't be both true and false. If the
proposition is true then the process, which follows the then, is executed.
The decision can also be stated as:
if proposition
then process1
else process2
This is the if ... then ... else ... form of the decision. This means that if the proposition is true

then execute process1 else or otherwise execute process2.
The first form of the decision if proposition then process has a null else, that is, there is no
The Repetition constructsRepeat and While
Repetition takes two forms, the Repeat loop and the While loop.
The repeat loop is used to iterate or repeat a process or sequence of processes until some
condition becomes true. It has the general form:
Until proposition
The repeat loop does some processing before testing the state of the proposition.
The while loop is used to iterate or repeat a process or sequence of processes while some
condition becomes true. It has the general form:
While proposition
The while loop tests the state of the proposition first.
There are four different ways of stating algorithms: Step-Form, Pseudocode, Flowchart, and
The first two are written forms. The written form is just normal language.[2]A problem with
human language is that it can seem to be imprecise. In terms of meaning, what I write may not be
the same as what you read.[3]Pseudocode is also human language but tends toward more precision
by using a limited vocabulary.
The last two are graphically-oriented, that is they use symbols and language to represent
sequence, decision and repetition.
Flow charts are a graphical method of designing programs and once
the rules are learned they are very easy to draw. A well-drawn flow chart
is also very easy to read.
The major symbols are the DECISION (also known as selection)
and the SEQUENCE (or process) symbols. The START and STOP symbols are called the
terminals. The SUBPROCESS symbol is a variation on the sequence symbol.

1, imprecise  [,impri'sais]
adj. 不精确的;不严密的;不确切的

Continue reading it-e-40 Algorithms and Flowcharts


rar的官方网站 上有使用各种语言调用unrar.dll解压缩的例子,但是没有使用java的jni的例子。

“File is not valid RAR archive” 我也做不了别的,只是将这个异常反映到java异常信息中。


unrar with jni, a java library

Continue reading 使用jni调用unrar

it-e-39 Database New Horizon

The modern database era began in 1970, when E.F. Codd published his paper "A Relational
Model of Data for Large Shared Data Banks." His ideas enabled the logical manipulation of data
to be independent of its physical location, greatly simplifying the work of application developers.
Now we are poised for another leap forward. Databases will scale to gargantuan proportions,
span multiple locations and maintain information in heterogeneous formats. And they will be
autonomous and self-tuning. The major database vendors are pursuing these goals in different
Thirty years ago, IBM researcher Selinger invented "cost-based" query optimization, by
which searches against relational databases such as IBM's DB2 minimized computer resources by
finding the most efficient access methods and paths. Now Selinger is leading an effort at IBM
called Leo for Learning Optimizer that she says will push DB2 optimization into a new
Rather than optimizing a query once, when it's compiled, Leo will watch production queries
as they run and fine-tune them as it learns about data relationships and user needs. For example,
Leo would come to realize that a ZIP code can be associated with only one state, or that a Camry
is made only by Toyota, even if those rules aren't specified in advance.
Selinger says Leo will be most helpful in large and complex databases, and in databases
where interdata relationships exist but aren't explicitly declared by database designers. Leo is
likely to be included in commercial releases of DB2 in about three years, she says.
Whether the future of databases is the traditional, relational and SQL model with XML
technologies incorporated into it or a new XML-based model is a matter of debate. XML will
become the dominant format for data interchange with its flexibility and ability to provide
self-description, according to Don Chamberlin, a database technology researcher at IBM.
Relational databeses, he said, will be fitted with front ends to support XML and process
queries based on the XQuery standard. XML will become the "lingua franca" for exchange of
data. "We'll also see some large relational systems adapt to XML as a native format,"Chamberlin
said.Technologists are in the early stages of development of XML technologies. SQL will not go
away, but there are new data formats for which it just was not designed, he said.
Sun's Rick Cattell, a distinguished engineer at the company, had a less dominant outlook for
XML, saying very few people are going to store XQuery data in an XML format."I think the
momentum behind relational databases is insurmountable,"Cattell said, adding that he was
drawing on his experience with object-oriented databases, which were unable to unseat relational
databases in enterprise IT shops. Developers, Cattell said, will need tools to convert relational
data to XML and vice versa.
Currently, performance on the Web is hindered because of translations between Java and
XML data formats. Eventually, an extension of XQuery will replace both Java and SQL

according to some experts.
The next step in the evolution of databases is to provide a more powerful way to query them
than what is being done on search sites such as Google today.
Experts are expecting tuple space technology, which is intended to make it easier to store and
fetch data by recognizing patterns. And in-memory databases technology is a "no-brainer,"but there is
not enough memory available yet to accommodate it.
Microsoft Corp. says users will never be persuaded to dump everything e-mail, documents,
audio/video, pictures, spreadsheets and so on into one gigantic database. Therefore, the
software vendor is developing technology that will allow a user to seamlessly reach across
multiple, heterogeneous data stores with a single query.
Microsoft's Unified Data project involves three steps. First, the company will devise
"schema" based on XML that define data types. Then it will develop methods for relating
different data types to each other and finally develop a common query mechanism for distributed
databases. For example, I want to search for a document that references Microsoft, and the
document "tells" the query that there's also a media file in another place that references
The technology will appear in 18 months in SQL Server. It will be added to other Microsoft
products in ensuing years.
Oracle Corp. says its customers are moving toward data stores of huge size and complexity,
spread over multiple locations. The company says its products will not only evolve to handle
those kinds of jobs, but will also do them extraordinarily well. "Over the next couple of releases,
we'll see essentially fully autonomous databases," says Robert Shimp, vice president of database
Oracle also wants to facilitate collaboration for people in different companies with widely
varying information types."What doesn't exist today is the underlying infrastructure, or plumbing,
that's capable of managing all these diverse types of data,"Shimp says."What you need is the
ability to link all these clustered databases around the globe into a single, unified view for the
individual user."
Elsewhere, researchers are finding that the best design for some database applications isn't a
traditional database at all, but rather data streams. Researchers at Stanford University are working
on ways that continuous flows of information—such as Web site hits, stock trades or
telecommunications traffic—can be passed through queries and then archived or discarded. A
query might, for example, be written to look continuously for suspicious patterns in network
traffic and then spit out an alert.
The problem in handling some kinds of problems with a traditional database management
system is one of timeliness, says Jennifer Widom, a computer science professor at Stanford. "If
you want to put a stream of data into a DBMS, you have to at some point stop, create a load file,
load the data and then query it,"she says. "Data stream queries are continuous; they just sit there
and give you new answers automatically."

Widom and her colleagues are developing algorithms for stream queries, and she says her
group will develop a comprehensive data stream management system. A prototype of such a
system will take a number of years to develop, and the underlying technology will then be either
licensed or offered as freeware, she says.

1, poise  [pɔiz]
n. 平衡,姿势,镇静
v. 使...平衡,保持平衡,保持...姿势

2, leap  [li:p]
n. 跳跃,剧增,急变
v. 跳跃,跃过,猛冲
a. 闰年的
3, gargantuan  [gɑ:'gæntjuən]
a. 巨大的,庞大的
4, proportions  [prə'pɔ:ʃəns]
n. 比例;大小(proportion的复数形式)
5, insurmountable  [,insə'mauntəbl]
adj. 不能克服的;不能超越的;难以对付的
6, momentum  [məu'mentəm]
n. 势头;[物] 动量;动力;冲力
7, unseat  [,ʌn'si:t]
vt. 罢免;剥夺…的席位;使失去资格;使从座位上(或马背上)摔下
8, persuade  [pə'sweid]
vt. 说服,劝说;使某人相信;劝某人做(不做)某事
vi. 说服;被说服
adj. 空闲的,有闲的
9, gigantic  [dʒai'gæntik]
a. 巨大的
10, heterogeneous  [,hetərəu'dʒi:njəs]
adj. [化学] 多相的;异种的;[化学] 不均匀的;由不同成分形成的
11, ensue  [in'sju:]
vi. 跟着发生,接着发生;继起
vt. 追求
12, facilitate  [fə'siliteit]
vt. 促进;帮助;使容易
13, diverse  [dai'və:s, di-]
adj. 不同的;多种多样的;变化多的

Continue reading it-e-39 Database New Horizon


Total views.

© 2013 - 2022. All rights reserved.

Powered by Hydejack v6.6.1