namespaces

Interaction of namespace and friend in C++?

Is it possible to make a namespace friend of a class, say I have a unit test namespace with many classes and I wanted the test namespace to be friend to a class so that it has access to private implementation details. ...

How do you handle Country Code TLD names in your packages/namespaces?

The convention is that you use your company's domain. That is quite simple but what if it is something like www.mycompany.co.uk. Now this wouldn't be a problem if it were www.mycompany.com. That is fairly simple com.mycompany.Class What are we meant to do with the first? uk.co.mycompany.Class OR co.uk.mycompany.Class? Or something els...

VB.NET - Imports namespace from other projects in Solutions

In my Solutions in Visual Studio, I have 3 projects. - Common (Root namespace: PodcastPlayer.Common) -PodcastPlayer (Root namespace: PodcastPlayer) This is the Silverlight project. -PodcastPlayer.Web (Root namespace: PodcastPlayer.Web) In Common, I have several classes and service references. But my problem is that I can`t not use Podca...

C++ Templates and accessing namespaces

Hi, let's say I'm using a templated class with something simple like template <class T> class MyClass and I want to use elements from T's namespace, for example T could be string, and i wanted to use T::const_iterator myIterator; or something like that. How do I achieve that ? Probably it's not possible or very simple, but I'm...

Which namespace is the most underutilized, yet must-know for devs?

Which of the .NET 3.5 namespaces is the most underutilized yet contains some of the classes and methods considered "must-know" for every .NET developer? ...

Need help reaching a variable in JavaScript

Can someone please help me understand the scoop of JavaScript variables, and how to reach them? Imagine the following... // Namespace declaration var p = {}; p.result = { searchForm: $('#search-form'), searchAction: this.searchForm.attr('action'), anotherSection: { hello: 'Hello ', world: this.hello + 'wo...

XSLT transform with xml name spaces I think i'm missing something

I think I'm missing something when it comes to namespaces and xml, I'm trying to transform xml with an XSLT Input <?xml version="1.0" encoding="utf-8"?> <MySomeObject xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt; <_x003C_Name_x003E_k__BackingField>Jon</_x003C_Name_x003E_k__BackingField> <_x003C_Id_x003E_k__BackingField i:...

access namespace element/attribute in xml/atom document with simplexml

Hello, I may have a simple question, I need to know how to get to nested namespace attributes/elements like below <gf:marketValue> <gd:money amount='150990.0' currencyCode='USD'/> </gf:marketValue> this is from the google-api Also, I am now not sure wich one I should use the url .../portfolio or portfolio/1/positions to get t...

Missing Array element in UserControl XAML?

This is actually two questions in one: First, when you write your XAML and Intellisense fails to recognize the type you want to use (in my case, Array), what steps do you go through to figure out what's going on? I initially look over my XML namespaces to make sure that everything looks like it's in order. If it's a CLR type (not one ...

Namespace management with Web References

I have a seemingly simple goal, but I'm tripping over namespace issues. I wrote a sharepoint web service client class, called sharepoint.cs, and it has its own namespace. I want to re-use this class in other applications. The problem is it needs to reference a web service reference. Right now, when I add a web reference to the projec...

C#: Explicit Namespace not Appearing in Generated XML.

Given the following C# code to generate an XML file: XmlDocument requestXML = new XmlDocument(); XmlDeclaration declaration = requestXML.CreateXmlDeclaration( "1.0", "utf-8", null ); requestXML.AppendChild( declaration ); XmlElement soapEnvelope = requestXML.CreateElement( "soap:Envelope" ); soapEnvelope.SetAttrib...

Eclipse/Java - is it harmful to import java.(namespace).*?

Why does Eclipse take a fine grained approach when importing types? In C# I'm used to things like "using System.Windows.Controls" and being done with it, but Eclipse prefers to import each widget I reference individually (using the Ctrl+Shift+O shortcut). Is there any harm to importing an entire namespace if I know I'll need multiple t...

Resolving ambiguous calls in C++ with namespaces

I'm merging a static library (assimp) into an existing project (Spring RTS) where both the library and the project are under regular development. I'm trying to add the library in such a way that I can easily repeat the integration as new releases come out. Anyway, the issue is that Spring requires the library to perform all maths using ...

How can I ignore a bad xmlns namespace with Perl's LibXML?

I have an XML document that references a namespace that is no available: <microplateDoc xmlns="http://moleculardevices.com/microplateML"&gt; ...my data is here... </microplateDoc> I have a script that reads it fine, but only when I delete the two above tags, otherwise it reads it all screwed up. Is it ok just to ignore it? I'm thin...

PHP can't find a function in my class

I have a class that is getting called and for some reason one of the functions I have is being found, but the other one is not. Here is my code: <?php namespace LMVC\Database; class PDO { private static $instance = NULL; public static function setup($dsn, $username, $password) { try { self::$instance = new \PDO($dsn, $us...

Ruby: I want a class called 'Thread' - but there already is one...Module ?

I think my brain died, but I thought there was a simple way of using 'Modules' in Ruby to create a namespace for my own classes - or did I dream that ? What I'm after is the Ruby equivalent to the Java-way of putting my class defs in a package ... Or do I have to just invent a new name for my objects ??? ...

Parse XML using JQuery in Safari

Hi there. I've got the following below XML and would like to parse this with JQuery in Safari web browser. I just want to print out the userName and need some assistance with how the function would be written. <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns3:Account xmlns:ns2="http://oec.api.opsource.net/schemas/organizatio...

SimpleXML: Working with XML containing namespaces

I am trying to get to the geo information off the google-picasa API. This is the original XML: <georss:where> <gml:Point> <gml:pos>35.669998 139.770004</gml:pos> </gml:Point> </georss:where> I already have come this far, with: $ns_geo=$item->children($namespace['georss']); $geo=$ns_geo->children($namespace['gml']); var_dump...

add namespace to a xml document in C#

Hi, I have the following xml <book> <chapter>this is a sample text</chapter> </book> and need to add a namespace to it to be like the one below <ns0:book xmlns:ns0="http://mybookurl/sample"&gt; <chapter>this is a sample text</chapter> </ns0:book> I tried Greco suggestions but it does not work. http://stackoverflow.com/ques...

Change name space of LINQ to SQL generated classes

Is there anyway I can change the namespace of the classes generated by LINQ to SQL right now it goes ProjectName.FolderName Is there anyways I can change this default convention ...