最近在做烧写工具的优化工作,有一些关于USB的内容需要总结一下其中包括设备的初始化过程和枚举过程。
在枚举的过程中,设备会一直等PC端的状态,当等到reset命令时会对设备进行重新枚举。但是这个reset终端是如何而来呢?
Halt Conditions
A control endpoint may recover from a halt condition upon receiving...
分类:
其他好文 时间:
2014-07-30 20:48:14
阅读次数:
168
Two elements of a binary search tree (BST) are swapped by mistake.
Recover the tree without changing its structure.
Note:
A solution using O(n)
space is pretty straight...
分类:
其他好文 时间:
2014-07-30 17:46:04
阅读次数:
244
leveldb作为一个KV存储引擎将数据持久化到磁盘,而对于一个存储引擎来说在存储过程中因为一些其他原因导致程序down掉甚至数据文件被破坏等都会导致程序不能按正常流程再次启动。那么遇到这些状况以后如何使程序最大程度的恢复数据就是非常重要的一项工作,leveldb也提供了这方面的工作。首先来看rec...
分类:
数据库 时间:
2014-07-29 17:23:52
阅读次数:
409
在unix/linux中使用文件描述符(File Descriptors)来找回被删掉的文件(数据文件or redo log)...
分类:
系统相关 时间:
2014-07-28 16:27:23
阅读次数:
259
1、恢复过程查看的试图:1)v$recovery_file:查看需要恢复的datafile2)v$recovery_log:查看recover需要的redo日志3)v$archived_log:查看已经归档的日志2、手工完全恢复实验一:所有数据文件和控制文件都丢失1)先将控制文件dump到trace中SQL>alterdatabasebackupcontrolfi..
分类:
其他好文 时间:
2014-07-28 03:05:00
阅读次数:
201
If you have lost or forgot root password of RHEL7, you can follow this step to change to a new password, this is different with the RHEL6 single-user mode...
分类:
其他好文 时间:
2014-07-26 02:49:36
阅读次数:
276
// 创建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
MyNotebookinstalledwithdualbootOS:LinuxMint16andWindows7DuringLinuxMint17overwrittingversion16,Iselectedthewindowsbootpartitionasthemintbootloaderdevicebymistake,sowindows7failedtostartaftertheinstallation.torecoverthebootpartition,boottheNBwithwindows7inst..
Two passes: all pointer linking info will be recorded in 1st pass - to hashmap; 2nd pass recover the pointer relationship from hashmap.1A!class Soluti...
分类:
其他好文 时间:
2014-07-23 14:59:26
阅读次数:
209
Go语言没有异常处理机制,大部分情况下只能用panic和recover。在这种机制下,函数体中的被调函数中出现的错误是无法处理的,只能静候崩溃。 今天我发现thrift在生成的RPC代码有空指针BUG导致程序崩溃,这个有BUG...
分类:
其他好文 时间:
2014-07-22 09:00:04
阅读次数:
191