namespaces

Command line arguments - object required: 'objshell.NameSpace(…)'

蹲街弑〆低调 提交于 2020-01-13 09:24:08
问题 I am working on a script that will utilize the built in capabilities of Windows to unzip a supplied .zip file. I am pretty new to vbscript so some of the syntax stumps me a little. I am working with some existing code and trying to modify it so that it will take a command line option for the file name. If I use the command line to pass the file name, I receive the error: object required: 'objshell.NameSpace(...)' If I populate the same variable with text within the script, the script runs

How to add namespace while signing XML file using javax.xml.crypto.dsig.*?

天大地大妈咪最大 提交于 2020-01-12 21:48:12
问题 I'm trying to sign an xml file using enveloped signature and javax.xml.crypto.dsig.* classes. As a result I get file with correct Signature content but with no namespace defined. How can I add xmlns:ds="http://www.w3.org/2000/09/xmldsig#" namespace and corresponding ds prefixes? I don't see any place where I could define it. Example code: XMLSignatureFactory xmlSignatureFactory = XMLSignatureFactory.getInstance("DOM"); (...) XMLSignature signature = xmlSignatureFactory.newXMLSignature

C++ Name Resolution

寵の児 提交于 2020-01-12 07:53:06
问题 I'm wondering a bit about the namespace and using in C++ basically I would like to know the differences and figure out how to use it in the best way. As I see it there are (at least) three ways to resolve a class name and I am not sure how to choose among them: using namespace <namespace> using <namespace>::<what_to_use> <namespace>::<what_to_use> <use_it> I would like to know the advantages especially if there are performance involved in one or the other way, if it's just syntactical and a

C++ namespace alias in entire class scope

孤人 提交于 2020-01-11 18:35:29
问题 I expected to be able to use a namespace alias in a class declaration but get a compiler syntax error. struct MyClass { namespace abc = a_big_namespace; void fn() { abc::test(); } }; The only way I can get it to work is to put the alias in every function. void fn() { namespace abc = a_big_namespace; abc::test(); } Additionally I would like to be able to use the alias for function parameters. I haven't found a work-around for that. void fn(abc::testType tt) { abc::test(tt); } Is there a way to

How to get Python interactive console in current namespace?

六月ゝ 毕业季﹏ 提交于 2020-01-11 16:02:08
问题 I would like to have my Python code start a Python interactive console (REPL) in the middle of running code using something like code.interact(). But the console that code.interact() starts doesn't see the variables in the current namespace. How do I do something like: mystring="hello" code.interact() ... and then in the interactive console that starts, I should be able to type mystring and get "hello". Is this possible? Do I need to set the "local" argument of code.interact() to something?

Namespace Alias in Laravel

为君一笑 提交于 2020-01-11 13:23:08
问题 I apologize if this is duplicate; please guide me to the right directions. I know we can create class aliases in Laravel from /config/app.php . However trying to create namespace aliases using the same method fails. /* |-------------------------------------------------------------------------- | Class Aliases |-------------------------------------------------------------------------- | | This array of class aliases will be registered when this application | is started. However, feel free to

PHP Global namespace aliases

痞子三分冷 提交于 2020-01-11 12:28:29
问题 Here is the scenario. I am implementing namespaces into my projects. I have my own custom bridge library that calls other libraries like Zend to do the heavy lifting. I have no problem using fully qualified namespaces in my custom bridge library but would like to keep the code as terse as possible in my controllers, models and view. Here is an example of some aliasses i would like to use: use BridgeLibName\Stdlib\Arrays as arr; use BridgeLibName\Stdlib\Objects as obj; use BridgeLibName\Stdlib

Why do I lose all symbols when using in-ns to move to a new namespace?

浪尽此生 提交于 2020-01-11 10:47:09
问题 Running the following code in a Leiningen REPL: (in-ns 'my-namespace.core) (+ 2 2) results in this error: CompilerException java.lang.RuntimeException: Unable to resolve symbol: + in this context Why? 回答1: When you create a new namespace using in-ns , the core namespace ( clojure.core ) is not referred by default. "Referring" a namespace means including it in your namespace in such a way that you can refer to that namespace's symbols as your own. It is still possible to use symbols from

The name “…” does not exist in the namespace “clr-namespace”

久未见 提交于 2020-01-11 10:22:49
问题 I am having a weird problem with Visual Studio 2012, .NET 4.5 and WPF. Views wont find references to any of my clases and I keep receiving the error "The name "..." does not exist in the namespace "clr-namespace" " while intellisense do find any of my clases What I've tried: xmlns:common="clr-namespace:IVT.Common.View;assembly=IVT" xmlns:common="clr-namespace:IVT.Common.View;assembly=" xmlns:common="clr-namespace:IVT.Common.View" Moving my classes to other namespaces I restarted visual studio

Dynamic namespaced class with alias

本秂侑毒 提交于 2020-01-11 09:35:08
问题 SO, I have an issue with dynamic object creation using namespaces. Here's namespace code: namespace Foo { class Bar { } } Now, I'm trying to create object of class Bar with: include('namespace.php'); $sName = 'Bar'; $sClass = '\\Foo\\'.$sName; $rObj = new $sClass; //correct object and everything going well with that. But, now I want to use alias and doing something like: include('namespace.php'); use Foo as Baz; $sName = 'Bar'; $sClass0= '\\Foo\\'.$sName; $sClass1= '\\Baz\\'.$sName; $rObj =