Category "function"

Octave - fskipl: invalid stream number

I've got the error message: "Invalid parameter list" from my function, which let Octave open a text file and read it to get input data for my work. function [m

Writing a Factorial function in one line in Python

I am looking to improve my coding by performing the same code in different ways, this not only is to help me become better at coding but also understand differe

How to pass a function through the constructor of a class?

I would like to pass a function through the constructor of a class. but when i call it, nothing happening. debug write: func : {_Closure} import 'package:flutt

Create a function with a class Player with values "username" set to input, "size" to 50, "x" and "y" to 0

Trying to create a function with a class Player with values "username" set to input and the rest set to numbers. Searched a few websites but the answers weren't

using the uniroot function with dplyr pipes

I'm trying to utilize the uniroot function inside a piping scheme. I have root data by depth, and I fit a model for each crop-year set and put the fitted parame

using the uniroot function with dplyr pipes

I'm trying to utilize the uniroot function inside a piping scheme. I have root data by depth, and I fit a model for each crop-year set and put the fitted parame

How to combine countpct and binomCI into the same summary statistic to be used in tableby function?

I'm using the tableby function from the arsenal package to create summary tables. For most of the statistics I need to generate, this package gives me exactly t

Filtering array with Boolean giving unexpected results

I can't understand why the output is 17 its only returning the true values not the false values either that the false value are boolean also function countSheep

How can I use optional chaining with arrays and functions?

I'm trying to use optional chaining with an array instead of an object but not sure how to do that: Here's what I'm trying to do myArray.filter(x => x.testKe

I can`t call the bool function in c++ (closed)

Hey guys please help me on this I have tried calling my bool function in my main func but it wont even show the first cout of program and the compiler terminate

var functionName = function() {} vs function functionName() {}

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consiste

Can I save a function's arguments in Matlab to reuse in another function?

I am using the topoplot function in Matlab as follows: topoplot(DATA, channels, ... 'maplimits', topoYlim, 'electrodes', 'on', 'emarker', {'.','k',[6],1},

Can I save a function's arguments in Matlab to reuse in another function?

I am using the topoplot function in Matlab as follows: topoplot(DATA, channels, ... 'maplimits', topoYlim, 'electrodes', 'on', 'emarker', {'.','k',[6],1},

Python exit() command trigger infinite loop

Greeting all, I encountered infinite loop when running the code below when input option = 3. def enter_number_only(): print() print("===================

Write a program in C to display the n terms of even and odd natural number and their sum using functions

#include <stdio.h> int sum_even(int n); int sum_odd(int m); int main() { int n; scanf("%d", &n); int m; scanf("%d", &m); i

How to implement build in function .eval() with recursive function

Hei Coders, I have a string "1+1", with javascript build in function eval() i can do eval("1+1") so the return value will be 2 But how about if i want to imp

How to plot a 2 dimensional density / heatmap in plotnine?

I am trying to recreate the following graph in plotnine. It's asking me for more details but I don't want to distract from the example. I think it's pretty obvi

ffmpeg - how to handle video and audio URL's streams separately?

I am trying to create a zsh function that uses youtube-dl and ffmpeg to download a portion of a YouTube video. I did achieve this goal with the following functi

How to use a temp sequence within a Postgresql function

I have some lines of SQL which will take a set of IDs from the same GROUP_ID that are not contiguous (ex. if some rows got deleted) and will make them contiguou

How to find out the data which is positive number and having ' . ' in the data?

I want to find the data which is having positive number . How many records have the positive values. find out the ' . ' in the data We are using db2 database h