Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
42 views

I work on a script Python and I try to send args and use PyInstaller at same time. This is an example: #!/usr/bin/env python3 import argparse import sys print(sys.argv) parser = argparse....
Chlamy's user avatar
  • 35
Advice
0 votes
1 replies
44 views

I am trying to mock a repository that inherits from the BaseRepository class in the Ardalis.Specification.EntityFrameworkCore library. This base class exposes the ListAsync method which takes in a ...
Martin's user avatar
  • 2,326
2 votes
2 answers
210 views

I'd like to write one function that either creates a new instance of a certain feature type, or modifies only the specified parameters of an existing instance (and leaves the other parameters as-is). ...
Tom Grundy's user avatar
3 votes
0 answers
186 views

I'm writing a function whose inner logic needs to know which optional keyword arguments the function was called with. I also need to be able to specify default values for keyword arguments. If an ...
Tom Grundy's user avatar
1 vote
1 answer
67 views

Im trying to understand if it is possible to turn off certain JFR events for sanitizing reasons using startup args. I know it is possible to scrub the file after downloading it, and that works just ...
Clomez's user avatar
  • 1,552
-3 votes
1 answer
103 views

Here's my current preferred method that I normally put at the top of functions: #!/usr/bin/env bash unset opts args for arg; do [[ ${arg:0:1} == "-" ]] && opts+=("$arg") || ...
mrkbutty's user avatar
  • 609
2 votes
2 answers
139 views

