include

Inheritance issue when wrapping (inheriting) from a C++ library

The library I'm using has class G and class S which inherits G. I needed to add functionality to them, so I wrapped G and S, rather I inherited from them making Gnew and Snew respectively. So, my inheritance is: G --> Gnew | v S --> Snew But, I want to use Gnew in Snew and when I try to include the Gnew header...

How to have included/required scripts use local files

My situation: I have a class that I want to use in a number of places, so I placed it high in the directory tree: /www/libs/classA/classA.php It uses a config file located in the same directory called config.ini and references it locally in the constructor. However, when I include it from a script in a different directory, it tries to...

What's the best way to share JARs across multiple projects?

When you have multiple projects that all use the same set of JAR libraries, it's tedious to include the same JARs over and over again with each project. If I'm working on 20 different projects, I'd rather not have 20 of the same exact set of JAR files lying around. What's the best way to make all those projects (and new projects as well)...

Php include annoying top margin

I don't know why every time I try to include my header using PHP’s include there's a top margin. I checked it using Firebug and it says there's a 22px offset margin on the top. Is anybody experiencing this problem? I think it's a CSS propiety: top: 22px. But nothing can change it even if I write h1 style="top: 0px; margin-top: 0px;". I t...

PHP / Zend complains about undefined variables.

The situation: index.php: <?php include("foo.php"); include("baz.php"); foo("bar.php"); ?> baz.php: <?php $x = 42; ?> foo.php: <?php function foo($p) { include_once($p); // please dont mind the inclusion hole } ?> bar.php: <?php echo $x; ?> Zend notice: Undefined variable: x Placing global $x;...

PHP: include function is blocked

My PHP files are not able to call the include function anymore. I suppose my hosting changed php settings. Is there any workaround to this problem? Can I enable the include function in php.ini/.htaccess files? How? My host is using PHP version 4.4.9. EDIT - All the files that I am trying to include are local files and not files on anoth...

How to resolve XSL includes in a Transformation that loads XSL from a String?

.NET 2.0/VS2005 I am trying to use the XslCompiledTransform class to perform a XSL Transformation. I have two XSL files, the first of which includes a reference to the other in the form of an <xsl:include> statement : Main.xsl: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; <xsl:include href="Incl...

cl.exe Difference in object files when /E output is the same and flags are the same

Hello: I am using Visual Studio 2005's cl.exe compiler. I call it with a bunch of /I /D and some compilation/optimization flags (example: /Ehsc). I have two compilation scripts, and both differ only in the /I flags (include directories are different). All other flags are the same. These scripts produce different object files (and not j...

Add include directory to scons

I have a project which has been checked out of Subversion and uses Scons for building. However, I have a library installed on my computer which Scons doesn't detect - it just says that the include file can't be found. Is there any way that I can direct Scons to the library location without altering the Sconscript file at all (because I...

Programatically include JQuery in high conflict environment -

I'm writing a snippet of code to be put on any third party website and have NO idea what environment it will be dropped into. My end goal is for the badge to be <script src="http://example.com/js/badge.js"&gt;&lt;/script&gt; I would like to use jQuery in my badge code to make my life easier, but I don't want to require another includ...

Access Gnu C library under Windows

I'm trying to compile a C program that I downloaded off the internet using cl.exe at the command line in Windows. This file includes gnu C library files such as getopt.h and unistd.h, which are not available by default under Windows. How can I gain access to these (while still using the cl.exe compiler). Thanks. ...

Clean up your #include statements?

How do you maintain the #include statements in your C or C++ project? It seems almost inevitable that eventually the set of include statements in a file is either insufficient (but happens to work because of the current state of the project) or includes stuff that is no longer needed. Have you created any tools to spot or rectify proble...

Include problems in PHP

I need to turn allow_url_include On. How can I do this? I have access to .htaccess as well as php.ini. I'm using PHP version 5.2.9 I've tried adding php_value allow_url_include On in .htaccess and allow_url_include = On in php.ini. Both files are at the root of my website. Is there a way to use the curl/get page function as a ...

How can I include unit tests in maven assembly?

Reason: Our project is using Ant as commandline interface. After making a new assembly with maven's assembly plugin, I want to make initial tests to see if all has been properly assembled. Therefore I need to include the unit tests in the final assembly. After assembling, the initial tests would then be called sth like > ant initTest ...

wrapping #includes in #ifndef's - adds any value?

I have inherited C/C++ code base, and in a number of .cpp files the #include directives are wrapped in #ifndef's with the headers internal single include #define. for example #ifndef _INC_WINDOWS #include <windows.h> #endif and windows.h looks like #ifndef _INC_WINDOWS #define _INC_WINDOWS ...header file stuff.... #endif // _INC_WIN...

What's the best way to include external content using php includes? (For web developers who love optimal practices)

I've checked lots of tutorials about including header, navigation and footer using php "include". But I ended up separating my html tags. For instance, my <div id="content"> is in "header.html" while it closing </div> tag is in the footer. This gives me some problem when I use jQuery and looks kinda messy. Is there a better practice to ...

C++: Correct order for including both <cstdio> and <stdio.h>?

I need to use system-specific functions, e.g. ftello() (defined in stdio.h as per POSIX standard). I also need to use standard C++ features, e.g. std::sprintf() (defined in cstdio, as per ISO C++ standard). AFAIK, including only <cstdio> doesn't guarantee defining non-standard-C++ stuff, so I guess I have to include both. I've read a lo...

dynamically including php scripts

Hello I'm developing own CMS and i want to implement functionality to dynamically include existing PHP script which are located on the server. there is variable called $page_content which contains page contents including HTML and JS code, also it contains some text recognised by regex, recognised text is then processed and replaced wit...

What about a string value retrieving speed with fopen, mysql query, include/require

Hi, That´s a general question. I need do retrieve the value of about 20 strings of about 100 characters each. Which of the following methods would be the quickest, in order to retrieve the variables? 1) reading from a separate include file, where the variables values are assigned (e.g. $var1 = "blablablah...."; etc) 2) reading from a t...

Reading a PHP file variables from external JS

How may I retrieve, by JS (and I mean an external script), the value of some variables assigned in a (php) include file like the one below? <?php $var1 = "a"; $var2 = "foo"; ?> ...