#region/// /// 从字符串里随机得到,规定个数的字符串. /// /// /// /// private string GetRandomCode(string allChar,int CodeCount) { //string allChar = "1,2,3,4,5,6,...
分类:
其他好文 时间:
2014-06-29 06:14:25
阅读次数:
190
第一种(懒汉,线程不安全):Java代码public class Singleton { private static Singleton instance; private Singleton (){} public static Singleton getInstance() ...
分类:
其他好文 时间:
2014-06-29 06:09:52
阅读次数:
242
using UnityEngine;using UnityEditor;using System;public class AutoSave : EditorWindow { private bool autoSaveScene = true; private bool showMess...
分类:
其他好文 时间:
2014-06-29 00:38:29
阅读次数:
277
private List GetOrganiztions(){var organizations = new List();organizations.Add(new Model.Organization.Organization{Id = "1",Name = "一汽",});organizati...
分类:
Web程序 时间:
2014-06-28 20:19:29
阅读次数:
230
一.虚基类——在继承方式(public / private)class B1: virtual public B0{};作用:防止多重继承中二义性,保证成员唯一标识是核心。【比较】 作用域分辨符:: vs 虚基类 相同:都是为了保证 唯一标识成员 不同:①“::” 在派生类中,同名成员有多...
分类:
编程语言 时间:
2014-06-18 08:52:01
阅读次数:
222
208 Introducing CloudKit
231 Advanced CloudKit
CloudKit的对象粗略分为三个层次:Contriner、Database(分Public和Private)、Record
操作包括存储、获取或修改Record
可以注册关注Record的变化来获得Notification
绝大多数的操作是异步的
存储Record时需要注...
分类:
其他好文 时间:
2014-06-18 07:35:46
阅读次数:
228
/**
* 获取设备采用的时间制式(12小时制式或者24小时制式)
* 注意:
* 在模拟器上获取的时间制式为空
*/
private void getTime_12_24(Context context){
ContentResolver contentResolver = context.getContentResolver();
String time_12_24 ...
分类:
移动开发 时间:
2014-06-18 06:25:10
阅读次数:
216
1. 提供对应的构造方法
//构造器注入
public class Bean6 {
private String name;
private Integer age;
// 服务于构造器注入使用
public Bean6(String name, Integer age) {
super();
this.name = name;
this.age = age;
...
分类:
编程语言 时间:
2014-06-18 06:15:08
阅读次数:
199
1. 提供对应要注入的属性
//setter注入
public class Bean2 {
private String name;
private Integer age;
// 提供要注入的属性对应的setter方法
public void setName(String name) {
this.name = name;
}
public void setAge(I...
分类:
其他好文 时间:
2014-06-18 06:14:27
阅读次数:
209
"个记录", "prev"=>"上一页", "next"=>"下一页", "first"=>"首 页", "last"=>"尾 页"); private $listNum=8; /* * $total * $listRows */ public function __constr...
分类:
其他好文 时间:
2014-06-17 23:36:02
阅读次数:
396