[alias]
ac = !git add -A && git commit
Используем:
git ac -m "it's alive!!!"
Подсмотренно здесь http://www.vogella.de/blog/2010/12/25/git-alias-add-commit/
Мой Маленький Технический Блог
[alias]
ac = !git add -A && git commit
git ac -m "it's alive!!!"
Links:
http://programmers.stackexchange.com/questions/44177/what-is-the-single-most-effective-thing-you-did-to-improve-your-programming-skil
http://stackoverflow.com/questions/82639/how-to-become-a-better-programmer
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer/
http://www.codinghorror.com/blog/2007/01/how-to-become-a-better-programmer-by-not-programming.html
Design a procedure that evolves an iterative exponentiation process that uses successive squaring and uses a logarithmic number of steps, as does fast-expt.
; code
(define (fast-expt b n)
(define (iter a b n)
(cond
((= n 1) (* a b))
((even? n) (iter a (* b b) (/ n 2)))
(else (iter (* a b) b (- n 1)))))
(iter 1 b n))
; tests
(load "test-manager/load.scm")
(define-each-test
(assert= 1 (fast-expt 2 0))
(assert= 2 (fast-expt 2 1))
(assert= (expt 2 8) (fast-expt 2 8))
(assert= (expt 2 6) (fast-expt 2 6)))
(run-registered-tests)
mit-scheme < ex1_16.scm
1 ]=> (run-registered-tests)
(define (fast-expt b n)
(define (iter a b n)
(cond
((= n 0) a)
((even? n) (iter a (* b b) (/ n 2)))
(else (iter (* a b) b (- n 1)))))
(iter 1 b n))
1 ]=> (run-registered-tests)....
4 tests, 0 failures, 0 errors.