第一种格式public static void if1(){ int x = 3; //if后面必须是条件表达式结果为boolean类型 if(x>1){ System.out.println("yes"); } ...
分类:
其他好文 时间:
2014-07-16 21:01:54
阅读次数:
140
在Activity文件中加入下面的函数,实现点击空白处隐藏键盘: 1 @Override 2 public boolean onTouchEvent(MotionEvent event) 3 { 4 if(event.getAction()==Moti...
分类:
移动开发 时间:
2014-07-16 20:23:36
阅读次数:
147
一个被人写滥了的小程序,新手学习,Pascal By Chaobs初学者可以用它来学习随机函数的运用,当然你完全可以自己写一个随机函数。var player1,player2:longint; a,b,l,o,i,v:longint; w:boolean;begin randomize; write...
分类:
其他好文 时间:
2014-07-16 19:36:43
阅读次数:
139
编程世界的两个基本元素:数据和代码。数据天生文静,欲在保持;代码天生活泼,欲在改变。面向对象的思想首次把数据和代码结合成统一体,并以一个简单的对象概念呈现给编程者。JavaScript中简单数据只有undefined、null、boolean、number和string五种,复杂数据只有object...
分类:
编程语言 时间:
2014-07-14 10:23:02
阅读次数:
261
// 黑白效果函数 public static Bitmap changeToGray(Bitmap bitmap,boolean r, boolean g, boolean b) { int width, height; width = bitmap.getWidth(); height...
分类:
其他好文 时间:
2014-07-14 10:09:38
阅读次数:
180
对back键设置监听器,重写Activity.onKeyDown()方法即可实现功能;程序如下:long keydowmtime=0;//按键按下时的时间long eventtime=0;//事件发生的时间 @Override public boolean onKeyDown(int k...
分类:
其他好文 时间:
2014-07-13 21:28:21
阅读次数:
232
<% // 以下为java程序片
boolean booleanTemp=true;
Boolean BooleanTemp=new Boolean(false);
byte byteTemp=80;
Byte ByteTemp=new Byte(byteTemp);
char charTemp='c';
...
分类:
Web程序 时间:
2014-07-13 18:59:03
阅读次数:
302
一;delphi 快速导出exceluses ComObj,clipbrd;function ToExcel(sfilename:string; ADOQuery:TADOQuery):boolean;const xlNormal=-4143;var y : integer; tsList : TS...
分类:
其他好文 时间:
2014-07-13 13:13:57
阅读次数:
243
相关控件初始化方法:showSmscPref private voidshowSmscPref() { int count = MSimTelephonyManager.getDefault().getPhoneCount(); boolean airplaneModeOn = Settings.S...
分类:
移动开发 时间:
2014-07-13 10:58:45
阅读次数:
311
setContentView(View contentView);顾名思义就是给PopupWindow设置内容的。值得注意的是如果当前PopupWindow处于isShowing,该方法是不会被调用成功的(当然基本也没人这么做)。setFocusable(boolean focusable);如果f...
分类:
移动开发 时间:
2014-07-12 14:55:27
阅读次数:
228