Notice: Constant DIR_FS_CATALOG already defined
I've already commented out display_errors in php.ini,but is not working.
How do I make PHP not output such things to browsers?
I got a package called 1.pm in that the constructor is calling a subroutine which is in the same package.
Now if some other classes say 2.pm is calling the constructor defined in 1.pm how can i determine if the subroutine is called from 2.pm ?
I just found two piece of code
#if CONSOLE // defined by the console version using
ournamespace.FactoryInitializer;
#endif
and
#if _NET_1_1
log4net.Config.DOMConfigurator.ConfigureAndWatch(new System.IO.FileInfo(s) );
#else
log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(s) );
#endif
Can any one please tell me with a running sample( please provide a simple one) what is the significance of those code snippets and when and how to use those?
Thanks.
why do I get a compiler error in the following code stating: Cannot implicty convert type SpecialNode to T even though T must derive from NodeBase as I defined in the where clause and even though SpecialNode actually derived from NodeBase?
public static T GetNode<T>() where T : NodeBase
{
if (typeof(T) == typeof(SpecialNode))
{
return ThisStaticClass.MySpecialNode; // <-- compiler error
}
if (typeof(T) == typeof(OtherSpecialNode))
{
return ThisStaticClass.MyOtherSpecialNode; // <-- compiler error
}
...
return default(T);
}
I would like to customize my layout definition (declared in my_layout.xml file) from code.
Unfortunately I can use findViewById() function to find the specific views (defined in my_layout.xml file) and customize them from code only after I called setContentView(R.layout.my_layout).
But what if I want to customize my layout first, before calling setContentView()? How can I access the specific views before calling setContentView()?
Hi,
I was wondering how to access a global function fn in ruby from a class which also defined a method fn. I have made a workaround by aliasing the function like so:
def fn
end
class Bar
alias global_fn fn
def fn
# how to access the global fn here without the alias
global_fn
end
end
I'm looking for something along the lines of c++'s :: to access global scope but I can't seem to locate any information about it. I guess I don't know specifically what I'm looking for.
Consider the followng situation:
MacFont.h
struct MacFont : Font
{
// ...
NSFont* font;
};
MacFont will be implemented in MacFont.mm
FontEngine.cpp:
#if defined(OS_MAC)
#include "MacFont.h"
#elif
// ...
#endif
//...
In order to make it compiling, I should rename FontEngine.cpp to FontEngine.mm but I'm not allowed to.
So what now?
I have a class defined called extBlock.
I then make an instance of that class with this
extBlock mainBlock = new extBlock(1, 1024);
I get this error:
error C2440: 'initializing' : cannot convert from 'extBlock *' to 'extBlock'
Can anyone help me with why I am getting this error.
I have seen examples online of declaring it like this with a pointer
extBlock *mainBlock = new extBlock(1, 1024);
But if I do it this way it does not let me call the functions of mainBlock
If I have have some overloaded ostream operators, defined for library local objects, is its okay for them to go to std namespace? If I do not declare them in std namespace, then I must use using ns:: operator <<.
As a possible follow-up question, are there any operators which should go to standard or global namespace?
I got a little problem
i need a sql query that gives all rows back that only contains 0 in it.
the column is defined as varchar2(6)
the values in the column looks like this:
0
00
00
100
bc00
000000
00000
my first solution would be like this:
Oracle:
substr('000000' || COLUMN_NAME, -6) = '000000'
SQL Server:
right('000000' + COLUMN_NAME, 6) = '000000'
is there an other way?
(it needs to work on both systems)
Hi,
How would you locate an object in memory, lets say that you have a struct defined as:
struct POINT {
int x;
int y;
};
How would I scan the memory region of my app to find instances of this struct so that I can read them out?
Thanks R.
Hi, I have user defined string (html formated string to be saved and used in web) and need to find a way to replace each white space which is right after a single letter by .
For example "this is a string" should become "this is a string",
"bla bla b l abla b la blabla" should become "bla bla b l abla b la blabla" ...etc...
hello, I've got one problem...
I created table(with one row and one column) for my site and then I put background for table using CSS where I defined image, after that I try to create in the first table another table with 3 rows, Dreamweaver doesn't allow me to do it, it puts new table after first, how can I solve this problem, thanks in advance...
It seems that Sum not defined for IEnumerable<uint> (and other unsigned integers, for that matter)
var s = new int[] { 1, 2, 3 };
s.Sum(); //works fine
var us = new uint[] { 1, 2, 3 };
us.Sum(); //missing method
I would like to know:
Have I done something fundamentally wrong/misunderstood the situation?
What design decisions might cause the omission of IEnumerable<uint>.Sum()?
MSDN: Enumerable.Sum
Hi,
I am using Visual C++, and I am trying to include a file that uses BYTE (as well as DOUBLE, LPCONTEXT...) , which by default is not a defined type.
If I include windows.h, it works fine, but windows.h also defines GetClassName wich I don't need. I am looking for an alternative to windows.h include, that would work with VC++ and would define most of the types like BYTE, DOUBLE ...
Thanks
I have a simple jQuery toolbar, the basic functionality is:
Hover: Background change to defined value & add .active class
OnClick: Move the icon down 4px, and change background of the toolbar to that of the element
What I would like to do move the icon down 4px when it has the class 'active' applied, however also remove the onclick event?
Somehow I need an 'IF' statement in my jQuery for the Onclick event.
Hi, I have defined my class:
public class Host
{
public string Name;
}
then a strobgly-typed dictionary:
Dictionary<string, Host> HostsTable;
then I try to compare a value:
if (HostsTable.Values.Where(s => s.Name == "myhostname") != null) { doSomething }
and the problem is, nothing is found, even I'm sure the item is on the list. What I'm doing wrong ?
When scaffolding a model & controller, the "new" and "edit" associated forms submit to /object_type/object_id. This triggers the "show" controller.
Where is "show" defined as the default action, and what is the right way to override this?
How can I load a class that is already on the class path, instantiate it, and also instantiate any inner classes defined within it?
EG:
public class TestClass {
public class InnerClass { }
}
Hi folks.
I've always have a problem with big datasets created through the dataset designer in visual studio (2005). When the dataset many tables with many columns, the columns defined like "(Empty)" in the NULL VALUE property starts showing the text "(Empty)" literally.
Is anyone aware of this? or is just me?
Thanks in advance.
I've been using a eclipse with the aptana plugin and have all my projects neatly defined.
However one project is a main corporate website lets say http://sun.com and it's set up nicely for FTP transfers.
However i was wondering if there was a way to define directories of that as subprojects or projects in there own right without messing up the file transfer stuff.
Any ideas?
I want to restrict the generic type parameter to:
1) either that of a certain user defined reference type;
OR
2) any of the primitive types in the CLR;
How do I say something to the effect of:
interface IDataManager<T>: IDataManager
where T: IDataObject, T: ValueType
I've created a view based application and have connected all of my buttons through Interface Builder (and saved)...however upon launch all I have is a white screen on the simulator.
I've uncommented the viewDidLoad, and my header file has IBOutlet UIlabels defined.
I'm kind of baffled.