码迷,mamicode.com
首页 >  
搜索关键字:if then else    ( 23991个结果
javascript中的scroll事件
window.addEventListener('scroll',function(){ if(document.compatMode == "CSS1Compat") { alert(document.documentElement.scrollTop); } else { alert(docum...
分类:编程语言   时间:2015-04-10 01:01:47    阅读次数:223
c# 委托
一、委托的两个最主要的作用: 1、委托是对方法或者方法列表的引用,实例化后的委托对象会将给定的参数传递给它所回调的方法,并去执行方法。 2、委托可以将某一个方法当作另一个方法的参数来进行传递,利用这种方法便可以动态的给方法赋值,避免了在程序中大量的使用If-Else(Switch)语句,使得程序具有...
分类:Windows程序   时间:2015-04-09 23:39:41    阅读次数:168
牛刀小试
刚开始学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
js 界面滚动方法 点击返回到顶部
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
PointF的等于和set.txt
if( MotionEvent.ACTION_DOWN == nActive )         {                  mptBegin = pt ;                      }         else if( MotionEvent.ACTION_MOVE == nActive )         {             mptEnd = ...
分类:其他好文   时间:2015-04-09 17:29:24    阅读次数:148
C Language Study - a=0 and a==0
关于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
【转】SSIS 2012 – Package Configurations Menu Option Missing
原文: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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!