Questions tagged [operands]

Operands are values acted upon by an operator, method, or other functional entity.

Operands differ from parameters in that they are the real values used or altered by a function, while the parameters are the named, abstract inputs used to define the function.

313 questions
2
votes
1 answer

PHP Variables not Calculating Correctly

SOURCE: http://pastebin.com/mBJMGean Variables are still not calculating correctly, They always reset every time even with using $_SESSION variables. This is trying to become a slideshow with 2 buttons that control 'next' and 'prev' The variable…
2
votes
3 answers

BASH ERROR: syntax error: operand expected (error token is ")

I am new to bash scripting, and I'm having an issue with one of my scripts. I'm trying to compose a list of Drivers Under 25 after reading their birthdates in from a folder filled with XML files and calculating their ages. Once I have determined…
kbdev
  • 1,225
  • 1
  • 13
  • 33
2
votes
1 answer

operator operand type mismatch

I have this code snippet fun decrement_to_zero r = if !r < 0 then r := 0 else while !r >= 0 do r := !r - 1 from this tutorial https://learnxinyminutes.com/docs/standard-ml/ But I get this…
lo tolmencre
  • 3,804
  • 3
  • 30
  • 60
2
votes
0 answers

Is There a Short (One-Word) Name For a Comparison Operand?

I'm writing sorting routine that (of course) compares two objects. In general, this breaks down to something of the form: if( a < b ) ... ...where the less-than is the operator and a,b are the operands. But in this case they're a pretty specific…
BJ Black
  • 2,483
  • 9
  • 15
2
votes
1 answer

Gradient Boosting Classifier Loss Function with sklearn - operands could not be braodcast together

I am having a problem with the estimator.loss_ method for the sklearn Gradient Boosting Classifier. I am trying to graph the test error in comparison to the training error over time. Here is some of my data prep: # convert data to numpy array train…
2
votes
5 answers

Sum function prob TypeError: unsupported operand type(s) for +: 'int' and 'str'

I'm new to python (PYTHON 3.4.2) and I'm trying to make a program that adds and divides to find the average or the mean of a user's input, but I can't figure out how to add the numbers I receive. When I open the program at the command prompt it…
Nathaniel Brown
  • 61
  • 2
  • 4
  • 11
2
votes
2 answers

cin >> operand cannot work with enum

This is a code i did for practice. when i compile this, it wldnt allow cin >> choice to be compiled. It says "Error 2 error C2088: '>>' : illegal for class" and "Error 1 error C2371: 'choice' : redefinition; different basic types" Can i get…
2
votes
1 answer

Random syntax error!? associative array expansion with a key which contains "operand"

all I got two 2D-array files to read with bash file1.txt (nx6) DESC1 DM1 W1 S1 CRITICAL1 GRADE1 #this line dosen't exist EEE 1x 9 6 Y E2 AAA X 1 2 Y E2 C+C X 8 1 Y T1 HHH 1x 5 5 Y T2 III X 5 5 Y S1 JJJ X 5 5 Y S1 D+ X 2 3 Y T1 file2.txt…
liltme
  • 91
  • 7
2
votes
3 answers

iOS NSNumber Invalid operands to binary expression (NSNumber *" and 'double')

I have the following line of code NSNumber *myValue = loadTempValue*0.420; where I am trying to set the value of *myValue to the value of loadTempValue*0.420, However, I get the error Invalid operands to binary expression ('NSNumber *" and…
NeilMortonNet
  • 1,500
  • 4
  • 16
  • 36
2
votes
2 answers

Displaying #'s 1 - 1000 not divisible by 13? In Java

I'm working on some homework for my Intro to Programming class and one of the questions is Write a program that displays all the integers from 1 to 1000 that are not evenly divisible by 13. (Hint: x is not evenly divisible by 13 if the expression x…
Dariani Disani
  • 79
  • 2
  • 3
  • 9
2
votes
1 answer

What counts as an operator and operand in PHP when calculating Halstead complexity?

I have this code that I want to use for calculating the Halstead complexity:
TrashyMcTrash
  • 1,234
  • 2
  • 15
  • 39
1
vote
0 answers

Are there alternatives to using "fix available via npm audit fix --force"?

I downloaded a file, still trying to remember the name of it ( I will update, looking for it currently ). I never finished installing it because I seen a message about vulnerabilities and a bunch of critical ones. I immediately reverted what I had…
1
vote
1 answer

operand must be an int register in armv8

I'm working on a program in ARMv8, and when attempting to compile it using gcc, I get the error message "operand 3 must be an integer register" for the following lines of code: 67 mul x2, x2, 8 100 mul x16, x11, 4 117 mul x16, x11, 4 140 mul…
Rose Ben Ann
  • 69
  • 1
  • 1
  • 5
1
vote
1 answer

no match for ‘operator<<’ in C++

I'm new to C++ and I am trying to reproduce the following code from pybeesgrid repo (https://github.com/berleon/pybeesgrid/blob/master/src/beesgrid.cpp) namespace beesgrid { std::string getLabelsAsString(const Grid::idarray_t & id_arr) { …
1
vote
2 answers

Python unsupported operand types errors

I have code: ds['annual_inc_per_experience']= round(ds.annual_inc/ds.emp_length, 2) and error: TypeError: unsupported operand type(s) for /: 'float' and 'str' I have no idea how to fix it. Please help.
Bookish Mass
  • 61
  • 1
  • 5