namespaces

Get Namespace, classname from a dll in C# 2.0

Hi, I will get dll's dynamically. I need to load the dll and get the namespace, classname to invoke a method (the method name is static it will be always "OnStart()"). Basically I need to run a method by loading the dll. Can somebody help!!!. ...

UUID namespace and name. How to retrieve it ?

I have the following problem. I assign to any object in my database a UUID. When I get a UUID from any source, to obtain the object I need to know what type of object is, so I can query the correct table in the database. As far as I understand, UUID version 5 supports namespacing, but I am not sure I clearly understand its meaning. Is ...

Missing namespaces, LINQ works in web app but not website!

Okay guys, I have an asp.net website set up to target the 3.5 framework, using Linq to Sql. However, the site won't build, and i get missing namespace and assembly exception whenever i try to. Here's the catch, I have installed 3.5 SP1, and I have added the System.Core, System.Data.Linq, System.Xml.Linq, and System.Data.DataSetExtensio...

Manipulating namespace prefixes in SAAJ / raw xml access within SAAJ

My SAAJ-based client generates the following XML and sends it to a .NET web service: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"&gt; <SOAP-ENV:Header> <AuthenticationHeader xmlns="http://www.w3.org/2001/XMLSchema-instance"&gt; <Password xmlns="http://schemas.datacontract.org/2004/07/"&gt;temp123&lt;/Pas...

How do I wrangle python lookups: make.up.a.dot.separated.name.and.use.it.until.destroyed = 777

I'm a Python newbie with a very particular itch to experiment with Python's dot-name-lookup process. How do I code either a class or function in "make.py" so that these assignment statements work succesfully? import make make.a.dot.separated.name = 666 make.something.else.up = 123 make.anything.i.want = 777 ...

Can't add namespace to XML at runtime

I have an XML file that I need to apply a namespace to at runtime. I’ve searched the net and most examples seem to suggest using the “SetAttributeValue” function. When I use the code below it throws an exception when I try to “ToString()” with the following error: The prefix '' cannot be redefined from '' to 'http://schemas.datacontract...

Python: static variable decorator

I'd like to create a decorator like below, but I can't seem to think of an implementation that works. I'm starting to think it's not possible, but thought I would ask you guys first. I realize there's various other ways to create static variables in Python, but I find those ways ugly. I'd really like to use the below syntax, if possible...

global Javascript files and naming conventions (unobtrusive javascript)?

Hi there, I am trying to reorganize my javascript into JS files and clear out my js from my html... The way i see if is the following.... I would really like some input or any documentation/information confirming my plans - a little uncertain. Basically if i have a Home.htm file then i will have a home.js file also, notice they are na...

IObservable<T> in .NET Framework 4.0 Beta2

IObservable<T> and IObserver<T> interfaces are placed directly in the System namespace in .NET Framework 4.0 Beta2. Why not in System.Collections.Generic, like IEnumerable<T>? p.s. Reactive Framework preview from Silverlight Toolkit contains IObserver<T> in the System.Collections.Generic namespace. ...

Classes not resolving in C++/CLI Assembly.

I'm running into a very weird behavior in a C++/CLI DLL that wraps some native code, so it can be accessed through .NET. This DLL wraps code from different native DLLs and defines namespaces to separate the wrappers for the different native modules. For example: namespace Foo -> wraps code in Foo.dll (which is a native C++ DLL). namesp...

Not adding a namespace when using xml.setNamespace()

Whenever I call xml.setNamespace(ns), the namespace of the element is set to ns, but ns is also added as another namespace with it's own prefix to the element. I would like to know how to stop the latter from happening (I'm okay with modifying XML.prototype.function::setNamespace) without defining @xmlns as I can't use E4X syntax. Altern...

What is an xs:NCName type and when should it be used?

I ran one of my xml files through a schema generator and everything generated was what was expected, with the exception of one node: <xs:element name="office" type="xs:NCName"/> What exactly is xs:NCName? And why would one use it, rather xs:string? ...

How do I import a COM object namespace/enumeration in Python?

I'm relatively new to programming/python, so I'd appreciate any help I can get. I want to save an excel file as a specific format using Excel through COM. Here is the code: import win32com.client as win32 def excel(): app = 'Excel' x1 = win32.gencache.EnsureDispatch('%s.Application' % app) ss = x1.Workbooks.Add() sh...

Type/Namespace alias conventions in C#

Are there are any established naming or coding conventions for defining namespace or type aliases in C#? For those who are unaware, the C# language has a feature where aliases can be defined local to a file for namespaces and types. This can be useful when there are naming conflicts with third party libraries as well as for shortening t...

How to write cleaner code while instantiating an object with enumerations without using keyword?

Hi all, I recently created a class which has a constructor taking 3 enumerations as arguments. These enumerations are defined in the object itself as ObjectEnum and AnotherObjectEnum in the example below. LongObjectName pt = new LongObjectName( LongObjectName.ObjectEnum.EnumerationOne, LongObjectName.ObjectEnum....

Do I need to namespace my JavaScript code if it's in an <iframe>?

If I write some JavaScript that runs in an <iframe> (which is dynamically created and added to the DOM with JavaScript, if that matters), is it isolated from the global namespace of its parent page, or are conflicts still possible? I did some Googling and came across this page, but I can't really make sense of what he's doing here, or i...

Should new jQuery functions be placed within the jQuery namespace?

Context: HTML widgets generated using a Django ModelForm and template, jQuery 1.3.2, JavaScript on IE8, Firefox 3.5 or Safari 4. Procedures: An ordinary JavaScript function with some jQuery inside, or jQuery Enlightenment, Cody Lindley, "Adding new functions to the jQuery namespace," p. 116. I have a jQuery construct that is repeated se...

Shorten nested namespace names

If you use nested namespaces, declarations in header files can get very long and unreadable. //header1 namespace test { namespace test1 { class Test {}; } } //namespace In header2 of the program: #include "header1" namespace test2 { class Test1 { void test(test::test1::Test &test) {} void test1(test::test1::Test &test) {} voi...

Why does everybody use unanchored namespace declarations (i.e. std:: not ::std::)?

It seems to me that using unanchored namespaces is just asking for trouble later when someone puts in a new namespace that happens to have the same name as a root level namespace and mysteriously alters the meaning of a whole lot of programs. So, why do people always say std:: instead of ::std::. Do they really mean to be saying "I wan...

.NET - Is it possible to declare a module member accessible only to a namespace?

I'd like to declare some members of a module accessible to an entire namespace, but have them not be accessible from without. Is this possible? Thanks. ...