- 博客(25)
- 收藏
- 关注
原创 Chapter 4– Functions and Program Structure of TCPL (Part 11)
Exercise 4-8Suppose that there will never be more than one character of pushback. Modify getch and ungetch accordingly./* K&R Exercise 4-8 *//* written by Steven Huangrevised by ffffx0@gma
2006-02-21 18:38:00 2007
原创 Chapter 4– Functions and Program Structure of TCPL (Part 10)
Chapter 4 – Functions and Program StructureExercise 4-1Write the function strrindex(s,t) , which returns the position of the rightmost occurrence of t in s , or -1 if there is none.#include
2006-02-21 18:28:00 2212
原创 Chapter 3– Control Flow of TCPL (Part 9)
Chapter 3 – Control FlowExercise 3-1Our binary search makes two tests inside the loop, when one would suffice (at the price of more tests outside). Write a version with only one test inside the lo
2006-02-20 23:46:00 2156
原创 Chapter 2 – Types, Operators and Expressions of TCPL
Chapter 2 – Types, Operators and ExpressionsExercise 2-1Write a program to determine the ranges of char, short, int, and long variables, both signed and unsigned, by printing appropriate values fr
2006-02-20 21:53:00 2462
原创 Selected solutions to exercise of "The C Programming Language" 2e (Part 7, End of Chapter 1)
Exercise 1-23Write a program to remove all comments from a C program. Dont forget to handle quoted strings and character constants properly. C comments do not nest. Solution by othershttp://u
2006-02-19 23:21:00 1628
原创 Selected solutions to exercise of "The C Programming Language" 2e (Part 6)
Exercise 1-22Write a program to "fold" long input lines into two or more shorter lines after the last non-blank character that occurs before the n -th column of input. Make sure your program does so
2006-02-19 23:16:00 1703
原创 Selected solutions to exercise of "The C Programming Language" 2e (Part 5)
Exercise 1-20Write a program detab that replaces tabs in the input with the proper number of blanks to space to the next tab stop. Assume a fixed set of tab stops, say every n columns. Should n be a
2006-02-19 18:22:00 1585
原创 Selected solutions to exercise of "The C Programming Language" 2e (Part 4)
Exercise 1-18Write a program to remove all trailing blanks and tabs from each line of input, and to delete entirely blank lines./* K&R2 1-18 p31: Write a program to remove trailing blanks and t
2006-02-19 17:41:00 1788
原创 Selected solutions to exercise of "The C Programming Language" 2e (Part 3)
Exercise 1-16Revise the main routine of the longest-line program so it will correctly print the length of arbitrarily long input lines, and as much as possible of the text. /* I do not think t
2006-02-19 16:42:00 1275
原创 Selected solutions to exercise of "The C Programming Language" 2e (Part 2)
Exercise 1-13Write a program to print a histogram of the lengths of words in its input. It is easy to draw the histogram with the bars horizontal; a vertical orientation is more challenging.Horizo
2006-02-19 16:38:00 1262
原创 Selected solutions to exercise of "The C Programming Language" 2e (Part 1)
Exercise 1-8Write a program to count blanks, tabs, and newlines.#include int main(void){ int blanks, tabs, newlines; int c; int done = 0; int lastchar = 0;
2006-02-19 16:35:00 1305
原创 Do the Untwist (1006)
Cryptography deals with methods of secret communication that transform a message (the plaintext) into a disguised form (the ciphertext) so that no one seeing the ciphertext will be able to figure out
2006-02-10 01:35:00 1944
原创 How to Install Cygwin
如何下載安裝Cygwin及“ARM微處理器原理與實作”一書中所需的執行程式步驟1. 從網路下載安裝程式setup.exe至Cygwin的網站http://www.cygwin.com/下載安裝程式setup.exe,可直接點選執行或先行下載至個人電腦後再執行。圖1. 安裝程式setup.exe在Cygwin的網站上所呈現的圖示(2003年2月20日)。 圖2
2006-02-09 20:59:00 2043
原创 To do beautiful printing
Have you watched an English movie? Of course! Have you noticed the caption of end which tells us which role is played by whom? Maybe not. I have seen many English movies and some of them are very famo
2006-02-09 01:05:00 1417
原创 蘭亭序
Lanting Xu (蘭亭序), or Lanting Ji Xu (蘭亭集序) ("Preface to the Poems Composed at the Orchid Pavilion"), is the most famous work of calligraphy by Wang Xizhi, composed in year 353. Written in xingshu, or r
2006-02-08 16:37:00 3431
原创 On Code Comment
Brian W. Kernighan and Rob Pike have some excellent suggestions for writing comments. They are said best as they appear in "The Practice of Programming," [1]: Dont belabor the obvious. Commen
2006-02-07 14:09:00 1011
原创 文件压缩
文件压缩 提高文件的压缩率一直是人们追求的目标。近几年有人提出了这样一种算法,它虽然只是单纯地对文件进行重排,本身并不压缩文件,但是经这种算法调整后的文件在大多数情况下都能获得比原来更大的压缩率。 该算法具体如下:对一个长度为n的字符串S,首先根据它构造n个字符串,其中第i个字符串由将S的前i-1个字符置于末尾得到。然后把这n个字符串按照首字符从小到大排序,如果两个字符串的首字符相等,
2006-02-06 22:00:00 1960
原创 Problem Preparation for HTML to TXT
Problem Preparation for HTML to TXT If you have worked on website design, you must be familiar with HTML. When writing a HTML file, we always use to include some control commands which can contro
2006-02-06 19:16:00 1699
原创 JDBC-ODBC相关的一些常见问题和解决方法zz
这篇文章列出了与JDBC-ODBC相关的一些常见问题和解决方法。其实说与JDBC-ODBC相关不太合适,因为它实际上是针对DataMorph来说的(DataMorph?我也不清楚。)。不过在上篇“java读写Excel文件”中遇到的问题([Microsoft][ ODBC Excel Driver] Operation must use an updateable query)就在这篇文章中找到了
2006-02-05 02:19:00 4880
原创 用Java and JDBC-ODBC读写Excel文件
用Java 读写Excel文件 背景介绍在我们日常进行的与java相关的开发中,可能会碰到要把一批特定格式的数据倒入到系统中的情况。举个例子来说,假设我正在作一个公司的员工培训信息管理系统,该系统中要涉及到员工的信息,课程的信息等。考虑到公司人员流动比较频繁,时常会有一个批新的员工加入到这个系统中来,我们在作需求会考虑这样一个功能,就是批量地添加公司员工的信息。而在工作中,几乎全部的类
2006-02-05 02:03:00 8893
原创 VC and Winsocket Programming - Downloading File From a Website
Using VC Develop a Tool to Download File1、介绍和背景昨天决定写一个程序“批量下载网页上相同格式的文件”,本以为用VC会很轻松搞定,但一用才知道,WinSocket编程几乎忘光了,弄了几乎整个下午加半个晚上都还徘徊在起点上,唉,又犯了眼高手低的错误。所以呢,我想应该把“批量下载网页上相同格式的文件”分成几个部分,或说是步骤,一步步来吧。现在就让我们来
2006-02-03 23:38:00 2315
原创 往MySQL中存储图片
往MySQL中存储图片 1 介绍在设计到数据库的开发中,难免要将图片或音频文件插入到数据库中的情况。一般来说,我们可以同过插入图片文件相应的存储位置,而不是文件本身,来避免直接向数据库里插入的麻烦。但有些时候,向MySQL中插入图片更加容易管理。那么在MySQL中该怎么存储呢?参考资料[1]中有个相当清晰的例子,不过是基于MySQL图形界面的查询工具Query Brower的,你的
2006-02-02 00:47:00 119980 8
原创 用VC编写的SN快速输入工具
用VC编写的SN快速输入工具 大家在安装软件时,一般都会遇到让输入序列号SN的情况。序列号(SN) 通常是由“-”分隔开的几部分组成,相应地,安装软件输入序列号的地方通常也是由几个文本框(TextBox)组成的,这时,为了输入序列号,我们就要在安装程序和记录有SN的文件之间粘贴、复制多次,非常麻烦。从玩电脑到现在,安装了不少软件,只记得有一次,那个安装程序作的比较体贴人意,可以把这种SN一
2006-02-01 20:46:00 2838
原创 Using Java to Develop a Very Simple SMTP Client
Using Java to Develop a Very Simple SMTP ClientYanjiang QianJanuary 30, 20061 Introduction In this short article, let’s enjoy the digging of the Simple Mail Transfer Protocol (SMTP) and
2006-02-01 02:18:00 4461
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人