Saturday, July 31, 2010

出拳手必要不要打直

出拳手必要不要打直
因為這個問題,所以找了一下並且參考一些資料。
這裡個blog 提到一些人對於出拳要不要出打直提出看法,就算是同屬於JKD的系統,也有不一樣的見解。

2010年6月前,我之前是奉行手畢完全打直的。後來,發現有點卡卡的有時手還會有點痛。

後來有聽一位柔道教練說,伸直受敵容易傷到手肘。
後來出拳,改成拳頭往下扣一點。

參考一些人的照片,跟看寶師出拳的樣子。
發現,自己上臂的肌肉其實是不發達的。如果是發達的,就沒有個問題,因為伸直剛好是"不折的手"(合氣道裏面稱的),那整條肌腱剛好彎曲護住。

所以也就沒有這個問題了。

參考來源:

"截拳道在出拳時強調《手臂不可完全打直》有幾個原因: 1.自然;人的手在放鬆自然垂下時是微彎的(我們稱為九分直或自然彎度)(如下圖),沒有人是完全直的,除非你在用力! 2.拳打直一旦落空,很容易震傷自己的手肘,或失控。 3.避免被反擊手肘關節(拳打直一旦對手反擊你的關節,只要輕輕一震你的手就會受傷甚至斷掉,而在九分直時還有一分的緩衝空間可以瞬間抵抗,不致於立即受傷)。 4.拳頭收回的《速度》比起完全打直時更快速!"
- 截拳道之《手臂不可完全打直》之根本概念 - 台灣截拳道(J.K.D) - 阿峰 - Yahoo!奇摩部落格 (在「Google 網頁註解」中檢視)

Thursday, July 29, 2010

你的時間不夠用嗎

這是個不錯的分享網址
叫作惜墨,也就是都是珍藏,珍貴的意思。
副標題是,你有一個夢想,你要保護它。
裏面有不錯的文章,滿值得一看。

-----
你的时间不够用么?
2010年07月28日 | 个人提升, 提高效率, 时间管理, 简化生活, 简单生活 | 作者:博华gravatar关闭作者: 博华 姓名: 博华
Email: bhzhang1@gmail.com
博客: http://www.apple4.cn
个人介绍: 博华喜欢打篮球,喜欢看书,喜欢听歌,喜欢简单的生活。每天只专注于最重要的事情,不去想其他的杂事。喜欢水滴石穿的道理,因为寓意很简单:专注+坚持。人生的座右铭是:既然你已经决定在生活中放手一搏,为什么不去倾尽全力干到极致?看他的所有文章 (138)

我们经常会说一句话“我没有时间。”我不禁反问,我们为什么没有时间?同样的人,每天都有同样的24小时,为什么有些人出色的完成了工作,有些人甚至要去加班加点完成昨天的工作?我想,这不仅仅是一个效率问题,更是一个生活态度的问题。
一、管理时间=管理金钱?

參考來源:

"你的时间不够用么? 2010年07月28日 | 个人提升, 提高效率, 时间管理, 简化生活, 简单生活 | 作者:博华关闭作者: 博华 姓名: 博华 Email: bhzhang1@gmail.com博客: http://www.apple4.cn个人介绍: 博华喜欢打篮球,喜欢看书,喜欢听歌,喜欢简单的生活。 每天只专注于最重要的事情,不去想其他的杂事。 喜欢水滴石穿的道理,因为寓意很简单:专注+坚持。 人生的座右铭是:既然你已经决定在生活中放手一搏,为什么不去倾尽全力干到极致?看他的所有文章 (138) 我们经常会说一句话“我没有时间。”我不禁反问,我们为什么没有时间?同样的人,每天都有同样的24小时,为什么有些人出色的完成了工作,有些人甚至要去加班加点完成昨天的工作?我想,这不仅仅是一个效率问题,更是一个生活态度的问题。 一、管理时间=管理金钱?"
- 你的时间不够用么? | 惜墨,关注自我成长,个人提升,时间管理,简化生活,学习方法,生活技巧 (在「Google 網頁註解」中檢視)

