All Questions

2
answers

How is the 'Two way data binding' process with pure JS?

Nowadays javaScript frameworks are popular, such as React, Vue and Angular. They work with Two-Way Data Binding which is a hand in the wheel for the developer. How is this process done? Is there any simple way to do this? I would like...
asked on 10.05.2018 / 13:58
1
answer

How to sort a list of tuples by the nth element?

I have a list of tuples of the form: [(0, 1), (2, 3), (4, -5), (6, -3)] I want to sort this list by the second value of each tuple (that is, in case we would have [(4, -5), (6, -3), (0, 1), (2, 3)] . How to do that?     
asked on 14.12.2013 / 23:00
1
answer

What is the order of processing a PHP script?

Example scenario: echo hello(); echo '<br>'; echo 'Hello ' . world('World'); function hello() { return 'World'; } function world($v) { return $v; } Output: World Hello World How does PHP process this? Ab...
asked on 08.05.2018 / 18:27
3
answers

How to maintain a running nodejs server?

I want to know how to keep my server nodejs in permanent implementation in my vps Ubuntu I bought without the need to have it run the Putty and run the node app.js command. I made a REST API that will be consumed by a mobile applicati...
asked on 19.02.2014 / 15:17
6
answers

Convert an array of floats to integer

Suppose the following: import numpy as np a = np.array ( [1.1, 2.2, 3.3] ) How to convert this array to int without having to iterate each element or using another array? Why to: b = int(a) It gives an error because it is on...
asked on 06.01.2014 / 00:50
2
answers

Mail function and its limits

I'm developing a tool to send bulk emails to a list of 20,000 emails, and the script is this: <?php $path = "listas/lista1.txt"; $ponteiro = fopen ("$path", "r"); $conteudo = fread ($ponteiro, file...
asked on 02.05.2014 / 01:26
1
answer

How to prevent pseudo-element (before or after) inside a clickable tag?

Is there any way to prevent the pseudo-element ::after or ::before from a <a> link becoming part of the link itself? My idea was to use ::after in a <a> link tag, this ::after would be u...
asked on 04.09.2018 / 20:17
2
answers

Dictionary Search

I have the following dictionary: public static Dictionary<string, string> ObterCodigo() { return new Dictionary<string, string> { {"18", "Teste"}, {"19", "Teste"}, {"02", "AAA"},...
asked on 29.01.2014 / 14:12
5
answers

How to add a class in a class by clicking on it, leaving only it with that class?

For example: I have more than ul with li ; If I click on a% of% of the first li it has to add a class; If I click on a ul of the second li , it adds that same class. Only which does not interfere with the...
asked on 11.02.2014 / 13:10
1
answer

Android - What's the difference between String and Editable?

When making use of the EditText view, I saw that it returns an Editable data type and not a String. And it has different methods like getEditableText() . What is the main difference between String and this other data type Editable ? I...
asked on 24.02.2018 / 18:49