上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 42 下一页
摘要: usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceInsertionSort{classProgram{staticvoidMain(string[]args){int[]arr=newint[]{1,5,3,6,2,9};intkey;intj;inttmp;for(inti=1;i<arr.Length;++i){key=arr[i];//将数值插入到合适位置j=i-1;while((j>0)&&(arr[j]>key))//升序{/ 阅读全文
posted @ 2011-03-11 21:38 qiang.xu 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 1. 情景描述2. 测试代码1. 情景描述首先使用asp.net中自带空间FileUpload将图片上传到服务器上之后,在&ldquo;在线编辑器&rdquo;中需要显示该图片,需要得到该图片的以http://开头的url路径2. 测试代码其实只需要使用System.Web.UI.Control.ResolveUrl (string),其中string参数是上传图片的相对路径。 阅读全文
posted @ 2011-02-13 19:34 qiang.xu 阅读(2145) 评论(0) 推荐(0) 编辑
摘要: 1.iframe自适应高度?2. 上传图片并保存到服务器上之后,如何得到该图片服务器路径(http://...) 更新中... 阅读全文
posted @ 2011-02-13 10:58 qiang.xu 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 1. 下载代码jquery-auto-iframe-height或者下载2. 使用demo代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->&lt;!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;& 阅读全文
posted @ 2011-02-13 10:49 qiang.xu 阅读(1493) 评论(0) 推荐(0) 编辑
摘要: 1. 参看配置文件中的connection string name是否正确。2.I can think of two reasons:2.1 You are using Azure SDK 1.3 and the SetConfigurationSettingPublisher must be called in your Global.asax.cs Application_Start2.2 You are not setting the Startup project as the *.CloudService one. 阅读全文
posted @ 2011-02-10 21:32 qiang.xu 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 1. 工具下载2. 代码下载及代码分析1. 工具下载如何生成数据库中某张表的插入,删除,更新的存储过程,可以使用这个工具,这里可以下载:下载地址.2. 代码下载及代码分析2.1 代码下载2.2 代码分析在.net中代码的自动生成简单的哦可以通过string的拼接实现,另外的可以考虑使用codedom来实现代码自动生成。这个示例中使用的是“string拼接”实现的:publicstaticstringCreateInsertSP(stringspName,stringTableName,DataRow[]Columns){stringSQL=string.Empty;SQL=String.For 阅读全文
posted @ 2011-02-10 21:28 qiang.xu 阅读(1031) 评论(0) 推荐(0) 编辑
摘要: sql代码:USE [BeijingAgricultureDB]GODECLARE @return_value intEXEC @return_value = [dbo].[SelectTopNNotifications] @num = 2SELECT 'Return Value' = @return_valueGO其他示例:/* Show not having access to variables from the calling batch. */DECLARE @CharVariable CHAR(3)SET @CharVariable = 'abc' 阅读全文
posted @ 2011-02-07 22:39 qiang.xu 阅读(800) 评论(0) 推荐(0) 编辑
摘要: 当你在安装了.NET Framework 4.0以上版本后,当你的应用程序以.NET Framework 4.0为框架版本,你的任意服务器请求,都将被进行服务器请求验证(ValidationRequest),这不仅包括ASP.NET,同时也包括Web Services等各种HTTP请求,不仅仅针对aspx页面,也针对HTTP Handler,HTTP Module等,因为这个验证(Valify)的过程,将会发生在BeginRequest事件之前。 问题的解决方案就是在全局级别(Web.config中)设置&lt;configuration&gt;&lt;system.w 阅读全文
posted @ 2011-02-06 02:09 qiang.xu 阅读(300) 评论(0) 推荐(0) 编辑
摘要: By default, FileUpload control will not work inside an UpdatePanel control for uploading files using Asynchronous postback. This is because, the file uploading and file manipulations is restricted by default in client side for security reasons. Hence it is not possible to upload files using asynchro 阅读全文
posted @ 2011-02-04 01:44 qiang.xu 阅读(705) 评论(0) 推荐(0) 编辑
摘要: Sys.WebForms.PageRequestManagerParserErrorException - what it is and how to avoid itIf you've used theMicrosoft ASP.NET AJAXUpdatePanelcontrol, there's a good chance you've hit the "Sys.WebForms.PageRequestManagerParserErrorException" error.What's a PageRequestManagerParser 阅读全文
posted @ 2011-02-03 23:46 qiang.xu 阅读(418) 评论(0) 推荐(0) 编辑
摘要: 1. 如何生成网页略缩图?2. 如何实现登陆页面(包含生成验证码和如何避免sql注入)?长期更新... 阅读全文
posted @ 2011-02-03 22:01 qiang.xu 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 1. 关键代码:usingSystem;usingSystem.Drawing;usingSystem.Windows.Forms;usingSystem.Threading;usingSystem.IO;usingSystem.Reflection;namespaceWebsiteThumbnail{publicclassWebsiteThumbnailImageGenerator{publicstaticBitmapGetWebSiteThumbnail(stringUrl,intBrowserWidth,intBrowserHeight,intThumbnailWidth,intThum 阅读全文
posted @ 2011-02-03 21:58 qiang.xu 阅读(603) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2011-02-02 10:37 qiang.xu 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 今天上午得到消息,imagine cup初赛选拔通过,特发此文,纪念一下。2011-01-30记。 阅读全文
posted @ 2011-01-30 11:40 qiang.xu 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 1. Lambda的Hello World2. Lambda表达式3.Lambda代码块4. 不确定参数的Lambda表达式5.Lambda表达式中变量作用域6. 参考资料7. 代码下载1.Lambda的Hello Worlddelegate int del(int i);// delegate hello worlddel myDelegate = x => x * x;int j = myDelegate(10);上面代码首先声明一个代理del,然后在对del进行赋值是采用的是Lambda表达式的形式,通过赋值,del就能够表示输入x,返回x的平凡。2. Lambda表达式简单的将L 阅读全文
posted @ 2011-01-28 19:55 qiang.xu 阅读(320) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 42 下一页