|
i want to make a program that will respond to spoken commands from the user to open programs and do other tasks in windows. i dont know how to do any speech recognition programming. i downloaded the microsoft speech sdk 5.1 but dont know where to go from here.
any help that anyone can provide would help greatly. code samples are extremly helpful.
thank you in advance for the help
- Kyle
|
|
|
|
|
|
do you know what header replaced the speech.h in microsofts speech rec. 5.1?
that code doesnt work without it, i get all kinds of errors.
- Kyle
|
|
|
|
|
|
Hi, I can read the input data from the parallel port. I have a thread that is reading continously the parallel port and updating a variable with the data.
I want to know if there is a better way to do it, because I need a quick response in my application (software side).
I have two push buttons connected to the parallel port (parallel port is already configured as bi-direccional) so, I want to detect the order in which I press the buttons, if the combination is correct it will display a message.
Could somebody please help me?
Thanks in advance.
|
|
|
|
|
|
Hello
I'm not sure if this is a beginners forum, but I will start here. I am a beginning C++ student and have a couple of mini-projects invloving fractions that I need some guidance on.
First the assignments:
1. Write a Fraction-Reduction program that takes in any fraction (maybe with denominator not equal to 0 or 1), and reduces it lowest terms. The function prototype will take two integer variables passed by reference.
2. Write a function that takes in any number and returns its whole and fractional parts as outputs. Like 6.44 would return int 6 and float 0.44.
My trouble:
On #1: I understand how reference passing is working, that the variables values in main's variables can be changed by the function. What I cant figure out is how to write something that will find the greatest common factor of any two numbers entered. I understand the math behind it but I cant translate that math to the program, and get it the correct place in main or the function and have it work.
On #2: This problem came from the chapter on reference parameters also. So is there a way to do this problem with the user entering one single float? Or is the trick to cin what the user enters in a format that allows to be updated invidually by reference from a function?
If my code is needed I can post it. If there is another forum I need to be at, please let me know. Thank you sincerely for any help.
JB
|
|
|
|
|
j4express wrote: 2. Write a function that takes in any number and returns its whole and fractional parts as outputs. Like 6.44 would return int 6 and float 0.44.
find the ceil or floor of the no depending on less or greater than zero val, Now you get the integer part, now subtract the original no with the integer part and you get the decimal part.
-prakash
Learning Symbian | Personal views
|
|
|
|
|
#1> This is some really old code laying around in the depths of my harddrive, but it should be exactly what you are looking for. It's not really a programming problem as much as a math problem, luckily Euclidean did all the work for us many years ago.
Euclidean algorithm for finding the Greatest Common Denominator:
void GCD(int &Nume, int &Denom)
{
int a= Nume;
int b= Denom
int temp = a % b;
while (temp > 0)
{
a = b;
b = temp;
temp = a % b;
}
Nume= Nume / b;
Denom= Denom /b;
}
#2> Ok, this one is easier than it seems. So lets say we the float 6.44 from the user. Now the easy part, casting a floating point into an integer will automaticall truncate the number, therefore leaving us with only the whole number, simple subtraction does the rest.
float f1 = 6.44f;
int Int1= (int) f1;
f1= f1 - Int1;
|
|
|
|
|
Hello,
i have downloaded the GGNFS from here: http://www.math.ttu.edu/~cmonico/software/ggnfs/
But when I try to compile I get the following errors:
------ Build started: Project: matbuild, Configuration: Debug Win32 ------
Compiling...
matstuff.c
m:\GNFS\src\matstuff.c(112) : warning C4244: '=' : conversion from 'double' to 's32', possible loss of data
matbuild.c
m:\GNFS\src\matbuild.c(662) : warning C4244: '=' : conversion from '__w64 int' to 's32', possible loss of data
m:\GNFS\src\matbuild.c(708) : warning C4267: '+=' : conversion from 'size_t' to 's32', possible loss of data
m:\GNFS\src\matbuild.c(898) : warning C4267: '=' : conversion from 'size_t' to 's32', possible loss of data
m:\GNFS\src\matbuild.c(908) : warning C4267: '+=' : conversion from 'size_t' to 's32', possible loss of data
m:\GNFS\src\matbuild.c(1012) : warning C4267: '=' : conversion from 'size_t' to 's32', possible loss of data
m:\GNFS\src\matbuild.c(1020) : warning C4267: '+=' : conversion from 'size_t' to 's32', possible loss of data
m:\GNFS\src\matbuild.c(1183) : warning C4244: '=' : conversion from 'double' to 'long', possible loss of data
combparts.c
blanczos64.c
m:\GNFS\src\blanczos64.c(318) : error C2065: 'asm' : undeclared identifier
m:\GNFS\src\blanczos64.c(318) : error C2143: syntax error : missing ';' before 'volatile'
m:\GNFS\src\blanczos64.c(471) : error C2143: syntax error : missing ';' before 'volatile'
m:\GNFS\src\blanczos64.c(570) : warning C4244: '=' : conversion from 'u64' to 'int', possible loss of data
m:\GNFS\src\blanczos64.c(832) : error C2143: syntax error : missing ';' before 'volatile'
m:\GNFS\src\blanczos64.c(884) : error C2143: syntax error : missing ';' before 'volatile'
m:\GNFS\src\blanczos64.c(932) : error C2026: string too big, trailing characters truncated
m:\GNFS\src\blanczos64.c(980) : error C2026: string too big, trailing characters truncated
m:\GNFS\src\blanczos64.c(1029) : error C2026: string too big, trailing characters truncated
m:\GNFS\src\blanczos64.c(1077) : error C2026: string too big, trailing characters truncated
m:\GNFS\src\blanczos64.c(1125) : error C2026: string too big, trailing characters truncated
m:\GNFS\src\blanczos64.c(1175) : error C2026: string too big, trailing characters truncated
m:\GNFS\src\blanczos64.c(1226) : error C2026: string too big, trailing characters truncated
m:\GNFS\src\blanczos64.c(1278) : error C2026: string too big, trailing characters truncated
m:\GNFS\src\blanczos64.c(1331) : error C2026: string too big, trailing characters truncated
m:\GNFS\src\blanczos64.c(1384) : error C2026: string too big, trailing characters truncated
m:\GNFS\src\blanczos64.c(1435) : error C2026: string too big, trailing characters truncated
m:\GNFS\src\blanczos64.c(1488) : error C2026: string too big, trailing characters truncated
m:\GNFS\src\blanczos64.c(1541) : error C2026: string too big, trailing characters truncated
m:\GNFS\src\blanczos64.c(1622) : error C2143: syntax error : missing ';' before 'volatile'
m:\GNFS\src\blanczos64.c(1729) : error C2143: syntax error : missing ';' before 'volatile'
m:\GNFS\src\blanczos64.c(1762) : error C2143: syntax error : missing ';' before 'volatile'
m:\GNFS\src\blanczos64.c(1796) : error C2143: syntax error : missing ';' before 'volatile'
m:\GNFS\src\blanczos64.c(1833) : error C2143: syntax error : missing ';' before 'volatile'
m:\GNFS\src\blanczos64.c(1865) : error C2143: syntax error : missing ';' before 'volatile'
m:\GNFS\src\blanczos64.c(2010) : warning C4244: 'function' : conversion from 'u64' to 'size_t', possible loss of data
m:\GNFS\src\blanczos64.c(2014) : warning C4244: 'function' : conversion from 'u64' to 'size_t', possible loss of data
m:\GNFS\src\blanczos64.c(2020) : warning C4244: 'function' : conversion from 'u64' to 'size_t', possible loss of data
m:\GNFS\src\blanczos64.c(2021) : warning C4244: 'function' : conversion from 'u64' to 'size_t', possible loss of data
m:\GNFS\src\blanczos64.c(2121) : warning C4244: 'function' : conversion from 'u64' to 'size_t', possible loss of data
m:\GNFS\src\blanczos64.c(2125) : warning C4244: 'function' : conversion from 'u64' to 'size_t', possible loss of data
m:\GNFS\src\blanczos64.c(2131) : warning C4244: 'function' : conversion from 'u64' to 'size_t', possible loss of data
m:\GNFS\src\blanczos64.c(2132) : warning C4244: 'function' : conversion from 'u64' to 'size_t', possible loss of data
Generating Code...
Build log was saved at "file://m:\Gnfs\ggnfs.vc\matbuild\Debug\BuildLog.htm"
matbuild - 24 error(s), 17 warning(s)
I have no clue what's wrong. Could anyone help me ?
With best regards,
Benedikt
|
|
|
|
|
RedDragon2k wrote: m:\GNFS\src\blanczos64.c(318) : error C2065: 'asm' : undeclared identifier
I believe you'll need __asm for this.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
RedDragon2k wrote: m:\GNFS\src\blanczos64.c(318) : error C2065: 'asm' : undeclared identifier
is that an
asm
{
...
};
block ?
if so, try replacing "asm" with "_asm"
(yeah, what David said)
Cleek | Image Toolkits | Thumbnail maker
-- modified at 15:56 Friday 28th October, 2005
|
|
|
|
|
Hello,
When I leave my computer for 30 minutes, the monitors are turned off (power-save mode), but the computer remains on and ready for networking/serving.
I would like to code a small app to force the monitors/displays to power-saving mode immediately (at the press of a button) while keeping the rest of the system on. Could someone point me in the right direction in the MFC library?
thanks,
JennyP
|
|
|
|
|
How about looking into SPI_SETPOWEROFFACTIVE , seems like what you are after.
|
|
|
|
|
can i do some thing like "On Error Go To" like in visual basic in visual c++?
|
|
|
|
|
you need exceptions, have a look at try and catch
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Looking for a (free) c++ library that contains financial engineering routines. By "financial engineering routines" I don't mean simple functions like mortgage calculators; I'm looking for something that handles Black-Scholes option pricing, etc.
Does anybody have any experience with one that they could recommend? It is proving difficult to locate one and the ones that I do find I don't know how reliable/good they are.
|
|
|
|
|
John Theal wrote: I'm looking for something that handles Black-Scholes option pricing, etc.
Does this help? Here is another.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Thanks David. The CodeProject one I was aware of and it was not quite what I needed. The other one, however, looks quite interesting. Thanks for the help.
|
|
|
|
|
Try looking at the TA-LIB on sourceforge.
|
|
|
|
|
The pdb files that VS6 generates for our programs shows both the function names and the parameters info, but the pdb files in the 'windows symbols' that I downloaded today seem to give only the function name and not the function call parameter info. Am I doing something wrong in windbg or that is how it is? How are these pdb files different?
thanks in advance.
|
|
|
|
|
Make sure that the PDB from windows actually got reloaded with the .reload command, otherwise you are just seeing the function names because the export table of the modules was examined instead.
|
|
|
|
|
Hi,
Am doing an app in win32. I need to set a timed progress bar for my app. ie.
I'll read the time value (in millisec) from a file and the progress bar should progress according to that time. For eg. if the time is 6 sec then the progress bar should complete its full length in 6 sec. if the time is 60 sec then the progress bar should complete its full length in 60 sec. (ie. its for the indication for the user to complete a task within that time)
how do I do this.
I have created the progress bar in my dialog and have the PBM_SETPOS in my WM_TIMER. The progress bar is working, but i have to fix it with the time.
How??? Thanks in advance.
|
|
|
|
|
First, send the control a PBM_SETRANGE message. Then after each second elapses, send it a PBM_SETPOS message.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
I know how to create a mdi using AppWizard. So far I have not been able to find any information on how to get a simple word processor program up and running like wordpad or word that shows a caret and receives input with the mouse and keyboard from the user. I have read articles on understanding the document and view classes, but so far, nothing about the "nuts and bolts" of a basic word processor application. I don't want to draw lines or click the mouse to make boxes and use paint to paint pretty lines. Those are good for learning, but not practical for what I need. Can anyone point me in the right direction so I can get started on this project. Thanks so much!!!
RRL
|
|
|
|