因为C#中没有提供 Switch on Type 的功能,因此要判断类型通常会用一长串的if else,当然这种写法的问题是不够高效,且不够美观。因此 C# 中对常见类型提供了一组枚举值,也就是 TypeCode(这个枚举类型在.NET for Windows App Store 中居然被取消了,大...
分类:
Web程序 时间:
2014-12-24 16:00:56
阅读次数:
159
1、编辑/etc/profile文件添加如下内容:for i in /etc/profile.d/*.sh ; do if [ -r "$i" ]; then if [ "${-#*i}" != "$-" ]; then . "$i" else...
分类:
系统相关 时间:
2014-12-24 14:41:13
阅读次数:
270
SQL 导出表结构到ExcelSELECT 表名 = case when a.colorder=1 then d.name else '' end, 表说明 = case when a.colorder=1 then isnull(f.value,'')...
分类:
数据库 时间:
2014-12-24 13:27:18
阅读次数:
271
l在 SQL 语句中使用IF-THEN-ELSE 逻辑ll使用两种方法:?CASE 表达式:SQL99的语法,类似Basic,比较繁琐?DECODE 函数:Oracle自己的语法,类似Java,比较简介 1 SQL> select ename,job, sal, case job when 'PRE...
分类:
数据库 时间:
2014-12-23 22:27:28
阅读次数:
345
1 function getExplorer() { 2 //IE 3 if (navigator.userAgent.indexOf("MSIE")>=0) 4 { 5 9 }10 //Firefox11 else i...
分类:
编程语言 时间:
2014-12-23 20:51:26
阅读次数:
201
/*
先输入未知数个数。
然后输入n*(n+1)的行列式。
*/
#include
#include
int hanglieshi(int a[],int n)
{
int j,s;
if(n==1) s=a[0];
else
{
for(s=0,j=0; j<n; j++)
{
int yuzishi(...
分类:
编程语言 时间:
2014-12-22 22:49:54
阅读次数:
195
运行环境:VS2013
一、添加对话框背景图片
①插入位图,把生成的空白位图进行替换(xxx.bmp图片的名称和格式与生成的空白位图保持一致)
②查看属性,得到位图ID
③编写代码:
void CMFC_8Dlg::OnPaint()
{
if (IsIconic())
{
....
}
else
{
//CDialogEx::OnPaint();
CPaintD...
分类:
编程语言 时间:
2014-12-22 18:01:36
阅读次数:
186
一、if else:#!/usr/bin/pythonx = int(raw_input('please input:'))if x >= 90: if x >= 95: print 'a+' else: print 'a'elif x >= 80: i...
分类:
编程语言 时间:
2014-12-22 16:12:37
阅读次数:
213
var scrollFunc=function(e){ e=e || window.event; if (e.stopPropagation) e.stopPropagation(); else e.cancelBubble = true; if (e.preve...
分类:
Web程序 时间:
2014-12-22 12:35:05
阅读次数:
187
本文由 书画小说软件 整理发布 内容与本软件无关
更惬意的读、更舒心的写、更轻松的发布
--判断是否存在
if exists(select 1 from master..sysdatabases where name='TestDB')
print 'TestDB存在'
else
print 'TestDB不存在'
--判断表是否存在
if e...
分类:
数据库 时间:
2014-12-22 11:10:05
阅读次数:
128