A list of puns related to "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?
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.
why we should use std:: instead using namespace std
and as a new C++ learner which way should i go with
namespace or std::
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!
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?
Hey all. i was just wonder how everyone in here pronounces namespace std
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);
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:
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.
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?
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.
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
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.
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...
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.
Why does Maya start adding namespaces to everything after importing something, and how do you stop that?
I like putting it in namespaces since it reads much cleaner. How do you di it and why?
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)
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.
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 }
}
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?
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 > /dev/null 2>&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!
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.
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)
Unity is shouting missing Namespace! but Visual Studio is perfectly happy. What the he'll is going on?
So confused
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.