header

Enums: Can they do in .h or must stay in .cpp?

If I have something like: enum { kCP_AboutBox_IconViewID = 1, kCP_AboutBox_AppNameViewID = 2, kCP_AboutBox_VersionViewID = 3, kCP_AboutBox_DescriptionViewID = 4, kCP_AboutBox_CopyrightViewID = 5 }; in my .cpp can it go in the .h? More so, what other lesser know things can you put in a .h besides class definitions,...

Weird in Header Files

I have lines in header files that are like: public: //! @name Constructor / Destructor //@{ //! Constructor. CP_AboutBox( CP_Application_Imp *inOwnerApp ); virtual ~CP_AboutBox() throw(); //@} //! @name Instance //@{ static CP_AboutBox *Instance(); //@} //! @name Display //@{ ...

php header() above document root

I am trying to user header() to direct to a page above the document root. I'm running XAMPP so I'm trying to call a script above htdocs. My problem is it gives me the 404 error and can't find the document. My question: can you use header() to call a script above the document root or is it better to use an include() to accomplish this?...

accented words in email subject break spacing - how do I stop this?

We have a custom php email marketing app, and an interesting problem: If the subject line of the message contains a word with accents, it 'swallows' the spaces between it and the following word. An example: the phrase Ángel Ríos escucha y sorprende is shown (by at least gmail and lotus notes) as ÁngelRíos escucha y sorprende The p...

Invalidating cached content, If-Modified Headers?

I'm having a peculiar problem: PHP SCRIPT: // checks If-Modified-Since header (if nothing has changed) // Sends HTTP/1.0 304 Not Modified // Sends Cache-control: public, must-revalidate // exits // if NO If-Modified-Since or something has changed // builds content // Sends Last-Modified: [DATE TIME] // Sends Cache-control: public, mus...

php mail headers for outlook - the email arrives empty to outlook, and great to gmail to yahoo

mail($to, $subject, $message, $headers); the $header is: From: [email protected] Reply-To: [email protected] Content-Type: text/html; charset=iso-8859-1 X-Mailer: PHP/5.2.5 MIME-Version: 1.0 I built $header with those line and I changed the order in every way, putting the Mime in the beginning, at the end, moving the from ...

Making a DataGrid Column Header sortable in WPF using C#

I am using C# in Visual Studio 2008 and I have install the WPF Toolkit. I created a DataGrid in testtest.xaml. The ID and Parts $ columns have the ability to sort the DataGrid by clicking on their respecteive column headers. However, the column header Complete Date does not have that ability. I used the tag "DataGridTemplateColumn" t...

Group header files in C and/or Objective-C

I have on occasion used a header file purely to import a group of related header files that describe the interfaces on all public components of a module. This was done for convenience. Anyone using the module need only import the one header file. Is this practice recommended, and if so does said practice have a name? I am trying to name...

How can I invalidate a page in the browser cache from the client side?

I need the client (using javascript) to invalidate a page it has and essentially fetch a new version? I thought I could do it all with headers: http://stackoverflow.com/questions/1295397/invalidating-cached-content-if-modified-headers If there NO way to have the browser refresh its current cached version, with out making a new request ...

HTTP POST with custom header from iphone to PHP script. How do you read the header?

This code works, and I can see the request go out to my php script through charles with my custom header GUID attached. NSMutableURLRequest *loginRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:feedURLString]]; NSData *myRequestData = [NSData dataWithBytes:[myRequestString UTF8String]length:[myRequestString lengt...

msdn structure definitions license

is it ok to put struct definitions from msdn into gpl / opensource projects? How did the windows headers in mingw become free? ...

How to use Winsock 2?

How do I use Windows Sockets 2 in Visual Studio 2008. I'm using precompiled headers, so far what I have tried is: Included winsock2.h in my StdAfx.h file and entered WS2_32.LIB as an additional dependency in Project Settings I get these errors ------ Build started: Project: TestIVR, Configuration: Debug Win32 ------ Compiling... mai...

Axis2 SOAP Envelope Header Information

I'm consuming a web service that places an authentication token in the SOAP envelope header. It appears (through looking at the samples that came with the WS WSDL) that if the stub is generated in .NET, this header information is exposed through a member variable in the stub class. However, when I generate my Axis2 java stub using WSDL...

How do I show a tooltip for the header area of a Winforms ListView control?

I can set the ToolTip property of a ListView control, but that's for the whole control. Can I just have a tooltip for the Details View header area? ...

Trying to outpt vcard for download using zend framework - something wrong

Hi guys, I've added a download vcard option in my social networking system - however when I try to get it to download the vcard for some reason the vcard is downloaded as a raw file i.e. I need to rename it to be a vcf file in order to open as a vcard. I'm using the following code to send headers but for some reason its not working as it...

How to REDIRECT a web Page for every ten seconds

In simple there is any way to redirect a page for every ten seconds in PHP ...

Content-Length header always zero

I set a header in the following way: header('Content-Length: ' . filesize($strPath)); On my PC with ZendServer it works fine and I can download a file with the correct file size. On the production server, a Solaris with Apache and compiled PHP, I get a file with the file size equal to zero, so an empty file. Is there a config paramet...

export table to file with column headers (column names) using the bcp utility and SQL Server 2008

I have seen a number of hacks to try to get the bcp utility to export column names along with the data. If all I am doing is dumping a table to a text file what is the most straightforward method to have bcp add the column headers? Here's the bcp command I am currently using: bcp myschema.dbo.myTableout myTable.csv /SmyServer01 /c /t, ...

Read header files and do something before full photo upload happens

I am passing a GUID as a header and a photo as a body to a php file. The GUID is used to authenticate. If it's not valid, I want to end the call and I do this using die("GUID was expired"); This works fine, but my issue is that the whole photo is uploading before that gets called. This is bad for the user. I want to read the header a...

HTML Print Header & Footer

Is it possible to print HTML pages with custom headers & footers on each printed page? I'd like to add the word "UNCLASSIFIED" in red, Arial, size 16pt to the top and bottom of every printed page, regardless of the content. To clarrify, if the document was printed onto 5 pages, each page should have the custom header & footer. Does...