當前位置:首頁 » 操作系統 » 曲線記錄源碼

曲線記錄源碼

發布時間: 2022-09-07 18:15:00

⑴ 通達信 vpt量價曲線指標公式源碼

N:=51;

M:=6;

VPT:SUM(VOL*(CLOSE-REF(CLOSE,1))/REF(CLOSE,1),N);

MAVPT:MA(VPT,M);

⑵ Bezier曲線和樣條曲線 1至3次繪制源代碼 要求C或C++或MATLAB

N即為幾次貝塞爾曲線,Px,Py為控制點數組,t就是曲線要分成多少直線段了
for (j = N-1; j > 0; j--)
for (i = 0; i < j; i++){
Px[i] = (1-t)*Px[i] + t*Px[i+1]; Py[i] = (1-t)*Py[i] + t*Py[i+1];
}

1到3次的b樣條線與貝塞爾曲線幾乎一樣,b樣條線的優勢在於多次(至少不3高)

⑶ 求一個基於openssl寫的ecc曲線的源代碼

下面的例子生成兩對ECC密鑰,並用它做簽名和驗簽,並生成共享密鑰。
#include <string.h>
#include <stdio.h>
#include <openssl/ec.h>
#include <openssl/ecdsa.h>
#include <openssl/objects.h>
#include <openssl/err.h>

int main()
{
EC_KEY *key1,*key2;
EC_POINT *pubkey1,*pubkey2;
EC_GROUP *group1,*group2;
int ret,nid,size,i,sig_len;
unsigned char*signature,digest[20];
BIO *berr;
EC_builtin_curve *curves;
int crv_len;
char shareKey1[128],shareKey2[128];
int len1,len2;

/* 構造EC_KEY數據結構 */
key1=EC_KEY_new();
if(key1==NULL)
{
printf("EC_KEY_new err!\n");
return -1;
}
key2=EC_KEY_new();
if(key2==NULL)
{
printf("EC_KEY_new err!\n");
return -1;
}
/* 獲取實現的橢圓曲線個數 */
crv_len = EC_get_builtin_curves(NULL, 0);
curves = (EC_builtin_curve *)malloc(sizeof(EC_builtin_curve) * crv_len);
/* 獲取橢圓曲線列表 */
EC_get_builtin_curves(curves, crv_len);
/*
nid=curves[0].nid;會有錯誤,原因是密鑰太短
*/
/* 選取一種橢圓曲線 */
nid=curves[25].nid;
/* 根據選擇的橢圓曲線生成密鑰參數group */
group1=EC_GROUP_new_by_curve_name(nid);
if(group1==NULL)
{
printf("EC_GROUP_new_by_curve_name err!\n");
return -1;
}
group2=EC_GROUP_new_by_curve_name(nid);
if(group1==NULL)
{
printf("EC_GROUP_new_by_curve_name err!\n");
return -1;
}
/* 設置密鑰參數 */
ret=EC_KEY_set_group(key1,group1);
if(ret!=1)
{
printf("EC_KEY_set_group err.\n");
return -1;
}
ret=EC_KEY_set_group(key2,group2);
if(ret!=1)
{
printf("EC_KEY_set_group err.\n");
return -1;
}
/* 生成密鑰 */
ret=EC_KEY_generate_key(key1);
if(ret!=1)
{
printf("EC_KEY_generate_key err.\n");
return -1;
}
ret=EC_KEY_generate_key(key2);
if(ret!=1)
{
printf("EC_KEY_generate_key err.\n");
return -1;
}
/* 檢查密鑰 */
ret=EC_KEY_check_key(key1);
if(ret!=1)
{
printf("check key err.\n");
return -1;
}
/* 獲取密鑰大小 */
size=ECDSA_size(key1);
printf("size %d \n",size);
for(i=0;i<20;i++)
memset(&digest[i],i+1,1);
signature=malloc(size);
ERR_load_crypto_strings();
berr=BIO_new(BIO_s_file());
BIO_set_fp(berr,stdout,BIO_NOCLOSE);
/* 簽名數據,本例未做摘要,可將digest中的數據看作是sha1摘要結果 */
ret=ECDSA_sign(0,digest,20,signature,&sig_len,key1);
if(ret!=1)
{
ERR_print_errors(berr);
printf("sign err!\n");
return -1;
}
/* 驗證簽名 */
ret=ECDSA_verify(0,digest,20,signature,sig_len,key1);
if(ret!=1)
{
ERR_print_errors(berr);
printf("ECDSA_verify err!\n");
return -1;
}
/* 獲取對方公鑰,不能直接引用 */
pubkey2 = EC_KEY_get0_public_key(key2);
/* 生成一方的共享密鑰 */
len1=ECDH_compute_key(shareKey1, 128, pubkey2, key1, NULL);
pubkey1 = EC_KEY_get0_public_key(key1);
/* 生成另一方共享密鑰 */
len2=ECDH_compute_key(shareKey2, 128, pubkey1, key2, NULL);
if(len1!=len2)
{
printf("err\n");
}
else
{
ret=memcmp(shareKey1,shareKey2,len1);
if(ret==0)
printf("生成共享密鑰成功\n");
else
printf("生成共享密鑰失敗\n");
}
printf("test ok!\n");
BIO_free(berr);
EC_KEY_free(key1);
EC_KEY_free(key2);
free(signature);
free(curves);
return 0;
}

