Questions tagged [include]

A provision that many programming languages provide to allow functionality defined in one file to be used in another.

include is a provision that many programming languages provide to allow functionality (code such as functions, classes, objects etc.) in one file or package to be referenced and used in another.

Example (PHP)

include './dir/file.php';

Resources

9740 questions
3
votes
3 answers

single big files for PHP or lots of small ones?

I have a server which I try to optimize for speed (php/mysql). From a speed standpoint, is it better to keep a big file with all my functions in it so as to have only one file to include? Or is it better to have many, small, task-optimized includes…
pataroulis
  • 55
  • 2
  • 6
3
votes
1 answer

Including the Expat library in Visual Studio 2013

I've downloaded a copy of Expat 2.0.1, which is basically a bunch of .h and .c files (see the complete directory in the screenshot below). To add the library to the VS 2013 project I'm working on, I went to Properties -> Configuration Properties ->…
Adam
  • 8,752
  • 12
  • 54
  • 96
3
votes
1 answer

How do I execute classes in Puppet

I just started using puppet. I don't know how to execute classes in puppet. I've my files "config.pp init.pp install.pp service.pp". For example install.pp : class sshd::install{ ... } Next, i declare my class in init.pp with "include…
NPTK
  • 31
  • 1
  • 3
3
votes
1 answer

How to Include external C library on windows

I am fairly new to C and I am trying to include a external library without using any IDE, only text-editor and the minGW compiler on windows cmd. The library is libPNG in this case, I would really like to understand how the process work not only for…
victorfts
  • 396
  • 2
  • 4
  • 16
3
votes
1 answer

Disable certain warnings for system headers

I'm usually compiling my projects with -Werror and some warnings turned on (like -Wsequence-point -Wcast-align -Wstrict-prototypes -Wstrict-aliasing). With these settings, on some platforms some headers produce warnings when included (which turn…
martinkunev
  • 1,364
  • 18
  • 39
3
votes
2 answers

C++ Specify Headers Include Directory in Code

Is there a way to specify include directories in the code, perhaps via a #pragma? I have my project setup as "src/" and "include/" folders. I am trying to compile in Visual Studio 2010, but I don't want to set it up in the project settings. Is there…
Verhogen
  • 27,221
  • 34
  • 90
  • 109
3
votes
2 answers

Include/exclude defined frames in Beamer

I have a large Beamer file with many frames. Based on the presentation purpose, I want to include/exclude certain slides from the presentation. Is there a way to define the frames at the end of the document and call them up when wanted? Something…
Angelica
  • 33
  • 1
  • 3
3
votes
1 answer

C# linq anonymous include

Is it possible in linq to use single include instead of this : _db.UserQuizes.Where(uq => uq.UserId == currentUserId && uq.QuizId == quizId) .Include(qz => qz.Quiz.VerbalQuizes.Select(q => q.Question.Answers)) .Include(qz =>…
ucnobi ucnobi
  • 255
  • 1
  • 5
  • 16
3
votes
3 answers

What does this Perl code do?

In cPanel, they tell you to insert this code into the beginning of Perl files. I'm not sure what it does. I've tried code with and without this in the beginning of the file and it seems to all work the same. I haven't tested that out with cron…
CheeseConQueso
  • 5,831
  • 29
  • 93
  • 126
3
votes
1 answer

How to PHP-Include from Root of Domain?

I have a file.php located in www.example.com/folder/. I want that file to use include command for files located in www.example.com/include/. If I simply use: It doesn't work, as it will try to search in the…
rockyraw
  • 1,125
  • 2
  • 15
  • 36
3
votes
4 answers

C - Scope of C Functions

I apologize if this is a beginner's question, but after working in C for a bit, I finally would like a bit of clarification on exactly what kind of files/functions are available to a function. I understand we can explicitly include other files with…
Victor3y
  • 816
  • 6
  • 11
3
votes
1 answer

jsp:include not working with Expression Language (JSP version 2.5, EL enabled)

I've read: Expression Language in JSP not working but it's slightly different. Using EL for referencing file works fine like the one below.
Meow
  • 18,371
  • 52
  • 136
  • 180
3
votes
1 answer

Included PHP scripts can't access $_POST when output buffering?

I have an HTML form POSTing to the following index.php: And in file.php, I am trying to access $_POST: ob_start(); session_start(); var_dump($_POST); $contents =…
William Linton
  • 840
  • 1
  • 7
  • 14
3
votes
2 answers

Inclusion problem

I have an inclusion pattern as follows: /* * Class1.h */ #ifndef CLASS1_H_ #define CLASS1_H_ #include "Class2.h" namespace Class1_namespace { class Class1 { Class2* Class2_ptr; void Class1_member() { (*Class2_ptr).Class2_method(); …
user383352
  • 5,033
  • 4
  • 25
  • 20
3
votes
3 answers

Using g++ to compile, how do I point it to other .h files?

I'm trying to compile a .cpp + .h file that includes newmat.h and tinyxml.h - I have libnewmat.a and libtinyxml.a in the same directory as my .cpp and .h files and I'm running g++ -lnewmat -ltinyxml test.cpp test.h but still getting newmat.h and…
ikline
  • 33
  • 1
  • 3
1 2 3
99
100