10 2011 档案
摘要:from: http://msdn.microsoft.com/en-us/library/system.data.entity.dbcontext(v=vs.103).aspxDbContextwrapsObjectContextand exposes the most commonly used features ofObjectContextby using simplified and more intuitive APIs. You can access the underlyingObjectContextwhenever you need to use features that
阅读全文
摘要:Parse (Database Engine)Parse converts the canonical string representation of ahierarchyidto ahierarchyidvalue.Parseis called implicitly when a conversion from a string type tohierarchyidoccurs. Acts as the opposite ofToString.Parse()is a static method.Syntax-- Transact-SQL syntaxhierarchyid::Parse (
阅读全文
摘要:/*****************************************************///Create Class With Interface Dependencies#region//需要某实现某接口的具体实例UnityContainer container=new UnityContainer();container.RegisterType(ILogger,NullLogger>();Database datavase = container.Resolve<CustomDatabase>Database();#endregionCustomD
阅读全文
摘要:Reflection Examples [C#]This example shows how to dynamically load assembly, how to create object instance, how to invoke method or how to get and set propertyvalue.Create instance from assembly that is in your project ReferencesThe following examples create instances of DateTime class from the Syst
阅读全文
摘要:http://martinfowler.com/articles/injection.htmlInversion of ControlWhen these containers talk about how they are so useful because they implement "Inversion of Control" I end up very puzzled.Inversion of controlis a common characteristic of frameworks, so saying that these lightweight cont
阅读全文
摘要:<!--Timeout: 180 minutes--><system.web> ... <sessionState cookieless="true" timeout="180" stateConnectionString="tcpip=127.0.0.1:42424" mode="StateServer" /> ... </system.web> 若允许远程机器访问本机的ASP.NET State Service修改注册表:Windows Registry Edit
阅读全文
摘要:http://msdn.microsoft.com/en-us/vcsharp/aa336746Restriction OperatorsWhere - Simple 1Where - Simple 2Where - Simple 3Where - DrilldownWhere - IndexedProjection OperatorsSelect - Simple 1Select - Simple 2Select - TransformationSelect - Anonymous Types 1Select - Anonymous Types 2Select - Anonymous Typ
阅读全文
摘要:Each process provides the resources needed to execute a program. A process has a virtual address space, executable code, open handles to system objects, a security context, a unique process identifier, environment variables, a priority class, minimum and maximum working set sizes, and at least one t
阅读全文
摘要:from:http://www.haskell.org/haskellwiki/Haskell_in_5_steps#Write_your_first_parallel_Haskell_program起由: Write your first parallel Haskell programHaskell has good support for parallel and multicore programming. We can write a parallel program by adding `par` to expressions, like so:import Control.Par
阅读全文
摘要:Leksah Editor: http://leksah.org/download.html/*******************************************************************************/http://eclipsefp.github.com/Install:http://eclipsefp.github.com/install.htmlhttp://www.haskell.org/haskellwiki/Learn_Haskell_in_10_minutesAbout This ProjectEGit is an Eclips
阅读全文
摘要:http://www.intrepidstudios.com/blog/2010/7/11/debug-your-net-web-project-with-iis-express-t.aspxUpdate:IIS Express has beenofficially releasedas a standalone installation.For those of us too impatient to wait for Visual Studio SP1 to natively support IIS Express, I've done some digging and found
阅读全文
摘要://java code:interface CarElementVisitor { void visit(Wheel wheel); void visit(Engine engine); void visit(Body body); void visit(Car car);} interface CarElement { void accept(CarElementVisitor visitor); // CarElements have to provide accept().} class Wheel implements CarElement { pr...
阅读全文
摘要:http://files.cnblogs.com/wucg/jscalendar-1.0___v1.51.zipJS DatePicker: jscalendar-1.0___v1.51from:http://sourceforge.net/projects/jscalendar/http://files.cnblogs.com/wucg/jscalendar-1.0___v1.51.zipQuick startupInstalling the calendar used to be quite a task until version 0.9.3. Starting with 0.9.3 I
阅读全文
摘要://TestCollect .javapackage com.test;public class TestCollect { private String name; private int age; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } @Override prote...
阅读全文
摘要:using System;using System.Linq;using System.Text;namespace DesignPatterns.Mediator{ //MediatorR abstract class AbstractChatroom { public abstract void Register(Participant participant); public abstract void Send(string from, string to, string message); } //ConcreteMediat...
阅读全文
摘要:http://files.cnblogs.com/wucg/Demo_AS3_Flex_CafeTownsend.zip
阅读全文
摘要:http://www.cs.rpi.edu/~hollingd/psics/notes/backtracking.pdfTwo situations:– Finding a solution to a problem can't be based on astraight path to the goal.● consider traversing a maze.– We need a better approach than brute force(independently evaluating all possible solutions).● Think of the TSP
阅读全文
摘要://Singleton.cpp 默认构造函数#include <iostream>using namespace std;class Singleton{public: static Singleton* Instance();private: Singleton(){} static Singleton * _instance;};Singleton* Singleton::_instance=0;Singleton* Singleton::Instance(){ if(_instance==0){ _instance = new Singleton()...
阅读全文
摘要:#include <stdio.h>#include <stdlib.h>typedef int KeyType;struct ElemType{ int key;};int find_seq(struct ElemType arr[],int n,KeyType key){ int i=0; for(;i<n;i++){ if(arr[i].key==key)return i; printf("check %d\n",arr[i]); } return -1;}//较好的提高,for循环里只有一个判断,注意数据不能越界int find...
阅读全文
摘要:转载自 http://xuliduo.iteye.com/blog/639923dos命令:chcp 65001 就是换成UTF-8代码页 chcp 936 可以换回默认的GBK chcp 437 是美国英语
阅读全文
摘要:Note that only command events (whose event classes are based directly or indirectly on wxCommandEvent) are recursively applied to the window parent's event handler. As this quite often causes confusion for users,here is a list of system events that will not get sent to the parent's event han
阅读全文
摘要:Ultimate Packer for eXecutables Copyright (C) 1996 - 2010UPX 3.07w Markus Oberhumer, Laszlo Molnar & John Reiser Sep 08th 2010Usage: upx [-123456789dlthVL] [-qvfk] [-o file] file..Commands: -1 compress faster -9 compre...
阅读全文
摘要:windows下,注意文件格式设为UTF-8。Code::Blocks 10.05设置: Setting -> EditorMain.cpp:#include "wx/wx.h"//Declare the application classclass MyApp:public wxApp{public: //Called on application startup virtual bool OnInit();};// Declare our main frameclassclass MyFrame:public wxFrame{public: // Construc
阅读全文
摘要:复制构造函数copy constructor、赋值操作符 operator =、析构函数destructor:不管类是否定义了自己的析构函数,编译器都自动执行类中非static数据成员的析构函数。复制构造函数、赋值操作符、析构函数 总称为复制控制(copy control)。编译器自动实现这些操作,但类也可以定义自己的版本。下面代码所使用copy contructor的地方有:class Point{public: Point(){} Point(const Point & p){ static int i=0; cout<<++i<<"call Po
阅读全文
摘要:WxWindowsQuickRef快速引用:http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef#Frequently_Asked_Questions中文wxWidgets编译与简单测试http://hi.baidu.com/fcl06/blog/item/5233d8efbdaa763fadafd52f.html-------------------------------------------------------Execute the build command. The recommended command to
阅读全文
摘要:map<char,int> first; first['a']=1; first['b']=2; first['c']=3; first['d']=4; first['e']=5; first['a']=11; //overrite 1 map<char,int>::iterator it; for(it=first.begin();it!=first.end();++it){ cout<<it->first<<"="<
阅读全文