Category "function"

Still can't use a function defined in a separate .cpp file

I've been searching through questions on this for hours, and it just isn't working for some reason, so sorry if there's already an answer and I just didn't unde

Delayed function calls

Is there a nice simple method of delaying a function call whilst letting the thread continue executing? e.g. public void foo() { // Do stuff! // Dela

How can I update values in MySQL database table to conform to a different pattern?

I intend to clean some data in a MySQL database table for some data that was not properly captured. The table in question contains numerous columns but the colu

I'm trying to make a function that takes a 2d array as a parameter and outputs a normal array containing every unique number, in java

The function needs to have a 2d array as a parameter and then return a normal array with all the unique numbers. If the 2d array is [ [1,1], [4,2] ] then it sh

C code collecting info through a function and passing it back, of datatype struct

//Program is to collect input from user so that can pass the array of inputs from the user to another print function but that are quite some Errors in the code

Call function at end of for loop is not working as intended

The following code is not working as intended when I call the next() function at end of for loop. For some reason only one item from the list is printed and it

Compute a function whose arguments stored in rows of a data frame in R

I have a very long function whose arguments take in different threshold values for different variables and give an event study result at the end. I want to comp

How to use recursion to sum up a list of numbers up until a certain index

I have to write a code that makes use of recursion to sum numbers in a list up until the index is equal to a pre-determined integer value. i.e. list = [1,4,8,

Stream Analytics: Best parameters to choose for the autopause of a day wise TUMBLINGWINDOW stream job and best trigger time to set for that function

Context I have a daywise TUMBLINGWINDOW (similar to the one shown below) SELECT DATEADD(day, -1, System.Timestamp()) AS WindowStart System.Timestamp() A

How to define and call functions in c++?

I am new to c++ and I am wodering how to properly define functions? Right now I am receiving the following errors: Severity Code Description Project File

pass an address to a function in vba function

see the basic function structure function test (first as range) whatever I do inside end function calling the function and first is the address of the first c

Python multiplication table school exercise

I have a school exercise, but im struggling to understand how to do the multiplication table. Could someone please help me? So depending on the number and colu

Can someone explain to me what is the details of line 5 return numberList[index] + sum(numberList, index - 1);

Can someone explain the syntax process? How line 5 will be implemented and what is the sequence for these three elements and what is the value each time in the

How can I repair this error that occurs occasionally when my code is running?

Sometimes the code runs till the end without any errors while other times it stops in the middle and gives me this error Thread 1: EXC_BAD_ACCESS (code=EXC_I386

i can't seem to understand a C code to sort a linked list of data

i have been given a code to sort a linked list that contains links (we call them maillons in french, sorry i don't really know how it's called in english) of Op

How show mysql query without NULL?

How show mysql query without NULL? I want to show my quary where "LAG(title) OVER(PARTITION BY emp_no)" IS NOT NULL, I need only titles.emp_no = "LAG(title) OV

PHP PDO Sort Function error codes: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256'

i am trying the sort operation in function but i am getting the error given below. I'm leaving the function codes below error: Xdebug has detected a possible in

How to change the final array to the front in JavaScript?

The case is: function trocaPrimeiroEUltimo(array) { array.array[0] array.array[array.length - 1] return array } I did this way, but it didn't work.

Why doesn't typescript warn about the return type in this function?

For example, I have an onClick handler on a <div> tag. The handler should expect a return type of React.MouseEventHandler<HTMLDivElement> | undefine

How to use variable declared inside function outside of it?

How do I use a variable that I declared inside a function outside one. Do I have to declare a function first and then use it? Using global doesn't work, so what