2015年3月21日

SICP:对数步数内迭代计算幂的函数

摘要: 在SICP 32(48)页根据书中给出的关系(bn/2)2=(b2)n/2,并且使用一个不变量记录中间结果,写出对数步数内迭代计算幂的函数:方法一(not me):;;; 16-fast-expt.scm(define (fast-expt b n) (expt-iter b n 1))(de... 阅读全文

posted @ 2015-03-21 13:19 Zachary_wiz 阅读(183) 评论(0) 推荐(0) 编辑

2015年3月4日

python__tkinter之listbox&button

摘要: 1 #!/bin/usr/python 2 #-*- coding:utf-8 -*- 3 4 from Tkinter import * 5 6 class show(object): 7 def __init__(self, master): 8 frame = F... 阅读全文

posted @ 2015-03-04 12:44 Zachary_wiz 阅读(743) 评论(0) 推荐(0) 编辑

2015年1月26日

C陷阱与缺陷 之 各种知识技巧

摘要: 1.词法分析中的“贪心法” 编译器将程序分解成符号的方法是,从左到右一个字符一个字符地读入,如果该字符可能组成一个符号,那么再读入下一个字符,判断已经读入的两个字符组成的字符串是否可能是一个符号的组成部分:如果可能,继续读入下一个字符,重复上述判断,直到读入的字符组成的字符串已不再可能组成一个有意... 阅读全文

posted @ 2015-01-26 23:43 Zachary_wiz 阅读(295) 评论(0) 推荐(0) 编辑

2014年12月5日

ACM && Find Minimum in Rotated Sorted Array

摘要: 1 /*Find Minimum in Rotated Sorted Array */ 2 #include 3 #include 4 using namespace std; 5 6 int find(vector & num, int begin, int end) ; 7 int fi... 阅读全文

posted @ 2014-12-05 17:32 Zachary_wiz 阅读(104) 评论(0) 推荐(0) 编辑

2014年11月28日

windows编程一些小知识

摘要: 1.Unicode字符。 以一个内建的数据类型wchar_t,以其来表示16位的Unicode(UTF-16)字符。 eg:wchar_t c=L'A'; 在WinNT.h中定义有: typedef char CHAR;//An 8-bit character typedef wchar_t ... 阅读全文

posted @ 2014-11-28 20:07 Zachary_wiz 阅读(201) 评论(0) 推荐(0) 编辑

2014年11月23日

Linux_C pthread 关于多线程一个简单的程序

摘要: 1 /******************************************************************************* 2 * twordcount.c threaded word counter for two files 3 */ 4 #inc... 阅读全文

posted @ 2014-11-23 15:31 Zachary_wiz 阅读(185) 评论(0) 推荐(0) 编辑

2014年11月22日

ACM&贪心算法

摘要: // Source : https://oj.leetcode.com/problems/jump-game/// Author : wizzhangquan@gmail.com// Date : 2014-11-22/**************************************... 阅读全文

posted @ 2014-11-22 14:41 Zachary_wiz 阅读(221) 评论(0) 推荐(0) 编辑

2014年11月17日

Linux_C socket 数据报之client, server.c

摘要: dgrecv.c 1 /**************************************************************** 2 * dgrecv.c - datagram receiver 3 * usage: dgrecv portnum... 阅读全文

posted @ 2014-11-17 21:24 Zachary_wiz 阅读(365) 评论(0) 推荐(0) 编辑

2014年11月15日

Linux_C socket 数据报之一些辅助函数

摘要: 1 /******************************************************************** 2 * dgram.c 3 * support functions for datagram based programs 4 */ 5 #incl... 阅读全文

posted @ 2014-11-15 22:13 Zachary_wiz 阅读(238) 评论(0) 推荐(0) 编辑

Linux_C socket 服务器与客户端交互程序(输入小写转换为大写)

摘要: client.c 1 /* interactionSocket/client.c 2 * 实现终端与服务器端的交互式输入输出 3 */ 4 #include 5 #include 6 #include 7 #include 8 #include 9 ... 阅读全文

posted @ 2014-11-15 20:32 Zachary_wiz 阅读(538) 评论(0) 推荐(0) 编辑

导航