Category "variables"

best way to store error messages in Laravel (session or variable)

I'm trying to find out what is the best way to store error messages (due to wrong parameters for e.g). Assuming I'm declaring the accepted parameters in the Co

I cannot figure out Uncompilable source code - variable might not have been initialized

I'm new to learning Java and am writing a BMI Calculator program. I've fixed so many errors in my program but just cannot figure this one out! Hopefully, you ca

"Notice: Undefined variable", "Notice: Undefined index", "Warning: Undefined array key", and "Notice: Undefined offset" using PHP

I'm running a PHP script and continue to receive errors like: Notice: Undefined variable: my_variable_name in C:\wamp\www\mypath\index.php on line 10 Notice: U

How to process pathnames with ! within an for /F loop?

In a complex batch file I want to read in files with paths, among other things, to read them into a variable one after the other separated by spaces. This works

Power Automate Desktop - Pass User Input as Variable into SQL Query

What is the correct way to take user input in Power Automate Desktop and pass that input as a parameter/variable in an SQL query. For example, if user enters a

Elegant way to check if a nested key exists in a dict?

Is there are more readable way to check if a key buried in a dict exists without checking each level independently? Lets say I need to get this value in a obje

How to declare a var in bash without it replacing a var in a different file

I have 2 files file1 and file2. Inside file1 I declare a var, x=1. In file2 I make a var x=2. If I run file one then file two, and then in the shell echo x, I g

Postman - dynamic variable for a value from array

How could I add an automatic environmental variable in Postman based on a value which is appearing in the endpoint response in the array? In the example below,

Increment variable value by 1 (shell programming)

I can't seem to be able to increase the variable value by 1. I have looked at tutorialspoint's Unix / Linux Shell Programming tutorial but it only shows how to

Declare variable set = select

How do I declare a variable for used in a PostgreSQL 9.3 query? CREATE or replace FUNCTION public.test() returns int4 AS $BODY$ DECLARE cod_process bi

Assignment of subroutine references in Perl script

I'm learning Perl from Intermediate Perl by Randal Schwartz. Can somebody explain the assignment of the variables $callback and $getter in the following code?

How to use like in MySQL query in Grafana?

I am working in grafana with MySQL. I have a template variable and it has multiple values and I want to use that template variable with MySQL query using 'like'

How do I 'declare' an empty bytes variable?

How do I initialize ('declare') an empty bytes variable in Python 3? I am trying to receive chunks of bytes, and later change that to a utf-8 string. However, I

SQL Declaring Variables in a View

I have created a view which uses dynamic variables in the where statement below. DECLARE @wkFileYear SMALLINT = (select fs.FileYear from dbo.FileSemesters fs

How to put php code inside opening and closing shortcodes

I am working on a site and I am using a shortcode in my template files that has an opening and close. I would like to know if its possible to place wordpress th

Are Python variables pointers? Or else, what are they?

Variables in Python are just pointers, as far as I know. Based on this rule, I can assume that the result for this code snippet: i = 5 j = i j = 3 print(i) wou

const vs constexpr on variables

Is there a difference between the following definitions? const double PI = 3.141592653589793; constexpr double PI = 3.141592653589793; If not, which styl

how does fscanf works with different variable types?

I was looking at the MSDN documentation for fscanf. I tried changing the sample code in the documentation, but it didn't work as I expected. If, for example, I

Bash variable substitution and strings

Let's say I have two variables: a="AAA" b="BBB" I read a string from a file. This string is the following: str='$a $b' How to create a new string from the

Passing Variable through JavaScript from one html page to another page

I have two pages - "page 1" and "page 2". On page 1 there's an text-box with a value of e.g. 100 and a button at the end. By pressing the button I want javascr