--------------输出----------------print 'hello world'--以文本形式输出select 'hello world'--以网格形式输出,也可以设置成以文本形式输出print 'abc'+'cde'print 3+5print 'ab'+5--出错,'ab'...
分类:
其他好文 时间:
2014-07-27 10:42:52
阅读次数:
275
GC 中最繁杂的 mark 部分已经谈完了。剩下的东西很简单。今天一次可以写完。sweep 分两个步骤,一个是清理字符串,另一个是清理其它对象。看代码,lgc.c 573 行:case GCSsweepstring: { lu_mem old = g->totalbytes; s...
分类:
其他好文 时间:
2014-07-27 09:58:12
阅读次数:
383
I.判断语句:1.if语句:A.If(){//执行语句;}B.if(){//执行语句;}else{//执行语句;}C.if(){//执行语句;}else if{//执行语句;}……else{//执行语句;}2.switch语句:switch(表达式){case 常量表达式1:语句1;case 常量表...
分类:
其他好文 时间:
2014-07-26 14:00:44
阅读次数:
194
Swift采用类同c语言的流程控制语句,if, for, for-in, while, do-while , switch, break, continue .Swift语言的Switch语句自动添加了break效果,这样你可以不用没个case后面再写break.同c语言不同,swift语言的if ...
分类:
其他好文 时间:
2014-07-26 00:04:56
阅读次数:
365
use Omniture select VLR.YearMonth ,VLR.VisitorID ,VLR.ConsultantID ,VLR.Visits ,CL.LevelID ,CL.[Status] ,IfNew = case when (VLR.YearMonth=startmont...
分类:
其他好文 时间:
2014-07-25 16:47:11
阅读次数:
223
LVSdirector负载均衡器增加IPVSADM脚本
#vimdirector.sh
#!/bin/bash
#chkconfig:-8866
#description:thisscripttoaddlvsIP
VIP=192.168.0.254
DIP=192.168.0.100
RIP1=192.168.0.101
RIP2=192.168.0.102
PORT=80
SCHELE=wrr
LOCKFILE=/var/lock/subsys/ipvsadm
case$1in
st..
分类:
其他好文 时间:
2014-07-25 11:36:02
阅读次数:
8623
Length of Last WordGiven a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.I...
分类:
其他好文 时间:
2014-07-25 02:26:04
阅读次数:
322
#include
main()
{
int x=1,y=0,a=0,b=0;
switch(x)
{
case 1:
switch(y)
{
case 0:a++;break;
case 1:b++;break;
}
case 2:a++;b++;break;
case 3:a++;b++;
}
printf("%d,%d\n",a,b);
}...
分类:
其他好文 时间:
2014-07-24 23:06:53
阅读次数:
217
#include
int q1,q2,q3;
void fun(long n)
{
q1=q2=q3=0;
while(n)
{
switch(n%10)
{
case 1:q1++;break;
case 2:q2++;break;
case 3:q3++;
}
n/=10;
}
}
main()
{
long n=123451123;
fun(n);
...
分类:
其他好文 时间:
2014-07-24 23:04:43
阅读次数:
271
1,case用法SELECT CASE WHEN T.FLAG='0' THEN T.USERID WHEN T.FLAG='1' THEN T.ORGID ELSE NULLEND AS '标识'FROM XTXMXX T2,decode用法--如果FLAG等于1,则转为USERID,如果...
分类:
数据库 时间:
2014-07-24 22:44:23
阅读次数:
281