72 questions
-1
votes
1
answer
33
views
codeigniter image not moving to folder: Undefined variable $file_name
VIEW:
<form method='post' action="<?php echo base_url('Reg_form/save')?>" enctype="multipart/form-data" name="reg_form">
<div class="form-row"&...
-1
votes
1
answer
68
views
Ansible play fails while printing variable with error - task includes an option with an undefined variable
I have a shell task in Ansible that plays between an if-else condition. Under the if condition it prints echo on 2 lines while in the else condition it prints a single line.
I need a generic debug ...
-5
votes
1
answer
485
views
undefined variable laravel 11 (can't run two methods)
My previous search method was running well after I implemented the method for calculations
**i got error undefined variable $formulas
C:\xampp\htdocs\MedusaDashboard\resources\views\superadmin\search....
1
vote
2
answers
196
views
Variable variable is not accessible within callback scope while using arrow function syntax (Warning: Undefined variable)
I need to use a variable variable for defining a lambda function inside of the callback of array_map(). I get an "Undefined variable" WARNING for the variable that I am referencing. ...
0
votes
1
answer
78
views
JavasScript fetch/get Request / 2 times / 3 times click button [duplicate]
I am relative new to JavaScript.I have a "strange" problem: I have two input fields which when I click the sndBtn (clickEventListener), then 3 functions are called, all with a fetch/get ...
0
votes
0
answers
40
views
How do I detect if the program already defined the system variable? [duplicate]
I need to use a system variable VarX within system function DetailLine_Refresh().
When the program executes, function DetailLine_Refresh() will be executed a few times (this is the program design and ...
-1
votes
1
answer
4k
views
ansible play fails with error - The task includes an option with an undefined variable
The below ansible code fails with the error: The task includes an option with an undefined variable. The error was: 'storage_size_gb' is undefined
- debug:
msg: "{{ mongo_output_withoutvar....
-1
votes
1
answer
51
views
Variable undefined error when it is clearly defined?
def standardCalBurn(weight, height, age):
calories_needed = 655 + (4.3 * weight) + (4.7 * height) - (4.7 * age)
print(f"{calories_needed:.1f} calories are needed per day to sustain weight ...
0
votes
0
answers
194
views
Undefined Variable in SASS 'util.$font'
Just learning the ins and outs about SASS and I've run into a problem with variables. I have created a utility folder with my fonts file. In the fonts file, I created a variable called $font. When I ...
0
votes
0
answers
78
views
Error Exception Codeigniter4 Invalid argument
When I try to display the crud, it gives me an error in the foreach. I don't understand the error because I haven't been studying php for long.
I code on Codeigniter4 and here is my code:
<?...
4
votes
1
answer
2k
views
Visual Studio Code is not showing an error for undefined variables PHP
I noticed that Visual Studio Code is not showing an error about undefined variables.
For example:
<?php
if ($test > 2) {
echo 'hi';
}
?>
If I run the code above, I would ...
1
vote
1
answer
601
views
How to fix error "undefined variable:sin" in plotting in gnuplot?
I am plotting in 2D on gnuplot through Ubuntu. When defining my equation for 'radius of curvature' a function of theta=x of variables sin and cos functions, respectively, I get an error message saying ...
1
vote
0
answers
690
views
How can I solve the variable is not defined error in jupyter notebook
Error in this statement that auth is not defined after i already defined it.
You can check the code.
import tweepy
consumer_key = 'xxx'
consumer_secret = 'xxx'
callback_url = 'ooo'
auth = tweepy....
0
votes
1
answer
142
views
Keep Getting Unexpected Return Value
I have to write a code that first asks for year, then age, and calculates when they were born.
import java.util.*; // Library for
console input
public class birthYear {
public static void ...
3
votes
4
answers
3k
views
Undefined variable in laravel blade file
I am new to laravel kindly help me out to solve this error.
This is my controller function "edit"
public function edit($id)
{
$user = User::find($id);
return view('users.edit-profile'...
0
votes
1
answer
98
views
Undefined variable error in optimization program using Julia, JuMP, DataFrames
Trying to update this optimization program that worked fine with julia 1.6.2, but now
returns the following error using julia 1.7.2.
The error occurs in line 24.
@constraint(m, sum(pitchers_lineup[...
0
votes
2
answers
4k
views
Getting undefined value of .env in nodejs
I am getting "undefned value of .env in nodejs. my .env file is on root directory.need help
my code for .env file:-
SECRET_KEY=mynameissuky
my app.js file:-
require('dotenv').config();
console....
0
votes
1
answer
324
views
Undefined variable in wp_add_inline_style()
I updated the website to PHP8 and getting the Warning "Undefined variable $customVariables" on the last line with wp_add_inline_style( 'theme-style', $customVariables );
The code is below:
...
1
vote
2
answers
320
views
Why is my code showing this error: Undefined Variable
I am trying to migrate my foreign key and display the list of employees in company form. for that:
1.My CompaniesController
public function index(){
$cat = Company::all();
return view(view:...
0
votes
1
answer
963
views
Ansible - Problem with using Hostvars to use variables across different hosts. Error: Undefined Variable
The problem I'm having is fairly simple. I have a Windows Server host I'm connecting to, to make a new AD User based off some data. It's static for now, but will be dynamic in the future. It takes ...
-1
votes
1
answer
334
views
Dog Age Calculator Python Undefined Name Error
I am trying to create a program that when a dogs age is inputted it will figure out the age in human years. If a negative number is inputted it should print that a negative number is not valid. Also ...
1
vote
1
answer
478
views
How can I resolve Undefined name 'currency' in Flutter for-in loop?
Background
While following London App Brewery's Bitcoin Ticker project, and I got stuck trying to create DropdownMenuItems via a for-in loop. The warning that the Dart Analysis gave me was Undefined ...
0
votes
1
answer
620
views
Laravel 6 Undefined variable: jobs
I think there is no error but Laravel shows the following error:
Undefined variable: jobs
public function jobCreate(Request $request){
$data['jobs'] = DB::table('jobs')->get();
$...
0
votes
2
answers
109
views
Undefined variable: user (View: E:\PROJECTS\Ecommerce app\electrostore\resources\views\admin\components\topBar.blade.php)
How to handle undefined variable when I have to include or extend that blade file in other files
1
vote
4
answers
210
views
Trying to use the return value from one function in another but getting undefined variable instead
I have this code:
class Pet(object):
def __init__(self,name=""):
self.name = name
self.kind = "Unknown"
self.toys = []
def add_toys(self,toys):
...
0
votes
1
answer
153
views
variable undefined after nested for loop
I'm trying to create a script that allows a user to choose backup destinations from the mounted volumes.
While I had a first draft working it had repetition which I've tried to remove by rebuilding in ...
1
vote
1
answer
1k
views
Python / Spyder - Undefined variable error, when variable is defined and shown in the environment. Code works even with the error
I am getting a strange error when defining variables in Python 4.1.5 (IDE:Spyder). However, even with the error, the code runs without any issues!
As you can see, the variable social_cost_of_carbon is ...
0
votes
1
answer
655
views
Undefined variable: artikel (View: C:\xampp\htdocs\uts\resources\views\layouts\home.blade.php)
Undefined variable: artikel (0)
(View: C:\xampp\htdocs\uts\resources\views\layouts\home.blade.php)
@if($artikel)
@foreach($artikel as $d)
<h3> {{ $d->judul }}</h3>
<h3> {{ $d->...
0
votes
0
answers
16
views
How to solve Notice: Undefined variable error in php [duplicate]
I am currently creating a class named pizza in php with two attributes: name and price.
<?php
class Pizza{
private $name;
private $price;
public function ...
0
votes
2
answers
164
views
Laravel - Undefined variable: vendedor (View: C:\wamp64\www\oficina2.0\oficina2.0\oficina\resources\views\index.blade.php)
I'm using Laravel and I get this error Undefined variable in my view, I send 3 variables to the view and say this one is not deaclared
this is my view
@extends('templates.template')
@section('content'...
2
votes
1
answer
1k
views
Check if arguments passed into a function are defined or not in r?
I want to know how the existence of a variable passed into a function can be checked before applying more operations on them inside the function. So that if a variable is not found, it could be ...
1
vote
0
answers
216
views
Defining One Dict Value Based on Another Dict Value (Undefined Value)
My program is a pipeline that processes files. I have a dict (P) which stores directory Path's. All of these directory Path's are are relative to a common ROOT Path from which they are generated. The ...
2
votes
1
answer
801
views
Laravel 7: Undefined variable in foreach loop
I want to display to select the campus from the campuses table in my budget allocation create.blade.php template but it displays an error.
create.blade.php
<div class="form-group row">
...
2
votes
1
answer
5k
views
ReferenceError: hash is not defined in node.js
i am making a login system and using bcrypt to hash passwords. But now when i try to login i got this error that says that ReferenceError: hash is not defined.I will be thankful if anyone can help me ...
0
votes
1
answer
240
views
Undefined variable:users.....Variable conflict when using a resource controller index and store method in laravel
I'm unable to redirect my controller to the same view index.blade.php after store method, it gives an error Undefined Variable :users, while I redirect through index method, it works fine. How do i ...
-2
votes
1
answer
2k
views
Notice: Undefined index $_POST method
I have a php simple project.
The project is to create an email submission page.
I use phpstorm software.
<?php
//get user input
$name = $_POST["name"];
$email = $...
0
votes
1
answer
705
views
Message: Undefined variable: beauty_detail in CODEIGNITER [duplicate]
I have a form where user can select either book or beauty radio button. Code is working fine on book but showing an error on beauty. Code is the same except data fetch from database is different. I ...
1
vote
2
answers
871
views
Is there a clean way to use undefined variables as optional parameters in PHP?
Is there any nice way to use (potentially) undefined Variables (like from external input) as optional Function parameters?
<?php
$a = 1;
function foo($a, $b=2){
//do stuff
echo $a, $b;
}
...
1
vote
1
answer
1k
views
Undefined variable on Laravel
I´m a beginner starting with Laravel. I´m trying to show a question made on this website.
Here is the Controller page:
public function show($id)
{
//Use the model to get 1 record from the ...
4
votes
2
answers
1k
views
How to differentiate between false and defined values in Template Toolkit for perl
This is a question about Template Toolkit for perl.
I render my templates with a little command-line utility that has the following option enabled
DEBUG => Template::Constants::DEBUG_UNDEF,
...
1
vote
1
answer
3k
views
Checking If variable is undefined in Google Tag Manager
I have this piece of code as a javascript custom variable in the Google Tag Manager. I would like to get breadcrumbs content.
This part of the code works well. But some pages do not have breadcrumbs,...
1
vote
1
answer
5k
views
matplotlib.cm.coolwarm (used in Colaboratory TensorFlow tutorial from Google) is an undefined variable in Eclipse
I was trying to take code I found on a Google Colaboratory tensorflow tutorial (in a Jupyter workbook) and implement it in an Eclipse enviroment on my own computer:
(https://colab.research.google.com/...
0
votes
0
answers
574
views
Undefined variable error for calling a object constructor
I have a class ReadBugXML in a folder called code and I added a __init__.py to make the code as a package. main.py and code are in the root folder. My main file looks like this.
import sys
from code ...
1
vote
0
answers
27
views
I have a problem on my code it said Undefined variable: row in C:\xampp\htdocs\test\transaksi_toko\read_stock.php on line 85 [duplicate]
As it said on the title I'm pretty sure I've been defined it, btw I am new to PHP so anybody could help me, and also I'm sorry that some variable is in bahasa but it's not the issue so...
I try ...
1
vote
3
answers
593
views
It seems only lisp allow use a variable without define it first?
I found it seems only in lisp can define this:
(lambda (x)(+ x y 1))
in other languages,even it's functional language,a variable must define first,then to use it
so in lisp,there is concept "free ...
0
votes
1
answer
55
views
Undefined variable in blade view (single valued data)
I'm trying to pass variable $cMonth to my view. I tried looping it using foreach even if its a single valued data and error still says undefined variable .. I tried dd($cMonth) and the correct output ...
0
votes
0
answers
49
views
Undefined variable: design_json_data (View: D:\xampp\htdocs\shopist\resources\views\pages\frontend\frontend-pages\frontend-designer.blade.php)
I get this error:
Undefined variable: design_json_data (View: D:\xampp\htdocs\shopist\resources\views\pages\frontend\frontend-pages\frontend-designer.blade.php)
There is a designer where I add ...
2
votes
1
answer
5k
views
Laravel - Undefined variable: request
My http://localhost:8888/VGL/public/category/18?sty=3
When dd($request->sty); equal 3
however I put $request->sty in the whereHas is
Undefined variable: request
public function show(Request $...
0
votes
2
answers
102
views
Undefined view in blade for Laravel
I am facing an issue with an undefined variable in a blade view for my Laravel project.
I believe I have defined everything correctly
This is the line in the blade view which is causing my issue.
&...
0
votes
1
answer
722
views
Undefined Variable in Laravel PHP [duplicate]
I'm new to Laravel and I'm very struggling with it. Please help me. I want to retrieve data from database to display on web page. But It alert message:
ErrorException (E_ERROR)
Undefined variable
...