|
thanks robert
Robert Edward Caldecott wrote: each "folder" consists of a single file, which is plain text and contains all the email messages delimited with "From - date". I maintain a separate binary index file for each "folder" that contains a list of messages and their position in the main mbox file
But we have to write our own parser(non buggy) for the Index and Mail file
I hope SQL queries in MDB gives more customizable(and faster) filters than our own file format
Robert Edward Caldecott wrote: This isn't too far away from how Mozilla Thunderbird works.
If MDB is not the right way to go Is there any Component/Library which handles the parsing for me ?
thanks again
|
|
|
|
|
Is there any MDB data VS (MS)XML data parsing/query/filtering performance review on the net ?
|
|
|
|
|
I want to save only three 1)EURUSD,2)USDJPY,3)GBPUSD
market data coming from remote server in a txt file .But in this code all the market data are saved.How to save only paricular data.
I have write a comment line before 'if' statement where i have problem for this.
<br />
void CWartz_newDlg::OnPriceChangeArielapictrl1(LPCTSTR SessionId, LPCTSTR RequestId, short MarketNo, LPCTSTR Market, LPCTSTR Bid, short BidDirection, LPCTSTR Ask, short AskDirection, LPCTSTR High, LPCTSTR Low, short MarketState, LPCTSTR Timestamp) <br />
{<br />
<br />
<br />
sessionid=SessionId;<br />
CurrentRequestId=RequestId;<br />
CString MarketSt,a,b,c,d;<br />
<br />
a.Format("%d",MarketNo);<br />
b.Format("%c",BidDirection);<br />
c.Format("%c",AskDirection);<br />
iMarketNo=MarketNo;<br />
aMarketNo.Add(MarketNo);<br />
<br />
d.Format("%d",MarketState);<br />
<br />
m_MainEdit=m_MainEdit + "<Price Change>" + SessionId + "\t" + RequestId +"\t"+ a ; <br />
m_MainEdit=m_MainEdit + "\t"+ Market + "\t" + Bid + "\t" + b + "\t"+ Ask + "\t" +c +"\t"+ High + "\t";<br />
m_MainEdit=m_MainEdit + Low + "\t" + d +"\t" + Timestamp + "\r\n";<br />
<br />
UpdateData(FALSE);<br />
iLineCount=m_EditCtrl.GetLineCount();<br />
m_EditCtrl.LineScroll(iLineCount);<br />
<br />
<br />
<br />
<br />
if(Market="EURUSD",myfile.Open("EurUsd.txt",CFile.modeCreate | CFile.modeWrite))<br />
{<br />
<br />
LPSTR buf;<br />
int i = m_MainEdit.GetLength();<br />
buf = m_MainEdit.GetBuffer(i);<br />
myfile.Write(buf,i);<br />
myfile.Close();<br />
}<br />
}<br />
And like this way i have to make three txt file:
1)EURUSD.txt
2)USDJPY.txt
3)GBPUSD.txt
Thanks. Pls help me
-- modified at 4:51 Thursday 7th September, 2006
|
|
|
|
|
Pls use the below code......
CString csMarket = "EURUSD";
if( csMarket == Market )
{
myfile.Open("EurUsd.txt",CFile.modeCreate | CFile.modeWrite));
LPSTR buf;
int i = m_MainEdit.GetLength();
buf = m_MainEdit.GetBuffer(i);
myfile.Write(buf,i);
myfile.Close();
}
|
|
|
|
|
Sorry it is also saving all market detail.Do you have any other idea
|
|
|
|
|
maybe EURUSD is in all your data
|
|
|
|
|
No it is market name and for these whenever change in data in server side it will come.It is not in all.
I want to make three .txt file
1)EURUSD
2)USDJPY
3)GBPUSD
Thanks
|
|
|
|
|
if you run this line if(Market=="EURUSD")
whats happening?did you trace line to line your program?
|
|
|
|
|
WhiteSky wrote: if you run this line if(Market=="EURUSD")
whats happening?
The condition will never evaluate to TRUE.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
abrakadbra wrote: Sorry it is also saving all market detail.Do you have any other idea
So have you bothered to set a breakpoint on the if(csMarket == Market) statement to check the value of Market ? It may surprise you to find it is always equal to EURUSD.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
abrakadbra wrote: if(Market="EURUSD",myfile.Open("EurUsd.txt",CFile.modeCreate | CFile.modeWrite))
This should probably be:
if (lstrcmp(Market, "EURUSD") == 0)
{
if (myfile.Open("EurUsd.txt", CFile::modeCreate | CFile::modeWrite))
...
}
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Is it possible to create / open file in HardDisk programmatically from CD?
I want to write the application that it is to create / open file in HardDisk programmatically from CD
|
|
|
|
|
Can you be more specific you need to read from cd and write to hard
|
|
|
|
|
If I understand the question correctly...
As far as I know ... Yes it is possible.
I mean everytime you install something from a CD, the application your installing performs these actions...
Only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
yes it is possible, just the same as you would with any other exe. But if you are running software from a CD, you need to make sure it doesn't require the use of it's current directory for any temp files or writing operations.
You may also want to use an 'autorun' file, which would enable your user to run the exe without double clicking it.
|
|
|
|
|
The answer to your question is yes: you can program a virus which is distributed on CD and messes around whith the user file system automatically when it is inserted.
... and there are special locations to where you can write files that will execute automatically whenever the user's computer boots!
Isn't it wonderful? The extraordinary things one can do with computers??
:-P
Rilhas
|
|
|
|
|
I have written a Mesage Handler function ,which handles a user defined message. This function is not called for the first time when a button is clicked while it is called at all other times after clicking it for the first time. This happens in case of Windows 98 only while it runs fine on NT.
|
|
|
|
|
Can you please show me that function declaration and defenition
RinuRaj
|
|
|
|
|
chakor123 wrote: which handles a user defined message
If its a user defined message, how it's getting called on button click.
Do you mean to say , you have written message handler for button click?
Can you provide some more info? like,how its created, is it on dialog , etc?
|
|
|
|
|
This is what i have written.
ON_MESSAGE( WM_REMIND_REGISTER_REAL, OnRemindRegisterRealOk )
afx_msg LRESULT OnRemindRegisterRealOk( WPARAM wParam, LPARAM lParam );
LRESULT CLobbyDlg::OnRemindRegisterRealOk( WPARAM wParam, LPARAM lParam )
{
if( (BOOL)lParam == TRUE )
{
// set up real money account
OnBtnCashierSetup();
}
return 0;
}
|
|
|
|
|
but OnRemindRegisterRealOk , will be called when you use SendMessage/PostMessage for this dialog( using message WM_REMIND_REGISTER_REAL).
How does it related to get called on button click? I think OnBtnCashierSetup is you button click handler.
|
|
|
|
|
Both new and malloc() are pretty much covered, buth I can find nothing about the other memory manipulation functions. What is the difference between CopyMemory() and memcpy() , is one safer than the other? Is one faster? Will one pay me if I use it?
|
|
|
|
|
Hi,
MemoryCopy() :
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/copymemory.asp">http:
memcpy() :
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt_memcpy.asp">http:
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_memcpy.asp">http:
Only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Well thankyou for the very useful links, but I already know what the functions do and how to use them. My question was "what is the difference between them?"
|
|
|
|
|