-
Modbus
标准Modus通讯协议和接口定义,公司项目使用中,非常稳定,实用,请有需要朋友下载。(The standard Modus communication protocol and interface definition, project use, very stable, practical, need friends to download.)
- 2014-07-07 09:12:10下载
- 积分:1
-
Temperature(ADC0)
采用c8051f020芯片,实现12位ADC0采样芯片温度传感器,将温度通过串口0发送到PC机! (
Using C8051F020 chip, the implementation of 12 bit ADC0 sampling chip temperature sensor, the temperature through the serial port 0 is sent to the PC machine!
)
- 2011-08-15 20:32:38下载
- 积分:1
-
SQLHelper连接数据库示例类
[实例简介] 连接sql数据库 类 [核心代码]using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Configuration;using System.Data.SqlClient;using System.Data; namespace Itcast.Cn{ public static class SqlHelper { private static readonly string conStr = ConfigurationManager.ConnectionStrings["connStr"].ConnectionString; //执行增删改的 public static int ExecuteNonQuery(string sql, CommandType cmdType, params SqlParameter[] pms) { using (SqlConnection con = new SqlConnection(conStr)) { using (SqlCommand cmd = new SqlCommand(sql, con)) { cmd.CommandType = cmdType; if (pms != null) { cmd.Parameters.AddRange(pms); } con.Open(); return cmd.ExecuteNonQuery(); } } } //封装一个执行返回单个值的方法 public static object ExecuteScalar(string sql, CommandType cmdType, params SqlParameter[] pms) { using (SqlConnection con = new SqlConnection(conStr)) { using (SqlCommand cmd = new SqlCommand(sql, con)) { cmd.CommandType = cmdType; if (pms != null) { cmd.Parameters.AddRange(pms); } con.Open(); return cmd.ExecuteScalar(); } } } //返回SqlDataReader对象的方法 public static SqlDataReader ExecuteReader(string sql, CommandType cmdType, params SqlParameter[] pms) { SqlConnection con = new SqlConnection(conStr); using (SqlCommand cmd = new SqlCommand(sql, con)) { cmd.CommandType = cmdType; if (pms != null) { cmd.Parameters.AddRange(pms); } try { con.Open(); return cmd.ExecuteReader(CommandBehavior.CloseConnection); } catch (Exception) { con.Close(); con.Dispose(); throw; } } } //封装一个返回DataTable的方法 public static DataTable ExecuteDataTable(string sql, CommandType cmdType, params SqlParameter[] pms) { DataTable dt = new DataTable(); using (SqlDataAdapter adapter = new SqlDataAdapter(sql, conStr)) { adapter.SelectCommand.CommandType = cmdType; if (pms != null) { adapter.SelectCommand.Parameters.AddRange(pms); } adapter.Fill(dt); } return dt; } //封装一个带事务的执行Sql语句的方法 public static void ExecuteNonQueryTran(List list) { using (SqlConnection con = new SqlConnection(conStr)) { using (SqlCommand cmd = con.CreateCommand()) { con.Open(); using (SqlTransaction trans = con.BeginTransaction()) { cmd.Transaction = trans; try { foreach (var SqlObject in list) { cmd.CommandText = SqlObject.Sql; if (SqlObject.Parameters != null) { cmd.Parameters.AddRange(SqlObject.Parameters); } cmd.CommandType = SqlObject.CmdType; cmd.ExecuteNonQuery(); cmd.Parameters.Clear(); } trans.Commit(); } catch (Exception) { trans.Rollback(); } } } } } } public class SqlAndParameter { public string Sql { get; set; } public SqlParameter[] Parameters { get; set; } public CommandType CmdType { get; set; } }}
- 2015-04-01下载
- 积分:1
-
包括反向输出一个链表,连接两个链表。以及一些例子。
包括反向输出一个链表,连接两个链表。以及一些例子。-Including the reverse output of a linked list, connecting the two lists. As well as some examples.
- 2023-08-05 02:55:03下载
- 积分:1
-
工艺属性信息显示
在 c 语言中使用系统调用操作系统中进程属性信息显示执行
- 2022-03-25 15:36:54下载
- 积分:1
-
dbscanPointcloud
用DBSCAN聚类算法实现的三维点云的聚类(using DBSCAN to realise 3d pointcloud clustering)
- 2020-10-12 14:37:33下载
- 积分:1
-
录音机实验
说明: 录音机编程,可读取、录入,显示大小,文件秒数(Recorder programming, can read, input, display size, file seconds)
- 2020-11-28 14:04:50下载
- 积分:1
-
FingerGestures v3.1
方便的实现手指触控相关的功能,虚拟摇杆,模型旋转等。(It is convenient to realize finger touch related functions.)
- 2017-12-04 10:32:14下载
- 积分:1
-
halcontest
c++和halcon混合编程,编有MFC界面,单击界面按钮可获得相关齿轮参数。(C++ and Halcon mixed programming, compiled with MFC interface, click the interface button, you can get the relevant gear parameters.)
- 2020-09-12 08:18:01下载
- 积分:1
-
chart应用 鼠标拖控
chart应用 鼠标拖控
- 2016-12-17下载
- 积分:1