if (Request.QueryString["start"] == null) { for (int i = 0; i < 6; i++) { if (DateTime.Today.AddDays(-i).DayOfWeek.ToString() == "Friday") { strWhere += " and left(convert(varchar,AddTime,21),10)= '" + DateTime.Today.AddDa
先看HashMap的定义: public class HashMap<K,V>extends AbstractMap<K,V>implements Map<K,V>, Cloneable, Serializable HashMap是AbstractMap的子类,实现了Map接口. HashMap() Constructs an empty HashMap with the default initial capacity (16) and the default loa
今天去逛论坛 时发现了一个很有趣的问题: 谁能给我我解释一下这段程序的结果为什么是:2.而不是:3 代码如下: class Test { public int aaa() { int x = 1; try { return ++x; } catch (Exception e) { } finally { ++x; } return x; } public static void main(String[] args) { Test t = new Test(); int y = t.aaa();
遇到 XXX情况 就 XXX 遇不到就 XXX 结束case when …… then …… else …… end 例如一个3条件取值的字段: case when 条件1 then 取值1 when 条件2 then 取值2 else 取值3 end when后接条件语句,then后为字段取值(数值或字符串等都可以,但类型须一致). CASE WHEN 及 SELECT CASE WHEN的用法: Case具有两种格式.简单Case函数和Case搜索函数. 1. 简单Case函数 CASE s
以下两种方法都可以,推荐用方法一! 方法一: 步骤一: yum -y install mysql-server 步骤二:service mysqld start 步骤三:mysql -u root -p Enter password: (默认是空密码,按enter) mysql > CREATE USER 'hive'@'%' IDENTIFIED BY 'hive'; mysql > GRANT ALL PRIVILEGES ON *.* TO 'hive'@'%' WITH GRANT O
两个值互换有以下三种方式: 使用临时变量(此种方法便于理解) x = 10; y = 20; //begin int temp = x; x = y; y = temp; //end; //此时x = 20; y = 10; 利用加减来实现(此种方法只适应于数值比较小的情况,如果数值较大,会超界) x = 10; y = 20; //begin x = x + y ; y = x - y; x = x - y; //end; //此时x = 20; y = 10; 利用位运算实现(不用考虑数值大