|
thanks for your support Cedric.
i didn't want to offend (even if I knew while posting that it would), but it becomes boring to see that the best this guy can do to learn is reading a C++ book first.
and the other important point i quoted was his SMS'ed typing english, which is not very appropriate to an international forum like codeproject.
i appologize dude if you thought i wanted to discourage you (it's not the case), but consider taking my thoughts as good advices.
regards to all.
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Smells like v2.5 beta
~RaGE();
|
|
|
|
|
|
makaveli_07 wrote: now i want the same programe also can read frm a notepad...
Use FindWindow() to get to get a handle to Notepad's top-level window. With that handle, call FindWindowEx() to get a handle to the edit control. Then you can send the edit control a WM_GETTEXT message to get the text contained within it.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
i did a program which randomize the numbers..i need to do time stamp..any idea to do this kind of thing....where i must calculate time taken to find the randomizes numbers...
|
|
|
|
|
GetLocalTime(...)
Maxwell Chen
|
|
|
|
|
makaveli_07 wrote: i need to...calculate time taken to find the randomizes numbers...
Are you wanting to know how long it took to generate a series of pseudo-random numbers?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
can we alter RAND_MAX constant for a rand() function and why is it so small 0x7FFF instead of getting random numbers from a whole range of unsigned int
9ine
|
|
|
|
|
9ine wrote: can we alter RAND_MAX constant for a rand() function
Why ? It is not really necessary. If you need lower values, you can use rand()%YourMaxValue;
9ine wrote: why is it so small 0x7FFF instead of getting random numbers from a whole range of unsigned int
Because it returns an integer
|
|
|
|
|
I'd like to get higher values and wonder if rand() does not return a value from 0...0xFFFFFFFF range. wonder how to get it
What's the reason to constrain MAX_RAND to 0x7FFF?
9ine
|
|
|
|
|
You can get the higher values just like the following...
long lVal = ( rand() << 16 ) | rand();
The following will be more accuarate, I think...
long lLow = (( rand() % 2 ) << 15 ) | rand();
long lHigh = (( rand() % 2 ) << 15 ) | rand();
long lVal = ( lHigh << 16 ) | lLow;
- NS -
|
|
|
|
|
its to bulky calling rand() several times
9ine
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Hi All,
Can anyone suggest me the way to implement audio tuner UI. I mean the graph which identifies the intesity of the sound and varies...
Basically I am trying to record from microphone, I need to display the audio tuner waves in my UI when it is recording.
Thanks in Advance,
Poornima
|
|
|
|
|
atimpoo wrote: I mean the graph which identifies the intesity of the sound and varies...
Some chart controls are available on this website (go in the "miscellaneous controls" section of this website). I don't know if they can be used for your application because in general they display 'static' data (you plot your complete series like on a excell chart).
I developped also my own chart control that can display 'dynamic' data (you can add new points to the control) and it's quite fast. Unfortunately, the article is not finished yet (I started to write it) and it will be available soon. If you need it now, I can send you what I have yet (the documentation is not complete).
|
|
|
|
|
Hey,
Can u please send me the article you mentioned.
My Id is dhara_lkp@yahoo.com
Thanks,
Poornima
|
|
|
|
|
Ok but you'll have to wait a little bit: I don't have the sources at work and I don't go back home this evening.
|
|
|
|
|
ok... i will wait for that. and thank you.
|
|
|
|
|
Hi again.
This time i have tons of problems. I'm trying to learn how to connect to a db using ODBC. unfortunatly i can't find any good reference to show me how to do this (or maybe i'm stubit). Anyway I know is not right to ask from u to teach me how but u r me last chance so thanks for any help.
i wan't to built a spam filter that uses statistics to classify an email.
This is done using a db to store all words previously evaluated.
The db has only one table with the following rows:string word,int spam, int legitimate
i want to connect to the db and check one by one all the words(tokens) of the email if exists in the db and what value they have
i know i'm not very clear and i'm sorry. So far i manage to connect using some codei found on the web.
#include windows.h
#include sqlext.h
#include stdio.h
#include string.h
int main(void)
{
std::string token="viagra"
HENV hEnv = NULL;// Env Handle from SQLAllocEnv()
HDBC hDBC = NULL;// Connection handle
HSTMT hStmt = NULL;// Statement handle
UCHAR szDSN[SQL_MAX_DSN_LENGTH] = "project";// Data SourceNamebuffer
UCHAR* szUID = NULL;// User ID buffer
UCHAR* szPasswd = NULL;// Password buffer
UCHAR szWord[128];// word buffer
SDWORD cbWord;// word buffer bytes recieved
UCHAR szSqlStr[] = "Select * From tblDictionary Where Feature='token'";// SQL string
RETCODE retcode;// Return code
// Allocate memory for ODBC Environment handle
SQLAllocEnv (&hEnv);
// Allocate memory for the connection handle
SQLAllocConnect (hEnv, &hDBC);
// Connect to the data source "dictio" using userid and password.
retcode = SQLConnect (hDBC, szDSN, SQL_NTS, szUID, SQL_NTS, szPasswd, SQL_NTS);
if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO)
{
// Allocate memory for the statement handle
retcode = SQLAllocStmt (hDBC, &hStmt);
// Prepare the SQL statement by assigning it to the statement handle
retcode = SQLPrepare (hStmt, szSqlStr, sizeof (szSqlStr));
// Execute the SQL statement handle
retcode = SQLExecute (hStmt);
// Project only column 1 which is the word
SQLBindCol (hStmt, 1, SQL_C_CHAR, szWord, sizeof(szWord), &cbWord); // Get row of data from the result set defined above in the statement
retcode = SQLFetch (hStmt);
while (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO)
{
printf ("\t%s\n", szWord);
retcode = SQLFetch (hStmt);// Fetch next row from result set
}
// Free the allocated statement handle
SQLFreeStmt (hStmt, SQL_DROP);
// Disconnect from datasource
SQLDisconnect (hDBC);
}
// Free the allocated connection handle
SQLFreeConnect (hDBC);
// Free the allocated ODBC environment handle
SQLFreeEnv (hEnv);
return 0;
}
This code only gets the first colum i want to get all 3 colums and i want to check if the word does not exists i want to INSERT
i know is a lot of work to ask from u but believe me i tried and i can't find what i'm looking for.
Thanks again appriciate the help.
p.s if i ever make this spam filter to work i'll give it as a gift to all of u(though i doubt it )
|
|
|
|
|
HI all
Pleasetell me the steps of Former US National Security Agency (NSA) standard algorithm.
I googled about this wiping algirithm but didnt get any success.
so please help me.
Thanks
|
|
|
|
|
I'm certain the NSA has 1000s of algorithms and that they are quite secured in the USA.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I need to save url's contents(gif,jpeg) to file using visual c++, like function urlwrite with matlab; my email: rfano@walla.com
|
|
|
|
|
|
thank you for the answer, but i have one question: how can i use the planified task (windows) with this program
|
|
|
|
|