|
So far the research I have done and books on EKG I am currently reading indicates that impending myocardial infarction (a heart attack) is related to a rise in the ST wave segment of the EKG (ST elevation). SO it seems simple enough to model only the ST segment of the EKG. Maybe using a random number generator? Suggestions are welcome.
|
|
|
|
|
user_void wrote: A Hart Attac is related to a rise in the ST wave segment of the EKG (ST elevation). SO it seems simple enough to model only the ST segment of the EKG.
Hi
You are asking a question on a CPP/MFC forum. Not all of us have a degree in medicine. What does the above mean in plain English.
I assume that your data arrives in a continuous bite stream, which is being buffered somewhere, and that your code will read the buffer, and do it's thing.
My gut feeling is that your first step should be to do some form of Fourier analysis on the Data. Details on how to do that can be found by googeling Digital Data Processing. A word of warning: this is NOT a trivial subject!
Regards,
Bram van Kampen
|
|
|
|
|
It would seem that a random data stream would not be a sufficient model of anything other than a random stream of data. An instrument looking for a heart attack has to know both what is normal and what is abnormal. If it's normal, don't mess with it and if it isn't, sound an alarm or give the heart a nice jolt and get it started again. Of course, with this problem statement, not evertthing abnormal is a heart attack. And I know from experience that not all heart attacks involve the searing pain down your left arm.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Okay, lets assume we are modeling the ST-segment elevations. The program knows what values are abnormal and will only sound an alarm when an abnormal condition is detected. If the range of this number is from 0-10, and anything greater than 4 is a sign of myocardial infraction. And if a rnd number generator is not the best solution for modeling the ST-segment elevation, then what would be the best solution?
|
|
|
|
|
To step back, is a heart attack the only reason the number climbs above a 4? I would expect EKGs are graphs for a reason and it's a waveform that suggests the heart attack. But I'm not an expert on EKGs, I've seen a number so I know what they look like and what they're used for but I haven't studied their signal signatures in detail. I just suspect that it's more than a simple threshold problem.
If the instrument is a simple monitor, a occasional false positive isn't a huge problem if they're reasonably infrequent. However, if this is part of a defribrillator that's meant to be used by medically untrained personnel or to be implanted and operate automatically, shocking a normally beating heart probably isn't the greatest idea in the world.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Yes, usually when a specific segment of the EKG (ST-segment) rises above a threshold number, it indicates impending myocardial infraction. Perhaps I had structured the question incorrectly to begin with. Since I am doing all software, I an not designing an EKG machine, nor am I using an existing EKG machine for an input interface. What I want to model is the output of an EKG machine. Not even the entire output waveform of an EKG, but a specific segment (as mentioned above). I'm just trying to make the modeling as simple as possible. Thus far, I can only think of random number generator.
|
|
|
|
|
If all it takes is looking at a stream of data in the range of 0-10 and noticing when a value rises above 4, the problem is trivial. A random number generator would work just fine. Or if you wanted to get a little fancier, try to model the waveform and throw in some random "noise" which occasionally rises to the level of a heart attack.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
hello everybody
when i include a header file with space between words of its name then my compiler cannot link them and take error:
[sajad@sajad binary search trees]$ g++ binary\ trees.cpp
binary trees.cpp:3:73: error: /home/sajad/src/ds/test/binary\ search\ trees/BST_node_base.h: No such file or directory
binary trees.cpp:4:63: error: /home/sajad/src/ds/test/binary\ search\ trees/BST.h: No such file or direct
while the directory and address is completely true.
#include<iostream>
#include "/home/sajad/src/ds/test/binary\ search\ trees/BST_node_base.h"
#include "/home/sajad/src/ds/test/binary\ search\ trees/BST.h"
but when i change the name ,without space between it then it run correct,what can i do to solve this error?
also when i include a fileheader and in it use for example cout<<"hello"<<endl; takes="" error,but="" when="" i="" include<iostream=""> using namespace std it work true.does it must be as i write or there is another way to solve this?
this is the part of header file:
#include<iostream>
using namespace std;
template <class T>class BS_Tree{
public:
bool direction;
int n;
BST_node<T>* root;
BS_Tree(){
root=NULL;
}
....
|
|
|
|
|
khomeyni wrote: what can i do to solve this error?
what error ?
why would you put spaces between the parts of the path ?
|
|
|
|
|
You may either avoid spaces inside the paths or use relative ones.
As about the namespace,
You have two options:
- specify, as you did,
using namespace std; - Qualify each (
std ) object with the std namespace , e.g. std::cout instead of cout , std::endl instead of endl etc...
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]
|
|
|
|
|
Take out the back-slashes that quote the spaces. That is, change this:
#include "/home/sajad/src/ds/test/binary\ search\ trees/BST_node_base.h"
#include "/home/sajad/src/ds/test/binary\ search\ trees/BST.h"
to this
#include "/home/sajad/src/ds/test/binary search trees/BST_node_base.h"
#include "/home/sajad/src/ds/test/binary search trees/BST.h"
Oh - but don't, don't, don't use absolute paths in code like that! What happens when the code-base moves? You're screwed, aren't you.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
Stuart Dootson wrote: Oh - but don't, don't, don't use absolute paths in code like that! What happens when the code-base moves? You're screwed, aren't you
ok i will do it,i have changed it to :
Stuart Dootson wrote: #include "/home/sajad/src/ds/test/binary search trees/BST_node_base.h"
#include "/home/sajad/src/ds/test/binary search trees/BST.h
and solve my problem.
thnx for all answers.
|
|
|
|
|
Hi all,
i want to generate service from my application exe.
i want to generate such type of service that is never stop or in other words if any body stop this its start automatically.
please provide me help or guidance for this.
if possible please provide me any example.
thanks in regards.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
|
i m creating service like this
SC_HANDLE hdlSCM = OpenSCManager(NULL, NULL, SC_MANAGER_CREATE_SERVICE);
TCHAR lpFileName[MAX_PATH+1];
GetModuleFileName(NULL, lpFileName, MAX_PATH);
Calling = lpFileName;
if (hdlSCM == NULL) return ::GetLastError();
SC_HANDLE hdlServ = CreateService(
hdlSCM,
ServiceName,
ServiceDisplayName,
STANDARD_RIGHTS_REQUIRED,
SERVICE_WIN32_OWN_PROCESS,
SERVICE_AUTO_START,
SERVICE_ERROR_NORMAL,
Calling,
NULL,
NULL,
NULL,
NULL,
NULL);
DWORD Ret = 0;
if (hdlServ == NULL) Ret = ::GetLastError();
CloseServiceHandle(hdlServ);
its create service succssfully.
but when i want to start service its not able to start service
its return this error code
ERROR_SERVICE_REQUEST_TIMEOUT
please help me for this.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Le@rner wrote: its return this error code
ERROR_SERVICE_REQUEST_TIMEOUT
Inside the service itself, did you set the flag indicating it has completed its startup i.e. set the status to SERVICE_RUNNING in a call to SetServiceStatus? If you don't, you will get this error when you try to start the service.
Service Info[^] contains lots of service info, including samples.
Judy
Be wary of strong drink. It can make you shoot at tax collectors - and miss.
Lazarus Long, "Time Enough For Love" by Robert A. Heinlein
|
|
|
|
|
|
Hello, in my aplication using VC** 6.0 , there are two buttons ( + and -) they controls the value of 16 different edit boxes. It's working, but now i want that if you press and hold one these two buttons the value on their respective edit box increases until you release the button. From the help, i read that you can do this using GetState(), with this mask 0x0004, but i can't get it works. here is some code
void CCalibracionDlg::OnBUTTONmas()
{
unsigned int BotonHold=0;
char incremento;
BotonHold=0x0004 & m_Button_mas.GetState();
while (BotonHold != 0)
{
incremento=1;
Decremento_Incremento(incremento);
BotonHold=0x0004 & m_Button_mas.GetState();
}
}
this is the code for button "+" . I hope i've explained it well.
|
|
|
|
|
Why you dont use of CSpinButtonCtrl Class?
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 )
|
|
|
|
|
thanks for your answer , but if use CSpinButtonCtrl class , i only be able to control one edit box (his partner control) , and want to control one between 16 edit boxes ( the one who has the focus)with the same pair of bottons + and - . am i right ?
|
|
|
|
|
I'm sorry i'm not in VC but as a C-Programmer (kind of) I would suggest:
Create a function/method Scroll() that has 1 argument with value 1 (meaning spin down) and -1 (meaning spin up). Intercept the mousebuttondown-message. When the mouse is down, call Scroll() and set a timer such that when it goes off Scroll() is called again. Intercept the mousebuttonup-message. When the mouse is up set the timer off - that's it.
If you also intercept the mousewheel-message you can then reroute those to your Scroll() - The user can use the mousewheel to spin.
I'm sorry i don't have the code, or maybe better options, but i hope it helps...
Rozis
|
|
|
|
|
I have an application I am trying to move from VC6++ to VC++ 2008. It is an MFC application based on Jan Axelson's USB code.
The application that was built with VC6 runs fine with no problems or errors. I am upgrading it to VC++ 2008 a couple of functions at a time. When I run my VC++ 2008 application I see the following messages:
Endpoint 0 found The data area passed to a system call is too small
HidD_GetAttributes: The data area passed to a system call is too small
Master Cell PIC24 found
CreateFile: The data area passed to a system call is too small
Handle to Endpoint Out found
The message identifiers (Endpoint 0, HidD_GetAttributes, CreateFile:, Handle) are messages that I created. However, the message "The data area passed to a system call is too small" is coming from a system call to GetLastError.
I do not get the warning messages with the VC6++ version of the application. The 2008 version appears to be connecting to my USB device (I will know for sure after I add a few more functions) and it runs with no errors. However I am concerned about the too small warning.
Here is one of the calls that gives me the message:
DeviceHandle=CreateFile
(detailData->DevicePath,
0,
FILE_SHARE_READ|FILE_SHARE_WRITE,
(LPSECURITY_ATTRIBUTES)NULL,
OPEN_EXISTING,
0,
NULL);
if(!DeviceHandle)
{
DisplayLastError((CString)"Endpoint 0 not found");
}
else
{
DisplayLastError((CString)"Endpoint 0 found");
}
As you can see by the "Endpoint 0 found" message in the list of messages, the CreateFile call finds the handle to the device. However, DisplayLastError returns the "too small" warning. The function DisplayLastError performs a system call to GetLastError and does some other small tasks.
Does anyone know what I must do to eliminate the message from GetLastError?
|
|
|
|
|
GetLastError return value probably refers to last failed API call (not to CreateFile call: it succeedes).
You should call GetLastError only when a API function fails.
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]
|
|
|
|
|
CreateFile is an API call:
HANDLE WINAPI CreateFile(
It is in the Microsoft list of API functions.
|
|
|
|
|
That's not the point. GetLastError returns valid information from the last API call that failed; you're interrogating it when the last call succeeded. Not surprisingly, it returns gibbersih.
L u n a t i c F r i n g e
|
|
|
|