|
Indeed - in my time as a tutor at university I found that to be the easiest means of detecting when people were copying their homework from others
|
|
|
|
|
how to view for example strstr function in code::block or anywhere?
i am using ubuntu.
|
|
|
|
|
If you have a copy of the source code you can look at the specific module that contains this function.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
A lot of those function are in header files. just search around (you should be able to "go the definition" in code::block
For VS2008, I found an implementation of strstr in atlstr.h (which is not STL btw).
Watched code never compiles.
|
|
|
|
|
Maximilien wrote: A lot of those function are in header files.
That's just the definition, not the source code.
Maximilien wrote: I found an implementation of strstr in atlstr.h
Which is only present if you have the ATL.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
STL code is mostly in the header file.
Watched code never compiles.
|
|
|
|
|
The templates may be, but they are not particularly easy to understand. Also OP asked about strstr() under Ubuntu (Linux).
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
And subject says "source code of STL functions"
Watched code never compiles.
|
|
|
|
|
google "gcc strstr source". lots of hits.
|
|
|
|
|
i don't know that recover source code is very difficult. as said i think i could find decleration or implementation of example strstr but didn't outcome for me.
|
|
|
|
|
Today I developed an application that generate EAN-13 Barcode. around 166 bar code is being generated and printed in two pages.
Now the problem I am seeing is operation is slow and heavy. It Sends 17.24 Mega Bytes of data to printer to print. And the entire process is really slow.
here is the steps to do so:
PrintDlg(...)
StartDoc(...);
StartPage(...);
DrawText(...);EndPage(...);
EndDoc(..);
Now the problem is data is too much for two page.
But even an 8 page mistake print is so fast that it ends printing before I reach to printer to stop. What's wrong with this way? more over is there a better way? or too much ink?
|
|
|
|
|
What perfomance is in case of two pages
and one code-image per page, please ?
They sought it with thimbles, they sought it with care;
They pursued it with forks and hope;
They threatened its life with a railway-share;
They charmed it with smiles and soap.
|
|
|
|
|
Thanks for your time,
In loop I create the image and add it to the page through HDC. Thus it create 168 Barcode is generated. and they are all in two pages only.
Now I am start to think may be the barcode creating process is not fast enough
|
|
|
|
|
Can you reduce the loop down to 1 move per page
and then check the time difference ?
Or trace a page "ready" event by the call of:
::MessageBox(NULL, _T("A page done"), _T("How long ?"), MB_OK);
before ::EndPage(..)
Also, the printer DC could be prepared by "1 bit-per-pixel" bitmap
and maybe by smaller "DPI" value...
They sought it with thimbles, they sought it with care;
They pursued it with forks and hope;
They threatened its life with a railway-share;
They charmed it with smiles and soap.
modified 20-Jul-12 7:45am.
|
|
|
|
|
I already did, it takes 3 munites
|
|
|
|
|
I already rewrite the application. its working better
|
|
|
|
|
Still 17 MBs will be sent ?
They sought it with thimbles, they sought it with care;
They pursued it with forks and hope;
They threatened its life with a railway-share;
They charmed it with smiles and soap.
|
|
|
|
|
I think it would. I didn't check it yet though. But I think it would, but because it creates raw data for printing, and it creates a bit mapped image of 6600x5100 size. but I know that the the data transfer will be faster than the last time
why 6600X5100
This printer is capable of printing 600 points in one inch and I didn't intend to change it.
|
|
|
|
|
Mohibur Rashid wrote: i got an application available in CodeProject. You should try posting your question in the forum at the end of the article so the author sees it.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Thanks for your time,
I should ask this. May be barcode generating process is slow
|
|
|
|
|
Mohibur Rashid wrote: May be barcode generating process is slow It depends on your code and your printer. I have my own barcode print routine which is fast enough for my purposes.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I watched it all. the data transfer is slow. But network is not slow. It actually take time to transfer data. The printer is high performance printer. I need to calculate how much time it takes time to generate single barcode
|
|
|
|
|
Mohibur Rashid wrote: I need to calculate how much time it takes time to generate single barcode If you mean inside your code then that's easy, just take the time at the start and end of your print process. If you mean from the PC to the printer I do not know of any simple method. Also different printers operate in different ways with regard to when they start printing relative to when the print data arrives.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Yeah, the program sucks. I re-write the entire code, took few hours. working fine and fast
|
|
|
|
|
Hi, dear all,
I create a DLL that will apply calculation.
class __declspec(dllexport) Class1{}
class __declspec(dllexport) Class2{}
class __declspec(dllexport) Utility{
static Class1* CreateCase1Obj(){
Class1* obj = new Class1();
return obj; }
}
Other application will use the Utility to get Class1 object as the following:
Class1* obj = Utility::CreateCase1Obj();
The error happens inside CreateCase1Obj() function while call "return obj;" and browser points to dbgheap.c file.
Can anybody tell me what cause this error? Thanks!
|
|
|
|