include

Include SVG file in SVG

I've got a linearGradient in the defs section of my SVG file, and reference it with fill="url(#myGradientName)". That works great so far. I think I should be able to put my whole defs section in its own SVG file, and then just reference that from all my SVG images. That is, something like: styles.svg: <svg xmlns=...> <defs> <l...

Apache: SSI inside SSI

Is there a way I can include include files inside include files? (Say that five times fast!) For example: Inside index.html: <!--#include virtual="/include-1.shtml"--> Inside include1.shtml: <!--#include virtual="/include-2.shtml"--> So the tree looks like this: index.html <-- include_1.shtml <-- include_2.shtml As is, this is n...

g++ header included: still doesn't find definition

Good evening :) I'm playing around with g++ and makefiles. I've gotten to this point: foo.h: #ifndef _FOO_H_ #define _FOO_H_ #include "bar.h" class foo { private: bar something; public: bool start(); bool stop(); }; #endif // _FOO_H_ Foo.h is eventually included in my main cpp file so I can set things in motion by cal...

Where has asm/timex.h and get_cycles() gone?

In an older linux distro I could call get_cycle() after including asm/timex.h. Now I changed to Kubuntu 9.04 and there is no asm/timex.h, plus in sys/timex.h there is no get_cycle(). Does anyone know why this changed, how to access this fuction/macro or a replacement for it? Or, even better, where to read information about it? Thanks in ...

In C++, how can I avoid #including a header file when I need to use an enumeration?

In my C++ header files I try to use forward declarations (class MyClass;) instead of #including the class header, as recommended in many C++ coding standards (the Google C++ Style Guide is one). Unfortunately, when I introduce enumerations, I can't do the forward declaration any more. Like this: //// myclass1.hpp //// class MyClass1 {...

Include relative files in PowerShell

I would like to include script files with such pseudo syntax: Include '.\scripA.ps1' But the only thing I have found is some thing like this: $thisScript = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent . ($thisScript + '.\scriptA.ps1') that is ugly. Is there some nice way to include scripts with relative paths? ...

C++ Undefined Reference (Problem with Include)

Hello! I cannot get this simple piece of code to compile without including the TestClass.cpp file explicitly in my main.cpp file. What am I doing wrong? Thanks in advance! Here is the code: TestClass.h #ifndef TESTCLASS_H_ #define TESTCLASS_H_ class TestClass { public: static int foo(); }; #endif TestClass.cpp #includ...

Include files in a command line with Ruby

When running ruby scripts as such ruby some-script.rb How would I include a file (e.g. configuration file) in it dynamically? ...

Is there a standard #include convention for C++?

This is a rather basic question, but it's one that's bugged me for awhile. My project has a bunch of .cpp (Implementation) and .hpp (Definition) files. I find that as I add additional classes and more class inter-dependencies, I have to #include other header files. After a week or two, I end up with #include directives in lots of plac...

How does inclusion of header file happen?

I have a plain C code with *.c and *.h files in the workspace. I have a header file 1.h declaring some structure as struct my1 { int a; .. .. }my_t; But when i try to declare a variable of type struct my1 in another header file 2.h as follows:- struct my1 variable1; It gives error at this declaration point. Looks like my1 is und...

Including different types of files in PHP

I took over a PHP project and I'm trying to get it running on my dev box. I'm a developer and not a sysadmin, so I'm having trouble getting it working. The previous developer used .h files to include PHP. My current configuration is taking that .h file and including it without executing it. What do I need to look for in my apache con...

How to add a global include path for xcode

I'd like to add ~/include to my include path for all projects while using Xcode, something like setting the environment variable CPLUS_INCLUDE_PATH in Linux. (See here for the related Linux question.) Is this possible in Xcode? I tried setting the above environment variable, but it doesn't seem to work. (And if it is possible, I'd like ...

PHP: "Global" Include

Current situation: I have the current version of my MVC Framework which uses classes as controllers. I have some "vintage" modules from my old MVC Framework which uses simple, flat includes as controllers. Much simplified that means: New Version: <?PHP class blaController extends baseController { private $intVar; function ...

Storing jquery code in external file and directory structure?

Hi there, Can anyone can confirm the best idea for storing jquery code, initially i was inserting everything in the HEAD of a document but i am seeing more and more code being used across pages, Is the best way to use include files .. with the extension .JS? Anything else or better with respect to this? What would be the best place...

Can an include file call a function from another include file?

I am new to working with jsp. The scenario is that all of the jsp pages will always have include file A. Some of these pages will need to call functions from include file B. My question is, can I call a function from include file A from functions inside include file B? Wikipedia says: It is as if the contents of the included file...

How do I include jsp pages in a Java web app without duplicating code?

Let me just start out by saying I am completely new to Java web apps, so I'm sorry if this is a very basic question. I am writing an app that has the ability for users to login to an account. The top part of each page contains an info bar (kind of like the top bar in GMail) with something like: Logged in as <userid> | Settings | Help ...

One large include file or several smaller ones?

I am writing some jsp and I am wondering if it would be better to have one large include file that I would include with every page or several smaller ones that I would include only on certain pages as needed. Any given page will only need to call a few methods at most ( < 5). If I use one file, it would be 2500+ lines of code. My mai...

PHP including in functions

I'm working on changing over a large, somewhat poorly written (but not terribly so), PHP website to use a class which stores functions which do things like write the standard page header with arguments to change things like the text of the header. The old version used a copied and pasted HTML header in each file with something like: <di...

Confused with -Include parameter of the Get-ChildItem cmdlet

From documentation: -Include Retrieves only the specified items. The value of this parameter qualifies the Path parameter. Enter a path element or pattern, such as "*.txt". Wildcards are permitted. The Include parameter is effective only when the command includes the Recurse parameter or the path leads to the ...

xml: is multiple level !ENTITY usage possible?

We are using XML to define a schema for controlling the contents which can be displayed in a diagramming tool. The schema file specifies what kinds of object can be placed on the diagram, how they can be linked together, and what properties these objects have (that is, what settable properties apper in the editor). When a new kind of di...