关于or,and的使用,查资料得知:and相当于then,or相当于else
下面通过举例来理解这两个关键字的使用:
比如:【1】
$isRight or $a=1000;
他与下面这段代码是等价的:
if(isRight==true)
{
}
else
{
$a=1000;
}
【2】
$update and $db_factory=1;
等价于:
if($update=...
分类:
Web程序 时间:
2014-05-10 09:41:00
阅读次数:
452
建立AIDL服务要比建立普通的服务复杂一些,具体步骤如下: (1)在Eclipse
Android工程的Java包目录中建立一个扩展名为aidl的文件。该文件的语法类似于Java代码,但会稍有不同。详细介绍见实例52的内容。
(2)如果aidl文件的内容是正确的,ADT会自动生成一个J...
分类:
移动开发 时间:
2014-05-08 21:01:04
阅读次数:
408
1.Subclipsehttp://subclipse.tigris.org/update_1.8.xEnabled2.propedithttp://propedit.sourceforge.jp/eclipse/updates/Enabled3.
Mavenhttp://download.ecli...
分类:
系统相关 时间:
2014-05-07 18:47:03
阅读次数:
345
使用ListView显示一个长的项列表
1、新建一个名为“BasicView5”的Android项目;
2、修改BasicView5.java文件,修改后的程序如下:
package com.example.basicview5;
import android.os.Bundle;
import android.app.Activity;
import android.app.ListAc...
分类:
移动开发 时间:
2014-05-07 08:56:38
阅读次数:
447
【Question】
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the p...
分类:
其他好文 时间:
2014-05-07 04:17:18
阅读次数:
259
一、问题引出
① 假设当当网上用户下单买了本书,这时数据库中有条订单号为001的订单,其中有个status字段是’有效’,表示该订单是有效的;
② 后台管理人员查询到这条001的订单,并且看到状态是有效的;
③ 用户发现下单的时候下错了,于是撤销订单,假设运行这样一条SQL: update order_table set status = ‘取消’ whe...
分类:
数据库 时间:
2014-05-07 03:53:58
阅读次数:
450
在新的ADT中新建一个项目,会生成fragment_main.xml文件,看它的内容似乎是代替了原本activity_main.xml的作用。
但由于它的存在,MainActivity.java 中也生成了许多“奇怪”的代码。
由于目前水平还不足以使用这些新的特性。为了维持以往的开发环境可以在创建新项目时,作出以下修改。
在新建项目向导中的 Create Activity 页...
分类:
其他好文 时间:
2014-05-07 03:28:53
阅读次数:
261
For a given positive integer n, please find the smallest positive integer x that we can find an integer y such that y^2 = n +x^2.
Input
The first line is an integer T, which is the the...
分类:
其他好文 时间:
2014-05-06 19:21:10
阅读次数:
290
Android-搭建简单服务端+ListView异步加载数据2014年5月6日 本篇博文带给大家的是教大家如何在MyEclipse中搭建一个服务端,并通过手机端与其通信,异步加载数据。 笔者使用的是MyEclipse,各位也可以直接用Eclipse创建Java Web项目,谷歌提供的ADT Bundle是不能创建Web项目,读者可以下载Eclipse For JaveEE Developer这个I...
分类:
移动开发 时间:
2014-05-06 14:45:24
阅读次数:
847
如何制作Win8系统镜像备份?Win8.1系统镜像备份如何还原?虽然Win8/Win8.1引入全新系统初始化功能,但该功能一般仅限于品牌电脑。普通用户该如何制作Win8系统镜像备份?最新版Win8.1
Update是否也可以制作系统镜像备份?下面,IT之家带大家使用wbAdmin命令手动制作系统镜像...