Return Questions
Ad
Ad
Passive income from cryptocurrency USDT - earn 4% daily
Earn a daily profit of 0.28% of your cryptocurrency. monthly you can get up to 100% of the return of your USDT.
Why is my valid_triangle program from cs50 doesn't work?
I have a problem with this code as i can't seem to find the problem? here is the problem that i tried to solve: - declare and write a function
Lifetime of a structure with no arrays in it
Take this code: #include <stdio.h> struct s { int x; int y; }; struct s foo(int a, int b) { struct s s = { a, b };
how to map over an Object and render the arrays inside the object javascript/reactjs?
Const data = { "13/11/19": [ {patientname: "a", room: "room1", user: "k"}, {patientname: "a", room: "room1", user: "k"}, ],
How do I return an error code in C when the return type of the function doesn't allow me to do that?
I know that the title is not self explicative, but i couldn't express in a few words. anyway, the problem is that i have a c function that returns
passing a struct to a function doesnt work
In the below code i have create a function apart from main to divided the int inside a struct into half. after that, i want to print out
How recursion return the value?
1. #include<stdio.h> int recursion_check(int i); main(){ printf("%d",recursion_check(6)); }
How do I return a struct with dynamic multidimensional arrays in C?
I have the following problem: "if i try to return a struct with a dynamic multidimensional array, i lose the data inside of that array. if i
Unexpected output regarding local variable
I have created a local variable b in the function foo(). this function returns the address of the variable
Query regarding the default return type of a function in c++
A book says: if return type is not mentioned, it defaults to int. just to check this i wrote the
Weird results with type conversion of literals and return values in C
Two questions regarding this simple code: float foo(){ return 128.0; } int main(){ char x = (char) 128; char y = (char)
Ad
What is the best way to return more values with laravel from controller to a view?
I've got some trouble by passing 2 values to a view, i'm using the code below, and tried several things like passing it in a array. my
javascript function return without semicolon
If i want to write (to save 4 spaces indentation, or what ever reason): return somelonglineexpressionreturnvalue;
Define a functions return type so it'll be shown in the tooltip when writing a function call
I want to be able to set a functions return type so that my ide can apply intellisense. e.g. i have a function that takes an object and
How can i return multiple lists from a function, retaining their names?
I have a function that creates multiple lists and i want to return them to the main body of the code with the same names that are used within the
Error when trying to return a string with calls from array
This code is returning an error and the 2nd 'else if' statement:
vanilla JS for-loop issue
Throughout for-loop in rosteringarray(), the array is should be like this. array[0] = startdate (in form of milliseconds)
How do I return true or false for ternary operator in Javascript?
I'm trying to convert the code below to a shorthand version with a ternary operator if (sum % 10 === 0) { return
function: if with interrupting, return
I am not able to get values from my prompt function i need the function to work properly if users input is equal to one of 6
Flipping function return with print
Probably i am gessing not properly but i can't figure out why that happen. a break through the script i am trying to write, os windows 10,
Laravel 6: redirect with variables AND message - not working
i am trying to redirect using a function in my main controller with both variables and a message. the message code is fine and is usually
Function doesn't return properly in recursive function?
I was trying to write a recursive function that returns the collatz sequence of a number, but the code (shown below) doesn't work. how could this
Ad
Why ? Object params of function returns undefined JS
in this query, i've have small doubt i need to know why? we are in #lockdown mean while one
How to put return value into another return value in JS vue
I want the "topic1" to be the value of my breed name and key, but when i try to put this.topic1 to replace the manual typing, it shows nothing.
Return view with variable = null if not set in database
I have a question. how can i return view with variable who is null if there is no record in db. i know return $variable ?? null; but i need this
InitState in flutter, deriving document value from firestore
I am working on an app where i need to filter out every user that signs in. once they signed in, they will be redirected to wrapper that checks if
How can I show a specified value at inputText?(XPages)
I have a form like the following figure. if the first item days has a value, it will show out "division processing". how can i
Return with last id laravel
I have a form, with two submit buttons first button is submit and return to a page, and the second button is to submit and return to the same
I am trying to get the value of the property in my dropdown menu in react
I am trying to console.log the value of the dropdown item that i selected. i have tried e.target.value and
React component giving no-unused-expression error in map
I am very new to react, would appreciate a simple help. the below code is a part of my training application and i am just not able to
javascript multiple returns in one functions
I've been working with firebase cloud functions and i ran into a trouble. i wanna retrieve data from my firebase realtime database like
What return this function in typescript?
When i hover on the keyword 'function' the description says: "(local function)(this: any, next: (err?:
How to use return redirect in laravel controller
Public function getleavetype(request $request){ $leave_types = leavetype::all(); //create leave-type
Ad
How to edit style of output text of return statement in Flutter?
How can i change the font size of the return value? or what other method can i do?
Can we pass state variable as an argument to external util function from react js function defined inside a component?
I need to pass state variable as a parameter to external function. i am trying to do something like this.
I'm having trouble understanding what a variable does right before a for loop
I'm new to python and i'm having trouble understanding what the variable before the 'for' in this return statement does. i've got a slightly
Why my code is not returning the value of hypotenuse?
Basically, i need to calculate a hypotenuse of the right triangle first, my code defines if the triangle is right or not, and then based on
Can't capture values return from Navigator.of(context).pop("value")
I navigate to a new screen with following manner final result = await navigator.of(context, rootnavigator: true).push(
How do I pass out values of a function, who in turn took values themselves?
I am what most people would probably consider a beginner programmer. i am moving along rather nicely on attempting to make my own text based
Conditionally return data
I have this function: getface(/* string */ face_name, /* int */ w, /* int */ h, /* int */ z) { const am =
Return MongoDB query result as variable instead of to console
In a javascript file named db_to_var.js i have the following function that succesfully prints the array returned by a query to
Python not give the proper return value
I'm writing a program that ask for users input and check if it is an integer. if yes than it converts it into an integer and return with the
Clicking a Button if a text field contains "\r" / carriage return
I am absolutely new to android development, i have found one example i am learning from. i want to perform a button click or in this case:
How to send data from google appscript to an html page
I have a google app script that has multiple features. i want to display some of the data on sidebar html page. here is what i
Ad
Why do we return None in this decorator?
I am reading this code snippet in python: def decorator_function(original_function): def wrapper_function(*arg,**kwargs):
How to access returned object by Javascript function?
I know how to access javascript objects in general, but how to do this if that object is the returned value of a javascript function that is
How to indicate the return type of a function variable
I have declared function variable like this; final function localvideo; is there a way to indicate that this
Filename containing carriage return on Windows is not recognised by Python
I would like to select a file, but the filename contains a carriage return and so .isfile() constantly returns
Unable to return all the results at once
I've written a script in python to fetch some links from a webpage. there are two functions within my script. the first function collect links to
Why do immediately invoked function and non-immediately invoked function behave differently when running return statement?
I've encountered an instance of a difference between immediate invocation and non-immediate invocation of a function: var x =
If Java passes by reference. Why can't i modify returned objects like this
Why is the compiler freaking out? i should be able to modify the returned object if java returned an object reference right? class
is it a good idea to use // ignore: missing_return in an future fuction where we are using conditioning to return answer?
As the question state, is it a good idea to use // ignore: missing_return above the future function where we are using conditions to
Return Not Working Inside For Loop Flutter/Dart
I'm making a registry page in an app i'm building. my issue is the logic that checks the database to see if an existing user already has the
How to Show Snackbar with the Result of Future Http Post?
I'm trying to get a "file was uploaded." string back from a successful future http post request so that i can create a
Why should I use `return` when the script is functional without that?
I've created a script using python to parse the movie names and its years spread across multiple pages from a torrent site and write them to a csv
Ad
Flutter/Dart Scope Problem - Return info needed to prevent Duplicate File Upload?
I've got a button which uploads a file to a server and returns the oldname of the file. before uploading, i'd like to check if the
Javascript function using lodash forEach returning undefined
I'm writing a reactjs app and i have a for loop in a function filterselected which goes through an array of region names
NodeJS - Wait for return inside setTimeout
I am trying to learn async/await. i want to wait for the return statement inside my async function. i have to call it several times so i used a
How to receive optional tuple return values
I have a function that looks like this: fn some_func() -> option<(string, i32)> when i tried to do
Flutter Returning Data from Widget
Before anything i first apology for my english. so in order to write pretty code, i've parsed my code in multiple file. to just call widget
How could I tweak this code so it will only return null, undefined or empty values
Completely new to nodejs so please bear with me. i need some help regarding a functionality i am trying to create, basically i am trying
Passing a HTTP body from one function to another nodeJS
I am using nodejs request package and i want to return a json from one function to another. currently my solution is: var request
Return in python, reading values from .txt file
Level: beginner hey, i'm trying to resolve an exercise in python. the code is comparing username given in function argument
JS lambda default return value
I am a bit confused with the default return value of lambdas in node.js. i found this link
Ace editor pressing enter key does not add a newline
No newline is inserted when pressing the enter key in the editor field of an ace editor instance. nothing happens. example initiation:
Return an array without getting a Dangling pointer as result in C++
I want to return an array from a function in c++. i made this simple code to try to achieve it. #include <iostream> #include
Ad
return value shows variable might not have been initialise while using if else
I am using recycler view and creating a popular list of video ..and i have 2 viewholder 1 for photo another for
Why width style value not show in input?
I'm trying to take the width from the "demo" div and put it in the "input number" value. i can not figure out where i made a mistake...
Don't understand working of anymodel.findOne.then().catch()
I tried this code to login in my api user.post("/login", (req, res) => { let email = req.body.email; let password =
Get undefined when returning a value from an array - Node JS
I'm new to nodejs and i get some difficulties with its asynchronous nature. i'm requesting some data using a async function. my second
How to return data from inside promise.all
Findcustomerorders(customerid) { return apiservice.getcustomerorders(this, customerid) .then((data) => {
how to find the sum of digits of sum of digits of each of T numbers repeatedly in python till it gets to being a single digit number?
Here is the code that i wrote to get sum of digits from a number repeated number of times till the sum gets below 10: t =
What's the performance difference between "skip if condition" and "directly return"?
Is there any performance difference between the following 2 functions: function a() { var a = false; if(a == true) {
React Native returning multiple JSX components in loop using another function
I would like to return multiple jsx components (foodcards) using a loop. i used another function to return the component inside the
returning an object from an inner method
I am trying to build a separate class for firebase methods, one of these methods is to return an object user public user
Node.js how to return an array from within a asynchronous callback for use in another file
File called testing.js i can do whatever i like with the data in saveweatherdata but cannot call this function and return the data without
Does assigning multiple return values by index impact performance in Python?
Lately i wrote some python 3 code along the lines of def foo(): return x, y def bar(): data = {"some": "values"}
Ad
JS did'nt work in "return array('html' => $response);"
I have a php file that outputs products based on a wp_query. everything works so far! but now i want to output
How do you return a boolean by comparing three variables on the same line?
I've seen people doing an if and else statement on only 1 line using return var1 != null ? var2 : 0;. this seems
If else return issue in the loop in python
Function should count how much expression as y is in request and if there is no y in request function should return "there is no y in request". i
How to return to beginning of program from inside of if statement?
I'm practicing some basic coding, i'm running a simple math program running in the terminal on visual studio code. how do i create an
Coffee Machine - invalid syntax and End of Statement expected in new function
So i'm trying to create a coffee machine program (you choose a drink, the machine checks the ingredients, the resources and the money you insert,
return statement dose not work with setTimeout()
Why the retrun statement will not return x: function getdata(cb) { settimeout(cb, 1000); }
Laravel 5.7: How To Send Contact Form With Multiple Boxes
So i have this website i am developing, just a single bootstrap page with multiple auto-scrolling section. the page has a newsletter section where
Returning value from inside of a while loop
Is there a possibility to return value from inside of a while loop? i need to return name value. here's my code: public static
Execute a C program from within another C program as if it was a function call (in Windows)?
Is it possible call a separate c program (.exe file) within a c program, like if it was a function? i would like to be able to pass
Splitting a string that contains some digits into multiple arrays of digits
I'm asking users to enter a string of that contains both digits, underscore and comma in main function. i'm creating a
Ad
Can I read in a character without the return key 'n'? (C)
Im trying to verify if the user enters the right value with the return values. he should enter an even number between 0 and 100. i think i
Why can an int return type function return a string?
This is the function i'm talking about: static int getinput() { printf("enter your name: "); return fgets(input,
Data of struct created at return statement of a function is available in caller function
I wrote the following program in c. #include <stdio.h> #include <stdlib.h> typedef struct { int num1; int
best practice regarding char pointers returned by functions
What is best practice when dealing with functions which return malloc'd pointers to c-strings? here's an example: file *f;
Is there a benefit/downside to return in an else statement?
Version 1: int abc(...) { if(a || b || c)) return 1; else return 0; } version 2:
Returning an array of strings and assigning it to a variable in C
So the problem i am facing is the following: on one component, i read file names and store them in an array. there can be a maximum of
cannot convert 'float*' to 'float'
#include<math.h> #include<stdio.h> #include<stdlib.h> float array(float a[],int n);
How to determine the return type of a function in template
I am trying to write a class similar to std::function, just to learn how it works but i am having problem determining the return type of the
Cannot create UDFs returning "Table" in Snowflake - compilation error
Use agdwhdev.edw_weather; -- my database and schema create or replace function edw_weather.find_nearest_radar() returns table (latitude
which is better way to returning structure from function?
There are various ways to return structure from function like return whole structure or return the pointer only. returning pointer is useful to
C programming, manipulating functions' arguments and return
All should not the output be -24 ? i'm getting -4 as a result and can not get the reason . #include <stdio.h>
Ad
What is the difference between using/not using return in a subprogram?
The second piece of code is not giving the correct value as it only passes the value of r from what i see. however, i would like to
Return value with logic operators
Can anyone explain to me how this return works when there are logic operators? also explain when this function is going to return itself and the
Ad
Blog Categories
Ad