using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Data.Entity; using System.Data.Entity.Core.Objects; using System.Data.Entity.Infrastructure; using System.Data.Entity.Migrations; using System…
掌握满足单例模式的必要条件----三私一公. ①私有的构造方法-为了防止在类外使用new关键字实例化对象. ②私有的成员属性-为了防止在类外引入这个存放对象的属性. ③私有的克隆方法-为了防止在类外通过clone成生另一个对象. ④公有的静态方法-为了让用户进行实例化对象的操作. DB类及相关表操作: class mysql_db{ //1.私有的静态属性 private static $dbcon = false; //2.私有的构造方法 private function __construc…
转载自:http://blog.csdn.net/shiqi_614/article/details/8228102 之前做了些线段树相关的题目,开学一段时间后,想着把它整理下,完成了大牛NotOnlySuccess的博文“完全版线段树”里的大部分题目,其博文地址Here,然后也加入了自己做过的一些题目.整理时,更新了之前的代码风格,不过旧的代码仍然保留着. 同样分成四类,不好归到前四类的都分到了其他.树状数组能做,线段树都能做(如果是内存限制例外),所以也有些树状数组的题目,会标示出来,并且放…
@ 目录 一.前言(可忽略) 二.String变量的认知 三.String类的构造方法 四.String类的基本方法 4.1 toString()方法 4.2 equals()方法 4.3 equalsIgnoreCase()方法 4.4 getBytes()方法 4.5 indexOf()方法 4.6 lastindexOf()方法 4.7 charAt( )方法 4.8 compareTo()方法 4.9 contains()方法 4.10 startsWith()方法 4.11 endsW…
class route{ /** @var null 模块 */ private static $module = null; /** @var null 控制器 */ private static $controller = null; /** @var null 方法 */ private static $action = null; /** @var 控制器url */ private static $controllerPath; /** * route constructor. * @…
// //AliexpressEntities MyaliexpressEntities 为了事物一致性 在别的方法里面传过来的 实质还是 (  AliexpressEntities aliexpressEntities = new AliexpressEntities();) 和 userBll.GetUser 方法里面的一样 public YH_AmountAccount AmountAccountSaveChanges(AliexpressEntities MyaliexpressEnti…
原文链接:https://www.entityframeworktutorial.net/code-first/code-first-from-existing-database.aspx EF 6 Code-First系列文章目录: 1 翻译系列:什么是Code First(EF 6 Code First 系列) 2.翻译系列:为EF Code-First设置开发环境(EF 6 Code-First系列) 3.翻译系列:EF Code-First 示例(EF 6 Code-First系列) 4…
原文地址:http://www.entityframeworktutorial.net/basics/context-class-in-entity-framework.aspx EF中的上下文类是一个继承自DbContext的类,EF Core中也是这样.EF中的上下文类是一个重要的类,代表了一个与底层数据库的会话. 下面的SchoolContext类就是一个上下文类的例子: 上面的例子中,SchoolContext类继承自DbContext,这使它成为了一个上下文类.代码中同样包含了Stud…
基于Dapper二次封装了一个易用的ORM工具类:SqlDapperUtil,把日常能用到的各种CRUD都进行了简化封装,让普通程序员只需关注业务即可,因为非常简单,故直接贴源代码,大家若需使用可以直接复制到项目中,该SqlDapperUtil已广泛用于公司项目中. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;…
Timber(对Log类封装的一个工具) https://blog.csdn.net/hzl9966/article/details/51314137 https://www.jianshu.com/p/555c382a9d45 https://www.jianshu.com/p/39834be3cb6c Timber只有一个类文件,可以单独把它复制出来放项目里,也可以通过Gradle引用: compile 'com.jakewharton.timber:timber:2.7.1' Timber…