原创 CSS實現底部固定位置

<style> html, body { margin:0; padding:0; height:100%; } #container { min-height:100%; position:relativ

原创 javascript 字符串轉換成純數字格式

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

原创 asp.net webapi HttpRequestMessage 獲取get和post所有參數

/// <summary> /// 獲取Http請求Get和Post所有參數 /// </summary> /// <param name="request">HttpRequestMessage實例</param> /// <retu

原创 asp 判斷字符串是否在數組中

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

原创 asp base64 解碼

Function Base64Decode(ByVal base64String) 'rfc1521 '1999 Antonin Foller, Motobit Software, http://Motobit.cz Con

原创 NPOI R1C1引用樣式轉A1引用樣式

using NPOI; using NPOI.SS.UserModel; using NPOI.HSSF.UserModel; using NPOI.SS.Util; using System.Text.RegularExpressio

原创 ASP VBScript 獲取數組長度

 由於需要在vb程序中獲取數組的實際長度,在網上和w3c查了下都找不到獲取數組長度的合適方法。所以自己就寫了一個獲取數組實際的長度的方法。實現原理很簡單。就是循環判斷數組的值,如果數組該項的值不爲空"",那麼長度就增加1。 functi

原创 ASP VBScript 實現string.format 字符串格式化

'字符串格式化Format 'str 被格式化的字符串 'strArry 佔位符數組,數組索引必須與佔位符數字一致 function FormatString(str,strArry) dim tempStr,index tempS

原创 C# 調用BouncyCastle將RSA密鑰與pem格式進行互轉

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; us

原创 c# 生成指定長度的隨機字符串(字母與數字)

/// <summary> /// 生成隨機字符串 /// </summary> public class RandomChars { /// <summary> /// 字符類型 /// </summary>

原创 javascript 實現string.format 字符串格式化

String.prototype.format =function () { var args = arguments; return this.replace(/\{(\d+)\}/g, function(m, i

原创 highlight.js擴展代碼行號

從GitHub下載highlightjs的源代碼,下載地址:https://github.com/highlightjs/highlight.js 在文件highlight.js中進行源代碼的修改: (function(factory)

原创 sql table數據轉json數據

--Table數據轉換成Json或者Object create proc [dbo].[TableToJson] @tableName varchar(30) --表名,臨時表需要 # 開頭 /* 需要轉換的列名,支持三種方式:

原创 sql 分割字符串

create function dbo.fn_split( @in_source nvarchar(4000), -- 被分割字符串 @in_delimiter nvarchar(10) -- 分割符 ) returns @te

原创 C# HttpWebRequest post 請求傳參數

Dictionary<string, string> parameters = new Dictionary<string, string>(); //參數列表 parameters.Add("paraName", "paraVa