大文本文件逆序(fread/fwrite操作

大文本文件逆序(fread/fwrite操作)
2010-03-05 13:52

备份

#include
#include
#include

void reverse(char *s,int len) //逆序函数
{
int i;
char temp;
for(i=0;i0) //待改进的一段
{
rewind(fp);
fseek(fp,(i-1)*SIZE,0);
fread(p1,SIZE,1,fp);
reverse(p1,SIZE-1);
fseek(fp,-i*SIZE,2);
fread(p2,SIZE,1,fp);
reverse(p2,SIZE-1);
fseek(fp,(i-1)*SIZE,0);
fwrite(p2,SIZE,1,fp);
fseek(fp,-i*SIZE,2);
fwrite(p1,SIZE,1,fp);
i++;
}
last = filelen-2*count*SIZE;
char *p = (char *)malloc(sizeof(char)*last);
if(last<2*SIZE)
{
fseek(fp,(i-1)*SIZE,0);
fread(p,last,1,fp); // 得大改的一段
reverse(p,last-1);
fseek(fp,(i-1)*SIZE,0);
fwrite(p,last,1,fp);
}

fclose(fp);
free(p1);
free(p2);
free(p);
system("pause");
return 0;
}

return 0;
}

当然,下面的也能逆序文件

#include
void reverse(FILE *fp)
{
char ch;
if ((ch=fgetc(fp))!=EOF)
reverse(fp);
else
rewind(fp);
if (ch!=EOF)
fputc(ch,fp);
}
int main(int argc, char* argv[])
{
FILE *fp=fopen("test.txt","r+");
if (fp)
{
reverse(fp);
fclose(fp);
}
return 0;
}

參考來源:

"大文本文件逆序(fread/fwrite操作) 2010-03-05 13:52 备份 #include <stdio.h> #include <stdlib.h> #include <string.h>"
- 大文本文件逆序(fread/fwrite操作)_巫山上云雨的空间_百度空间 (在「Google 網頁註解」中檢視)

This program reads a file and counts the words in it.

/*

* word_cnt.c

* This program reads a file and counts the words in it.

*/

參考來源:

"/*  * word_cnt.c  * This program reads a file and counts the words in it.  */"
- Ron Wein's C Examples: word_cnt.c (在「Google 網頁註解」中檢視)

Wednesday, July 28, 2010

A TUTORIAL ON POINTERS AND ARRAYS IN C

A TUTORIAL ON POINTERS AND ARRAYS IN C

by Ted Jensen
Version 1.2 (HTML version)

Feb. 2000
This material is hereby placed in the public domain
Available in various formats via
http://pweb.netcom.com/~tjensen/ptr/cpoint.htm

參考來源:

"A TUTORIAL ON POINTERS AND ARRAYS IN C by Ted Jensen Version 1.2 (HTML version) Feb. 2000 This material is hereby placed in the public domain Available in various formats via http://pweb.netcom.com/~tjensen/ptr/cpoint.htm"
- A Tutorial on Pointers and Arrays in C (在「Google 網頁註解」中檢視)

Tuesday, July 27, 2010

1. 字符串操作函數

1. 字符串操作函數: "- Sent using Google Toolbar"

The C Programming Language

The C Programming Language



References

* The C Programming Language (second edition - ANSI C),
Brian W. Kernighan and Dennis M. Ritchie,
Prentice Hall, Inc., 1988.

* A Book on C (fourth edition),
Al Kelley and Ira Pohl,
Addison-Wesley, 1997.


Examples

Examples marked by the (advanced) symbol contain slightly more advanced material and will not be shown in class.

參考來源:

"Examples Examples marked by the symbol contain slightly more advanced material and will not be shown in class."
- The C Programming Language (在「Google 網頁註解」中檢視)

Friday, July 23, 2010

利用strstr和sscanf解析GPS信息

利用strstr和sscanf解析GPS信息

作者:杨硕,华清远见嵌入式学院讲师。

考察C程序员是否合格的一个重要标准就是看他操作字符串的能力,一个合格的C程序员应该可以熟练的对字符串进行拆分、组合、格式转换以及搜索定位,从一堆数据中提取出有效信息。

比如说我们要做一个GPS导航的项目,需要读取GPS模块以ASCII码的形式发送过来的数据,然后对这些数据进行处理,提取我们需要的信息。这就涉及到很多操作字符串的问题。下面就以此为例,利用strstr函数和sscanf函数解析GPS数据。

