Skip to main content
2 votes
1 answer
201 views

Suppose I'm writing or maintaining a C++ library. The library code is all available within some namespace, say namespace mylib. Also, some of the library code uses standard library constructs. In ...
einpoklum's user avatar
  • 140k
4 votes
2 answers
199 views

I am pretty sure the feature I am looking for doesn't exist in C++, but maybe there are smart alternatives that do something similar. In C++, we have Argument Dependent Lookup (ADL) feature, also ...
prapin's user avatar
  • 7,195
1 vote
1 answer
114 views

My server with socket.io is running fine without nginx proxy, but when I use nginx proxy, its getting an xhr poll error when trying to connect Here's the server block of my nginx looks like location /...
Dylan's user avatar
  • 1,390
Advice
0 votes
2 replies
102 views

The term 'scope' in the context of python programming feels very loosely defined to me and i am having trouble understanding it. Some definitions use the phrase 'variable scope'/'scope of a variable), ...
Darius Yip's user avatar
9 votes
1 answer
651 views

Assume there are two translation units that differ only in the name of one namespace: aggregator_1 vs. aggregator_2: // Translation unit 1 namespace a { struct Point { int x; int ...
Igor G's user avatar
  • 2,778
0 votes
1 answer
144 views

I have this demo. I am confused why I don't have to provide the name of the namespace tn for friend class InnerClass for the base class. Marked in the below code. I would expect to use friend class tn:...
Peter VARGA's user avatar
  • 5,363
Best practices
1 vote
2 replies
58 views

I am writing (in Python) a function for import and use in another program. This function takes standard Python data structures as input, e.g., list of strings, and outputs a numpy array based on the ...
TheSenate's user avatar
  • 101
0 votes
0 answers
56 views

I am trying to get a basic console app with multiple files working in Visual Studio Code (macOS, version 1.108). I created a new .NET project, specified a console project, and got the Program.cs file. ...
paulrusof's user avatar
  • 412
17 votes
1 answer
753 views

Consider struct A; namespace ns { int f(A&&); } struct A { friend int ns::f(A&&); }; int x = f(A{}); GCC trunk translates the last line into a call to ns::f(A&&) in C++20 ...
cpplearner's user avatar
  • 20.9k
0 votes
1 answer
94 views

I have a script in postgres to create test data and error Error: relation "schema" does not exist is being thrown. I have verified that the schema and function exists and that I can run the ...
ferd tomale's user avatar
1 vote
1 answer
139 views

Suppose I have a function like the below in a large R script, and I am trying to refactor it into a package to make it re-usable in other scripts: mymean <- function(x) { assert_that(is.numeric(...
Ryan C. Thompson's user avatar
1 vote
1 answer
147 views

I have a regression test for a PostgreSQL database that checks to make sure a particular user cannot self-assign additional privileges to a particular schema. I do this by logging in as the user "...
Erik Knowles's user avatar
  • 1,013
0 votes
1 answer
111 views

I need to create a modified version of a function found within a package namespace to perform a specific statistical calculation. E.g., say I have a function function and save the modified version as ...
user2352714's user avatar
0 votes
0 answers
89 views

I have two namespaces, ns1 and ns2. I created two veth pairs and connected the namespaces to the host via these veth pairs. Now, I want to enable these two namespaces to ping each other using a very ...
light_rain's user avatar
2 votes
0 answers
29 views

In file1.ts I have: export namespace MyGlobal { export namespace File1 { export const X = 2 } } In file2.ts I have: export namespace MyGlobal { export namespace File2 { export const X = ...
Richard's user avatar
  • 21

15 30 50 per page
1
2 3 4 5
832