|
hey guys,
if anybody know any other, plz post them... i want to see many options
thanx
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
|
If you just want compression, look no further than zlib: http://www.zlib.net/[^]
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Take a look at Infozip (http://www.info-zip.org/[^])
AFAIK, both java.util.zip and Winzip are built on Infozip, so compatibility isn't an issue here.
I've been using it for years, no problem.
And it's free.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
|
Hi All.
I try to write some application and i use the function
_beginThread(...)....EndThread() and i don't understand how can i stop the running thread.
When i create 1000 thread i can stop some thread by using sleep - but what i want to do is to stop thread with some other way and make the thread to continue run when i need to.
( in java i can do in simple way "stop" and "notify" for continue thread run)
Thanks for any help.
|
|
|
|
|
See here.
"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
|
|
|
|
|
I just need to know how can i "say" the kernel of the operation system that the thread X will not be running until i will say it will.
|
|
|
|
|
Yanshof wrote: ...thread X will not be running until i will say it will.
So just use CREATE_SUSPENDED when creating it.
"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
|
|
|
|
|
The CREATE_SUSPEND flag is just for using ResumeThread(...) - but if the current thread is running ... how can i stop him and again set the thread continue running ? ( i guess that using ResumeThread again will make the thread run again )
|
|
|
|
|
Yanshof wrote: The CREATE_SUSPEND flag is just for using ResumeThread(...)
Wrong. Why would you even think that? When you call a function named ResumeThread() , what purpose would a CREATE_SUSPENDED flag serve? _beginthread()
Yanshof wrote: if the current thread is running ... how can i stop him and again set the thread continue running ? ( i guess that using ResumeThread again will make the thread run again )
Read the article I provided you. It plainly shows how to start, stop, suspend, and resume threads properly.
"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
|
|
|
|
|
Google does wonders
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Hi
I am new to C++
Just wondering if anyone can help out here.
I have a string consisting of all the letters of the alphabet.
eg: string Alphabet ("A B C D E F G H I J K L M N O P Q R S T U V W X Y Z");
I need to erase a particular letter of the alphabet within the string. eg H and then display the string back to the console app minus the letter erased.
I have tried playing around with Alphabet.erase() but so far have only managed to reduce the length of the string, not erase a specific character within it.
Can anyone show me how I could do this
Thanks in advance !!!
I really hate this darn machine;
I wish that they would sell it.
It won't do what I want it to,
but only what I tell it.
~Author Unknown
|
|
|
|
|
bool removeChar(const char& c)
{
if ('h' == c || 'H' == c)
return true;
return false;
}
string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
alphabet.erase(remove_if(alphabet.begin(), alphabet.end(), removeChar), alphabet.end());
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
To erase the letter, the previous solution works. The code below replaces the letter with a space:
wstring alphabet = L"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
wstring::size_type pos = alphabet.find(L'H');
if (pos != wstring::npos)
alphabet.replace(pos, 1, 1, L' ');
wcout << L'[' << alphabet.c_str() << L']' << endl;
-- modified at 15:54 Tuesday 19th September, 2006
|
|
|
|
|
Hello! Please help me!,
Is it possible to check how long you have been on the Internet?
can you check when you start Internet explorer och when you close Internet explorer or it there a better way? Please help me.
|
|
|
|
|
If you are wanting to tie it to browser activity, then I suspect a Browser Helper Object (BHO) is what you are after.
"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
|
|
|
|
|
Thanks do you have ant pointers where I can check and if there are any exemple?
|
|
|
|
|
When someone gives you a name, then google is all you need for more info.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
In addition to the link I already provided?
"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
|
|
|
|
|
I have a few nested splitters on my main screen and two of the panes use forms that are exactly the same in look and functionality except for a couple of strings. If there was a way I could send in some value to determine which stored procedure it should use to fill the list control, everything would be great and I could use an instance of the same class for both panes. But I create the formviews using RUNTIME_CLASS when creating the splitters.
While writing this post I've just thought about I could make the class I want to use a parent class, make two derived classes, each one calling the parent's constructor with the string or enum values I want. Something like this:
class CLeftFormView : public CMyFormView
{
};
class CRightFormView : public CMyFormView
{
};
This seems like it would work, but I wonder is there a better method for what I'm trying to do. Any suggestions are appreciated.
Thanks
|
|
|
|
|
Actually, that seems like a pretty reasonable approach to me. I'd definitely give it a go.
|
|
|
|
|
I'm reading a bunch of raw numerical data (floats representing verticies) from disk in one endian format, and need to convert it to another (flip the bytes around).
Currently I am reading the numbers one by one and bit-shifting them to the correct format, then placing them into their respective places in an array of verticies (float[3]'s).
I am trying to speed up this whole operation, and may be able to do so with a better method/algorithm. The following also may help:
- Each float is 4 bytes and needs a pure reversal of bytes - not bits (bytes 1234 become 4321)
- the floats are contiguous on disk
- I know ahead of time how many floats I will be loading into a given array
- The array will be pre-allocated to hold the right number of verticies
- I must keep (or end up with) the array two-dimensional (array of float[3]'s) for later OpenGL usage
not sure if reading them all in at once, and applying a macro-bit-shift would be faster?
Thanks for any help
|
|
|
|
|
nadiric wrote: not sure if reading them all in at once, and applying a macro-bit-shift would be faster?
Yes. Reading them in one at a time increases disk access (which is expensive). Reading them in as a block decreases the number of reads required to get your data.
Something along the lines of the following should work:
float endian_shift(const float& f)
{
float ret = 0.0;
ret |= (f << 24);
ret |= ((f >> 8) << 24) >> 8;
ret |= ((f >> 16) << 24) >> 16;
ret |= (f >> 24);
return ret;
}
ifstream fin;
fin.open("myfile.dat", ios::binary);
vector<float> myData(SIZE);
copy(istream_iterator<float>(fin), istream_iterator<float>(), back_inserter(myData));
fin.close();
transform(myData.begin(), myData.end(), myData.begin(), endian_shift);
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Thanks for the reply,
Just tossing a few other thoughts around...
Given the following:
- vertex is of type float[3]
- verticies is an array of SIZE vertex (verticies = new vertex[SIZE];)
- vertsfromfile is an array of (SIZE*3) floats
are the floats in "verticies" aligned one after the other in this fashion:
verticies[0][0]verticies[0][1]verticies[0][2]verticies[1][0]verticies[1][1]...and so on to allow for something like memcpy(verticies,vertsfromfile,(sizeof(vertex)*SIZE)) ?
or is this just crazy talk?
Thanks
|
|
|
|