- 博客(51)
- 资源 (12)
- 收藏
- 关注
原创 Linq to xml:XName 对象的预原子化
提高 LINQ to XML 中的性能的一种方法是预原子化 XName 对象。预原子化是指在通过使用 XElement 和 XAttribute 类的构造函数创建 XML 树之前,先将字符串分配给 XName 对象。然后传递初始化的 XName 对象,而不是将字符串传递给构造函数(此过程将使用从字符串到 XName 的隐式转换)。XName Root = "Root";XName...
2008-12-26 15:53:00 64
原创 Linq to xml:使用 XSLT 转换 XML 树
string xslMarkup = @"<?xml version='1.0'?><xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'> <xsl:template match='/Parent'> ...
2008-12-26 15:21:00 87
原创 Linq to xml:链接轴
XElement root = XElement.Load("Irregular.xml");IEnumerable<XElement> configParameters = root.Elements("Customer").Elements("Config"). Elements("ConfigParameter");foreach (XEl...
2008-12-26 14:39:00 66
原创 Linq to xml:检索
//检索元素集合 XElement po = XElement.Load("c:/test.xml"); IEnumerable<XElement> childElements = //from el in po.Descendants("Book") fr...
2008-12-26 11:46:00 90
原创 Linq to xml:流式处理 XmlReader
IEnumerable<string> grandChildData = from el in StreamRootChildDoc(new StringReader(markup)) where (int)el.Attribute("Key") > 1 select ...
2008-12-26 11:23:00 80
原创 Linq to xml: XDocument对象
XDocument d = new XDocument( new XComment("This is a comment."), new XProcessingInstruction("xml-stylesheet", "href='mystyle.css' title='Com...
2008-12-26 10:37:00 96
原创 Linq to xml:XAttribute对象
XElement c = new XElement("Customers", new XElement("Customer", new XElement("Name", "John Doe"), new XElement("PhoneNumbers",
2008-12-26 10:03:00 162
原创 Linq to xml:XElement拼装
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Linq; namespace linq { class Program ...
2008-12-26 10:00:00 142
原创 Linq 通过反射动态查询对象
public IQueryable<TEntity> Find<TEntity>(TEntity obj) where TEntity : class { //获得所有property的信息 PropertyInfo[] properties = ...
2008-12-25 15:20:00 345
原创 Linq to xml导出Excel
Imports <xmlns="urn:schemas-microsoft-com:office:spreadsheet">Imports <xmlns:o="urn:schemas-microsoft-com:office:office">Imports <xmlns:x="urn:schemas-microsoft-com:office:exce...
2008-12-25 15:05:00 178
原创 Linq to sql 结合Linq to xml
//C#的例子 using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;usi...
2008-12-25 14:55:00 71
原创 Linq to sql :LinqDataSource
<head runat="server"> <title>Untitled Page</title> <style type="text/css"> body { font-family: Calibri; font-size: sm...
2008-12-25 11:31:00 596
原创 Linq to sql 主从表查询
private void BindProducts(int startRow) { NorthwindDataContext db = new NorthwindDataContext(); //var ca = from c in db.Categories // ...
2008-12-25 10:20:00 348
原创 Linq to sql 增删改查
配置文件 <connectionStrings> <add name="NorthwindConnectionString" connectionString="Data Source=.;Initial Catalog=Northwind;Integrated Security=True" providerName="System.Data.SqlClien...
2008-12-24 17:58:00 97
原创 第一个Linq练习
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Xml.Linq;using System.Xml;namespace ConsoleApplication1{ class Program { ...
2008-12-24 17:13:00 109
原创 WCF笔记:ServiceContract继承
主机: using System;using System.ServiceModel;namespace InheritanceDemo{ [ServiceContract] interface ISimpleCalculator { [OperationContract] int Add(int arg1,int ...
2008-12-23 18:07:00 163
原创 国外50个最佳CSS设计欣赏
http://news.cnblogs.com/n/43826/
2008-12-23 09:26:00 189
原创 能帮你找到网页设计灵感的16个网站
http://news.cnblogs.com/n/37151/
2008-12-23 09:25:00 117
原创 国外最漂亮的50个网站欣赏
http://news.cnblogs.com/n/44079/
2008-12-23 09:17:00 13075
原创 WCF笔记:入门
WCF的中的Endpoint结构,一个Endpoint就类似于xml web service中的一个asmx文件,它包括三个组成部分1)Address 2) Binding 3) Contract,此三者被称为组成Endpoint的"ABC". A解决了Endpoint在哪的问题,也就是"Where is the endpoint?"...
2008-12-22 16:58:00 135
原创 观察者(Observer)模式
这个或许叫源-监听器(Source/Listener)模式更加形象。观察者模式定义了一种一对多的依赖关系,让多个观察者对象同时监听某一个主题对象。这个主题对象在状态上发生变化时,会通知所有观察者对象,使它们能够自动更新自己。 participants The classes and/or objects participating in this pattern a...
2008-12-22 11:19:00 72
原创 访问者(Visitor Pattern )模式
主要用途是对聚集采取某种操作,统一执行。访问者模式适用于数据结构相对未定的系统,它把数据结构和作用于结构上的操作之间的耦合解脱开,使得操作集合可以相对自由地演化。比如雇员对象,我们先只有名称、年龄、工资这些属性,可以先定义访问者类来分离结构和操作 participants The classes and/or objects participating...
2008-12-22 10:41:00 148
原创 先有鸡还是先有蛋?
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ChickenAndEgg { class Program { ...
2008-12-19 17:22:00 73
原创 State pattern(模拟一个借记卡的例子)
participants The classes and/or objects participating in this pattern are: Context (Account) defines the interface of interest to clie...
2008-12-19 17:05:00 89
原创 职责链(Chain of Responsibility)模式
participants The classes and/or objects participating in this pattern are: Handler (Approver) defines an interface for handling the requests (optional) i...
2008-12-19 15:17:00 349
原创 一个没有方法继承的Flyweight模式
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace Flyweight{ public partial class _...
2008-12-19 11:16:00 246
原创 几个爆酷Silverlight应用程序
1、最酷的就是这个航班浏览器了,微软写的例子。http://silverlight.net/samples/sl2/silverlightairlines/run/default.html源码下载:http://silverlight.net/samples/sl2/silverlightairlines/source/Source_SilverlightAirlines_CS....
2008-12-19 10:39:00 118
原创 不太明白的Decorator Pattern
participants The classes and/or objects participating in this pattern are: Component (LibraryItem) defines the interface for objects ...
2008-12-18 16:54:00 62
原创 一个图表的例子
<UserControl x:Class="SilverlightExcel.Page" xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="490" Height="298"&
2008-12-18 11:03:00 143
原创 SL2_RedSkin
http://blogs.msdn.com/corrinab/archive/2008/10/01/8971166.aspx
2008-12-17 10:09:00 79
原创 一段完整的Silverlight演示代码[Page.xaml.cs]
using System;using System.Collections.Generic;using System.Linq;using System.Net;using System.Windows;using System.Windows.Controls;using System.Windows.Documents;using System.Windo...
2008-12-17 09:53:00 100
原创 一段完整的Silverlight演示代码[Page.xaml]
<UserControl xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" x:...
2008-12-17 09:52:00 84
原创 一段完整的Silverlight演示代码[类]
using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace SilverlightInterview.Web { public class Note ...
2008-12-17 09:51:00 94
原创 一段完整的Silverlight演示代码[Web service]
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; namespace SilverlightInterview.Web { ...
2008-12-17 09:38:00 65
原创 Linq to Xml遍历
private void GetAllValues(XElement doc) { ChartValues = new List<double>(); ChartKeys = new List<string>(); var myValues = from...
2008-12-12 17:40:00 150
原创 SilverLight学习笔记--WCF服务
编写WCF服务接口 using System;using System.Collections.Generic;using System.Linq;using System.Runtime.Serialization;using System.ServiceModel;using System.Text; namespace SilverlightAp...
2008-12-10 12:51:00 88
原创 SilverLight学习笔记--Web 服务
编写Web serviceusing System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Services; namespace SilverlightApplication10.Web{ /// <summa...
2008-12-10 12:50:00 90
原创 SilverLight学习笔记--WebClient异步请求
在向特定 URI 发送 HTTP 请求时,基于 HTTP 的服务将返回数据。 HTTP 请求可以发送至各种 URI。此类 URI 包括 http://YouURL.com/service/getUser、http://YouURL.com/service.svc/getUser 等,甚至包括静态数据,例如 http://YouURL.com/data.xml。配置 HTTP 请...
2008-12-10 12:49:00 121 1
原创 得到DataGrid的某一行列的值(转载)
转载自[孟子E章]http://blog.csdn.net/net_lover/archive/2008/11/26/3379002.aspx <UserControl xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" x:Class="Si...
2008-12-09 17:59:00 325
Liferay7门户集成Activiti BPM用户组同步
2016-12-19
Liferay7门户集成Activiti BPM展示流程列表功能
2016-12-15
Liferay开发持久化层和服务层演示Demo代码
2016-02-03
Java Web Project开发WebSocket服务端/客户端
2016-01-15
C#使用七牛云存储上传下载文件
2016-01-14
ASP.NET MVC 在线录音录像(音视频录制并上传)
2016-01-07
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人