namespaces

Actionscript-3 namespaces and dynamic types?

Okay, so this is a strange one... Is it possible to add namespaced members to anonymous or dynamic types? Say, if you wanted to "flag" a builtin type as "touched" for example? Earlier I thought about adding hidden members to StyleSheets and their inner styles and wondered how I'd prevent them being overwritten or serialized or whatever...

Debugging Namespace Extensions using Visual Studio

What is the best way to debug a namespace extension using Visual Studio? It's not convenient to use regsvr32 to register and unregister the extension and to restart the Explorer for each and every build. Attaching the debugger to the extension would be a nice benefit. Is there a simple way to debug a namespace extension using Visual Stu...

How do I avoid namespace and class name collision in "vertically partitioned" assemblies?

By "Vertically partitioned", I mean having namespaces named after modules rather than "layers" So, MyApp.Core MyApp.Accounting MyApp.OrderManagement MyApp.HR instead of, MyApp.UI MyApp.Business MyApp.Data The only issue I am running into is that sometimes those assemblies might have a part of the namespace that is same as a ...

File locking with Fcntl: Baffling bug involving 'use' and 'require'.

The following Perl script outputs "SUCCESS" as you'd expect: use Fcntl qw(:DEFAULT :flock); sysopen(LF, "test.txt", O_RDONLY | O_CREAT) or die "SYSOPEN FAIL: $!"; if(flock(LF, LOCK_EX)) { print "SUCCESS.\n"; } else { print "FAIL: $!\n"; } But now, replace that first line with require "testlib.pl"; where testlib.pl contains use Fcn...

Set a variable in an Iframe

Is it possible to create an Iframe using document.createElement("iframe"); and then set a variable in the iframe's window object such as a namespace? I have tried doing something like this: var Namespace = {}; var iframe = document.createElement("iframe"); iframe.src = "page.html"; document.body.appendChild(iframe); var iwin = ifram...

grails portlet namespace

How to use namespace in grails portlets for Liferay . Generally we use this in jsp portlets : '<portlet:namespace />_Users' Can we use the same for grails too ? thanks. ...

JDOM, XPath and Namespace Interactions

Hi all, I'm having a very frustrating time extracting some elements from a JDOM document using an XPath expression. Here's a sample XML document - I'd like to remove the ItemCost elements from the document altogether, but I'm having trouble getting an XPath expression to evaluate to anything at the moment. <srv:getPricebookByCompan...

What does xmlns="" exactly mean

Given the following (piece of) a soap call; <m1:NextCommencementDateInput xmlns:m1="http://foo.bar.com/Types"&gt; <aDate xmlns="">2010-06-02</aDate> </m1:NextCommencementDateInput> Apperantly this is the same as (when validating against the xsd using XMLSpy) <m1:NextCommencementDateInput xmlns:m1="http://foo.bar.com/Types"&gt; ...

translate rails namespaces

Hi, lets say i have the following resource map.namespace :admin do |a| a.resources :users end to access the users index action I would have to type /admin/users How can I translate this route to different languages? map.namespace :admin do |a| a.resources :users, :as => ipsum end would result in /admin/ipsum How can i c...

visiblity problems with namespaces

Hi. I have two source files, one named main.cpp (where the namespace M is defined) and the file engines.h (where serveral names are defined). main.cpp includes engines.h. engines.h need to use the stuff inside M, and M needs to use the stuff inside engines.h. I get an error doing using namespace M; in engines.h. ...

difference between classes and namespaces?

Im looking at namespaces and i dont really see a difference between these and classes. im teaching myself c++ ive gotten several books online, so i know im not learning the most effectively. anyways can someone tell me the difference between the two and what would be the best time to use a namepace over a class. also i dont see much ab...

How to get nodelist using java/XPath in an xml file having namespaces and prefixes

How to get nodelist using XPath with namespaces and prefixes? This java code segment doesnt seem to work. NodeList shows = (NodeList) xPath.evaluate("//ns1:Request", new InputSource(new FileReader("sample.xml")), XPathConstants.NODESET); here's the sample.xml for input: 5ec9d112:1292fffd92a 1 ...

Avoid global variables/methods name clashes when using C headers in C++

I recently spent some time chasing an annoying little bug and I'm looking for suggestions for those of you who have either encountered the same problem or know the best way to avoid it. I have a situation where I am developing in C++ and using strerror and as a result I am using something similar to extern "C" { #include <string.h> } ...

using variables to decide type of class or namespace

Alright, so i had the bright idea of using namespaces and an if statement to change the outcome of variables, in PHP i imagine i could've used concatenation however c++ doesnt seem to have concatenation as far as i can see so far. so is there a way to get this code to work? namespace Blue { int seven = 7; int eight = 8; } namespac...

Nested NameSpaces in C++

I am confused what to do when having nested namespaces and declaration of objects. I am porting some code that links against a static library that has a few name spaces. Example of what I am talking about: namespace ABC { namespace XYZ { //STUFF } } In code what so I do to declare an object that is in namespace XYZ...

Accessing an enum in a namespace

In a header I have a setup like this namespace NS { typedef enum { GOOD, BAD, UGLY }enum_thing; class Thing { void thing(enum_thing elem); } } and of course another cpp file that goes along with that header. Then I have a thread cpp file that contains main(). In this cpp file I use that enum to pass to the method t...

Why do I have to add System.Data.Entity to use System.Data.Objects?

I am still learning about programming as you can probably tell by my question. How come I have to add System.Data.Entity as a reference to my project to use System.Data.Objects? Does Objects live in namespace System.Data.Objects? Wouldnt it make sense for Objects to live in System.Data.Entity.Objects? ...

Usage of namespaces in c++

Can we use namespaces like in below snippet? The code compiles in both gcc and msvc, leaving me confused about namespace usage. In f1.h: namespace My { void foo(); } In f1.cpp ` void My::foo() { } I thought that the function should be defined as: namespace My { void foo() {} } Can anyone kindly explain? Thanks ...

Ambiguous Class Namespace Issue

I... feel really silly asking this, but I'm not sure how to resolve the problem. This is a little snippit of my code (Objective-C++): #include "eq/eq.h" namespace eqOther { class Window : public eq::Window //<-- Error occurs here { public: Window( eq::Pipe* parent ) : eq::Window( parent ) {} void popup(); ...

Does importing more namespaces have an effect on performance?

Does importing a large number of namespaces have an impact on performance? Specifically in C# .NET or in general? Obviously I would not import a namespace I wasn't going to use, and i'd probably never have to import so many as to worry about performance, but this is more out of general interest than an actual, practical problem i'm fa...