header

C++ from SpeakHere in iPhone app

Hi guys, I've made a template app where I've grabbed the recording part of the SpeakHere example and removed the file handling part, but I'm struggeling to get the C++ part of the app working right. As soon as it enters the C++ class, it gets syntax errors. If I don't import the header files from C++ (and then of course don't use the co...

How can I avoid explicitly declaring directory paths in C or C++ #include directives?

Hi, I am making a simulator and have written lots of files and headers. The problem is whenever I include a file I give the relative path of the particular file. For example a typical code in my application would begin like #ifndef AI_H #define AI_H #include <cstdlib> #include "../world/world.h" #include "pathPlan.h" #include "skil...

Why do firefox/chrome show a different page than IE8?

When I look at this published Google Docs document, I see the latest version with Firefox and Chrome, but an older version with IE8. Also, screen-scraping it via PHP/Curl gives me an older version. I've tried CTRL-Refresh in IE8 but I can't get it to show me the newest version. No matter what headers I try to change in PHP/Curl, I can...

Page specific CSS styling, but where to put the code?

Hi. :) Apart from the global.css i'm including in my header.php, i would also like to load certain page-content specific styles. But since my <head></head> is already covered by my header file, and i don't wish to resort to inlines, what is the best way to place the styles on the specific page? Thanks ! :D ...

sniffing http headers on an embedded device

Is there any light weight tools which can filter and output http headers/responses in human readable form? Something like wireshark. I have tried tcpdump; but it is hard to read. ...

HTTP: guidelines for common User-Agent: headers?

I'm sure there's no official standard, but are there some guidelines for identifying and classifying browsers based on the User-Agent string they send? ...

Why I have to call 'exit' after redirection through header('Location..') in PHP?

You know that if you want to redirect an user in PHP you can use the header function: header('Location: http://smowhere.com'); It is also well known that it is a good practice to put also an exit; after the header call, to prevent execution of other php code. So my question is: could the code after the header-location call be effectiv...

Are table headers only for the top row in html?

Hi, I always see the th tag only used in the first row of the table. Is there some specific reason why it can't be used to create 'left' headers along the leftmost column. Is this bad form, or is this ok. Basically, a table with headings on the top row and the leftmost column, with the very top left square being empty. e.g. <table> ...

What is sys/user.h used for ?

I was inspecting the code of a linux application and i saw the #include in one of the code files. I tried looking it up on opengroup.org but i couldn't find it there, this is what the sys directory looks like: http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/ . I guess it's not standard header file, but i checked it in my /usr...

Is there a way to define C inline function in .c file rather than .h file? (Xcode)

As I know, C inline function body should be defined in .h file because it causes an error 'function-name used but never defined" if body defined in .c file. Is this the regular way? Or how to define inline function body in .c file? ...

Need help in downloading file with header() function

Hi. I'm trying to explain as best as I can, sorry for my English. I have a list of links, each linked to a php file with an id by parameters (ex. download.php?id=1 or ?id=2 and so on). This file create a new instance of a class witch return the correct header of the files so it displays the save dialog box of the browser. Now I need to ...

Split and add header on the command line

What's the easiest way to split a file and add a header to each section? The unix split command does everything that I need minus being able to add a header. Any easy way to do it with existing tools before I script it up? ...

404 header - HTTP 1.0 or 1.1?

So why does almost every example I can find (including this question form about a year ago) say that a 404 header should be HTTP/1.0 404 Not Found when we've really been using HTTP 1.1 for over a decade? Is there any reason not to send HTTP/1.1 404 Not Found instead? (Not that it matters all that much... I'm mostly just curious.) ...

CSS Relative sized header/footer

Hi I'm not a CSS expert so I might be missing something obvious. I'm trying to set a relative size header and footer (so that on larger monitors, the header and footer are larger than on smaller screens). To do this, I'm using a percentage height. However, this only works if I set the position to absolute. The problem is, setting it t...

JQuery printfunction: no content, no view

I got a JQuery printfunction: function doPrintPage() { myWindow = window.open('', '', 'titlebar=yes,menubar=yes,status=yes,scrollbars=yes,width=800,height=600'); myWindow.document.open(); myWindow.document.write(document.getElementById("studentnummer").value); myWindow.document.write(document.getElementById("Voornaam").v...

How can I format date for "expires" value in manual Set-Cookie header in VBScript?

I'm adding a header for Set-Cookie manually, in VBScript, so that I can include HttpOnly. When I make a Set-Cookie header that includes this expires value: expires=5/13/2010 9:57:35 AM; Internet Explorer 8 does not set the cookie (FireFox does). This is what expires date formatting look like when set by Response.Cookies("cookieName"...

best alternative to in-definition initialization of static class members? (for SVN keywords)

I'm storing expanded SVN keyword literals for .cpp files in 'static char const *const' class members and want to store the .h descriptions as similarly as possible. In short, I need to guarantee single instantiation of a static member (presumably in a .cpp file) to an auto-generated non-integer literal living in a potentially shared .h ...

"Expected initializer before '<' token" in header file

I'm pretty new to programming and am generally confused by header files and includes. I would like help with an immediate compile problem and would appreciate general suggestions about cleaner, safer, slicker ways to write my code. I'm currently repackaging a lot of code that used to be in main() into a Simulation class. I'm getting a c...

Displaytag table exported header column contains span tags

Hi, When I export the content of the display tag table I use the data shows up fine, but the header cells are surrounded by html span tags, which is slightly annoying. I can imagine why Displaytag uses spans around the column header's text, but it shouldn't transpose in the exported data I think. Here is my displaytag.properties con...

C++ HW - defining classes - objects that have objects of other class problem in header file (out of scope?), (also redefining operators, read in out)

This is my first time with much of this code. With this instancepool.h file below I get errors saying I can't use vector (line 14) or have instance& as a return type (line 20). It seems it can't use the instance objects despite the fact that I have included them. #ifndef _INSTANCEPOOL_H #define _INSTANCEPOOL_H #include "instance.h" #inc...