111,446 questions
-7
votes
4
answers
117
views
problem in javascript temprature converter [closed]
I am trying to make a temperature converter that automatically changes value when the user changes the input and clicks elsewhere (using the onChange in my html file) in javascript, but when i type in ...
2
votes
1
answer
72
views
Utilizing a loop or automated approach to join all possible elements in one dataframes together based on defined criteria
Summary: I want to be able to recreate my SQL code via Python such that I dont have to manually type out each join for situations when the combinations get too large to handle
I have one table
import ...
Advice
0
votes
0
replies
19
views
Enable Defender CSPM (Advanced) and CWPP via Azure Policy
I would like to deploy policy at the management group level to enable Micosoft Defender for Cloud. (I have owner role for all mgmt groups).
I found some these in-built policy definition:
Microsoft ...
Advice
0
votes
3
replies
41
views
Trigger Function to check record uniqueness
I have a trigger in Postgresql 13 like this to prevent duplicate entry on one of the coloumn :
This trigger is used in Arcgis Field Map apps.
CREATE OR REPLACE FUNCTION xxx_check_unique()
...
-1
votes
1
answer
73
views
How to do a previous/next function? [closed]
I've been working on this personal website and I had this section where I blog post, but instead of having an never ending blocks of post that you would have to scroll down, i wanted to implement a ...
0
votes
1
answer
116
views
Remainder check and pass on to main program
I'm writing a simple maths sketch. At this point I want to check if 2 random numbers, when divided, leave a remainder. If not then pass them onto the next part of the program. If the remainder is not ...
-3
votes
0
answers
80
views
What is the correct syntax for using the Lead Function in SQL Anywhere [closed]
Handbook:
LEAD (value_expr) [, offset [, default]]) OVER ([PARTITION BY window partition] ORDER BY window ordering)
This could not be right.
My code looks like that:
SELECT
LEAD(tbl6.StartTime, 1, ...
0
votes
1
answer
63
views
Is there any function to remove litespeed_docref from heaader in WordPress website [closed]
I am looking to remove
<script data-no-optimize="1">var litespeed_docref=sessionStorage.getItem("litespeed_docref");litespeed_docref&&(Object.defineProperty(document,&...
Advice
2
votes
7
replies
126
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 ...
1
vote
0
answers
60
views
Error with Random Intercept Model Using nlme and Custom Function
I am working with a custom logistic function:
logistic.fcn <- function (x, y0, y100B, dy100.F, a, x0B, dx0.F, isF_num) {
y0 + ((y100B + isF_num*dy100.F)-y0)/(1 + exp (-a * (x - (x0B + isF_num*...
Advice
0
votes
2
replies
52
views
Make these all apply to one function, so that one plays, but stops the one before it
How do I make these all apply to one function, so that one plays, but stops the one before it?
Code
def rex_audio(self):
RexAud = SoundLoader.load('Rex.wav')
RexAud.play()
...
0
votes
1
answer
65
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
43
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....
1
vote
0
answers
81
views
Type '(x: string) => void' is not assignable to type '(x: unknown) => void' [duplicate]
unknown is so annoying to work with when using strict Typescript. I understand not being allowed to assign a type unknown to a known type, but you are able to assign known types to unknown. So why ...
Advice
0
votes
4
replies
76
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 & ...
0
votes
1
answer
139
views
How to modify a Python function to handle one, several, or all parameters in a dictionary
I want to setup an environment in a Jupyter notebook where parameters are stored in a dictionary parValue and where you can change values of one or several parameters with a function par(), while ...
3
votes
2
answers
64
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
149
views
Array Functions
I am currently learning the new array functions in Excel. I've been learning them for a bit, but still learning.
I am trying to create a dynamic YTD type report off some dummy data however I can't ...
0
votes
3
answers
219
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++) {
...
0
votes
1
answer
67
views
Store the result of a function in a reactive and reuse it in a other function Rshiny
Motivation : I would like to have the app.R file as svelt as possible so I use function to do the larger part of computations that doesn't need to be made in a reactive environnement. Still, I need ...
3
votes
2
answers
89
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 ...
2
votes
1
answer
211
views
Void function doesn't print elements of matrix C++
I'm trying to print elements of matrix (example will be below). Here is the following code written in Dev-C++:
#include <iostream>
using namespace std;
class Matrix {
private:
int **...
-1
votes
1
answer
77
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 ...
2
votes
1
answer
98
views
Why is my parameter seen as a NoneType when I set it as an integer?
I followed the Panda3D tutorial and got everything working so tried adding my own custom arguments using argparse. The first one I made was --no-rotate where it would stop the camera rotating which ...
0
votes
1
answer
48
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 ...
-2
votes
2
answers
81
views
If I want a string of text to print if a variable is less than a number how can I do this? [closed]
I'm trying to understand how functions work, I defined my function with length and area parameters.
Here is the problem: I want to write if area is less than a # then print a string of text.
def ...
0
votes
1
answer
61
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 ...
1
vote
1
answer
61
views
Can't deploy python code with VS code in Azure
I'm a beginner with Azure App Function.
I want my python code to run every day automatically in a specific hour (1AM) and App function with the tool 'timer trigger' could allow it.
I created my app ...
0
votes
2
answers
58
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
...
2
votes
2
answers
180
views
How to check whether a name is a locally accessible function?
How to check whether a name is a locally accessible function and only locally accessible?
For example, with
function out = top_level_function(name)
% ???
function helper2
end
end
function ...
-1
votes
1
answer
73
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
129
views
Why is my code for generating a curve fit of a cosine to a sum of gaussians working so poorly?
I have this code in which I'm trying to use scipy.optimize.curve_fit() to take a cos^2(x) function and approximate it as a sum of gaussian peaks. However, it is generating a very poor fit and I can't ...
-2
votes
1
answer
84
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 ...
0
votes
1
answer
71
views
Impossible to deploy to Function APP with ContainerClient
I want to deploy a easy function to Azure.
When i deploy with this code it's ok :
import azure.functions as func
@app = func.FunctionApp()
@app.function_name(name="echo")
@app.route(route=&...
1
vote
1
answer
166
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 ...
-3
votes
1
answer
85
views
Why does translate replace symbols with symbols codes?
Why does translate replace symbols with word codes
In this example, I get numeric symbol codes in the translation table, not the symbols themselves. Why?
And how can I make a translation table with ...
2
votes
3
answers
130
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
4
answers
205
views
How to work with data passed to a function, but without an explicit name in its parameters in C?
There is a declaration of a function in C language.
int foo(int, int) {
// код функции.
}
How do I access a parameter inside a function, only the parameter type is specified (no name).
A program ...
2
votes
0
answers
192
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&...
1
vote
1
answer
108
views
R How can I generate dynamic ggplot axis tick labels which contain subscripts?
For a ggplot graph, I am trying to include sample sizes in the axis tick labels based on the incoming data. The plot has 4 split violins displaying, for each category, male and female.
I would like to ...
0
votes
0
answers
49
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 ...
1
vote
2
answers
114
views
Replicate rows in data.table using passed column names in user defined function environment
I'm passing a data table to a function I've defined where I want the function to replicate rows that meet a certain condition and the return the updated data table. I'm having trouble constructing it ...
0
votes
2
answers
89
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 ...
0
votes
1
answer
65
views
AutoHotkey syntax is malfunctioning regarding usage of curly brackets { & } within functions
I can't get anything inside of a function to ever work? This is regarding flow control statements IF, FOR, etc, NOT with expression syntax as the object literal operator, that works fine but it won't ...
1
vote
1
answer
106
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
45
views
In sympy, I am getting an unexpected result for the type of the symbolic Function expression
from sympy import Function, Symbol
x = Symbol('x')
r = Function('R')(x)
print(type(r))`
# output: r
When I run this code, I expect the screen output to be : '<class 'sympy.core.function....
1
vote
1
answer
90
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 ...
0
votes
1
answer
102
views
Powershell function returning not just what was after the return call [duplicate]
The below code is annoyingly not just returning the contents of the $t variable, of even if the contents of $t are instead returned like return "!! Quitting...":
function AddADUser
{
....
...
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
0
answers
26
views
ZKTime 5.0 Reporting Issue
I have a time clock system with a report. The system is ZKTime 5.0. The report layout is as follows:
I want to exclude the first three from the report:
To do this, in the file column, I use the ...