A definition is an unambiguous statement for the meaning of a word or phrase. In programming, a variable definition provides all the details for that variable.
Questions tagged [defined]
304 questions
-1
votes
2 answers
Python: NameError: name 'u' is not defined
i am completing a simple class asignment with functions. We have to find for which month m the functioncontract_v will be more advantageous than the contract_u.
This is the code I wrote:
def contract_u(m):
u=1000
for i in range (m):
u=u+80
…

user14479524
- 1
- 4
-1
votes
1 answer
prevent specific page from direct Access
I have a page that I don't want users to access directly for security reasons.
For example I have a page profile.php; I want when a user presses the button the profile page will open and if he wants to access page directly from url it will…

husnain
- 1
-1
votes
1 answer
Ignore form variables that have definition from prior submission
I created a form and when I submit the form, my php writes the form data to a database. Done.
But now I am seeing that the form is still written to the database when some fields are left blank, the code just writes variables left over from the last…

David
- 65
- 2
- 8
-1
votes
2 answers
Java - parse user defined functions
I am working on a program, where I want users to define a simple functions like
randomInt(0,10)
or
randomString(10)
instead of static arguments. What is the best way to parse and process such functions ?
I have not found any examples of…

Dakado
- 11
- 2
- 6
-1
votes
1 answer
A function javascript not defined?
I declare my function in javascript, but when I execute the code it appears “function javascript not defined”, does anyone know how to solve it?
-1
votes
1 answer
Variable not defined error, even though it is?
I'm making a discord.py bot, and I'm trying to implement a command that will tell you how much time there is until the period ends. The code works by itself, but if I try to implement it into the bot I get this error:
NameError: name 'timee' is not…

Sophie Snoww
- 33
- 1
- 6
-1
votes
2 answers
Range is not defined error
Here is the script in Google Sheets I am trying to run...
Can you please give some advice on this error?
function myFunction() {
//IF target range D23 is edited...
//
if (range.getRow()!=23 || range.getColumn()!=4) return;
//Set B23 to current…

Sam Morehouse
- 9
- 1
-1
votes
1 answer
Python XML NameError: global name 'qn' is not defined
I'm working on a script with python-docx which create a table(rows=1, cols=1). The text inside the cell need to be vertically and horizontally aligned, with a gray background.
I used WD_TABLE_ALIGNMENT to horizontally align the text and xml to color…

W. Delahaye
- 9
- 4
-1
votes
1 answer
Check if a class in javascript exists
Working on MDN classes concept, I'd like to check if a class exits (not object nor function) in order to load it dynamically and redefine it if it is.
I tried many way (typeOf, instanceof...) unsuccessfully ...
Class APP{
[...]
…

Glaubule
- 169
- 1
- 7
-1
votes
1 answer
defined(XXXX) macro in C/C++?
I'm going through the BSON source code, and came across something I've never seen before.
Line 22 in bson-macros.h:
#if !defined(BSON_INSIDE) && !defined(BSON_COMPILATION)
#error "Only can be included directly."
#endif
What is the…

aaronsnoswell
- 6,051
- 5
- 47
- 69
-1
votes
1 answer
Python error message file name is not defined?
i just made the program
j = input("choose a file to read")
l = open(j,"r")
e =l.read()
print e
ran it, and typed in README.txt, which is a real text file located in the same folder as the program, but every time when I type README.txt, i get an…

AsmaKilBniSkr
- 1
- 1
- 1
-1
votes
1 answer
Java - Converting Defined Intergers to Name Value
Not sure how to phrase that but I have this:
In a
public class DefinedValues{
public static final int CommandGroupLength = 0x00000001;
}
I want a way of getting the String "CommandGroupLength" from value 0x00000001;
Is that possible?

user2568374
- 1,164
- 4
- 11
- 21
-1
votes
1 answer
Why does php reports "failed to open stream" with Directory Separator Defined?
I have a web directory at C:\xampp\htdocs\Dove\Subsediaries\drugs. I have defined directory separator. Please what else could be missing because the script isn't running. Gratitude!
defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR); …

Nditah
- 1,429
- 19
- 23
-1
votes
2 answers
Undefined variable, which is actually defined
I have my $dbConnection variable set at the very top of the page. And I have a contact form included on the same page. The contact form works fine.
However, when submitting, it gives me an undefined error; that's weird because I'm 199% sure I have…

J. Doe
- 503
- 1
- 6
- 19
-1
votes
1 answer
Is it use defined outside of the array range in perl
I am tring to find out the neighbours of an element in a 2Dmatrix,by checking horizontal and vertical neighbours.
Since I am fairly novice in Perl I thought this would work:
foreach $value2 ( 0 .. $#AoA ) {
foreach $value ( 0 .. $#{ $AoA[value]…

BURNS
- 711
- 1
- 9
- 20