Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
Filter by
Sorted by
Tagged with
Filter by Employee ID
Score of 5
2 answers
326 views

In some situations where I write a method that accepts a delegate as a parameter I find the need to require that the passed delegate must be static. Here is an example that can serve as a working ...
Advice
0 votes
5 replies
125 views

Look at this https://eel.is/c++draft/cmp#partialord-1 // valid values static const partial_ordering less; static const partial_ordering equivalent; static const partial_ordering ...
Advice
0 votes
5 replies
219 views

So I was looking up java interview questions and this one got me confused. I checked on Geek for Geeks and it says that they are stored in Metaspace with Class'es meta info and bytecodes while ...
Advice
0 votes
5 replies
144 views

As a (relative) novice at Rust, I am trying to understand the use of 'static in the RusTLS CommonState struct's peer_certificates method: pub fn peer_certificates(&self) -> Option<&[...
Advice
0 votes
1 replies
138 views

Back in the day, we used to spend a lot of time configuring S3 with CloudFront to serve static sites at high speeds. What are the common alternatives today, especially in the age of AI tooling?
Score of -3
1 answer
217 views

Is there any performance difference between having all of my static methods inside the main `Form` class, or having them separated out into their own class? public partial class MyForm : Form { ...
Score of 14
2 answers
834 views

Is a static inline free function in a header redundant or useless? Inline gives you "you can have more definitions with external linkage and as long as they're the same you don't violate ODR, ...
Score of 3
1 answer
213 views

What determines the order of initialization of static variables in class templates? Consider for example the program as follows: #include <iostream> int f() { static int s = 0; return ++s; } ...
Score of 0
3 answers
306 views

I am storing some settings for my application in a JSON file located alongside the application .exe. I want to load these settings only once, lazily, the first time one of them is needed. So for ...
Score of 0
1 answer
91 views

With the entered code here, I am trying to build a project on springboot. I am using AES encryption in my project. I am keeping the password (key) of AES in the application properties. The variable ...
Score of 1
1 answer
202 views

I am trying to get a unit test to work using Mockito 5.14.2. The method I am trying to unit test is a static method (m1). Within the same class Myclass1 there is another static method (m2) which ...
Score of 0
1 answer
193 views

I'm deploying a simple Django project on a local Ubuntu server VM running Docker (3 containers, Postgres, nginx and Django). The project uses a lot of HTMX and DaisyUI. On my dev environment they ...
Score of 2
1 answer
180 views

Consider the following code: public class Example { static { System.out.println(Example.value); } static final int value = 7; public static void main(final String[] args) { } } ...
Score of 5
1 answer
203 views

The following program gives segmentation fault. #include <iostream> using namespace std; class A { public: static int& a; }; int a = 42; int& A::a = a; int main() { a = 100; ...
Score of 0
0 answers
62 views

const std::string& GetLabel() { static const std::string label = "label"; return label; } Is this thread safe? Does the standard guarantee that label will exist before GetLabel()...

15 30 50 per page
1
2 3 4 5
1098