This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="format-detection" content="telephone=no"> | |
<title>系统维护</title> | |
<style> | |
body { |
This file contains 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
<?php | |
/** | |
* >> javascript operator in php x86_64 | |
* @param int $v | |
* @param int $n | |
* @return int | |
*/ | |
function rr($v, $n) | |
{ |
This file contains 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
<?php | |
/** | |
* 获取远程文件大小 | |
* @param $url | |
* @return int|null | |
*/ | |
function getRemoteFileSize($url) | |
{ | |
$size = null; |
This file contains 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
<?php | |
/** | |
* PHP 读取 exe\dll 文件版本号 | |
* | |
* @auth @腾讯电脑管家(https://zhidao.baidu.com/question/246143241010222924.html) | |
* @param $filename 目标文件 | |
* @return string|string[] | |
*/ | |
function getVersionFromFile($filename) |
This file contains 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
//cardType:DC->储蓄卡,CC->信用卡 | |
function bankCardAttribution(bankCard){ | |
var cardTypeMap = { | |
DC: "储蓄卡", | |
CC: "信用卡", | |
SCC: "准贷记卡", | |
PC: "预付费卡" | |
}; | |
function extend(target, source) { |
This file contains 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
/**验证Email**/ | |
function isEmail(str) { | |
if (str.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1) | |
return true; | |
else | |
return false | |
} | |
/**数字检查**/ | |
function isNum(str) { | |
return str.match(/\D/) == null |
This file contains 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
var type = function (o){ | |
var s = Object.prototype.toString.call(o) | |
return s.match(/\[object (.*?)\]/)[1].toLowerCase() | |
} | |
type({}); // "object" | |
type([]); // "array" | |
type(5); // "number" | |
type(null); // "null" | |
type(); // "undefined" | |
type(/abcd/); // "regex" |
This file contains 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
function shuffle(arr) { // 随机打乱数组 | |
let _arr = arr.slice() // 调用数组副本,不改变原数组 | |
for (let i = 0; i < _arr.length; i++) { | |
let j = getRandomInt(0, i) | |
let t = _arr[i] | |
_arr[i] = _arr[j] | |
_arr[j] = t | |
} | |
return _arr | |
} |
This file contains 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
function pages(arr, len) { | |
const pages = [] | |
arr.forEach((item, index) => { | |
const page = Math.floor(index / len) | |
if (!pages[page]) { | |
pages[page] = [] | |
} | |
pages[page].push(item) | |
}) | |
return pages |
This file contains 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
// 判断刘海屏 | |
function hasNotch() { | |
var proceed = false | |
var div = document.createElement('div') | |
if (CSS.supports('padding-bottom: env(safe-area-inset-bottom)')) { | |
div.style.paddingBottom = 'env(safe-area-inset-bottom)' | |
proceed = true | |
} else if (CSS.supports('padding-bottom: constant(safe-area-inset-bottom)')) { | |
div.style.paddingBottom = 'constant(safe-area-inset-bottom)' | |
proceed = true |
OlderNewer