03 2012 档案

摘要://filename : Dll1.h#ifndef _DLL1_H_ #define _DLL1_H_#ifdef DLL1_API#else#define DLL1_API extern "C" _declspec(dllimport)#endif // DLL1_APIDLL1_API int _stdcall add(int a,int b);DLL1_API int _stdcall substract(int a,int b);#endif //filename:Dll1.cpp#define DLL1_API extern "C" _dec 阅读全文
posted @ 2012-03-30 16:30 庚武 阅读(409) 评论(0) 推荐(0) 编辑
摘要:protected void Button1_Click(object sender, EventArgs e){ localhost.MyDemo MyService; // try to get the proxy from Session state MyService = Session["MyService"] as localhost.MyDemo; if (MyService == null) { // create the proxy MyService = new localhost.MyDemo(); ... 阅读全文
posted @ 2012-03-30 14:07 庚武 阅读(316) 评论(0) 推荐(0) 编辑
摘要:http://files.cnblogs.com/wucg/ActiveX_Demo_Clock.zip一个典型的ActiveX控件需要提供三种特性:属性、方法和事件。 阅读全文
posted @ 2012-03-29 17:20 庚武 阅读(328) 评论(0) 推荐(0) 编辑
摘要:邮槽是基于广播通信体系设计出来的,它彩用无连接的不可靠的数据传输。邮槽是一种单向通信机制,创建邮槽的服务器进程读取数据,打开邮槽的客户机进程写入数据。// MailslotSvrView.cpp : implementation of the CMailslotSvrView class//#include "stdafx.h"#include "MailslotSvr.h"#include "MailslotSvrDoc.h"#include "MailslotSvrView.h"#ifdef _DEBUG#de 阅读全文
posted @ 2012-03-28 15:37 庚武 阅读(214) 评论(0) 推荐(0) 编辑
摘要:// NamedPipeSrvView.cpp : implementation of the CNamedPipeSrvView class//#include "stdafx.h"#include "NamedPipeSrv.h"#include "NamedPipeSrvDoc.h"#include "NamedPipeSrvView.h"#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FILEstatic char THIS_FILE[] = __FILE__;# 阅读全文
posted @ 2012-03-28 13:48 庚武 阅读(211) 评论(0) 推荐(0) 编辑
摘要:// ParentView.cpp : implementation of the CParentView class//#include "stdafx.h"#include "Parent.h"#include "ParentDoc.h"#include "ParentView.h"#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FILEstatic char THIS_FILE[] = __FILE__;#endif///////////////////////// 阅读全文
posted @ 2012-03-27 17:51 庚武 阅读(231) 评论(0) 推荐(0) 编辑
摘要:// TestClipboardDlg.cpp : implementation file//#include "stdafx.h"#include "TestClipboard.h"#include "TestClipboardDlg.h"#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FILEstatic char THIS_FILE[] = __FILE__;#endif////////////////////////////////////////////////////////// 阅读全文
posted @ 2012-03-27 01:40 庚武 阅读(261) 评论(0) 推荐(0) 编辑
摘要:/*console.dir( jQuery('#selector a.jt:eq(0)').data('events') );jQuery.each($('#selector a.jt:eq(0)').data('events'), function(i, event){ jQuery.each(event, function(i, handler){ console.log( handler.toString() ); });});*///console.log(eval('1+1'))console.time( 阅读全文
posted @ 2012-03-26 12:09 庚武 阅读(366) 评论(0) 推荐(0) 编辑
摘要:HANDLE hMutex;int main(){ hMutex = CreateMutex(NULL,TRUE,TEXT("tickets")); if(hMutex){ if(GetLastError()== ERROR_ALREADY_EXISTS){ cout<<"已存在运行实例"<<endl; system("pause"); return 0; } } 互斥对象(Mutex)、事件对象(Event) 与 关键代码段(CriticalSection) 的比较1.互斥对象和事件对象都属于内核对象,利用内 阅读全文
posted @ 2012-03-24 16:26 庚武 阅读(448) 评论(0) 推荐(0) 编辑
摘要:#include <windows.h>#include <iostream>using namespace std;DWORD WINAPI MyThreadProc1(LPVOID lpParameter); //thread dataDWORD WINAPI MyThreadProc2(LPVOID lpParameter);int tickets=100;CRITICAL_SECTION g_cs;int main(){ DWORD tid1=0,tid2=0; HANDLE handle1 = CreateThread(NULL,0,MyThreadProc1 阅读全文
posted @ 2012-03-24 15:55 庚武 阅读(340) 评论(0) 推荐(0) 编辑
摘要:为了实现线程间的同步,不应该使用人工重置的事件对象,而应该使用自动重置的事件对象。g_hEvent = CreateEvent(NULL,FALSE,TRUE,NULL);注意区分人工重置事件对象和自动重置事件对象。当人工重置的事件对象得到通知时,等待该事件对象的所有线程均变为可调度线程,操作系统不会将该事件对象设置为无信息状态,需要显式地调用ResetEvent函数将其设置为无信号状态,否则该对象一直是有信号状态。当一个自动重置的事件对象得到通知时,等待该事件对象的线程中只有一个线程变为可调度线程,同时操作系统会将该事件对象设置无信号状态,这样,当对所保护的代码的执行完成后,需要调用SetE 阅读全文
posted @ 2012-03-24 10:22 庚武 阅读(334) 评论(0) 推荐(0) 编辑
摘要:#include <windows.h>#include <iostream>using namespace std;DWORD WINAPI MyThreadProc1(LPVOID lpParameter); //thread dataDWORD WINAPI MyThreadProc2(LPVOID lpParameter);DWORD WINAPI MyThreadProc3(LPVOID); //thread dataDWORD WINAPI MyThreadProc4(LPVOID);int tickets=100;HANDLE hMutex;int mai 阅读全文
posted @ 2012-03-23 18:30 庚武 阅读(226) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>using namespace std;class A{public: int m_a; A(int a):m_a(a){ cout<<"A 构造"<<endl; } void introA(){ cout<<"m_a:"<<m_a<<endl; }};class B1:public A{public: int m_b1; B1(int a,int b1):A(a),m_b1(b1){ cout<<"B1 构造"& 阅读全文
posted @ 2012-03-23 01:01 庚武 阅读(328) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2012-03-21 18:11 庚武 阅读(1) 评论(0) 推荐(0) 编辑
摘要:http://www.rdlt.com/multiple-memcache-instancesservers-on-windows.html安装:sc create "Memcached11200" binPath= "C:\Users\Administrator\Desktop\memcached\memcached.exe -d runservice -p 11200 -m 32" DisplayName= "Memcached11200" start= auto删除:sc deleteMemcached11200 阅读全文
posted @ 2012-03-19 16:39 庚武 阅读(276) 评论(0) 推荐(0) 编辑
摘要:void CMenuView::OnRButtonDown(UINT nFlags, CPoint point) { //弹出菜单 /* CMenu menu; menu.LoadMenu(IDR_MENU_POPUP); CMenu *pMenu = menu.GetSubMenu(0); //ScreenToClient(&point); ClientToScreen(&point); pMenu->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y,this); */ CView::OnR 阅读全文
posted @ 2012-03-17 12:34 庚武 阅读(789) 评论(0) 推荐(0) 编辑
摘要:// crt_sprintf.c// compile with: /W3// This program uses sprintf to format various// data and place them in the string named buffer.#include <stdio.h>int main( void ){ char buffer[200], s[] = "computer", c = 'l'; int i = 35, j; float fp = 1.7320534f; // Format and print vario 阅读全文
posted @ 2012-03-16 15:47 庚武 阅读(835) 评论(0) 推荐(0) 编辑
摘要:Move commandsk up linej down line beginning of next linel right space right spaceh left space left spacew word forwardW word forward, ignore punctuatione end of wordE end of word, ignore punctuationb word backwardB word backward, ignore punctuation0 beginning of line^ first non-whitespace charac... 阅读全文
posted @ 2012-03-16 14:16 庚武 阅读(289) 评论(0) 推荐(0) 编辑
摘要:压缩库为google提供的 Closure Compilerhttps://developers.google.com/closure/compiler/?hl=zh-cnusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;namespace TestProcessDosCmd{ class Program { static void Main(string[] args) { ... 阅读全文
posted @ 2012-03-16 11:52 庚武 阅读(987) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2012-03-15 11:55 庚武 阅读(1) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2012-03-14 11:17 庚武 阅读(2) 评论(0) 推荐(0) 编辑
摘要:https://developers.google.com/closure/compiler/docs/gettingstarted_appGetting Started with the Closure Compiler ApplicationThe Hello World of the Closure Compiler ApplicationThe Closure Compiler application is a Java command-line utility that compresses, optimizes, and looks for mistakes in your Jav 阅读全文
posted @ 2012-03-14 02:02 庚武 阅读(708) 评论(0) 推荐(0) 编辑
摘要:http://code.google.com/p/closure-compiler/http://stackoverflow.com/questions/28932/best-javascript-compressorGoogle releasedClosure Compilerwhich seems to be generating the smallest files so far as seenhereandherePrevious to that the various optionswere as followBasicallyPackerdoes a better job at i 阅读全文
posted @ 2012-03-14 01:41 庚武 阅读(289) 评论(0) 推荐(0) 编辑
摘要:http://www.quartz-scheduler.org/documentation/quartz-1.x/tutorials/crontrigger网上表达式生成器:http://www.cronmaker.com/Introductioncronis a UNIX tool that has been around for a long time, so its scheduling capabilities are powerful and proven. TheCronTriggerclass is based on the scheduling capabilities of 阅读全文
posted @ 2012-03-13 17:47 庚武 阅读(972) 评论(0) 推荐(0) 编辑
摘要:var container = new WindsorContainer();container.Register(Component.For<SauceBéarnaise>());SauceBéarnaise sauce = container.Resolve<SauceBéarnaise>();var container = new WindsorContainer();container.Register(Component.For<IIngredient>().ImplementedBy<SauceBéa 阅读全文
posted @ 2012-03-12 12:15 庚武 阅读(750) 评论(1) 推荐(1) 编辑
摘要:I recently wrote a post about how to set up CW’s IOC container for applications. This post covered the most basic implementation to get an IOC container up and running. It is now time to cover a proper architecture for using IOC specifically for web applications / sites.The main problem with the pre 阅读全文
posted @ 2012-03-12 12:13 庚武 阅读(414) 评论(0) 推荐(0) 编辑
摘要:from:http://mvcsharp.wordpress.com/2010/01/09/setting-up-ioc-in-asp-net-mvc-using-castle-windsor/Abstract: This post gathers information needed to setting up Inversion of Control (IoC) in an ASP.NET MVC application using Castle Windsor.Introduction: Inprevious postI summarized how ASP.NET MVC compon 阅读全文
posted @ 2012-03-09 17:29 庚武 阅读(687) 评论(0) 推荐(1) 编辑
摘要:http://msdn.microsoft.com/en-us/library/ms973868Global.asaxThe Global.asax file is similar to the Global.asa file in ASP, albeit that there are many more events available in ASP.NET. Also, Global.asax is compiled instead of interpreted as it is in ASP. You still have event procedures that fire withi 阅读全文
posted @ 2012-03-09 14:01 庚武 阅读(171) 评论(0) 推荐(0) 编辑
摘要:http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring(v=vs.80).aspxhttp://www.codeproject.com/Articles/17768/ADO-NET-Connection-Pooling-at-a-GlanceThe following table lists the valid names for connection pooling values within theConnectionString. For more infor 阅读全文
posted @ 2012-03-07 16:58 庚武 阅读(304) 评论(0) 推荐(0) 编辑
摘要:http://citizen428.net/blog/2010/08/12/30-free-programming-ebooks/ Since this post got quite popular I decided to incorporate some of the excellent sug 阅读全文
posted @ 2012-03-04 13:43 庚武 阅读(239) 评论(0) 推荐(0) 编辑
摘要://filename:VisualKB.h#define MAX_STRING 12class CMyApp:public CWinApp{public: virtual BOOL InitInstance();};class CMainWindow:public CWnd{protected: int m_cxChar; //Average character width int m_cyChar; //Character height int m_cyLine; //Vertical line spacing in message box int m_nTextPos; ... 阅读全文
posted @ 2012-03-02 14:38 庚武 阅读(585) 评论(0) 推荐(0) 编辑
摘要:ASP.NET provides three primary forms of caching: page level output caching, user control level output caching (or fragment caching), and the Cache API. Output caching and fragment caching have the advantage of being incredibly simple to implement, and are sufficient in many cases. The cache API prov 阅读全文
posted @ 2012-03-01 12:58 庚武 阅读(250) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示