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</im:image>
<im:image height="75">http://a1.image.75x75-65.jpg</im:image>
<im:image h...
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...
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...
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...
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...
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
...
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...
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 ...
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...
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...
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...
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...
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...
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">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg= "http://www.w3.org/2000/svg">
<body>
<sv...
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...
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...
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...
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 ...
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...
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 ...