Questions tagged [namespaces]

1

votes
1

answer
50

Views

Can't overload i/o operators for private enum in namespace

I have a private enum in a class within a namespace. I'm trying to overload the I/O operators, but all I get is the compiler complaining about the Enum being private. The solution from this post did nothing to help me. Here is an isolated version of my problem. TestClass.h #include namespace Test {...
ABernitt
1

votes
1

answer
69

Views

How does gawk -e 'BEGIN {' -e 'print “hello” }' work?

Gawk 5.0.0 was released on April 12, 2019. Going through the announcement I found this: Changes from 4.2.1 to 5.0.0 (...) 11. Namespaces have been implemented! See the manual. One consequence of this is that files included with -i, read with -f, and command line program segments must all be self-co...
fedorqui
1

votes
2

answer
2.6k

Views

CodeDom Compile The Type or Namespace Error

I have a program using WPF in C# that uses the .NET 4 Framework (Not Client Profile), and it compiles a source file called 'Source.txt'. However, whenever it compiles it I get this error 'Error CS02345: The type or namespace name 'Windows' does not exist in the namespace 'System' (are you missing an...
Hexo
6

votes
2

answer
153

Views

Namespaces and generic functions in R

this question is somewhat a follow up on this question. Consider the following example set.seed(1) x
Cettt
1

votes
1

answer
77

Views

Function overloading between anonymous namespace and named namespace

Is this not allowed? Can someone please explain why? Algorithms.h namespace Algorithms { int kthLargest(std::vector const& nums, int k); } Algorithms.cpp #include 'Algorithms.h' namespace { int kthLargest(std::vector const& nums, int start, int end, int k) { } } // end anonymous namespace namesp...
betelgeuse
1

votes
1

answer
51

Views

The class 'App\Form\Database_InteractionType' was not found in the chain configured namespaces App\Entity

Hello i can't find the error when i try to delete something out of my database. It says that my namespace is wrong but i really cant find any issues. Here is the action im calling /** * @Route('/delete/{id}', name='delete') * @param $id * @return \Symfony\Component\HttpFoundation\RedirectResponse *...
roibubble
1

votes
2

answer
2.2k

Views

SimpleXMLElement Access elements with namespace?

I have the following XML: 0 200230455 Promotion 10001599 KFL-20% off No Min 3071 1 http://someurl Oct 15, 2012 250 http://someurl http://someurl http://someurl 22 http://someurl 13 Oct 14, 2012 300 I tried the following with no luck: $data = new SimpleXMLElement($xml); $data->registerXPathNamespace(...
Jake Wilson
1

votes
1

answer
23

Views

Why relative static call not implement namespace of extended class?

Why only static call return 2? it seems to me that a class call not by absolute name should depend on the current namespace in the class
1

votes
0

answer
57

Views

Why is it possible to call static class methods by replicating the class name prefix multiple times? [duplicate]

This question already has an answer here: Calling a static method by repeating the object name? 3 answers Why is there an injected class name? 1 answer class E { public: static void f() {}; }; int main() { E::f(); E::E::f(); E::E::E::E::f(); } why is it possible to do this ? It does not work with...
Silviu
1

votes
1

answer
1.2k

Views

CarouselView Xamarin Plugin not working

I am getting the following error: Error CS0234: The type or namespace name 'CarouselView' does not exist in the namespace 'Xamarin.Forms' (are you missing an assembly reference?) (CS0234) (your project) Using this on the XAML xmlns:controls='clr-namespace:CarouselView.FormsPlugin.Abstractions;asse...
Pxaml
1

votes
1

answer
32

Views

Using psr-4 namespaces fails

I have a problem with using psr-4 namespaces. The structure of my application is a bit complicated but I try to explain. If something is not clear, please feel free to ask! First of all I have two folders on the same level. One with backoffice classes and the other one with a rest api implementation...
altralaser
1

votes
0

answer
85

Views

XmlDocument InnerXml adds redundant namespace attributes

Using C# XmlDocument object to edit an xml document which includes namespace declarations: I then add nodes to the document (setting InnerXml) that have tags and attributes that reference these namespaces. I have 2 problems: If the created tag is in the default namespace, it is written with an empty...
DaveD
1

votes
1

answer
68

Views

variables defined in a scope v.s. namespace variables injected in that scope

When I run this code, it displays 6... #include namespace X { int p = 5; } using namespace X; int p = 6; int main() { std::cout
Hovhannes Vardanyan
1

votes
1

answer
28

Views

How to parse XML with namespace using JAXB

