在串口编程中,肯定需要用到RCR验证码来判断接受到的数据是否正确,下面是百度的RCR验证码,测试正确的。 1 private void CalculateCRC(byte[] pByte, int nNumberOfBytes, out byte hi, out byte lo) 2 ...
分类:
其他好文 时间:
2014-10-04 12:42:06
阅读次数:
190
题目地址:HDU 3172
带权并查集水题。每次合并的时候维护一下权值。注意坑爹的输入。。
代码如下:
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define LL lo...
分类:
其他好文 时间:
2014-10-02 17:45:43
阅读次数:
158
package?main?
import?(
"fmt"
"sync"
"runtime"
)
var?counter?int?=?0
func?Count(lock?*sync.Mutex)?{
lock.Lock()
counter++
fmt.Println(counter)
lock.Unlock()
}
func?main()?{
lo...
分类:
其他好文 时间:
2014-10-01 00:32:30
阅读次数:
389
现象如下所示:[root@HNMH~]#ll?荤.?.92-rw-r--r--1rootroot14499?.2111:41anaconda-ks.cfgdrwxr-xr-x2rootroot409611?.1316:47Desktop-rw-r--r--1rootroot588379?.2111:41install.log-rw-r--r--1rootroot59129?.2111:41install.log.syslog本地支持字符集如下:[root@HNMH~]#lo..
分类:
系统相关 时间:
2014-09-29 12:40:20
阅读次数:
177
1.查看网络接口命令:ifconfigeth*(0代表第一块网卡)2.LO:代表本地回环地址127.0.0.1,通常用于对本机的网络测试3.在ifconfig命令中:HWaddr代表MAC地址,Bcast代表一个网段的主机地址,例:(192.168.1.255),Mask代表子网掩码4.Hostname:查看主机名称5.Router(-n)命令..
分类:
系统相关 时间:
2014-09-29 04:37:47
阅读次数:
274
vmware虚拟机复制后,在同一网段下连网,复制后用ipconfig一般能看到lo 或者lo 、eth1此时: /etc/sysconfig/network-scrips/下的ifcfg-eth0还和原来虚拟机中的一样,没变。DEVICE=eth0TYPE=EthernetUUID=e7fbb0eb...
分类:
其他好文 时间:
2014-09-28 20:02:45
阅读次数:
164
mysql主键设置成auto_increment时,进行并发性能测试出现主键重复Duplicate entry 'xxx' for key 'PRIMARY'
解决方法:
在my.cnf的[mysqld]片段中添加设置innodb_autoinc_lock_mode=0
同时注意调大jdbc的活跃链接数,如设置 jdbc.maxActive=300,因为设置innodb_autoinc_lo...
分类:
数据库 时间:
2014-09-28 19:51:05
阅读次数:
209
http://www.ibm.com/developerworks/cn/java/j-lo-javawebhiperf1/http://www.ibm.com/developerworks/cn/java/j-lo-javawebhiperf2/
分类:
Web程序 时间:
2014-09-26 18:58:58
阅读次数:
214
Linux命令基础.实验目标熟练基础命令.实验步骤Linux命令行基础[root@localhost~]#ls//查看列表目标内容[root@localhost~]#ls-l//以长格式显示[root@localhost~]#ls-l/boot///显示boot内容[root@localhost~]#ls-l/boot/root//[root@localhost~]#ls--color//显示当前目录[root@lo..
分类:
系统相关 时间:
2014-09-26 08:19:08
阅读次数:
410
一、基础示例 WF4 默认支持SQLServer的持续化,首先要执行目录C:\Windows\Microsoft.NET\Framework\v4.0.30319\SQL\en下的脚本:SqlPersistenceService_Schema.sqlSqlPersistenceService_Lo....
分类:
其他好文 时间:
2014-09-25 21:09:07
阅读次数:
252