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

Xcode: Copy Headers: Public vs. Private vs. Project?

I'm building a Cocoa Touch Static Library. How should I decide whether to copy a header file as public, private, or project?
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
76
votes
8 answers

What are the benefits of a relative path such as "../include/header.h" for a header?

I've reviewed questions How to use include directive correctly and C++ #include semantics and neither addresses this - nor do the others suggested by SO when I typed the title... What, if any, are the benefits of writing: #include…
Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
74
votes
3 answers

How to include header files in GCC search path?

I have the following code in a sample file: #include "SkCanvas.h" #include "SkDevice.h" #include "SkGLCanvas.h" #include "SkGraphics.h" #include "SkImageEncoder.h" #include "SkPaint.h" #include "SkPicture.h" #include "SkStream.h" #include…
Mark
  • 898
  • 1
  • 6
  • 9
74
votes
10 answers

Fixed header table with horizontal scrollbar and vertical scrollbar on

I have a problem with html/css sticky header + scrollbars. I am creating a program that requires scrollbars to show up once the containersize reaches a certain point(depending on resolution of the user). I am forcing a min-width on the second column…
Remco Bakker
  • 741
  • 1
  • 6
  • 3
71
votes
6 answers

c++ header files including each other mutually

I have two classes both defined in separate header files. Each file has a field that is type of other class. Now I included in header of each file the header of other file, but compiler is generating errors. What am i missing?
MegaManX
  • 8,766
  • 12
  • 51
  • 83
70
votes
15 answers

I have Python on my Ubuntu system, but gcc can't find Python.h

I am on a school computer, so I can't install anything. I am trying to create C code which can be run in Python. It seems all the articles I am finding on it require you to use #include I do this, but when I compile it complains that…
user979344
  • 842
  • 1
  • 7
  • 8
70
votes
2 answers

Origin evil.example in Request Header

I am trying to send form data to a webservice but below "Request Header" in the "Network" of the Chrome DOM I got the origin evil.example and referer "localhost:8080". Accept:application/json, text/plain, */* Accept-Encoding:gzip,…
69
votes
4 answers

Why memory functions such as memset, memchr... are in string.h, but not in stdlib.h with another mem functions?

I wonder, why such function as: -memset -memmov -memchr -memcpy Exist in string.h header file, but not in stdlib.h file, where there are other standard memory functions as dynamic memory allocation: malloc, calloc, realloc, free. Maybe it would be…
user1131997
69
votes
6 answers

How to make a .lib file when have a .dll file and a header file

I am trying to create an application in visual studio that will be able to access a .dll file that already exists. I need the application to call up routines. I also have a header file that already exists. I have been researching on the internet and…
hde
  • 715
  • 1
  • 6
  • 7
68
votes
11 answers

PHP generate file for download then redirect

I have a PHP app that creates a CSV file which is forced to download using headers. Here's the relevant part of the code: header('Content-Type: application/csv'); header("Content-length: " . filesize($NewFile)); header('Content-Disposition:…
Evan
  • 2,983
  • 8
  • 31
  • 35
68
votes
5 answers

PHP header redirect 301 - what are the implications?

I have example.com. If the user is logged in, it should load automatically example.com/option-X where X is a predefined choice of the user. So, I do this at the top of index.php: header("Location: /option-X"); But, if the user is not logged in, I…
Andres SK
  • 10,779
  • 25
  • 90
  • 152
68
votes
3 answers

How do I send a custom header with urllib2 in a HTTP Request?

I want to send a custom "Accept" header in my request when using urllib2.urlopen(..). How do I do that?
Joakim
  • 11,468
  • 9
  • 44
  • 50
68
votes
25 answers

Can I write C++ code without headers (repetitive function declarations)?

Is there any way to not have to write function declarations twice (headers) and still retain the same scalability in compiling, clarity in debugging, and flexibility in design when programming in C++?
thewreck
  • 721
  • 1
  • 5
  • 5
66
votes
10 answers

Difference between and ?

How come this code std::map m; m["a"]=1; compiles with (I'm using MSVC 2010) #include but not with #include ?
Valmond
  • 2,897
  • 8
  • 29
  • 49
66
votes
12 answers

RecyclerView header and footer

Maybe this question has been asked before, but I could not seem to find a precise answer or solution. I started using the RecyclerView, and I implemented it using the LinearLayoutManager. Now I want to add custom header and footer items, that differ…
Sandra
  • 4,239
  • 10
  • 47
  • 80