I have the problem β€œType or Namespace β€˜Pun,’ does not exist in the namespace β€˜Photon.’”
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/Cthecoolguy
πŸ“…︎ Jul 13 2021
🚨︎ report
What is the point of namespace?

Hey guys, I'm new to python and I'm working on a project for school and I think I'm running to a lot of problems that would be easily fixed if namespace did not exist. Can anyone tell me the exact reason why namespace exists?

πŸ‘︎ 13
πŸ’¬︎
πŸ“…︎ Jan 28 2022
🚨︎ report
I would like to get familiar with a theory behind 'namespace detail'

I tried to find any useful information about, but no luck.
I mean on theory behind, what problem it solves, what are other ways to solve same problem and why would anyone choose exact this approach instead of other.. etc..
I would be grateful for any link to article or video/audio explaining more detailed about this topic.

πŸ‘︎ 14
πŸ’¬︎
πŸ‘€︎ u/zninja-bg
πŸ“…︎ Jan 25 2022
🚨︎ report
C++, why using namespace std considered as bad practice

why we should use std:: instead using namespace std

and as a new C++ learner which way should i go with
namespace or std::

πŸ‘︎ 38
πŸ’¬︎
πŸ‘€︎ u/agent47linux
πŸ“…︎ Jan 08 2022
🚨︎ report
Question: DFS Namespace server renaming in AD

Hi all

Since the office is closed for Christmas break, I decided to move one of the file servers to a new Nimble storage. I had to move all the files to a brand new file server VM because the old one was 2012r2 with Windows Deduplication on, and Nimble says it is not an ideal config. So I moved all the files to a Server 2019 VM. Here's my question: the namespace "FileShare" has 2 namespace servers: let's call them FS1 and FS2, they don't do replication, just servers at 2 physical offices and folder targets to them depending on department and office location, so that all users have only one mapped drive. The new 2019 server is now FS3. I added FS3 as a namespace server and removed FS1 (which was the Windows 2012R2 dedupe file server) Now because I have some stubborn people who mapped straight to FS1 or its IP address instead of the namespace, I would like to remove FS1 from AD, take it off the network, rename FS3 in AD to FS1 and assign it FS1's IP address. That should be simple right, or am I missing something?

thanks!

πŸ‘︎ 19
πŸ’¬︎
πŸ‘€︎ u/joeyl5
πŸ“…︎ Dec 27 2021
🚨︎ report
WireGuard in a network namespace.

Hi everyone, Is it possible to run WireGuard in a network namespace which is connected with root via virtual ethernet?
I have setup WireGuard in such a network namespace and tried to connect one peer with it, Peer can send traffic only with no received packets/bytes.
Any help?

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/Capital_Ad_4537
πŸ“…︎ Jan 17 2022
🚨︎ report
Namespace std

Hey all. i was just wonder how everyone in here pronounces namespace std

πŸ‘︎ 30
πŸ’¬︎
πŸ‘€︎ u/VirtualGirl1
πŸ“…︎ Nov 19 2021
🚨︎ report
Can I mix names between enum namespace and primitive typedef?

