All Questions

2
answers

New instance overwrites old values

Take a look at this class: class Signal: point = None view = { "x": None, "y": None, } def __init__(self, point): self.point = point self.set_position() print(self.point + " ->...
asked on 08.09.2016 / 23:49
2
answers

How to remove a word from a string without changing larger words that contain it

I would like to remove a word from a string in R. I was doing the following: > s <- "ele esta bem mas tambem esta triste" > stringr::str_replace_all(s, "tambem", "") [1] "ele esta bem mas esta triste" So far, so good. The problem...
asked on 24.02.2016 / 14:30
4
answers

How to delete COOKIES in PHP?

How can I delete COOKIES in PHP? I know that for sessions it has session_destroy() but for Cookies how do I do it?     
asked on 21.02.2016 / 19:22
1
answer

cin vs scanf, which one is faster?

In competitive programming, it is common for many programmers to use scanf() and printf() in C ++ code instead of using cin and cout . And I've even seen problems that result in a Time Limit Exceeded (TLE) when us...
asked on 01.05.2016 / 22:47
1
answer

How to use the %% operator in R

What does the %<>% operator in R mean? What's your difference from <- ? Under what circumstances can it be useful?
asked on 12.06.2016 / 11:48
2
answers

Show Processor Usage

I'm trying to show the use of the server's processor with PHP. Server is Windows with IIS. I've already tried using: exec("wmic /node:localhost path Win32_Processor where DeviceID='CPU0' get LoadPercentage", $out); exec("wmic cpu get loadperc...
asked on 06.09.2016 / 15:32
2
answers

How to use vector to store a class?

Example: class Nome {private: string nome; public: Nome(string nome); virtual void exibirNome() =0; }; class SobreNome: public Nome {private: string nome; public:...
asked on 27.03.2016 / 18:20
2
answers

Difference between RIGHT JOIN and LEFT JOIN [duplicate]

I have a little knowledge on table relationships, I have read the answers to the question on #
asked on 27.08.2016 / 02:21
1
answer

How to do exponentiation in Java?

I'm trying to do a compound interest exercise and I have this code that follows so far. public class ExDesafio_Aula1 { public static void main(String[]args){ double investimento = 5000.00; double juros = 0.01;...
asked on 23.08.2016 / 22:59
2
answers

AJAX Javascript Pure Asynchronous

I am trying to retrieve a data coming from Ajax to use in another function, but I am not succeeding. In jQuery I do this using a parameter called async: false . But in pure JS I can not do it. The parameter is false in the .op...
asked on 10.03.2016 / 12:16