операторы

Arithmetic operations in Python are right-to-left, not left-to-right?

A simple example in Python caused me confusion: d = 15.961599999999999 d ** 1.5 >>>63.76973829534582 d ** 0.5 ** 3 ... of 0.5 ** 3, and only then d ** (0.5 ** 3). Shouldn't arithmetic operations be performed from left to right? (d ** 0.5) ** 3

The operator is not equal!= JavaScript doesn't work

let arr = [ { index: 0, symbol: 'а' }, { index: 1, symbol: 'а' } ] arr.forEach( ( item, index ) => { if (item.symbol ... dex].index != index ){ console.log(arr[1].symbol); // почему то сюда попадает arr[1].symbol; } });

What do the commas in the cin and cout functions mean?

Today I accidentally wrote the following in cin : int h, w, r, c; cin >> h, w, r, c; A Runtime Error Occurred. It to ... actually output the first variable, and if so, why doesn't a compilation error occur? And why then does Runtime occur in cin?

Why is the comma in indexing deprecated in C++20?

Why is the use of the , operator in the [] array indexing operator deprecated in C++20? For example, the following use-case n ... g(index), index] << '\n'; } Warning: top-level comma expression in array subscript is deprecated [-Wcomma-subscript]

What does the "^" operator do in Python?

How can I find out about the purpose of the "^ " operator?

Java-Ternary operator

public boolean contains(Object[] array, Object obj) { for (Object a : array) { a.equals(obj) ? return true : return false; } } How does the ternary operator work in java? what's wrong with the condition?

The And ( & & ) operator in jQuery

Hello. I need your help when I click on the link: <a id="f1" href="#">Текст</a> You need to take all the elem ... is executed when you click on a link with id= "f1", and you need to click on id= " f1 "or id= "f111". Thank you in advance!

Overloading the output operator for an array class

Собственно, создаю класс динамических массивов. For them, I set functions for adding an element or deleting it. I want to ... ;(c.len);i++) { os << c.p[i] << endl; } return os; }

Is it possible to implement operation () overloading in Java?

Create multiple objects (for example, a and b) of the developed class. Class-vector (one-dimensional array). Implement an operation overload for objects of this class(): (a(i)=b(j)).

How to divide without remainder in C#?

How to divide without remainder (not round but just "cut off" the remainder after the decimal point) in C#? UPD I'm trying to ... u either need to convert seconds from float to int, or initially make all variables float but "cut off" the decimal places.

The => operator in JavaScript

I study JavaScript, in Wikipedia I met an example of describing multidimensional arrays The code is as follows: // Создание ... avaScript. Detailed guide", this operator is not found in the text, and I could not find a description on the network either.

Bitwise shift in C

I recently started studying C. Naturally, I could not pass by the program for converting from the n-th number system to the x ... he two lines shown below. Explain in more detail how these two functions work lines. result <<= 1; result += c - '0';

The += operator in Java

Until now, I thought that the entry i += j; Is the same as i = i + j; However, if we take int i = 5; long j = 8; Tha ... hile i += j will compile without problems. Does it mean that i += j is equivalent to something like i = (type of i) (i + j)?

Counter and for and while loops (Python) need to write a counter

I can't figure it out, I need to write a program to attach an image I can't, I'll write it like this: Enter n calculate: ... ))**2 print("S=", s) break else: print("") P.S. I didn't write the second part with the "for" operator

Overloading the C++operator

Such a question. I'm overloading the operators to work with a vector that consists of two points. There are several tasks: ... onst Vec3D & V2); // и тут }; P.S. What you need implement septenary \ binary operations via the friend function I know

What does void 0 mean?

Sometimes I see such links <a href="javascript:void(0)">Войти</a> And void 0 is also used in the Backbone library.js, for example: if (obj == null) return void 0; What does void 0 mean, and what is it for?

Why use "|=","&=", etc. in C++ instead of"="?

I program Arduino and read about PORT on the Internet. They say that there will be some stability if you write instead of = - ... e) and the size of the firmware (sketch) will not even change. So back to the question: Why "|=", "& = " and etc. in c++?

Why is the order of calculation of subexpressions not defined in C?

Due to the existence of the priority of performing operations and the rules of associativity, it follows that the algorithm f ... lating any expression in C is deterministic. At the lectures I found this slide: What does it mean? What was meant here?

What does the *= or -=operator mean?

As an example, the tutorial has this code: milesTraveled = endingMileage -= startingMileage; amountOwed = milesTraveled *= reimburseRate; Why are *= and -= used instead of the usual multiplication and subtraction operators? Are they any different?

Operation priorities in the Java programming language

This is about operator precedence in Java. So, more than once I come across such interesting signs in which operators are s ... o the console. Result: 121. Why is that? Is the priority table painted incorrectly? Or is there something I don't understand?