- 浏览: 88763 次
- 性别:
- 来自: 北京
-
最新评论
-
Bloodwolf:
gaowei52306 写道怎样在Linux中设置路由,用此方 ...
Loadrunner IP欺骗 -
gaowei52306:
怎样在Linux中设置路由,用此方法在Windows操作系统上 ...
Loadrunner IP欺骗
文章列表
Exercise 2.53. What would the interpreter print in response to evaluating each of the following expressions?
(list 'a 'b 'c)(list (list 'george))(cdr '((x1 x2) (y1 y2)))(cadr '((x1 x2) (y1 y2)))(pair? (car '(a short list)))(memq 'red '((red shoes) (blue socks)))(memq 'red '(red shoes blue so ...
Exercise 2.52. Make changes to the square limit of wave shown in figure 2.9 by working at each of the levels described above. In particular:
a. Add some segments to the primitive wave painter of exercise 2.49 (to add a smile, for example).
b. Change the pattern constructed by corner-split (for ...
Exercise 2.51. Define the below operation for painters. Below takes two painters as arguments. The resulting painter, given a frame, draws with the first painter in the bottom of the frame and with the second painter in the top. Define below in two different ways -- first by writing a procedure th ...
couchbase的备份与恢复
- 博客分类:
- Linux
couchbase是一种NoSql数据库,详细可参见http://www.couchbase.com
找到这样一个目录:couchbase-core/bin,这里有很多脚本,当然备份和恢复脚本也在这个目录,分别是cbbackup和cbrestore。
假设需要备份的bucket叫做test,备份到/tmp,执行:
cbbackup data/test-data/test /tmp
恢复时,执行:
cbrestore -v -utest /tmp/test /tmp/test-0.mb /tmp/test-1.mb /tmp/test-2.mb /tmp/test-3.m ...
运行程序时提示 cannot open shared object file: ...,是因为找不到共享库,即.so文件,可通过如下方式设置共享库的搜索路径:
1. 编辑/etc/ld.so.conf文件,加上一行.so文件路径
2. 运行ldconfig,更新/etc/ld.so.cache
Exercise 2.50. Define the transformation flip-horiz, which flips painters horizontally, and transformations that rotate painters counterclockwise by 180 degrees and 270 degrees.
(define (flip-horiz painter)
(transform-painter painter
(make-vect 1.0 0.0)
...
Exercise 2.49. Use segments->painter to define the following primitive painters:
a. The painter that draws the outline of the designated frame.
b. The painter that draws an ``X'' by connecting opposite corners of the frame.
c. The painter that draws a diamond shape by connecting the midp ...
Exercise 2.48. A directed line segment in the plane can be represented as a pair of vectors -- the vector running from the origin to the start-point of the segment, and the vector running from the origin to the end-point of the segment. Use your vector representation from exercise 2.46 to define a r ...
Exercise 2.47. Here are two possible constructors for frames:
(define (make-frame origin edge1 edge2) (list origin edge1 edge2))(define (make-frame origin edge1 edge2) (cons origin (cons edge1 edge2)))
For each constructor supply the appropriate selectors to produce an implementation fo ...
Exercise 2.46. A two-dimensional vector v running from the origin to a point can be represented as a pair consisting of an x-coordinate and a y-coordinate. Implement a data abstraction for vectors by giving a constructor make-vect and corresponding selectorsxcor-vect and ycor-vect. In terms of yo ...
Exercise 2.45. Right-split and up-split can be expressed as instances of a general splitting operation. Define a procedure splitwith the property that evaluating
(define right-split (split beside below))(define up-split (split below beside))
produces procedures right-split and up-split wi ...
Exercise 2.44. Define the procedure up-split used by corner-split. It is similar to right-split, except that it switches the roles ofbelow and beside.
参考right-split,比较简单:
(define (up-split painter n)
(if (= n 0)
painter
(let ((smaller (up-split painter (- n 1))))
...
Exercise 2.43. Louis Reasoner is having a terrible time doing exercise 2.42. His queens procedure seems to work, but it runs extremely slowly. (Louis never does manage to wait long enough for it to solve even the 6× 6 case.) When Louis asks Eva Lu Ator for help, she points out that he has interch ...
Exercise 2.42.
Figure 2.8: A solution to the eight-queens puzzle.
The ``eight-queens puzzle'' asks how to place eight queens on a chessboard so that no queen is in check from any other (i.e., no two queens are in the same row, column, or diagonal). One possible solution ...
Exercise 2.41. Write a procedure to find all ordered triples of distinct positive integers i, j, and k less than or equal to a given integer n that sum to a given integer s.
(define (find-triples n s)
(filter (lambda (l)
(if (= (sum l) s)
#t
...