FAQ Database Discussion Community


Bash Script division

linux,bash,scripting,division,operand
I'm a beginner in scripting. I have a temperature sensor which gives me temperature if I cat the file /sys/bus/w1/devices/28-000006c5772c/w1_slave. The output of the file looks like: 83 01 4b 46 7f ff 0d 10 66 t=24187 As you can see the temperature is t=24187 which I have to divide...

Proper if..else syntax in Python

python,if-statement,indexing,operand
In my python code, I am attempting to implement an if..else statement. See below: if index[y] == index[x]: continue else index[y] != index[x] indexdn = indexd indadd= index[y]-index[x] indexdn[:,y]=indexdn[:,y]+ indadd index[y,:]=-indexdn[:,y] indexdn[y,y]=0 However, no matter how many different ways I attempt to write else index[x] is not equal to index[y]...

Operand type clash geography is incompatible with float

sql-server,sql-function,geography,operand
I am trying to figure out how to build a function that measures the distance from one location to another in miles, using longitude and latitude. The parameters would be added when EXECUTE is run. I am trying to do this using the "geography::Point()" and the "STDistance" instead of float....

Evaluate multiple boolean conditions exclusively, only one can be true (Delphi)

delphi,boolean,operand
I have a function which is evaluate multiple (7, in my case) boolean variables and conditions and the result is true if only one of them true (and the rest false of course). I have the following code: function GetExclusiveTrue: boolean; begin Result:= ( Integer(BoolVar1) + Integer(BoolVar2) + Integer(BoolFunc3) +...

c++ Reading both left AND right if statement conditions

c++,if-statement,operand
how do I get the compiler to check both the left and right side of the statement? if I'm not mistaken, i think in C language, it reads both left and right if you have && or || .... so when I looked this up for C++, it says only...

Operand should contain 1 column(s)

php,sql,admin,operand
So I am trying to write a SQL statement as follows... I need to Find a list of artist names, the number of CDs they have produced, and the average price for their CDs. Only returning results for artists with more than one CD. Problem is every time i think...

Indirect Addressing Mode

architecture,mode,operand,addressing
I am currently trying to solve a problem where I am given these criteria: I believe that I have some of the answers correct but I am confused because the question mentions nothing about an address being stored at address 10 so how can indirect addressing even happen? Question: Where...