I've just started to use PHPUnit, but I've run into a bit of a snag.
My code uses $_SERVER['DOCUMENT_ROOT'] to compute paths for includes, which works when my apache server is the one running PHP, but DOCUMENT_ROOT is not set when I run phpunit from the command line with "phpunit Tests", so these includes don't work.
Am I missing somet...
FILE #1 (foo.h):
#ifndef FOO_H_
#define FOO_H_
#include "baseclass.h"
#include "bar.h"
class Bar;
class Foo : public baseclass {
public:
bar *varBar;
};
#endif
FILE #2 (bar.h):
#ifndef BAR_H_
#define BAR_H_
#include "foo.h"
class Foo;
class Bar {
public:
Foo *varFoo;
};
#endif
FILE #3 (baseclass.h):
#ifndef BASECLASS_H_
#define BA...
While browsing the code of some websites I sometimes notice that some JavaScript files are included like this:
<script type="text/javascript" src="javascripts/jquery.js?1252521516"></script>
But I don't see what the jquery.js ?1252521516 part of the src parameter does. Can anyone explain this to me please?
...
Hey Everyone,
I've found that when using the
<!-- include file="MyPage.aspx" -->
command in ASP, I'm not able to use the code-behind in MyPage.aspx.
The issue is that when I try to include MyPage.aspx, there is an error because we have two Page Directives. If I remove the Page Directive, I can include MyPage.aspx just fine, but can...
I'm not sure if this has been answered yet, I looked at a couple of questions but I don't think they were quite what I was after.
Let's say I have 3 tables:
Restaurant 1.....M MenuCategory 1.....M MenuItem
I have a L2E query that looks something like this:
Restaurant = context.Restaurant
.Include(r => r.MenuCategory)
.FirstOrD...
I'm not sure if this is the right thing to do, I'm sure someone will tell me if it's not.
I asked a question (http://stackoverflow.com/questions/1662760/entity-framework-include-in-sub-query) earlier this evening, which was answered very well and has solved my problem. But, I think there could be a better way, so I'm going to re-ask th...
I got two projects running, both written in PHP. Now I want to merge these two projects. The first project is a CMS and on a specific page i will display the contents of the other project / application. I don't want the first project to know about, or get access to, the variables and functions in the other and vice versa. So i just want ...
Hey so I've got the situation where I'm pulling a client back from the database and including all the case studies with it by way of an include
return (from c in db.Clients.Include("CaseStudies")
where c.Id == clientId
select c).First();
but what I want to do now is and a where clause on the included casestudies so tha...
Im not really familiar with how this works in JSP
but in the
main.jsp template there is this:
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<jsp:include page="/jsp/common_head.jsp"/>
then in common_head.jsp we have this again:
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
is this necessary?
or in other words
Are taglib...
hi all,
i'd like to use this plugin for dynamic includes:
http://plugins.jquery.com/project/jquery-plugins
i managed to include one file + getting a done-callback.
my question: is it possible to include several files at once (eg. 10 .js + 10 .css files) and getting a global done-callback?
thx,
fuxi
...
Does anybody know of an automated way of telling whether a PHP script is being called directly (as a HTML page), or as a JavaScript, or as a CSS Stylesheet?
Without GET variables, or setting a flag in the file ( that is what I am doing right now).
Just curious.
EDIT: Some background because it was asked for in answers: The reason why...
I'm brand new to php and I'm trying to work with some includes in my site and can't quite figure out how to make them all work correctly.
My site structure is as follows
/ROOT/
Config.php
Index.php
/ADMINISTRATION/
Index.php
mustInclude.php
/USERS/
Index.php
If "mustInclude.php" includes "Config.php...
Okay, I know this is a common enough question, but all the solutions I've found thus far have involved a missing semi-colon or curly brace, both of which I know is not the case for me.
I have a class that works FINE with this variable assignment:
session.php:
<?php
class session {
...
var $host = 'localhost';
...
...
Should I be careful adding too many include columns to a non-cluster index?
I understand that this will prevent bookmark look-ups on fully covered queries, but the counter I assume is there's the additional cost of maintaining the index if the columns aren't static and the additional overall size of the index causing additional physic...
Hello,
I have a little problem in my project. I have build static library(e.g. test.lib) . Included it into my binary project linker and included #include "test.h" into stdafx.h. But when binary starts to build, C error occurs on CSomeObject test:
"error C2146: syntax error : missing ';' before identifier 'test'".
What could be wr...
I've got this line of code:
if request.user_agent.include?("iPhone") then
But I'm occasionally getting this error:
"undefined method `include?' for nil:NilClass"
When checking logs on the error, there isn't a "HTTP_USER_AGENT" for the user that is getting the error.
So how can I fix that line so it doesn't throw an error if there ...
Hi,
This seems like a really simple question but somehow my Google-Fu failed me.
What's the syntax for including functions from other files in perl? I'm looking for something like C's #include "blah.h"
I saw the option for using perl modules, but that seems like it'll require a not-insignificant rewrite of my current code.
Thanks a ...
I just got started with CodeIgniter and am wondering will it slow things down if I put code like this in a loop.
$data['title'] = 'the title';
$data['content'] = 'blah blah blah';
$this->load->view('result', $data);
I'm not entirely sure how CodeIgniter handles things, or PHP itself for that matter. For example if I did th...
I have a number of places where I need to re-use some template code. Many classes need these items
In a .h could I do something like:
#include <xxx.txt>
and place all of this code in the .txt and just have it included?
Something like a PHP include!
Does gcc allow this?
...
What are the advantages/disadvantages of using include/require's to achieve a singular file that contains multiple pages as opposed to directing the user to many individual pages and storing the variables as session variables?
In particular I am asking with regard to a long multi step process (think questionnaire).
...