As a general rule, I rue the days whenever I have to build Python libraries on a Mac. I've generally had fairly good success using Boost::Python, and if I use distutils, most of the time everything works correctly.
However, I've never been able figure out the exact combination of what works/what doesn't work. Specifically, I've often ru...
Hello,
I've found a nice article on how to create Chart progammaticaly in ASP.NET MVC on ASP.NET website. Scott Mitchell, the author, uses a class called Chart() that he said comes from system.web.UI.datavisualization. But, when I try to reference system.web.UI.datavisualization namespafe from my projet,looking at the .NET tab, I don't ...
Quoting from here,
In C, there are two different namespaces of types: a namespace of struct/union/enum tag names and a namespace of typedef names.
name.c
$ cat name.c
#include<stdio.h>
typedef long long long2;
int long2 () {
return 4;
}
int main() {
printf("hello, world!");
return 0;
}
$ gcc name.c -o name
name.c:4...
the following code will help me illustate my question to you directly:
#include<iostream>
class foo {
public:
class bar {
public:
bar(int a) : m_a(a) {}
void say() { std::cout << m_a << std::endl;}
private:
int m_a;
};
};
int main()
{
foo::bar b(3);
b.say();
}
as you see, to declare a object of c...
I have a solution that contains many projects all using the same root namespace. No code files explicitly name a namespace. So lets say the root namespace is ExampleRootNamespace.
Now a problem comes into play when I want to add an explicitly named namespace to one of the code files I am working on. I want to be able to isolate this cod...
Is it possible to have a single class reside within two name-spaces and how can I do this?
To clarify: We have a class library (let say root namespace is classLib1), which has grown over time (more classes) and I want to logically group classes into different namespaces.
However some of the older classes need to be grouped into these n...
Most of the research I've done on the use of using declarations, including reading relevant sections of various style guides, indicates that whether or not to use using declarations in C++ source files, as long as they appear after all #includes, is a decision left to the coder. Even the style guides I read, which usually come down on on...
Imagine a SOAP RPC method getBill that returns an instance of this class:
class Bill:
customer = String
total = Double
Now, assume that the Bill class and the getBill method are defined in two different namespaces, foo:getBill and bar:Bill
What should be the namespace of the accessor element of the response message? The names...
Namespaces aren't declared and defined like most other things, but the namespace equivalent of a forward declaration would be:
namespace X {} // empty body
Normally, you define a namespace by placing other declarations inside it. But is there a problem for which this "namespace forward declaration" is the easiest solution? Of what ...
Say I have a source document like this:
<element>
<subelement xmlns:someprefix="mynamespace"/>
</element>
The xmlns:someprefix is obviously not needed here and doesn't do anything since that namespace is not being used anywhere in the document.
In PHP, after I've loaded this into a DOM tree with DOMDocument->loadXML(), I'd like to ...
I try to add a namespace on xml using WITH XMLNAMESPACES.
When I execute my queries, the namespace is added with the root element but with the second element I have xmlns="" as well... and I would like to remove that...
I provided an example:
Queries for creating the table and the data:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
G...
i have following code,i stored value in imgwidth variable
var newImg = new Image();
newImg.src = document.getElementById('image').src;
var height = newImg.height;
var width = newImg.width;
var width_img = width/3;
jQuery.mynamespace = {imgwidth : width_img};
how can i retrieve imgwidth v...
I want to have an admin area.
So I wrote:
map.namespace "admin" do |admin|
admin.resources :cities
admin.resources :links
end
But I would like to the admin area for a specific location.
I am looking for something like:
map.namespace "admin/:location_id" do |admin|
admin.resources :cities
admin.resources :links
end
what wo...
Suppose I have a utility library (other) containing a subroutine
(sort_it) which I want to use to return arbitrarily sorted data.
It's probably more complicated than this, but this illustrates the
key concepts:
#!/usr/local/bin/perl
use strict;
package other;
sub sort_it {
my($data, $sort_function) = @_;
return([sort $sort_fun...
Hi all,
I am trying to use XPath to get a list of all the persistence units in persistence.xml and am having trouble. The one that I thought would work was:
//persistence/persistence-unit
*
The latter gives me the persistence child which is at least something, I can then manually iterate through, but that defeats the purpose of XPa...
Hello,
After scouring the net for answers, coming up with "almost" solutions... I decided to reduce the problem to a very simple case.
Consider the following XML snippet:
<me:root xmlns:me="http://stackoverflow.com/xml"
xmlns="http://www.w3.org/1999/xhtml">
<me:element>
<p>Some HTML code here.</p>
</me:element>
</...
As asked here, I'm looking for a clean solution to setup a staging environment for my
Google App Engine application.
Reading the new spec of Namespaces API, Google suggest that a possible use
of this new feature is:
Creating Separate Datastore Instances for Testing and Production
In case I decide to use Namespaces for testing, could ...
Hi there,
I have this code
var stats = {
GetMetaData : function() {
var url = 'http://www.bungie.net/api/reach/reachapijson.svc/game/metadata/'+storage.get('apikey');
$.ajax({
url: url,
success: function(data) {
return data;
}
});
return 'abc';
...
I'm writing unit tests in Python for the first time, for a Django app. I've struck a problem. In order to test a particular piece of functionality, I need to change the value of one of the app's settings. Here's my first attempt:
def test_in_list(self):
mango.settings.META_LISTS = ('tags',)
tags = Document(filepath).meta['tags']...
I am trying to build a XML document using the GML namespace and XML to LINQ.
My goal is an XElement with contents like this:
<gml:name>...</gml:name>
But I get the following:
<name xmlns="http://www.opengis.net/gml" />
The problem is that the gml: is missing from the element. Why is that?
My code is as follows:
XNamespace ns...