给字符串的字符和数字间加上空隔var str = 'a23dssf12ldf2lf4';function addSplit(str){ var reg = /(\D+)/g; var str = str.replace(/(\d+)/g, ' $1 '); return str.r...
分类:
其他好文 时间:
2014-07-10 12:40:38
阅读次数:
179
止乎于分享! 1 ///小写金额转化大写金额 2 function AmountLtoU(amount) { 3 if (isNaN(amount) || amount >= 1000000000000) return "无效金额!"; //数值最大不超过1万亿 4...
分类:
Web程序 时间:
2014-07-10 12:19:14
阅读次数:
196
array_flip() 函数返回一个反转后的数组,如果同一值出现了多次,则最后一个键名将作为它的值,所有其他的键名都将丢失。如果原数组中的值的数据类型不是字符串或整数,函数将报错。Return Values¶Returns the flipped array on success andNULLo...
分类:
Web程序 时间:
2014-07-10 12:02:59
阅读次数:
274
方法1: 使用js的扩展方法 ** * json对象转字符串形式 */ function json2str(o) { var arr = []; var fmt = function(s) { if (typeof s == 'object' && s != null) return json2st...
分类:
Web程序 时间:
2014-07-10 11:41:35
阅读次数:
210
function uaredirect(f){try{if(document.getElementById("bdmark")!=null){return}var b=false;if(arguments[1]){var e=window.location.host;var a=window.loc...
分类:
移动开发 时间:
2014-07-10 10:53:54
阅读次数:
294
未使用Async之前coffeescript写的代码:exports.product_file_add = (req,res) -> if !req.param('file_id') return res.json({'flag':'error','msg':'请先上传文件再保存!'}) ...
分类:
Web程序 时间:
2014-07-10 10:16:14
阅读次数:
773
#include typedef int (__stdcall* FUN)(int);//定义函数指针,参数为Int,返回为int,调用约定__stdcallint __stdcall fun1(int x){ std::cout << x << std::endl; return x;...
分类:
其他好文 时间:
2014-07-10 00:45:12
阅读次数:
203
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.
分类:
其他好文 时间:
2014-07-10 00:18:17
阅读次数:
278
Given two binary strings, return their sum (also a binary string).
分类:
其他好文 时间:
2014-07-09 23:52:48
阅读次数:
383
namespace DMS.Common{ public class MsgHelper { public static DialogResult ShowErrorMsgBox(string error) { return Messag...
分类:
其他好文 时间:
2014-07-07 23:18:17
阅读次数:
258