Questions tagged [namespaces]
A namespace is a container that provides context for identifiers, within which names are unique.
12,296
questions
-5
votes
1
answer
60
views
How to interpret using A = ::B::C<::D::E, F> statement in c++? [closed]
I am unable to understand the below statement and also how to use it?
Statement
using A = ::B::C<::D::E, F>
Following are the things, I would like to know:
My understanding is that using is a ...
4
votes
1
answer
67
views
Best practice for typedef'ing structs? [closed]
I've gone down a rabbit hole of questions about typedef, tag and struct namespaces, and leading _ being reserved by either the system libraries or the compilers. My question:
What is the best practice ...
0
votes
0
answers
30
views
In Julia, why would `using A: A` be preferred over `import A`?
This is an option for JuliaFormatter and part of the BlueStyle() defaults. What advantage does, e.g., using DataFrames: DataFrames have over import DataFrames?
0
votes
1
answer
56
views
static pointer variable from another namespace is not working
In my project, I am having an issue in accessing the static pointer variable in another file within a namespace.
This static pointer variable is always returned as NULL.
The code structure as below:
...
1
vote
1
answer
29
views
How to insert a custom header into a table rendered with DT Shiny with code from a separate module?
I'm completely new to modularizing in R Shiny using namespaces and I don't find it very intuitive. In the below code, broken into "Core App Code" and "Module Code", the reactive ...
0
votes
1
answer
14
views
Add namespace Microsoft.Exchange.Data.Mime to project?
Sorry as I know I must sound stupid here but how do I add/import a namespace to my project? Microsoft.Exchange.Data.Mime is what i need but I cannot find the way to add in visual studio?
Thanks
0
votes
0
answers
30
views
How to remove unwanted namespace in Flutter iOS app name displayed in Info.plist?
How can we remove 2 namespace from flutter app name in iOS
I have been facing issue in name displaying in flutter app for iOS side
i.e. In Info.plist file where we add name in CFBundleDisplayName.
...
0
votes
0
answers
9
views
merge function and namespaces over multiple files
How to Merge Function and Namespaces over multiple files?
File Structure
module/
├── module.a.ts
├── module.b.ts
├── module.c.ts
├── module.barrel.ts
└── index.ts
the module.a.ts or module.b.ts or ...
0
votes
1
answer
70
views
Problems with creating and using Linux namespaces
I'm making a go library wrapper on namespaces. There were no problems with the net ns, with ips ns and with uts ns, but there are problems with the others:
UserNs:
When trying to create, I get "...
-3
votes
0
answers
82
views
std namespace problem, need ::std to work
I have a weird error trying to compile crow library in windows using clang compiler.
Code in the crow library is enclosed in a crow namespace, like this: namespace crow { ..code.. }
Crow uses boost ...
0
votes
0
answers
8
views
How to extend jest namespace with a new function
I would like to extend jest namespace declared globally by adding a new custom spy-like function. The declaration seems to be accepted by the compiler but at run-time I am getting TypeError: jest....
0
votes
0
answers
43
views
How can I fix linker error 'Undefined symbols for architecture arm64' when importing namespaces in C++ on a Mac M1?
I try to import functoin to server.cpp from routes.cpp file.
If I put all code in one file, it will compile successfully.
I use MAC M1 to develop.
I get the error message.
Undefined symbols for ...
0
votes
0
answers
15
views
In references the Update User Import is greyed out
I am receiving errors with my Imports statement in my project. It does not recognize the namespace. In my References tab in Properties for my project the reference is there however in the Imported ...
0
votes
1
answer
18
views
Binding visibility.hidden in Xaml
I have a Boolean to Visibility converter
Imports System.Globalization
Public Class ValueConverters
Implements IValueConverter
Public Function Convert(ByVal value As Object, ...
0
votes
0
answers
14
views
XmlNameSpaceManager - Elegant way of determining correct namespace manager for XmlDocument
I have a large quantity of xml files which correspond to one of three possible namespace tables and I would like to extract data via XmlNode.SelectSingleNode however I would like to know which is the ...
0
votes
0
answers
30
views
Embed SVG in SVG and keep namespaces separated
Is there some way to embed <svg> inside <svg> and separate their namespace for classes and ids?
The idea is to make the code below render as two texts - one red and one blue without ...
2
votes
1
answer
65
views
How to "filter" and "format" namespaces based on the annotation
I want to filter namespaces based on the annotation. I do not want namespace which has annotation as components\.gke\.io/layer=="addon".
I tried kubectl get ns -o=jsonpath='{.items[?(@....
0
votes
1
answer
22
views
is it possible to select an ancestor namespace in typescript
I generate typescript code that has nested namespaces like this:
namespace A {
export type MyType = number
}
namespace B {
const myValue: A.MyType = 6
namespace A {
}
}
The ...
0
votes
0
answers
25
views
Rubix ML class not found in Laravel project
I've installed Rubix ML using composer as specified here: https://docs.rubixml.com/2.0/installation.html
I've created the following code:
<?php
use Illuminate\Console\Command;
use Rubix\ML\...
1
vote
0
answers
32
views
build.gradle error: Namespace not specified... even if it does
I have the namespace declared in my build.gradle like this:
but anyway got that error. Any Idea why?
3
votes
1
answer
75
views
difference between introducing using std::cout vs std::string::size_type to a source file
I have been using using std::cout; or using std::cin, etc., to introduce the names successfully to a source file and use them further in the functions of the file. I tried to do the same with std::...
0
votes
0
answers
14
views
How to call the data object from another namespace in already namespaced kedro pipeline?
I have the following namespaced pipelines in kedro:
def create_pipeline(**kwargs) -> Pipeline:
pipeline_instance = pipeline(
[
node(
func=split_data,
...
0
votes
0
answers
60
views
Preventing namespace conflict from header-only library dependencies
I am developing a library component which can be used as a template-heavy header-only library. The library has its own namespace for all the functions it exports.
My problem is that the library makes ...
2
votes
1
answer
23
views
Using package::function inside formula in R gives different results (specifically survival::strata inside coxph)
I believed the following two formula calls should be equivalent.
install.packages("survival")
library(survival)
Model 1
coxph(Surv(futime, fustat) ~ age + strata(rx), data=ovarian)
Call:
...
0
votes
0
answers
25
views
R: do we have a devtools version of ?base::getNamespace
For an installed R package, we have
base::getNamespace('stats')
base::getNamespace('MASS')
For a development version of our own package (that you load via devtools::load_all(".")), do we ...
1
vote
1
answer
22
views
Namespace conflict with phpUnit
file to be tested:
/a/b/c/api/localclass/s/taxinformationrepository.class.phptest:
/a/b/c/api/tests/_helpers/TestTaxInformationRepository_class.php
phpUnit directory location:
/a/b/c/api/phpUnit/
...
-3
votes
0
answers
62
views
How to reference classes inside Assets folder from a script inside Packages folder in unity?
This might be a very noob question but I have stuck on this problem. Suppose I have a script called "HelloWorld.cs" inside a custom package and is inside the Packages folder.
namespace ...
0
votes
1
answer
34
views
difference between environment namespace:ggplot2 and package:ggplot2
when I run the following code:
pryr::parenvs(ggplot, TRUE)
I got the following result:
label name
1 <environment: namespace:ggplot2> ""
2 <...
1
vote
1
answer
32
views
changing namespace of express in typescript
I wanna change the express namespace in my typescript file and add another option to it, but eslint get some errors,
declare global {
namespace Express {
interface Request {
currentUser?: ...
1
vote
2
answers
404
views
Flutter plugins crashing on Android Studio Flamingo with Gradle 8.0.0
Launching lib\main.dart on sdk gphone x86 64 in debug mode...
Running Gradle task 'assembleDebug'...
Building with Flutter multidex support enabled.
FAILURE: Build failed with an exception.
What went ...
1
vote
1
answer
39
views
How to Set objShell.Namespace using a variable instead of hardcoding
I try to create vba code that create a zip-file that contains all file in a sourcefolder, and I get problems when I try to create Shell objects (objFolder and objZipFolder).
It works fine when I ...
0
votes
1
answer
28
views
Namespace collision within R's subset() function [duplicate]
I've stumble across the following namespace problem with R's subset function so many times, that I would like to ask for a more elegant solution than mine here:
Species <- 'setosa'
subset(iris, ...
3
votes
0
answers
68
views
Using generic types for name spacing in Swift
💡 My Namespacing Pattern in Swift
I often nest types like structs or classes for namespacing in Swift.
For example, I might have a SettingsView struct that is composed from several other views:
...
0
votes
1
answer
55
views
Is this namespacing issue my problem or is it an IDE problem?
I have a namespacing notification on the PhpStorm IDE and I can't see how to resolve it.
IDE
PhpStorm 2023.1
Structure
I have a class amongst various other classes by other vendors, my class sits in ...
0
votes
1
answer
22
views
Augmenting User type for passport.js
I am trying to use correct User typing with passport.js.
Passport defines the User interface as the empty interface in the Express namespace here:
https://github.com/DefinitelyTyped/DefinitelyTyped/...
0
votes
0
answers
16
views
Python Package: Import submodule and rename it?
I'm creating a timecode python package with the following layout:
timecode/
__init__.py
timecode.py
timecoderange.py
modes.py
timecode.py contains a class called Timecode. ...
0
votes
1
answer
68
views
Samsung IAP build.gradle in Android Studio Flamingo
I am building an application, that is going to use Samsung IAP. I started with empty activity in Java and as the first thing I wanted to integrate Samsung IAP. I follow the instructions from Samsung ...
0
votes
1
answer
38
views
What code is allowed outside namespace except using directives
Using directives outside namespace body is common practice, but what are other code which can be done outside namespace body.
-1
votes
1
answer
81
views
Namespace not found in C#
This my be basic, but personally, I am stumped.
I am taking over a C# project that was previously not very well organized. Namespaces are pretty scattered throughout the code. This, to be specific, is ...
5
votes
1
answer
114
views
How can I access a C++ function if an inline namespace has the same function?
The following situation:
namespace abc{
inline namespace x{
int f() { return 5; }
}
inline namespace y{
int f() { return 6; }
}
int f() { return 7; }
void g()...
0
votes
2
answers
85
views
How to avoid error 'conflicts with a previous declaration' when using different namespaces in C++?
I'm managing socket addresses with C++ and I specialize the ::sockaddr_storage system library structure for example:
#include <sys/socket.h>
namespace ns1 {
struct sockaddr_storage : public ::...
0
votes
1
answer
47
views
Error in XML : Empty XML namespace is not allowed
I,m trying to read a webpage ( which is dictionary webpage ) with matlab and convert html data to text with extractHTMLText for get some informations but MATLAB gives this error :
" Error in ...
0
votes
0
answers
20
views
c++ namespace functions collision when functions use a namespace struct [duplicate]
I got a very annoying issue with C++ and function name resolution. consider the following code:
#include <iostream>
namespace A {
class STA{ int i; };
void func(STA a) {std::cout <&...
0
votes
1
answer
87
views
multiple C headers included in C++ project
I have C++ (C++17) project (let's call it "Client") where I have to connect with multiple different embedded devices.
Software for each device is written in C99 standard. Each device project ...
0
votes
0
answers
30
views
Usage of namespaces [duplicate]
I have a genuine question about namespaces in C++. I am working on one of my assignments that involve binary trees. I just made my header file and I am working on my source code. As I started copy-...
0
votes
1
answer
39
views
C++: casting class struct in a namespace to unsigned char *
I have a problem in casting. I have always gotten expected unqualified-id before reinterpret_cast which I think would be problem of namespace
My code is as such
namespace A{
class MsgA{
public:
...
1
vote
0
answers
47
views
Android 11 mount namespace
I'm trying to mount a microsd. As I understand it, this should be done in the global namespace. Root - magisk.
I tried like this:
su --mm -c mount -t sdfat /dev/block/mmcblk0p1 /storage/0123-4567
...
2
votes
2
answers
286
views
Did the namespaces exist prior to the introduction of the C++ 98 standard?
I read this page.
C++ header files with no extension
And I understood that comment as saying that namespaces existed even before the introduction of the C++ standard.
So wasn't that comment saying ...
5
votes
1
answer
236
views
mamba init error: AttributeError: 'Namespace' object has no attribute 'no_user'
Running mamba inside conda base.
mamba installed via mambaforge but OUTSIDE conda base. (??)
python 3.10.8
From within conda base, running mamba init gives the following error:
`user@pop-os:~$ mamba ...
0
votes
1
answer
34
views
class inside namespace and global get and set of that class issue
i cannot access private member of declared in class namespace::class
Do you have any idea how to achieve that i was searching on the web and can't find anything that solves my problem.
#include <...