|
Hi all,
When do we need an empty class like?
class Foo{};
thanks in advance
regards
/rsasalm
|
|
|
|
|
Never, except in examples where we need a dummy class to show it's use, or visibility.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
Christian Graus wrote:
Never, except in examples where we need a dummy class to show it's use, or visibility
Sometimes in defining exceptions they are useful.
|
|
|
|
|
They have a role sometimes:
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
How to determine whether the new request header is coming from client in HTTP/1.1 Keep-alive Connections ?
|
|
|
|
|
Looking at the header and check for "Keep-Alive:" ?
|
|
|
|
|
How to check whether this is a NEW http-header ?
Do I have to check EVERY message or just the first ones?
|
|
|
|
|
M A V wrote:
How to check whether this is a NEW http-header ?
As opposed to what? An OLD HTTP-header?
Of course you have to parse every request the server gets.
If your question is instead "How do I know if it's a 1.1 or 1.0" request: Well, read the header. It's all there, in plain-text format. It's either "HTTP/1.0" or "HTTP/1.1".
Maybe a trip to this place can clear things up? Especially this page might prove useful.
|
|
|
|
|
How can I determine whether the data that was just received, is a HTTP-header?
I am writing HTTP proxy server application,it works ok with HTTP/1.0 and fails with HTTP/1.1...
For example, when the page contains some data wich needs to be loaded from other server this data is not displayed.
I think that browser, when configured to use HTTP/1.1 sends it's requests one after another without breaking the connection.
My code looks like:
Thread1(started on every connect from client):
recv(...);
// parse header get URL_to_connect
_beginthread(Thread2);
// wait here for Event..
while(!Thread1done && !Thread2Done)
{
recv(...); //from client
send(...); //to server
}
closesocket();
//Thread2
connect(server_ip);
// fire the Event...
while(!Thread1Done && !Thread2Done)
{
recv(); //from server
send(); //to client
}
closesocket();
I've read RFC, but found nothing concrete about this...
|
|
|
|
|
AFAIK you can't just recv() + send() to pass on any data to any server. You need to parse every request sent from the client to see f.ex. what server to pass on the request to.
|
|
|
|
|
Can anyone help me to detect the code pages of text strings?
I wish to know so that I could convert to and from!
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
|
|
|
|
|
If the only information you have is the strings themselves, you are out of luck. There is no way, short of reading the text, understanding what language it is and then start guessing what codepage for that language it uses.
|
|
|
|
|
How about if I have the text file?
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
|
|
|
|
|
You still only have the characters (the "text"). You can't possibly know anything about what language and code-page was used to produce that file without some kind of meta content, wether in the text itself or as an alternate stream for the file or whatever).
|
|
|
|
|
The "Advanced Save As..." dialog in the VS.NET seems to indicate the correct codepage. What is the magic here?
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
|
|
|
|
|
For a plain text file? I haven't got a clue. Named NTFS streams?
|
|
|
|
|
A code page is simply a mapping of a byte value to a glyph. Only a person can tell if text is being mapped using the right codepage - they have to look at the output and decide if it looks correct. To the computer it's all just bytes.
--Mike--
Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
So how does the VS.NET finds this out?
The Advanced Save As... popup indicates the correct code page of a text file, try it.
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
|
|
|
|
|
I want to integrate MSCOMM.ocx into another ATL component. First I create
a composite control in the ATL component. Second I insert the MSCOMM.ocx into
the component. It creates two files mscomm.cpp and mscomm.h. Then I declare a
variable of CMSCOmm class. I don't know how to bind the variable and the control ID( Like the MFC: DDX_Control ). So I attach the hwnd of the control to the variable. But when I run, it will throw an assert on the line:
ASSERT( m_pCtrlSite != NULL );
Who can help me solve this problem?
|
|
|
|
|
Hi everybody!
I have a typical problem here. My application is a multithreaded one. In one of the cases, there are multiple threads which will be using a common buffer which is a member variable of a particular class. This buffer is also allocated memory by one of these threads and to be accessed by the other threads. I am getting a dbg_heap error as debug assertion. How do i go about solving this problem. Please help me out as this is very urgent. Thanx in advance.
regards,
sailesh
|
|
|
|
|
If all of your threads are launched within the same program (i.e. there are no DLLs or external libs involved) then your problem most likely has nothing to do with multithreading issues, but rather chances are you're somehow corrupting the buffer (by writing out of its bounds, for instance.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Does anybody know some easy library or source code for voice
generation and recognation. I don't want to use windows
SAPI.
|
|
|
|
|
There are none.
Both subjects are inherently non-"easy".
|
|
|
|
|
Jep. I know, subjects are quite difficult. That's is reason I would
find them somewhere. Microsoft SAPI wuold be nice, but i don't
want to use it.
|
|
|
|
|
Kristian33 wrote:
Microsoft SAPI wuold be nice, but i don't
want to use it.
Why? Is it some random decision?
|
|
|
|