摘要: 原文:http://coolshell.cn/articles/4102.html 作者:陈皓有人在酷壳的留言版上询问下面的问题keep_walker:今天晚上我看到这篇文章。http://programmers.stackexchange.com/questions/62502/small-c-projects我也遇到了和提问的老外一样的问题。。能给像遇到这样烦恼的程序员一点建议嘛?谢谢!我相信,这可能是很多朋友的问题,我以前也有这样的感觉,编程编到一定的时候,发现能力到了瓶颈,既不深,也不扎实,半吊子。比如:你长期... 阅读全文
posted @ 2013-07-19 08:18 Finlay Liu 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 原文:http://coolshell.cn/articles/2606.html 作者:陈皓对我来说,一个好的程序员应该是努力去追求尽可能无错的高质量的符合需求的代码实现。 一些人也许认为好的程序员是那些懂得多门编程语言,懂得很牛技术的程序员,是的,这在某些情况下是对的。但归根到底,无论你用什么样的技术,什么样的语言,所有的程序被写出来,其功能都要符合需求以及尽可能地健壮无错和高质量。 我们可以想像一下,如果一个能力普通的程序员有足够多的时间来做测试,那么,其也可以保证他的代码的质量。所以,有一种观点这样认为——要达到质量高的代码只需要有足够多的时间来做测试。这对于以结果为导向的商业软件开. 阅读全文
posted @ 2013-07-19 08:15 Finlay Liu 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1、创建空的SQLite数据库。//数据库名的后缀你可以直接指定,甚至没有后缀都可以//方法一:创建一个空sqlite数据库,用IO的方式FileStreamfs=File.Create(“c:\\test.db“);//方法二:用SQLiteConnectionSQLiteConnection.CreateFile(“c:\\test.db“);创建的数据库是个0字节的文件。2、创建加密的空SQLite数据库//创建一个密码为password的空的sqlite数据库SQLiteConnection.CreateFile(“c:\\test2.db“);SQLiteConnectioncnn= 阅读全文
posted @ 2013-07-18 15:59 Finlay Liu 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 1.变量的取用与设定 ●变量的取用:echo ●变量的设定规则 变量与变量内容以一个等号『=』来连结。 等号两边不能直接接空格符。 变量名称只能是英文字母和数字,但是开头字符不能是数字。 变量内容若有空格符可使用双引号『"』或单引号『'』将变量内容结合起来。2.环境变量的功能 ●用env观察环境变量与常见环境变量说明。 ●用set观察所有变量。3.提示符的设定 ● \d :可显示出『星期 月 日』的日期格式,如:"Mon Feb 2"。 ● \H :完整的主机名。举例来说,鸟哥的练习机为『www.vbird.tsai』。 ● ... 阅读全文
posted @ 2013-07-13 10:36 Finlay Liu 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 1.X Winsows与文本模式的切换 ●[Ctrl] + [Alt] + [F1] ~ [F6] :文字接口登入 tty1 ~ tty6 终端机。 ●[Ctrl] + [Alt] + [F7] :图形接口桌面。 在 Linux的两种登录模式中,一种仅有纯文本接口(所谓的执行等级 run level 3)的登录环境,在这种环境中你可以有 tty1~tty6 的终端界面,但是并没有图形窗口接口的环境。另一种是图形接口的登入环境(所谓的执行等级 run level 5),这个环境中就具有 tty1~tty7 ,其中的 tty7 就是开机完成后的默认的图形环境。 在纯文本启动Linu... 阅读全文
posted @ 2013-07-12 18:08 Finlay Liu 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Edge DetectionTime Limit:1000MSMemory Limit:10000KTotal Submissions:15307Accepted:3445DescriptionIONU Satellite Imaging, Inc. records and stores very large images using run length encoding. You are to write a program that reads a compressed image, finds the edges in the image, as described below, an 阅读全文
posted @ 2013-06-14 19:53 Finlay Liu 阅读(424) 评论(0) 推荐(0) 编辑
摘要: 在VC6.0上编写某个读取文件的控制台程序时,出现这样一个错误。cannot convert parameter 1 from 'class std::basic_string,class std::而我的代码非常简单,我感觉完全不存在错误。bool ReadFile(string path) { ifstream istream; //读文件流 istream.open(path); }在网上找了很多解决方法,最后得出的方法是:在路径字符串后面加上.c_str()。 因为open()成员函数的参数是一个char *类型的量,要通过调用 string类的c_... 阅读全文
posted @ 2013-06-12 21:16 Finlay Liu 阅读(941) 评论(0) 推荐(0) 编辑
摘要: 前一段时间刚装了centos 5.4和win7的双系统。发现win7的系统时间不对,机子没上网,每天开机时,总会慢8小时,不知道怎么回事,因为忙别的事情,所以过了那几天才找原因,后来发现 windows time服务没有自动,所以想当然认为是这个原因。 用了几次也没发现什么异常,因为今天开机时候没插网线,直接进了 ubuntu,发现时间快了8小时,插上网线就正常了,所以觉得不太正常,所以重启进了win7,发现慢了8小时,这才意识到可能是两个系统设置不同,导 致的这个时间问题。于是google: 两个概念: UTC即Universal Time Coordina... 阅读全文
posted @ 2013-06-11 18:05 Finlay Liu 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Maya CalendarTime Limit:1000MSMemory Limit:10000KTotal Submissions:58623Accepted:18070DescriptionDuring his last sabbatical, professor M. A. Ya made a surprising discovery about the old Maya calendar. From an old knotted message, professor discovered that the Maya civilization used a 365 day long ye 阅读全文
posted @ 2013-06-11 10:27 Finlay Liu 阅读(181) 评论(0) 推荐(0) 编辑
摘要: DNA SortingTime Limit:1000MSMemory Limit:10000KTotal Submissions:73451Accepted:29334DescriptionOne measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order with respect to each other. For instance, in the letter sequence ``DAABEC'', this measu 阅读全文
posted @ 2013-06-10 10:22 Finlay Liu 阅读(344) 评论(0) 推荐(0) 编辑
摘要: BiorhythmsTime Limit:1000MSMemory Limit:10000KTotal Submissions:101515Accepted:31323DescriptionSome people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and they have periods o 阅读全文
posted @ 2013-06-09 14:24 Finlay Liu 阅读(227) 评论(0) 推荐(0) 编辑
摘要: I Think I Need a HouseboatTime Limit:1000MSMemory Limit:10000KTotal Submissions:77638Accepted:33359DescriptionFred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is actually shrinking by 阅读全文
posted @ 2013-06-09 14:22 Finlay Liu 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 输出彩色的控制台文字#include #include #include #include using namespace std; void cprintf(char* str, WORD color, ...); int main() { cprintf("H", 10); cprintf("e", 9); cprintf("l", 12); cprintf("l", 11); cprintf("o", 13); cprintf(" ", 10); cprintf(&qu 阅读全文
posted @ 2013-06-09 11:12 Finlay Liu 阅读(418) 评论(0) 推荐(0) 编辑
摘要: Financial ManagementTime Limit:1000MSMemory Limit:10000KTotal Submissions:104785Accepted:50227DescriptionLarry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to grab hold of his financial portfolio an 阅读全文
posted @ 2013-06-08 20:59 Finlay Liu 阅读(222) 评论(0) 推荐(0) 编辑
摘要: HangoverTime Limit:1000MSMemory Limit:10000KTotal Submissions:89330Accepted:43182DescriptionHow far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be perpendicular to the table.) W 阅读全文
posted @ 2013-06-08 20:50 Finlay Liu 阅读(224) 评论(0) 推荐(0) 编辑