Problem with a car: A customer towned to my shop a Mercedes' C180 W202 year 1997 with no working keys. The key itself won't turn in EIS and wont unloc...
分类:
其他好文 时间:
2015-02-26 18:05:33
阅读次数:
506
Android 多媒体系统的整体业务和主要业务...
分类:
移动开发 时间:
2015-02-24 11:25:17
阅读次数:
163
There areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car with an unlimited gas tank and it costscost[...
分类:
其他好文 时间:
2015-02-24 00:46:50
阅读次数:
228
??
练习2.42
这道题曾经在C#中写过,但是写出来的代码却没有Lisp中的朴素。用了一大堆的数组和for循环。但是在这里,用car、cdr来构造就行了。
我们按书中给出的步骤来一步一步求解这个问题。首先是棋局,就按书上的示意图,从上往下的来排皇后的位置。诸如此时书中皇后的位置为:’(6 3 1 7 5 8 2 4)。
然后就是过程adjoin-position。rest...
分类:
其他好文 时间:
2015-02-23 09:46:38
阅读次数:
172
??
练习2.39
通过前一习题的类比相信已经知道了fold-left和fold-right的内在意义,本题中要求的逆序数可以用cons来构造。具体为,先将list的第一个元素取出用(cons
(car list) ‘() )构造,接着第二个、第三个……用(cons
…… (cons (car (car list) ) (cons (carlist) ‘())))。当然了,在这个...
分类:
其他好文 时间:
2015-02-23 09:46:37
阅读次数:
121
??
练习2.29
这种题,还有之前的那个rectangle的题目,对于变量、函数等的命名简直要让人疯掉。先来写出题目中的left-branch和right-branch吧。
(define (left-branch mobile)
(car mobile))
(define (right-branch mobile)
(cadr mobile))
...
分类:
其他好文 时间:
2015-02-22 14:37:40
阅读次数:
141
??
练习2.46
这道题就是彻头彻尾的”构造”了。直接上代码吧。
(define (make-vect xcor ycor) (listxcor ycor))
(define (xcor-vect v) (car v))
(define (ycor-vect v) (cdr v))
(define (add-vect first-vectsecond-vect...
分类:
其他好文 时间:
2015-02-22 14:37:05
阅读次数:
133
linux启动过程1、BIOS(basic
inoutsystem)通电检查硬件,然后加载第一可用启动项的mbr;#可通过BIOS设置各种介质存储设备的启动顺序,比如:cdrom、disk、usb2、MBR(mainboot
recorder)磁盘的第一个扇区,共512字节,446字节的boot程序空间,64字节的分区表,2字节的校验位..
分类:
系统相关 时间:
2015-02-17 23:40:49
阅读次数:
165
??
练习2.4
直接运用对比的技巧就可以猜测出相应的cdr表示如下:
(define (cdr z)
(z (lambda (p q) q)))
但我们还是要按照题中要求用代换模型来检验。先来检验car的。
(car (cons 0 1))
(car (lambda (m) (0 1)))
((lambda (z) (z (lambda (p...
分类:
其他好文 时间:
2015-02-17 21:06:55
阅读次数:
144
With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas s...
分类:
其他好文 时间:
2015-02-15 16:27:05
阅读次数:
168