|
Thanks and rats.
I suppose I'll have to change the processing logic so I'm not trying to run DB and HTTP threads at the same time and reconnect dialup between DB calls.
|
|
|
|
|
I'm pretty sure in the case of TCP/IP, the microsoft stack implementation, in a multihomed
situation, will choose the adapter with the shortest path to the destination when making a
connection. Maybe it will just magically work(?). If there's not a gateway to the internet on
the LAN then wouldn't the HTTP connection choose the dialup adapter?
Mark
|
|
|
|
|
Hi,
Is it possible to colored days with DayState in a MonthCalendar. Now they are only bold.
I see no chance in WinApi?
MfG schirrmie
|
|
|
|
|
hi all,
the problem is
there are many icons in the system tray. i want to hide or delete one of the icons all ready present, how to get what icons are there visible or under hide inactive icon arrow mark,
do you have any idea how to get the list of icons from the system tray.
P.S. i dont want my icons to be added or deleted in the tray, i want icons of other application
Thanks
Swarup
|
|
|
|
|
See here for "enumeration" ideas.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
thanks a lot for the idea n help
|
|
|
|
|
hi guys,
i got the idea, if anyone needs help let me know i am willing to help my best.
|
|
|
|
|
There is documentation on the internet talking about a version 1.1 of GDI+ which implemets the Bitmap::ApplyEffect method.
Has this been released? There seem to be a lot of confused people asking where it can be found.
|
|
|
|
|
zaccheus wrote: Has this been released?
Have you checked here?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Yes, of course I checked.
Here is a link to the latest download I can find: Platform SDK Redistributable: GDI+
The DLL it contains is dated 04 May 2004 and has version 5.1.3102.1360 - this is not v1.1 as far as I can tell.
|
|
|
|
|
Yes it exists, no you cannot redistribute it. To my knowledge only Office 2003 ships with it.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
|
I need to decompress HTTP streams that have been compressed with "Content-Encoding: gzip".
The gzip website ( gzip.org ) says I should use the zlib library if I want to work with data in memory.
However, it just keeps giving me DATA_FORMAT errors.
Has anyone worked with this library before? If so, please lend a helping hand!
Is this the correct library to use for HTTP compression?
I am simply taking the compressed content body, and passing it to the uncompress() function, and the documentation is so sparse, I can't tell if I'm doing it correctly.
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
I have not used zlip to decompress a HTTP stream. However I use zlib to compress and decompress my own stream which is based on HTTP stream. While developing my routine I had to study the HTTP documentation (RFC). So, maybe I have an idea what could be the problem you have.
It is possible that the stream you read is 'Transfer-Encoding: chunked'. If so, trying to decompress in one gulp will not work. You probably have to decompress chunk by chunk.
Hope this helps. Keep this thread posted with your findings as I am interrested.
Louis.
Louis
* google is your friend *
|
|
|
|
|
ldaoust wrote: It is possible that the stream you read is 'Transfer-Encoding: chunked'. If so, trying to decompress in one gulp will not work. You probably have to decompress chunk by chunk.
Louis, That is a brilliant insight! I hadn't thought of that. I will try to implement that right away.....
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
Hi Louis, I think I have it figure out.
The content gets compressed before the chunking is applied, so it does need to be decompressed as a whole, not chunk by chunk.
However, your pointing me toward the transfer-encoding turned out to be what solved it, because I realized I was mishandling the chunks themselves. I was putting together the whole content without parsing the individual chunks to extract only the data, and not the chunk size.
Now I think I'm on the right track.
Thanks again for your brain power!
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
Great!
I am curious though. Should'nt it be possible to decompress chunk by chunk ?
I am assuming that chunk transfer is the right choice when sending binary data in a streaming fashion. Since the binary data can be large and dynamic it would be built as chunk then compress then sent out. Maybe thats not the way a web server does it for files. Maybe it is still possible to do it this way. Would need something in the HTTP header to identicate this behaviour.
My implementation does it chunk by chunk, but this is between propriatary server and propriatary client application. So far works very well.
Glad I could help.
Cheers.
Louis.
"Ambition without knowledge is like a boat on dry land"
-Mr. Miyagi
|
|
|
|
|
ldaoust wrote: Should'nt it be possible to decompress chunk by chunk ?
This is new to me, so I'm just going by what my O'Reilly book says. It says that the Content-Encoding is always applied before the Transfer-Encoding.
This implies that all the chunks have to be reconstructed before decoding, but if I turn out to be wrong, I'll post it here.
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
You can happily take each chunk in turn, reconstruct it from the encoding, and feed it into the decompressor.
Typically, what happens is that the original data is compressed (content-encoding), and then split into chunks (transfer-encoding). Since gzip (and the underlying zlib) is stream-oriented, you merely have to present the chunks in the right sequence, and typically it's a matter of using something like inflateinit2 followed by calls to inflate and finally inflateEnd.
Steve S
Developer for hire
|
|
|
|
|
Thanks for taking the time to give your input. You sound like you have experience with the library, thanks.
Now that you explain it, that's probably what Louis meant by what he said.
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
I'd like to use <vector> to create a multi-dimensional array holding
a string, int, int. . .
something like this
Name Wage Age Ranking
===== ==== === =======
Ben 9 29
Matt 16 38
.
.
Tom 21 50
Then I would like to use std::sort to sort first by age, then by wage. Then I'd like to rank them by wage within their age decade (twenties, thirties, etc.).
Though this is new ground for me (typically i'd hack something using linked list or a bubble sort; but i have seen
single array examples which are more efficient).
After the sort, I would like to rank by the first int ,"wage", creating
a table that can be presented in a Windows GUI app. It should be compatible with .NET (how is that different from what I'm accustomed to Visual C++ 6.0?]
Thanks
|
|
|
|
|
vinniez_ok wrote: It should be compatible with .NET
How do you mean - are you using C++/CLI, or do you mean you want it to work in VC++.NET, but not in .NET code ?
VC6 STL sucks, but writing a function object that works in VC6 shouldn't be a problem, and it iwll work in 2002/2003/2005, too. I believe I have an article on the topic of function objects, which seems to be what you want, on this site. Just search for my surname, and choose the article you need.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Thanks did so and found some useful code.
Not having experience with .NET, I'm not sure why there's this requirement.
Thanks Christian for your quick reply
Appreciated!
Vin
|
|
|
|
|
Hi Christian
What I have to do is a very small piece of code that sends a table from compiled C++ code to a Windows GUI.
I've been searching for days for something extremely simple to send 4 columns/10 rows of data out and can't find anything without a lot of clutter.
I realize it's not proper to ask for code but I don't anticipate having to do this again with my C++ code --Do you know of a posting or some tutorial that can pull off this very easy event?
Thanks much!
Vin
|
|
|
|
|
Would this be a good start?
import java.awt.event.*;<br />
import javax.swing.*;<br />
<br />
public class WinBlank {<br />
public static void main( String[] args ){<br />
JFrame jFrame = new JFrame("Blank window");<br />
WinHandler windowHandler = new WinHandler();<br />
jFrame.addWindowListener(windowHandler);<br />
jFrame.setSize(400, 200);<br />
jFrame.setLocation(50, 50);<br />
jFrame.setVisible(true);<br />
}<br />
}<br />
<br />
class WinHandler extends WindowAdapter {<br />
public void windowClosing(WindowEvent event){<br />
System.exit(0);<br />
}<br />
}<br />
|
|
|
|