自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(19)
  • 资源 (2)
  • 收藏
  • 关注

原创 SCIP学习笔记-ex2.25--ex2.31

;Exercise 2.25. Give combinations of cars and cdrs that will pick 7 ;from each of the following lists:;(1 3 (5 7) 9)(define ex2.25-list1 (list 1 3 (list 5 7) 9))(define ex2.25-list1-get-7 (car (cd

2014-04-22 15:22:42 863

原创 SICP学习笔记5 ex2.17 -- ex2.23

; ex2.17(define (last-pair l) (if (null? (cdr l)) l (last-pair (cdr l)))); ex2.18(define (my_reverse l) (if (null? (cdr l)) l (append (my_reverse (cdr l)) (list (car l)

2014-04-18 12:15:07 843

原创 SICP学习笔4--邱奇整数

邱奇非负整数0的定义如下:

2014-04-17 11:45:28 639

原创 SICP学习笔3--lambda

(define (my_cons x y)  (lambda (m) (m x y)))(define (my_car z)  (z (lambda (p q) p)))(define (my_cdr z)  (z (lambda (p q) q)))

2014-04-15 20:28:40 844

原创 SICP学习笔2--循环与递归(iterative process and recursive process)

计算n!递归:(define (factorial n) (if (= n 1) 1 (* n (factorial (- n 1)))))

2014-04-15 14:14:35 953

原创 SICP学习笔记--求值策略 (Evaluation strategy) --应用次序 (Applicative order) vs 正常次序 (Normal order)

“应用次序”(或“最左最内”)求值称呼函数的实际参数按可归约表达式的后序遍历从左至右的求值的策略。不像传值调用,应用次序求值尽可能的在应用函数之前归约函数体内的项。

2014-04-15 12:55:01 2402

转载 30 Python Language Features and Tricks You May Not Know About

original article: http://sahandsaba.com/thirty-python-language-features-and-tricks-you-may-not-know.html#unpacking1.1   Unpacking>>> a, b, c = 1, 2, 3>>> a, b, c(1, 2, 3)>>> a, b, c = [1,

2014-03-10 08:57:08 899

原创 算法导论学习笔记之五--同时得到最大和最小值复杂度3(n/2)

def get_min_max(l): if len(l) < 1: return None if len(l) == 1: return (l[0], l[0]) if l[0] < l[1]: min = l[0] max = l[1] else: min = l[1]

2014-03-09 01:13:05 827

原创 算法导论学习笔记之四--堆排序

def left(i): return i*2 + 1def right(i): return i*2 + 2def parent(i): return (i-1) / 2def max_heapify(A, i): l = left(i); r = right(i); if l A[i]: largest = l

2014-03-08 17:48:48 510

翻译 写给linux系统管理员看的systemd 六 chroot 和防越狱(systemd作者blog翻译过来的)

作为系统管理员或者开发者你迟早碰到chroot()环境。chroot()系统调用只是改变进程和子进程的根目录/, 由此来限制进程能看到的文件目录树结构。chroot()有两种主要应用:

2014-03-07 20:19:09 5069

原创 算法导论学习笔记之三--如何理解和记忆master定理

Master 理论中的递归函数:T(n) = aT(n/b) + f(n), (a>=1, b >1)理解:aT(n/b)表示子项繁殖的速度, f(n)表示给定规模所需常规开销记忆:记实例不记公式实例1:merge排序算法复杂度nlog(n)递归函数:     实例2:普通矩阵乘法算法复杂度(n**3)递归函数:

2014-03-04 15:59:38 1322 1

翻译 写给linux系统管理员看的systemd 五 关闭的三个级别(systemd作者blog翻译过来的)

http://0pointer.de/blog/projects/three-levels-of-off关闭的三个级别systmed中, 关闭一个服务(或者其它unit)有3个基本. 让我们看看都是哪些:你能stop一个服务. 那只是简单的终止服务的运行实例,其它事情做的很少. 如果由于某激活(比如手动激活,socket激活,总线激活,系统启动激活或者硬件插拔激活)需要

2014-03-03 21:54:44 2174

翻译 写给linux系统管理员看的systemd 四 杀掉服务(systemd作者blog翻译过来的)

原文地址:http://0pointer.de/blog/projects/systemd-for-admins-4.htmlKilling ServicesKilling a system daemon is easy, right? Or is it?Sure, as long as your daemon persists only of a single process

2014-03-02 21:20:04 4063

原创 算法导论学习笔记之二--分而治之(divide-and-conquer approach)

如果一个问题当它的规模缩小的时候,问题性质不变,并且问题的规模最小的时候简单可解,就可以采用divide-and-conquer 方法。divide-and-conquer 分以下4步进行:直接解答: 如果问题足够下,可以直接给出答案分解: 把问题分解成同样性质的几个子问题攻克:递归解决子问题。合并:把解决好的子问题合在一起,组成原有问题的答案# 假设问题为

2014-03-02 17:21:31 5086

原创 循环不变性(loop invariant)-证明算法的正确性的一种方法

循环不变性是在算法中循环的前后都保持不变的一种属性。利用循环不变性证明算法正确应该满足3个条件:(算法导论中提到的)初始条件: 首次循环前不变性成立保持条件: 一次循环前不变性如果成立,则下次循环开始前不变性成立终止条件: 循环结束后,循环不变性应能表明程序的正确性例1(正确的程序)def INSERTION_SORT(A): j = 1 while j

2014-03-02 04:21:45 15601

翻译 写给linux系统管理员看的systemd 三如何把SysV Init脚本转换成一个systmed的service文件 (systemd作者blog翻译过来的)

原文地址:http://0pointer.de/blog/projects/systemd-for-admins-3.htmlHow Do I Convert A SysV Init Script Into A systemd Service File?Traditionally, Unix and Linux services (daemons) are started

2014-03-01 22:02:49 4216

翻译 写给linux系统管理员看的systemd 二 给定Service拥有哪些进程(systemd作者blog翻译过来的)

给定Service拥有哪些进程?大多数Linux系统中,如果不做特殊修改,系统中运行的进程的总数十分庞大。想知道哪个进程在干什么以及它属于哪里正变得越来越困难。 有些服务,他们的几个主要工作进程与其他附加进程堆砌在一起,使得"ps"输出结果非常不容易辨认。 更复杂的情况是:像Apache 生成的那些CGI进程,或cron生成的那些用户作业那样,由守护进程产生任意的第三方进程。应对这种情况的

2014-02-28 18:45:30 3340

翻译 写给linux系统管理员看的systemd 第一部分 (systemd作者blog翻译过来的)

http://0pointer.de/blog/projects/systemd-for-admins-1.html就像很多人知道的那样, systemd是新版本fedora(从F14开始)的init系统, 它也正在被一些其它的发行版所采用(例如, OpenSuse).对系统管理员来说,systmed提供了许多新的特性,并在本质上改变和加强了系统管理过程.这篇博

2014-02-25 02:48:56 3007

原创 在opensuse 13.1使用plymouth更换开关机画面

先看看都有啥主题 ls /usr/share/plymouth/themesdetails  openSUSE  text把opensuse目录下的png前景和背景图片都替换掉,然后执行# plymouth-set-default-theme -R openSUSE这样系统自动重新生成boot目录下的镜像文件和bootloader配置文件重启看开关机画面

2014-02-25 01:26:03 1302

make electronics

Want to learn the fundamentals of electronics in a fun, hands-on way? With Make: Electronics, you'll start working on real projects as soon as you crack open the book. Explore all of the key components and essential principles through a series of fascinating experiments. You'll build the circuits first, then learn the theory behind them! Build working devices, from simple to complexYou'll start with the basics and then move on to more complicated projects. Go from switching circuits to integrated circuits, and from simple alarms to programmable microcontrollers. Step-by-step instructions and more than 500 full-color photographs and illustrations will help you use -- and understand -- electronics concepts and techniques. Discover by breaking things: experiment with components and learn from failure Set up a tricked-out project space: make a work area at home, equipped with the tools and parts you'll need Learn about key electronic components and their functions within a circuit Create an intrusion alarm, holiday lights, wearable electronic jewelry, audio processors, a reflex tester, and a combination lock Build an autonomous robot cart that can sense its environment and avoid obstacles Get clear, easy-to-understand explanations of what you're doing and why

2014-07-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除