index:7行10列数组 每行对应一种方块类别。 * 每行的前四列为x坐标,中间四列为y坐标 * 第九列为方块类别代码,最后一列为该类型方块有几种变形 * 用一个5*5的矩阵表示 7种类别方块 共19种变形 */ #include
// Program shows copying one text file from source location // to any other location (destination), plus possibility of changing its name, // and also shows many language features in exception handlin
void heapsort(int arr[], unsigned int N) { unsigned int n = N, i = n/2, parent, child; int t; for (;;) { /* Loops until arr is sorted */ if (i > 0) { /* First stage - Sorting the heap */ i--; /* Save
符。编码里面还有“=”号啊,不过等号不属于编码字符,而是填充字符。 我在网上查了很多关于Base64编码代码,大都比较的复杂和冗长,所以,就自己按照原理写了一个。 base64编码原理: 1)b
switch(ta4) { case 0: if(ta3==0) printf("((%.0f%c%.0f)%c%.0f)%c%.0f\n",n0,opc(op4),n1,opc(op3),n2,opc(op2)
C语言获取本机Mac地址的代码 //linux int GetLocalMacAddr(char *szMac,int *pnMacLen) { int sock; struct sockaddr_in
果在创建时,GetLastError返回5,则检查IniPath是否添加了文件名称.ini c#代码 using System; using System.Collections.Generic;
"See how they run\n"; } // pe2-4.cpp #include double C_to_F(double); int main() { using namespace std; cout
CommonLibrary.NET 是一组很常用的 C# 4.0 的代码和组件包,范围涉及 ActiveRecord, Csv, Command Line Parsing, Configuration
struct Libray* s[50]; fstream ofile; ofile.open("C:\\Documents and Settings\\dufan\\My Documents\\Visual
这个C#类封装了我们经常能用到的文件操作方法,包括读写文件、获取文件扩展名、复制文件、追加内容到文件、删除文件、移动文件、创建目录、递归删除文件及目录、列目录、列文件等,不可多得。 using System;
package com.example.testaudio; import java.io.File; import android.app.Activity; import android.media.MediaPlayer; import android.media.MediaPlayer.OnCompletionListener; import android.media.MediaReco
C#生成简单验证码的代码 html页面
using System; using System.Collections.Generic; using System.Text; namespace Delegate { // 热水器 public class Heater { private int temperature; public delegate void BoilHandler(int param); //声明委托 public
#region 邮件发送 /// <summary> /// 发送邮件支持HTML格式 先引用System.Net.Mail; /// </summary> /// <param name="MailFrom">发送人Email 如demo@126.com</param> /// <param name="MailServer">邮件服务器 如mail.126.com</param> /// <p
C# 两个目录同步的代码 using System; using System.Collections.Generic; using System.IO; using System.Text; using
///////////////////////////////////缩放图像 static void _ieInterpImageBilinear8UC1_Ver3_RowFilter(unsigned char* src, long* dst, int len, int* leftIdx, int* rightIdx, long* weight, int shift) { int i; for
#include <cstdio> /* * 传统的二分查找,数组有序且没有重复 */ int binary_S(int *a, int n, int key) { int l = 0, r = n-1; int mid; while (l <= r){ mid = (l + r) >> 1; if (a[mid] == key) return mid; if (a[mid] > key) r =
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; using System.IO; namespace JianKunKing.Common.Ftp { /// <summary> /// ftp方式文件下载上传 /// </summary>
下面代码将实现打开关闭CD/DVD: using System.Runtime.InteropServices; using System.Text; ... public static void Main(