In C99, instead of using macro defines and for purpose of code style and syntax highlighting, can I design my API legally and safely while mixing names between enum namespace and primitive type namespace like in the hypothetical example below? I can imagine thee would be portability issues with like C++, but the code is and will remain to be specifically for plain C99 (or later) only.

    typedef Int32 EAudioStreamDataFormat; /* predefined fixed size type */

    /* I would like to not do it like: */
    /* #define AUDIO_STREAM_DATA_FORMAT_UNKNOWN     0 */
    /* #define AUDIO_STREAM_DATA_FORMAT_FLOAT       1 */
    /* #define AUDIO_STREAM_DATA_FORMAT_INT16       2 */
    /* #define AUDIO_STREAM_DATA_FORMAT_UNSUPPORTED 3 */

    /* but I would like to do it like: */
    enum EAudioStreamDataFormat  /* NOTE: same name as typedef above */
    {
        EAudioStreamDataFormat_Unknown     = 0,
        EAudioStreamDataFormat_Float       = 1,
        EAudioStreamDataFormat_Int16       = 2,
        EAudioStreamDataFormat_Unsupported = 3
    };

    typedef struct AudioStream
    {
        void*                  buffer;
        EAudioStreamDataFormat format; /* Int32, fixed size type */
        Int32                  someValue;
    } AudioStream;

    extern Int32 CreateAudioStream(
        EAudioStreamDataFormat format,
        Int32                  someValue,
        AudioStream**          ppStream);

    Int32 CreateAudioStream(
        EAudioStreamDataFormat format,
        Int32                  someValue,
        AudioStream**          ppStream)
    {
        if (EAudioStreamDataFormat_Unknown     == format ||
            EAudioStreamDataFormat_Unsupported == format)
        {
            return -1;
        }
 
        /* do stuff */

        return 0;
    }

    Int32        errnr;
    AudioStream* stream = NULL;

    errnr = CreateAudioStream(EAudioStreamDataFormat_Float, 0, &stream);
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/Kyr333
πŸ“…︎ Jan 13 2022
🚨︎ report
Migrating from docker to podman - namespaces, users and proxies?

Greetings!

I'm currently migrating my personal server to another hosting provider and in the process I'm evaluating switching from docker(-compose) to podman.

I'm running several unrelated apps as containers on the host. Among them nextcloud, vaultwarden, gitea and a complete mail server (webail, imap, smtp), most of them are some kind of web-app.

So far I've identified a few issues I can't quite wrap my head around:

Reverse proxy

Currently I'm using Traefik as reverse proxy, directing web traffic via SNI. This suggests I wil run into problems having an automatically self-configuring reverse proxy the way docker allows.

User namespaces

Obviously I would prefer running everything in rootless mode if at all possible. By the looks of it, podman maps UID 0 inside the container to my own UID on the host (1000) and then starts using subuids starting from UID 1. Docker, with uidmapping enabled, maps a container's root user to an unprivileged subuid on the host which seems way more secure. Why does podman default to giving containers access to my personal files? How do I change that?

Misc

I would, in the same process, like to switch my mail setup to mailcow. While their mail server setup is quite good, their docker stack ... is not. It relies on fixed IPs in several places, to the extent of making dnsname auto-setup unreliable/brittle and completely falls apart when using docker with user namespaces without manual intervention (see here). It also requires docker-compose to be run as root. Is it even worth attempting to run this on podman?

How does inter-pod communication work in rootless mode? Several of my containers share the same (postgresql) db server to save on CPU and RAM. So the db would have to be its own pod, being accessed from the others. Discussion around the internet suggests this is not easy to do.


I run what I would call a fairly simple, straightforward single-host docker-compose setup. Just a few containers talking to each other, a reverse proxy and very few exposed ports. Yet it seems that, for podman, my setup is so advanced that there is no straightforward documentation covering all those cases.

I'm thankful for any advice and links to further documentation.

πŸ‘︎ 10
πŸ’¬︎
πŸ‘€︎ u/jinks
πŸ“…︎ Jan 17 2022
🚨︎ report
Confused about the relationship between iostream and the std namespace

Hi,

I am learning c++ coming from python. In python when I import a module (eg import math) and wish to acces something defined within that module (eg. the cos function), you need use a prefix to specify the imported module as the scope for that thing (e.g. math.cos())

I don't know whether I have lead myself astray, but I can't help but try and understand C++'s namespace's in these terms. I understand that when I write std::cout, I am letting the compiler know that cout is defined within the std namespace

What I can't get my head round is why std is the namespace, but iostream is the header file name. Would it not make sense for the things defined in the iostream header file to be defined under the 'iostream' namespace so that I end up writing iostream::cout? are there other namespaces within iostream? and can two different header files define things within the same namespace? How is that not horribly confusing?

Any comments on where I've misunderstood would be really appreciated

Thanks

