SQLite 这个精巧的小数据库,无需安装软件,只需要一个System.Data.SQLite.DLL文件即可操作SQLite数据库。SQLite是 一个开源数据库,现在已变得越来越流行,它的体积很小,被广泛应用于各种不同类型的应用中。 using System; using System.Collections.Generic; using System.Text; using System.W
微软提供的函数不能再多网卡的情况下,判断指定网卡的网线连接状态。以下代码刚好能够解决这个问题。 using System; using System.Collections.Generic; using
//调用方法 IList<class> List = new List<class>(); //排序字段 string[] property = new string[] { "column1","column2" }; //对应排序字段的排序方式 bool[] sort =new bool[]{ false,false }; //对 List 排序 List = new IListSort<cl
byte[1024]; int c = 0; //实际读取的字节数 while ((c = reader.Read(buff, 0, buff.Length)) > 0) { currentLength += c; writer
ToUpper().Substring(8, 0x10); return (softname + "C" + cpuID); } if (bIOSSerialNumber != "") { MD5 md2
using System; using System.IO; using iTextSharp.text; using iTextSharp.text.pdf; using iTextSharp.text.pdf.parser; public class ParsingPDF { static string PDF; static string TEXT2; /** * Parses the PD
Linux下通过C语言操作SqlLite数据库 下面的代码用于写入数据到sqlite数据库和遍历数据 #include
/* Base64是一种基于64个可打印字符来表示二进制数据的表示方法。三个字节有24个比特,对应于4个Base64单元,即3个字节需要用4个可打印字符来表示。 当最后剩余一个八位字节(一个byte)时,最后一个6位的base64字节块有四位是0值,最后附加上两个等号; 如果最后剩余两个八位字节(2个byte)时,最后一个6位的base字节块有两位是0值,最后附加一个等号。 */ #include
exit(0); }}} cal(int yr,int mo,int fd,int da) { int i,r,c; char a; clrscr(); gotoxy(25,2); printf("%s %d",months[mo-1]
//冒泡排序 #include<iostream> #include<array> using namespace std; template<class T> void bubble_sort(T&, int); int main() { array<int, 10> arr = {1,4,3,2,6,5,8,7,9,0}; bubble_sort(arr, arr.size()); for(a
相比较线性表的排序而言,链表排序的内容稍微麻烦一点。一方面,你要考虑数据插入的步骤;另外一方面你也要对指针有所顾虑。要是有一步的内容错了,那么操作系统会马上给你弹出一个exception。就链表的特殊性而言,适合于链表的排序有哪些呢? (1)插入排序 (适合) (2)冒泡排序 (适合) (3)希尔排序 (适合) (4)选择排序 (适合) (5)快速排序 (不适合) (6)合并排序 (不适合) (7
/* *@Abstract getHostInformation */ #include <stdio.h> #include <stdlib.h> #include <netdb.h> #include <arpa/inet.h> #define NET_ADDR_STR_LEN 16 //16个字节,用于存放点分十进制IP地址的字符串长度 int main(int argc,char **ar
/* * main.c * ---------------------------------------------- * 2013-01-09 chrisniu1984@gmail.com * *
#include <iostream> #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <deque> #include <list> #define _SIZE_ 30 #define _SET_ cout<<"\033[?25l\033[0m" static int flags = 0; typedef i
*head); //按作者名排序 int main() { int choice,n,x,y=1,c,c1=1234; char a,d,b[10],b1[10]="yjk"; struct book *head=NULL;
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RoleDemo20150305.aspx.cs" Inherits="RoleDemo20150305"
通常,在C#中实现串口通信,我们有四种方法: 第一:通过MSCOMM控件这是最简单的,最方便的方法。可功能上很难做到控制自如,同时这个控件并不是系统本身所带,所以还得注册,不在本文讨论范围。可以访问http://www
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.OleDb; using System.Data; namespace AccessOperator { class AccessHelper { private string conn_st
#include<iostream> #include<string> using namespace std; template<class Type> class MinHeap { public: MinHeap(int sz=DefaultSize) { capacity = sz>DefaultSize?sz:DefaultSize; heap = new Type[capacity];
public int FindPosition(int num, int[] arr) { int left = 0; int right = arr.Length - 1; while (left < right - 1) { if (arr[left] == num) { return left; } if (arr[right] == num) { return right; } int m