练习4-6原文Exercise 4.6. Let expressions are derived expressions, because
(let (( ) … ( )) )
is equivalent to
((lambda ( … ) ) )
Implement a syntactic transformation let->combination that reduces...
分类:
其他好文 时间:
2015-04-01 09:35:32
阅读次数:
153
Spent time to write down C# program to implement an algorithm. Feel great! Start to practice, a question a time.Question is from careercup:http://www....
分类:
其他好文 时间:
2015-04-01 08:17:38
阅读次数:
225
本文转自:http://wangym.iteye.com/blog/1265973RunnableTest.java:/** * */package concurrency;/** * @author xuanyin * */public class RunnableTest implement.....
分类:
其他好文 时间:
2015-04-01 01:38:37
阅读次数:
149
LRU CacheDesign and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get...
分类:
系统相关 时间:
2015-03-31 21:42:12
阅读次数:
167
题目描述:
Implement int sqrt(int x).
Compute and return the square root of x.
题目翻译:输入x,返回sqrt(x);
C语言版:
int mySqrt(int x) {
int t, l, r, mid;
l = 1;
r = x>>1;
if (x <...
分类:
其他好文 时间:
2015-03-31 12:48:22
阅读次数:
125
problem:
Implement pow(x, n).
Hide Tags
Math Binary
Search
题意:求x的n次幂
thinking:
(1)最简单想到的是直观上的数学幂函数求法,测试通过。算法时间复杂度为O(n)
(2)按照标签提示,使用二分搜索法。pow(x,n) = po...
分类:
其他好文 时间:
2015-03-31 10:58:50
阅读次数:
130
从Pyqt的examples中看到一段截图代码, (路径:examplas\desktop\screenshot.py) 所以想自己UI下界面,手动练习下通过UI生成的: Screenshot.py 1 # -*- coding: utf-8 -*- 2 3 # Form implement...
分类:
其他好文 时间:
2015-03-31 10:40:40
阅读次数:
171
https://leetcode.com/problems/regular-expression-matching/Implement regular expression matching with support for'.'and'*'.'.' Matches any single chara...
分类:
其他好文 时间:
2015-03-30 22:52:12
阅读次数:
220
使用Spring自动生成代理类,spring利用的是动态代理机制接口Java代码public interface UserDao {void addUser();void deleteUser();}两个实现:Java代码public class UserDaoMySqlImpl implement...
分类:
数据库 时间:
2015-03-30 20:41:29
阅读次数:
241
泛型编程就是以独立于任何特定类型的方式编写代码,而模板是泛型编程的基础。
(1)定义函数模板(function template)
函数模板是一个独立于类型的函数,可以产生函数的特定类型版本。
// implement strcmp-like generic compare function
template
int compare(const T &v1, const T &...
分类:
编程语言 时间:
2015-03-30 14:43:04
阅读次数:
296