#970
展开↯#971
作者:广西南宁市
//获取视频数据的地址
,getMovieUrl:URL+"php/getMovie.php" //视频数据获取地址
//工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的从新定义
, toolbars: [["fullscreen","source","undo","redo","insertunorderedlist","insertorderedlist","unlink","link","cleardoc","selectall","print","searchreplace","preview","help","insertimage","snapscreen","emotion","horizontal","anchor","spechars","blockquote","insertcode","bold","italic","underline","strikethrough","forecolor","backcolor","superscript","subscript","justifyleft","justifycenter","justifyright","justifyjustify","touppercase","tolowercase","directionalityltr","directionalityrtl","indent","removeformat","formatmatch","autotypeset","customstyle","paragraph","rowspacingbottom","rowspacingtop","lineheight","fontfamily","fontsize","imagenone","imageleft","imageright","imagecenter","inserttable","deletetable","mergeright","mergedown","splittorows","splittocols","splittocells","mergecells","insertcol","insertrow","deletecol","deleterow","insertparagraphbeforetable","insertframe"]]
//当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准Run code
Cut to clipboard
文章:手机微网站客户端微信公众平台微官网网站添加播放视频链接地址教程 发表时间:2017-09-14, 17:26:56
#972
作者:广西南宁市
insertframe.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script type="text/javascript" src="../internal.js"></script>
<style type="text/css">
.warp {width: 320px;height: 153px;margin-left:5px;padding: 20px 0 0 15px;position: relative;}
#url {width: 290px; margin-bottom: 2px; margin-left: -6px; margin-left: -2px\9;*margin-left:0;_margin-left:0; }
.format span{display: inline-block; width: 58px;text-align: center; zoom:1;}
table td{padding:5px 0;}
#align{width: 65px;height: 23px;line-height: 22px;}
</style>
</head>
<body>
<div class="warp">
<table width="300" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" class="format">
<span style="
width: auto;
">填写复制通用代码</span><!-- <var id="lang_input_address"></var> -->
<!-- <input style="width:200px" id="url" type="text" value=""/> -->
<textarea style="
width: 100%;
height: 119px;
" id="url" ></textarea>
</td>
</tr>
<tr style="display:none;">
<td colspan="2" class="format"><span><var id="lang_input_width"></var></span><input style="width:200px" type="text" id="width"/> px</td>
</tr>
<tr style="display:none;">
<td colspan="2" class="format"><span><var id="lang_input_height"></var></span><input style="width:200px" type="text" id="height"/> px</td>
</tr>
<tr style="display:none;">
<td><span><var id="lang_input_isScroll"></var></span><input type="checkbox" id="scroll"/> </td>
<td><span><var id="lang_input_frameborder"></var></span><input type="checkbox" id="frameborder"/> </td>
</tr>
<tr style="display:none;">
<td colspan="2"><span><var id="lang_input_alignMode"></var></span>
<select id="align">
<option value=""></option>
<option value="left"></option>
<option value="right"></option>
</select>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var iframe = editor._iframe;
if(iframe){
$G("url").value = iframe.getAttribute("src")||"";
var str = $G("url").value;
$G("url").value = (str.match(/<iframe .*?src=\"(.+?)\"/)[1]);
$G("width").value = iframe.getAttribute("width")||iframe.style.width.replace("px","")||"";
$G("height").value = iframe.getAttribute("height") || iframe.style.height.replace("px","") ||"";
$G("scroll").checked = (iframe.getAttribute("scrolling") == "yes") ? true : false;
$G("frameborder").checked = (iframe.getAttribute("frameborder") == "1") ? true : false;
$G("align").value = iframe.align ? iframe.align : "";
}
function queding(){
var url = ($G("url").value.match(/<iframe .*?src=\"(.+?)\"/)[1]),//$G("url").value.replace(/^\s*|\s*$/ig,""),
width = '100%',//$G("width").value,
height = '300',//$G("height").value,
scroll = $G("scroll"),
frameborder = $G("frameborder"),
//float = $G("align").value,
newIframe = editor.document.createElement("iframe"),
div;
if(!url){
alert(lang.enterAddress);
return false;
}
newIframe.setAttribute("src",/http:\/\/|https:\/\//ig.test(url) ? url : "http://"+url);
// /^[1-9]+[.]?\d*$/g.test( width ) ? newIframe.setAttribute("width",width) : "";
newIframe.setAttribute("width",width);
// /^[1-9]+[.]?\d*$/g.test( height ) ? newIframe.setAttribute("height",height) : "";
newIframe.setAttribute("height",height)
scroll.checked ? newIframe.setAttribute("scrolling","yes") : newIframe.setAttribute("scrolling","no");
frameborder.checked ? newIframe.setAttribute("frameborder","1",0) : newIframe.setAttribute("frameborder","0",0);
//float ? newIframe.setAttribute("align",float) : newIframe.setAttribute("align","");
if(iframe){
iframe.parentNode.insertBefore(newIframe,iframe);
domUtils.remove(iframe);
}else{
div = editor.document.createElement("div");
div.appendChild(newIframe);
editor.execCommand("inserthtml",div.innerHTML);
}
editor._iframe = null;
dialog.close();
}
dialog.onok = queding;
$G("url").onkeydown = function(evt){
evt = evt || event;
if(evt.keyCode == 13){
queding();
}
};
$focus($G( "url" ));
</script>
</body>
</html>Run code
Cut to clipboard
文章:手机微网站客户端微信公众平台微官网网站添加播放视频链接地址教程 发表时间:2017-09-14, 17:26:27
#973
作者:广西南宁市
<?php
namespace Addons\WeiSite\Controller;
use Addons\WeiSite\Controller\BaseController;
class CmsController extends BaseController {
var $model;
function _initialize() {
$this->model = $this->getModel ( 'custom_reply_news' );
parent::_initialize ();
}
// 通用插件的列表模型
public function lists() {
// 使用提示
$normal_tips = '文章的数据来源官方自定义回复插件中的图文回复,如有异常请确认自定义回复插件是否已经安装';
$this->assign ( 'normal_tips', $normal_tips );
$map ['token'] = get_token ();
session ( 'common_condition', $map );
$list_data = $this->_get_model_list ( $this->model );
// 分类数据
$map ['is_show'] = 1;
$list = M ( 'weisite_category' )->where ( $map )->field ( 'id,title' )->select ();
$cate [0] = '';
foreach ( $list as $vo ) {
$cate [$vo ['id']] = $vo ['title'];
}
foreach ( $list_data ['list_data'] as &$vo ) {
$vo ['cate_id'] = intval ( $vo ['cate_id'] );
$vo ['cate_id'] = $cate [$vo ['cate_id']];
}
$this->assign ( $list_data );
// dump ( $list_data );
$templateFile = $this->model ['template_list'] ? $this->model ['template_list'] : '';
$this->display ( $templateFile );
}
// 通用插件的编辑模型
public function edit() {
$model = $this->model;
$id = I ( 'id' );
if (IS_POST) {
//dump($_POST);exit;
$_POST['content']=str_ireplace('<iframe src="','#iframesrc#',$_POST['content']);
$_POST['content']=str_ireplace('" width="100%" height="300" scrolling="no" frameborder="0"></iframe>','#/iframesrc#',$_POST['content']);
$Model = D ( parse_name ( get_table_name ( $model ['id'] ), 1 ) );
// 获取模型的字段信息
$Model = $this->checkAttr ( $Model, $model ['id'] );
if ($Model->create () && $Model->save ()) {
D ( 'Common/Keyword' )->set ( $_POST ['keyword'], _ADDONS, $id, $_POST ['keyword_type'], 'custom_reply_news' );
$this->success ( '保存' . $model ['title'] . '成功!', U ( 'lists?model=' . $model ['name'] ) );
} else {
$this->error ( $Model->getError () );
}
} else {
$fields = get_model_attribute ( $model ['id'] );
$extra = $this->getCateData ();
if (! empty ( $extra )) {
foreach ( $fields [1] as &$vo ) {
if ($vo ['name'] == 'cate_id') {
$vo ['extra'] .= "\r\n" . $extra;
}
}
}
// 获取数据
$data = M ( get_table_name ( $model ['id'] ) )->find ( $id );
$data || $this->error ( '数据不存在!' );
$token = get_token ();
if (isset ( $data ['token'] ) && $token != $data ['token'] && defined ( 'ADDON_PUBLIC_PATH' )) {
$this->error ( '非法访问!' );
}
$this->assign ( 'fields', $fields );
$data['content']=str_ireplace('#iframesrc#','<iframe src="',$data['content']);
$data['content']=str_ireplace('#/iframesrc#','" width="100%" height="300" scrolling="no" frameborder="0"></iframe>',$data['content']);
$this->assign ( 'data', $data );
//dump($data);exit;
$this->meta_title = '编辑' . $model ['title'];
$this->display ();
}
}
// 通用插件的增加模型
public function add() {
$model = $this->model;
$Model = D ( parse_name ( get_table_name ( $model ['id'] ), 1 ) );
if (IS_POST) {
// 获取模型的字段信息
$Model = $this->checkAttr ( $Model, $model ['id'] );
if ($Model->create () && $id = $Model->add ()) {
D ( 'Common/Keyword' )->set ( $_POST ['keyword'], _ADDONS, $id, $_POST ['keyword_type'], 'custom_reply_news' );
$this->success ( '添加' . $model ['title'] . '成功!', U ( 'lists?model=' . $model ['name'] ) );
} else {
$this->error ( $Model->getError () );
}
} else {
$fields = get_model_attribute ( $model ['id'] );
$extra = $this->getCateData ();
if (! empty ( $extra )) {
foreach ( $fields [1] as &$vo ) {
if ($vo ['name'] == 'cate_id') {
$vo ['extra'] .= "\r\n" . $extra;
}
}
}
$this->assign ( 'fields', $fields );
$this->meta_title = '新增' . $model ['title'];
$this->display ();
}
}
// 通用插件的删除模型
public function del() {
parent::common_del ( $this->model );
}
// 获取所属分类
function getCateData() {
//$map ['is_show'] = 1;
$map ['token'] = get_token ();
$list = M ( 'weisite_category' )->where ( $map )->select ();
foreach ( $list as $v ) {
$extra .= $v ['id'] . ':' . $v ['title'] . "\r\n";
}
return $extra;
}
}Run code
Cut to clipboard
文章:手机微网站客户端微信公众平台微官网网站添加播放视频链接地址教程 发表时间:2017-09-14, 17:25:47
#974
作者:广西南宁市
出现
SyntaxError: Missing parentheses in call to 'print'
原因:Mac安装俩个python版本,2和3,python2系列可以支持 print “xxxx” ,python系列需要使用print("xxx")
SyntaxError: Missing parentheses in call to 'print'
原因:Mac安装俩个python版本,2和3,python2系列可以支持 print “xxxx” ,python系列需要使用print("xxx")
文章:python基础入门安装搭建服务器开发环境教程 发表时间:2017-09-14, 14:23:36
#975
作者:广西南宁市
怎样在cmd(命令提示符)下进行复制粘贴操作
选择“编辑选项”里的“快速编辑模式”,并确定之;
选择“编辑选项”里的“快速编辑模式”,并确定之;
文章:python基础入门安装搭建服务器开发环境教程 发表时间:2017-09-14, 14:19:11
#976
作者:广西南宁市
成功三法则:Be first,Be smarter,Or cheat,要么第一,要么聪明,要么会耍赖。 #,广西南宁市,2017-09-06,09:27:33, 没有不同的故事,只有不同的人。 #,广西南宁市,2017-09-06,09:28:18, 真正赚钱的都是闷声发大财的,既然这么高调,想必还是想火一把!且走且看...
#,广西南宁市,2017-09-06,09:43:52, 霉霉Taylor Swift的新单《Look What You Made You Do》取代了连冠16周的《Despacito》,拿下本周 Billboard 单曲榜冠军。
#,广西南宁市,2017-09-08,09:40:45, 遇到最困难时,也就离成功不远了。 #,广西南宁市,2017-09-08,09:41:30, 伟大的思想,总在历史的深处 #,广西南宁市,2017-09-08,09:53:09, 任正非:一个深入学习了毛的思想和语言风格的鸡汤爱好者 #,广西南宁市,2017-09-11,11:29:24, 美国人一生至少要有两个朋友,一个是律师,一个是医生
#,广西南宁市,2017-09-11,11:50:04,
码农的集体困境
心理学专家武志红在分析苏享茂自杀事件时认为,指责当事人自杀实际是因为不能理解亲人背叛对当事人带来的心理绝望。
我很认同这一点,同时认为苏享茂自杀不仅是他一个人的悲剧,也反映了程序员群体的心理和认知困境。
抛开道德评价,翟欣欣长得很不错。前天我刚看到翟欣欣照片就发给一位程序员大牛求评价,大牛一语道破说这长相码农是挡不住的。其实苏享茂的同班同学发帖也提到,小茂这样一直做技术、圈子极小的简单老实程序员根本挡不住精心设计的圈套。
小说里的程序员个个都是蜘蛛侠,真实的码农很多却只是蜘蛛。回到现实中的程序员很多只会上班埋头码字,下班用硬盘探索人生。
客观上高企的专业壁垒挡住了很多普通人对程序员世界的窥视,但也反过来挡住码农们对外界交流的路径。码农在代码世界里如鱼得水,但不论在设计、运营、管理还是更重要的生活交际中,所依靠的却是对人性的理解。
程序员的世界很单纯,高强度的职业训练让很多程序员潜意识里把代码的逻辑关系投射到现实世界。然而复杂的人性并不是以严谨的逻辑为基础,更多折射基于利益的精打细算和情绪的任性。
码农们大多单纯,他们成天流连于代码之中,渴望凡间的幸福却又不懂凡间的故事。如果你给码农一个美丽的肥皂泡或者画一个大饼,然而幻象迅速破灭甚至如一桶冰凉的水泼在码农身上,外人很难想象一个单纯码农的无助和绝望。当码农发现代码没有办法给他答案又无法承担给朋友添麻烦的心理压力时,悲剧的发生是高概率的。
苏享茂的悲剧虽然基于一个恶意的圈套,但他自己的不谙世事和过分单纯也是导致事情最终恶化的重要原因。在这一点上苏享茂只能代表自己而不是代表大多数程序员,但程序员作为一个群体和真实世界的融入程度的确不如销售、律师、管理等职业基于关系和沟通的群体。
希望苏享茂的悲剧能让全社会更多关注程序员群体的心理健康,更希望程序员能主动走出代码的象牙塔,走进有丑恶但也有真善的真实世界。 #,广西南宁市,2017-09-11,12:00:11, 有时候只是因为眼前只有一条路而已 #,广西南宁市,2017-09-11,12:02:35, 结论: 所以你和马云就差了一个谈恋爱时被对方家里嫌弃的女朋友 #,广西南宁市,2017-09-11,17:47:33, 有一个报道,说2个恐怖分子共用同一个Gmail账号,
各自在里面写邮件存草稿,并不发出去,以此来交流但是可以躲开审查 #,广西南宁市,2017-09-13,09:34:36, 一米七五的男生,女朋友多漂亮算正常? #,广西南宁市,2017-09-13,16:08:29, 不是我懒,是你们太勤快 #,北京市,2017-09-13,21:22:22, 先帝驾崩,留下了一堆烂摊子。后代继位开始执政:脚疼医脚,头疼医头,对症下药,虽说不见起色,但至少也是尽心尽力。到了下一代就一点稀奇:头疼医脸,脚疼也医脸,只要脸好看,就没问题。到了这一代,越来越纳闷了:头疼堵嘴,脚疼也堵嘴,喊不出来的疼,就不算疼。 #,广西南宁市,2017-09-14,11:14:45, 老一辈的人情事故基本上都是去麻烦别人。
码农的集体困境
心理学专家武志红在分析苏享茂自杀事件时认为,指责当事人自杀实际是因为不能理解亲人背叛对当事人带来的心理绝望。
我很认同这一点,同时认为苏享茂自杀不仅是他一个人的悲剧,也反映了程序员群体的心理和认知困境。
抛开道德评价,翟欣欣长得很不错。前天我刚看到翟欣欣照片就发给一位程序员大牛求评价,大牛一语道破说这长相码农是挡不住的。其实苏享茂的同班同学发帖也提到,小茂这样一直做技术、圈子极小的简单老实程序员根本挡不住精心设计的圈套。
小说里的程序员个个都是蜘蛛侠,真实的码农很多却只是蜘蛛。回到现实中的程序员很多只会上班埋头码字,下班用硬盘探索人生。
客观上高企的专业壁垒挡住了很多普通人对程序员世界的窥视,但也反过来挡住码农们对外界交流的路径。码农在代码世界里如鱼得水,但不论在设计、运营、管理还是更重要的生活交际中,所依靠的却是对人性的理解。
程序员的世界很单纯,高强度的职业训练让很多程序员潜意识里把代码的逻辑关系投射到现实世界。然而复杂的人性并不是以严谨的逻辑为基础,更多折射基于利益的精打细算和情绪的任性。
码农们大多单纯,他们成天流连于代码之中,渴望凡间的幸福却又不懂凡间的故事。如果你给码农一个美丽的肥皂泡或者画一个大饼,然而幻象迅速破灭甚至如一桶冰凉的水泼在码农身上,外人很难想象一个单纯码农的无助和绝望。当码农发现代码没有办法给他答案又无法承担给朋友添麻烦的心理压力时,悲剧的发生是高概率的。
苏享茂的悲剧虽然基于一个恶意的圈套,但他自己的不谙世事和过分单纯也是导致事情最终恶化的重要原因。在这一点上苏享茂只能代表自己而不是代表大多数程序员,但程序员作为一个群体和真实世界的融入程度的确不如销售、律师、管理等职业基于关系和沟通的群体。
希望苏享茂的悲剧能让全社会更多关注程序员群体的心理健康,更希望程序员能主动走出代码的象牙塔,走进有丑恶但也有真善的真实世界。
各自在里面写邮件存草稿,并不发出去,以此来交流但是可以躲开审查
文章:@意见反馈/技术支持/伊网/安企网 发表时间:2017-09-05, 14:49:06
#977
作者:广西南宁市
weiphp自定义后台插件列表顶部菜单栏代码
<?php
namespace Addons\Bespoke\Controller;
use Home\Controller\AddonsController;
class BespokeController extends AddonsController{
var $model;
function _initialize() {
$this->model = $this->getModel ( 'bespoke' );
parent::_initialize ();
$act = strtolower ( _ACTION );
$type = I ( 'type' );
$fk=I('get.fk');
$sh=I('get.sh');
$fxsxm=I('get.fxsxm');
$res ['title'] = '预约列表';
$res ['url'] = addons_url ( 'Bespoke://Bespoke/lists' );
$res ['class'] = ($act == 'lists' || $type == 'text') && !$fk ? 'current' : '';
$nav [] = $res;
$res ['title'] = '已付款';
$res ['url'] = addons_url ( 'Bespoke://Bespoke/lists/model/bespoke/fk/1' );
$res ['class'] = ($fk == '1' || $type == 'text') && !$fxsxm && $sh!='0' ? 'current' : '';
$nav [] = $res;
$flist=M('fxs')->select();
foreach($flist as $k=>$v){
$res ['title'] = $v['xm'];
$res ['url'] = addons_url ( 'Bespoke://Bespoke/lists/model/bespoke/fk/1/fxsxm/'.$v['xm'] );
$res ['class'] = ($fxsxm != '' || $type == 'text') && $fxsxm==$v['xm'] ? 'current' : '';
$nav [] = $res;
}
//$nd=date('Y-m-d',time());
$res ['title'] = '未审核';
$res ['url'] = addons_url ( 'Bespoke://Bespoke/lists/model/bespoke/fk/1/sh/0' );
$res ['class'] = ($sh == '0' || $type == 'text') && !$fxsxm ? 'current' : '';
$nav [] = $res;
//dump($flist);
/*$res ['title'] = '批量导入会员注册';
$res ['url'] = addons_url ( 'Huiyuan://Huiyuan/daoru' );
$res ['class'] = $act == 'daoru' || $type == 'textarea' ? 'current' : '';
$nav [] = $res;*/
$this->assign ( 'nav', $nav );
}
}
Run code
Cut to clipboard
文章:Weiphp微官网框架修改使用说明 发表时间:2017-09-13, 18:00:48
#978
作者:广西南宁市
PHP 验证整数或小数二位的正则
// $accountPrice = $_GET['num'];
// $accountPrice = 111;
// $accountPrice = 1112.;
// $accountPrice = 2324.1;
// $accountPrice = 2324.15;
// $accountPrice = 2324.157;//wrong
// $accountPrice = 0.57;
if (preg_match('/^[0-9]+(.[0-9]{1,2})?$/', $accountPrice)) {
echo '整数或小数二位的正则';
}else{
echo '错';
}Run code
Cut to clipboard
文章:ThinkPHP中实现微信支付(jsapi支付)流程 发表时间:2017-09-11, 17:24:20
#979
作者:广西南宁市
魔性催眠图形
canvas的ellipse是个很棒的方法,可惜只有chrome和Opera支持
把ellipse中参数随便改改就会出现神奇的效果
canvas的ellipse是个很棒的方法,可惜只有chrome和Opera支持
把ellipse中参数随便改改就会出现神奇的效果
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<style>
body{overflow:hidden}
</style>
<body>
<canvas></canvas>
</body>
</html>
<script>
var canvas=document.querySelector('canvas'),
ctx=canvas.getContext('2d');
canvas.width=window.innerWidth;
canvas.height=window.innerWidth;
ctx.lineWidth=1;
ctx.strokeStyle='black';
var time=0;
function draw(){
time+=0.01;
ctx.clearRect(0,0,window.innerWidth,window.innerHeight);
ctx.beginPath();
for(i=120;i--;)
ctx.ellipse(window.innerWidth/2,window.innerHeight/2,i*2,100*Math.sin(time+i/50)+100,2*Math.sin(time/4)+i*2,time,6+time)
ctx.stroke();
requestAnimationFrame(arguments.callee);
}
draw();
</script>Run code
Cut to clipboard
文章:常用html、demo代码 发表时间:2017-09-11, 17:21:56
#980
作者:广西南宁市
漂亮的css文字效果
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>css文字效果</title>
<style type="text/css">
* {
padding: 0;
margin: 0;
text-align: center;
}
body {
padding-bottom: 200px;
}
div {
font-size: 36px;
}
.header-item {
line-height: 4;
}
.box1 {
color: rgba(0, 0, 0, .3);
}
.box2 {
text-shadow: 0 0 5px red;
-webkit-text-fill-color : transparent;
}
.box3 {
-webkit-text-stroke: 1px red;
-webkit-text-fill-color : transparent;
}
.box4 {
background: linear-gradient( to bottom, white, black);
-webkit-text-fill-color : transparent;
-webkit-background-clip : text;
}
.box5 {
height: 300px;
width: 1280px;
margin: 0 auto;
font-size: 70px;
font-weight: 700;
background: url(https://lizhenqiu.com/86f740e5196bec328ee09cca4dd9c827.jpg) no-repeat center;
/*文字样式*/
text-align: center;
/*图片文字样式*/
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
}
.box6 {
color:#fefefe;
text-shadow:
0px 1px 0px #c0c0c0,
0px 2px 0px #b0b0b0,
0px 3px 0px #a0a0a0,
0px 4px 0px #909090,
0px 5px 10px rgba(0, 0, 0, .9);
}
.box7 {
color:#fefefe;
text-shadow:
1px -1px 0 #767676,
-1px 2px 1px #737272,
-2px 4px 1px #767474,
-3px 6px 1px #787777,
-4px 8px 1px #7b7a7a,
-5px 10px 1px #7f7d7d,
-6px 12px 1px #828181,
-7px 14px 1px #868585,
-8px 16px 1px #8b8a89,
-9px 18px 1px #8f8e8d,
-10px 20px 1px #949392,
-11px 22px 1px #999897,
-12px 24px 1px #9e9c9c,
-13px 26px 1px #a3a1a1,
-14px 28px 1px #a8a6a6,
-15px 30px 1px #adabab,
-16px 32px 1px #b2b1b0,
-17px 34px 1px #b7b6b5,
-18px 36px 1px #bcbbba,
-19px 38px 1px #c1bfbf,
-20px 40px 1px #c6c4c4,
-21px 42px 1px #cbc9c8,
-22px 44px 1px #cfcdcd;
}
.box8 {
background-color: #333;
background-image:
-webkit-linear-gradient(bottom left, transparent 45%, hsla(48,20%,90%,1) 45%, hsla(48,20%,90%,1) 55%, transparent 0%);
background-image:
-o-linear-gradient(bottom left, transparent 45%, hsla(48,20%,90%,1) 45%, hsla(48,20%,90%,1) 55%, transparent 0%);
background-image:
linear-gradient(to top right, transparent 45%, hsla(48,20%,90%,1) 45%, hsla(48,20%,90%,1) 55%, transparent 0%);;
background-size: .05em .05em;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
-webkit-text-stroke: 2px #111;
}
</style>
</head>
<body>
<p class="header-item">1.透明文字</p>
<div class="box1">我叫吕胖胖</div>
<p class="header-item">2.模糊文字</p>
<div class="box2">我叫吕肥肥</div>
<p class="header-item">3.镂空文字</p>
<div class="box3">我是吕胖胖,我有个弟弟叫吕肥肥</div>
<p class="header-item">4.渐变文字</p>
<div class="box4">我是吕肥肥,我有个哥哥叫吕胖胖</div>
<p class="header-item">5.图片背景文字</p>
<div class="box5">我们来自快乐的胖肥家族</div>
<p class="header-item">6.立体文字</p>
<div class="box6">胖哥,我们下楼找小美玩吧!</div>
<p class="header-item">7.长阴影文字</p>
<div class="box7">肥弟,你就不怕大熊揍你吗?</div>
</body>
</html>Run code
Cut to clipboard
文章:常用html、demo代码 发表时间:2017-09-11, 17:20:59
#982
作者:广西南宁市
ThinkPHP5 正则验证中有“|”时提示“规则错误”的解决方案
正则规则中有“|”时,会引起解析错误:
使用数组语法可以解决:
正则规则中有“|”时,会引起解析错误:
'regex:\d{3,4}[\s,-]?\d{7,8}|1[3,4,5,8]\d[\s,-]?\d{4}[\s,-]?\d{4}'Run code
Cut to clipboard
使用数组语法可以解决:
['regex' => '\d{3,4}[\s,-]?\d{7,8}|1[3,4,5,8]\d[\s,-]?\d{4}[\s,-]?\d{4}']Run code
Cut to clipboard
文章:ThinkPHP中实现微信支付(jsapi支付)流程 发表时间:2017-09-11, 16:11:46
#983
作者:广西南宁市
javascript 进制转换(2进制、8进制、10进制、16进制之间的转换)
//十进制转其他
var x=110;
alert(x);
alert(x.toString(8));
alert(x.toString(32));
alert(x.toString(16));
//其他转十进制
var x='110';
alert(parseInt(x,2));
alert(parseInt(x,8));
alert(parseInt(x,16));
//其他转其他
//先用parseInt转成十进制再用toString转到目标进制
alert(String.fromCharCode(parseInt(141,8)))
alert(parseInt('ff',16).toString(2));
Run code
Cut to clipboard
文章:JavaScript base64随机字符混淆加密、解密 发表时间:2017-09-09, 12:14:37
#984
作者:广西南宁市
js字符串倒序
var reverse = function( str ){
var stack = [];//生成一个栈
for(var len = str.length,i=len;i>=0;i-- ){
stack.push(str[i]);
}
return stack.join('');
};Run code
Cut to clipboard
var reverse = function( str ){
var newStr = '', i = str.length;
for(; i >= 0; i--) {
newStr += str.charAt(i);
}
return newStr;
};
reverse('abcde')Run code
Cut to clipboard
文章:JavaScript base64随机字符混淆加密、解密 发表时间:2017-09-09, 12:12:31
#985
作者:广西南宁市
兼容中文的方法
decodeURIComponent(escape(window.atob(d)));//解密
window.btoa(unescape(encodeURIComponent(str)));//加密Run code
Cut to clipboard
文章:JavaScript base64随机字符混淆加密、解密 发表时间:2017-09-09, 12:11:47
#986
作者:广西南宁市
加密的原理:
1、先用base64对字符串进行加密。
2、在字符串前面加上一个4位字符串,字符串要满足以下条件:
①必须是四位16进制的字符串。
②字符串的10进制必须也是一个四位整数。(这个四位整数很重要,用来确定随机字符串的插入位置和个数的)
③插入加密地址前的是四位16进制的字符串的倒序。
3、通过开头加上的4位字符串确定随机字符串以及插入的位置。(前后相应位置都加上一段随机字符串)
解析:
base64混淆加密后的地址:14c1YmxvZy54ppc3d0Zi5jb20g5LyK5oCd572R5X2qouT
①首先前面4位16进制的字符串为14c1,因为是倒序添加的,所以实际上为1c41。
②1c41对应的10进制为7233。
③通过7233推算,前面添加的随机字符串位置为第7个字符开始,添加2个随机字符串;后台添加的随机字符串位置为倒数第3个添加3个随机字符串。
1、先用base64对字符串进行加密。
2、在字符串前面加上一个4位字符串,字符串要满足以下条件:
①必须是四位16进制的字符串。
②字符串的10进制必须也是一个四位整数。(这个四位整数很重要,用来确定随机字符串的插入位置和个数的)
③插入加密地址前的是四位16进制的字符串的倒序。
3、通过开头加上的4位字符串确定随机字符串以及插入的位置。(前后相应位置都加上一段随机字符串)
解析:
base64混淆加密后的地址:14c1YmxvZy54ppc3d0Zi5jb20g5LyK5oCd572R5X2qouT
①首先前面4位16进制的字符串为14c1,因为是倒序添加的,所以实际上为1c41。
②1c41对应的10进制为7233。
③通过7233推算,前面添加的随机字符串位置为第7个字符开始,添加2个随机字符串;后台添加的随机字符串位置为倒数第3个添加3个随机字符串。
文章:JavaScript base64随机字符混淆加密、解密 发表时间:2017-09-09, 12:08:16
#987
作者:广西南宁市
//随机4位10进制整数
function getfo(){
var randnum;
randnum=Math.random();
while(randnum<0.1){
randnum=Math.random();
}
return randnum=Math.floor(Math.random()*10000);
}
//十进制转十六进制
function toHex(num){
var rs = "";
var temp;
while(num/16 > 0){
temp = num%16;
rs = (temp+"").replace("10","a").replace("11","b").replace("12","c").replace("13","d").replace("14","e").replace("15","f") + rs;
num = parseInt(num/16);
}
//console.warn(rs); //打印
return rs;
}
//16进制补位
function str_pad(hex){
var zero = '0000';
var tmp = 4-hex.length;
return zero.substr(0,tmp) + hex;
}
//倒叙字符串
function reverse(str){
return str.split('').reverse().join('');
};
//混淆加密的随机字符
function getrr(){
var hex=toHex(getfo());
if(hex.length<4) hex=str_pad(hex)
return reverse(hex);
}Run code
Cut to clipboard
文章:JavaScript base64随机字符混淆加密、解密 发表时间:2017-09-09, 11:58:26
#988
作者:广西南宁市
网页黑客帝国代码雨滚动下落乱码代码文字背景特效动画
<style>*{padding:0px;margin:0;x}
body{background: url(https://out.img.pan.lizhenqiu.com/FhevmCp39BWLo9mBfo5MnPE6yuM0);}#matrixBG {
position: fixed;
top: 0;
left: 0;
z-index: -1;
opacity: 0.8;width:100%;height:100%;
}</style>
<canvas id="matrixBG"></canvas>
<script src="https://lizhenqiu.com/templates/default/jquery.min.js"></script>
<script>// JavaScript Document
$(document).ready(function(){
//var s=window.screen;
var width = matrixBG.width = window.screen.width;
var height = matrixBG.height = window.screen.height;
var yPositions = Array(300).join(0).split('');
var ctx=matrixBG.getContext('2d');
var draw = function () {
ctx.fillStyle='rgba(0,0,0,.05)';
ctx.fillRect(0,0,width,height);
ctx.fillStyle='#0F0';
ctx.font = '10pt Georgia';
yPositions.map(function(y, index){
text = String.fromCharCode(30+Math.floor( Math.random()*95 ));
x = (index * 10)+10;
matrixBG.getContext('2d').fillText(text, x, y);
if(y > 100 + Math.random()*1e4)
{
yPositions[index]=0;
}
else
{
yPositions[index] = y + 10;
}
});
};
RunMatrix();
function RunMatrix()
{
if(typeof Game_Interval != "undefined") clearInterval(Game_Interval);
Game_Interval = setInterval(draw, 33);
}
function StopMatrix()
{
clearInterval(Game_Interval);
}
/**
//setInterval(draw, 33);
$("button#pause").click(function(){
StopMatrix();});
$("button#play").click(function(){RunMatrix();});
*/
});</script>Run code
Cut to clipboard
文章:网页标签页头部标题前面加入有新消息提醒闪烁动画效果 发表时间:2017-09-09, 10:37:13
<script> var str = '<iframe frameborder="0" width="640" height="498" src="https://v.qq.com/iframe/player.html?vid=b0516dp12du&tiny=0&auto=0" allowfullscreen></iframe>'; alert(str.match(/<iframe .*?src=\"(.+?)\"/)[1]);</script>