Quantcast
Channel: Active questions tagged return-value - Stack Overflow
Browsing all 203 articles
Browse latest View live
↧

TwitchLib in C# crashes after return values

I wrote my program with many global variables and only with public void methods.So I want to change my methods to private static methods with return values. That's what I've done.Now my program will...

View Article


"Return of a Function() in PHP" skip syntex error in filter_var()

private function getURL(){ $url = isset($_GET['url']) && $_GET['url'] != "" ? $_GET['url'] : "home"; return explode("/", filter_var(trim($url,"/")),FILTER_SANITIZE_URL);}The above code execute...

View Article


How can i get inserted record id from dynamic table namename and output that id

ALTER PROC Experience @Subject1 INT ,@Subject2 INT ,@TableNumber INT ,@IDR INT OUTPUT AS BEGIN DECLARE @CMDS VARCHAR(MAX); DECLARE @Subj1 VARCHAR(10); SET @Subj1=CONVERT(varchar(10),@Subject1); DECLARE...

View Article

How to assign a plot to a variable and use the variable as the return value...

I am creating two Python scripts to produce some plots for a technical report. In the first script I am defining functions that produce plots from raw data on my hard-disk. Each function produces one...

View Article

How to return newly inserted item(row) id using android room (Kotlin) on...

I need to get the Auto generated ID of a record added to a ROOM database table.Looking to answer my problem I found the following answer:textBut in my case is not a solution because in Compose I can't...

View Article


Using annotation to ensure that value returned by method is not discarded

String in Java is immutable. The following snippet is, broadly speaking, "wrong".String s = "hello world!";s.toUpperCase(); // "wrong"!!System.out.println(s); // still "hello world!"!!!Despite this...

View Article

Check if PHP function returns null or nothing

I have this code $return = $ep->$method($params); if ($return === null) { throw new Exception('Endpoint has no return value'); } return $return;Is there any way to distinguish between a method that...

View Article

Return value from a stored proc on error

I have an sp in SQL Server that when errors returns -4What does -4 mean? Is there a table somewhere explaining what the possible return values are?There must be some standardFor exampledeclare @RetVal...

View Article


Return address of local variable in C

Say I have the following two functions:1int * foo(){ int b=8; int * temp=&b; return temp;}2int * foo(){ int b=8; return &b;}I don't get any warning for the first one (e.g. function returns...

View Article


return empty List in catch block

I have a c# function that reads file locations from a Datatable, and returns a List with all the file lcoations to the calling method.In the Catch block, I want to return an empty list with a false so...

View Article

crontab command return codes

When I run crontab -r, I get a return code equal to 1. It's actually working, it's deleting the crontab as it should. So I wonder if there is a summary of the return codes of crontab. I couldn't find...

View Article

How can I return 2 int values from a function

I need to return 2 values from 2 diffent functions. One of the values come from scanf(closedinterval()) and the other is made inside the function(rootinquad()). Is there a simple way to return these...

View Article

Calculation of return levels using R

I am trying to calculate return levels for maximum daily precipitation using a set of stations. Data are stored in three columns - station, year, precip. The aim is to calculate return levels (i.e. the...

View Article


How can I get the return value of a function passed to multiprocessing.Process?

In the example code below, I'd like to get the return value of the function worker. How can I go about doing this? Where is this value stored?Example Code:import multiprocessingdef...

View Article

Tell the Rust compiler that a returned value doesn't hold the reference...

I have some structs containing some data that look like this:struct A { // Some data}struct B<'s> { a: &'s mut A c: C<'s>}impl<'s> B<'s> { fn new(a: &'s mut A, d:...

View Article


f.readlines() won't return any values

So I was reading over the Python Documentation/Tutorial, specifically I was looking at the Input/Output with files. This is what the tutorial says will return whatevers in the file:>>>...

View Article

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 and make easy to read code.But one of my widget is a FormField...

View Article


is it good practice to create a variable in a return in javascript?

in Javascript, in the return statement of a function, I cannot explicitly declare a variable like that return let text = "hello world!", so far so goodBut also, when I declare a variable I can do it...

View Article

Best way to return status flag and message from a method in Java

I have a deceptively simple scenario, and I want a simple solution, but it's not obvious which is "most correct" or "most Java".Let's say I have a small authenticate(Client client) method in some...

View Article

Python Tkinter Entry return value

I'm trying to create an application and I'm stuck on a probably trivial, but for me permanent problem. I want Entry to return the user's input, but only after the user enters the answer and presses...

View Article
Browsing all 203 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>