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 addEvent(element, event, callback) { | |
if (element.addEventListener) { | |
element.addEventListener(event, callback, false) | |
} else if (element.attachEvent) { | |
element.attachEvent('on' + event, callback); | |
} else { | |
element['on' + event] = callback; | |
} | |
} |
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
{"lastUpload":"2020-05-27T03:59:33.528Z","extensionVersion":"v3.4.3"} |
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 ($) { | |
var | |
followers = ["zedshaw"]; | |
followeds = []; | |
function follow(id, callback) { | |
$.post('https://github.com/users/follow', {target: id}, function(data, textStatus, xhr) { | |
/*optional stuff to do after success */ | |
callback(id, data); | |
//console.log("成功follow ", id, "此人共有", data.count, "位粉丝"); |
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
/*! | |
* Grunt | |
* $ npm install grunt-contrib-uglify grunt-autoprefixer grunt-contrib-cssmin grunt-contrib-imagemin grunt-contrib-sass grunt-contrib-watch grunt-contrib-concat grunt-contrib-clean grunt-contrib-jshint grunt-notify --save-dev | |
*/ | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
// Sass |
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 total = 0 | |
function loop(){ | |
console.log("=====total count", total++); | |
$.ajax({ | |
url: "http://mixin.tongda2000.com/?" + Math.random(), | |
error: function(){ | |
loop(); | |
}, | |
success: function(){ | |
loop(); |
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
/** | |
* http下载类库 | |
*/ | |
class Httplib{ | |
// 目标网站无法打开时返回的错误代码 | |
var $_ERROR_CONNECT_FAILURE = 600; | |
// 自定义 UserAgent 字符串 | |
var $_SEND_USER_AGENT = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; LazyCMS.net::DownLoader)'; | |
var $_url,$_method,$_timeout; | |
var $_scheme,$_host,$_port,$_path,$_query,$_referer; |
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
/*上机约瑟夫环链表实验*/ | |
/*版权 颜海镜 所有*/ | |
#include<stdio.h> | |
#include <malloc.h> | |
#include "stdlib.h" | |
typedef struct Node | |
{ | |
int data; | |
struct Node *next; |
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
;颜海镜 2011.9.30 | |
;3.17数制转换 | |
.model small | |
.statck | |
.data | |
LEDtable db 0c0h,0f9h,0a4h,0b0h,99h,92h,82h,0f8h,80h,90h,88h,83h,0c6h,0c1h,86h,8eh | |
LEDnum db 01h,02h,03h,04h,05h,06h,07h,08h,09h,0ah,0bh,0ch,0dh,0eh,0fh | |
.code | |
start: mov ax,@data | |
mov ds,ax;初始化数据段基址 |
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
;颜海镜 2011.9.29 小写字母转换成大写字幕 | |
;最终解释权归颜海镜所有 | |
.model small | |
.stack | |
.data | |
msgkey db 'Press any key to continue ...','$' | |
msgin db 'input:','$' | |
msgout db 'output:','$' | |
enterr db 0dh,0ah,'$' | |
.code |
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
;lt301a.asm | |
.model small | |
.stack | |
.data | |
string db 'Hello, Everybody !',0dh,0ah,'$' | |
.code | |
start: mov ax,@data | |
mov ds,ax | |
mov dx,offset string | |
mov ah,9 |
NewerOlder