当需要使用usb bulk传输,想让设备像串口通讯那样和PC主机通信, 通常需要自己做一个PC端的驱动,比较麻烦. 为避免在pc上编写usb设备驱动的麻烦,可以将设备做成mass storage 类的设备,使用通用的驱动. 在通讯之前设备端需要先做两件事: 1,实现mass storage...
分类:
其他好文 时间:
2014-08-19 16:24:04
阅读次数:
268
1 /** 2 * 面向对象(运算类) 3 * 简易计算器 4 * @author Monica 5 * 6 */ 7 public class Operation { 8 private double numberA = 0; 9 private double numb...
分类:
其他好文 时间:
2014-08-19 12:43:14
阅读次数:
162
【现象】有终端输入用户名,密码后,桌面环境启动失败。
【报错】log文件中显示:
(EE)
Fatal server error:
(EE) xf86OpenConsole: VT_ACTIVATE failed: Operation not permitted
【原因】由xorg升级引起,具体描述如下:
FS#41257 - [xorg-server] take ad...
分类:
系统相关 时间:
2014-08-19 11:03:44
阅读次数:
249
std::map插入已存在的key时,key对应的内容不会被更新,如果不知道这一点,可能会造成运行结果与预期的不一致“Because element keys in amapare unique, the insertion operation checks whether each inserte...
分类:
其他好文 时间:
2014-08-19 10:38:03
阅读次数:
226
Edit Distance
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)
You have the following 3 operati...
分类:
其他好文 时间:
2014-08-18 20:35:02
阅读次数:
206
http://acm.hdu.edu.cn/showproblem.php?pid=3397
线段树很好的题。涉及到的知识点:lazy操作,区间合并。
有五种操作:
0 a b 将[a,b]变为0
1 a b 将[a,b]变为1
2 a b 将[a,b]取反
3 a b 输出[a,b]的1的个数
4 a b 输出[a,b]内最长的连续1的个数
对区间的操作与poj 3225...
分类:
其他好文 时间:
2014-08-18 20:34:52
阅读次数:
362
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)...
分类:
其他好文 时间:
2014-08-18 16:21:57
阅读次数:
148
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have t...
分类:
其他好文 时间:
2014-08-18 12:20:34
阅读次数:
148
昨天在做存储迁移的时候,对ASM磁盘组的东西进行操作时,出现了如标题的错误。经查资料,发现原因如下: 如磁盘组是使用asmca图形化工具创建,则compatible.asm默认设置就已经为11.2,如使用CREATE DISKGROUP这个SQL命令创建,则默认设置为10.1,需要手动修改。因...
分类:
其他好文 时间:
2014-08-18 09:08:13
阅读次数:
233
在做界面程序时,常常需要一些数据类,界面元素通过绑定等方式显示出数据,然而由于UI线程不是线程安全的,一般都需要通过Invoke等方式来调用界面控件。但对于数据绑定bindingList而言,没法响应listchang事件,导致后端的grid等控件不能更新数据。废了好大的劲终于找到一个UIBindi...
分类:
编程语言 时间:
2014-08-17 16:51:32
阅读次数:
432