// 在thin pool中创建一个新thin device
// 调用路径:driver.Create()
1.1 func (devices *DeviceSet) AddDevice(hash, baseHash string) error {
//查找父device
baseInfo, err := devices.lookupDevice(baseHash)
if err != n...
分类:
移动开发 时间:
2014-07-26 02:53:26
阅读次数:
347
// 创建thin pool
// 调用路径:NewDeviceSet->initDevmapper->createPool
1.1 func createPool(poolName string, dataFile, metadataFile *os.File, poolBlockSize uint32) error {
//通过task封装与libdevmapper的交互
task, er...
分类:
移动开发 时间:
2014-07-26 02:45:06
阅读次数:
297
D. Going in Cycle!!Time Limit: 3000msMemory Limit: 131072KB64-bit integer IO format:%lld Java class name:MainYou are given a weighted directed graph w...
分类:
其他好文 时间:
2014-07-26 01:00:36
阅读次数:
209
// thin device数据结构
type DevInfo struct {
Hash string `json:"-"`
DeviceId int `json:"device_id"`
Size uint64 `json:"size"`
TransactionId uint64 `json:"tran...
分类:
移动开发 时间:
2014-07-25 11:02:35
阅读次数:
549
The Unique MST
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 19941
Accepted: 6999
Description
Given a connected undirected graph, tell if its min...
分类:
其他好文 时间:
2014-07-24 23:36:24
阅读次数:
403
转自:http://blog.csdn.net/ccccdddxxx/article/details/78430701、要弄清楚这个问题,首先需要弄明白什么是implicit(隐藏) intent什么是explicit(明确) intent。Explicit Intent明确的指定了要启动的Acit...
分类:
移动开发 时间:
2014-07-24 22:27:52
阅读次数:
211
场景webdriver中可以设置很多的超时时间implicit_wait。识别对象时的超时时间。过了这个时间如果对象还没找到的话就会抛出异常代码ff = webdriver.Firefox()ff.implicitly_wait(10) # secondsff.get("http://somedom...
分类:
其他好文 时间:
2014-07-23 15:38:19
阅读次数:
227
implicit 关键字用于声明隐式的用户定义类型转换运算符。 如果可以确保转换过程不会造成数据丢失,则可使用该关键字在用户定义类型和其他类型之间进行隐式转换。参考戳此explicit 关键字用于声明必须使用强制转换来调用的用户定义的类型转换运算符。参考戳此有一点要注意的是,一个类中不能同时写显式和...
分类:
其他好文 时间:
2014-07-23 15:36:49
阅读次数:
220
在类型转换时常会遇到隐式转换和显式转换。那我们自定义的类型要如何去定义隐式转换和显式转换?我们来看一段代码
public class Rational
{
private Int32 _inner_int = 0;
public Rational()
{
}
public Rational(Int32...
分类:
其他好文 时间:
2014-07-23 13:24:56
阅读次数:
177
题意:
要求在一个特殊的图上找最大匹配,该图特点是:无向图,每个节点度数为3,是一个边双连通分量(the graph is 2-edge-connected (that is, at least 2 edges need to be removed in order to make the graph disconnected) 这一点是这样理解的把。。)
思路:
一般想法就直接建图求最大匹...
分类:
其他好文 时间:
2014-07-23 13:22:07
阅读次数:
207