Google的C++开源代码项目
#include <stdio.h> /*输出*/ void show(int [],int); void quickSort(int array[],int left,int right) { if(left>right) return; /*取最左边的值为pivot(基准)*/ int i=left,j=right,pivot=array[left]; while(i<j) { while(
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Thr
public void ungzip(string path, string decomPath, bool overwrite) { //for overwriting purposes if (File.Exists(decomPath)) { if (overwrite) { File.Delete(decomPath); } else { throw new IOException("Th
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.IO; using System.Text; using System.Windows.Forms; namespace 读取host文件
在本篇文章中,我收集了很多经验和方法。应用这些经验和方法,可以帮助我们从执行速度和内存使用等方面来优化C语言代码。
不需要按照ODBC驱动。通过mysql自带的3306端口进行数据传输。 注意libmysq.dll与对应服务器版本的关系。
实现本网站图片保护功能 类: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Drawing;//image的命名空间 namespace 实现本网站图片保护功能 { public class yanzhengma:IHttpHandler { pub
这段代码是一个IIS操作类,可以最IIS进行站点的添加、删除、修改等操作 //IISHelper.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.DirectorySe
本示例演示了下面的线程处理技术。 创建、启动和终止线程 使用线程池 线程同步和互交 ThreadPool.cs using System; using System.Threading; // Fibonacci 类为使用辅助 // 线程执行长时间的 Fibonacci(N) 计算提供了一个接口。 // N 是为 Fibonacci 构造函数提供的,此外还提供了 // 操作完成时对象发出的事件信号
c#下实现ping操作代码 这里我写的是一个窗体程序。首先添加textbox,listbox,button控件,其中textbox录入域名或IP,listbox显示结果. private void button1_Click(object sender, EventArgs e) { Ping p1 = new Ping(); //只是演示,没有做错误处理 PingReply repl
try { Image image = new Bitmap(width, height); Graphics g = Graphics.FromImage(image); g.CopyFromScreen(x, y, 0, 0, new System.Drawing.Size(width, height)); string hour = DateTime.Now.Minute.ToString(
using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Runtime.Remoting.Messaging; namespace ConsoleApplication1 { public delegate int AddHandler(
using System; using System.Runtime.InteropServices; class shoutdown{ [StructLayout(LayoutKind.Sequential, Pack=1)] internal struct TokPriv1Luid { public int Count; public long Luid; public
万年历C代码
//根据半径计算圆的周长和面积#include iostream.h constfloatPI=3.1416;//声明常量(只读变量)PI为3.1416floatfCir_L(float);//声明自定义函数fCir_L()的原型floatfCir_S(float);//声明自定义函数fCir_S()的原型//以下是main()函数main(){floatr,l,s;//声明3个变量cout<<"R=";//显示字符串cin>>r;//键盘输入l=fCir_L(r);//计算圆的周长,赋值给变量ls=fCir_S(r);//计算圆的面积,赋值给变量
// 迷宫.cpp : 定义控制台应用程序的入口点。
ACM小组内部预定函数
1.先通过程序生成报表样式的HTML页面,然后修改HTML页面的后缀名为DOC。2.定制WORD文档的模板文件,在C#中操作WORD模板,生成新的WORD文档。第一方案简单,只需要改动文件的扩展名就行了,但是也存在了一些问题,譬如生成的WORD文档样式的丢失。这样对于客户来说可能是一个无法通过的方案。第二方案比较复杂,需要调用OFFICE的WORD组件通过C#来操作WORD,进而生成WORD。
C#连接Oracle的帮助类代码