<!doctype html>
<html lang="zh">
<head>
<title>神奇的前端输入模拟插件 -- typed.js</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta author="极客标签:www.gbtags.com" />
<meta name="Description" content="极客标签是一个基于web的在线极客编程知识分享&学习平台,能够帮助你快速高效地学习代码编程并方便的在线实时分享编程技巧和心得" />
<meta name="Keywords" content="极客,极客标签,轻视频,代码录播,在线调试,前端,前端社区,前端特效,素材,html5,javascript,css3,jquery,bootstrap,bootstrap3" />
<style>
html, body, body div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, figure, footer, header, menu, nav, section, time, mark, audio, video, details, summary {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
/* line 3, ../../_sass/404.scss */
#not-found, #not-found body {
display: table;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
/* line 11, ../../_sass/404.scss */
#not-found body {
position: relative;
background-color: #1d2b2a;
background-image: url(404-stripe.png), url(404-noise.png);
background-repeat: repeat-x, repeat;
background-position: 0 0%;
background-attachment: fixed;
font-size: 21px;
font-family: Inconsolata, "Lucida Console", Monaco, Courier, monospace;
font-smooth: never;
line-height: 2em;
color: #d4f8e3;
-webkit-font-smoothing: none;
text-shadow: -2px 0 0px rgba(0, 0, 225, 0.4), -1px 0 3px rgba(103, 171, 236, 0.6), 1px 0 4px rgba(69, 112, 204, 0.5);
-moz-animation: blink 0.1s steps(2, start) infinite, skip 7s linear infinite, flicker 0.1s steps(2, start) infinite;
-webkit-animation: blink 0.1s steps(2, start) infinite, skip 7s linear infinite, flicker 0.1s steps(2, start) infinite;
animation: blink 0.1s steps(2, start) infinite, skip 7s linear infinite, flicker 0.1s steps(2, start) infinite;
}
/* line 26, ../../_sass/404.scss */
#not-found body #holder {
display: table-cell;
vertical-align: bottom;
max-width: 800px;
margin: 0 auto;
}
/* line 32, ../../_sass/404.scss */
#not-found body #story1,
#not-found body #story {
padding: 10px 0 10px;
max-width: 100%;
white-space: pre;
line-height: 1.25em;
}
/* line 38, ../../_sass/404.scss */
#not-found body #story1:after {
visibility: visible;
content: '';
background-color: #d4f8e3;
display: inline-block;
position: relative;
width: 0.5em;
height: 1em;
top: 5px;
margin-left: 0;
-moz-box-shadow: -2px 0 0px rgba(0, 0, 225, 0.4), -1px 0 3px rgba(103, 171, 236, 0.6), 1px 0 4px rgba(69, 112, 204, 0.5);
-webkit-box-shadow: -2px 0 0px rgba(0, 0, 225, 0.4), -1px 0 3px rgba(103, 171, 236, 0.6), 1px 0 4px rgba(69, 112, 204, 0.5);
box-shadow: -2px 0 0px rgba(0, 0, 225, 0.4), -1px 0 3px rgba(103, 171, 236, 0.6), 1px 0 4px rgba(69, 112, 204, 0.5);
-moz-animation: flicker 0.1s steps(2, start) infinite, ready 1s steps(2, start) 25s infinite;
-webkit-animation: flicker 0.1s steps(2, start) infinite, ready 1s steps(2, start) 25s infinite;
animation: flicker 0.1s steps(2, start) infinite, ready 1s steps(2, start) 25s infinite;
}
/* line 52, ../../_sass/404.scss */
#not-found body #kick {
text-shadow: none;
margin: 10px;
}
/* line 55, ../../_sass/404.scss */
#not-found body #kick a {
background-color: #d4f8e3;
color: #1d2b2a;
}
/* line 61, ../../_sass/404.scss */
#not-found body .typed-cursor {
display: none;
}
@-moz-keyframes blink {
to {
background-color: #223332;
}
}
@-webkit-keyframes blink {
to {
background-color: #223332;
}
}
@keyframes blink {
to {
background-color: #223332;
}
}
@-moz-keyframes skip {
to {
background-position: 0 100%;
}
}
@-webkit-keyframes skip {
to {
background-position: 0 100%;
}
}
@keyframes skip {
to {
background-position: 0 100%;
}
}
@-moz-keyframes flicker {
to {
color: #bddeca;
}
}
@-webkit-keyframes flicker {
to {
color: #bddeca;
}
}
@keyframes flicker {
to {
color: #bddeca;
}
}
@-moz-keyframes ready {
to {
visibility: hidden;
}
}
@-webkit-keyframes ready {
to {
visibility: hidden;
}
}
@keyframes ready {
to {
visibility: hidden;
}
}
@media screen and (max-width: 400px) {
/* line 84, ../../_sass/404.scss */
#not-found body {
font-size: 18px;
}
}
</style>
</head>
<body>
<!-- HTML代码片段中请勿添加<body>标签 //-->
<div id="holder">
<span id="story"></span>
<span id="story1"></span>
<div id="kick"></div>
</div>
<!-- 推荐开源CDN来选取需引用的外部JS //-->
<script async="" src="http://cdn.gbtags.com/analytics.js/1.5.2/analytics.min.js"></script>
<script type="text/javascript" src="http://cdn.gbtags.com/jquery/1.11.1/jquery.min.js"></script>
<script>
// The MIT License (MIT)
// Typed.js | Copyright (c) 2014 Matt Boldt | www.mattboldt.com
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
! function($) {
"use strict";
var Typed = function(el, options) {
// chosen element to manipulate text
this.el = $(el);
// options
this.options = $.extend({}, $.fn.typed.defaults, options);
// attribute to type into
this.isInput = this.el.is('input');
this.attr = this.options.attr;
// show cursor
this.showCursor = this.isInput ? false : this.options.showCursor;
// text content of element
this.elContent = this.attr ? this.el.attr(this.attr) : this.el.text()
// html or plain text
this.contentType = this.options.contentType;
// typing speed
this.typeSpeed = this.options.typeSpeed;
// add a delay before typing starts
this.startDelay = this.options.startDelay;
// backspacing speed
this.backSpeed = this.options.backSpeed;
// amount of time to wait before backspacing
this.backDelay = this.options.backDelay;
// input strings of text
this.strings = this.options.strings;
// character number position of current string
this.strPos = 0;
// current array position
this.arrayPos = 0;
// number to stop backspacing on.
// default 0, can change depending on how many chars
// you want to remove at the time
this.stopNum = 0;
// Looping logic
this.loop = this.options.loop;
this.loopCount = this.options.loopCount;
this.curLoop = 0;
// for stopping
this.stop = false;
// custom cursor
this.cursorChar = this.options.cursorChar;
// shuffle the strings
this.shuffle = this.options.shuffle;
// the order of strings
this.sequence = [];
// All systems go!
this.build();
};
Typed.prototype = {
constructor: Typed
,
init: function() {
// begin the loop w/ first current string (global self.string)
// current string will be passed as an argument each time after this
var self = this;
self.timeout = setTimeout(function() {
for (var i=0;i<self.strings.length;++i) self.sequence[i]=i;
// shuffle the array if true
if(self.shuffle) self.sequence = self.shuffleArray(self.sequence);
// Start typing
self.typewrite(self.strings[self.sequence[self.arrayPos]], self.strPos);
}, self.startDelay);
}
,
build: function() {
// Insert cursor
if (this.showCursor === true) {
this.cursor = $("<span class=\"typed-cursor\">" + this.cursorChar + "</span>");
this.el.after(this.cursor);
}
this.init();
}
// pass current string state to each function, types 1 char per call
,
typewrite: function(curString, curStrPos) {
// exit when stopped
if (this.stop === true) {
return;
}
// varying values for setTimeout during typing
// can't be global since number changes each time loop is executed
var humanize = Math.round(Math.random() * (100 - 30)) + this.typeSpeed;
var self = this;
// ------------- optional ------------- //
// backpaces a certain string faster
// ------------------------------------ //
// if (self.arrayPos == 1){
// self.backDelay = 50;
// }
// else{ self.backDelay = 500; }
// contain typing function in a timeout humanize'd delay
self.timeout = setTimeout(function() {
// check for an escape character before a pause value
// format: \^\d+ .. eg: ^1000 .. should be able to print the ^ too using ^^
// single ^ are removed from string
var charPause = 0;
var substr = curString.substr(curStrPos);
if (substr.charAt(0) === '^') {
var skip = 1; // skip atleast 1
if (/^\^\d+/.test(substr)) {
substr = /\d+/.exec(substr)[0];
skip += substr.length;
charPause = parseInt(substr);
}
// strip out the escape character and pause value so they're not printed
curString = curString.substring(0, curStrPos) + curString.substring(curStrPos + skip);
}
if (self.contentType === 'html') {
// skip over html tags while typing
var curChar = curString.substr(curStrPos).charAt(0)
if (curChar === '<' || curChar === '&') {
var tag = '';
var endTag = '';
if (curChar === '<') {
endTag = '>'
} else {
endTag = ';'
}
while (curString.substr(curStrPos).charAt(0) !== endTag) {
tag += curString.substr(curStrPos).charAt(0);
curStrPos++;
}
curStrPos++;
tag += endTag;
}
}
// timeout for any pause after a character
self.timeout = setTimeout(function() {
if (curStrPos === curString.length) {
// fires callback function
self.options.onStringTyped(self.arrayPos);
// is this the final string
if (self.arrayPos === self.strings.length - 1) {
// animation that occurs on the last typed string
self.options.callback();
self.curLoop++;
// quit if we wont loop back
if (self.loop === false || self.curLoop === self.loopCount)
return;
}
self.timeout = setTimeout(function() {
self.backspace(curString, curStrPos);
}, self.backDelay);
} else {
/* call before functions if applicable */
if (curStrPos === 0)
self.options.preStringTyped(self.arrayPos);
// start typing each new char into existing string
// curString: arg, self.el.html: original text inside element
var nextString = curString.substr(0, curStrPos + 1);
if (self.attr) {
self.el.attr(self.attr, nextString);
} else {
if (self.isInput) {
self.el.val(nextString);
} else if (self.contentType === 'html') {
self.el.html(nextString);
} else {
self.el.text(nextString);
}
}
// add characters one by one
curStrPos++;
// loop the function
self.typewrite(curString, curStrPos);
}
// end of character pause
}, charPause);
// humanized value for typing
}, humanize);
}
,
backspace: function(curString, curStrPos) {
// exit when stopped
if (this.stop === true) {
return;
}
// varying values for setTimeout during typing
// can't be global since number changes each time loop is executed
var humanize = Math.round(Math.random() * (100 - 30)) + this.backSpeed;
var self = this;
self.timeout = setTimeout(function() {
// ----- this part is optional ----- //
// check string array position
// on the first string, only delete one word
// the stopNum actually represents the amount of chars to
// keep in the current string. In my case it's 14.
// if (self.arrayPos == 1){
// self.stopNum = 14;
// }
//every other time, delete the whole typed string
// else{
// self.stopNum = 0;
// }
if (self.contentType === 'html') {
// skip over html tags while backspacing
if (curString.substr(curStrPos).charAt(0) === '>') {
var tag = '';
while (curString.substr(curStrPos).charAt(0) !== '<') {
tag -= curString.substr(curStrPos).charAt(0);
curStrPos--;
}
curStrPos--;
tag += '<';
}
}
// ----- continue important stuff ----- //
// replace text with base text + typed characters
var nextString = curString.substr(0, curStrPos);
if (self.attr) {
self.el.attr(self.attr, nextString);
} else {
if (self.isInput) {
self.el.val(nextString);
} else if (self.contentType === 'html') {
self.el.html(nextString);
} else {
self.el.text(nextString);
}
}
// if the number (id of character in current string) is
// less than the stop number, keep going
if (curStrPos > self.stopNum) {
// subtract characters one by one
curStrPos--;
// loop the function
self.backspace(curString, curStrPos);
}
// if the stop number has been reached, increase
// array position to next string
else if (curStrPos <= self.stopNum) {
self.arrayPos++;
if (self.arrayPos === self.strings.length) {
self.arrayPos = 0;
// Shuffle sequence again
if(self.shuffle) self.sequence = self.shuffleArray(self.sequence);
self.init();
} else
self.typewrite(self.strings[self.sequence[self.arrayPos]], curStrPos);
}
// humanized value for typing
}, humanize);
}
/**
* Shuffles the numbers in the given array.
* @param {Array} array
* @returns {Array}
*/
,shuffleArray: function(array) {
var tmp, current, top = array.length;
if(top) while(--top) {
current = Math.floor(Math.random() * (top + 1));
tmp = array[current];
array[current] = array[top];
array[top] = tmp;
}
return array;
}
// Start & Stop currently not working
// , stop: function() {
// var self = this;
// self.stop = true;
// clearInterval(self.timeout);
// }
// , start: function() {
// var self = this;
// if(self.stop === false)
// return;
// this.stop = false;
// this.init();
// }
// Reset and rebuild the element
,
reset: function() {
var self = this;
clearInterval(self.timeout);
var id = this.el.attr('id');
this.el.after('<span id="' + id + '"/>')
this.el.remove();
if (typeof this.cursor !== 'undefined') {
this.cursor.remove();
}
// Send the callback
self.options.resetCallback();
}
};
$.fn.typed = function(option) {
return this.each(function() {
var $this = $(this),
data = $this.data('typed'),
options = typeof option == 'object' && option;
if (!data) $this.data('typed', (data = new Typed(this, options)));
if (typeof option == 'string') data[option]();
});
};
$.fn.typed.defaults = {
strings: ["These are the default values...", "You know what you should do?", "Use your own!", "Have a great day!"],
// typing speed
typeSpeed: 0,
// time before typing starts
startDelay: 0,
// backspacing speed
backSpeed: 0,
// shuffle the strings
shuffle: false,
// time before backspacing
backDelay: 500,
// loop
loop: false,
// false = infinite
loopCount: false,
// show cursor
showCursor: true,
// character for cursor
cursorChar: "|",
// attribute to type (null == text)
attr: null,
// either html or text
contentType: 'html',
// call when done callback function
callback: function() {},
// starting callback function before each string
preStringTyped: function() {},
//callback for every typed string
onStringTyped: function() {},
// callback for reset
resetCallback: function() {}
};
}(window.jQuery);
$("html").attr("id", "not-found");
$(function(){
var weekdays = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
var dayOfWeekIndex = (new Date()).getDay();
var dayOfWeek = weekdays[dayOfWeekIndex];
var dayOfWeekPastIndex = Math.floor(weekdays.length * Math.random());
var dayOfWeekPast;
var hourOfDay = new Date().getHours();
var timeOfDay;
// choose day of week other than current one
if (dayOfWeekPastIndex == dayOfWeekIndex) {
dayOfWeekPast = weekdays[(dayOfWeekPastIndex + 1) % weekdays.length];
} else {
dayOfWeekPast = weekdays[dayOfWeekPastIndex];
}
// assign time of day to the hour
if ((hourOfDay >= 4) && (hourOfDay <= 11)) {
timeOfDay = "早上";
} else if ((hourOfDay >= 12) && (hourOfDay <= 16)) {
timeOfDay = "下午";
} else {
timeOfDay = "晚上";
}
// make conversation
$('#story').typed({
strings: ["大家好,我们" + dayOfWeekPast + "是不是见过面?^2000\n在这个" + dayOfWeek + "的" + timeOfDay + "...^2000\n我要给大家介绍一下我.^2000\n我就是一个程序员.^2000\n平时也没什么爱好.^2000\n我有一个理想,那就是.^1000.^1000.^1000\n"],
typeSpeed: 50,
backDelay: 800,
loop: false,
loopCount: false,
callback: function(){
$('#story1').typed({
strings: ["金钱与美女,^2000额...", "事业和爱情.^2000\n我爱写程序.^2000\n我爱做很Cool的东西.^2000\n谢谢..."],
typeSpeed: 50,
backDelay: 500,
loop: false,
loopCount: false
});
}
});
});
</script>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fac45a0f68a119fbe4d1c4c3ac3044dbd' type='text/javascript'%3E%3C/script%3E"));
</script>
</body>
</html>
Run code
Cut to clipboard
#,广西南宁市,2017-07-24,14:12:41, js星期几上下午几点时间
<script type="text/javascript" src="https://lizhenqiu.com/templates/default/jquery.min.js"></script>
<script>$(function(){
var weekdays = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
var dayOfWeekIndex = (new Date()).getDay();
var dayOfWeek = weekdays[dayOfWeekIndex];
var dayOfWeekPastIndex = Math.floor(weekdays.length * Math.random());
var dayOfWeekPast;
var hourOfDay = new Date().getHours();
var timeOfDay;
// choose day of week other than current one
if (dayOfWeekPastIndex == dayOfWeekIndex) {
dayOfWeekPast = weekdays[(dayOfWeekPastIndex + 1) % weekdays.length];
} else {
dayOfWeekPast = weekdays[dayOfWeekPastIndex];
}
// assign time of day to the hour
if ((hourOfDay >= 4) && (hourOfDay <= 11)) {
timeOfDay = "早上";
} else if ((hourOfDay >= 12) && (hourOfDay <= 16)) {
timeOfDay = "下午";
} else {
timeOfDay = "晚上";
}
// make conversation
alert("大家好,我们" + dayOfWeekPast + "是不是见过面?^2000\n在这个" + dayOfWeek + "的" + timeOfDay);
});
</script>
#1141
#1142
我理解的创业就是一个脱离公司员工意义上的打工以外的赚钱方式,
有很多人貌似只把那种拿到所谓风投然后能所谓打下多少市场份额才算创业有些不准确。
其实创业就是做生意,能生存下来收入比原先高就是成功,
有时候想太多,定的目标太大这才是所谓失败率高的原因吧
如果非要说,我觉得用 精英创业或者行业创业者 来形容这过高的失败率会好一些。
不然对想改变自己生活的人必然有天然的失败诅咒光环在头上,这多想做些小生意小事情的人不是好事
#1143
只能说普通人对阴暗面(暗网)的了解真的非常有限,甚至没有
#1144
微信页面上的二维码长按可以识别 我现在页面上的二维码 安卓设备可以识别 Iphone就不行 请问谁知道是怎么回事啊~
刚刚我也遇到这样的问题,然后发现是因为包住图片的外层div设置了position:fixed了,
设置成position:absolute就可以了。不知道微信自带的浏览器是怎么回事。
iphone的微信页面识别二维码要确保二维码图片和包住图片的div都没有设置position:fixed。
最简单的办法是给img加padding…
#1145
答:比如说你家漏水了,楼下的邻居就会上来。
#1146
//解决微信内核为wkwebview时返回上一页,界面不刷新的问题 window.onpageshow = function(event){ if (event.persisted) { window.location.reload(); } };
#1147
#1148
$('input:radio[name="sex"]:checked').val();
这篇文章主要介绍了PHP实现将textarea的值根据回车换行拆分至数组,涉及表单元素及explode拆分字符串的相关技巧,需要的朋友可以参考下
本文实例讲述了PHP实现将textarea的值根据回车换行拆分至数组的方法。分享给大家供大家参考。具体分析如下:
textarea回车换行为 \r\n $keyword_list = trim($_REQUEST['keywords']); $keyword_arr = explode("\r\n", $keyword_list);
这个地方需要注意是要去除textarea 前后的空格,否则会多出一个
或者使用explode也是可以的
只是不能用\r\n只能用双引号,不能用单引号
#1149
HTML元素,属性已经十分丰富了。但是,在某些场合下,也会显得捉襟见肘,这时候自定义属性就发挥了十分关键的作用。 Html元素的自定义属性,使用起来,十分方便,例如: <input type=”button” value=”Click Me, Baby!” /> 假设我们现在需要限制,这个按钮,只能点击2次,然后就失效了。 通常的实现方式,是可以利用全局变量的形式来记录点击次数,但我们这里用自定义属性来实现这个功能,展示一下自定义属性的优势;我们对上面的button做一下改造: <input type=”button” value=”Click Me, Baby!” clickCount=”0” /> 可以看到,我为这个button 增加了一个自定义属性 clickCount, 并将初始值设为 0;下面我们来写实现功能的js代码: 1. 给 button 增加click事件的处理 <input type=”button” value=”Click Me, Baby!” clickCount=”0” onclick=”customAttributeDemo(this);" /> 2. 我们来写 customAttributeDemo(obj) 这个函数 对于IE来讲,使用自定义属性非常简单,因为IE自动将自定义属性解析到了DOM中,和标准属性没有任何区别,IE下的版本: function customAttributeDemo(obj) { if (obj.clickCount === '0') { obj.clickCount = '1'; } else { obj.disabled = true; } } 上面的代码在 FireFox 下将失效,因为FireFox对自定义属性的使用,限制更高,只能使用 attributes[] 集合来访问,FireFox 下的代码: function customAttributeDemo(obj) { if (obj.attributes['clickCount'].nodeValue === '0') { obj.attributes['clickCount'].nodeValue = '1'; } else { obj.disabled = true; } } 上面的代码,也适用于IE,所以,这个代码,就是具有兼容性的代码了,嘿嘿 感谢小秦网友的交流,他给出了 getAttribute 和 setAttribute 的方法: function customAttributeDemo(obj) { if (obj.getAttribute('clickCount') === '0') obj.setAttribute('clickCount', '1'); else obj.disabled = true; }
#1150
<?php $ip = '192.168.101.100'; $ip_long = sprintf('%u',ip2long($ip)); echo $ip_long.PHP_EOL; // 3232261476 echo long2ip($ip_long); // 192.168.101.100 ?>
可能的格式值: %% - 返回一个百分号 % %b - 二进制数 %c - ASCII 值对应的字符 %d - 包含正负号的十进制数(负数、0、正数) %e - 使用小写的科学计数法(例如 1.2e+2) %E - 使用大写的科学计数法(例如 1.2E+2) %u - 不包含正负号的十进制数(大于等于 0) %f - 浮点数(本地设置) %F - 浮点数(非本地设置) %g - 较短的 %e 和 %f %G - 较短的 %E 和 %f %o - 八进制数 %s - 字符串 %x - 十六进制数(小写字母) %X - 十六进制数(大写字母) 附加的格式值。必需放置在 % 和字母之间(例如 %.2f): + (在数字前面加上 + 或 - 来定义数字的正负性。默认情况下,只有负数才做标记,正数不做标记) ' (规定使用什么作为填充,默认是空格。它必须与宽度指定器一起使用。例如:%'x20s(使用 "x" 作为填充)) - (左调整变量值) [0-9] (规定变量值的最小宽度) .[0-9] (规定小数位数或最大字符串长度) 注释:如果使用多个上述的格式值,它们必须按照以上顺序使用。
#1151
#1152
很明显不是,但是小电影的主角却会遵从它,因为它是“这部小电影的常识”。
某朋友,思维敏捷,长得也不错,身材也好,家境大康。
于某培训班认识一妹纸,坠入情网后发起攻势。
某日班级小聚会去吃海鲜,妹纸突然说不能来。此公问讯,她说来了大姨妈不能吃生冷东西。此公聚会半途得知消息后说上厕所,飞速到超市购买生姜、红糖,熬成大姨妈专用红糖水。飞速送到妹纸家门口。妹纸一脸感动,然后跟他说:“我心里有人了,你以后不要再这样。”
此公多方打听,终于得知妹纸大学时候曾有个男友,这两人就像泰戈尔那首诗里的飞鸟与鱼一般,一个来南方会全身起湿疹,一个去北方会鼻炎流鼻血。 然后毕业之后分手 。但是妹纸仍对此段感情念念不忘。朋友不经感慨:“难得有情人!真是天拆散地阻隔的一对狗男女啊。”然后向我表示一定要拯救妹纸脱离苦海。我的意见是:“你省省吧。换一个你送红糖姜水早跟你好了,这个有剧毒。”此公表示,勇于攀登,挑战极限。
此公总结了一大堆相处经历,譬如妹纸摸他手毛,譬如妹纸给他买创可贴,譬如他撩别的妹纸这个妹纸会生气等等,意淫出妹纸对他也感兴趣。
我问他你打算怎么做。
他一脸淫笑:“强吻她。”
“那人家拒绝你怎么办?以后的路堵死了啊。”
“不可能,我这么帅!而且她力气没我大,肯定OK。”
“万一她情急之下踹你小弟弟呢?”
“我马上躺下,不讹她个十万八万不算完!让她知道什么叫爱的代价。”
“……那人家报警告你非礼呢……”
“放心,我都查过了。中国没有非礼罪。顶多民事调解。不就是赔钱嘛?小事小事。”
然后他果然去了。
某天送妹纸回家,在车上强吻。他后来跟我总结强吻失败的原因:妈的就不该在车上,妈的你知道中控台多宽吗,她侧个身子,我他妈就是长颈鹿都亲不到啊!
最神奇的是,他强吻失败发了信息给妹纸,大意是说你不让我亲看的出你真的对我没兴趣,我不喜欢被拒绝,老子不追了拜拜。
最最神奇的是,妹纸居然还回了他信息,大意是不追就不追谁怕谁,为了避免你还想追我先删你微信。
最最最神奇的是,删了微信后,这两个傻逼一个月聊了三百多条短信……
我只能说这波欲擒故纵、欲拒还迎的瞎鸡吧操作我他妈就是有爱因斯坦的智商都看不懂……
第三幕,这傻逼去宁波,然后花900块钱打车到上海给妹纸买了一条丝巾。妹纸拒绝不了收下了。
然后傻逼的操作又开始了。
他掐指一算,距上次大姨妈已经21天了,又该流血了。于是又熬了一碗汤送去。不料这次恰逢妹纸和人打情骂俏。一气之下,短信妹纸,大意是,拜拜。
妹纸回复:一切珍重,望你万事安好。
他回:谢谢。
这波高冷的操作,我又看不懂了。
我问他你她妈在玩蛇吗?
他痛苦到无以复加,来,给我讲金刚经吧。
昨天,他跟我说又想到一波神奇的操作。
他说计划是这样的。
等考试完,我要考全场第一,然后骗她说试卷涂错了0分,哭起来,然后借她个肩膀安慰安慰,然后找机会亲她,然后就搞定了。
我说,你可不可以有点靠谱正常的操作,比如,找机会约人家看电影,不出就拉倒换人下一个啊。
他说,不行,我现在心里只有她,去宁波约炮都抱着人家了居然没上,我快疯了。
我说,不要这么执着,要放开。
他说,不行啊,我就要这个。
我说,那我没办法了,很明显你前面那些瞎鸡吧操作已经把你自己路堵死了。就算有意思现在也变没意思了。你要按你计划走,先不说你能不能全场第一,人家愿不愿意给你肩膀靠还是个问题,万一她拒绝你怎么收场。
他说,那没办法了,只能放弃。
我草泥马你这话跟我讲了八百多次了。
他说,那你帮我想一波操作。
我说,叫你爸请县委书记出面,去她们家提亲吧。
他:………
那没办法了,现在这种局,我她妈是不会解的。要我解,一个字,放弃。我说。
他说,还是先试试看。
现在我拭目以待他这波操作。
下礼拜再来更新进展……
现在可以开始下注:
买他抱的美人归的请扣1。
买他被拒绝的请扣2。
———————————————————————————————————————
2017年7月24日第一次更新
非常感谢各位的踊跃聚赌。。。
选1的朋友,我代我这位朋友衷心的祝福你们,谢谢你们善良的鼓励;
选2的朋友,我明白你们是务实的,我这位朋友学哲学的,喜欢务虚。同样代他谢谢你们中肯的建议。
因为你们的热情,所以我昨天与这位朋友进行了一场虚实并务的谈话,主题是“论泡与被泡”。
首先我向他阐明了自己的观点,你们两个是不可能的。
他表示接受我这种观点,并且提出自己的观点“草泥马”。
我向他解释为什么不可能:
第一、因为你的冒进,现在你们两处于信息极不对等的状态,敌暗你明,这场仗打不了。
第二、人家说对你没有感觉,这已经是拒绝的高层次了,一般拒绝分几种,犹豫的会说“你不要逼我太紧”,有其他备胎不知道怎么选择的一般会不说话看你怎么做,这是可以强吻的,她说对你完全没感觉了,这已经是在告诉你“滚”,你还不明白吗?
他对此表示不认同,认为自己光明磊落,对方同样情深义重,是个好人,不是玩阴谋诡计,不存在敌暗我明的问题,这是一个求同存异过程中的小小曲折。关于第二点,他表示不屑,原话是这么说的:“正是因为她没有走出旧爱的那段恋情,所以她果断拒绝我,避免我受到伤害。念旧、善良。有什么理由不去追求这么好的女孩子呢?”
我说,我知道你是学马列的,很多东西可以辩证的看待,但是感情这东西。。。就好像是吃屎一样,你可以辩证的看,但是你不能辩证的吃啊!
然后,我趁他对于吃屎问题展开辩证分析的沉默之际,告诉他:“永远不要去执着的追求某一样东西,尤其是人。人是最善变的。她原来对你也许是有意思的,但你执着到了自己卑微的程度,那就没意思了。现在这种情况,放手不放手另说,你先要自己冷静,也给对方一点空间和时间。”
“你现在对她的爱已经不是那么单纯的爱了,我相信还有被拒绝的恨。爱恨交加,有没有听过那首歌,算了,我也忘记怎么唱了。”
这倒是引起了他的共鸣:“对,我是有恨她。”
“永远不要去恨你的对手,那会影响你的判断。”教父。
最后,我们两达成一个共识。那就是他决定在实施他的神奇计划之前来一次再接触。那天,如果下雨,他有借口去载她,如果没有下雨,那么就算上天让他放弃,起码是暂时放弃。
我已经很久没有见识过这么纯洁、傻逼、毫不做作只有傻逼操作的追女孩子方式了。。
我本不该破坏他的这份最真挚、毫无技术含量的爱。
只有彻底的受伤,才能让他清醒。
如果成功,那么也为我们讲究招式的剑宗泡妞派提供新的思考空间——讲究真爱无敌的“气宗泡妞派”。
但我又怕他8月份天天来找我喝酒。。。
好,那现在问题来了,7月30日,海口会不会下雨呢?!
下雨的扣3。
不下雨的扣4。
让我们为爱求雨吧!
#1153
<header> <!--狗日的破UC浏览器!--> </header> 视频 <iframe height="250" width="100%" src="{$find.video}" frameborder="0" 'allowfullscreen'=""></iframe>
#1154
#1155
<div style="display:none;"><!--缓存图片,背景图片闪白bug,修复刷新的时候背景闪一下才显示背景图片--> <img src="86f740e5196bec328ee09cca4dd9c827.jpg"> <img src="5-120601093339.png"> <img src="5-120601093354.gif"> </div>
#1156
插件地址: https://github.com/mattboldt/typed.js/
<!doctype html> <html lang="zh"> <head> <title>神奇的前端输入模拟插件 -- typed.js</title> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta author="极客标签:www.gbtags.com" /> <meta name="Description" content="极客标签是一个基于web的在线极客编程知识分享&学习平台,能够帮助你快速高效地学习代码编程并方便的在线实时分享编程技巧和心得" /> <meta name="Keywords" content="极客,极客标签,轻视频,代码录播,在线调试,前端,前端社区,前端特效,素材,html5,javascript,css3,jquery,bootstrap,bootstrap3" /> <style> html, body, body div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, figure, footer, header, menu, nav, section, time, mark, audio, video, details, summary { margin: 0; padding: 0; border: 0; font-size: 100%; vertical-align: baseline; background: transparent; } /* line 3, ../../_sass/404.scss */ #not-found, #not-found body { display: table; margin: 0; padding: 0; width: 100%; height: 100%; } /* line 11, ../../_sass/404.scss */ #not-found body { position: relative; background-color: #1d2b2a; background-image: url(404-stripe.png), url(404-noise.png); background-repeat: repeat-x, repeat; background-position: 0 0%; background-attachment: fixed; font-size: 21px; font-family: Inconsolata, "Lucida Console", Monaco, Courier, monospace; font-smooth: never; line-height: 2em; color: #d4f8e3; -webkit-font-smoothing: none; text-shadow: -2px 0 0px rgba(0, 0, 225, 0.4), -1px 0 3px rgba(103, 171, 236, 0.6), 1px 0 4px rgba(69, 112, 204, 0.5); -moz-animation: blink 0.1s steps(2, start) infinite, skip 7s linear infinite, flicker 0.1s steps(2, start) infinite; -webkit-animation: blink 0.1s steps(2, start) infinite, skip 7s linear infinite, flicker 0.1s steps(2, start) infinite; animation: blink 0.1s steps(2, start) infinite, skip 7s linear infinite, flicker 0.1s steps(2, start) infinite; } /* line 26, ../../_sass/404.scss */ #not-found body #holder { display: table-cell; vertical-align: bottom; max-width: 800px; margin: 0 auto; } /* line 32, ../../_sass/404.scss */ #not-found body #story1, #not-found body #story { padding: 10px 0 10px; max-width: 100%; white-space: pre; line-height: 1.25em; } /* line 38, ../../_sass/404.scss */ #not-found body #story1:after { visibility: visible; content: ''; background-color: #d4f8e3; display: inline-block; position: relative; width: 0.5em; height: 1em; top: 5px; margin-left: 0; -moz-box-shadow: -2px 0 0px rgba(0, 0, 225, 0.4), -1px 0 3px rgba(103, 171, 236, 0.6), 1px 0 4px rgba(69, 112, 204, 0.5); -webkit-box-shadow: -2px 0 0px rgba(0, 0, 225, 0.4), -1px 0 3px rgba(103, 171, 236, 0.6), 1px 0 4px rgba(69, 112, 204, 0.5); box-shadow: -2px 0 0px rgba(0, 0, 225, 0.4), -1px 0 3px rgba(103, 171, 236, 0.6), 1px 0 4px rgba(69, 112, 204, 0.5); -moz-animation: flicker 0.1s steps(2, start) infinite, ready 1s steps(2, start) 25s infinite; -webkit-animation: flicker 0.1s steps(2, start) infinite, ready 1s steps(2, start) 25s infinite; animation: flicker 0.1s steps(2, start) infinite, ready 1s steps(2, start) 25s infinite; } /* line 52, ../../_sass/404.scss */ #not-found body #kick { text-shadow: none; margin: 10px; } /* line 55, ../../_sass/404.scss */ #not-found body #kick a { background-color: #d4f8e3; color: #1d2b2a; } /* line 61, ../../_sass/404.scss */ #not-found body .typed-cursor { display: none; } @-moz-keyframes blink { to { background-color: #223332; } } @-webkit-keyframes blink { to { background-color: #223332; } } @keyframes blink { to { background-color: #223332; } } @-moz-keyframes skip { to { background-position: 0 100%; } } @-webkit-keyframes skip { to { background-position: 0 100%; } } @keyframes skip { to { background-position: 0 100%; } } @-moz-keyframes flicker { to { color: #bddeca; } } @-webkit-keyframes flicker { to { color: #bddeca; } } @keyframes flicker { to { color: #bddeca; } } @-moz-keyframes ready { to { visibility: hidden; } } @-webkit-keyframes ready { to { visibility: hidden; } } @keyframes ready { to { visibility: hidden; } } @media screen and (max-width: 400px) { /* line 84, ../../_sass/404.scss */ #not-found body { font-size: 18px; } } </style> </head> <body> <!-- HTML代码片段中请勿添加<body>标签 //--> <div id="holder"> <span id="story"></span> <span id="story1"></span> <div id="kick"></div> </div> <!-- 推荐开源CDN来选取需引用的外部JS //--> <script async="" src="http://cdn.gbtags.com/analytics.js/1.5.2/analytics.min.js"></script> <script type="text/javascript" src="http://cdn.gbtags.com/jquery/1.11.1/jquery.min.js"></script> <script> // The MIT License (MIT) // Typed.js | Copyright (c) 2014 Matt Boldt | www.mattboldt.com // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. ! function($) { "use strict"; var Typed = function(el, options) { // chosen element to manipulate text this.el = $(el); // options this.options = $.extend({}, $.fn.typed.defaults, options); // attribute to type into this.isInput = this.el.is('input'); this.attr = this.options.attr; // show cursor this.showCursor = this.isInput ? false : this.options.showCursor; // text content of element this.elContent = this.attr ? this.el.attr(this.attr) : this.el.text() // html or plain text this.contentType = this.options.contentType; // typing speed this.typeSpeed = this.options.typeSpeed; // add a delay before typing starts this.startDelay = this.options.startDelay; // backspacing speed this.backSpeed = this.options.backSpeed; // amount of time to wait before backspacing this.backDelay = this.options.backDelay; // input strings of text this.strings = this.options.strings; // character number position of current string this.strPos = 0; // current array position this.arrayPos = 0; // number to stop backspacing on. // default 0, can change depending on how many chars // you want to remove at the time this.stopNum = 0; // Looping logic this.loop = this.options.loop; this.loopCount = this.options.loopCount; this.curLoop = 0; // for stopping this.stop = false; // custom cursor this.cursorChar = this.options.cursorChar; // shuffle the strings this.shuffle = this.options.shuffle; // the order of strings this.sequence = []; // All systems go! this.build(); }; Typed.prototype = { constructor: Typed , init: function() { // begin the loop w/ first current string (global self.string) // current string will be passed as an argument each time after this var self = this; self.timeout = setTimeout(function() { for (var i=0;i<self.strings.length;++i) self.sequence[i]=i; // shuffle the array if true if(self.shuffle) self.sequence = self.shuffleArray(self.sequence); // Start typing self.typewrite(self.strings[self.sequence[self.arrayPos]], self.strPos); }, self.startDelay); } , build: function() { // Insert cursor if (this.showCursor === true) { this.cursor = $("<span class=\"typed-cursor\">" + this.cursorChar + "</span>"); this.el.after(this.cursor); } this.init(); } // pass current string state to each function, types 1 char per call , typewrite: function(curString, curStrPos) { // exit when stopped if (this.stop === true) { return; } // varying values for setTimeout during typing // can't be global since number changes each time loop is executed var humanize = Math.round(Math.random() * (100 - 30)) + this.typeSpeed; var self = this; // ------------- optional ------------- // // backpaces a certain string faster // ------------------------------------ // // if (self.arrayPos == 1){ // self.backDelay = 50; // } // else{ self.backDelay = 500; } // contain typing function in a timeout humanize'd delay self.timeout = setTimeout(function() { // check for an escape character before a pause value // format: \^\d+ .. eg: ^1000 .. should be able to print the ^ too using ^^ // single ^ are removed from string var charPause = 0; var substr = curString.substr(curStrPos); if (substr.charAt(0) === '^') { var skip = 1; // skip atleast 1 if (/^\^\d+/.test(substr)) { substr = /\d+/.exec(substr)[0]; skip += substr.length; charPause = parseInt(substr); } // strip out the escape character and pause value so they're not printed curString = curString.substring(0, curStrPos) + curString.substring(curStrPos + skip); } if (self.contentType === 'html') { // skip over html tags while typing var curChar = curString.substr(curStrPos).charAt(0) if (curChar === '<' || curChar === '&') { var tag = ''; var endTag = ''; if (curChar === '<') { endTag = '>' } else { endTag = ';' } while (curString.substr(curStrPos).charAt(0) !== endTag) { tag += curString.substr(curStrPos).charAt(0); curStrPos++; } curStrPos++; tag += endTag; } } // timeout for any pause after a character self.timeout = setTimeout(function() { if (curStrPos === curString.length) { // fires callback function self.options.onStringTyped(self.arrayPos); // is this the final string if (self.arrayPos === self.strings.length - 1) { // animation that occurs on the last typed string self.options.callback(); self.curLoop++; // quit if we wont loop back if (self.loop === false || self.curLoop === self.loopCount) return; } self.timeout = setTimeout(function() { self.backspace(curString, curStrPos); }, self.backDelay); } else { /* call before functions if applicable */ if (curStrPos === 0) self.options.preStringTyped(self.arrayPos); // start typing each new char into existing string // curString: arg, self.el.html: original text inside element var nextString = curString.substr(0, curStrPos + 1); if (self.attr) { self.el.attr(self.attr, nextString); } else { if (self.isInput) { self.el.val(nextString); } else if (self.contentType === 'html') { self.el.html(nextString); } else { self.el.text(nextString); } } // add characters one by one curStrPos++; // loop the function self.typewrite(curString, curStrPos); } // end of character pause }, charPause); // humanized value for typing }, humanize); } , backspace: function(curString, curStrPos) { // exit when stopped if (this.stop === true) { return; } // varying values for setTimeout during typing // can't be global since number changes each time loop is executed var humanize = Math.round(Math.random() * (100 - 30)) + this.backSpeed; var self = this; self.timeout = setTimeout(function() { // ----- this part is optional ----- // // check string array position // on the first string, only delete one word // the stopNum actually represents the amount of chars to // keep in the current string. In my case it's 14. // if (self.arrayPos == 1){ // self.stopNum = 14; // } //every other time, delete the whole typed string // else{ // self.stopNum = 0; // } if (self.contentType === 'html') { // skip over html tags while backspacing if (curString.substr(curStrPos).charAt(0) === '>') { var tag = ''; while (curString.substr(curStrPos).charAt(0) !== '<') { tag -= curString.substr(curStrPos).charAt(0); curStrPos--; } curStrPos--; tag += '<'; } } // ----- continue important stuff ----- // // replace text with base text + typed characters var nextString = curString.substr(0, curStrPos); if (self.attr) { self.el.attr(self.attr, nextString); } else { if (self.isInput) { self.el.val(nextString); } else if (self.contentType === 'html') { self.el.html(nextString); } else { self.el.text(nextString); } } // if the number (id of character in current string) is // less than the stop number, keep going if (curStrPos > self.stopNum) { // subtract characters one by one curStrPos--; // loop the function self.backspace(curString, curStrPos); } // if the stop number has been reached, increase // array position to next string else if (curStrPos <= self.stopNum) { self.arrayPos++; if (self.arrayPos === self.strings.length) { self.arrayPos = 0; // Shuffle sequence again if(self.shuffle) self.sequence = self.shuffleArray(self.sequence); self.init(); } else self.typewrite(self.strings[self.sequence[self.arrayPos]], curStrPos); } // humanized value for typing }, humanize); } /** * Shuffles the numbers in the given array. * @param {Array} array * @returns {Array} */ ,shuffleArray: function(array) { var tmp, current, top = array.length; if(top) while(--top) { current = Math.floor(Math.random() * (top + 1)); tmp = array[current]; array[current] = array[top]; array[top] = tmp; } return array; } // Start & Stop currently not working // , stop: function() { // var self = this; // self.stop = true; // clearInterval(self.timeout); // } // , start: function() { // var self = this; // if(self.stop === false) // return; // this.stop = false; // this.init(); // } // Reset and rebuild the element , reset: function() { var self = this; clearInterval(self.timeout); var id = this.el.attr('id'); this.el.after('<span id="' + id + '"/>') this.el.remove(); if (typeof this.cursor !== 'undefined') { this.cursor.remove(); } // Send the callback self.options.resetCallback(); } }; $.fn.typed = function(option) { return this.each(function() { var $this = $(this), data = $this.data('typed'), options = typeof option == 'object' && option; if (!data) $this.data('typed', (data = new Typed(this, options))); if (typeof option == 'string') data[option](); }); }; $.fn.typed.defaults = { strings: ["These are the default values...", "You know what you should do?", "Use your own!", "Have a great day!"], // typing speed typeSpeed: 0, // time before typing starts startDelay: 0, // backspacing speed backSpeed: 0, // shuffle the strings shuffle: false, // time before backspacing backDelay: 500, // loop loop: false, // false = infinite loopCount: false, // show cursor showCursor: true, // character for cursor cursorChar: "|", // attribute to type (null == text) attr: null, // either html or text contentType: 'html', // call when done callback function callback: function() {}, // starting callback function before each string preStringTyped: function() {}, //callback for every typed string onStringTyped: function() {}, // callback for reset resetCallback: function() {} }; }(window.jQuery); $("html").attr("id", "not-found"); $(function(){ var weekdays = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"]; var dayOfWeekIndex = (new Date()).getDay(); var dayOfWeek = weekdays[dayOfWeekIndex]; var dayOfWeekPastIndex = Math.floor(weekdays.length * Math.random()); var dayOfWeekPast; var hourOfDay = new Date().getHours(); var timeOfDay; // choose day of week other than current one if (dayOfWeekPastIndex == dayOfWeekIndex) { dayOfWeekPast = weekdays[(dayOfWeekPastIndex + 1) % weekdays.length]; } else { dayOfWeekPast = weekdays[dayOfWeekPastIndex]; } // assign time of day to the hour if ((hourOfDay >= 4) && (hourOfDay <= 11)) { timeOfDay = "早上"; } else if ((hourOfDay >= 12) && (hourOfDay <= 16)) { timeOfDay = "下午"; } else { timeOfDay = "晚上"; } // make conversation $('#story').typed({ strings: ["大家好,我们" + dayOfWeekPast + "是不是见过面?^2000\n在这个" + dayOfWeek + "的" + timeOfDay + "...^2000\n我要给大家介绍一下我.^2000\n我就是一个程序员.^2000\n平时也没什么爱好.^2000\n我有一个理想,那就是.^1000.^1000.^1000\n"], typeSpeed: 50, backDelay: 800, loop: false, loopCount: false, callback: function(){ $('#story1').typed({ strings: ["金钱与美女,^2000额...", "事业和爱情.^2000\n我爱写程序.^2000\n我爱做很Cool的东西.^2000\n谢谢..."], typeSpeed: 50, backDelay: 500, loop: false, loopCount: false }); } }); }); </script> <script type="text/javascript"> var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://"); document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fac45a0f68a119fbe4d1c4c3ac3044dbd' type='text/javascript'%3E%3C/script%3E")); </script> </body> </html>
js星期几上下午几点时间
<script type="text/javascript" src="https://lizhenqiu.com/templates/default/jquery.min.js"></script> <script>$(function(){ var weekdays = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"]; var dayOfWeekIndex = (new Date()).getDay(); var dayOfWeek = weekdays[dayOfWeekIndex]; var dayOfWeekPastIndex = Math.floor(weekdays.length * Math.random()); var dayOfWeekPast; var hourOfDay = new Date().getHours(); var timeOfDay; // choose day of week other than current one if (dayOfWeekPastIndex == dayOfWeekIndex) { dayOfWeekPast = weekdays[(dayOfWeekPastIndex + 1) % weekdays.length]; } else { dayOfWeekPast = weekdays[dayOfWeekPastIndex]; } // assign time of day to the hour if ((hourOfDay >= 4) && (hourOfDay <= 11)) { timeOfDay = "早上"; } else if ((hourOfDay >= 12) && (hourOfDay <= 16)) { timeOfDay = "下午"; } else { timeOfDay = "晚上"; } // make conversation alert("大家好,我们" + dayOfWeekPast + "是不是见过面?^2000\n在这个" + dayOfWeek + "的" + timeOfDay); }); </script>
#1157
#1158
DISCUZ积分交易系统积分活动异常BUG修复方法
Discuz x3.1 x3 x2.5论坛刷积分各种方法+修复补丁
dz论坛回复主题等奖励积分自动归零归0更新0
function countcredit($uid, $update = true) { global $_G; $credits = 0; if($uid && !empty($_G['setting']['creditsformula'])) { $member = C::t('common_member_count')->fetch($uid); //20170722 //print_r($member);exit; //qq 2500152288S // lizhenqiu.com if(empty($member)){ C::t('common_member_count')->insert(array('uid'=>$uid)); } //end eval("\$credits = round(".$_G['setting']['creditsformula'].");"); if($uid == $_G['uid']) { if($update && $_G['member']['credits'] != $credits) { C::t('common_member')->update_credits($uid, $credits); $_G['member']['credits'] = $credits; } } elseif($update) { C::t('common_member')->update_credits($uid, $credits); } } return $credits; }
#1159