GPS输出的数据格式如下:
$GPGGA,121252.000,3937.3032,N,11611.6046,E,1,05,2.0,45.9,M,-5.7,M,,0000*77
$GPRMC,121252.000,A,3958.3032,N,11629.6046,E,15.15,359.95,070306,,,A*54
$GPVTG,359.95,T,,M,15.15,N,28.0,K,A*04
$GPGGA,121253.000,3937.3090,N,11611.6057,E,1,06,1.2,44.6,M,-5.7,M,,0000*72
$GPGSA,A,3,14,15,05,22,18,26,,,,,,,2.1,1.2,1.7*3D
$GPGSV,3,1,10,18,84,067,23,09,67,067,27,22,49,312,28,15,47,231,30*70
$GPGSV,3,2,10,21,32,199,23,14,25,272,24,05,21,140,32,26,14,070,20*7E
$GPGSV,3,3,10,29,07,074,,30,07,163,28*7D

可以看到,GPS模块发送过来的原始数据有很多,但是通常我们只需要其中的一部分信息就够用了,比如对于导航的功能,我们只需要以$GPRMC开头,以换行符结束的一行信息就够了。即:
$GPRMC,121252.000,A,3958.3032,N,11629.6046,E,15.15,359.95,070306,,,A*54

因此我们需要做的就是从读取的数据中截取以$GPRMC开头的一行信息,然后从中解析出经纬度、日期时间等有效信息即可。

