View area.js
function Dsy(){ | |
this.Items = {}; | |
} | |
Dsy.prototype.add = function(id,iArray){ | |
this.Items[id] = iArray; | |
} | |
Dsy.prototype.Exists = function(id){ | |
if(typeof(this.Items[id]) == "undefined") return false; | |
return true; | |
} |
View ip_scan_nmap.py
#encodeing:utf8 | |
import os | |
try: | |
import netifaces | |
import nmap | |
except ImportError: | |
try: | |
command_to_execute = "pip install netifaces python-nmap || easy_install netifaces python-nmap" |
View aria2c.sh
#!/bin/sh | |
path=`pwd` | |
case "$1" in | |
start) | |
echo -n "Starting aria2c" | |
aria2c --conf-path=${path}'/conf/aria2.conf' -D | |
;; | |
stop) |
View function.js
function str_rand_scroll(el, time, str) { | |
try { | |
if (el === undefined) throw '没有传入变量el'; | |
try { | |
if (time === undefined) throw '没有传入变量time'; | |
try { | |
if (str === undefined) { | |
// var str = '一乙二十丁厂七卜八人入儿匕几九刁了刀力乃又三干于亏工土士才下寸大丈与万上小口山巾千乞川亿个夕久么勺凡丸及广亡门丫义之尸己已巳弓子卫也女刃飞习叉马乡丰王开井天夫元无云专丐扎艺木五支厅不犬太区历歹友尤匹车巨牙屯戈比互切瓦止少曰日中贝冈内水见午牛手气毛壬升夭长仁什片仆化仇币仍仅斤爪反介父从仑今凶分乏公仓月氏勿欠风丹匀乌勾凤六文亢方火为斗忆计订户认冗讥心尺引丑巴孔队办以允予邓劝双书幻玉刊未末示击打巧正扑卉扒功扔去甘世艾古节本术可丙左厉石右布夯戊龙平灭轧东卡北占凸卢业旧帅归旦目且叶甲申叮电号田由只叭史央兄叽叼叫叩叨'; | |
var str = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+' | |
} |
View base.js
// 交换函数 | |
Array.prototype.swap = function (i, j) { | |
[this[j], this[i]] = [this[i], this[j]] | |
} |
View click_str.js
$(document).click(function() { | |
var a = ['富强', '民煮', '自由', '平等', '友爱', '河蟹', '神马', '香甜']; | |
var v = a[Math.floor(Math.random() * a.length)]; | |
var tips = $('<div style="position:fixed;z-index:9999;color:red;top:200px;left:600px"></div>').text(v).animate({top:'160px'}, 750, function() {$(this).remove()}); | |
$('body').append(tips); | |
}) |
View example.js
var w = require('./with.js'); | |
const serveTime = '2017-01-01 00:00:00'; | |
setInterval(()=> { | |
console.log(w.serve(serveTime)); | |
}, 1000); |
View url_query_str.js
var url = { | |
key: function _get(name, query) { | |
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); | |
if (query) { | |
var r = query.match(reg); | |
} else { | |
var r = window.location.search.substr(1).match(reg); | |
} | |
if (r != null) { | |
return unescape(r[2]); |
View Config.php
<?php | |
namespace App; | |
class Config | |
{ | |
private static $name = ''; | |
private static $arr = []; | |
/** | |
* @return array | |
*/ | |
public static function getArr() |
View xdec.php
<?php | |
/** | |
* 自定义多进制 | |
* @param $str 自定义的多进制字符串 | |
* @param $num 十进制数字 | |
* @return string | |
* @author alexander_phper | |
* @link https://blog.csdn.net/alexander_phper/article/details/51363491 | |
*/ | |
function xdec($str, $num){ |
OlderNewer