Questions tagged as 'operadores'

1
answer

What does the function of %% and% any% in r?

I have been reading the documentation of R and in the document Arithmetic{base} , Arithmetic Operators I came across the %% that says to have the mod function, which I assumed was the modulo function, but when I executed it s...
asked by 19.06.2018 / 22:04
2
answers

Doubling bit shift in C

My question is regarding the following snippet of code: #include <stdio.h> int main(void){ int teste = 0, x0 = 0, x1 = 0, x2; x2 = 1; teste = ((x0|x2) | (x1|x2) << 1); printf("Valor de teste: %d ", tes...
asked by 29.04.2017 / 01:44
1
answer

What does the === operator in Kotlin mean?

What does the Kotlin === operator mean, and how to use it? I found this snippet of code in the documentation, but I was not sure. val boxedA: Int? = a val anotherBoxedA: Int? = a println(boxedA === anotherBoxedA) // !!!Prints 'false'!!!     
asked by 04.12.2018 / 14:18
1
answer

How to do math operations with a struct? [duplicate]

I have the following structure: public struct vetor { public float X, Y; public vetor(float X, float Y) { this.X = X; this.Y = Y; } } And this code: Vars.vetor _visao; Vars.vetor _recoil; //Os 2 possuem v...
asked by 20.08.2017 / 00:45
1
answer

What does the "|=" operator mean? (with pipeline and no exclamation)

I was doing some research and came across the operator in |= sequence. See: mBuilder.getNotification().flags |= Notification.FLAG_AUTO_CANCEL; There is this operator in JAVA, but I do not know exactly if it follows the same syntax in...
asked by 11.03.2017 / 17:17
1
answer

Unexpected Behavior, XOR Logical Operator - PHP

Why can you see this behavior of the logical operator xor ? $bool = false xor true; var_dump($bool); // bool(false) $bool = true xor false; var_dump($bool); // bool(true) So I read, xor should return true only if one or the o...
asked by 08.09.2015 / 18:20
1
answer

Is it true that ++ $ variable (pre-increment) is faster than $ variable ++ (post-increment)?

Is it true that ++$variavel is faster than $variavel++ ? In this answer given in SOEN , we see the following excerpt:    ... however pre-incrementing is almost 10% faster, which means that you   should switch from post to pre...
asked by 18.08.2015 / 17:00
1
answer

Problem with boolean checks in JavaScript

var a = '0'; if (!a) console.log('false'); if (a == false) console.log('false 2'); False is not displayed, but false 2 is?     
asked by 09.03.2016 / 23:43
1
answer

How to create modular function whose parameter is an operator?

I assume that I want to create a function that changes the src of an image by another in the index of an array, like this: var arrayimgs = ["js/img1.jpg","js/img2.jpg","js/img3.jpg"]; var imagem = document.getElementById('imagemslide');...
asked by 06.12.2014 / 15:41
1
answer

What does Delete do in front of the constructor?

What does this *delete mean in front of the constructor? Grap& operator=(const Grab &g) = delete;     
asked by 08.11.2016 / 15:14