πŸ‘︎ 12
πŸ’¬︎
πŸ‘€︎ u/ghroat
πŸ“…︎ Dec 16 2021
🚨︎ report
The type or namespace 'Panel' could not be found??
πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/I_Am_Brutal1ty
πŸ“…︎ Dec 25 2021
🚨︎ report
RBAC and limited namespace access

Is it possible to create a serviceaccount with permissions to a subset of namespaces? It seems from the docs that you either grant in the namespace of the service account, or cluster wide. I read some on impersonation but I figured I'd ask before going down that rabbit hole.

My use case is build agents. I want them to be able to effect changes to deployments to update container images, a CI/CD sort of deal. But I want to prevent the agents from touching things in critical (system or otherwise) namespaces.

FWIW this is for my homelab. Giving a god SA to the agents just feels very icky. I am not homelabbing a k8s cluster because it's the easy way, so I am very curious to know if folks have pointers on handling rbac for a situation like this.

Edit: Thanks for the suggestions and pointers everybody! What I missed was that the subject of the RoleBinding need not live in the same namespace as the RoleBinding itself. In the short term I'll just manually create a few bindings in namespaces where CI/CD should be able to update things.

πŸ‘︎ 18
πŸ’¬︎
πŸ‘€︎ u/cat_in_the_wall
πŸ“…︎ Dec 19 2021
🚨︎ report
Mullvad VPN in namespace - Firewall?

Hey,

i am using Mullvad VPN for torrenting inside a namespace similar to this tutorial. I forwarded the port for qbittorrent (incoming connections) via mullvad.

I am running Samba and other services on the same server (not the same namespace). Should i secure the torrent namespace against connection coming from the VPN (maybe trying to access the Webinterface). Normally Mullvad closes all ports accept the forwared ports, right? So at best this should not be an issue. But, better safe than sorry...

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/FluffyGrape2
πŸ“…︎ Jan 10 2022
🚨︎ report
Query to find all pages within a namespace

Hi,

I have "projects/project_name" as page title for all my projects pages.

Now, How can I list all pages withing a namespace? Regular query for "projects/" doesn't work.

Thxs.

πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/turkito71
πŸ“…︎ Jan 16 2022
🚨︎ report
Why does Maya start adding namespaces to everything after importing something, and how do you stop that?

Why does Maya start adding namespaces to everything after importing something, and how do you stop that?

πŸ‘︎ 15
πŸ’¬︎
πŸ“…︎ Dec 27 2021
🚨︎ report
Put using in namespace or outside?

I like putting it in namespaces since it reads much cleaner. How do you di it and why?

πŸ‘︎ 11
πŸ’¬︎
πŸ‘€︎ u/draganov11
πŸ“…︎ Dec 27 2021
🚨︎ report
On The Code Again - Clojure Namespaces Tutorial [video] youtube.com/watch?v=HmsC6…
πŸ‘︎ 17
πŸ’¬︎
πŸ‘€︎ u/mac
πŸ“…︎ Jan 11 2022
🚨︎ report
CLJ Stuff - Plugin that adds custom features to Intellij/Cursive (inline form evaluation and custom namespace highlighters) plugins.jetbrains.com/plu…
πŸ‘︎ 23
πŸ’¬︎
πŸ‘€︎ u/brscosta
πŸ“…︎ Dec 24 2021
🚨︎ report
call a function in a different namespace?

Hi,

I have a source file image.cpp with namespace IMAGE. In IMAGE, there's a function get_contour() within the class imageProcess. In image.cpp, it includes the header fuse.h, which is from another source file, whose namespace is FUSE.

Now in FUSE, I want to call the get_contour()function, what should I do? Any help will be appreciated. Thanks.

Here's a few steps I've tried. Put the image.h header into the fuse.cpp and in there use the using namespace IMAGE in fuse.cpp, and call the function with IMAGE::imageProcess.get_contour();

A lot of errors occurred when compiling, saying:

