Does Ruby provide the namespace path, e.g. something like [:A,:B] for class A::B::C?
Is the following possible? puts A::B::C.new.namespace_path # => [:A,:B], or even [A,B] ...
Is the following possible? puts A::B::C.new.namespace_path # => [:A,:B], or even [A,B] ...
When adding a new item (class, control, etc) in C# it will automatically add a namespace to the file depending on the location in the project. Is this also available for VB.NET? The code 'Namespace DataClasses.AX' and 'End Namespace' would be generated. Namespace DataClasses.AX <Serializable()> _ Public Class AxInventItem #Re...
I was just learning aboutt PHP namespaces and starting to create a simple autoload function. What O did was: function __autoload($name) { echo $name . "<br />"; require_once $name . ".php"; } So, this works if I do not use any aliasing or importing statements eg. use MainNamespace\Subnamespace because if I did that, assuming i hav...
Hi, I'd like to build something like this: File 1: template<typename Vector> namespace myNamespace { class myClass1{ myClass1(Vector v) {...} } } File 2: template<typename Vector> namespace myNamespace { class myClass2{ myClass2(Vector v) {...} } } Of course this is not possible because you cannot template namespaces. Instead I ...
Hi, I have created simple soap server using php, The WSDL used is at : http://fromyourdesign.com/webapp/wsdl/fromyourdesign.wsdl Response i m getting has a miss matched namespace for the Login response tag: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="...
Hi, I have few questions (keeping C/C++ in context) - When I want to use namespace? - When I want to use classes inside namespace? - When I should use functions/routines inside namespace (not inside class)? Thanks. ...
Using boost::program_options, I can not get my own option type to compile when it is declared inside a namespace. However outside of the workspace it compiles and works fine : #include <boost/program_options.hpp> using namespace boost; using namespace boost::program_options; struct my_type1 { my_type1(int nn) : n(nn) {} int n; ...
if i do integrate Zend Framework 1.10 with Doctrine 2 where do i put my Doctrine Models/Entities and Proxies? i thought of the /application or the /library directories. if i do put in the /library directory tho, will it interfere with ZF autoloading classes from there since the classes there will be using PHP 5.3 namespaces vs PEAR style...
how do i setup the autoloader to find all classes in the namespace 'Entities' and 'Proxies' in APPLICATION_PATH . '/Entities' and 'APPLICATION_PATH . '/Proxies'' respectively. UPDATE i managed to make it work putting \Entities and \Proxies in \library\Application and add autoloaderNamespaces[] = Application in application.ini. but wha...
I would like to provide my own sortItemRenderer within an AdvancedDataGrid like so: <mx:AdvancedDataGrid sortItemRenderer="MyRenderer"></mx:AdvancedDataGrid> MyRenderer is a class that I wrote, but Flex doesn't see it and gives "defintion not found" error, because it is not within the mx namespace. What is a clean way to make this to...
i am wondering why my namespaces are not resolved correctly ... i have use \Doctrine\ORM; ... } catch (NoResultException $e) { // shld resolve to \Doctrine\ORM\NoResultException but fails ... } catch () { // code always ends up here if NoResultException is thrown // unless i fully qualify the class as\Doctrine\ORM\NoResultExc...
Hello everybody, I need to transform an XML file to another XML file, where the source file has a dynamic namespace set to xmlns="whatever". My XSLT runs fine without the namespace being in the file, but I get no output with the namespace. How can I cause the schema of the source file to be applied to the destination file? All help is ...
My XML file entry: <GlobalView xmlns="http://schemas.openxmlformats.org/package/2006/relationships"> <rels> <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/> </rels> wanna query attribute Id inside Relationship element...
Hello, I've been working on an application and I've run across an unusual error that I've never seen before. I have two classes, one being a UserControl and one being a Form, set up like so: namespace NC { public partial class Board : UserControl { // stuff } } namespace NC { partial class Board { /...
Hi, I have two C#.net projects project 1 and project 2 (names changed) in single solution. I am using Visual Studio 2005. I have added reference of project 2 in project 1 by right clicking and choosing 'Add Reference'. Both projects are of 'Application' project type not Class library type. I have some classes in project 2 which I want t...
i am having a situation where my doctrine model, Post, is in the namespace Application\Entities and i want to try to implement Zend_Acl_Resource_Interface. i get the error Fatal error: Interface 'Application\Entities\Zend_Acl_Resource_Interface' not found in D:\Projects\Websites\php\ZendFram ework\LearningZF\library\Applicat...
I am experiencing an issue with EF4 and Proxy Pocos. I have 2 classes with the same name in the same assembly but different namespaces: QuoteModels.CashPayment OrderModels.CashPayment This compiles fine but at runtime EF throws the following exception: Schema specified is not valid. Errors: \r\nThe mapping of CLR type to EDM ...
When you define a function in a namespace, namespace foo { function bar() { echo "foo!\n"; } class MyClass { } } you must specify the namespace when calling it from another (or global) namespace: bar(); // call to undefined function \bar() foo\bar(); // ok With classes you can employ the "use" statement to eff...
We currently have quite a few classes in a project, and each of those classes implement an interface, mostly for DI reasons. Now, my personal feeling is that these interfaces should be put into a separate namespace within the same assembly (so we have a MyCompany.CoolApp.DataAccess assembly, and within that there's an Interfaces namesp...
What is the different between these two? cpp-file: namespace { int var; } or int var; if both are put in the cpp file? Is not correct that we put a variable in anonymous namespace so it can be private for just that file? But if we put a global variable in a cpp file is not that variable also privat because you never do an incl...