I just start to learn about XML and JAXB, did some examples how to marshal and unmarshal the data. However, I still have problem with parsing XML with namespace. Can anyone help me with this example 123456789 Here's the class I created @XmlRootElement (name = 'Uuid', namespace = 'com/mypackage/test'...
H. Vuong
1

votes
0

answer
55

Views

namespaces in class inheritance in php

I have been trying to undertand this with no light. This is my scenario: Files and folders: ---> Controller (dir) ------> baseController.php ------> extController.php ------> admin (dir) ---------> user.php ------> user (dir) ---------> user.php Files content: baseController.php namespace controller...
Carlos
1

votes
0

answer
140

Views

require all namespaces with a prefix

Hello fellow Clojurians, I would like to make my Clojure project extensible by auto-loading its plugin namespaces from the classpath. I would like to solve it by require-ing every namespace that has a given prefix. (require-all-ns 'module.custom) ;; this should require module.custom.video, module.cu...
erdos
1

votes
0

answer
71

Views

How to avoid XML namespace collisions when using res-auto in Android Layouts

Most sources I've read regarding custom layout attributes used in Android XML layout files say that you should declare a custom namespace, usually 'app', like so: xmlns:app='http://schemas.android.com/apk/res-auto' If my understanding is correct, this creates a namespace that allows you to reference...
rothloup
1

votes
0

answer
235

Views

Internal class visible from another namespace in Unity project

I am organizing my unity project into namespaces, and want to hide the classes that are used only inside the namespaces. I define the namespace MyProject.Accounts and place an internal class there: namespace ProjectName.Accounts { internal struct PictureData { internal int notSeenMember; } } Then i...
TheSmokingGnu
1

votes
0

answer
44

Views

Preserve host security with non root Docker containers

I'm a teacher that needs to allow his students to create Docker containers using non-admin accounts, while preserving the host safety and security. From what I understand, I can set up the docker environment to use user-namespace (userns) by default, this should grant the students root identity in c...
Big Papoo
1

votes
1

answer
228

Views

PHP SimpleXML: How to access nested namespaces?

Given this XML structure: $xml = ' Title Title2 '; $xml_data = new SimpleXMLElement($xml); How do I access the attributes of the media:content nodes? I tried foreach ($xml_data->channel->item as $key => $data) { $urls = $data->children('media', true)->children('media', true); print_r($urls); } and f...
J. Doe
1

votes
0

answer
34

Views

How to create deprecation warnings when using old namespace

I have a python package with a large number of subpackages and I've recently rewritten a good chunk of it and renamed and reorganized the packages and objects. For example, in the past, I would import something like from package import MyClass but now, it should be from package.subpackage import M...
Brendan Abel
1

votes
0

answer
83

Views

How to convert XML namespaces to Clojure namespaces during XML parse?

How to convert XML namespaces to Clojure namespaces during parse? For example with clojure.data.zip.xml lib. Is it possible by connecting external parser though? For example, we have XSD file with a number of declared namespaces inside schema tag and some of them are used in definition below
Dima Fomin
11

votes
3

answer
33k

Views

PHP Autoloading in Namespaces

I have had a slight problem with autoloading in my namespace. As shown on the PHP manual here: http://us.php.net/manual/en/language.namespaces.rules.php you should be able to autoload namespace functions with a full qualified name e.g. \glue\common\is_email(). Thing is I have a function spl_autoload...
Sammaye
1

votes
0

answer
41

Views

Namespace auto-detected — what's behind the scene?

Does C++ overload all same-name functions from different namespaces, and auto-detect which one to use for you? For example, the following piece of code calls a function Concat without specifying its namespace: namespace nsA { class A { public: A(std::string s): val(s) {}; std::string val; }; void Co...
ceylon
1

votes
0

answer
70

Views

Is it possible to create netns for a container before starting it?

I'm developing a network plug-in for Docker using docker/go-plugins-helpers and docker/libnetwork. I've tried to create a netns and mount it in the sandboxkey path received in the Join() request but after return to request Docker doesn't use my netns but it unmount my netns, creates another one and...
Phocs
1

votes
2

answer
489

Views

Multiple Laravel Apps with a Singe Redis instance

Is it possible to run two Laravel apps on a single Redis server without key name collisions? I did not see documentation for setting a namespace or adding a cache prefix. https://laravel.com/docs/5.6/redis
Justin
1

votes
0

answer
332

Views

Change ROOT element name during XML to Java Object (JAXB) conversion

I have a vendor who provides .xsd files and library which can process the data in XML format. I cannot modify the root element name in the XSD file as these XSD files are subjected to change and it results in maintenance overhead. Sample XSD file: Java class (CUSTOMERV3Input.java) generated using th...
Bhushan
1

votes
1

answer
41

Views

What is the secon to docker0 part of docker veth interface on host side?

By default we have a bridge named docker0 on host machine as one component of docker networking. When we run a docker container, it creates a vethxxx pipe which binds docker0 with one point and container with the other point, named eth0. I'm trying to find the trace of those eth0 interface on host m...
Silk0vsky
1

votes
0

answer
68

Views

VBA Connect to Remote Outlook

I am able to connect to Outlook on my local machine using Excel VBA, but I was unable to find any way to remote connect to an external outlook inbox using VBA. I was hoping I could do an ODBC connection or something similar. Does this exist? If so, how would one do it? Perhaps I'm using the wrong ke...
Alan Pauley
1

votes
0

answer
172

Views

How do I extend (rather than override) an existing type declaration?

The type declarations for one of the libraries that I'm using are slightly outdated. I'll report the issue upstream, but I'd like to work around the issue locally. Unfortunately, when I add the missing declaration, TypeScript overrides the entire namespace, forgetting about all previous declaratio...
Clément
1

votes
0

answer
90

Views

the type or namespace common could not be found

I have error 'the type or namespace common could not be found' im using iTextSharp 5.4.4 What is the problem here? Please help im looking for this solution for days... using (FileStream msReport = new FileStream('Ima se moze se', FileMode.Create)) { //step 1 using (Document pdfDoc = new Document(P...
Milan Srdić
1

votes
0

answer
20

Views

Visual Studio IDE On Class Diagram CANNOT USE / Add Or Drag/Drop file/Class Out Of Project Namespace

When using the VS-IDE Class Diagram, it is giving an error A Class With in Difference Namespace than Working Project For example: Solution NameSpace : Global.Project_A Project_A.Class A1 Global.Hardwares.ADeviceHelper Cannot create class diagram for Global.Hardwares.ADeviceHelper class file with in...
FEBitAnya
1

votes
1

answer
78

Views

How to write xpath for xml with two namespaces?

I am trying to get the values of the title and link with the attribute equals to alternate. But with the namespaces, I find it a bit challenging to get the values. I have added my namespaces as follows but my result is comming back with Enumeration yeilds no result: nameSpaceManager_ = new XmlNamesp...
Decoder94
1

votes
1

answer
39

Views

Could we import another namespace without require or include?

I saw in Google, Facebook API(s) importing namespaces without include or require relevant php file that contained importing namespace. Like this Following php file doesn't refer (require or include) any php file with Facebook\Exception namespace. Is that correct and shall it execute without any erro...
S.Macualiff
1

votes
0

answer
30

Views

XmlStartlet Namespace Issue [duplicate]

This question already has an answer here: XMLStarlet and RSS 1 answer How does XPath deal with XML namespaces? 1 answer Have issue with XmlStartlet and namespaces (using windows) I am running this from command line and not using xslt Please see sample Xml below; I want to either; delete node that...
BHamill73
1

votes
0

answer
22

Views

Is there a way to check each function in an R package against only the imports in its own roxygen2 comment block?

I am making an R package, and I'm using roxygen2 to auto-generate my NAMESPACE file, which means I am declaring my imports in the roxygen2 comments above each function in my package, something like this: #' @importFrom somePackage someFunc someOtherFunc f1
Ryan Thompson
1

votes
0

answer
419

Views

Symfony 4 without top level namespace

I want to migrate a Silex project to Symfony 4. I'm working on the skeleton first so I executed: composer create-project symfony/skeleton myProject and then required the bundles with composer require bundle for each one. One of them needs some configuration to be installed, so I added a file config/...
Manolo
1

votes
0

answer
147

Views

WSDL Definition: what is “urn:arnleadservicewsdl”

I try to create my first webservice on symfony. For that, I have applied this guide, and my Hello World is working: https://symfony.com/doc/current/controller/soap_web_service.html Now, I try to adapt given WSDL to my own code, but I'm not sure of what to do with this line in the WSDL definition: xm...
cyanat
1

votes
0

answer
38

Views

R: A better conflicts() function?

For my current project I have the base and tidyverse packages loaded and about 14 more, and I occasionally worry about bugs from potential conflicts which I have missed. I have just learned of the conflicts() function, which I think is intended to solve this problem. I find that I do not really und...
andrewH
1

votes
0

answer
71

Views

MIDL: Proper syntax for outputting namespaces for user defined types / enums?

I took my .NET assembly, used OleView to generate the IDL file, now using midl /header MyAssembly.h MyAssembly.tlb to generate a header file for use in a really old COM project. Now, MyAssembly.dll references MyAssembly.Core.dll - so I created an IDL file for MyAssembly.Core.dll as well as mscorlib...
John

View additional questions