摘要:
设计模式 单例设计模式 饿汉式设计模式 步骤 将构造器私有化(不会new出新的对象,防止在类的外部创建,保证唯一性) 类内部创建静态实例(静态保证唯一性,类加载时唯一创建) 类内部提供一个公共的static方法返回实例 public class Main { public static void m 阅读全文
摘要:
viewpager滑动时中间的一闪而过 开发时遇到了这个问题,百思不得其解,后来查看源码 /** * Set the currently selected page. * * @param item Item index to select * @param smoothScroll True to 阅读全文
摘要:
-- 多子句查询顺序 SELECT column1, column2,... FROM mytable GROUP BY columnx HAVING conditionx ORDER BY columnx LIMIT startx, rowsx; -- 统计各个部门平均工资,并且大于1000, 并 阅读全文