sql语言中有没有类似C语言中的switch case的语句?? 没有,用case when 来代替就行了. 例如,下面的语句显示中文年月 select getdate() as 日期,case month(getdate()) when 11 then '十一' when 12 th...
分类:
数据库 时间:
2014-07-11 21:21:53
阅读次数:
247
本文转自:http://blog.maartenballiauw.be/post/2009/05/20/ASPNET-MVC-Domain-Routing.aspxASP.NET MVC Domain Routing 20. May 2009 08:23 / maartenba / ASP....
分类:
Web程序 时间:
2014-07-11 18:11:11
阅读次数:
260
分区:[root@code-svn ~]# fdisk /dev/sdbWARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c')...
分类:
系统相关 时间:
2014-07-09 16:41:32
阅读次数:
295
1,Switch 语句内的表达式必须为: byte ,char ,short ,int 这四种之一。
2,使用final关键字修饰一个变量时,是指引用变量不能变,引用变量所指向的对象中的内容还是可以改变的。
例如,对于如下语句:
final StringBuffer a=new StringBuffer("immutable");执行如下语句将报告编译期错误:
a=new StringBu...
分类:
编程语言 时间:
2014-07-09 12:13:32
阅读次数:
231
前几天需要实现一个以太网功能就看了以太网的源码部分,看见了源码部分在消息处理时,发现有一些不同的地方:
平时我在处理消息时:
1、首先创建Handler对象:
private Handler handler = new Handler(){
public void handleMessage(Message msg) {
switch (...
分类:
移动开发 时间:
2014-07-09 10:58:57
阅读次数:
384
//函数原型:版本linux-3.0.8
struct task_struct *__switch_to(structtask_struct *,
struct thread_info *, struct thread_info *);
#define switch_to(prev,next,last) ...
分类:
其他好文 时间:
2014-07-09 09:28:09
阅读次数:
362
TCP创建socket:1 int socket(int domain, int type, int protocol);AF = Address FamilyPF = Protocol FamilyAF_INET IPv4 Internet protocols ip(7)AF_INET6 IPv6...
分类:
其他好文 时间:
2014-07-08 22:39:05
阅读次数:
352
简单工程模式:对具有相同功能的类进行抽象得到父类,这些类继承它成为子类。为了对这些功能进行选择,建立一个工厂类进行判断,其中运用一个Switch语句。
优点:结构简单、操作单一。
缺点:需要事先考虑周到,操作时需准确。由下的“功能扩展”中可知,易违背设计模式六大原则中的“开放-封闭原则”。
功能扩展:若增添功能方法,则需另添加一个类,在运算类中添加的相应的方法,再修改客户端中的Switch语句中的case项。
工厂方法模式(Factory Method):先建立一个...
分类:
其他好文 时间:
2014-07-08 14:34:46
阅读次数:
211
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace C_编辑基础
{
//枚举的意义就是限定变量的取值范围
enum gender{Male,Female,Unkown}; //声明一个类型,它是枚举类型(定义一个枚举),这个枚举有三个值。...
分类:
其他好文 时间:
2014-07-08 13:38:36
阅读次数:
191
Laravel是个很强大的PHP框架,它剔除了开发中Web开发中比较痛苦的过程,提供了验证(authentication),路由(routing),Session和缓存(caching)等开发过程中常用到的工具或者功能。 Laravel的配置都存放在app/config中。 里面所有的*.php都按...
分类:
其他好文 时间:
2014-07-08 11:55:36
阅读次数:
196