I would like to build a function such as: test <- function( fct = "default" ) { # here test that fct is a string # ... } in which it is tested that fct is a string of length one. ...
Denis Cousineau's user avatar
2 votes
1 answer
245 views

I need to submit a new Apache Flink Job from the Web GUI instanced in a docker container in Session Mode and i need to pass some arguments to the main function of my job written in Java. I'm trying to ...
Peppe3009's user avatar
5 votes
3 answers
397 views

I learned that in C++, array arguments decay to pointer arguments. As a result, void PrintArray(int arr[4]) { std::cout << arr[0] << std::endl; std::cout << arr[1] << ...
Jason Cho's user avatar
  • 247
2 votes
1 answer
198 views

When I do something like ARGS="$@", the shell just concatenates the arguments stored in "$@". Is there a way to store "$@" into a variable in pure POSIX shell to be able ...
Adel M.'s user avatar
  • 500
5 votes
2 answers
134 views

I am working in R trying to create a wrapper function that calls a specified internal function (which is some existing function) and does some things with it. My wrapper function will include an ...
Ben's user avatar
  • 1,790
-3 votes
1 answer
130 views

It is more question than a problem. I make my header file with a function declaration like this: void fw_iteracja_wsk_rows_a(float (*tab)[COLUMNS], int ROWS); How can I adjust/change the COLUMNS ...
Patryk M's user avatar
0 votes
0 answers
65 views

I'm new to Python so this should be pretty basics but I can't seam to accomplish what I want. Let's say I have the following data frame: df = pd.DataFrame(index=[1,2,3]) df['Currency'] = ['USD','USD','...
Raven 969's user avatar
2 votes
1 answer
122 views

I have a function of the form void foo(std::string str); I want to use it in two scenarios: send a copy of the original value to it: std::string myString = "any data that I want to keep in its ...
altchist's user avatar
0 votes
0 answers
73 views

I'm following the Hasura documentation on GraphQL Limit and Offset for pagination, and I noticed something that seems incorrect. The docs state: "If we have 50 todos, we could split them into 5 ...
Ichchha Gupta's user avatar
0 votes
1 answer
95 views

I have a project in laravel 11 and there are some issues with my config. The site should support optional locale param to differentiate between default and custom language: DE: https://example.com/...
Bajlo's user avatar
  • 1,437
7 votes
1 answer
429 views

I am having problems with arguments in C++ console programs built under C++Builder 12 Community Edition. If the executable is in a folder with spaces in its name, eg. "test dir", and I ...
Bruce Varley's user avatar
1 vote
2 answers
96 views

I have an R script that takes arguments that I want to be able to execute without having to type the entire path to the script location. For examples sake, lets say this is the script: # arguments ...
Tom Chiodo's user avatar
0 votes
1 answer
152 views

I want when executing the following command: playwright codegen demo.playwright.dev/todomvc I open the browser with the arguments of --disable-web-security --user-data-dir=“...”. Can this be done? I ...
Felipe Sanguino's user avatar
1 vote
1 answer
75 views

I am working with curried functions in TypeScript, and I want to figure out a way to automatically detect if a function is curried and, if it is, decurry it into a non-curried function. Problem: A ...
Sinan Ismail's user avatar
1 vote
2 answers
51 views

I have created the following function in my $PROFILE script file : function host($name, $server, $type) { $FUNCNAME = $MyInvocation.MyCommand.Name $argc = $args.Count if ( $argc -eq 0 ) { ...
SebMa's user avatar
  • 4,965
2 votes
1 answer
90 views

Here is a rudent prototype that I want to implement: void save_keys(const string& savepth, const vector<string>& keys) { size_t n_samples = keys.size(); stringstream ss; for ...
Zeyu Zhang CN's user avatar
1 vote
1 answer
65 views

In SBCL when I describe a lambda I get a bunch of detail: * (setf f (lambda (a b) (* a b))) #<FUNCTION (LAMBDA (A B)) {535B3C3B}> ...
jshrager's user avatar
  • 319
1 vote
1 answer
59 views

I am trying to create a function in R that creates a geometric sequence based on the inputs of 'start' (the starting value), 'by' (the common ratio) and two arguments that depending on which one is ...
Avi Grant's user avatar
1 vote
0 answers
193 views

I have already a commands enum. I want to add optional arguments which would apply to all subcommands, if set. use clap::Parser; use clap::{ValueEnum, Subcommand}; #[derive(Subcommand)] pub enum ...
unsafe_where_true's user avatar
1 vote
1 answer
85 views

All examples tested using Python 3.13.2 on Windows 10. When calling range(), I must use positional arguments, or otherwise I get an exception. >>> range(2, 5) range(2, 5) >>> range(...
Qba23's user avatar
  • 11
-1 votes
3 answers
59 views

word = input("Enter a word: ") print("Original String is: ", word) size = len(word) print("Prnting only even index chars") for i in range(0, size - 1, 2): print(&...
Eugene Pashkevich's user avatar
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
0 votes
0 answers
17 views

I tried to use EELSFitter (https://lhcfitnikhef.github.io/EELSfitter/build/html/index.html) package for EEL spectra processing. I am interested in the Kramers-Kronig analysis (https://lhcfitnikhef....
Hyperbolic's user avatar
0 votes
1 answer
180 views

I am trying to use Prophet to forecast Lululemon's stock prices. However, I am encountering the following error when fitting the model: TypeError Traceback (most recent ...
Lorena Schafer's user avatar
0 votes
0 answers
26 views

I'd like rewrite URL https://example.com/mapa/viewer/index.php?code=XXX&m=YYY to https://example.com/XXX&m=YYY Intent- rewrite URL to content of embedded iframe to parent site, prevent loop I ...
Jarek Sobański's user avatar
0 votes
0 answers
21 views

I'm writing my own lib on top of some Spring functionalities. Sadly NamedParameterUtils.parseSqlStatement and related classes do not expose anything useful (almost everything is declared private, and ...
Vento's user avatar
  • 91
2 votes
1 answer
64 views

function test { [CmdletBinding()] param ( [Parameter( Mandatory = $true, ParameterSetName = "MyArgument" )] [ValidateSet("...
Sanctuary's user avatar
  • 397
0 votes
1 answer
59 views

Having any Python function as: def function1(param1, param2): #... return 0 How would be possible to get a param string name (variable name) used in the function call? ideally getting this ...
codev's user avatar
  • 43
0 votes
0 answers
21 views

HTTP = require "ssl.https" KEY = GetTotalHashHWID() .. "" local HWID = HTTP.request("https://gitlab.com/at/a/-/raw/main/HWID%20FAST%20MENU%0TETS") ...
user avatar
0 votes
1 answer
111 views

I have a function which takes a list of arguments that I want to pass to a function in a target. Only when I try to use that multivalueargs, it places the second and further arguments on the following ...
Alexis Wilke's user avatar
  • 21.2k
2 votes
0 answers
173 views

I’m working with Elementor Pro and ACF and need help setting up the Elementor Search Widget to show results for my custom post type project based on its ACF relationship field partner. So if I search ...
joanatglider's user avatar
0 votes
1 answer
317 views

i have a master table as EMP_NAME with few values in it and column name as EMPNAME. I want to pass these values as argument to a snowflake procedure which will create tables with employee name in ...
NITIN MALIK's user avatar
3 votes
1 answer
116 views

In Pascal, you can declare multiple function arguments as a single type: procedure TMyClass.Foo(Bar1, Bar2, Bar3 : string; Bar4, Bar5, Bar6 : Integer); I always enjoyed this because it prevented ...
David Rahl's user avatar
0 votes
4 answers
85 views

This code explains my problem best: <html> <head> <script> function showDiv (divId, dat){ document.getElementById(divId).innerHTML = dat ; document.getElementById(...
toom's user avatar
  • 11
0 votes
1 answer
75 views

I'm using an example function from the google-api-python-client library that takes command line arguments and parses them using argparser. Here's the code this is based on (converted to python3) https:...
icicleking's user avatar
  • 1,085
0 votes
2 answers
62 views

I want to pass variable number of references to objects to a C++ function. Say, I have class ParameterBase and instances of classes derived from this base class. I want a function, which checks that ...
one_two_three's user avatar
0 votes
0 answers
92 views

I'd like advice on how numpy arrays and Python lists are passed into functions. Specifically, VBA and other languages I'm familiar with can be explicit in the function definition if an argument is ...
Murray Anderson's user avatar
2 votes
0 answers
88 views

#include <stdio.h> #include <getopt.h> #include <stdlib.h> #define PORT 12344 int main(int argc, char** argv) { int opt; int server_fd, client_fd, epoll_fd; int ...
Udeshya D.'s user avatar
1 vote
2 answers
205 views

I have an existing method: public function dbQuery( string $query, bool $flag1 = false, int $flag2 = SOME_DEFAULT, bool $flag3 = false ) Now I want to adapt it so it is possible to ...
Alex Dawn's user avatar
1 vote
1 answer
62 views

In Haskell I have the following data structure data Circ = IN String | NOT Circ | AND Circ Circ | OR Circ Circ | XOR Circ Circ I can pattern match functions on this like so: size :: ...
spykyvenator's user avatar
1 vote
2 answers
123 views

I have a function which accepts 7 input, each of them could be a scalar (float), a list, or a numpy array. For subsequent calculations, I want to convert them all to numpy arrays. import numpy as np ...
rajesh rupakhety's user avatar
0 votes
0 answers
47 views

Suppose I have a python class with arguments in the __init__ method with types specified. class A: def __init__(self, arg_1:int, ..., arg_n:int): pass Suppose I inherit from it as such: ...
Leonhard Euler's user avatar
1 vote
2 answers
232 views

Context I'm trying to create a C program that takes multiple integers as input via the print(...) macro, without needing to pass the length of arguments manually from the main function. To achieve ...
Sakib Khandaker's user avatar
1 vote
1 answer
116 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

1
2 3 4 5
242