switch()适用byte、short、int、char
如果case 中不加break,会一直执行,知道},或break,结束
如:
public class Main {
public static void main(String[] args)
{
//int x = 5, y = 4,xx = 6;
char a = 'f';
switch(a)
...
分类:
编程语言 时间:
2014-09-06 17:26:43
阅读次数:
246
setnx("Lock:{$key}", self::$expire))) { break; } if($acquired = (self::recover($key))) { ...
分类:
其他好文 时间:
2014-09-06 17:20:43
阅读次数:
294
一、语法 标示符:第一个字符必须是字母、下划线或美分符号。 不能把关键字、保留字、true、false、null作为标示符。 严格模式 "use strict"二、关键字和保留字 break deletefunction return typeof case...
分类:
编程语言 时间:
2014-09-06 02:11:42
阅读次数:
233
Aliases?for?Other?Command
Alias Short for ... Alias Short for ...
bt backtrace i info
c continue l list
cont ...
分类:
数据库 时间:
2014-09-05 22:31:52
阅读次数:
283
flag = 1while 1: flag = flag + 1 if flag > 10: break try: f = open("file-not-exists", "r") except IOError,e: print(...
分类:
编程语言 时间:
2014-09-05 19:46:31
阅读次数:
232
OWA离线功能是Exchange2013中的一个新功能OfflineAccessisanewfeatureinExchange2013OutlookWebApp(OWA)thatallowsyoutocontinueworkingonyouremailswhiledisconnectedfromtheInternet.相关链接说明http://office.microsoft.com/en-us/support/using-outlook-web-app-offline-H..
分类:
移动开发 时间:
2014-09-05 16:23:22
阅读次数:
296
1、lua中的标识符可以是由任意字母、数字和下划线构成的字符串,但不能以数字开头。2、lua将通常类似"_VALUE"的标识符作为保留标识符3、lua的保留字 and break do else elseif end false for function if in loacl nil not or...
分类:
其他好文 时间:
2014-09-05 11:20:51
阅读次数:
194
#include
using namespace std;
int find2(int A[],int n)
{
int high=n-1;
int low =0;
int mid;
while(A[high]<=A[low])
{
if(high-low==1)
{
mid=high;
break;
}
...
分类:
其他好文 时间:
2014-09-04 22:18:50
阅读次数:
216
大于1的自然数不是素数就是合数,只要能被素数整除就不是素数,据此逐个打印素数,可不调用库函数sqrt。#include<stdio.h>intmain(void){inti,j;intprime[50]={2,3,5,7,11,13,17,19};intk=8;for(i=20;i<201;++i){for(j=0;j<k;++j){if(i%prime[j]==0)break;}if(j==k..
分类:
编程语言 时间:
2014-09-02 18:00:15
阅读次数:
186
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.
Return all such possible sentences.
For example, given
s = "...
分类:
其他好文 时间:
2014-09-02 17:52:35
阅读次数:
191