⑷ 跪求這個賽爾曲線的VB源代碼的解釋

去淘寶買賽爾寶寶,綁定注冊用戶,20元永久,功能很好很強大

⑸ 誰能給我橢圓曲線加密演算法的C源代碼

我也正需要這個,如果找的話,能給我一份么?十分感謝,我郵箱是[email protected]

⑹ 已知曲線的公式,如何用java編程將曲線顯示出來,要JAVA源代碼

代碼如下,只是時間倉促有些簡陋,沒有坐標軸,而且大小比例問題也沒有調好。不過功能實現了。嘎嘎,新手上路,騰雲駕霧。
import java.awt.Graphics;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class Bbso extends JPanel{

int x,y,x1,y1,m=100;
double d;

public Bbso() {

JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setBounds(100,100,500,300);
f.setTitle("畫曲線");
f.setVisible(true);
f.getContentPane().add(this);
}

public static void main(String arg[]) {

new Bbso();
}

public void paint(Graphics g) {

super.paintComponent(g);
x1=0;
y1=0;
for(x=-250;x<250;x++) {
d=-0.2045*x*x+100.41*x-6736.8; //這里填寫公式
y=(int)d;
g.drawLine(x1,y1+m,x,y+m);
x1=x;
y1=y;
}
}
}

⑺ 我想用曲線圖記錄自己每天的體溫變化,請問在excel表格里怎樣製作曲線圖。求步驟

  1. 把你的提問記錄成一個表

  2. 選中這個表,點「插入」選項卡上的折線圖即可。

⑻ mcgs的曲線如何從開機就開始記錄

將控制項放在界面上即可。
都有相應的控制項的,將控制項放到界面上就可以了。選擇數據來源為歷史數據,在控制項的屬性裡面關聯數據變數。

⑼ 求,通達信軟體里每天能記錄300--500手以上的買\賣盤累加的走勢曲線指標!請大俠賜教,,不勝感謝!

普通免費軟體做不到(你要的公式里的函數是收費軟體使用的),即使給你公式源碼,也不能顯示的.

⑽ 求橢圓曲線數字簽名演算法實現的源代碼!

PUDN程序員聯合開發網有很多源代碼。這是其中的兩條橢圓曲線源代碼:
http://www.pudn.com/downloads125/sourcecode/crypt/detail528796.html
http://www.pudn.com/downloads90/sourcecode/crypt/detail344353.html

熱點內容
暴風影音緩存在哪裡 發布:2025-05-12 12:42:03 瀏覽:534
access資料庫exe 發布:2025-05-12 12:39:04 瀏覽:623
五開的配置是什麼 發布:2025-05-12 12:36:37 瀏覽:359
加密ovpn 發布:2025-05-12 12:01:55 瀏覽:44
python練手項目 發布:2025-05-12 11:14:07 瀏覽:122
壓縮聽算音頻 發布:2025-05-12 10:58:12 瀏覽:801
資料庫系統報告 發布:2025-05-12 10:43:17 瀏覽:603
日產高配有哪些配置 發布:2025-05-12 10:32:16 瀏覽:475
大眾朗逸哪個配置值得入手 發布:2025-05-12 10:31:20 瀏覽:505
壓縮包的後綴 發布:2025-05-12 10:20:35 瀏覽:944