自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 资源 (9)
  • 收藏
  • 关注

原创 10行代码解释super最常用的情形

class super(object): def __init__(self, cls, instance): mro=instance.__class__.__mro__ self.instance=instance self.next_parent=mro[mro.index(cls)+1] def __getattribute_

2016-04-29 15:26:53 487

原创 N-queens generator implementation in Racket

我发现Racket真是一个很用心的语言. 它有Python里的generator

2014-08-14 11:36:16 552

原创 经典递归算法之排列,组合,集合和换零钱, Python yield实现.

对于每个函数名f,还有个非递归的版本xf

2014-08-08 14:51:41 1220

原创 Cython红黑树版

就这个程序而言,幸幸苦苦

2014-07-19 02:35:09 614

原创 Python红黑树实现(带树的图形化展示方法)

BLACK = 0RED = 1#graphic elements of rbtree for printingVC = '│'HC = '─'SIZE = 3RIG = '┌' + HC * SIZELEF = '└' + HC * SIZESP = chr(32)IND1 = SP * (SIZE + 1)IND2 = VC + SP * SIZEclass rbno

2014-07-18 14:21:35 3785 3

原创 C# 首个程序

using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Text.RegularExpressions;namespace words{ class P

2014-07-15 22:47:56 471

原创 C语言散列表普通探测版

这个是常规的散列表,大小总是为素数.探测方法也

2014-07-15 00:29:31 834

原创 python3 无法读取文本时尝试用二进制方式

import re     res=[]     with open('words','rb') as f:         for line in f:             for word in re.split(rb'[^a-zA-Z]',line):                 if word:                     res.append(

2014-07-09 18:54:55 1142

原创 C红黑树统计英文单词数量

/* ============================================================================ Name : rbtree.c Author : xiang nan Version : Copyright : 1987-2014 Description : Hello World in

2014-07-09 00:51:48 713

原创 eclipse自定义java模板的详细步骤

1.关键是要知道插入模板的快捷键.Windows-->Preferences-->General-->Keys 找到并设置:Content Assist -->Shift+Ctrl+Space完成第二步后,你在编辑java文件时,键入'heima'然后Shift+Ctrl+Space,就会自动插入模板 了.2.新建某个java模板.Windows

2014-06-27 12:44:08 643

原创 Python3散列表的简单实现(C语言)

C语言真是不好惹.我不断地

2014-06-20 22:08:16 946

原创 Python 3 函数式编程之列表解析的坑

[f(2) for f in [lambda i:(lambda j:i*j) for i in [1,2,3,4,5]]]

2014-06-07 16:51:12 698

原创 堆排序PYTHON实现

class arr(list): passa=arr([3,5,1,2,9,3,0,7,5,6,3,2])def left(i):return ((i+1)<<1)-1def right(i):return (i+1)<<1def p(i):return (i-1)>>1def heapfy(r,i): t=left(i) s=right(i) if

2014-06-03 15:54:47 518

原创 开放寻址法PYTHON实现

KEYS = (12,6554,12345,34234,234234,6456456,34234,67645,2343432,23423,1343324)DELETED = -1m=len(KEYS)T=[None for _ in range(m)]def h1(k): return kdef h2(k): return 1+(k%(m-1))def h(k,i):

2014-06-02 00:09:45 1269

转载 Python dictionary implementation

http://www.laurentluce.com/posts/python-dictionary-implementation/

2014-05-30 11:43:10 776

原创 C原地快速排序

#include //pt用于打印一个数组void pt(int *r,int ini,int end){ int i; for(i=ini;i<=end;i++){ printf("%d ",r[i]); } printf("\n");}//swap用于交换a和b的值void swap(int *a,int *b){ int

2014-04-30 16:58:34 723 1

原创 插入排序

def sort_insert(arr,reverse=True):    print('排序之前的数组%s'%(arr))    size = len(arr)    if reverse:        cmp = lambda x,y:x>y    else:        cmp = lambda x,y:x<y            def recur(r):

2014-03-27 11:40:18 338

The C# Players Guide 2 (带目录,非扫描版)

网上的是没有带目录的,我加了上去.方便查阅

2016-04-10

Parsing Techniques - A Practical Guide - 2008

原书,我把书签加进去了,方便查阅. 有图为证: http://img0.ph.126.net/j1bZB00U8l0EBKCZx8mTDA==/6631310757774240951.png

2016-03-02

http/1.1协议2014年最新版

这是我从rfc官方文档页面pdf合并而成的,rf7230至7235.这几个rfc是取代1999年的rfc2616.我只添加了书签.方便查阅.

2016-03-01

Nginx official documentation

我把nginx官方的文档爬到了本地,修改了一些url映射关系,使得文档本地化. 使用说明:解压后是一个文件夹nginx, 双击里面的index.html即可.

2016-02-03

the go programming language

Alan A. A. Donovan · Brian W. Kernighan 大神联合经典之作,亚马逊好评如潮

2015-12-17

Excel 2010 开发人员参考 chm版

Excel 2010 VBA ,格式是 chm版. 微软本身没有做这个玩意,我从hxs里面提取出来的.

2014-03-23

how to design programs 2nd edition chm版

CHM版本.据说此书很经典.但目前网上似乎没有离线版.今天终于全部爬完.暂时没发现和原版有什么区别.

2013-11-30

空空如也

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

TA关注的人

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