10 2011 档案
摘要:最近做一个仿微博的项目,需要用到类似微博中的微博分享;用户分享一个视频页面的链接(优酷、土豆、酷6等);系统要根据这个链接,向视频网站的api请求视频的基本信息,得到诸如视频swf文件地址、视频缩略图、视频时长、描述、标题等等信息;看完下面文章http://www.cnblogs.com/leoo2sk/archive/2009/06/17/di-and-ioc.html仿照着做了点设计:通过一个反射工厂:VideoFactory 得到符合IVideoSite接口的具体服务类,具体的api操作都在具体服务类中IVideoSite用来封装不变的方面也就是对视频的操作方法,变化的是视频的提供网站反
阅读全文
摘要://用正则表达式从网页里面提取视频地址//获得一个页面地址,拿到页面html,然后正则表达式去匹配视频地址//详细的看注释吧。 1///<summary> 2 /// 网页视频处理类 3 ///</summary> 6 ///<history> 7 /// 8 ///</history> 9 public class WebVideo 10 { 11 ///<summary> 12 /// 优酷、酷6、土豆等视频页面地址 13 ///</summary> 14 private string _pageUrl; 15 ...
阅读全文
摘要:1 /// <summary> 2 /// 取单个汉字的拼音声母 3 /// </summary> 4 /// <param name="c">要转换的单个汉字</param> 5 /// <returns>拼音首字母</returns> 6 public string GetPYChar(string c) 7 { 8 try 9 {10 byte[] array = new byte[2];11 ...
阅读全文
摘要:this.lstViewEventDetail.Items.Clear(); string selectedItem = this.lstBoxCtrlEventType.SelectedItem.ToString().Trim(); EventLog...
阅读全文
摘要:class PublicFun { } /// <summary> /// calculate the distance /// </summary> public struct EarthPoint { //equatorial radius:WGS84 standard major semi-axis of the earth(unit:m) public const double Ea = 6378137; public const double Eb = 6356725; // 极半径 public readonly double Long...
阅读全文
摘要:当页面滚动到低端时,执行ajax方法从web service获取更多微博,并加载到页面上GetMicroblogs.js/// <reference path="../Scripts/jquery-1.4.1-vsdoc.js" />$(function () { var i = 0; $(window).bind("scroll", function (event) { //滚动条到网页头部的 高度,兼容ie,ff,chrome var top = document.documentElement.scrollTop + document.
阅读全文
摘要:The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'D:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\Temporary ASP.NET Files'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more info
阅读全文
浙公网安备 33010602011771号