上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 42 下一页
摘要: 这里仅仅是最简单的递归式的生成求解方法,主要是为了分析算法的时间复杂度。总结起来存在下面的几种方法吧。1. 猜测法说白了讲,就是说给定一个递归式,根据“经验”来猜测可能的函数f(n),这里面如果是递归式比较简单的话,很容易猜测,但是如果递归式的形式比较负责,往往猜测法是难以奏效的。2. 递归树该方法的实质就是通过将递归式展开,然后求和的过程,其中可能的难点在于如何计算多项式的和,这里可能需要高等数学的知识啦。3. 万能的方法:公式求解对于一些常见的递归式的话,我们可以直接使用公式进行运算,这个比较简单,但是公式比较长,记忆起来比较恶心,有兴趣可以自己证明一下。 阅读全文
posted @ 2011-03-14 19:08 qiang.xu 阅读(2472) 评论(2) 推荐(0) 编辑
摘要: 1. 渐进符号表示2. 常见函数表示1. 渐进符号2. 常见函数表示2.1 函数的单调性2.2 向下向上取整2.3 取模运算2.4 对数 阅读全文
posted @ 2011-03-14 16:40 qiang.xu 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 1. 实现基本原理2 实现代码1.实现基本原理2. 实现代码usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceFindMissingNumber{//冒泡排序classBubbleSort{publicstaticvoidSort(refint[]arr){inttmp;intlength=arr.Length;for(inti=0;i<length;++i)for(intj=length-1;j>=i+1;--j){//升序排列if(arr[i]>ar 阅读全文
posted @ 2011-03-14 15:55 qiang.xu 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 1. 问题陈述给定一个由n-1个整数组成的未排序的序列,其中的元素都是1到n中的不同整数,请设计一个算法在O(n)的时间内寻找到缺失的那个整数。2. 解题思路2.1 常规的思路,使用二重循环实现,但是算法的时间复杂度在O(n*n)。2.2 可以使用累加求和的方式实现。实现代码如下:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceFindMissingNumber{classProgram{staticvoidMain(string[]args){//n=5intn=5; 阅读全文
posted @ 2011-03-14 14:39 qiang.xu 阅读(489) 评论(0) 推荐(0) 编辑
摘要: 1. 下载bidnow项目源码,解压该文件。2. 点击StartHere.cmd。下面将开始检查该项目的依赖项,如果不能满足,请在下列地址安装所需依赖项。Windows 7, Vista SP1 or Windows Server 2008Windows PowerShellWindows Azure Software Development Kit 1.3Windows Azure AppFabric SDK 2.0Internet Information Services 7.0 (or greater)Microsoft .NET Framework 4Microsoft SQL Exp 阅读全文
posted @ 2011-03-14 10:01 qiang.xu 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 1. 问题描述给定排的数组A,大小为n,现给定数X,判断A中是否存在两数之和等于X。给出一个O(nlg(n))的算法。2. 解决思路首先对数组进行排序,如果使用归并的排序的话,算法的复杂度在nlg(n)级别,然后通过从中间相两边查找即可。3. 实现代码///<summary>///在给定的数组查找是否存在和为sum的两个元素,如果存在///函数返回true,否则false///</summary>///<paramname="arr"></param>///<paramname="sum">&l 阅读全文
posted @ 2011-03-13 20:46 qiang.xu 阅读(2530) 评论(3) 推荐(0) 编辑
摘要: usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceMergeSort{classProgram{staticvoidMain(string[]args){int[]arr=newint[]{1,8,3,5};MergeSort(refarr,0,arr.Length-1);foreach(intiteminarr){Console.WriteLine(item);}Console.ReadKey();}///<summary>///归并排序///</su 阅读全文
posted @ 2011-03-13 20:13 qiang.xu 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 1.Application Platform Overview for Windows Phone2.Installing Windows Phone Developer Tools3.Create First Application for Windows Phone 7 阅读全文
posted @ 2011-03-13 19:35 qiang.xu 阅读(352) 评论(0) 推荐(0) 编辑
摘要: 1 Hello Phone Silverlight2. 代码下载1. Hello Phone Silverlight1.1 新建wp7工程,如下。1.2 vs将会生成项目模板,如下。其中SplashScreenImage.jpg是改程序加载时使用的图片,如下图所示。ApplicationIcon.png是程序显示图标。如果熟悉silverlight的话,App.xaml和MainPage.xaml应该是比较熟悉的。值得注意的是WMAppManifest.xml,该文件是对整个wp7应用程序的配置,该文件内容如下,通过英文的名字很容易知道其中代码的含义。<?xmlversion=" 阅读全文
posted @ 2011-03-13 19:28 qiang.xu 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 1. 开发环境建立2. 网上资源1. 开发环境建立1.1. 安装vs20101.2. 下载安装Windows Phone Developer Tools安装完成之后,wp7的开发环境即以简历完成。2. 网上资源wp7官网:http://www.microsoft.com/windowsphone/en-gb/default.aspxmsdn开发文档:http://msdn.microsoft.com/en-us/library/ff402535(v=VS.92).aspxWindows Phone development quickstarts:http://create.msdn.com/e 阅读全文
posted @ 2011-03-13 18:43 qiang.xu 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 1.OverviewWindowsPhone Application Platform提供了两种开发方式:Silverlight和Xna framework。wp7的界面(模拟器)很简洁:下面包含三个按键,分别是:Back,Start,Search按键。Back类似于浏览器上的按钮。点击Start按钮 ,将进入phone开机界面。search按钮将进入phone内置的搜索功能。wp7提供了对Wi-Fi,Camera,Accelerometer(重力感应),Location,Vibration,FM Radio,Push Notification等功能的支持。2.Architecture3.Th 阅读全文
posted @ 2011-03-13 18:32 qiang.xu 阅读(301) 评论(0) 推荐(1) 编辑
摘要: 1.How Internet Explorer was born?微软公司在1995年退出了自己的第一款浏览器,命名叫“Internet Explorer” ,但实际上这款浏览器是SpyGlass公司研发生产的,194年SpyGlass公司将研发的浏览器source授权给ms公司,于是有了95年的ie的第一个版本。看看这款浏览器吧,今天看上去是如此ugly,无法想象当时的人们对此居然津津乐道。2.Internet Explorer 2ie2是第一款跨平台的浏览器,能够同时支持windows和macos。3.Internet Explorer 34.Internet Explorer 4(Win 阅读全文
posted @ 2011-03-13 17:47 qiang.xu 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 1.了解MEF2. 简单的demo3. 代码下载1. 了解MEFmef是codeplex上的开源项目,地址:http://mef.codeplex.com/,工程目的:simplifying the design of extensible applications and components.2. 简单demo2.1 新建asp.net web application,添加System.ComponentModel.Composition的应用。2.2 添加一个web form页面aspnetMEFBasic.aspx,后台代码如下:usingSystem;usingSystem.Coll 阅读全文
posted @ 2011-03-12 16:38 qiang.xu 阅读(1260) 评论(7) 推荐(0) 编辑
摘要: NuGet is a Visual Studio extension that makes it easy to install and update open source libraries and tools in Visual Studio. 阅读全文
posted @ 2011-03-12 15:53 qiang.xu 阅读(422) 评论(0) 推荐(0) 编辑
摘要: 需要注意的是如果想要通过代理邮件服务器(上图中的gmail,hotmail等)来发送邮件的话,那么个有邮件服务器上需要开启smtp服务,默认的情况下163是开启的,但是qq默认是关闭的。需要开启之后才能使用。/Files/xuqiang/SendingEmailFromClients.zip 阅读全文
posted @ 2011-03-12 15:24 qiang.xu 阅读(1069) 评论(1) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 42 下一页