自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

ChengTian看过的风景

技术路上,且走且看

  • 博客(36)
  • 资源 (11)
  • 收藏
  • 关注

翻译 微软下一代云环境Web开发框架ASP.NET vNext预览

微软在2014年5月12日的TechEd大会上宣布将会发布下一代ASP.NET框架ASP.NET vNext的预览。此次发布的ASP.NET框架与以前相比发生了根本性的变化,凸显了微软“云优先”(cloud-first)的新战略思想。

2014-05-13 15:20:18 2404

原创 Chapter 4 Trees and Graphs - 4.5

Problem 4.5: Write an algorithm to find the 'next' node (i.e., in-order successor) of a given node in a binary search tree where each node has a link to its parent.To address this problem, the mos

2012-07-22 11:40:48 885

原创 Chapter 4 Trees and Graphs - 4.4

Problem 4.4: Given a binary search tree, design an algorithm which creates a linked list of all the nodes each depth (i.e., if you have a tree with depthD, you'll have D linked lists).BFS, again..

2012-07-22 11:38:46 975

原创 Chapter 4 Trees and Graphs - 4.3

Problem 4.3 Given a sorted (increasing) array, write an algorithm to create a binary tree with minimal height.Seems that we should construct a complete binary tree.from queue import *class bina

2012-07-22 11:37:10 824

原创 Chapter 4 Trees and Graphs - 4.2

Problem 4.2 Given a directed graph, design an algorithm to find out whether there is a route between two nodes.Classic homework in the course of graph theory. Either BFS or DFS can solve it.from

2012-07-22 11:34:19 809

原创 Chapter 4 Trees and Graphs - 4.1

Problem 4.1: Implement a function to check if a tree is balanced. For the purposes of this question, a balanced tree is defined to be a tree such that no two leaf nodes differ in distance from the roo

2012-07-22 11:32:36 801

原创 Chapter 3 Stacks and Queues - 3.6

Problem 3.6: Write a program to sort a stack in ascending order. You should not make any assumptions about how the stack is implemented. The following are the only functions that should be used to wri

2012-07-02 22:24:58 810

原创 Chapter 3 Stacks and Queues - 3.5

Problem 3.5: Implement a MyQueue class which implements a queue using two stacks.The word "two stacks" is a strong hint. I implemented my solution quickly.from stack import *class MyQueue:

2012-07-02 22:23:30 833

原创 Chapter 3 Stacks and Queues - 3.4

Problem 3.4: In the classic problem of the Towers of Hanoi, you have 3 rods and N disks fo different sizes which can slide onto any tower. The puzzle starts with disks sorted in ascending order of siz

2012-07-02 22:21:42 826

原创 Chapter 3 Stacks and Queues - 3.3

Problem 3.3: Imagine a (literal) stack of plates. If the stack gets too high, it might topple. Therefore, in real life, we would likely start a new stack when the previous stack exceeds some threshold

2012-07-02 22:20:22 1144

原创 Chapter 3 Stacks and Queues - 3.2

problem 3.2: How would you design a stack which, in addition to push and pop, also has a function min which returns the minimum element? Push, pop and min should all operate in O(1) time.At first,

2012-07-02 22:18:59 851

原创 Chapter 3 Stacks and Queues - 3.1

Problem 3.1: Describe how you could use a single array to implement three stacks.Splitting the array into three individual parts is quite intuitive.How can we take full advantage of the unused

2012-06-30 12:41:53 985

原创 Chapter 2 Linked Lists - 2.5

Problem 2.5: Given a circular linked list, implment an algorithm which returns node at the beginning of the loop.DEFINITIONCircular linked list: A (corrupt) linked list in which a node's next poin

2012-06-30 12:38:47 977

原创 Chapter 2 Linked Lists - 2.4

Problem 2.4: You have two numbers represented by a linked list, where each node contains a single digit. The digit are stored in reverse order, such that the 1's digit is at the head of the list. Writ

2012-06-11 22:56:41 819

原创 Chapter 2 Linked Lists - 2.3

Problem 2.3: Implement an algorithm to delete a node in the middle of a single linked list, given only access to that node.EXAMPLEInput: the node 'c' from the linked list a->b->c->d->eResult: no

2012-06-11 22:54:24 868

原创 Chapter 2 Linked Lists - 2.2

Problem 2.2: Implement an algorithm to find the nth to last element of a singly linked list.The solution on answer page needs only one iteration while other intuitive solution takes more than one

2012-06-11 22:52:13 748

原创 Chapter 2 Linked Lists - 2.1

2.1 Write code to remove duplicates from an unsorted linked list.FOLLOW UPHow would you solve this problem if a temporary buffer is not allowed?First of all, we should ask the interviewer whic

2012-06-11 22:48:08 1111

原创 Python2.7环境下安装pydbg

最近在看《Python灰帽子:黑客与逆向工程师的Python编程之道》,其中第四章没有详细讲解pydbg的安装,使得我无法顺利运行书中代码。于是我专门花了些时间解决pydbg在Python2.7环境下的安装问题,并贴在这里希望能帮助到其他人。(本文由Wei Wang原创, 欢迎访问我的博客:http://blog.csdn.net/cheng_tian)1. 下载pydbg:请到 http

2012-06-11 13:02:47 4995

原创 Chapter 1 Arrays and Strings - 1.8

Problem 1.8: Assume you have a method isSubString which checks if one word is a substring of another. Given two strings, s1 and s2, write code to check if s2 is a rotation of s1 using only one call to

2012-06-08 15:45:38 704

原创 Chapter 1 Arrays and Strings - 1.7

Problem 1.7: Write an algorithm such that if an element in an MxN matrix is 0, its entire row and column is set to 0.At the first glance, we can just iterate the matrix and when we find a zero, we

2012-06-06 16:17:43 685

原创 Chapter 1 Arrays and Strings - 1.6

Problem 1.6: Given an image represented by an NxN matrix, where each pixel in the image is 4 bytes, write a method to rotate the image by 90 degrees. Can you do this in place?The question is not c

2012-06-06 15:11:07 588

原创 Chapter 1 Arrays and Strings - 1.5

Problem 1.5: Write a method to replace all spaces in a string with '%20'.The first solution flashed into my mind takes O(n), and it's similar to the one on the answer page.import stringdef repl

2012-06-06 15:05:39 561

原创 Chapter 1 Arrays and Strings - 1.4

1.4 Write a method to decide if two strings are anagrams or not.This "easy" problem really taught me a lesson. Firstly, I quickly came up with a somewhat smart solution:import stringdef are_a

2012-06-04 11:51:59 573

原创 Chapter 1 Arrays and Strings - 1.3

The statement of problem 1.3 is:Design an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. NOTE: One or two additional variables are fine.

2012-06-04 00:52:33 853

原创 Chapter 1 Arrays and Strings - 1.2

Problem:1.2 Write code to reverse a C-Style String. (C-String means that "abcd" is represented as five characters, including the null character.)This one is quite easy:# -*- coding:utf-8 -

2012-06-01 18:40:18 656

原创 Chapter 1 Arrays and Strings - 1.1

This the first problem in the "Cracking the Coding Interview" book. The statement of problem is presented below:1.1 Implement an algorithm to determine if a string has all unique characters. What

2012-06-01 17:08:51 995 1

原创 Prologue

"Cracking the Coding Interview" is an amazing book. Students who found good jobs speak highly of it.To find a good job after I graduate from the MS program in 2013, I should go through thi

2012-06-01 17:01:53 676

原创 使用Cmake搭建Qt+VTK工程(顺便推荐超好Cmake入门教程一本)

组内的项目要从MFC+OpenGL向Qt+VTK迁移。最近的任务是先把一个小模块进行尝试性迁移。配置环境过程中发现Qt+VTK的项目配置起来十分麻烦,于是google之,发现使用CMake这个工具可以大大简化我们的配置过程。可惜我从没接触过Cmake,于是再次google之,发现搜索到的相关教程都很是简陋,不系统也不实用。后来在机缘巧合之下找到了一份《Cmake 实践》(http://

2012-02-19 05:58:25 5508 2

原创 易忘知识点——C++类的static数据成员

就要去实习了,迅速过第二遍《C++ Primer》,看到遗忘了的知识点就记在这了。 1.类的static数据成员的初始化不同于普通成员:static成员不是通过构造函数初始化的,而是在定义时进行初始化。即,除了在声明类时声明一次static数据成员,还需要在第一次使用前定

2011-08-19 19:07:14 1116 1

原创 关于学习基础学科与培养编程能力的问答

有学姐即将去往UCSD读CS的master,她本科是学EE的,正在提前补充知识。今天她向我请教了一些问题,我将我的回答贴在这,希望对其他人也有用。 问:打扰又要请教下,你觉得编程能力的培养是需要按部就班系统学习操作系统、数据结构、算法这些之后才能进行,还是可以像本科我

2011-08-17 14:05:49 1369

原创 phplist发送带附件邮件的设置

<br />    phplist的最新版本中添加了发送附件的功能(我使用的是2.10.12),但在默认情况下此功能是关闭的。我们需要打开此功能,同时进行一些配置。步骤如下(windows环境下):<br /> <br />    1.打开lists/config/config.php,搜索<br />        define("ALLOW_ATTACHMENTS",0);<br />    修改为:<br />        define("ALLOW_ATTACHMENTS",1);<br /> <

2010-09-17 00:13:00 2112

原创 phplist(及phpmailer)通过gmail发送邮件的配置方法

<br />    一般来说,只要你使用的不是gmail邮箱,那么利用phplist发送邮件只要按照《邮件群发系统phplist的配置方法总结》配置就够了。但若你如同我一样不幸,必须使用gmail这种有ssl验证的邮箱,那么恭喜你,我的不幸现在已然成为你的幸运,经过数天的尝试,我终于成功将gmail与phplist组合在了一起。现将经验分享于此,希望对各位同我一般境遇的同志有用。另外,phplist的核心是phpmailer,我提出的解决方案也主要是围绕phpmailer的,所以需要使用phpmailer通

2010-08-26 11:02:00 11374 14

原创 邮件群发系统phplist的配置方法总结

开源邮件群发系统phplist的配置方法总结

2010-08-26 10:49:00 9242 6

原创 使用Objective-C中foreach循环的一大注意事项

Objective-C中使用foreach循环时最基本、最重要的一项注意事项

2010-08-08 21:42:00 5542 4

原创 Objective-C中const常量是外连接的

<br /><br />    前几天老师要求实现一个iphone上的“吃豆人”小游戏,给一下午加一晚上的时间。由于粟的设计很合理,且没有考虑太多、太复杂的情况(如 pacman 吃了 magic dot 后所有ghost的速度应该变慢),总体上没遇到什么太大的困难——只是在开发过程中曾遇到一个很诡异的错误:<br />    为了遵循DRY原则,我把公用常量(ghost的数量)定义放在了一个define.h文件中,让大家都去import该文件。<br />    当时我的常量定义是这样写的:<br /> 

2010-07-26 17:39:00 6513 4

原创 Objective-C中init函数实现的相关研究

主要围绕init函数中self = [super init]这一句展开研究

2010-07-16 22:04:00 4095 4

与Python2.7对应的pydasm.pyd

在Python2.7下安装pydbg,如果pydasm.pyd版本不对应是不行的。这是自己编译的pydasm.pyd,与Python2.7配套使用。请使用这个文件替换掉Python安装目录下的Lib/pydbg/pydasm.pyd。

2012-06-11

flex写的菜单源码

做项目时搜到的flex写的菜单源码,希望对正在学习flex的同学们有用^_^

2010-05-16

flex个人空间源码

自己搜到的flex写的仿QQ空间的源码,希望对正在学习flex的同志们有用^_^

2010-05-16

28套个人简历模板大集合.doc

28套个人简历模板大集合,word格式的,希望对正在找工作的同志们有用

2010-05-16

C#程序开发范例宝典书后源码

《C#程序开发范例宝典(第2版)》紧密围绕程序开发人员在编程中遇到的实际问题和开发中应该掌握的技术,全面介绍了应用C#进行程序开发的技术和技巧。全书包括窗体与界面设计、控件应用、组件应用、图形技术、多媒体技术、文件系统、操作系统与Windows相关程序、注册表、数据库技术、SQL查询相关技术、LINQ查询技术、报表与打印技术、图表技术、硬件相关开发技术、网络开发技术、Web编程、加密、安全与软件注册、数据结构与算法、C#高级开发、实用工具、程序打包等共21章,572个实例。 《C#程序开发范例宝典(第2版)》附有配套光盘。光盘提供了书中所有实例的源代码,全部源代码都经过精心调试,在Windows XP/Windows 2000/Windows Server 2003等操作系统下测试通过,均能够正常运行。 《C#程序开发范例宝典(第2版)》适合程序开发人员,也可供大中专院校师生阅读。

2010-05-15

现代编译程序设计.pdf 中文版

本书全面地介绍了现代编译技术,结构上分为通用编译技术和高级编译技术两大部分。第一部分介绍通用的编译程序实现技术,包括词法和语法分析、上下文处理、代码生成以及存储器管理的一般方法。第二部分介绍特定范型语言的高级编译技术,包括命令式语言、面向对象语言、逻辑式语言、函数式语言及并行 / 分布式语言的上下文处理和代码生成等内容。本书注重编译程序的具体实现和优化技术,实例丰富,具有很强的可读性和实用性。   本书可作为高校计算机专业本科和研究生编译程序设计课程的教科书,也可供从事计算机软件开发的人员参考。

2010-05-14

PHP编程起步自学教程

全书分为预备篇(使你初步了解编程、确立你的信心、激发你的兴趣)、开始篇(掌握PHP的基本概念、实用技术要点和应用技巧)、加速篇(全面提升你的编程水平)。书中有很多实例。讲解较细。适合初学者

2010-05-14

[算法设计].Algorithm.Design,.Kleinberg,.Tardos.(AW,.2005)

[算法设计].Algorithm.Design,.Kleinberg,.Tardos.(AW,.2005),国外知名算法设计教材,英文版的,希望对大家有用

2010-04-30

清华大学严蔚敏数据结构习题集(C版)答案

清华大学严蔚敏数据结构习题集(C版)答案,希望对使用这个课本的学生和为考研而奋斗的同学有用

2010-04-30

软件工程专业的导论课件

软件工程导论课件,对希望了解该专业的同学有用

2009-04-11

空空如也

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

TA关注的人

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