Skip to content

Instantly share code, notes, and snippets.

View yanhaijing's full-sized avatar
🏠
Working for jsmini.cc

颜海镜 yanhaijing

🏠
Working for jsmini.cc
View GitHub Profile
@yanhaijing
yanhaijing / refresh-website.js
Last active December 22, 2015 21:28
刷新任意网站,无限制
var total = 0
function loop(){
console.log("=====total count", total++);
$.ajax({
url: "http://mixin.tongda2000.com/?" + Math.random(),
error: function(){
loop();
},
success: function(){
loop();
@yanhaijing
yanhaijing / Httplib.php
Created May 1, 2013 14:25
php访问http文件
/**
* 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;
@yanhaijing
yanhaijing / 约瑟夫环.c
Created April 13, 2013 00:59
上机约瑟夫环链表实验
/*上机约瑟夫环链表实验*/
/*版权 颜海镜 所有*/
#include<stdio.h>
#include <malloc.h>
#include "stdlib.h"
typedef struct Node
{
int data;
struct Node *next;
@yanhaijing
yanhaijing / mac.asm
Created April 12, 2013 14:51
包含库实验
include stdio.mac
.model samll
.stack
.data
string db 'yanhaijing','$'
.code
start: mov ax,@data
mov ds,ax;程序开始
putchar 'a'
@yanhaijing
yanhaijing / xlat317.asm
Created April 12, 2013 14:50
数制转
;颜海镜 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;初始化数据段基址
@yanhaijing
yanhaijing / upper.asm
Created April 12, 2013 14:49
小写字母转换成大写字幕
;颜海镜 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
@yanhaijing
yanhaijing / firstasm.asm
Created April 12, 2013 14:47
第一个汇编程序
;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