08 2022 档案
摘要:// 计算冗余码 public static String getCrc(String dataStr, String gxStr){ int data = Integer.valueOf(dataStr, 2); int gx = Integer.valueOf(gxStr, 2); int da
阅读全文
摘要:// 计算校验位 public static Integer calculateParity(String data){ Integer parity = null; int count = 0; int[] bits = new int[8]; data = data.replace("[",""
阅读全文
摘要:// 检验海明 public static String getHmCheckCode(String src){ String[] source = src.split(""); int n = source.length; int x = 0; while((1<<x)-1<n) x++; byt
阅读全文
摘要:// 计算海明码的校验位 public static String getHmCode(String src, int mode) { /* 第一步先确定需要多少位校验码。 * 设数据有n位,校验码有x位。则校验码一共有2^x种取值方式。 * 其中需要一种取值方式表示数据正确,剩下2^x−1种取值方
阅读全文
摘要:// 计算检验通过数据个数和出错数据个数和未检出数据个数 public static void calCWUncheckedDataCount(){ correctDataCount = 100; wrongDataCount = 0; uncheckedDataCount = 0; for(int
阅读全文
摘要:// 计算传输错误率 public static void calculateWrongRate(){ wrongRate = 0; for(int i=0;i<100;i++){ for(int j=0;j<8;j++){ if(!numbers.get(i).get(j).equals(numb
阅读全文
摘要:// 产生指定位数的码干扰 public static void interruptCode(){ // 数组拷贝 for(int i=0;i<100;i++){ numbersInterrupted.add(i, new ArrayList<>(8)); for(int j=0;j<8;j++){
阅读全文
摘要:// 计算100个数据的校验位 public static void calculateParity(ArrayList<ArrayList<Integer>> src, ArrayList<Integer> dest){ for(int i=0;i<100;i++){ int count = 0;
阅读全文
摘要:import javax.servlet.*; import javax.servlet.annotation.WebFilter; import javax.servlet.http.HttpServletRequest; import java.io.IOException; /** * 登录验
阅读全文
摘要:#user nobody; #N工作进程数,默认为1 worker_processes 1; #错误日志保存路径 #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info;
阅读全文
摘要:<!--pages/index/index.wxml--> <view class="root"> <view class="jieguo"> <view wx:if="{{show_r}}" class="location"> <view style='font-weight:bold;'>二维码
阅读全文
摘要:select a.name as '表名',b.rows as '表数据行数' from sysobjects a inner join sysindexes b on a.id = b.id where a.type = 'u' and b.indid in (0,1) --and a.name
阅读全文
摘要:-- 定义需要备份的数据库 DECLARE @backupDatabase VARCHAR(20) = 'db' -- 定义数据库备份文件存放的基础路径 DECLARE @backupBasePath VARCHAR(MAX) = 'E:/database/' -- 定义备份文件名,文件名格式:<D
阅读全文