>In file included from fuse.cpp:10:0:
>
>image.h:56:89: error: β€˜SHARE_MAP’ undeclared
>
> std::vector<char> Image_change_Offset(vector<char> &mStoreShmMapData, NodeInfo &node, SHARE_MAP::TShareMapDescrip &descrip_modify)

πŸ‘︎ 11
πŸ’¬︎
πŸ‘€︎ u/Oswinthegreat
πŸ“…︎ Dec 31 2021
🚨︎ report
using namespace sexually transmitted disease;
πŸ‘︎ 23
πŸ’¬︎
πŸ‘€︎ u/ETsBrother1
πŸ“…︎ Jan 27 2022
🚨︎ report
Penguins, Packages, and Polluting Namespaces | Talk Julia #3 youtu.be/d3J12IBGXJA
πŸ‘︎ 28
πŸ’¬︎
πŸ‘€︎ u/runjaj
πŸ“…︎ Jan 18 2022
🚨︎ report
I am struck with Error CS0246:The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?) reddit.com/gallery/qxm4g5
πŸ‘︎ 37
πŸ’¬︎
πŸ“…︎ Nov 19 2021
🚨︎ report
Don’t reopen namespace std quuxplusone.github.io/blo…
πŸ‘︎ 81
πŸ’¬︎
πŸ‘€︎ u/vormestrand
πŸ“…︎ Oct 27 2021
🚨︎ report
A note on namespace __cpo quuxplusone.github.io/blo…
πŸ‘︎ 16
πŸ’¬︎
πŸ‘€︎ u/pavel_v
πŸ“…︎ Dec 08 2021
🚨︎ report
File-Scoped Namespaces – A Look at New Language Features in C# 10 blog.jetbrains.com/dotnet…
πŸ‘︎ 70
πŸ’¬︎
πŸ‘€︎ u/pmz
πŸ“…︎ Oct 30 2021
🚨︎ report
An error occurred when attempting to link the namespace to my Dev Org

I am seeing the below error when I attempt to create a namespace:

The org you are logging in to must be a Developer Edition org with a registered namespace. You cannot link orgs without a namespace, sandboxes, scratch orgs, patch orgs, and branch orgs to the Namespace Registry.

How can I get around this? I am creating unlocked packages from the dev org and want a namespace to avoid referencing existing classes in other orgs.

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/Mmetr
πŸ“…︎ Jan 26 2022
🚨︎ report
linux.conf.au 2022:Send in the chown()s - systemd containers in user namespaces - Fraser Tweedale youtube.com/watch?v=8tJuh…
πŸ‘︎ 11
πŸ’¬︎
πŸ‘€︎ u/Skaarj
πŸ“…︎ Jan 17 2022
🚨︎ report
Go directly to namespace jail: Locking down network traffic between Kubernetes namespaces buoyant.io/2021/12/14/loc…
πŸ‘︎ 13
πŸ’¬︎
πŸ‘€︎ u/buoyant-io
πŸ“…︎ Dec 14 2021
🚨︎ report
Issue with event namespace

I've tried everything from deleting most of the extra event script, typing it out in a fresh file, copy pasting the namespace from a paradox event file. I have no clue why it's not working and I'm starting to go insane.

Any ideas? Am I just missing the obvious?

This is the error and below the code.

Code:

[13:14:48][eventmanager.cpp:407]: Corrupt Event Table Entry -  in events/shroud_rising_phase_II_events.txtline: 1 This usually means the syntax is wrong earlier in the file (e.g. wrong number of { or }, non-existent curly brackets effects) 

[13:14:48][event.cpp:805]: Event shroud_rising_II.1 at  file: events/shroud_rising_phase_II_events.txt line: 7 has an invalid ID

Code:

namespace = shroud_rising_II 
 
#Cultist Uprising Chain  

