### Bolzano-Weierstrass Property

Theorem 4.21 (Bolzano-Weierstrass Property) A set of real numbers $\mathrm{E}$ is closed and bounded if and only if every sequence of points chosen from the set has a subsequence that converges to a point that belongs to $\mathrm{E}$.

Proof Suppose that $\mathrm{E}$ is both closed and bounded and let $\mathrm{\{x_n\}}$ be a sequence of points chosen from $\mathrm{E}$. Since $\mathrm{E}$ is bounded this sequence $\mathrm{\{x_n\}}$ must be bounded too. We apply the Bolzano-Weierstrass theorem for sequences (Theorem 2.40) to obtain a subsequence $\mathrm{\{x_{n_k}\}}$ that converges. If $\mathrm{x_{n_k}\rightarrow z}$ then since all the points of the subsequence $\mathrm{\{x_{n_k}\}}$ belong to $\mathrm{E}$ either the sequence is constant after some term or else $\mathrm{z}$ is a point of accumulation of $\mathrm{E}$. In either case we see that $\mathrm{z \in E}$. This proves the theorem in one direction.

### Hello world!

/* Welcome to WordPress.com.
Edit or delete it and start blogging! */

include <iostream>
main()
{
cout << “hello world!” << endl;
return 0;
}

### Riemann or Lebesgue integration

Excerpt from Martin Davis and Matt Insall, “Mathematics and Design: Yes, But Will it Fly?”, Nexus Network Journal, vol. 4, no. 4 (Autumn 2002).

At 06:39 AM 8/26/2002, Matt Insall wrote:

Personally, I think it is likely to make a difference whether Riemann or Lebesgue integration is used, but that the difference will only be noticeable provided that the designers rigorously adhere to the requirements that that particular integration theory be used for all the integrals. As soon as they revert to numerical approximations, instead of using calculus or analysis, they have muddied the waters so that no direct comparison between one integration theory and another can be made.

Functions that are Riemann integrable are automatically Lebesgue integrable and the values of the integrals will be the same. There are two ways in which a function can be Lebesgue integrable but not Riemann integrable. Any bounded measurable function is L-integrable, but not all of them are R-integrable. Some unbounded measurable functions are also L-integrable, but not Riemann integrable, since all R-integrable functions are bounded. An example: the function 1/sqrt(x) has the L-integral 2/3 on the interval [0,1]. Being unbounded in that interval, it has no R-integral there.

Of course, this function does have an “improper integral” (sometimes called a Riemann-Cauchy integral) in that interval with the very same value. Only functions having absolutely convergent improper integrals have Lebesgue integrals. The classical example is sinx/x on the interval [0,\infnty] which has the value \pi/2 but no Lebesgue integral. This fact is sometimes confusingly stated as a case where something is R-integrable but not L-integrable. But one can perfectly well define “improper”
L-integrals, so that this comparison is inappropriate. It’s just that the definition of L-integration automatically includes cases that in the Riemann case require this extra limiting step for which the inappropriate term “improper” is used.

Hamming of course hadn’t meant to be taken so literally. His aphorism was intended to say that the fine points of mathematical analysis are not relevant to engineering considerations. And, he was perfectly right.

In the long-ago days when I had occasion to be on committees administering an oral qualifying exam for the doctorate, I would often ask the hapless student why analysts prefer the L-integral. This was a trap question: students who fell for the trap would tell me that the function on [0,1] that is 1 on the irrationals and 0 on the rationals is L-integrable, but not R-integrable. The right answer is that the L-integral has useful convergence properties not enjoyed by the R-integral.

Now whatever did Mat Insall have in mind? sin x/x on [0,infty]? Surely not in any engineering analysis.

### Terminal, Console, and Shell

After searching the internet for quite some time I finally had some sense of the relationship among terminal, console and shell.

1. Terminal

Real text terminal: Includes only a screen (NOT TO BE CALLED “MONITOR” AS FOR TODAY’S COMPUTER), keyboard, and a small memory to store a screenfull text (ONLY A FEW KILOBYTES). Keyboard is plugged to screen, which is further wired to the serial port of computer with a long cable.

Terminal emulation: An emulated real text terminal created by computer software and classfied as virtual terminal and pseudo terminal.

Virtual terminal or console: The command line interface seen after the boot of Linux system. By default, seven virtual terminals are available and can be switched using [CTRL]+[Fn] (n: 1-7). The 7th virtual terminal is reserved for X-windows system and the rest are for textual Shells.

Pseudo terminal: A pseudo-device pair that provides a text terminal interface without associated virtual console, computer terminal or serial port hardware. Its applications include terminal emulator and remote login handler.

Terminal emulator: Xterm, Konsole and alike on X windows systems, which serve as master device (/dev/ptmx) while Shell serves as slave device(/dev/pts/N)

Remote login handler: SSH and Telnet, which serve as master device (/dev/ptmx) while Shell serves as slave device(/dev/pts/N).

2. Console: The monitor and keyboard on today’s computers or the real text terminal on old time computers.

3. Shell: A utility program resides on hard disk, by default the first program to start after a user log onto the system, and classfied as login shell, interactive shell and conventional shell.

Interactive, login shell: The shell reads these files in sequence: (system wide) /etc/profile; (per user) ~/.bash_profile; ~/.bash_login; ~/.profile; (when logout) ~/.bash_logout.

