![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C#
文章平均质量分 71
一克代码
这个作者很懒,什么都没留下…
展开
-
CollectOPC工业数据交换平台-可生成矿安【2021】2号文(重大设备感知数据接入细则)数据文件-使用说明
CollectOPC工业数据交换平台-可生成矿安【2021】2号文数据文件使用说明软件全称:CollectOPC工业数据交换平台-可生成矿安【2021】2号文数据文件软件简称:CollectOPC中间件软件版本号:V1.X软件运行硬件环境:处理器:不低于1.8GHz;硬盘:不低于100M;内存:不低于1G;网卡:10/100M。软件运行软件环境:Win...原创 2021-03-19 22:34:30 · 899 阅读 · 2 评论 -
sql行转列,统计分类
表结构--求和后,按照类型行转列DECLARE @sql_str VARCHAR(8000)DECLARE @sql_col VARCHAR(8000)SELECT @sql_col = ISNULL(@sql_col + ',','') + QUOTENAME(SensorTypeName) FROM (select top 100 SensorTypeName from SM_SensorType where SensorTypeID<>1019 order by Dat..原创 2021-01-25 23:43:28 · 245 阅读 · 0 评论 -
通用的自动提交From表单
没事写了个通用的: 只需要改变Execl里面的内容就行!源码:Form1.resx:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.IO;using System.Collectio原创 2011-02-12 15:13:00 · 2016 阅读 · 0 评论 -
格式化时间,货币
<br />1、格式化货币(跟系统的环境有关,中文系统默认格式化人民币,英文系统格式化美元)<br />string.Format("{0:C}",0.2) 结果为:¥0.20 (英文操作系统结果:$0.20)<br />默认格式化小数点后面保留两位小数,如果需要保留一位或者更多,可以指定位数<br />string.Format("{0:C1}",23.15) 结果为:¥23.2 (截取会自动四舍五入)<br />格式化多个Object实例<br />string.Format("市场价:{0:C},优惠原创 2010-11-22 17:37:00 · 735 阅读 · 0 评论 -
Google Map 外部链接触发图标
<br /> <mce:script language="JavaScript" type="text/javascript" src="/Inc/google/key.js" mce_src="Inc/google/key.js"></mce:script> <mce:script type="text/javascript"><!-- var scriptTag = '<' + 'script src="http://maps.google.com/maps?file=api原创 2011-01-06 11:58:00 · 1861 阅读 · 0 评论 -
C#获得Cpu使用率类
<br />using System;using Microsoft.Win32;using System.Diagnostics;using System.Runtime.InteropServices;namespace Discuz.Common{ /// <summary> /// SysInfo 的摘要说明。 /// </summary> public class SysInfo { #region CpuUsage类 /// <summar原创 2010-08-27 14:12:00 · 6935 阅读 · 2 评论 -
c#下载网页源码的两种方法
<br />HttpRequest:<br /> <br />static class WebFunc { private static CookieContainer cookie = new CookieContainer(); private static string contentType = "application/x-www-form-urlencoded"; private static string accept = "image/原创 2010-08-23 11:01:00 · 6232 阅读 · 0 评论 -
工具
<br />using System.Collections.Generic;using System.Text;using System.Security.Cryptography;using System.Text.RegularExpressions;using System.Web;using System.Web.UI;using Microsoft.VisualBasic;using System.IO;using System.Security.Permissi原创 2010-06-22 13:11:00 · 505 阅读 · 0 评论 -
一个图片操作类!图片缩小,图片水印~!
<br />/// <summary>/// 获取一个图片按等比例缩小后的大小。/// </summary>/// <param name="maxWidth">需要缩小到的宽度</param>/// <param name="maxHeight">需要缩小到的高度</param>/// <param name="imageOriginalWidth">图片的原始宽度</param>/// <param name="imageOriginalHeight">图片的原始高度</para转载 2010-08-12 17:20:00 · 623 阅读 · 0 评论 -
ASP.NET购物车
<br />ASP.NET购物车原创 2010-08-12 10:58:00 · 852 阅读 · 0 评论 -
C# api 动态加载C++的DLL函数方法
<br />C++函数如下:<br />// testdll3.cpp : Defines the entry point for the DLL application.<br />//<br />#include "stdafx.h"<br />BOOL APIENTRY DllMain( HANDLE hModule, <br /> DWORD ul_reason_for_call, <br /> LPVOID l原创 2010-08-12 09:31:00 · 3230 阅读 · 0 评论 -
C#图像处理
<br />一.Bitmap类<br />Bitmap对象封装了GDI+中的一个位图,此位图由图形图像及其属性 的像素数据组成.因 此Bitmap是 用于处理由像素数据定义的图像的对象.该类的主要方法和属性如下:<br />1. GetPixel方法和 SetPixel方法:获取和设置一个图 像的指定像素的颜色.<br />2. PixelFormat属性:返回图像的像 素格式.<br />3. Palette属性:获取和设置图像所使用 的颜色调色板.<br />4.原创 2010-08-12 09:26:00 · 1201 阅读 · 0 评论 -
asp.net导出excel方法
<br /> public static void ExpData(string strFileName, DataTable dt) { //清除Response缓存内容 HttpContext.Current.Response.Clear(); HttpContext.Current.Response.Buffer = true; strFileName = strFileName + ".xls";转载 2010-08-12 09:18:00 · 463 阅读 · 0 评论 -
C#截取超长字符串超出部分用....代替
<br />/// <summary> /// 将指定字符串按指定长度进行剪切, /// </summary> /// <param name= "oldStr "> 需要截断的字符串 </param> /// <param name= "maxLength "> 字符串的最大长度 </param> /// <param name= "endWith "> 超过长度的后缀 </param>原创 2010-06-10 12:07:00 · 3086 阅读 · 0 评论 -
css,table带边框:
<table bordercolor="#000000" style="border-right: #000000 1px solid; border-top: #000000 2px solid; border-left: #000000 2px solid; bor原创 2011-07-15 16:36:47 · 1457 阅读 · 0 评论 -
C#执行添加事务
/// /// 执行添加事务 /// /// /// public int AddList(List sqls) { return DbHelperSQL.ExecuteSqlTran(sqls); }BLL.c原创 2011-07-15 16:35:18 · 1378 阅读 · 0 评论 -
软件项目经理怎么做?
1 项目经理个人品质我们这里说说的个人品质,不是指人品,而是指作为项目管理者所应该具备的品质。比如不能冲动、要稳重、不能好发脾气,懂得妥协的艺术等等。不能冲动,稳重,这牵涉到个人的性格问题,但在做项目的过程中,应尽量避免这些因素对项目的影响,比如,有了问题,应先通过分析确定问题的原因,再根据原因确定出解决问题的办法。而不是冲动的去做某个决定。作为任何一个人来讲,都希望能和一个心理素转载 2012-03-28 14:14:01 · 4034 阅读 · 1 评论 -
程序员辞职常用借口
程序员辞职的理由一般都很简单。在我看来,也没有什么特别的套路。今晚,就分享一下我身边的程序员朋友离职所用的招数。1.决定走时,要高工资。说实话,程序员和老板谈工资一般不会做很多的铺垫。几句话单刀直入,嫌弃工资太低。一般的老板都深知程序员是不愁工作的,谈话一开始都会象征性的加一点,或者找理由跳过去,变相去关心程序员的境况,或者继续画饼。如果你决定离职,就往一个老板给不了的高工资报。老转载 2017-04-09 17:33:33 · 2797 阅读 · 0 评论 -
windows server 2008 r2的FTP配置和访问
1.安装IIS和设置FTP。通过服务器管理-->添加角色,在"选择服务器角色"中,选择"WEB服务器(IIS)"。再弹出窗口中选择FTP功能,安装。完成后,在网站下新建FTP站点,指定物理路径,选择基本身份验证,然后一路通关。2.防火墙设置。分别建立入规则和出规则,可命名为FTP,找到FTP程序所在路径,一般在system32下。3.一般来说做完上面两步就可以访问FTP服务了,但是在win转载 2016-05-24 10:45:03 · 1760 阅读 · 0 评论 -
判断网页里面是否存在【Referer判断跳转】
模拟百度跳转页面<!--body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; overflow:hidden;}.STYLE3 {font-size: 12px; color: #adc9d9; }-->原创 2016-03-29 18:17:31 · 4466 阅读 · 0 评论 -
做一个简单的大视频截取播放功能
index.aspx <object align="middle" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" class="OBJECT" id="MediaPlayer1">原创 2014-04-16 18:35:03 · 1027 阅读 · 0 评论 -
html横向导入word
导入word事件 /// /// 导入word事件 /// /// /// protected void btuDaoWord_ServerClick(object sender, EventArgs e) { StringBuilder html = new StringBuilder(); Tender原创 2013-07-13 17:17:39 · 3439 阅读 · 0 评论 -
asp.net获取Repeater里面Button提交后的文本框的值
protected void btnAddFJ_Click(object sender, EventArgs e) { Button bt = sender as Button; RepeaterItem rptItem = bt.Parent as RepeaterItem; TextBox txt原创 2012-12-05 10:09:43 · 2708 阅读 · 1 评论 -
Gridview创建行列 合并列、行类
Gridview创建行列1种.//行GridViewRow rowHeader = new GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Normal);//THTableCell th = new TableHeaderCell();//TDTableCell td = new TableC原创 2012-10-24 12:59:34 · 4595 阅读 · 0 评论 -
动态添加TemplateField列
GridViewTextTemplate类:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI.WebControls;/// ///GridViewTextTemplate 的摘要说明/// public class Grid原创 2012-10-23 15:03:57 · 5153 阅读 · 0 评论 -
WPF、WCF、WF打造Hello World程序
WCF,WPF,WF是什么东西WPF的全称是Windows Presentation Foundation,是微软新发布的Vista操作系统的三大核心开发库之一,其主要负责的是图形显示,所以叫Presentation(呈现)。作为新的图形引擎,WPF是基于DirectX的,当然增加了很多新的功能。其2D和3D引擎的强大看看Vista的界面就明白了,再加上其对Aero图形引擎转载 2012-05-25 10:15:05 · 4402 阅读 · 0 评论 -
整理几个有想法的面试题
bolg地址:http://blog.csdn.net/adsdassadfasdfasdf/article/details/75530281. 阶乘,指从1乘以2乘以3乘以4一直乘到所要求的数。例如所要求的数是4,则阶乘式是1×2×3×4,得到的积是24,24就是4的阶乘。 例如所要求的数是6,则阶乘式是1×2×3×……×6,得到的积是720,720就是6的阶乘。例如所要求的数是n,原创 2012-05-10 10:40:55 · 3592 阅读 · 3 评论 -
Asp.net使用JQuery实现评论的无刷新分页及分段延迟加载效果
首先建立数据库,数据关系图如下:本文要实现的效果就是在评论别人文章时,如果文章内容过长或者评论内容过长,实现的一个评论分段延迟加载的效果,即每页可显示30条评论,可每隔10条延迟加载一次以提高网页传输显示效率。 我所实现的页面延迟的原理如下图,就是求出X的距离小于100时进行加载延迟的评论,然后又设置了一个标记位,用来判断延迟加载了多少次,每页仅能加载30条评论记录。然后再转载 2012-05-04 09:20:34 · 1957 阅读 · 4 评论 -
使用C#开发ActiveX控件
0. 前言 ActiveX控件以前也叫做OLE控件或OCX控件,它是一些软件组件或对象,可以将其插入到WEB网页或其它应用程序中。使用ActiveX插件,可以轻松方便的在 Web页中插入多媒体效果、交互式对象以及复杂程序等等。 通常使用C++或VB开发ActiveX控件,本文探讨一下在Visual Studio 2005环境中使用C#开发ActiveX控件的技术实现。转载 2012-04-20 16:51:20 · 695 阅读 · 0 评论 -
CSS分割图片
一张图片,用CSS分割成多个小图标。css样式:.icon{ background:url(../images/tabicons.png) no-repeat;width:18px; line-height:18px; display:inline-block;}.tu0101{background-position:-0px -0px;}.tu0201{background-原创 2012-04-20 15:38:00 · 6015 阅读 · 3 评论 -
无刷新仿google波形扭曲彩色Asp.net验证码
<br />无刷新仿google波形扭曲彩色Asp.net验证码原创 2010-08-05 15:28:00 · 664 阅读 · 0 评论 -
取一个页面的返回值,保存到一个string变量里
<br />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.Net;using System.IO;namespace WindowsFo原创 2010-08-05 11:20:00 · 516 阅读 · 0 评论 -
取一个页面的返回值,保存到一个string变量里
<br />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.Net;using System.IO;namespace WindowsFo原创 2010-08-05 11:20:00 · 656 阅读 · 0 评论 -
session时间很短 解决方法
开启ASP.NET State Service服务,把它设成自动。再在web.config中的下加一行20表示20分钟~~~原创 2010-05-17 10:07:00 · 1845 阅读 · 0 评论 -
客户端往服务器短发信息
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Net;using Sys原创 2010-05-11 17:28:00 · 613 阅读 · 0 评论 -
asp.net跳转页面的三种方法比较
1、 response.redirect 这个跳转页面的方法跳转的速度不快,因为它要走2个来回(2次postback),但他可以跳 转到任何页面,没有站点页面限制(即可以由雅虎跳到新浪),同时不能跳过登录保护。但速度慢是其最大缺陷!redirect跳转机制:首先是发送一个http请求到客户端,通知需要跳转到新页面,然后客户端在发送跳转请求到服务器端。需要注意的是跳转后内部空间保存的所有数据信息将会原创 2010-05-11 12:42:00 · 419 阅读 · 1 评论 -
ASP.net连接Excel
首先添加命名空间<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> using System.Data.OleDb; protected void Page_Load(object sender,原创 2010-05-11 11:49:00 · 989 阅读 · 0 评论 -
Asp.Net技巧精萃
在网上搜集整理的资料,希望对大家有所帮助1.与的区别: 答:是在程序执行时调用,是在DataBind()方法之后被调用2.控件接收哪些类型数据? 答:接收Bind的控件,一般有dropDownList,DataList,DataGrid,ListBox这些集合性质的控件,而被捆绑 的主要是ArrayList(数组),Hashtable(哈稀表),DataView(数据视图),DataRea原创 2010-05-11 12:27:00 · 410 阅读 · 0 评论 -
ASP.Net中MD5和SHA1加密的几种方法
首先简单介绍一下MD5和SHA1:MD5的全称是Message-Digest Algorithm 5(信息-摘要算法),在90年代初由Mit Laboratory for Computer Science和Rsa data security inc的Ronald l. rivest开发出来,经md2、md3和md4发展而来。它的作用是让大容量信息在用数字签名软件签署私人密匙前被"压缩"成一种保密的原创 2010-05-11 12:25:00 · 449 阅读 · 0 评论 -
ASP.NET保持用户状态的九种选择
摘要: ASP.NET为保持用户请求之间的数据提供了多种不同的途径。你可以使用Application对象、cookie、hidden fields、Sessions或Cache对象,以及它们的大量的方法。决定什么时候使用它们有时很困难。本文将介绍了上述的技术,给出了什么时候使用它们的一些指导。尽管这些技术中有些在传统ASP中已经存在,但是有了.NET框架组件后该在什么时候使用它们发生原创 2010-05-11 12:18:00 · 925 阅读 · 0 评论