Click here to Skip to main content
15,904,822 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can i create one button for two events in C# 2008 vs? Pin
Malli_S20-May-11 1:08
Malli_S20-May-11 1:08 
QuestionHow send/reseive SMS with a GSM Modem in C++(MFC) Pin
Hadi Dayvary19-May-11 21:26
professionalHadi Dayvary19-May-11 21:26 
AnswerRe: How send/reseive SMS with a GSM Modem in C++(MFC) Pin
Rhuros19-May-11 21:47
professionalRhuros19-May-11 21:47 
QuestionOpen and display any image on dialog Pin
manju 319-May-11 20:54
manju 319-May-11 20:54 
AnswerRe: Open and display any image on dialog Pin
ShilpiP19-May-11 21:14
ShilpiP19-May-11 21:14 
QuestionMFC, How to activate one document template among multiple document templates Pin
swandream19-May-11 15:11
swandream19-May-11 15:11 
QuestionEncrypting Archives with AES Pin
sarfaraznawaz19-May-11 1:57
sarfaraznawaz19-May-11 1:57 
AnswerRe: Encrypting Archives with AES Pin
Chris Losinger19-May-11 3:37
professionalChris Losinger19-May-11 3:37 
GeneralRe: Encrypting Archives with AES Pin
sarfaraznawaz19-May-11 19:53
sarfaraznawaz19-May-11 19:53 
Questionabout CListCtrl Pin
luyuxibaby19-May-11 0:41
luyuxibaby19-May-11 0:41 
AnswerRe: about CListCtrl Pin
CPallini19-May-11 2:23
mveCPallini19-May-11 2:23 
QuestionMFC Program and Very Large Text Files Pin
Andy20219-May-11 0:37
Andy20219-May-11 0:37 
AnswerRe: MFC Program and Very Large Text Files Pin
Maximilien19-May-11 1:05
Maximilien19-May-11 1:05 
GeneralRe: MFC Program and Very Large Text Files [modified] Pin
federico.strati19-May-11 1:26
federico.strati19-May-11 1:26 
GeneralRe: MFC Program and Very Large Text Files Pin
Andy20219-May-11 22:04
Andy20219-May-11 22:04 
GeneralRe: MFC Program and Very Large Text Files Pin
federico.strati20-May-11 23:25
federico.strati20-May-11 23:25 
GeneralRe: MFC Program and Very Large Text Files Pin
Andy20225-May-11 21:33
Andy20225-May-11 21:33 
GeneralRe: MFC Program and Very Large Text Files Pin
federico.strati26-May-11 2:14
federico.strati26-May-11 2:14 
AnswerRe: MFC Program and Very Large Text Files Pin
Chandrasekharan P19-May-11 1:22
Chandrasekharan P19-May-11 1:22 
AnswerRe: MFC Program and Very Large Text Files Pin
jschell19-May-11 8:21
jschell19-May-11 8:21 
GeneralRe: MFC Program and Very Large Text Files Pin
Andy20219-May-11 22:10
Andy20219-May-11 22:10 
GeneralRe: MFC Program and Very Large Text Files Pin
jschell20-May-11 10:13
jschell20-May-11 10:13 
Andy202 wrote:
Input1 sampled at 50 msec and Input2 sampled at 200 msec, so using timing information merge the two sets of data into one output file; interporlate as required.



So you have one 'block' (perhaps one line or longer) from file 1 that exists every 50msec. Call this X.
You have another 'block' from file 2 that exists every 200msec. Call this Y.

Thus you have 4 (200msec/50msect) X entries before each Y entry.

Steps
1. Build a buffered reader for each file. Buffered in the case reads N 'block' entries and allows it to read M more on request. The timestamp is exposed (parsed from the block.)
2. Read X via the buffer where N is 200.
3. Read Y via the buffer where N is also 200 (could be less as well.)
4. Now 2 will have data that fits into 3. Because you have read enough to overlap.
5. Step 4 represents a starting point. Basically the two buffers will mostly be off by 4.
6. You can't assume it will always be offset by 4 so continue to compare the two timestamps as you read.
7. On start up you need to sync the two buffer reads, since one file might have a much different start time from the other.

Performance impacts
- Play with the stream buffer sizes (actual file read versus buffered readers above.)
- Profile it with a tool for some large and real files, say 50 meg at least.
QuestionEmbedding Excel in a dialog Pin
efraimyy18-May-11 22:49
efraimyy18-May-11 22:49 
AnswerRe: Embedding Excel in a dialog Pin
Chandrasekharan P19-May-11 1:35
Chandrasekharan P19-May-11 1:35 
GeneralRe: Embedding Excel in a dialog Pin
efraimyy19-May-11 2:58
efraimyy19-May-11 2:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.