|
I downloaded the ReHash console-based hash calculator by Dominik Reichl. Included is the file: testvect.txt. It appears that a test vector for sha256 is missing. I went to the NIST website http://csrc.nist.gov/groups/STM/cavp/index.html#03 and used some of the SHA Test Vectors for Hashing Byte-Oriented Messages. Unfortunately, I didn't get their same results for the sha256 test cases using Dominik's utility. Does anyone know why there's not a test vector for sha256 included with the utility, or why the utility would give a different result from the NIST standard test vectors?
Thanx.
bill s
|
|
|
|
|
MFC, STUDIO 2008
How to increase height of text
CStatic* pStatic = (CStatic*) GetDlgItem(IDC_STATIC2);
CFont font;
font.CreateFont(640, // 320 - same
0, // int nWidth,
0, 0, 400, FALSE, FALSE,
0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY, DEFAULT_PITCH | FF_ROMAN,
L"Times New Roman");
// Do something with the font just created...
pStatic->SetFont(font,1);
pStatic->SetWindowTextW(L"Any text");
|
|
|
|
|
durban2 wrote: font.CreateFont(640, // 320 - same
Why 640?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Use following method for a try.
CFont font;
VERIFY(font.CreateFont(
12,
0,
0,
0,
FW_NORMAL,
FALSE,
FALSE,
0,
ANSI_CHARSET,
OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH | FF_SWISS,
_T("Arial")));
GetDlgItem(IDC_STATIC_TITLE)->SetFont(&font);
studing is processing in this life.
|
|
|
|
|
two things could I use to this code anywhere
Or does it have to be in let's say ::OnInitDialig ::OnCtlColor
Also I read that using SetFont I would have to process the WM_SETFONT
Message
Thanks
|
|
|
|
|
MFC, STUDIO 2008
Created in class with help wizard function
my_func1
which must return variable CStrimg
CString CMainDlg2::my_func1(void)
{
return CString();
}
But I want for example:
CString CMainDlg2::my_func1(void)
{
CString s;
s = ”test”;
// is necessary return s;
// return CString(); How to use value of variable ‘s’ from my_func1?
}
|
|
|
|
|
do you try this:
CString CMainDlg2::my_func1(void)
{
CString s;
s = "test";
return s;
}
?
|
|
|
|
|
What about a good tutorial on C++ programming language?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi friends,
I am from Ethiopia. Could you please send/show me the C++ source code for 8-queens problem using hill climbing search method ? It is too urgent please?
Thank you.
|
|
|
|
|
Hi friend,
welcome in the forum.
Plese read carefully "how to get an answer to your question" [^] before actually posting.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
mekonnenn wrote: It is too urgent please?
The lack of planning on your part does not constitute an emergency on our part.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
But we dont have eight queens.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Yeah, we only have two and after Queen Astrid's accident[^] they are not allowed near or on any hill or mountain.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
The following coding come from china.
It isn't writed by mine.
#include<stdio.h>
#define NUM 8 //定义数组的大小
int a[NUM+1];
int main()
{
int i,k,flag,not_finish=1,count=0;
i=1;
a[1]=1;
printf("The possible configuration of 8 queens are:\n");
while(not_finish)
{
while(not_finish&&i<=NUM)
{
for(flag=1,k=1;flag&&k<i;k++)
if(a[k]==a[i])flag=0;
for(k=1;flag&&k<i;k++)
if((a[i]==a[k]-(k-i))||(a[i]==a[k]+(k-i))) flag=0;
if(!flag)
{
if(a[i]==a[i-1])
{
i--;
if(i>1&&a[i]==NUM)
a[i]=1;
else if(i==1&&a[i]==NUM)
not_finish=0;
else a[i]++;
}
else if(a[i]==NUM) a[i]=1;
else a[i]++;
}
else if(++i<=NUM)
if(a[i-1]==NUM) a[i]=1;
else a[i]=a[i-1]+1;
}
if(not_finish)
{
++count;
printf((count-1)%3?" [%2d]: ":" \n[%2d]: ",count);
for(k=1;k<=NUM;k++)
printf(" %d",a[k]);
if(a[NUM-1]<NUM) a[NUM-1]++;
else a[NUM-1]=1;
i=NUM-1;
}
}
}
studing is processing in this life.
|
|
|
|
|
Hi,
I need to execute my project exe through command prompt.
1) If I give path of exe in command prompt(one argument) then it should execute GUI version of Project.
2) If I give two arguments in command prompt then it should execute CLI version of Project.
How can I get command line arguments In MFC.In windows programming we are having
int _tmain(int argc, _TCHAR* argv[]) main function.But how can I do it in MFC.
|
|
|
|
|
hemlat wrote: But how can I do it in MFC.
You have access to __argc and __argv whether you use MFC or not. Also check out the app's m_lpCmdLine member.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
thanks for your reply.This is what I needed.
|
|
|
|
|
there are a bunch of command line parser classes out there, to take care of splitting the cmd line into flags and options.
for example: CCmdLine - command line parser[^]
|
|
|
|
|
LPTSTT strCmdLine = GetCommandLine();
You should do next?
studing is processing in this life.
|
|
|
|
|
Hi,
If we want to reset the content of ListBox simply we will use ResetContent() function.
But how can I reset content of Listcontrol.Can anyone help me.
|
|
|
|
|
DeleteAllItems() will remove everything from the list control.
|
|
|
|
|
|
Hi friends,
I've encountered a problem using Sliderbar in my MFC program.
I've set the MaxRange to 86400 (for example: m_slider1.SetRange(0, 86400);), but once I want to change the position of it and handle the new position in the OnHScroll(), I would receive incorrect position. Now, I would like to know whether there is any limitation for setting Maximum range to the slider bar or not?
Thanks in advance.
|
|
|
|
|
Mohammad Khodaea wrote: ...handle the new position in the OnHScroll(), I would receive incorrect position.
What is incorrect? How are you verifying this?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
For example, I set the sliderbar to the end point and I expect to get value of Maximum (here 86400), but I don't see it and I watched 32423 (a value lower than maximim).
|
|
|
|