namespaces

Simplepie iTunes select specific class

I'm parsing an iTunes feed, there are 3 image sizes within the feed and I'm not sure how to fetch the largest one. The iTunes Feed example: <im:image height="53">http://a1.image.53x53-50.jpg&lt;/im:image&gt; <im:image height="75">http://a1.image.75x75-65.jpg&lt;/im:image&gt; <im:image h...

Namespace Aliasing in C++

It is widely known that adding declarations/definitions to namespace std results in undefined behavior. The only exception to this rule is for template specializations. What about the following "hack"? #include <iostream> namespace std_ { void Foo() { std::clog << "Hello World!" << std::endl; } using namespace std; } int...

Change the name (namespace) of website project

Hello, I am creating a new ASP.NET MVC Web Application in C# using Visual Studio 2010. We haven't decided on the name of our project so are using an arbitrary name for the moment to allow us to get stuck into development. Meanwhile, a brand and new name is being developed so in a month or so this arbitrary name will be redundant. The q...

libxml2 error with namespaces and xpath

hello, I am pasting some code here that compiles with no warning using gcc file.c -lxml2, assuming that libxml2 is installed in your system. #include libxml/parser.h> #include libxml/xpath.h> #include assert.h> #include libxml/tree.h> #include libxml/xpathInternals.h> xmlDocPtr getdoc (char *docname) { xmlDocPtr doc; doc = x...

PHP Namespaces: Function Loading

Hi, I'd like to play a bit with functional programming in PHP. I think it's intersting to try out something different when always writing oop in php. However, I'd like to use namespaces. My namespaces are equal to the file structure: namespace my\Models\User; /my/Models/User.php Is their a way to do something like autoloading for th...

PHP Namespace: Framework

Hi, are their already PHP frameworks that are using namespaces. I only now that their is zend who are working on it. Best Regards, Sebastian ...

IPython with own scope?

Hi all, I encountered a problem with the scope variables have when IPython is invoked at the end of a python script. All functions I call in the script itself can modify variables, which will subsequently be used by other functions. If I call the same functions in ipython, the scripted ones can access the changed variables but variables...

Clone contents of node into different namespace

I've updated the title and the text of my original question after gaining more knowledge on what's really going on. The misinterpreted the symptom as whitespace not being preserved while what's really going on was that the HTML elements weren't being interpreted as HTML. I'm writing a transformation from a WADL document to HTML. I need ...

C#: Use a namespace for a specific block of code?

I just have a point of curiosity. I'm working with SSRS and calling its SOAP methods. I've got stubs generated / Web references created and that's all working fine and I can make web service calls OK. The problem: the two classes generated from the WSDLs, ReportService2005 and ReportExecution, have some overlapping class definitions, su...

Should I use a Namespace of an XML file to identify its version

I'm using DataContractSerializer to serialize a class with DataContract and DataMember attributes to an XML file. My class could potentially change later, and thus the format of the serialized files could also change. I'd like to tag the files I'm saving with a version number so I at least know what version each file is from. I'm still d...

Rails 2 Namespace and Shallow Routes Issue

Hello. I've written the admin area of a particular rails app and now I'm ready to set it as own section within the website. Therefore, it will be /admin However, I didn't want to have it as /admin within the route itself I wanted to have something less common, so I added a couple of hyphens before and after it. So the route is /-admi...

Rails Namespace Controller Issue

I've split my rails app into a admin directory and a public directory. The admin directory is within an Admin:: namespace (/admin). When I created a controller called Forums in both the Admin:: namespace and the normal root map area, the routing seems to find the Admin::Forums controller for /forums and /admin/forums. So /admin/forums...

How to preserve XML namespace in XSLT output?

XSL stylesheet should output following code to Internet Explorer: <xml:namespace prefix="vml" ns="urn:schemas-microsoft-com:vml"/> But when I execute following template with any XML <xsl:template match="*|node()"> <xml:namespace prefix="vml" ns="urn:schemas-microsoft-com:vml"/> </xsl:template> IE throws parsi...

xslt problem (namespaces?)

I have a document like this: <?xml-stylesheet type="text/css" href="http://ltw1001.web.cs.unibo.it/svg.css" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg= "http://www.w3.org/2000/svg"&gt; <body> <sv...

[PHP] Are namespaces really all that useful in frameworks?

As far as I can tell, the only reason we have namespacing in PHP is to fix the problem of classes (+ functions & constants) clashing with others classes of the same name. The problem is that most frameworks setup their autoload and filesystem hierarchy to reflect the names of the classes. And no-one actually require()s or include()s fil...

Can't find System.Windows.Media namepspace?

I'm using an object from a 3rd party API that has a property of type System.Windows.Media.ImageSource, yet I can't seem to find the System.Windows.Media namespace anywhere. If I try to add a reference to my project I don't see System.Windows.Media in the list of options. My project is also targeting .Net 3.5. Is there something else I n...

Indenting nested namespaces on the same line to just one level

In emacs 21: namespace Abc { namespace Def { class X; namespace Ghi { class Y; } } } But now in emacs 22.2.1: namespace Abc { namespace Def { class X; namespace Ghi { class Y; } } } How do I get the old behaviour back? Note that I don't want a fixed column for indentation...

javascript namespace as string

I have the following namespace (com.myCompany.myProject): var com = { myCompany: { myProject: { x: 1, y: 2, o: function() { } } } }; For example, I have the following code: var self = com.myCompany.myProject; How can I show this namespace as a string, e.g. "com.myCompany.myProject" ? I've tried ...

3rd party header file confliction - need solution

I have to use the windows.h file in my code but it conflicts with other legacy include files on my project that I can not modify. This is in c++. How do I get around this problem, since I can not modify any of the header files in question? I thought about using a namespace but I would think you can not wrap a include in a namespace becau...

How to make a strongly typed reference to a namespace without picking an arbitrary type in it

I'm working on a project in which I use Depency Injection. When registering a set of interfaces and classes, I need to point out the namespaces at which those interfaces and classes are located. I don't like providing string constants though, mainly because it hurts refactorability. I don't like taking one of the interfaces/classes and ...