namespaces

Parsing xml namespaces using ajax

<item> <guid>http://jahboo.fliggo.com/video/kPZj01cs&lt;/guid&gt; <pubDate>Tue, 10 Mar 2009 18:31:38 -0500</pubDate> <title>How to be perverted with water proof cam</title> <author>Jennisita@fliggo</author> <link>http://jahboo.fliggo.com/video/kPZj01cs&lt;/link&gt; <description> This vid shows how easy it is to make perverted vids with ...

How to get all classes within namespace?

Possible Duplicates Taking out all classes of a specific namespace Getting all types in a namespace via reflection Excuse me. How to get all classes within namespace? ...

Referencing namespaces globally?

Is there a way to reference a namespace globally across the whole solution? So instead of having these lines in every code file: using System; using MyNamespace; having to declare them only once, and every code file would use them. Btw I am using Visual Studio. ...

namespace differences between web service and application dependency references

I've got 2 applications that both reference a AppTypes.dll assembly. One app is normal winforms app and the other is a web service. I'm passing an object defined in AppTypes to my web service but I get naming conflicts because apparently the web service also defines those types after adding the service to my project. Is there any way th...

Is fully qualified naming vs the using directive simply a matter of opinion?

I find now that I work in a mostly solo environment that I actually type fully qualified methods calls more and more, instead of make use of the using directive. Previously, I just stayed consistent with the most prominent coding practice on the team. Personally, I find it easier to read verbose code at a glance, I type fast especial...

Making use of inbuilt namespaces in C#

Scenario: Assume I want to define my own class. public class Person { } I wish to put it in a namespace System. Note: I have not included the directive, 'using System' at the top.. namespace System { public class Person { public void Display() { Console.WriteLine("I am mine"); } } } ...

Why does Delphi (dcc32.exe) have an option to set a "Namespace search path"?

The compiler (dcc32.exe) in Delphi 2007 and 2009 has an option -NS<namespaces> = Namespace search path Is this releated to the compiler options 'Default namespace' and 'Namespace prefixes' in the project options dialog? Search 'path' sounds like a folder (directory) name, so I am not sure what this option is good for. ...

WCF: how to generate a single WSDL document, without WSDL:import?

Hi, I'm troubling into an issue... I'm trying to find a way to generate a single wsdl document from my WCF service, i.e. without any link to external documents. I've used FlatWsdl to remove all xsd:import links, bou my generated wsdl still contains a link to an external wsdl document via a wsdl:import declaration: <wsdl:import namespace...

Using a DLL in Visual Studio C++

I have a DLL that I've been using with no problem in Visual C# (simply adding the reference and using the namespace). Now I'm trying to learn C++, and I don't understand how you reference a namespace from a DLL. I can right-click on a project and select 'references' and from there click 'add new reference', but that just provides me with...

Are mutually-dependent child/parent namespaces a code smell?

I was looking at some dependency graphs for my primary personal project recently, and I noticed that I had a mutual dependency between objects in nested namespaces. E.g., I had an object in MyNamespace.Foo that implemented a generic interface in MyNamespace.Foo.Interfaces with that object as the generic parameter in the interface. name...

Header file for functions inside of a namespace?

In C++ I have a file A.cpp that has the following in it: namespace Foo { bool Bar() { return true; } } How would I declare this function in A.h? How do I handle the namespace? ...

Using python regex to extract namespaces from C++ sources

Hi, I am trying to extract the namespaces defined in C++ files. Basically, if my C++ file contains: namespace n1 { ... namespace n2 { ... } // end namespace n2 ... namespace n3 { ...} //end namespace n3 ... } //end namespace n1 I want to be able to retrieve: n1, n1::n2, n1::n3. Does someone have any suggestion of how I ...

Tracking namespace declarations with XMLWriter

Hi, I'm working on an XML webservice (in PHP!), and in order to do things 'right', I want to use XMLWriter instead of just concatinating strings and hoping for the best. I'm using XML namespaces everywhere using ->startElementNS and ->writeElementNS. The problem, is that every time I use these functions a new namespace declaration is a...

Using a namespace twice

Hi, In c++ Is it OK to include same namespace twice? compiler wont give any error but still will it affect in anyway Thanks, EDIT: I meant using namespace std; // . . STUFF using namespace std; ...

Properly assigning Namespaces (with ReSharper's suggestions)

Lets say we have the following file and [folder] structure in a project with a main namespace of MyNamespace: [Entities] Article.cs Category.cs [Interfaces] IReviewable.cs ISearchable.cs Enumerations.cs According to ReSharper's suggestions, the namespace of the classes Article and Category should be MyNamespace.Entities, the name...

Selecting nodes with the default namespace

I've got an XML document with many different namespaces in use and a schema to validate against. The schema requires that all elements be "qualified", and I assume this means that they need to have full QNames without a null namespace. However, some elements in this giant XML document have slipped through using just the default namespac...

Namespace class and struct

I have a file that looks like this: namespace myName { typedef HRESULT (*PFN_HANDLE)(myName::myStruct); class MyClass{ //... public: BOOL RegisterCallback (PFN_HANDLE foo); //... }; struct myStruct{ //... }; } But I am getting a compile error 'myStruct' is not a member of 'myName'. Can anyone tell me what is go...

Are namespace collisions really an issue in Objective-C?

Objective-C doesn't have namespaces, and many (such as CocoaDevCentral's Cocoa Style Guide) recommend prefixing your class names with initials to avoid namespace collision. Quoting from the above link: Objective-C doesn't have namespaces, so prefix your class names with initials. This avoids "namespace collision," which is a...

Interesting Namespace Examples

Namespaces in .NET are meant to Group logical pieces of code together Prevent conflicts caused by use of common names That said it's fairly open for doing naming that is interesting, funny or just different. Do you have any examples of these different names? I am not looking for Good namespace naming - rather the fun or different...

Resolving a namespace using the keyboard

When writing code in .NET, if you use some function in a namespace that has not been included in your page, you get a tooltip-like popup [e.g. System.Data.Sql?]. If you click it, it adds the namespace to your page. Is there a keyboard short-cut to add the namespace? (I know you can use the right-click button on the keyboard, go to Res...