随笔分类 - 代码收藏
平时工作中或业余时编写的一些代码
摘要:编写了一个简单的串口映射工具,方便调试串口 代码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using
阅读全文
摘要:由于是触摸屏,所以需要一款JS虚拟键盘。上网找了一个好用的VirtualKeyboard,作了修改。 修改该插件参考的博客文章:http://www.cnblogs.com/xinggong/archive/2013/02/07/2908534.html 下载链接:JS虚拟键盘Virtual...
阅读全文
摘要:JS数字键盘,JS小键盘CSS代码:#numberkeyboard{ border: 1px solid #b3b3b3; background: #f2f3f7; height: 285px; margin: 0; padding: 2px; position:...
阅读全文
摘要:HTML的select控件美化CSS:.div-select{ border: solid 1px #999; height: 40px; line-height: 40px; cursor: default;}.div-select-text{ float: left...
阅读全文
摘要:checkbox和radio的美化checkbox: 测试101 ...
阅读全文
摘要:最近写C#串口通信程序,系统是B/S架构。SerialPort类有一个DataReceived事件,用来接收串口返回的数据,但这种方式在C/S架构下很好用,但B/S就不好处理了。所以写了一个同步模式接收返回数据的方法,不使用DataReceived事件。经过测试,可以正常使用。 一、Machi...
阅读全文
摘要:生成验证码的类:using System;using System.Collections.Generic;using System.Drawing;using System.Text;namespace Controllers.Core.Util{ /// /// 验证码 //...
阅读全文
摘要:HTML代码:@{ Layout = null;}@using DAL;@using System.Data;@{ AreaDal areaDal = new AreaDal(); string areaId = ViewBag.areaId; DataRow drArea ...
阅读全文
摘要:1、引用JS: <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=87be68605271c5e4cfe712787041be0a"></script> 2、HTML: 东经: <input name=
阅读全文
摘要:代码:/// /// Http上传文件/// public static string HttpUploadFile(string url, string path){ // 设置参数 HttpWebRequest request = WebRequest.Create(url) as ...
阅读全文
摘要:代码:/// /// Http下载文件/// public static string HttpDownloadFile(string url, string path){ // 设置参数 HttpWebRequest request = WebRequest.Create(url) a...
阅读全文
摘要:首先引用ThoughtWorks.QRCode.dll代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Drawing;using ThoughtWork...
阅读全文
摘要:代码:1、AES加密类using System;using System.IO;using System.Security.Cryptography;using System.Text;namespace Utils{ /// /// AES加密解密 /// public...
阅读全文
摘要:代码(该AES加密解密代码可以和Java互通): using System; using System.IO; using System.Security.Cryptography; using System.Text; namespace Utils { /// <summary> /// AES
阅读全文
摘要:代码:/// /// 分类检索 查询selectname/// public static DataTable GetSelectName_FLJS(string thing_type_id, string men_id, string gang_id, string mu_id, string k...
阅读全文
摘要:代码:using System.Data;using System.IO;using NPOI.HSSF.UserModel;using NPOI.SS.UserModel;namespace ahwildlife.Utils{ /// /// Excel工具类 /// 利用NP...
阅读全文
摘要:1、跨线程访问控件委托和类的定义using System;using System.Windows.Forms;namespace ahwildlife.Utils{ /// /// 跨线程访问控件的委托 /// public delegate void InvokeDe...
阅读全文
摘要:工具类定义: /** * 日期范围工具类 */ var dateRangeUtil = (function () { /*** * 获得当前时间 */ this.getCurrentDate = function () { return new Date(); }; /*** * 获得本周起止时间
阅读全文
摘要:日期时间对象转字符串 // 对Date的扩展,将 Date 转化为指定格式的String // 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符, // 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字) // 例子: /
阅读全文
摘要:一、引用CSS和JS二、HTML代码三、JS代码$('#dept').combotree({ url: '#{GetDeptTree}', required: false, onSelect: function (node) { $.ajax({ ...
阅读全文

浙公网安备 33010602011771号