Skip to main content
-2 votes
2 answers
226 views

In a C++ program, I have an API function with the following signature: Foo const & GetFoo() const; The Foo class doesn’t allow copying or moving of instances. The API can’t easily be changed. Now ...
user149408's user avatar
  • 6,269
1 vote
0 answers
43 views

We've been plagued for years by the GetFileOpenName and GetFileSaveName functions that open Windows dialog boxes. When the user closes them, the application's current directory has changed. Afterward, ...
Kurt Triebe's user avatar
1 vote
0 answers
23 views

I want to define an agent with two different types, A and B and then I want to separate each type and do some calculation of each type. for this aim, I defined an agent, called Product. Then I defined ...
KaSher's user avatar
  • 11
0 votes
1 answer
161 views

I have a typer cli command like this: @app.command( no_args_is_help=True, help="Test command help text" ) def test(name:str = typer.Option( None, "--test", ...
Kakha Chankseliani's user avatar
4 votes
1 answer
70 views

Sometimes I write functions that involve renaming/relabeling a lot of variables in different places, using a relabeller. The relabeller is used in multiple contexts, both directly in my code (e.g. for ...
Jaken's user avatar
  • 601
1 vote
2 answers
105 views

I have a custom function that calls ggplot. I'd like to make one of the ggplot arguments optional - for example, changing the color of geom_point. I know two ways to do this, as shown below; one is to ...
Jaken's user avatar
  • 601
0 votes
1 answer
55 views

I am trying to iteratively generate project sheets row by row in an excel. Some columns have long descriptions so wrote an additional sub function to handle the long text strings. I believe an error ...
olivia bergmann's user avatar
2 votes
1 answer
100 views

I have a class with many many fields, all of which are Optional when deserialized from JSON. Is there a way to convert this to a class with matching all non-Optional types. My optional class @...
Sunny's user avatar
  • 73
0 votes
2 answers
97 views

I am trying to create a customized function that uses ggplot facet_wrap, in which the user can optionally provide labels. I've wrapped the facet_grid argument in an if/else clause depending on whether ...
Jaken's user avatar
  • 601
1 vote
1 answer
114 views

Show bash and getopt version in my OS: bash --version |grep [r]elease GNU bash, version 5.2.15(1)-release (x86_64-pc-linux-gnu) getopt --version getopt from util-linux 2.38.1 In the getopt's manual(...
showkey's user avatar
  • 375
0 votes
2 answers
69 views

I'm trying to program a function that takes an optional weights argument and passes it to model.frame: test <- function(ff, weights, data) { mm <- model.frame(ff, data, weights=weights) y &...
amrods's user avatar
  • 2,131
-2 votes
2 answers
123 views

I'm new to the whole VBA thing, currently practicing making macros for Excel worksheets. I wanted to make a button that, when pressed, updates query from the table to an archive table and then updates ...
Fin's user avatar
  • 1
1 vote
0 answers
74 views

I'm experiencing an issue with sending AT commands through a serial port in my code. The problem is that when I send the following commands: while (true) { thread_sleep_for(5000); ...
user avatar
0 votes
1 answer
65 views

I’m working with ASP.NET Core routing and have encountered some confusion with optional parameters. I have a route with an optional parameter id: app.Map("products/details/{id?}", async ...
Mohamed Taha's user avatar
0 votes
2 answers
45 views

I am logging out (well, print()-ing) some variables, and too many times as output I have value: Optional([:]) I want to ignore this value, so I tried if a == Optional([:]) { // ignore } else { ...
The Outstanding Question Asker's user avatar

15 30 50 per page
1
2 3 4 5
97