Interactive, non-login shell: The shell reads these files in sequence: (per user) ~/.bashrc; (when exit) ~/.bash_logout.

Non-interactive, login shell: The shell reads these files in sequence: (system wide) /etc/profile; (per user) ~/.profile; (when logout) ~/.bash_logout.

Non-interactive, non-login shell: The shell starts by executing \$BASH_ENV and exits with reading ~/.bash_logout.

4. Login Process: For wired connection, init-> getty -> login-> first program to run, usually Shell; for network connections, init -> sshd, telnetd, or rlogind -> login -> first program to run, usually Shell.

References:

### MiKTeX’s Secret: Local Package Repository

The error in the installation of LaTeX packages from a local package repository on MiKTeX might be:

“…. does not seem to be a local package repository”.

The problem can be solved by downloading “readme.txt”, “miktex-zzdb1.cab”, and “miktex-zzdb2.cab” into the folder that contains the LaTeX packages you wish to install.

### When you install printer drivers

When you install printer drivers please don’t forget to log on as administrator. Otherwise, you probably would see warning messages such as “Error Tag = AddPrinterDriver(0)”, “The Specified Module Can’t Be Found”, “Operation Not Allowed” and so on and most likely can’t find a solution through Google and Yahoo.

### Linux Commands (Day 1)

(1) Change file permissions

chmod 644 filename ## assign the file read/write by the owner and only read by everyone else (-rw-r–r–).

chmod -R 644 foldername ## assign all the files in the folder read/write by the owner and only read by everyone else (-rw-r–r–).

r:

w:
200 write by owner
020 write by group
002 write by anybody

x:
100 execute by owner
010 execute by group
001 execute by anybody

(2) Secure copy files between Linux hosts

scp user@remote-computer:/remote-path/remote-file /local-path/local-file ## copy a file from a remote computer to the computer you are working at.

scp -r user@remote-computer:/remote-path/remote-directory /local-path/local-directory ## copy a folder from a remote computer to the computer you are working at.

scp /local-path/local-file user@remote-computer:/remote-path/remote-file ## copy a file from the computer you are working at to a remote computer.

scp -r /local-path/local-directory user@remote-computer:/remote-path/remote-directory ## copy a file from the computer you are working at to a remote computer.

(3) Control jobs

jobs ## list jobs.
%1 ## resume the first stopped job.
fg %1 ## resume the first stopped job.
%1 & ## put the first stopped job into background.
bg %1 ## put the first stopped job into background.
kill %1 ## terminate the first stopped job.
nohup myjob.sh & ## run myjob.sh in the background as a process detached from the console and send output to nohup.out by default.
script…exit ## start a new shell and log all the output into the file called typescript.

(4) Capture outputs

(((./cmd | tee stdout.txt) 3>&1 1>&2 2>&3 | tee stderr.txt) 3>&1 1>&2 2>&3) 1>out.txt 2>err.txt ## see explanation at http://www.cpqlinux.com/redirect.html.

(5) Emacs tutorial

### 移动硬盘的科普

（0）数据线及其接口的不同反映了数据传输速度的不同。

（1）硬盘盒内的数据线对应于硬盘的数据接口，硬盘的数据接口有分IDE,SCSI,和SATA，相应的硬盘也叫做IDE,SCSI,和SATA硬盘。

IDE又叫做Parallel ATA，SATA则是Serial ATA的简写，中文翻译过来前者叫并行ATA，后者叫串行ATA，这和什么“串口”和“并口”完全是两码事！“串口”和“并口”英文翻译过来叫Serial PortParallel Port，他们的数据传输速度非常的低，是绝对不会用在硬盘上的！

ATA-1
ATA-2
ATA-3
ATA-4
Ultra ATA/33
Ultra ATA/66
Ultra ATA/100
Ultra ATA/133

5400rpm
7200rpm

5.25 inches
3.5 inches
2.5 inches

（2） 硬盘盒外的数据接口可以是USB、IEEE1394、eSATA，最常用的是USB 2.0，其他的应用都比较受限制。

（3）硬盘盒的尺寸是根据所装东西的大小来定义的，5.25”是用来装光驱的，2.5“是用来装笔记本那种硬盘的，3.5“是用来装台式机的那种硬盘。硬盘盒有分铝或者金属外壳和塑料外壳，前者散热比较好，如果还有个小风扇就更好了。当然，要试试看外置盒运转起来是否噪音比较小！

### The Break Up Song

Here you can see the wonderful Ukulele!

Lyrics

dont think about the times we have to try to make things last,
dont think about the times when we first kissed you say we wouldnt race to fast,
dont think about the times we have to try to make things right,
cause you and i both know we always get into little fights,
cause love is not the best thing for us now,
its not the best thing for us now,
so im a break it off with you somehow,

the stars would shine for you another day, another day,
so im a try nd love you some other day,
im know im not in need for love,
for love, for love, for love,
my heartache should have been enough for you,
wanna be my wife, i say,
gotta make you right before
i get back on my feet, my feet,
get back on my feet,

cause love is not the best thing for us now,
its not the best thing for us now,
so im a break it off with you some how,
the stars would shine for you another day, another day,
so im a try and love you some other way,

dont think about us breakin up
think about you and me makin love
n’ think about the lord above
n’ thank him for the gift of love
you and i we gotta split apart
n’ take a wrong journey through the dark
n’ nows the time you got to be strong
just make sure your love carries on