header

parse http response header from wget

Im trying to extract a line from wget's result but having trouble with it. This is my wget call: $ wget -SO- -T 1 -t 1 http://myurl.com:15000/myhtml.html --18:24:12-- http://xxx.xxxx.xxxx:15000/myhtml.html => `-' Resolving xxx.xxxx.xxxx... xxx.xxxx.xxxx Connecting to xxx.xxxx.xxxx|xxx.xxxx.xxxx|:15000... connected. HTTP re...

Forward declare an STL container?

Is it possible to forward declare an STL container in a header file? For example, take the following code: #include <vector> class Foo { private: std::vector<int> container_; ... }; I want to be able to do something like this: namespace std { template <typename T> class vector; } class Foo { private: std::vector<in...

PHP open another webpage with POST data

I'm new to PHP and I'm trying to do something that may be bad practise and may well be impossible. I'm basically just hacking something together to test my knowledge and see what PHP can do. I have one webpage with a form that collects data. That is submited to a PHP script that does a bunch of processing - but doesn't actually display ...

Display Headers in Infragistics ULTRAGRID when no data in table

In VB.NET i am fatching data from table using Dataset(SQL server 2008). When there is data in table it displays data properly in the GRID but when there is no data in the Table it shows the grid's basic view. How can i display the column name of the tables as Headings of the ULTRAGRID even when there is no data in Table??? ...

#include header guard format?

I know it makes little difference to a project but, assuming you use #defined header guards for your C++ code, what format do you use? e.g. assuming a header called foo.hpp: #ifndef __FOO_HPP__ ... #ifndef INCLUDED_FOO_HPP ... #ifndef SOME_OTHER_FORMAT I'm sold on the idea of upper-case #defines but cannot settle on a format for th...

[WPF] AccessKey/Hotkey in custom textual MenuItem.Header possible?

Is it possible to access the following formatted menu item like any other standard menu item (using the underscore-method, e.g. "_File" would be accessible by pressing "f")? I would like to use "O" as "access key" here. Unfortunately, <AccessText> does not seem to be usable directly (I imaginged something like <AccessText Visibility="...

c++ array declaration in a header

Hi, I was wondering if it is possible to declare an array (size not known at this time), as a private member of a class and later set the size in the constructor of the class. For example: class Test { int a[]; public: Test(int size); }; Test::Test(int size) { a[size]; // this is wrong, but what can i do here? } Is this possible o...

How can I remove default banner of web server from response - Apache http1.1 coyote

Please let me know how can I remove default banner of web server from response - Apache http1.1 coyote ...

HTTP headers encoding/decoding in Java

A custom HTTP header is being passed to a Servlet application for authentication purposes. The header value must be able to contain accents and other non-ASCII characters, so must be in a certain encoding (ideally UTF-8). I am provided with this piece of Java code by the developers who control the authentication environment: String f...

What is the proper way of setting headers in a URLConnection?

My code is like the following: URLConnection cnx = address.openConnection(); cnx.setAllowUserInteraction(false); cnx.setDoOutput(true); cnx.addRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"); InputStream is = cnx.getInputStream(); Is it ok if I set the headers before I get the InputStr...

Where does Visual Studio look for C++ Header files?

Okay, C++ newbie question here. I checked out a copy of a C++ application from SourceForge (HoboCopy, if you're curious) and tried to compile it, but Visual Studio tells me that it can't find a particular header file. I found the file in the source tree, but where do I need to put it so that it will be found when compiling? Are there ...

Adding a directory for the headers in a Makefile

Hello I would like to ask you, If someone knows how can I add a directory for the header files in the Makefile to avoid the error *.h not found, I have tried this option but does not work: INC_PATH := -I /directory/to/add ...

Where does gcc look for C and C++ header files?

On a Unix system, where does gcc look for header files? I spent a little time this morning looking for some system header files, so I thought this would be good information to have here. ...

C++ class header files organization

What are the C++ coding and file organization guidelines you suggest for people who have to deal with lots of interdependent classes spread over several source and header files? I have this situation in my project and solving class definition related errors crossing over several header files has become quite a headache. ...

C++ Huffman Code Header

Hello, basically, I've got my Huffman table as std::map<std::string, char> ciMap; Where string is the bit pattern and char is the value represented by said pattern. The problem is how do I store that as a header of my compressed file so I can build again the same map when I want to decode it? Trying to store it as binary: size_t m...

GridView - Show headers on empty data source.

In C# how do I still show the headers of a gridview, even with the data source is empty. I am not auto generating the columns as they are all predefined. Currently what I am doing is the following. Get a DataTable back from a stored procedure, then set the DataSource of the gridview, and then call DataBind(). This works fine when I...

Sharepoint stripping HTTP Headers

I have a custom sharepoint app whose security model depends on an HTTP header. When a request is made from the mobile device, an http header called HTTP_RIM_DEVICE_EMAIL is added to each request. I grab the http header via the following method: private static string GetValueFromHeader(string headerName) { HttpRequest...

Uses for anonymous namespaces in header files

Someone asserted on SO today that you should never use anonymous namespaces in header files. Normally this is correct, but I seem to remember once someone told me that one of the standard libraries uses anonymous namespaces in header files to perform some sort of initialization. Am I remembering correctly? Can someone fill in the deta...

How do I add a name.value to the header when generating a soap message from ruby with soap4r

I've created a driver from wsdl When I invoke my request, I would like the header to contain an element, i.e, I want to see something like the following: REPLACE_WITH_ACTUAL blah blah blah However, looking around, everyone talks about subclassing SOAP::Header::SimpleHandler and then injecting an instance into t...

Code is HttpClient or servlet API to parse Cookie header

Is there any existing code in Apache HttpClient or in the servlet API to parse Cookie header and obtain from a string that contains "name1=value1; name2=value2; ..." a list of Cookie? Writing code to parse this doesn't seem too hard, but if there is already some existing code, I'd like to use it. ...