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
51
votes
3 answers

std::find 'error no matching function'

Say that I have a class A and a class B that look like that: Class A { private: int a; public : bool operator==(const A &) const; //other methods(...) } Class B { private: std::vector v; public: std::vector &get_v() {return v;}; const…
chiva
  • 535
  • 1
  • 4
  • 7
51
votes
13 answers

Your preferred C/C++ header policy for big projects?

When working on a big C/C++ project, do you have some specific rules regarding the #include within source or header files? For instance, we can imagine to follow one of these two excessive rules: #include are forbidden in .h files; it is up to each…
calandoa
  • 5,668
  • 2
  • 28
  • 25
50
votes
10 answers

Keeping all libraries in the Arduino sketch directory

I know that you are supposed to place any external libraries under the "libraries" folder of the arduino install directory, but I have a project that uses several libraries that I have created for the project and mainly to keep all that code self…
Adam Haile
  • 30,705
  • 58
  • 191
  • 286
50
votes
3 answers

C++ namespaces and defining classes in separate files

I want to make a namespace that will contain several classes as part of a "package". Do I have to declare all of the classes within the namespace? For example, if I have a "2dEngine.h" which defines the 2dEngine namespace, do I have to declare all…
guitar-
  • 1,051
  • 5
  • 15
  • 21
50
votes
8 answers

Hiding PHP's X-Powered-By header

I know in PHP, it sends the X-Powered-By header to have the PHP version. I also know by appending some checksums, you can get access to PHP's credits, and some random images (more info here). I also know in php.ini you can turn expose_php = off. But…
alex
  • 479,566
  • 201
  • 878
  • 984
49
votes
4 answers

Header div stays at top, vertical scrolling div below with scrollbar only attached to that div

I have 2 main divs, the header and a scrolling list contained in a div. I want the header to always remain at the top of the page, and the scrolling list below. The scrollbar should be attached to the scrolling div and not to the whole page, i.e.…
Garywoo
  • 607
  • 1
  • 6
  • 9
49
votes
6 answers

php refresh current page?

I have a page which, If a variable is set(in a session) it will do an action, then it unsets the session. Now it has to refresh itself. This is where i am stuck. Is there a way to get the exact url to the current page? or is there a function to do…
Hailwood
  • 89,623
  • 107
  • 270
  • 423
49
votes
2 answers

PHP get pdf file from base64 encoded data string

I have a base64-encoded string containing a pdf. How to create a .pdf file from this encoded string using php? Something like Content-type:application/pdf in header function? this is the base64 encoded string
Jenson M John
  • 5,499
  • 5
  • 30
  • 46
49
votes
2 answers

IIS and Static content?

According to Ultra-Fast ASP.NET: Chapter 3 - Caching: Files that the browser retrieves from the server should be stored in the browser’s cache as long as possible to help minimize server round-trips. But how does IIS know what a static…
Royi Namir
  • 144,742
  • 138
  • 468
  • 792
48
votes
2 answers

Combining the meta description and Open Graph Protocol description into one tag

Is it possible to combine the meta description and Open Graph Protocol description… …into one when they contain…
Boost Ventilator
  • 483
  • 1
  • 4
  • 7
48
votes
1 answer

Header Origin vs Host

I have a question about the working of the Origin and Host HTTP headers. I have an Ajax page "Page A" which will call the Ajax feed "Page B". I saw that the request header of "Page B" from the Ajax call contains the headers: Origin:…
user192344
  • 1,274
  • 6
  • 22
  • 36
48
votes
2 answers

What encoding string tells a web server NOT to send gzip content?

This encoding header tells a web server to send gzip content if available. 'accept-encoding': 'gzip,deflate,sdch', How can I instruct the web server to send plain text and not gzip the content? I am aware that the web server can simply ignore this…
saeed
  • 3,861
  • 3
  • 25
  • 23
48
votes
2 answers

cstdio stdio.h namespace

I see this line from the c++ reference for cstdio: Every element of the library is defined within the std namespace. but I tried the code: std::printf("hello world"); printf("hello world"); is it true that C++ headers puts the names in both the…
danny
  • 1,095
  • 2
  • 12
  • 27
47
votes
5 answers

How to check if jQuery.ajax() request header Status is "304 Not Modified"?

How to check if jQuery.ajax() request header Status is "304 Not Modified"? jqXHR.status usually returns 200, even when requested header is "304 Not Modified". ifModified:true does not help a lot because it breaks XHR data request.
Binyamin
  • 7,493
  • 10
  • 60
  • 82
47
votes
4 answers

What use is the 'encoding' in the XML header?

Looking at the XML header Am I right to state that the encoding attribute is coming too late (you can't read it properly unless you know the encoding...) redundant, hence error-prone: it's…
xtofl
  • 40,723
  • 12
  • 105
  • 192