include

PHP include(): File size & performance

An inexperienced PHP question: I've got a PHP script file that I need to include on different pages lots of times in lots of places. I have the option of either breaking the included file down into several smaller files and include these on a as-needed basis... OR ... I could just keep it all together in a single PHP file. I'm wonderi...

How is the Actionscript 3.0 sample Maze game's code included?

I can't find the line in the Adobe samples for a maze game where the actual .as code is included into the project. This is fundamental, since my own implementation is just using include "file name";, which isn't working. I also can't use import, since I then can't access the elements placed on the stage. Help, please? The files are avail...

Rails ActiveRecord: Is a combined :include and :conditions query possible?

Imagine I have wiki Articles, with many Revisions. I'd like to do a query with ActiveRecord through the database, which only returns those Articles which have Revisions which are updated in the past 24 hours. Is such a thing possible? I'd imagine it'd be something like: Articles.find_all(:include => :revisions, :co...

Whats different between including and addressing a javascript file

Whats Different between <!--#include virtual="JS.htm" --> //note that in this method all JS files imported like below in JS.htm and <script src="myjavascript.js" type="text/javascript"></script> ...

How to get RelativeLayout working with merge and include?

I have been trying for a few days now to make my layouts more efficient by converting from using several levels of nested LinearLayouts to one RelativeLayout and have come across a few problems that I haven not been able to find a workaround for... I have searched the Android beginners group and this site and have not been able to find ...

Php - check if an include or block of code has an error...

How would I go about checking if and include or a require has an error in it. For example, and include would try to be included, if that page has an error the page isn't included and a message is throw? Cheers. ...

Django: Extends or Include?

My friend and I are having a small argument. In my current Django Project, I have created a file called menu.html which will contain a bunch of links configured and formatted into a list. Instead of manually hard-coding the menu into each page, I am currently including the menu using the following Django/Python code: {% include 'menu.ht...

How do I get .try() working in a Rails module?

With Rails 2.3.5 I've written a module in RAILS_ROOT/lib/foo.rb which I'm including in some models via "include Foo" and all is well except where I try to use some_object.try(:some_method) in the module code - it throws a NoMethodError rather than returning nil like it would from a Rails model/controller/etc. Do I need to require a Rail...

PHP: Can include a file that file_exists() says doesn't exist

In my script, I set the include path (so another part of the application can include files too), check that a file exists, and include it. However, after I set the include path, file_exists() reports that the file does not exist, yet I can still include the same file. <?php $include_path = realpath('path/to/some/directory'); if(!is...

How to install new units (i mean includes ex: stdio.h) for my C

How to install new units (i mean includes ex: stdio.h) for my C, and how to download more? ...

autoconf, how to include file from AC_CONFIG_SRCDIR file

hello I would like to be able to merge two files into one during configure run. I already do textural replacement using AC_CONFIG_SRCDIR[file.hpp] macro on some files. is there some directive to include files from file.hpp.in, some sort of @include (another.hpp) @ or something like that? Thanks ...

How do I get Eclipse to look in the build path for JSP includes instead of the web source?

We have a portion of our Dynamic Web Application that gets unpacked from a WAR, and placed in the build directory during compile. Because some of the files included in the web source are references to files from that WAR, then Eclipse can't find them. How do I get Eclipse to look instead in my build directory for the include files? ...

My includes dont seem to be working now that i have uploaded the files to the production server

They were all working fine on my XAMMP sandbox but now nothing. Something im doing wrong. Here is the code: index.php Contains mass include, which basically has all the includes in it. <?php //Starting session session_start(); //Includes mass includes containing all the files needed to execute the full script //Also shows homepa...

How to include a resource file in the Jar file generated by Netbeans ?

I'm using NB6.7 to auto generate an executable jar file for my project, how and where to tell NB to include a certain resource into the result jar file ? I know if I put the resource in the "lib" directory, NB will put it into "dist/lib/", but what I want is to include the resource within the final executable jar, where in NB do I specif...

linq include with condition

i have function public Menu Details(int? id) { return _dataContext.Menu.Include("ChildMenu").FirstOrDefault(m => m.MenuId == id); } now i need to add condition to child list ChildMenu something like fieldname=id. how can i do it? ...

ASP.NET - How to include CSS only if it isn't alrealy included?

Hello All! I use the code bellow to include dinamically a CSS: HtmlHead head = (HtmlHead)Page.Header; HtmlLink link = new HtmlLink(); link.Attributes.Add("href", Page.ResolveClientUrl("~/App_Themes/Default/StyleSheet.css")); link.Attributes.Add("type", "text/css"); link.Attributes.Add("rel", "stylesheet"); head.Controls.Add(link); Th...

How to include file outside document root?

Hey, What I want do to is to include 'file1.php' from 'domain1' into 'file2.php' on 'domain2'. So what I figured I should do is something like this: file2.php require_once '/var/www/vhosts/domain1/httpdocs/file1.php'; But this won't work for reasons I can't truly grasp. So what I did was to add my path to the include path. Something ...

xslt import/include 2 files with the same template

Hello guys, I've got an interesting question on XSLT import/include. I have 2 XSLT files with the same rule. Receipt XSLT: (is run by itself) <xsl:template match="Booking" mode="extraStyle"> <link rel="stylesheet" href="../css/receipt.css" type="text/css" media="screen"/> </xsl:template> EmailCommon XSLT: (serves as template libra...

Problem when using \LaTeX \includegraphics with some PDF files

I noticed some strange effects when including existing pdf graphics in my laTeX documents: Most file work flawlessly, but some PDFs that were created on a different machine (or from the web) cause the whole page on which they are embedded to become ever-so-slightly distorted. I only notice the difference in a side-by-side comparison, bu...

SAS V9.1.3 - Error when combining %INC and CALL EXECUTE

Hi, I am getting a resolution error with some SAS v9.1.3 code. Here is some code I want to store in a .txt file (called problem2.txt) and bring into SAS with a %INC %macro email020; %if &email = 1 %then %do; %put THIS RESOLVED AT 1; %end; %else %if &email = 2 %the...