2011年6月25日

摘要: // Jolly Jumper// uva 10038#include <stdlib.h>#include <math.h>#include <stdio.h>#include <string.h>#define MAXSIZE 3001int main(){ // record whether the number from 1 to MAXSIZE-1 appeared. // the effective index is in [1,(MAXSIZE-1)], // so the array size will be MAXSIZE bo 阅读全文
posted @ 2011-06-25 18:03 xuwangyin 阅读(420) 评论(0) 推荐(0)

2011年5月29日

摘要: % \begin{macro}{Chinese Font Size} % 1770年法国人狄道(F.A.Didot)制定点数制,规定1法寸为72点,即:1点=0.3759毫米。 % 狄道点数制在法国、德国、奥地利、比利时、丹麦、匈牙利等国比较流行。 % 1886年全美活字铸造协会以派卡(pica)为基准制定派卡点数制,规定1pica=12point(点),即: % \fbox{1点=0.01383... 阅读全文
posted @ 2011-05-29 08:54 xuwangyin 阅读(892) 评论(0) 推荐(0)
摘要: % a4paper - A4纸 11pt -字体 twoside -双面 openany -新章节可在偶数页开始\documentclass[a4paper,11pt,twoside,openany]{article}%------------------------------纸张大小----------------------------------% 定义转换成pdf文档的纸张大小,应与\p... 阅读全文
posted @ 2011-05-29 08:53 xuwangyin 阅读(767) 评论(0) 推荐(0)

2011年5月15日

摘要: 阅读全文
posted @ 2011-05-15 16:12 xuwangyin 阅读(144) 评论(0) 推荐(0)
摘要: Discussion on StackOverflow 阅读全文
posted @ 2011-05-15 15:35 xuwangyin 阅读(146) 评论(0) 推荐(0)

2011年5月13日

摘要: #file Bclass B: def printargs(self, a, b): print a, b#file Afrom B import Bclass A: def somemethod(self): from timeit import Timer from functools import partial foo = B() t = Timer(partial(foo.printar... 阅读全文
posted @ 2011-05-13 22:04 xuwangyin 阅读(1774) 评论(0) 推荐(0)

2011年5月6日

摘要: http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data 阅读全文
posted @ 2011-05-06 21:25 xuwangyin 阅读(417) 评论(0) 推荐(0)

2011年5月2日

摘要: 第i个最小元素实现//generate a radom number in the interval [left, right]int random(int left, int right){ srand(time(NULL)); return rand() % (right - left + 1) + left;}void swap(int *left, int *right){ int tmp = *left; *left = *right; *right = tmp;}//randomly select one element from the array as the pivot,// 阅读全文
posted @ 2011-05-02 10:51 xuwangyin 阅读(245) 评论(0) 推荐(0)

导航