CASE WHEN 条件1THEN 结果1 WHEN 条件2THEN 结果2 WHEN 条件3THEN 结果3 WHEN 条件4THEN 结果4......... WHEN 条件NTHEN 结果N ELSE结果XENDCase具有两种格式。简单Case函数和Case搜索函数。--简单Case函数CA...
分类:
数据库 时间:
2015-03-18 15:23:39
阅读次数:
175
activity按back键 消失但是不销毁的实现重新定义finish()方法: @Override public void finish() { // TODO Auto-generated method stub if(!BackState){ setBackTask(false); }else...
分类:
其他好文 时间:
2015-03-18 13:52:57
阅读次数:
121
以前在aspnet中一直是Response.End();在这之后的当前请求应有的代码都不会执行了,但是在aspnetmvc中,就算调用Response.End();还是会执行!如果你在action中的逻辑需要中断,你可以变通的通过逻辑判断来中断,比如if(ok){ //应有的逻辑}else{ ...
分类:
Web程序 时间:
2015-03-18 12:17:46
阅读次数:
207
var explorer = window.navigator.userAgent; if (explorer.indexOf("MSIE") >= 0) { alert('IE'); } else if (explorer.indexOf("Firefox") >= 0)...
分类:
Web程序 时间:
2015-03-18 12:06:18
阅读次数:
129
flow controlthe if statementsyntax :IF condition1 THEN action1;[ELsIF condition2 THEN action2;[ELSE action3;]END IF;eg :IF condition THEN SQL or PL-SQ...
分类:
数据库 时间:
2015-03-17 23:31:31
阅读次数:
217
// 判断当前页面是否是顶层页面function topRecursion(page) { if (page == top) { return page; } else { return topRecursion(page.parent); }}
分类:
其他好文 时间:
2015-03-17 19:56:45
阅读次数:
105
functionjudgeShowOrHide(){
alert($("#id").is(‘:visible‘));//判断是否显示显示:true隐藏:false
if($("#id").is(‘:hidden‘)){
alert("隐藏了");
//处理业务
}else{
alert("显示");
//处理业务
}
}functiontargetBigImage(){
jQuery(‘.x_imgnewa‘).each(function(index){
if..
分类:
Web程序 时间:
2015-03-17 18:12:08
阅读次数:
130
for和while退出循环时,执行else语句元组(tuples):圆括号括起来,逗号间隔,数据类型可以相同,也可以是不同类型。元组和列表的区别:元组可以修改,列表不可以修改eg1:tup=(1,2,3,4,5)fortintup:printtelse:print‘outfor‘eg2:查看帮助:>>>help(file.read)----..
分类:
其他好文 时间:
2015-03-17 02:11:08
阅读次数:
117
Riding the Fences
Farmer John owns a large number of fences that must be repairedannually. He traverses the fences by riding a horse along each andevery one of them (and nowhere else) and fixing th...
分类:
其他好文 时间:
2015-03-16 21:27:15
阅读次数:
148
水题
#include
using namespace std;
int main()
{
int n,T;
bool flag;
cin>>T;
while(T--)
{
cin>>n;
flag=false;
while(n>1)
{
if(n%2==0) n/=2;
else
{
if(!flag)
{
c...
分类:
其他好文 时间:
2015-03-16 21:24:04
阅读次数:
121