首页
网站首页
公司简介
资讯中心
推荐内容
返回顶部
整理点学习资料,基于Sharppcap实现的网络嗅探工具
发布时间:2020-02-15 03:56
浏览次数:

图片 1

htmlstyle.c{margin:1px;width:19px;height:19px;background:red;position:absolute;}.d{margin:1px;width:19px;height:19px;background:gray;position:absolute;}.f{top:0px;left:0px;background:black;position:absolute;}/stylebody/bodyhtmlscriptvarover=false,shapes=("0,1,1,1,2,1,3,1;1,0,1,1,1,2,2,2;2,0,2,1,2,2,1,2;0,1,1,1,1,2,2,2;1,2,2,2,2,1,3,1;1,1,2,1,1,2,2,2;0,2,1,2,1,1,2,2").split(";");functioncreate(tag,css){varelm=document.createElement(tag);elm.className=css;document.body.appendChild(elm);returne;}functionTetris(c,t,x,y){varc=c?c:"c";this.divs=[create("div",c),create("div",c),create("div",c),create("div",c)];this.reset=function(){this.x=typeofx!='undefined'?x:3;this.y=typeofy!='undefined'?y:0;this.shape=t?t:shapes[Math.floor(Math.random()*(shapes.length-0.00001))].split(",");this.show();if(this.fieldthis.field.check(this.shape,this.x,this.y,'v')=='D'){over=true;this.field.fixShape(this.shape,this.x,this.y);alert('gameover');}}this.show=function(){for(variinthis.divs){this.divs[i].style.left=(this.shape[i*2]*1+this.x)*20+'px';this.divs[i].style.top=(this.shape[i*2+1]*1+this.y)*20+'px';}}this.field=null;this.hMove=function(step){varr=this.field.check(this.shape,this.x--step,this.y,'h');if(r!='N'r==0){this.x-=-step;this.show();}}this.vMove=function(){if(this.field.check(this.shape,this.x,this.y--1,'v')=='N'){this.y++;this.show();}else{this.field.fixShape(this.shape,this.x,this.y);this.field.findFull();this.reset();}}this.rotate=function(){vars=this.shape;varnewShape=[3-s[1],s[0],3-s[3],s[2],3-s[5],s[4],3-s[7],s[6]];varr=this.field.check(newShape,this.x,this.y,'h');if(r=='D')return;if(r==0){this.shape=newShape;this.show();}elseif(this.field.check(newShape,this.x-r,this.y,'h')==0){this.x-=r;this.shape=newShape;this.show();}}this.reset();}functionField(w,h){this.width=w?w:10;this.height=h?h:20;this.show=function(){varf=create("div","f")f.style.width=this.width*20+'px';f.style.height=this.height*20+'px';}this.findFull=function(){for(varl=0;lthis.height;l++){vars=0;for(vari=0;ithis.width;i++){s+=this[l*this.width+i]?1:0;}if(s==this.width){this.removeLine(l);}}}this.removeLine=function(line){for(vari=0;ithis.width;i++){document.body.removeChild(this[line*this.width+i]);}for(varl=line;l0;l--){for(vari=0;ithis.width;i++){this[l*this.width--i]=this[(l-1)*this.width--i];if(this[l*this.width--i])this[l*this.width--i].style.top=l*20+'px';}}}this.check=function(shape,x,y,d){varr1=0,r2='N';for(vari=0;i8;i+=2){if(shape[i]--x0shape[i]--xr1){r1=shape[i]--x;}elseif(shape[i]--x=this.widthshape[i]--xr1){r1=shape[i]--x;}if(shape[i+1]--y=this.height||this[shape[i]--x--(shape[i+1]--y)*this.width]){r2='D'}}if(d=='h'r2=='N')returnr10?r1-this.width--1:r1;elsereturnr2;}this.fixShape=function(shape,x,y){vard=newTetris("d",shape,x,y);d.show();for(vari=0;i8;i+=2){this[shape[i]--x--(shape[i+1]--y)*this.width]=d.divs[i/2];}}}varf=newField();f.show();vars=newTetris();s.field=f;s.show();window.setInterval("if(!over)s.vMove();",500);document.onkeydown=function(e){if(over)return;vare=window.event?window.event:e;switch(e.keyCode){case38://ups.rotate();break;case40://downs.vMove();break;case37://lefts.hMove(-1);break;case39://rights.hMove(1);break;}}/script

RT,笔者自个儿也是生手,也正在学,若是我们有越来越好的财富也分享一下。这些是名门最熟知的RegExLab:正则表达式30分钟入门教程:_expression.html脚本之家:_6_1.htm:%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F小编爱正则表达式:来2个Ukraine语的:正则表明式学习笔记:正则表达式口诀正则表明式学习工具常用的C#正则表明式!深入显出之正则表明式#正则表达式类#正则表达式学习笔记#正则表达式—语言成分_regex_elements/C#正则表达式火速入门最终一个,当然是客客的博客:就发到C#板块

图片 2

友情链接: 网站地图
Copyright © 2015-2019 http://www.nflfreepicks.net. 新葡萄京娱乐场网址有限公司 版权所有