#In the Shadows Initial Events 
country_event = {    
 id = shroud_rising_II.1    
 title = "shroud_rising_II.1.name"     
 desc = "shroud_rising_II.1.desc"    
 picture = GFX_evt_genetic_modification    
 show_sound = event_labratory_sound     
 is_triggered_only = yes      

option = {         name = shroud_rising_II.1.a     }      

 #Ignore the Cults     
option = {         name = shroud_rising_II.1.b     }     

  #Leave them alone     
option = {         name = shroud_rising_II.1.c       } 

}
πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/IwasReloading_
πŸ“…︎ Dec 29 2021
🚨︎ report
Iterate through resources in different namespaces

Hello There,

I'm trying to query resources in multiple namespaces (Kubernetes) but my limited bash knowledge is letting me down.

Eg. if I do "kubectl get pods -A"

The resulting output is printed out in six columns, I'm only interested in the first two at this point. How do I use them as "variables" in my for-loop?

example

To try and elaborate, it's easy enough to search for a pod named "random-pod1" in all contexts and namespaces, because only the "get" kubernetes function is used, however as soon as I need to "describe" any of these resources to extract more information, the namespace needs to be specified, hence my question about variablizing/linking column 1 and 2 together.

This is my very simple bash script to search for a resource ($1) by name ($2) in multiple clusters (n)

#!/bin/bash
## Usage:
## sh find.sh pod podname
## sh find.sh svc servicename
name=$2
type=$1
red=`tput setaf 1`
green=`tput setaf 2`
blue=`tput setaf 4`
reset=`tput sgr0`

for n in $(kubectl config get-contexts --no-headers | awk '{print $2}')
do
echo " β†’ ${red} $n ${reset} ←"
kubectl config use-context $n &gt; /dev/null 2&gt;&amp;1
kubectl get $1 -A -owide | grep -i $2
done

If it makes sense I'm trying to do something like:

for n in $(kubectl get pods -A --no-headers | awk '{print $1 " " $2}')  
# to get the namespace and corresponding resource - and then apply a describe to that result.

do
echo " β†’ ${red} $n ${reset} ←"

kubectl describe po $2 -n $1   
#$2 being the second column or resource name, and $1 being the first column/namespace

Hope that rambling makes sense!

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/D0hzer
πŸ“…︎ Dec 28 2021
🚨︎ report
Managing few deployments in separated namespaces

Hi, I have cluster with 10 namespaces, and every namespace contains a backend deployment + frontend deployment. Every deployments and frontends are the same, but their are in separated namespaces, and from time to time there is situations like some of deployment have "bad" image, not the latest one.

I want to create some simple app which I could deploy into my cluster, and It will has some cron jobs and will check if every deployments has the latest images once a night for example, and if not then update. What do you think about that? Maybe there is some ready solution that I can use in my situation? I will be very thanfull for every help.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/machosalade
πŸ“…︎ Dec 13 2021
🚨︎ report
Top-level statements must precede namespace and type declarations error

Hello, I ran into a problem when coding with C#. I get an error that says "Top-level statements must precede namespace and type declarations" and i can't seem to find it. Thanks for your time. (It's a unity code)

where's the error?

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/kukluxas
πŸ“…︎ Dec 03 2021
🚨︎ report
Visual studio is happy. Unity is not. Newbie Namespace question.

Unity is shouting missing Namespace! but Visual Studio is perfectly happy. What the he'll is going on?

So confused

πŸ‘︎ 15
πŸ’¬︎
πŸ‘€︎ u/Fancy_Edge2509
πŸ“…︎ Nov 25 2021
🚨︎ report
Go directly to namespace jail: Locking down network traffic between Kubernetes namespaces buoyant.io/2021/12/14/loc…
πŸ‘︎ 38
πŸ’¬︎
πŸ‘€︎ u/williamallthing
πŸ“…︎ Dec 14 2021
🚨︎ report
Python Namespace and Scope usemynotes.com/python-nam…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/usemynotes
πŸ“…︎ Jan 07 2022
🚨︎ report
Digging into Linux namespaces blog.quarkslab.com/diggin…
πŸ‘︎ 53
πŸ’¬︎
πŸ‘€︎ u/speckz
πŸ“…︎ Dec 01 2021
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.