window.addEventListener('scroll',function(){ if(document.compatMode == "CSS1Compat") { alert(document.documentElement.scrollTop); } else { alert(docum...
分类:
编程语言 时间:
2015-04-10 01:01:47
阅读次数:
223
一、委托的两个最主要的作用: 1、委托是对方法或者方法列表的引用,实例化后的委托对象会将给定的参数传递给它所回调的方法,并去执行方法。 2、委托可以将某一个方法当作另一个方法的参数来进行传递,利用这种方法便可以动态的给方法赋值,避免了在程序中大量的使用If-Else(Switch)语句,使得程序具有...
刚开始学c,还不了解,花了两个多真是写了书上的五个简单题,慢慢来吗!不积小流,无以成江河#include "stdio.h"void main(){ int c,n; scanf("%d",&n); c=n%2; if(c=0) printf("n is an even"); else prin.....
分类:
其他好文 时间:
2015-04-09 19:26:38
阅读次数:
152
functionbackTop(){jQuery(window.top.document).find("html,body").animate({scrollTop:0},300);}jQuery(window).scroll(function(){if(jQuery(window).scrollTop()>1){jQuery("#backToTop").show(200);}else{jQuery("#backToTop").hide(200);}})
分类:
Web程序 时间:
2015-04-09 17:48:00
阅读次数:
137
if( MotionEvent.ACTION_DOWN == nActive )
{
mptBegin = pt ;
}
else if( MotionEvent.ACTION_MOVE == nActive )
{
mptEnd = ...
分类:
其他好文 时间:
2015-04-09 17:29:24
阅读次数:
148
关于a=0和a==0的解释:
如果:int a = 0;
那么a=0这个表达式是假,a==0这个表达式为真。
如果:int a = 1;
那么a=0这个表达式是假,a==0这个表达式为假。
举个例子:
int a = 0;
if( a = 0 )
printf( "True" );
else
printf( "False" );输...
分类:
其他好文 时间:
2015-04-09 15:39:05
阅读次数:
122
原文:http://dataqueen.unlimitedviz.com/2012/01/ssis-2012-package-configurations-menu-option-missing/I’m going to blog this in case anyone else has run i...
分类:
其他好文 时间:
2015-04-09 15:20:20
阅读次数:
128
#include
using namespace std;
int search(const int*, int, int);
int main()
{
int arr[6] = {1,2,3,4,10,20};
int find = search(arr, 6, 10);
if(find == -1)
cout
else
cout
return 0;
...
分类:
其他好文 时间:
2015-04-09 11:53:32
阅读次数:
169
#include int c(int a){ int i; if(a<=1) return 0; else for(i=2;i*i<=a;i++) { if(a%i==0) return 0; } return 1;}int main(){ int j,x,y,t; wh...
分类:
其他好文 时间:
2015-04-09 10:19:13
阅读次数:
135
进制转换进制转换string ten_to_other(int y, int sum) { string res = ""; while (sum != 0) { char c = sum % y; if (0 <= c && c <= 9) { c = c + '0'; } else { /...
分类:
其他好文 时间:
2015-04-09 00:59:55
阅读次数:
115