mysql企业常用集群架构
摘要:转自 https://blog.csdn.net/kingice1014/article/details/76020061 1、mysql企业常用集群架构 在中小型互联网的企业中。mysql的集群一般就是上图的架构。WEB节点读取数据库的时候读取dbproxy服务器。dbproxy服务器通过对SQL
阅读全文
posted @
2018-04-27 13:36
代码小王子来了
阅读(1294)
推荐(0)
char 与 string 互转 byte与string互转 list<string>与string[]互转 char与byte互转
摘要:class Program { static void Main(string[] args) { //string类型到数组 char[]数组 string str1 = "123"; string str2 = "abc"; string str3 = "表示表示"; char[] ch1= s
阅读全文
posted @
2018-04-18 11:42
代码小王子来了
阅读(1829)
推荐(0)
控制台程序console输入参数 获取参数
摘要:class Program { static void Main(string[] args) { if (args.Length > 0) Console.WriteLine(args[args.Length - 1]); //cd到控制台编译的debug文件夹 输入 Redis.exe 111
阅读全文
posted @
2018-04-18 10:36
代码小王子来了
阅读(561)
推荐(0)
c# reflect里面的getValue()参数
摘要:Type ty = t.GetType(); PropertyInfo[] PropertyInfo = ty.GetProperties(); string Typename = typeof(T).Name;PropertyInfo [1].GetValue(????) GetValue有两个参
阅读全文
posted @
2018-04-13 10:49
代码小王子来了
阅读(3967)
推荐(1)
主线程 子线程 调用 ThreadId BeginInvoke调用和Invoke调用
摘要:BeginInvoke是异步线程执行 class Program { static int TakeWhile() { int threadid = Thread.CurrentThread.ManagedThreadId; Console.WriteLine("子线程ID:"+threadid);
阅读全文
posted @
2018-04-12 15:58
代码小王子来了
阅读(250)
推荐(0)
C# const, readonly, static readonly
摘要:转: Const 定义的是静态常在对象初始化的时候赋值.以后不能改变它的值.属于编译时常量。不能用new初始化。 Readonly 是只读变量.属于运行时变量.可以在类constructor里改变它的值.不能作用于局部变量。 const 和 static 不能在一起用,它已经是静态的了。 我们都知道
阅读全文
posted @
2018-04-09 22:06
代码小王子来了
阅读(282)
推荐(0)
C# 可空类型(Nullable)
摘要:? : 单问号用于对 int,double,bool 等无法直接赋值为 null 的数据类型进行 null 的赋值,意思是这个数据类型是 NullAble 类型的。(引用类型默认值null) Null 合并运算符( ?? ) Null 合并运算符用于定义可空类型和引用类型的默认值。Null 合并运算
阅读全文
posted @
2018-04-09 17:03
代码小王子来了
阅读(980)
推荐(0)
反射 getMethod 获取方法
摘要:方法必须是public修饰符 才能获取到 否则null static 方法也需要有public修饰
阅读全文
posted @
2018-04-09 16:27
代码小王子来了
阅读(605)
推荐(0)