虫虫首页|资源下载|资源专辑|精品软件
登录|注册

0.<b>99</b>

  • RSA算法 :首先, 找出三个数, p, q, r, 其中 p, q 是两个相异的质数, r 是与 (p-1)(q-1) 互质的数...... p, q, r 这三个数便是 person_key

    RSA算法 :首先, 找出三个数, p, q, r, 其中 p, q 是两个相异的质数, r 是与 (p-1)(q-1) 互质的数...... p, q, r 这三个数便是 person_key,接著, 找出 m, 使得 r^m == 1 mod (p-1)(q-1)..... 这个 m 一定存在, 因为 r 与 (p-1)(q-1) 互质, 用辗转相除法就可以得到了..... 再来, 计算 n = pq....... m, n 这两个数便是 public_key ,编码过程是, 若资料为 a, 将其看成是一个大整数, 假设 a < n.... 如果 a >= n 的话, 就将 a 表成 s 进位 (s

    标签: person_key RSA 算法

    上传时间: 2013-12-13

    上传用户:zhuyibin

  • 用verilog设计密勒解码器 一、题目: 设计一个密勒解码器电路 二、输入信号: 1. DIN:输入数据 2. CLK:频率为2MHz的方波

    用verilog设计密勒解码器 一、题目: 设计一个密勒解码器电路 二、输入信号: 1. DIN:输入数据 2. CLK:频率为2MHz的方波,占空比为50% 3. RESET:复位信号,低有效 三、输入信号说明: 输入数据为串行改进密勒码,每个码元持续时间为8μs,即16个CLK时钟;数据流是由A、B、C三种信号组成; A:前8个时钟保持“1”,接着5个时钟变为“0”,最后3个时钟为“1”。 B:在整个码元持续时间内都没有出现“0”,即连续16个时钟保持“1”。 C:前5个时钟保持“0”,后面11个时钟保持“1”。 改进密勒码编码规则如下: 如果码元为逻辑“1”,用A信号表示。 如果码元为逻辑“0”,用B信号表示,但以下两种特例除外:如果出现两个以上连“0”,则从第二个“0”起用C信号表示;如果在“通信起始位”之后第一位就是“0”,则用C信号表示,以下类推; “通信起始位”,用C信号表示; “通信结束位”,用“0”及紧随其后的B信号表示。 “无数据”,用连续的B信号表示。

    标签: verilog 2MHz DIN CLK

    上传时间: 2013-12-02

    上传用户:wang0123456789

  • We have a group of N items (represented by integers from 1 to N), and we know that there is some tot

    We have a group of N items (represented by integers from 1 to N), and we know that there is some total order defined for these items. You may assume that no two elements will be equal (for all a, b: a<b or b<a). However, it is expensive to compare two items. Your task is to make a number of comparisons, and then output the sorted order. The cost of determining if a < b is given by the bth integer of element a of costs (space delimited), which is the same as the ath integer of element b. Naturally, you will be judged on the total cost of the comparisons you make before outputting the sorted order. If your order is incorrect, you will receive a 0. Otherwise, your score will be opt/cost, where opt is the best cost anyone has achieved and cost is the total cost of the comparisons you make (so your score for a test case will be between 0 and 1). Your score for the problem will simply be the sum of your scores for the individual test cases.

    标签: represented integers group items

    上传时间: 2016-01-16

    上传用户:jeffery

  • 功能:编写的计算皮亚诺相关系数 开发语言:ruby 调用:correlate(x,y) 其中,x,y为需要计算相关度的向量 调用示例: a = [3, 6, 9, 12, 15, 18

    功能:编写的计算皮亚诺相关系数 开发语言:ruby 调用:correlate(x,y) 其中,x,y为需要计算相关度的向量 调用示例: a = [3, 6, 9, 12, 15, 18, 21] b = [1.1, 2.1, 3.4, 4.8, 5.6] c = [1.9, 1.0, 3.9, 3.1, 6.9] c1 = correlate(a,a) # 1.0 c2 = correlate(a,a.reverse) # -1.0 c3 = correlate(b,c) # 0.8221970228 puts c1#,c2,c3

    标签: correlate ruby 计算 12

    上传时间: 2013-12-18

    上传用户:skfreeman

  • Implement the following integer methods: a) Method celsius returns the Celsius equivalent of a Fahr

    Implement the following integer methods: a) Method celsius returns the Celsius equivalent of a Fahrenheit calculation celsius = 5.0 / 9.0 * ( fahrenheit - 32 ) b) Method fahrenheit returns the Fahrenheit equivalent of a Celsius the calculation fahrenheit = 9.0 / 5.0 * celsius + 32 c) Use the methods from parts (a) and (b) to write an application either to enter a Fahrenheit temperature and display the Celsius or to enter a Celsius temperature and display the Fahrenheit equivalent.

    标签: equivalent Implement the following

    上传时间: 2014-01-19

    上传用户:jackgao

  • CRC16算法的Java实现

    CRC16算法的Java实现,使用方法如下: CRC16 crc16 = new CRC16() byte[] b = new byte[] { // (byte) 0xF0,(byte)0xF0,(byte)0xF0,(byte)0x72 (byte) 0x2C, (byte) 0x00, (byte) 0xFF, (byte) 0xFE, (byte) 0xFE, (byte) 0x04, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00 } for (int k = 0 k < b.length k++) { crc16.update(b[k]) } System.out.println(Integer.toHexString(crc16.getValue())) System.out.println(Integer.toHexString(b.length))

    标签: Java CRC 16 算法

    上传时间: 2014-12-19

    上传用户:ve3344

  • 本代码为编码开关代码

    本代码为编码开关代码,编码开关也就是数字音响中的 360度旋转的数字音量以及显示器上用的(单键飞梭开 关)等类似鼠标滚轮的手动计数输入设备。 我使用的编码开关为5个引脚的,其中2个引脚为按下 转轮开关(也就相当于鼠标中键)。另外3个引脚用来 检测旋转方向以及旋转步数的检测端。引脚分别为a,b,c b接地a,c分别接到P2.0和P2.1口并分别接两个10K上拉 电阻,并且a,c需要分别对地接一个104的电容,否则 因为编码开关的触点抖动会引起轻微误动作。本程序不 使用定时器,不占用中断,不使用延时代码,并对每个 细分步数进行判断,避免一切误动作,性能超级稳定。 我使用的编码器是APLS的EC11B可以参照附件的时序图 编码器控制流水灯最能说明问题,下面是以一段流水 灯来演示。

    标签: 代码 编码开关

    上传时间: 2017-07-03

    上传用户:gaojiao1999

  • (免费)基于FPGA的机器人视觉系统模块的设计.doc

    基于FPGA的机器人视觉系统模块的设计 关键字: 机器人 视觉系统 集成电路 FPGA     一、概述   视觉技术是近几十年来发展的一门新兴技术。机器视觉可以代替人类的视觉从事检验、目标跟踪、机器人导向等方面的工作,特别是在那些需要重复、迅速的从图象中获取精确信息的场合。尽管在目前硬件和软件技术条件下,机器视觉功能还处于初级水平,但其潜在的应用价值引起了世界各国的高度重视,发达国家如美国、日本、德国、法国等都投入了大量的人力物力进行研究,近年来已经在机器视觉的某些方面获得了突破性的进展,机器视觉在车辆安全技术、自动化技术等应用中也越来越显示出其重要价值。本文根据最新的CMOS图像采集芯片设计了一种通用的视觉系统模块,经过编制不同的图像处理、模式识别算法程序本模块可以应用到足球机器人,无人车辆等各种场合。

    标签: FPGA的机器人视觉系统

    上传时间: 2015-04-25

    上传用户:justgo123

  • fft analysis

          Use the fast Fourier transform function fft to analyse following signal. Plot the original signal, and the magnitude of its spectrum linearly and logarithmically. Apply Hamming window to reduce the leakage.   .   The hamming window can be coded in Matlab as   for n=1:N hamming(n)=0.54+0.46*cos((2*n-N+1)*pi/N); end;   where N is the data length in the FFT.

    标签: matlab fft

    上传时间: 2015-11-23

    上传用户:石灰岩123

  • 道理特分解法

    #include "iostream" using namespace std; class Matrix { private: double** A; //矩阵A double *b; //向量b public: int size; Matrix(int ); ~Matrix(); friend double* Dooli(Matrix& ); void Input(); void Disp(); }; Matrix::Matrix(int x) { size=x; //为向量b分配空间并初始化为0 b=new double [x]; for(int j=0;j<x;j++) b[j]=0; //为向量A分配空间并初始化为0 A=new double* [x]; for(int i=0;i<x;i++) A[i]=new double [x]; for(int m=0;m<x;m++) for(int n=0;n<x;n++) A[m][n]=0; } Matrix::~Matrix() { cout<<"正在析构中~~~~"<<endl; delete b; for(int i=0;i<size;i++) delete A[i]; delete A; } void Matrix::Disp() { for(int i=0;i<size;i++) { for(int j=0;j<size;j++) cout<<A[i][j]<<" "; cout<<endl; } } void Matrix::Input() { cout<<"请输入A:"<<endl; for(int i=0;i<size;i++) for(int j=0;j<size;j++){ cout<<"第"<<i+1<<"行"<<"第"<<j+1<<"列:"<<endl; cin>>A[i][j]; } cout<<"请输入b:"<<endl; for(int j=0;j<size;j++){ cout<<"第"<<j+1<<"个:"<<endl; cin>>b[j]; } } double* Dooli(Matrix& A) { double *Xn=new double [A.size]; Matrix L(A.size),U(A.size); //分别求得U,L的第一行与第一列 for(int i=0;i<A.size;i++) U.A[0][i]=A.A[0][i]; for(int j=1;j<A.size;j++) L.A[j][0]=A.A[j][0]/U.A[0][0]; //分别求得U,L的第r行,第r列 double temp1=0,temp2=0; for(int r=1;r<A.size;r++){ //U for(int i=r;i<A.size;i++){ for(int k=0;k<r-1;k++) temp1=temp1+L.A[r][k]*U.A[k][i]; U.A[r][i]=A.A[r][i]-temp1; } //L for(int i=r+1;i<A.size;i++){ for(int k=0;k<r-1;k++) temp2=temp2+L.A[i][k]*U.A[k][r]; L.A[i][r]=(A.A[i][r]-temp2)/U.A[r][r]; } } cout<<"计算U得:"<<endl; U.Disp(); cout<<"计算L的:"<<endl; L.Disp(); double *Y=new double [A.size]; Y[0]=A.b[0]; for(int i=1;i<A.size;i++ ){ double temp3=0; for(int k=0;k<i-1;k++) temp3=temp3+L.A[i][k]*Y[k]; Y[i]=A.b[i]-temp3; } Xn[A.size-1]=Y[A.size-1]/U.A[A.size-1][A.size-1]; for(int i=A.size-1;i>=0;i--){ double temp4=0; for(int k=i+1;k<A.size;k++) temp4=temp4+U.A[i][k]*Xn[k]; Xn[i]=(Y[i]-temp4)/U.A[i][i]; } return Xn; } int main() { Matrix B(4); B.Input(); double *X; X=Dooli(B); cout<<"~~~~解得:"<<endl; for(int i=0;i<B.size;i++) cout<<"X["<<i<<"]:"<<X[i]<<" "; cout<<endl<<"呵呵呵呵呵"; return 0; } 

    标签: 道理特分解法

    上传时间: 2018-05-20

    上传用户:Aa123456789