|
DavidCrow wrote: All that aside, if you have a good algorithm, what you want can be accomplished on a decent-speed PC.
You might be right, but this is the job that they might do frequently, perhaps once a week. They want to make sure it will not take a long time (More than 1 hour or 2, perhaps).
I didn't calculate yet, but I'm sure it's a lot of processes. However I do agree that a good algorithm can convert hours of process to minutes or seconds. I experienced that already! But best algorithms should think a bit when it comes to 5,000,000,000 and more records of data.
//This is not a signature
while (I'm_alive) {
printf("I Love Programming");
}
|
|
|
|
|
Hi.
Find out what IBM system that you have access to. If it is an S390/ZOS or S390/Z-VM system, then you can easily write an EXEC employing PIPELINES to remove records that contain duplicate data. PIPELINES was specifically designed to handle this kind of situation; processing huge amounts of data easily and efficiently.
For more information, check the IBM website for 'CMS PIPELINES', this will tell you everything that you need to know. If you do not have any joy or need further help, let me know.
Regards.
James.
-- modified at 15:19 Friday 3rd November, 2006
|
|
|
|
|
Thank you for your informative information.
Within next week I'll travel to the city where everything is located. I'll soon check everything out and come back to code project, to ask more questions!
Now, I'm tring to find out some information about "CMS PIPELINES". Thank you very much again.
(I have heard something about pipe lines already. If I'm not wrong, it was the capability to convert one process to multiple processes and do multiple process simultaneously).
Thanks again, Mr. James.
-- modified at 22:35 Friday 3rd November, 2006
//This is not a signature
while (I'm_alive) {
printf("I Love Programming");
}
|
|
|
|
|
I need to Write a function that will, given an input string containing many words, split that string into individual words. For each word, the function should output the word, its starting index in the string, and its length to the console without using stream extraction operator.
#include <iostream>
#include <string>
using namespace std;
int main()
{
string sval = " The quick brown fox jumps over the lazy dog";
int cnt=1;
int nsep = sval.find(" ");
while (nsep > 0) {
cout << "Word " << cnt << "="
<< sval.substr(0,nsep) << endl;
cnt = cnt + 1;
sval = sval.substr(nsep+1);
nsep = sval.find(" ");
}
cout << "Word " << cnt << "=" << sval << endl;
#ifdef WIN32
system("pause");
#endif
return(0);
}
Thats where i am so far, it will just split it into words but will not work if it begins with a space or if there is more than 1 space between words. I believe i need s.find_first_not_of but not sure how to incorprate it or if thats even my problem
any help?
|
|
|
|
|
Ramper wrote: ...but will not work if it begins with a space...
So just remove leading spaces.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
wish it was that easy, has to be a string with a leading space and multiple spaces between words.
|
|
|
|
|
But do you have to have the leading space in the word strings?
--
Painstakingly Drawn Before a Live Audience
|
|
|
|
|
Ramper wrote: has to be a string with a leading space and multiple spaces between words.
While it's being parsed? That's a very odd requirement indeed.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I need to write some code that will encrypt an Office document (Word, Excel, Power Point, etc). There are a few caveats to this:
1) It needs to work even if Office is not installed on the current PC
2) It needs to work in basically any version of Office (probably back to 97 would be nice), preferably the current version installed on the PC if there is one
3) It needs to be as secure as possible given the version restrictions encountered above. (IE it should not be XOR if the user has Office 2003 installed)
4) It needs to work for all different types of Office files.
It really feels like there should be API code to do this, but so far I have not found it. I figured out how to do this in some of the apps, for example the Word code you create an instance of MSWord, make it not visible, and then use SetPasswordEncryptionOptions and Password in your _DocumentPtr object.
So my question is 2-fold:
1) Do I need to create code like this for each and every Office file type, or is there an easier/cleaner way?
2) How do I handle the version issue? If I write it for Office 97 will it work with all later versions? (This probably means I can't get great encryption...)
Any suggestions, starting points, or ideas would be appreciated! I've been all over Microsoft's sites and not too much luck!
Thanks,
Stretchcoder
|
|
|
|
|
stretchcoder wrote: I need to write some code that will encrypt an Office document (Word, Excel, Power Point, etc). There are a few caveats to this:
1) It needs to work even if Office is not installed on the current PC
Are you just wanting to encrypt a file as it resides on disk?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I want to use the OFFICE standard encryption, so that when a user tries later to open a Word doc he has to interact with Word to type in a password and access it. Basically I want it to look like the encryption was added via whatever Office App the file was created in.
For older versions I don't think there is "encryption", I would simply be password protecting the doc (or whatever)
Thanks,
Stretchcoder
|
|
|
|
|
Does this encrypted file need to automatically be encrypted or decrypted when you open the file in Word ( or other Office app. )?
does Word support encryption ?
|
|
|
|
|
So as far as "automatically" encrypting or decrypting, I want the user to have to use the Office app to type in a password to access the file, just as if I had clicked on Tools/Options/Security etc to set a password in the first place.
Thanks,
Stretchcoder
And yes, Office does support several flavors of encryption in 2003 (not sure about older versions) Click on Tools/Options/Security Tab Advanced to see a list of choices
|
|
|
|
|
hello,
what i am doing wrong? i can't destroy created window
LRESULT HookWnd::OnMsg(WPARAM wParam, LPARAM lParam)
{
i++;
theApp.FileWrite("Window Destroyed");
if(i>10) DestroyWindow();
return 0;
}
HookWnd::HookWnd()
{
CWnd::CreateEx(0, AfxRegisterWndClass(0), "invisible", 0, -1, -1, 0, 0, 0, 0);
}
how else can i destroy my window ?
-- modified at 15:08 Thursday 2nd November, 2006
|
|
|
|
|
What line of what file is asserting?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
edvintas wrote: i don't know.. but here is an error window: http://img73.imageshack.us/img73/7837/errorqt2.jpg[^]
Did you miss "line 979 of wincore.cpp?"
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
i think no
hmm i don't want to create one more topic so i will ask here, how to terminate MFC application in a proper way?
i always get error message when i call ExitInstance "Application was terminated in unusual way.. blah blah blah"
int CpKloggerApp::ExitInstance()
{
Delete();
FileWrite("pKlogger terminated");
return CWinApp::ExitInstance();
}
hmm its a bit annoying why i can't just delete delete delete...
anyway.. thank you for help in advance
|
|
|
|
|
Does it still happen if you remove the calls to Delete() and FileWrite() ? Have you stepped into CWinApp::ExitInstance() to note where that debug message is being printed from?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
if i remove delete() call there is no error but without delete CWinApp object isn't destroyed and application doesn't turns off and i can see it in task manager process list
|
|
|
|
|
|
edvintas wrote: ...without delete CWinApp object isn't destroyed...
The CWinApp -derived object does not get destroyed until it goes out of scope, which is one of the very last things to happen since it is a global variable. You need to debug into the Delete() call to see why it is misbehaving.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
when i debug my application it stops here:
***dbgheap.c***<br />
<pre>...
HERE>>> _ASSERTE(_CrtIsValidHeapPointer(pUserData));
...</pre><br />
<br />
but it says nothing for me :-O<br />
any ideas? :^)
|
|
|
|
|
edvintas wrote: but it says nothing for me
Me either, since you've not shown any supporting code.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
ok, short summary of my application: CWinApp creates thread and invisible window.
After 5sec. thread terminates and it should terminate the application but it don't.
BOOL CpKloggerApp::InitInstance()<br />
{<br />
hookThr = new pKhookT();<br />
hWnd = new HookWnd();<br />
m_pMainWnd = hWnd;<br />
return true;<br />
}<br />
pKhookT::~pKhookT()<br />
{<br />
theApp.m_pMainWnd->DestroyWindow();<br />
theApp.Delete();<br />
} thats all
i think i would better use win32api
in MFC to many mysterious sh*t happens however i almost like it
|
|
|
|