自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(31)
  • 收藏
  • 关注

翻译 ASP.NET Boilerplate abp应用层使用DTO上传文件

public interface IFileAppService:IApplicationService { Task UploadAsync(FileUploadInput input); //Task UploadAsync(FileUploadInput input,IFormFile file); Task<PagedResultDto<FileOutput>> GetListAsync(FilePagedInput..

2021-05-28 13:36:06 353

翻译 javascript 字节单位转换

//字节转换function byteConvert(bytes) { if (isNaN(bytes)) { return ''; } let symbols = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; let exp = Math.floor(Math.log(bytes)/Math.log(2)); if (exp < 1) { exp = 0; } let i = Ma.

2021-01-12 15:33:34 476 1

翻译 html 摄氏度符号输入

\u2103

2020-07-02 16:36:40 1068

原创 javascript 字符串转换成纯数字格式

var txt="你好啊!abcd123456" var intcodestr=intcode.encode(txt); console.log(intcodestr); 输出:053076050103053097087057053090087075055055121066089087074106090068069121077122081049078103061061 va...

2020-04-09 17:00:23 209

翻译 asp 判断字符串是否在数组中

function inArray(str,arr) inArray=false if not isnull(arr) and isarray(arr) then for ii=0 to ubound(arr) if ucase(trim(arr(ii)))=ucase(trim(str)) then inAr...

2020-04-08 15:48:42 1139

转载 asp base64 解码

Function Base64Decode(ByVal base64String) 'rfc1521 '1999 Antonin Foller, Motobit Software, http://Motobit.cz Const Base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" ...

2020-04-07 15:03:50 538

翻译 JavaScript 日期格式化

//将日期转化为指定格式的字符串var DateFormat = function (date, formatStr) { var o = { "M+": date.getMonth() + 1, //月份 "d+": date.getDate(), //日 "h+": date.getHours(), //小时 "m+"...

2020-01-10 10:06:25 92

翻译 CSS实现底部固定位置

<style>html,body { margin:0; padding:0; height:100%;}#container { min-height:100%; position:relative;}#header { background:#ff0; padding:10px;}#body { padding:10...

2019-09-28 17:04:41 11608

原创 asp.net webapi HttpRequestMessage 获取get和post所有参数

/// <summary>/// 获取Http请求Get和Post所有参数/// </summary>/// <param name="request">HttpRequestMessage实例</param>/// <returns>Get和Post参数键值对集合</returns>public static c...

2019-08-23 17:09:06 9696

原创 NPOI R1C1引用样式转A1引用样式

using NPOI;using NPOI.SS.UserModel;using NPOI.HSSF.UserModel;using NPOI.SS.Util;using System.Text.RegularExpressions;/// <summary>/// R1C1样式转A1样式/// </summary>/// <param name=...

2019-05-24 16:15:49 769

原创 ASP VBScript 获取数组长度

由于需要在vb程序中获取数组的实际长度,在网上和w3c查了下都找不到获取数组长度的合适方法。所以自己就写了一个获取数组实际的长度的方法。实现原理很简单。就是循环判断数组的值,如果数组该项的值不为空"",那么长度就增加1。function ArrayLength(arry) dim len len=0 for each val in arry if val<>"" th...

2019-04-22 17:08:58 918

原创 ASP VBScript 实现string.format 字符串格式化

'字符串格式化Format'str 被格式化的字符串'strArry 占位符数组,数组索引必须与占位符数字一致function FormatString(str,strArry) dim tempStr,index tempStr=str index=0 for each val in strArry dim placeholder placeholder="{"+Cstr...

2019-04-10 16:16:24 1466

原创 C# 调用BouncyCastle将RSA密钥与pem格式进行互转

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Security.Cryptography;using System.IO;using Org.BouncyCastle.Crypto...

2018-12-20 17:37:14 4137

原创 c# 生成指定长度的随机字符串(字母与数字)

/// &lt;summary&gt;/// 生成随机字符串/// &lt;/summary&gt;public class RandomChars{ /// &lt;summary&gt; /// 字符类型 /// &lt;/summary&gt; private enum CharType { /// &lt;summary&g...

2018-12-11 14:35:30 6696 1

原创 highlight.js扩展代码行号

从GitHub下载highlightjs的源代码,下载地址:https://github.com/highlightjs/highlight.js在文件highlight.js中进行源代码的修改:(function(factory) { //highlightjs源代码 return hljs;});/** * 加入源代码行号 */(function(windo...

2018-11-27 12:26:31 2862 1

翻译 javascript 实现string.format 字符串格式化

String.prototype.format =function () { var args = arguments; return this.replace(/\{(\d+)\}/g, function(m, i){ return args[i]; }); };使用"abc{0}def{1}g".format ("1","2")输出...

2018-11-27 10:47:59 4657

原创 sql table数据转json数据

create proc [dbo].[TableToJson]@tableName varchar(30) --表名,临时表需要 # 开头/* 需要转换的列名,支持三种方式: * 1. ='', 转换所有字段; * 2. ='colName1,colName2,colName3,...', 转换输入的字段; * 3. ='<>,colName1,colName2,co...

2018-11-21 13:51:03 5617

翻译 sql 分割字符串

create function dbo.fn_split( @in_source nvarchar(4000), -- 被分割字符串 @in_delimiter nvarchar(10) -- 分割符)returns @temp table(seq int identity, value nvarchar(100))as begin declare @i int, @len i...

2018-11-21 11:52:46 440

原创 C# HttpWebRequest post 请求传参数

Dictionary&lt;string, string&gt; parameters = new Dictionary&lt;string, string&gt;(); //参数列表parameters.Add("paraName", "paraValue");string url = "";HttpWebRequest request = null;HttpWebRespon...

2018-11-16 15:53:34 13857 1

翻译 jquery dialog 使用URL加载窗体

&lt;div id="dialogfrm" style="display:none"&gt;    &lt;iframe id ="frame" style="border: 0px;" src="url" width='100%' height='100%'&gt;&lt;/iframe&gt;&lt;/div&gt;$(&qu

2018-10-25 09:44:53 4282

原创 NPOI填充整列样式

定义填充整列样式函数 /// &lt;summary&gt;/// 填充列样式/// &lt;/summary&gt;/// &lt;param name="ws"&gt;ISheet实例&lt;/param&gt;/// &lt;param name="col"&gt;列索引&lt;/param&gt;/// &lt;param name=&quo

2018-10-16 15:39:04 1881

原创 NPOI 获取指定范围的单元格

//返回指定范围单元格public ICellRange&lt;ICell&gt; GetCellRange(ISheet ws, CellRangeAddress range){ int firstRow = range.FirstRow; int firstColumn = range.FirstColumn; int lastRow = range.LastR...

2018-10-16 14:59:55 7320 1

转载 Jquery validate验证表单时多个name相同的元素只验证第一个的问题

修复jquery.validate插件中name属性相同(如name=’a[]‘)时验证的bug使用jquery.validate插件http://jqueryvalidation.org/,当节点的name相同时候,脚本特意忽略剩余节点,导致所有相关节点的errMsg都显示在第一个相关节点上。这个bug在动态生成表单时候影响比较大。通过查询资料,找到一个解决方案:http://sta...

2018-10-12 17:52:14 692

转载 ASP中文URL解码URLDecode函数实现

大家都知道,在asp中,我们一般都通过 Server.UrlEncode 进行url的编码,这样使得一些特殊的字符能够通过链接正常访问,但当我们把这个编码后的url字符存入数据库后,有些时候需要程序读取这个url进行处理时,就需要对其进行url解码,在php中这些功能很完善,但asp中,我们是找不到Server.UrlDecode函数的,鉴于这个问题,我们就要自己写一个解码函数了,以下是一段支持中...

2018-09-18 14:04:17 4914

原创 NPOI填充整行样式

IRow r;ICellStyle cellStyle;gen_excel_cmd_fillWholeRowStyle(r,cellStyle)//填充整行样式public void gen_excel_cmd_fillWholeRowStyle(IRow r, ICellStyle cellStyle) { List&lt;ICell&gt; clist = r.Cells...

2018-08-28 17:23:40 3415

翻译 asp.net mvc 从客户端()中检测到有潜在危险的 Request.Form 值解决方法

在Web.config文件中添加&lt;system.web&gt;&lt;httpRuntime requestValidationMode="2.0"/&gt;&lt;/system.web&gt;在MVC的Action添加如下两个特性[HttpPost][ValidateInput(false)]public string test(){}...

2018-08-25 22:59:08 865

原创 使用Vue框架Select元素在ie11加载页面时显示异常

&lt;div id="app"&gt; &lt;select id="sl" v-model="selected"&gt; &lt;option disabled value=""&gt;请选择&lt;/option&gt; &lt;option value="1"&gt;A&l

2018-08-03 09:17:45 1566

转载 C#查看代码运行时间

//引用命名空间using System.Diagnostics;Stopwatch swatch = new Stopwatch(); //创建Stopwatch 实例swatch.Start(); //开始计时code.... //需要计时的代码swatch.Stop(); //结束计时string time=swatch.Elapsed...

2018-07-19 11:36:46 2198

原创 asp 生成guid

dim objTypeLib set objTypeLib = CreateObject("Scriptlet.TypeLib")'获取guid值guid = cstr(mid(objTypeLib.Guid, 2 ,len(objTypeLib.Guid)-4))  

2018-07-17 14:45:23 883

原创 SqlServer获取日期天数

select day(dateadd(day,-1,convert(char(07),dateadd(month,1,@date),120)+'-01'))

2018-07-14 13:06:38 5476

原创 javascript接收asp.net mvc传递的json数据乱码

@{//后端传递的json数据string str = Model.jsonStr;}&lt;script&gt;var jsonstr=@str //接收失败,"转换被成&amp;quot解决方法:1.var [email protected](Json.Encode(str))2.var str= "@str";var reg = new RegExp("&amp;quot;", "g"); ...

2018-07-14 12:51:55 729

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除