|
Not quite. This will return a match value of zero for these 2 very similar strings: "abcd" and "bcd".
The algorithm should return the length of the longest same substring present on both strings. The "similarity" factor would be the length of the substring divided by the length of the longer string.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
The algorithm should return the length of the longest same substring present on both strings. The "similarity" factor would be the length of the substring divided by the length of the longer string.
So "abcd" and "lbcd" would be more similar than "abcd" and "acbd"?
That sounds wrong...
(the first pair has a three character substring in common, but the second pair has only one character substrings in common. I personally would not consider the first pair to be three times as similar as the second pair.)
|
|
|
|
|
How could I get information about system performance (System Meter utility of Windows 9x), like free resource, free RAM, used RAM, processor use ...
Anyone knows some class or function in VC6 ?
Thanks,
Cris ...
|
|
|
|
|
hi friend
here is an Function GetSytemInfo()
and the argument u sulply is address of SYSTEM_INFO structure..
like SYSTEM_INFO sInfo;
GetSytemInfo(&sInfo);
u can get the processor type,the pagesize(yaaa..!! it is the VirtualAlloc() Used..),Pointer to the lowest memory address accessible to applications and dynamic-link libraries (DLLs) etc....
try it...
Hai Friends me from Pandalam..and i think there is a sofware behind everything...
so enjoy with the codes...
|
|
|
|
|
hey friend
the spelling Mistake..!!!
GetSystemInfo() not GetSytemInfo()
i missed a 's' Sorry...!!
RRenjith
Hai Friends me from Pandalam..and i think there is a sofware behind everything...
so enjoy with the codes...
|
|
|
|
|
Having created a dialog application with MFC in Visual C++6, is it possible to attach a small database to it?
|
|
|
|
|
See this article.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
That's perfect! Thanks a million.
|
|
|
|
|
what's the easiest way of getting the timestamp of a file using VC++/MFC. i am using CStdioFile.
any help would be appreciated!!!
thanks!!
|
|
|
|
|
CFile::GetStatus()
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thanks!!
|
|
|
|
|
Does VC++ 7 code compile into IL as well?
If so wouldn't that take all the glory out of VC++?
|
|
|
|
|
Yes, ALL .NET "compilers" compile IL code too!
doesn't it!?
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
I have dialog based application,If user click on a button I waana exit from application.Can some one tell me the code?I know it must be one or two line.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
I think if you call OnOK() in the main Dialog it should work. If not
PostQuitMessage(0) always does
|
|
|
|
|
Thanks.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
The function used to close a dialog box is EndDialog(int nResult) .
OnOK() or OnCancel() will automatically call EndDialog for you -- OnOK passes 1 (IDOK) for the nResult and OnCancel passes 2 (IDCANCEL).
Regards,
Alvaro
Intellectuals solve problems; geniuses prevent them. - Albert Einstein
|
|
|
|
|
Thanks.)
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Thanks.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
hi friend
There is a plenty of ways.........
void YourDialog::OnOK()
{
//just call
CDialog::OnOk();
or
exit(exitcode);
or
PostQuitMessage(exitcode);
or
EndDialog();
or
ExitThread(exitcode);
or
ExitProcess(exit code);
or
SendMessage(this,WM_DESTROY,0,0);
}
and many other
u can pas the exitcode as 0
ok
try it now..!!
RRenjith
Hai Friends me from Pandalam..and i think there is a sofware behind everything...
so enjoy with the codes...
|
|
|
|
|
woww,perfect.Thank you.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
I have a CListCtrl object set to Report mode and I was wondering if there is any way to add a new record to the beginning(0) and shift the existing onces down one?
Can this be done?
So far all I do is the destroy the data and rebuild it. Seems like there should be an easier way than this.
Thanks,
JD
|
|
|
|
|
CListCtrl::InsertItem()
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Is this obtained by setting the LVITEM.iItem to 0?
Thanks,
JD
|
|
|
|
|
Yes.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|