111,453 questions
Advice
2
votes
7
replies
117
views
Do all definitions of an inline function in C share the same address?
I know that it's possible to take the address of an inline function, just like with ordinary functions. But if each translation unit has its own inline definition, and I take the address of the ...
-4
votes
0
answers
39
views
Message: syntax error, unexpected identifier "cek_login", expecting variable [closed]
An uncaught Exception was encountered
Type: ParseError
Message: syntax error, unexpected identifier "cek_login", expecting variable.
class login_model extends CI_Model {
public funtion ...
0
votes
1
answer
52
views
Function Filter - How to not apply filter on a specific cell value?
In Google Sheets, I have a database on which I want to apply a filter depending on 10 criteria from 10 columns, using values from 10 specific cells. I can do this, but I would like that the filter ...
0
votes
0
answers
35
views
How to keep an add on Python debugger function to stay in scope
After trying Lavi Kumar's example it seems the package import pdbext.debug in ~/.pdbrc goes out of scope when another source file is called.
~/.pdbrc:
!import pdbext.debug
alias pl !pdbext.debug....
Advice
0
votes
4
replies
73
views
Calculating resistance and resilience of a soil microbial community
I want to calculate resistance and resilience of the soil microbial community in my experiment.
I have an experimental design with 4 treatments: ambient (control), drought, warmed, and warmed & ...
3
votes
2
answers
55
views
Why does this collapsible need 2 clicks to open, then 2 more clicks to close?
Description
I'm having an issue with a collapsible requiring 2 clicks of a button to open, then another 2 clicks to close. The Show/Hide text inside the button gets mixed up as well. I think it might ...
0
votes
3
answers
209
views
Realloc in function that deletes a row in a matrix
I have just encountered a case in this C program:
void row_del(int**& a, int& row, int col, int k) {
for (int j = 0; j < col; j++) {
for (int i = k; i < row - 1; i++) {
...
3
votes
2
answers
88
views
How to use the type of a referenced column as a VARIADIC argument type in a (Postgres) SQL function or procedure definition?
The PostgreSQL documentation for argtype in function and procedure definitions states:
The type of a column is referenced by writing table_name.column_name%TYPE.
This works fine for IN mode ...
0
votes
1
answer
69
views
Variable isn't being set to result of Get-Content command
i'm trying to automate a few basic tasks for a helpdesk team and I cannot seem to understand why I cannot get the desired result from this code:
I did try to explicityl define $Tile as a [string] but ...
0
votes
1
answer
40
views
How can I determine the file extension when it can be two-level?
I am writing a function to generate a file name to avoid repetitions with a suffix similar to "(1)", which are automatically substituted by most browsers and other programs when downloading ...
0
votes
1
answer
50
views
Issues with tbl_custom_summary from gtsummary package
I want to create a table summary but want to use a custom value as the denominator in my percentage calculations. I wrote the following to divide by 25 instead of the total (17), which was working ...
0
votes
2
answers
50
views
Python matplotlib showing jagged graphs for constant value functions
I was trying to plot a function with absolute values and it's piecewise counterpart, but matplotlib was ploting the function with jagged corners.
Here is my full code:
import matplotlib.pyplot as plt
...
-1
votes
1
answer
66
views
Bad: telegram bot does not work (aiogram)
I have no idea how to fix it
I try this:
@Router.message(F.text == "/start")
async def send_welcome(message: types.Message, state: FSMContext):
await state.set_state(UserState....
-2
votes
1
answer
83
views
Could I use a dynamic function to match values to another sheet in Google Sheets? [closed]
I'm making a quiz-type thing with Google Sheets- one as the user-end (where the quiztaker would input answers) and one as the answersheet. What I want to do is have a function in conditional ...
1
vote
1
answer
121
views
Functional bean can't be recognized by Spring Function
I have two configuration classes with functional beans:
@Configuration
public class PositionReporter {
@Bean
public Supplier<Aircraft> reportPositions() {
return () -> new ...
2
votes
3
answers
128
views
How to pass object to a function in PowerShell
I am trying to save some date to a PSCustomObject in one function and pass that object to another function so I can access the objects properties and values. I am doing something incorrect as I can ...
2
votes
0
answers
188
views
Why implement a template function as free instead of member?
Is there any good reason why some STL functions are implemented as free functions instead of members?
I understand the benefit when you need to provide explicit template parameters, like std::get<N&...
0
votes
0
answers
48
views
MATLAB Simulink error when trying to pass variables through function
I have three function blocks in my simulink model; A, B, C. I am feeding block A with data 'waypoints', which is an 11x2 array. I want block A to create a 'passthrough' for 'waypoints', such that ...
0
votes
2
answers
85
views
Terminal does not return output, instead restarts code
I'm new to Python and I am building a simple interactive calculator as a project. When I run the code in the terminal, it takes all the inputs but does not return the final output. The code restarts ...
1
vote
1
answer
97
views
Is there a tsconfig flag or eslint rule to disallow unrelated types as function parameter?
Is there a tsconfig flag or eslint rule to disallow this ?
interface Order {
title?: string;
orderName?: string;
}
interface Product {
title?: string;
productId?: string;
}
var product: ...
1
vote
1
answer
86
views
Why doesn’t new Function have access to local variables in JavaScript? [duplicate]
I was experimenting with closures in JavaScript and ran into something confusing.
function outer() {
let x = 10;
return new Function("return x;");
}
const fn = outer();
console.log(fn());
I ...
2
votes
2
answers
139
views
Testing that a function receives a string
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. ...
0
votes
1
answer
47
views
How should a Function App (Container) authenticate to GitHub via the GH CLI?
I've setup a custom container in Azure that will run a Function App, with the intention of connecting to my organisations GitHub (GHE) instance and using GH CLI pull a list of repos.
I have a PAT ...
0
votes
0
answers
78
views
How do I fix "Uncaught TypeError: display is not a function"?
I am using Typescript with Webpack for a static browser application.
Here are the relevant code snippets:
[spell.ts]
export class Spell
{
// Various properties and functions, Nothing relevant. ...
1
vote
1
answer
68
views
How to type class method arguments based on function arguments passed to class constructor
I have class example:
export class Test{
private func: (...args: any[]) => void;
constructor(func: (...args: any[]) => void) {
this.func = func;
}
method(...args: any[]) {...