假设从串口读取的数据存放在一个字符串指针char *raw_buf指向的内存单元里,首先我们通过ANSI C提供的strstr()函数找到以$GPRMC开头以换行符’\n’结束的字符串:
/* find "$GPRMC" from raw_buf */
if ((wellhandled_string = strstr(raw_buf, “$GPRMC”)) != NULL)
{
for (i=0; i

參考來源:

"利用strstr和sscanf解析GPS信息 作者:杨硕,华清远见嵌入式学院讲师。 考察C程序员是否合格的一个重要标准就是看他操作字符串的能力,一个合格的C程序员应该可以熟练的对字符串进行拆分、组合、格式转换以及搜索定位,从一堆数据中提取出有效信息。 比如说我们要做一个GPS导航的项目,需要读取GPS模块以ASCII码的形式发送过来的数据,然后对这些数据进行处理,提取我们需要的信息。这就涉及到很多操作字符串的问题。下面就以此为例,利用strstr函数和sscanf函数解析GPS数据。"
- 利用strstr和sscanf解析GPS信息-- 嵌入式学院(华清远见旗下品牌) (在「Google 網頁註解」中檢視)

Thursday, July 22, 2010

maven-javaeye

第一:举例说,你有个一依赖A用到了spring-2.0.5;后来spring在仓库换地方了(这种事情太多了,看看maven混乱的仓库吧),而你需要的是最新的spring2.5.1,那么你编译的时候就会同时有一堆spring2.0.5的文件和spring2.5的文件;那么你需要手动的排除 2.0.5的相关资源。问题是在maven体系里面,这种情况非常常见,大量的依赖混在一起的时候,你看着mvn install之后lib文件夹下乱七八糟的jar真是欲哭无泪啊,很多jar是同一个库的不同的版本,这些版本的依赖可能还不同,导致问题进一步的恶化。
第二:从eclipse的maven插件来说,add dependency的时候,一旦仓库更新了,你根本看不到最新的文件是是什么,比如struts2现在是2.0.11,但是你搜索的时候只能看到 2.0.9,因为我是那个时候装的;加入了这个dependency之后只能手动改版本到2.0.11再编译。
第三:开发者们同步仍然有困难。如果项目依赖一个仓库里面没有的文件你就完蛋了,手动拷贝到本地目录是个常见做法,如果你有100个人参与项目我想你要加入一个依赖简直大家都要崩溃了,比如struts2的json插件这个包。幸好还有artifactory,不过你一遍遍的手动发到私服上也够烦了。
maven的支持者们,我们是活在现实世界中的生命,maven的思想很好但是java本身缺乏版本管理机制并且maven也没有切实有效的解决这个问题,只能靠meta里面maven文件夹里面的描述信息,这个信息很多时候没有经过严格测试的(我遇到过几次了!导致项目根本没法编译过去,那个包的开发人员一定也用的是他自己的私服)!如果再这样下去我想很多人会崩溃的……
我仍然是maven的用户,但是我在瞪着眼睛等待一个新的工具,取代maven和ant。

參考來源:

"第一:举例说,你有个一依赖A用到了spring-2.0.5;后来spring在仓库换地方了(这种事情太多了,看看maven混乱的仓库吧),而你需要的是最新的spring2.5.1,那么你编译的时候就会同时有一堆spring2.0.5的文件和spring2.5的文件;那么你需要手动的排除2.0.5的相关资源。问题是在maven体系里面,这种情况非常常见,大量的依赖混在一起的时候,你看着mvn install之后lib文件夹下乱七八糟的jar真是欲哭无泪啊,很多jar是同一个库的不同的版本,这些版本的依赖可能还不同,导致问题进一步的恶化。"
- 关于Maven,不吐不快。 - develop - JavaEye论坛 (在「Google 網頁註解」中檢視)

qsort: sorting array of strings, integers and structs abstract

qsort: sorting array of strings, integers and structs
abstract
qsort() is standard C function for sorting arrays. It is defined by ISO C standard, and implemented in most C/C++ standard libraries(stdlib.h). This article contains an example of using qsort() for sorting integers, strings and structs.
compatible
# Any ANSI C compiler
# Should work with most C++ compilers

qsort() takes four arguments:

void qsort(void *base, size_t nel, size_t width, int (*compar)(const void *, const void *));

* base — is a pointer to the beginning of data array
* nel — is a number of elements
* width — is a size of each element (in bytes)
* compar — is a callback function (pointer to function), which does comparison and returns positive or negative integer depending on result.

This example contains three separate functions sort_integers_example(), sort_cstrings_example() and sort_structs_example().

* sort_integers_example() uses int_cmp() as compar callback. Additional function print_int_array is used for printing integer array contents.
* sort_cstrings_example() uses cstring_cmp() as compar callback. Additional function print_cstring_array is used for printing string array contents.
* sort_structs_example() uses struct_cmp_by_price() and struct_cmp_by_product() as compar callbacks. Additional function print_struct_array is used for printing array of struct.

參考來源:

"qsort: sorting array of strings, integers and structs abstract  qsort() is standard C function for sorting arrays. It is defined by ISO C standard, and implemented in most C/C++ standard libraries(stdlib.h). This article contains an example of using qsort() for sorting integers, strings and structs."
- qsort: sorting array of strings, integers and structs (在「Google 網頁註解」中檢視)

結構(struct)的大小問題

結構(struct)的大小問題
在記憶體配置的時候,因為效率考量,預設會依照元素大小整數倍的對齊
並且會以其中最大的元素為單位,配置整數倍的記憶體
例如同樣是char, short, int三個元素

參考來源:

"結構(struct)的大小問題 在記憶體配置的時候,因為效率考量,預設會依照元素大小整數倍的對齊並且會以其中最大的元素為單位,配置整數倍的記憶體例如同樣是char, short, int三個元素"
- Coding James: 結構(struct)的大小問題 (在「Google 網頁註解」中檢視)

Structure 結構化的資料型態一

Structure
結構化的資料型態一

這一星期的課程,我們將面對C語言中比較深入的話題,怎麼表達複雜的資料型態,怎麼做到一言以蔽之,簡潔而有力的C語言寫法。還有,如果你覺得 int,char,float...不夠親切,你希望用更好的名稱來表達你的變數,這時候你需要typedef的語法。如果這都還不夠,還不能符合你的要求,還有以bit為單位的處理(bit manupulation),以及列舉(enumeration)的資料型態。

參考來源:

"Structure 結構化的資料型態一           這一星期的課程,我們將面對C語言中比較深入的話題,怎麼表達複雜的資料型態,怎麼做到一言以蔽之,簡潔而有力的C語言寫法。還有,如果你覺得int,char,float...不夠親切,你希望用更好的名稱來表達你的變數,這時候你需要typedef的語法。如果這都還不夠,還不能符合你的要求,還有以bit為單位的處理(bit manupulation),以及列舉(enumeration)的資料型態。"
- Structure I (在「Google 網頁註解」中檢視)

介紹如何將struct array寫入binary file,並從binary file讀出struct array

Abstract
本文介紹如何將struct array寫入binary file,並從binary file讀出struct array。

參考來源:

"Abstract 本文介紹如何將struct array寫入binary file,並從binary file讀出struct array。 Introduction C語言 / fwrite_fread_struct_array.c"
- (原創) 如何將struct array寫入文字檔? 如何從文字檔讀出struct array? (C/C++) (C) - 真 OO无双 之 真乱舞书 - 博客园 (在「Google 網頁註解」中檢視)

Wednesday, July 21, 2010

inception 電影評論

不錯的一句話
inception 電影評論

事實並不存在,只是我們,陷在其中。

參考來源:

"现实并不存在,只是我们,陷在其中——《Inception》 - [电影] 版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明http://parasite.blogbus.com/logs/69692744.html"
- 现实并不存在,只是我们,陷在其中——《Inception》 - 我和E的宇宙飞船 - 博客大巴 (在「Google 網頁註解」中檢視)

What's the difference between text and binary I/O?

Q: What's the difference between text and binary I/O?

A: In text mode, a file is assumed to consist of lines of printable characters (perhaps including tabs). The routines in the stdio library (getc, putc, and all the rest) translate between the underlying system's end-of-line representation and the single \n used in C programs. C programs which simply read and write text therefore don't have to worry about the underlying system's newline conventions: when a C program writes a '\n', the stdio library writes the appropriate end-of-line indication, and when the stdio library detects an end-of-line while reading, it returns a single '\n' to the calling program. [footnote]

In binary mode, on the other hand, bytes are read and written between the program and the file without any interpretation. (On MS-DOS systems, binary mode also turns off testing for control-Z as an in-band end-of-file character.)

Text mode translations also affect the apparent size of a file as it's read. Because the characters read from and written to a file in text mode do not necessarily match the characters stored in the file exactly, the size of the file on disk may not always match the number of characters which can be read from it. Furthermore, for analogous reasons, the fseek and ftell functions do not necessarily deal in pure byte offsets from the beginning of the file. (Strictly speaking, in text mode, the offset values used by fseek and ftell should not be interpreted at all: a value returned by ftell should only be used as a later argument to fseek, and only values returned by ftell should be used as arguments to fseek.)

In binary mode, fseek and ftell do use pure byte offsets. However, some systems may have to append a number of null bytes at the end of a binary file to pad it out to a full record.

See also questions 12.37 and 19.12.

參考來源:

"Q: What's the difference between text and binary I/O?"
- Question 12.40 (在「Google 網頁註解」中檢視)

CSC 209 course notes -c 教學

CSC 209 course notes
Course notes available so far:

* Software tools
* Shell programming
* The unix filesystem
* The C programming language (intro)
* C data types; pointers and arrays
* C: printf and scanf
* argc and argv in C
* C strings
* C files
* getopt example
* struct, malloc
* what is being covered about unix processes
* Process memory layout and OS considerations
* Socket examples

(It's not being taught this term, but I have some detailed notes which I'm fond of about the AWK programming language, which is often used in shell scripts for various data processing and string munging tasks which are a bit more sophisticated than what cut and join and such can do.)

http://www.dgp.toronto.edu/~ajr/209/notes/

參考來源:

"CSC 209 course notes Course notes available so far:"
- CSC 209 course notes (在「Google 網頁註解」中檢視)

Tuesday, July 20, 2010

ptt scanf example

推 phstudy:%s改成%[^,] 07/17 19:16
推 dann1:成功了~ 大大可以解釋一下[^,]這個的意思嗎 07/17 19:35
推 dann1:研究了一下好像是規定字串結尾是逗號 那^的意思是無視嗎 07/17 19:39
推 TsinTa:^是not的意思,[^,]代表存取逗號外的所有字元 07/17 19:44
推 loveme00835:regular expression 07/17 19:48
→ loveme00835:可以搭配fread、fwrite, 把整個結構變數都用二進位方 07/17 20:13
→ loveme00835:式存放在檔案中, 這樣也可以支援隨機存取 07/17 20:14
→ loveme00835:http://ppt.cc/@qjm 07/17 20:15

參考來源:

"#include <stdio.h> #include <stdlib.h> typedef struct { int age; char name[ 10 ]; int weight; }Person; int main() { Person person = { 20, "Jane", 50 }; // 存資料進檔案 FILE *file = fopen( "test.txt", "wb" ); fwrite( &person, sizeof(Person), 1, file ); fclose( file );"
- Paste #281215 | LodgeIt! (在「Google 網頁註解」中檢視)

Monday, July 19, 2010

Q&amp;&amp;A

Q&&A

參考來源:

"Hi, I need a program in C that is capable of writing the multiple records into a file.And another function that should read the same data from the from the file and store it in the approptiate data structure."
- Read multiple records from a file and store it in a structure (在「Google 網頁註解」中檢視)

Program for sorting records in a file, Using linked list and insertion sort, records are sorted.

Program for sorting records in a file, Using linked list and insertion sort, records are sorted.

參考來源:

"Program for sorting records in a file, Using linked list and insertion sort, records are sorted."
- Program for sorting records in a file, Using linked list and insertion sort, records are sorted. « hackattacking.com (在「Google 網頁註解」中檢視)

rsort : Sort multi-line text records.

www.cs.duke.edu/~des/scripts/

#


# rsort : Sort multi-line text records.

The Scriptorium
Daniel E. Singer
Department of Computer Science
Duke University

參考來源:

"rsort : Sort multi-line text records."
- Dan's Scripts Page (在「Google 網頁註解」中檢視)

Mutiple-Line record in AWK

Mutiple-Line record in AWK
這是值得參考的名詞叫作多行的輸入。
other site:
http://www.math.utah.edu/docs/info/gawk_6.html#SEC34

參考來源:

"Multiple-Line Records In some databases, a single line cannot conveniently hold all the information in one entry."
- The GNU Awk User's Guide - Reading Input Files (在「Google 網頁註解」中檢視)

Creating Linked Lists in C++

Creating Linked Lists in C++
What is a linked list?
A linked list is a data structure which is built from structures and pointers. It forms a chain of "nodes" with pointers representing the links of the chain and holding the entire thing together. A linked list can be represented by a diagram like this one:
不錯的參考 C ++

參考來源:

"Creating Linked Lists in C++ What is a linked list? A linked list is a data structure which is built from structures and pointers. It forms a chain of "nodes" with pointers representing the links of the chain and holding the entire thing together. A linked list can be represented by a diagram like this one:"
- Creating Linked Lists in C++ (在「Google 網頁註解」中檢視)

Sorting Records in cprogramming board

Sorting Records
I am writing a program to sort records using a sorting algorithm of my choice. However before I can get to that I am having trouble reading in each record. Can someone provide some insight. I know that I want to do a linked list for easy insertion rather than an array, I just don't know where I am going wrong with my code. Thanks in advance!!

參考來源:

"I am writing a program to sort records using a sorting algorithm of my choice. However before I can get to that I am having trouble reading in each record. Can someone provide some insight. I know that I want to do a linked list for easy insertion rather than an array, I just don't know where I am going wrong with my code. Thanks in advance!!"
- Sorting Records (在「Google 網頁註解」中檢視)

sort record

這是另外一個sort record的 Q&A有程式碼

參考來源:

"Array Struct Sort Help!! Urgent! Expand Post » Ok i've tried understanding some previous posts but im just finding it really hard to work with structure passing to other functions and sorting. Can someone please explain in a simplistic on how i can pass structure to a function that sorts the structure by 'Year' or 'Artist' Below is the code i've done so far that allows a user to input records and those records are then put to a *.txt file....how can i proceed from there on..."
- Array Struct Sort Help!! Urgent! - C (在「Google 網頁註解」中檢視)

C-Data structures in <a href="http://cplusplus.com">cplusplus.com</a>

We have already learned how groups of sequential data can be used in C++. But this is somewhat restrictive, since in many occasions what we want to store are not mere sequences of elements all of the same data type, but sets of different elements with different data types.

Data structures
A data structure is a group of data elements grouped together under one name. These data elements, known as members, can have different types and different lengths. Data structures are declared in C++ using the following syntax:

參考來源:

"Data structures A data structure is a group of data elements grouped together under one name. These data elements, known as members, can have different types and different lengths. Data structures are declared in C++ using the following syntax:"
- Data Structures (在「Google 網頁註解」中檢視)

Sunday, July 18, 2010

C++ - Sorting and searching data

How can I sort data in alphebatical order after writng them(some records containing information about customers,say)in to a file? How can I create a program to read and print customer records arranged with their names in alphabatical order?

參考來源:

"C++ - Sorting and searching data Expert: Ralph McArdell - 7/11/2006 QuestionHow can I sort data in alphebatical order after writng them(some records containing information about customers,say)in to a file? How can I create a program to read and print customer records arranged with their names in alphabatical order?"
- C++: Sorting and searching data, donald knuth, sorting algorithm (在「Google 網頁註解」中檢視)

C++ - About file handling in C++ Expert

You are here: Experts > Computing/Technology > C/C++ > C++ > About file handling in C++

C++ - About file handling in C++
Expert: Ralph McArdell - 12/2/2007

Question
Kindly requested that can you tell me How to sort the 100 records in the file in C++

參考來源:

"You are here:  Experts > Computing/Technology > C/C++ > C++ > About file handling in C++ C++ - About file handling in C++ Expert: Ralph McArdell - 12/2/2007 QuestionKindly requested that can you tell me How to sort the 100 records in the file in C++"
- C++: About file handling in C++, c standard library, file in c (在「Google 網頁註解」中檢視)

vim插件ZenCoding

vim插件ZenCoding
十分實用的html編輯的vim plugin

參考來源:

"vim插件ZenCoding一些常用的操作 相当的酷,记录一些常用的操作 安装很方便,不再像我以前使用的sparkup.vim得配置python环境了,可直接到http://github.com/mattn/zencoding-vim下载zencoding.vim文件放到vimfiles/plugin或.vim/plugin目录就OK了。 接下来介绍些使用方法(Copy自LazyHack的使用zen coding for vim快速编写html代码) 展开缩写 输入 div>p#foo$*3>a 这样的缩写,然后按 ctrl + y + , 来展开(注意那个逗号),展开后它应该是这个样子的 <div> <p id="foo1"> <a href=""></a> </p> <p id="foo2"> <a href=""></a> </p> <p id="foo3"> <a href=""></a> </p> </div>"
- vim插件ZenCoding一些常用的操作 - 简单其实不简单 - ITFeed (在「Google 網頁註解」中檢視)

預官的考古題

這邊有預官的考古題參考

參考來源:

"預官考古題目錄 87年試題:國文、英文 88年試題:國文、英文 89年試題:國文、英文 90年試題:國文、英文 91年試題:國文、英文、計算機概論、憲法與立國精神 92年試題:國文、英文、計算機概論、憲法與立國精神 93年試題:國文、英文、計算機概論、憲法與立國精神 94年試題:國文、英文、計算機概論、憲法與立國精神 95年試題:國文、英文、計算機概論、憲法與立國精神 96年試題:國文、英文、計算機概論、憲法與立國精神 97年試題:國文、英文、計算機概論、憲法與立國精神 98年試題:國文、英文、計算機概論、憲法與立國精神"
- 預官考古題 (在「Google 網頁註解」中檢視)

Saturday, July 17, 2010

關於胡鄧

胡鄧
這是一篇轉自人人網的文章,當然,人生有幾個15年。
楊正說過一句話,年輕的時候,要有能馬上放下任何東西的打算。
這個是他過來人的遺憾,
如下面的感想,一輩子能夠實現多少夢想,一輩子又有幾個15年。

參考來源:

"胡邓绝对是个非常有意思的人。   第一,他叫了个这么古怪的名字,一定是他爸爸姓胡他妈妈姓邓! 第二,他在电视上看起来傻乎乎的,居然还是心理专家,居然每次都能说到你骨头里,居然每次都说到你骨头里了还不忙不乱慢悠悠摆着手。   我无意间进了胡邓的博客,人真是不可貌相,原来他的生活那么精彩。下面这句介绍是摘来的:   胡邓何许人也?中国大学生中最早的背包自助旅行者,新浪网旅游论坛资深版主,此外,他还是中国人民大学心理科学研究中心博士,由他首开并主讲的“自助旅行与心理素质教育”一课年年爆满,人大学生在网上如是说:“能选到胡邓的课是你一生的福气!”"
- 【胡邓】_刺猬皮小袄_新浪博客 (在「Google 網頁註解」中檢視)

C

Port Check Program (in C) Part 1

Many programs exist that have the need to check the status of a port for one reason or another. In the least simply pre-checking for an open port can save a great deal of time for a program (especially if it relies upon default timing when doing the real connection). Recently I had the need to write a sort of pre-check program that would see if a port was open and could be accessed over the network. This series examines the rapid prototyping I ended up doing to get the program from a to z. It is designed for those who simply need or want to know how to do this sort of thing. This particular example is done in C, however, there might be follow on texts that tackle the task in other languages.

參考來源:

"Port Check Program (in C) Part 1 Many programs exist that have the need to check the status of a port for one reason or another. In the least simply pre-checking for an open port can save a great deal of time for a program (especially if it relies upon default timing when doing the real connection). Recently I had the need to write a sort of pre-check program that would see if a port was open and could be accessed over the network."
- Port Check Program Part 1 (在「Google 網頁註解」中檢視)

Daily Bookmarks 20100717

lxer
http://lxer.com/module/newswire/viewby.php?filter=9

蘇州上海杭州攻略

這個是蘇州上海杭州攻略 在去哪裡的blog 上的參考

參考來源:

"10月底的苏州 上海 杭州行详细攻略 (2009年10月29日) 分类: 默认分类 第一天 首都机场到无锡硕放机场     机票:260+50 从机场到苏州 每天10:30   11:20  14:30  17:10   20:20在无锡机场到达出口处门口有依维柯民航班车到苏州市区,票价30元每人。 入住苏州酒店  位于人民路上平门站的格林豪泰   酒店离汽车站及火车站都很近步行即可到达        去观前街商业区  有很多老字号   第二天 从酒店步行去了拙政园  狮子林  苏州博物馆"
- 地瓜地~ (在「Google 網頁註解」中檢視)

分享到校內

這個說明了怎麼不用插件分享至校內

參考來源:

"不用插件实现分享博文至校内 2009-06-30 By Leo.N 其实这是别人在WordPress.org.cn上提出来的问题,因为我也时不时弄下校内,所以就研究了下怎么实现。 首先,找到你所使用模板里的single.php,用文本编辑器打开(注意选择用UTF-8编码,某则会出现乱码)。 在适当位置添加一下代码: <a href="http://share.xiaonei.com/share/buttonshare.do?link=<?php the_permalink() ?>&title=<?php the_title(); ?>"target="_blank">分享到校内</a> 解释: http://share.xiaonei.com/share/buttonshare.do?link= 是校内提交分享地址的接口,等号后面的就是所需提交的地址; <?php the_permalink() ?>"
- 不用插件实现分享博文至校内 - 不知所云 Leo.N's Blog (在「Google 網頁註解」中檢視)

Thursday, July 15, 2010

Daily Bookmarks 20100715

A Web Search Engine for Indexing, Searching and Publishing Arabic Bibliographic Databases
http://www.isoc.org/inet99/proceedings/posters/085/index.htm#ref18

Computer Science 226Algorithms and Data StructuresSpring 2003
http://www.cs.princeton.edu/courses/archive/spring03/cs226/info.html

Algorithms in C code
http://www.cs.princeton.edu/~rs/Algs3.c1-4/code.txt

An Introduction to XML and Web Technologies example
http://www.brics.dk/ixwt/examples.html


External Memory Algorithms and Data Structures (EMADS), Fall 2003
http://www.daimi.au.dk/~gerth/emF03/

Monday, July 12, 2010

Daily Bookmarks 20100712

how to design template

http://www.freetemplatesonline.com/templates/

http://www.oswd.org/

http://dzineblog.com/2008/07/best-photoshop-layout-design-tutorials.html

http://www.photoshopsupport.com/tutorials/jennifer/web-template.html#free_website_design_resources

http://www.webstockbox.com/css/converting-photoshop-web-template-file-to-htmlxhtmlcss-web-page-file-video-tutorial/