Questions tagged [header]

This tag is deprecated because it lacks discriminating power. Please use a more specific tag instead, e.g.: html-heading, email-header etc.

This tag is deprecated because it lacks discriminating power. Please use a more specific tag instead, e.g.: , etc.

13526 questions
59
votes
3 answers

What is the format for e-mail headers that display a name rather than the e-mail?

I'm trying to create a php script that will handle a mailing list for me using a mySQL database, and I have most of it in place. Unfortunately, I can't seem to get the headers to work right, and I'm not sure what the problem is. $headers='From:…
RonLugge
  • 5,086
  • 5
  • 33
  • 61
57
votes
6 answers

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…
Ashwin Nanjappa
  • 76,204
  • 83
  • 211
  • 292
56
votes
9 answers

error: Class has not been declared despite header inclusion, and the code compiling fine elsewhere

So I have a class included in another class that keeps throwing a compile error of the form "error: 'ProblemClass' has not been declared. The files are set up thusly: #ifndef PROBLEMCLASS_H #define PROBLEMCLASS_H #include #include…
gj5
  • 587
  • 1
  • 4
  • 5
56
votes
5 answers

PHP header() redirect with POST variables

I'm working with PHP, and I'm making an action page which a form posts to. The page checks for errors, then if everything is fine, it redirects them to the page where the data has been posted. If not, I need to to redirect them back to the page they…
Yoshiyahu
  • 2,089
  • 7
  • 22
  • 34
56
votes
6 answers

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

You know that if you want to redirect a 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…
Nicolò Martini
  • 5,182
  • 4
  • 32
  • 38
56
votes
3 answers

fatal error C1010 - "stdafx.h" in Visual Studio how can this be corrected?

I compile the following code but I get a compile error in Visual Studio that I cannot understand. #include using namespace std; int main() { int matchCount, findResult; long childPID; string userInput = "blank"; //…
user1800967
  • 953
  • 1
  • 6
  • 11
55
votes
5 answers

Is it better to remove "const" in front of "primitive" types used as function parameters in the header?

In the code review process, one of my coworkers mentioned to me that "const"s in front of "primitive types" used as a function parameter in a header is meaningless, and he recommended to remove these "const"s. He suggested using "const" only in the…
chanwcom
  • 4,420
  • 8
  • 37
  • 49
55
votes
1 answer

How to pass multiple header in Apache Benchmark

I need to pass multiple header in Apache benchmark. I have searched on SO and googled also,but no luck so far. ab -n200 -c100 -H 'clientId:test-client;token:93e6acff-2ef9-4c85-9d0b-c9948a8ee93b' http://127.0.0.1/oauth2/user/client/
dReAmEr
  • 6,986
  • 7
  • 36
  • 63
54
votes
2 answers

Default value for Access-Control-Allow-Methods

I just learned about the Access-Control-Allow-Methods header, e.g. Access-Control-Allow-Methods: OPTIONS, HEAD, GET I have never used this header (just Access-Control-Allow-Origin), but I have gotten CORS to work in the past. Is the default to…
Paul Draper
  • 78,542
  • 46
  • 206
  • 285
54
votes
3 answers

Force line break (
) in header (

) in Markdown

I'm trying to create a two-line

in Markdown, something along the lines of:

Title
byline

The Markdown docs say: When you do want to insert a
break tag using Markdown, you end a line with two or more spaces, then type…
David Moles
  • 48,006
  • 27
  • 136
  • 235

53
votes
8 answers

C++ #include guards

I have three classes, GameEvents, Physics and GameObject. I have headers for each of them. GameEvents has one Physics and a list of GameObjects. Physics has a list of GameObjects. I'm trying to achieve that GameObject is able to access or own a…
Orujimaru
  • 835
  • 2
  • 13
  • 18
52
votes
5 answers

Adding author name in Eclipse automatically to existing files

Is there a real easy to use tool (no monster tool) that I can plug into Eclipse, and press a "generate header" button and then the authors name appears in every file in that project?
Franz Kafka
  • 10,623
  • 20
  • 93
  • 149
52
votes
3 answers

How to set response header in JAX-RS so that user sees download popup for Excel?

I wrote code that generate Excel file using REST JAX-RS and I confirmed that the generated Excel file is in GlassFish server directory. But my goal is when user click on the button (which generate Excel .xls), I want download popup to show up asking…
Meow
  • 18,371
  • 52
  • 136
  • 180
52
votes
3 answers

Forward declare a standard container?

Is it possible to forward declare an standard container in a header file? For example, take the following code: #include class Foo { private: std::vector container_; ... }; I want to be able to do something like…
Rob
  • 76,700
  • 56
  • 158
  • 197
51
votes
4 answers

In IIS, can I safely remove the X-Powered-By ASP.NET header?

Will this cause any harm? Does it serve any purpose other than tell browsers you have .net installed? I like this article about changing the header to Pure Evil.…
ScottE
  • 21,530
  • 18
  • 94
  • 131