// GUID
Math.trueRandom = (function (){
if (crypto.getRandomValues) {
// if we have a crypto library, use it
return function (){
var array = new Uint32Array(1);
crypto.getRandomValues(array);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! | |
| Math.uuid.js (v1.4) | |
| http://www.broofa.com | |
| mailto:[email protected] | |
| Copyright (c) 2010 Robert Kieffer | |
| Dual licensed under the MIT and GPL licenses. | |
| */ | |
| /** |
C#图片缩放,利用插值去除缩图毛边。
/// <summary>
/// 缩放图片
/// </summary>
/// <param name="original">原始图片</param>
/// <param name="width">新的宽度</param>
/// <param name="height">新的高度</param>
/// <returns>处理以后的图片</returns>/* utf.js - UTF-8 <=> UTF-16 convertion
* Copyright (C) 1999 Masanao Izumo <[email protected]>
* Version: 1.0
* LastModified: Dec 25 1999
* This library is free. You can redistribute it and/or modify it.
* Reference http://suflow.iteye.com/blog/1687396
*/
/*(function ($){
$.fn.qrcode = function (options){
// 如果参数书字符串,默认设置成二维码内容
if (typeof options === 'string') {
options = { text: options };
}
// 参数合并
options = $.extend({}, {源码
(function ($){
$.fn.sync = function (lock, fn){
// 初始化参数
fn = arguments.length === 1 ? lock : fn;
fn = typeof lock === 'function' ? fn : $.noop;
lock = lock && typeof lock === 'string' ? lock : 'default';
lock = 'data-sync-' + lock;带行报错功能的CSS解析器
/*
* css
* https://github.com/spmjs/spm2/issues/4
*
* Hsiaoming Yang <[email protected]>
*/
var endblockRE = /^\/\*!\s*endblock(?:\s*|\s+(.+?)\s*)\*\/$/,Cmd-Util工具CSS拆分正则
var tokensRE = /(\/\*[^*]*\*+([^/*][^*]*\*+)*\/)|(@import\s+url\s*\(.+?\);?|@import\s+(['"]).+?\4;?)|((.(?!@import\s|\/\*))+(.(?=@import\s|\/\*))*)|((.(?!@import\s|\/\*))*(.(?=@import\s|\/\*))+)|([\r\n]+)/g;/**
* 计算字符串所占的内存字节数,默认使用UTF-8的编码方式计算,也可制定为UTF-16
* UTF-8 是一种可变长度的 Unicode 编码格式,使用一至四个字节为每个字符编码
*
* 000000 - 00007F(128个代码) 0zzzzzzz(00-7F) 一个字节
* 000080 - 0007FF(1920个代码) 110yyyyy(C0-DF) 10zzzzzz(80-BF) 两个字节
* 000800 - 00D7FF
* 00E000 - 00FFFF(61440个代码) 1110xxxx(E0-EF) 10yyyyyy 10zzzzzz 三个字节
* 010000 - 10FFFF(1048576个代码) 11110www(F0-F7) 10xxxxxx 10yyyyyy 10zzzzzz 四个字节