推荐一个.Net的轻型RPC服务UcAsp.RPC
摘要:1.UcAsp.RPC是基于..NET Framework 4.6一个RPC框架; 2.代码侵入性非常低,几乎不需要改动代码! 3.该框架的设计思路是已经写好单机版的程序怎么才能快速的实现分布式RPC部署; Nuget 安装 Install-Package UcAsp.RPC 服务器端配置 服务器端
阅读全文
Kmeans++算是DONet实现
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Drawing;using System.Drawing.Imaging;namespace ConsoleA...
阅读全文
C#生成的图片如何设置DPI
摘要:DPI在印刷中起到很的作用,决定印刷的质量。但是c#中GDI都是采用默认的DPI--即你显示器的DPI。这个就比较麻烦了,比如进入打印,或者印刷往往尺寸不对。其实Bitmap里面有个属性专门设置DPI的,“SetResolution”使用方法就是[代码]第一个参数表示x坐标上的dpi,第二个就是y坐标上的dpi;
阅读全文
刚刚写的一个加密算法
摘要:using System;namespace UcAspClass{ /**//// /// Encrypt 密码加密算法 /// http://www.hzren.net http://www.ucasp.net /// 作者:QQ 36279010 /// public class Encrypt { public Encrypt...
阅读全文
如何在DropDownList第一項加入新項目
摘要:若您的DropDownList項目來自資料庫, 您可以這麼寫:DataSet ds = ....;myDropDownList.DataSource = ds.Tables[0].DefaultView;myDropDownList.DataTextField="vDesc";myDropDownList.DataValueField="ID";myDropDownList.DataBind();...
阅读全文
MS SQL日志清理代码
摘要:SET NOCOUNT ONDECLARE @LogicalFileName sysname, @MaxMinutes INT, @NewSize INTUSE Hzren -- 要操作的数据库名SELECT @LogicalFileName = 'Hzren_log', -- 日志文件名@MaxMinutes = 10, ...
阅读全文
最近ASP.NET WAP开发的一些情况!
摘要:1.模拟器选择: WINWAP, M3Gate, UP.SDK4.0,(推荐) OPenWave 5.0 (测试时需要), OPenWave6.2, (IIS 6.0应用,IIS5.0可能显示,但会有问题) CheckCom WAPBrowser 3.2模拟器问题: ASP.NET把一些常有的模拟器,的配制信息用正则表达式写在Machine.config里...
阅读全文
常用的 .Net 异常类
摘要:Exception 类 描述 SystemException 其他用户可处理的异常的基本类 ArgumentException 方法的参数是非法的 ArgumentNullException 一个空参数传递给方法,该方法不能接受该参数 ArgumentOutOfRangeException 参数值超出范围 ArithmeticException 出现算术上溢或者下溢 ...
阅读全文
WebRequest
摘要:WebRequestreq=WebRequest.Create("http://www.ucasp.net"); WebResponseresult=req.GetResponse(); StreamReceiveStream=result.GetResponseStream(); Byte[...
阅读全文
修改数据库的所有者
摘要:sp_changeobjectowner 'titles', 'asp' http://blog.csdn.net/herman_chow/archive/2005/04/06/338560.aspx
阅读全文
Email 发送程序
摘要:MailMessagemessage=newMailMessage(); message.From="yurix9209@sohu.com"; message.To="ServUcn@hotmail.com"; message.Body="test"; messag...
阅读全文
图片生成部分代码
摘要:usingSystem; usingSystem.Drawing; usingSystem.Drawing.Imaging; namespaceUcaspCount { publicclassImages { string_ofileName=""; string_nfileName=""; publicst...
阅读全文
[求助]在EditItemTemplate创建动态DropDownList问题
摘要:protected void DDownList(){ string connStr="server=" + ConfigurationSettings.AppSettings["ServerName"] + ";User ID="+ ConfigurationSettings.AppSettings["UserID"] +"; password="...
阅读全文
C#中一些字符串操作的常用用法
摘要://获得汉字的区位码 byte[] array = new byte[2]; array = System.Text.Encoding.Default.GetBytes("啊"); int i1 = (short)(array[0] - ''\0''); int i2 = (short)(array[1] - ''\0''); //unicode解码方式下的汉字码 ar...
阅读全文
StringBuilder字符串连接
摘要:using System;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Text;namespace ucasp{ public class ucpage : Page { protected Label Label1; ...
阅读全文
SqlDataAdapter
摘要:using System;using System.Data;using System.Configuration;using System.Data.SqlClient;using System.Web.UI;using System.Web.UI.WebControls;namespace Map{ public class Creat : Page { pro...
阅读全文
OleDbAdapter
摘要:using System;using System.Data;using System.Data.OleDb;namespace Mytest{public class Conn:Page{int pageSize,currentPage;string connStr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapP...
阅读全文