break 用于跳出循环 return 用于停止方法 ...
分类:
其他好文 时间:
2017-01-22 16:45:15
阅读次数:
105
ARC单例模式的实现 使用alloc方法初始化一个类的实例的时候,默认是调用了 allocWithZone 的方法。 重写allocWithZone方法\ //重写allocWithZone:方法,在这里创建唯一的实例(注意线程安全) static id _instance; +(instancet ...
分类:
其他好文 时间:
2017-01-22 16:37:04
阅读次数:
217
三种循环的区别 do while 是至少要循环一次 for 和 while 循环必须判断条件是否成立,然后决定是否执行循环语句 while循环适合于不明确循环次数的情况下 for循环适合于明确循环次数 for循环在执行完成后,会释放掉条件判断里面的变量,这个变量已完全在内存中消失,再次使用,必须先声 ...
分类:
其他好文 时间:
2017-01-22 16:23:40
阅读次数:
126
参考网站: http://www.cnblogs.com/wzben/p/5930538.html (第一次) http://wangjunle23.blog.163.com/blog/static/117838171201323031458171/ (分析) http://blog.csdn.ne... ...
分类:
Windows程序 时间:
2017-01-22 16:22:27
阅读次数:
3200
如何让孩子爱上设计模式 —— 7.适配器模式(Adapter Pattern)标签: 设计模式初涉概念相关定义:适配器模式把一个类的接口变换成客户端所期待的另一种接口,从而
使原本因接口不匹配而无法...
分类:
其他好文 时间:
2017-01-22 14:01:54
阅读次数:
147
1:byte[]转换为InputStream InputStream sbs = new ByteArrayInputStream(byte[] buf); 2:InputStream转换为InputStreambyte[] ByteArrayOutputStream swapStream = ne ...
分类:
其他好文 时间:
2017-01-22 13:42:03
阅读次数:
178
参考网站: http://blog.163.com/yang_jianli/blog/static/1619900062010391127338/ (Linux配置查看命令) https://developer.nvidia.com/cudnn (cuDNN) http://developer.nv... ...
分类:
其他好文 时间:
2017-01-22 11:53:57
阅读次数:
311
const的值是在编译期间确定的,因此只能在声明时通过常量表达式指定其值。 而static readonly是在运行时计算出其值的,所以还可以通过静态构造函数来赋值。 static readonly MyClass myins = new MyClass();(对) static readonly ...
分类:
其他好文 时间:
2017-01-22 09:44:31
阅读次数:
148
1 package com.imooc.base; 2 3 public class WrongWayStopThread extends Thread { 4 5 public static void main(String[] args) { 6 WrongWayStopThread threa... ...
分类:
编程语言 时间:
2017-01-22 07:55:00
阅读次数:
241