摘要: 练习1.34这道题我一开始不用Edwin的时候觉得是会陷入无限循环之中。后来在Edwin上试了一下才发现会报错,输出如下:(f f);The object 2 is notapplicable.;To continue, call RESTARTwith an option number:;(R... 阅读全文
posted @ 2015-02-07 13:51 nomasp 阅读(102) 评论(0) 推荐(0) 编辑
摘要: sealed关键字如果我们将类标记为sealed,编译器将不会允许我们从这个类型派生。(C#结构总是隐式密封的。因此,我们永远不可以从结构继承结构,从类继承结构或从结构继承类。结构只能用于建模独立的、用户定义的数据类型。如果希望是is-a关系,就必须使用类。)使用base关键字控制基类的创建pr... 阅读全文
posted @ 2015-02-07 13:24 nomasp 阅读(149) 评论(0) 推荐(0) 编辑
摘要: C#文件属性什么是文件属性文件属性可以用来指示项目系统对应文件执行的操作。具体的操作见下文。Visual Basic和Visual C#的文件都具有4个属性:“FileName”、“BuildAcition”、“CustomTool”、”CustomToolNamespace“。 C... 阅读全文
posted @ 2015-02-07 13:22 nomasp 阅读(329) 评论(0) 推荐(0) 编辑
摘要: A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,a2 + b2 = c2For example, 32 + 42 = 9 + 16 = 25 = 52.There exists exact... 阅读全文
posted @ 2015-02-07 12:26 nomasp 阅读(113) 评论(0) 推荐(0) 编辑
摘要: A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,a2 + b2 = c2For example, 32 + 42 = 9 + 16 = 25 = 52.There exists exact... 阅读全文
posted @ 2015-02-07 12:26 nomasp 阅读(165) 评论(0) 推荐(0) 编辑
摘要: //By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.//What is the 10 001st prime number?static voi... 阅读全文
posted @ 2015-02-07 12:25 nomasp 阅读(118) 评论(0) 推荐(0) 编辑
摘要: //The sum of the squares of the first ten natural numbers is, //12 + 22 + ... + 102 = 385 //The square of the sum of the first ten natural numbers i... 阅读全文
posted @ 2015-02-07 12:24 nomasp 阅读(88) 评论(0) 推荐(0) 编辑
摘要: //2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.//What is the smallest positive number t... 阅读全文
posted @ 2015-02-07 12:24 nomasp 阅读(100) 评论(0) 推荐(0) 编辑
摘要: //A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.//Find the la... 阅读全文
posted @ 2015-02-07 12:23 nomasp 阅读(123) 评论(0) 推荐(0) 编辑
摘要: //The prime factors of 13195 are 5, 7, 13 and 29. //What is the largest prime factor of the number 600851475143 ? static void Main(string[] args) { ... 阅读全文
posted @ 2015-02-07 12:21 nomasp 阅读(95) 评论(0) 推荐(0) 编辑
摘要: //Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be://1, 2... 阅读全文
posted @ 2015-02-07 12:20 nomasp 阅读(109) 评论(0) 推荐(0) 编辑
摘要: //If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.//Find the sum of... 阅读全文
posted @ 2015-02-07 12:19 nomasp 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 一、综述本节我们将来探讨关于图像处理方面的诸多技术和应用。在学完了第一个常用的工具包之后,学习这一节将更加轻松。废话不多说,切入正题。二、平滑处理和图像形态学1、滤波器"平滑处理“或者也称为”模糊处理“,英文名为blurring。对于平滑处理,我们先来介绍一个重要的函数,所有的操作都由这个函数来... 阅读全文
posted @ 2015-02-07 12:17 nomasp 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 通过HighGUI(high-level graphical user interface)可以实现打开窗口、显示图像、读出和写入图像文件,处理鼠标、光标、键盘事件。而HighGUI主要分成“视频输入/输出”、“图像输入/输出”和“GUI工具”,分别在cacap*、grfmt*和window*源... 阅读全文
posted @ 2015-02-07 12:11 nomasp 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 实例一int main(){IplImage* img = cvLoadImage("6085.jpg", 1);IplImage* red = cvCreateImage(cvGetSize(img), img->depth, 1);IplImage* green = cvCreateImag... 阅读全文
posted @ 2015-02-07 12:10 nomasp 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 除了读入图片之外,读写视频也足够简单易学,下面来看看如何读写视频吧。播放硬盘中的视频:#include "highgui.h"int main(int argc,char** argv){ cvNamedWindow("Test2",CV_WINDOW_AUTOSIZE); CvCap... 阅读全文
posted @ 2015-02-07 10:55 nomasp 阅读(282) 评论(0) 推荐(0) 编辑
摘要: #include "highgui.h"int main(int argc,char** argv){ IplImage* img=cvLoadImage(argv[1]); cvNamedWindow("Test1",CV_WINDOW_AUTOSIZE); cvShowI... 阅读全文
posted @ 2015-02-07 10:53 nomasp 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 练习1.33题目第二行描述,只组合起由给定范围得到的项里的那些满足特定条件的项,因此我们需要在这一版本的accumulate中添加一个need-filter?,这个新的谓词可以用来传递下面就要用到的prime?。(define (filtered-accumulateneed-filter? c... 阅读全文
posted @ 2015-02-07 10:37 nomasp 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 练习1.32因为递归比迭代要更容易实现,因此我先考虑的递归。先将sum和product都列出来。(define (sum term a next b)(if(> a b)0(+(term a)(sum term (next a) next b))))(define (product term a... 阅读全文
posted @ 2015-02-07 10:36 nomasp 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 练习1.31题目中已经说的很清楚了,product用来返回在给定范围中各点的某个函数值的乘积。我们惊奇的发现这和前面的sum有着很大的相似,无非是将加法换成了乘法:(define (product term a next b)(if(> a b)1(* (term a)(product term... 阅读全文
posted @ 2015-02-07 10:35 nomasp 阅读(147) 评论(0) 推荐(0) 编辑