Skip to content

Instantly share code, notes, and snippets.

View fxxkscript's full-sized avatar
🎯
Focusing

Ray fxxkscript

🎯
Focusing
View GitHub Profile
@fxxkscript
fxxkscript / data.js
Created January 5, 2015 06:43
获取微信公众平台订单数据
MCH.tradeRefundQuery.showPageRet = function(curpage) {
if (!MCH.header.hasAuthority('return_query')) {
MCH.header.showNoAuthorityDialog();
return false;
}
var table = $('#refundQueryTable');
if (curpage == 0) {
$("td").parent().remove();
table.append("<tr class='empty'><td colspan='7'>暂无数据</td></tr>");
} else {
@fxxkscript
fxxkscript / test
Created September 17, 2014 02:45
weixin mp editor iframe test
<iframe height="200" width="300" frameborder="0" src="http://v.qq.com/iframe/player.html?vid=n013142ami1&amp;width=300&amp;height=200&amp;auto=0" allowfullscreen="" style="max-width: 100%; word-wrap: break-word !important; z-index: 1;"></iframe>
@fxxkscript
fxxkscript / aspect
Created September 16, 2014 08:22
aspect demo
var Widget = require('core/widget');
var subWidget = Widget.extend({
hello: function() {
console.log('hello');
}
});
var widget = new subWidget();
widget.before('hello', function() {
@fxxkscript
fxxkscript / selectBlock.js
Last active August 29, 2015 14:04
selectBlock
/*! 1 2014-07-30 */
var _config={color:{allTime:60,addTime:0,lvMap:[2,3,4,5,5,6,6,7,7,7,8,8,8,8,8,8,9]},pic:{isOpen:!1,allTime:5,addTime:0,lvMap:[2,3,3,4,4,4,4,5,5,5,5,5,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,8]}},shareData={imgUrl:"http://i3.7k7kimg.cn/cms/cms10/20140730/164754_5651.png",timeLineLink:"http://www.1758.com/hlmy/yanse2.htm",tTitle:"看你有多色?",tContent:"找出所有色块中颜色不同的一块。分享朋友圈,找到身边的色魔"};!function(){var a=$("#box"),b={lv:$("#room .lv em"),time:$("#room .time"),start:$("#dialog .btn-restart"),back:$("#dialog .btn-back"),share:$("#dialog .btn-share"),pause:$("#room .btn-pause"),resume:$("#dialog .btn-resume"),dialog:$("#dialog"),d_content:$("#dialog .content"),d_pause:$("#dialog .pause"),d_gameover:$("#dialog .gameover")},c={init:function(a,b,c){this.type=a,this.api=API[a],this.config=_config[a],this.reset(),this.parent=c,this.el=b,this.renderUI(),this.inited||this.initEvent(),this.inited=!0,this.start()},renderUI:function(){var b=90==window.orientation||-90==window.orientation,c=b?window.innerHeight:wind
// These #includes tell the compiler to include the named
// header files, similar to imports in Java. The code for
// these is generally located under /usr/include/, such
// as /usr/include/assert.h. assert.h contains the
// declaration of the assert() function, stdio.h contains
// the declaration of the printf() function, and stdlib.h
// contains the declaration of the malloc() and free()
// functions, all of which are used in the code below.
#include <assert.h>
#include <stdio.h>
$('a').each(function() {
if ($(this).text() === '感谢回复者') {
$(this).trigger('click');
}
});
@fxxkscript
fxxkscript / jira.js
Last active August 29, 2015 14:00
JIRA每日完成任务
var nodes = document.getElementsByTagName('item');
var s = '\n';
var data = {};
for(var i = 1; i < nodes.length; i++) {
var title = nodes[i].getElementsByTagName('title')[0].innerHTML,
author = nodes[i].getElementsByTagName('assignee')[0].innerHTML;
data[author] = data[author] || [];
data[author].push(title.replace(/\[\w+\-\d+\]\s*/, ''));
}
for (var author in data) {
#include <stdio.h>
#define MAX_ARRAY 100
int main(int argc, char *argv[]) {
int i;
char s[MAX_ARRAY], c;
int lim = MAX_ARRAY;
setbuf(stdout, NULL);
setbuf(stdin, NULL);
@fxxkscript
fxxkscript / modal.js
Created August 21, 2013 07:14
弹出层代码示例
/**
* 依赖components/modal/modal
* /
Modal.initialize({
type: 'material' // 微博图文素材类型是 material
}).setChooseItemCallback(function(data) {
//选择一个图文素材的 callback
}).modal('show');// 使弹出层显示