All Questions

2
answers

Switch case Kotlin

In Java I use switch in several situations, as in the example below : public class SwitchDemo { public static void main(String[] args) { int month = 8; String monthString; switch (month) { case...
asked on 18.08.2017 / 20:49
3
answers

Behavior difference between for and for..in

I have the following code that works exactly as expected (that is to go through the array, showing ONLY each element, in this case "Miguel" and "Celeste"): var runners = ['Miguel', 'Celeste']; Array.prototype.winner = function() { for...
asked on 15.12.2016 / 11:55
1
answer

How to display error when doing query?

I have the following problem, this query is not inserting data into the database: $inserir2 = mysqli_query($link, "INSERT INTO cliques (emailusuario, brasil, lucrobrasil, portugal, lucroportugal, suica, lucrosuica, belgica, lucrobelgica, austr...
asked on 21.07.2016 / 00:24
4
answers

César's cipher - problem with letters and spaces

I'm doing an exercise on the cesar figure below: #include<stdio.h>#include<string.h>main(){charfrase[200];printf("String: "); gets(frase); for(int i=0; i < strlen(frase); i++){ if(frase[i] == 'x') frase[i] = 'A';...
asked on 20.06.2017 / 04:21
3
answers

Why does JavaScript allow you to use variables without declaring?

I was testing the JSFiddle with the code below. In it I did not declare the variable i , but even so, I can use it normally. Is this intentional or is it a failure? So, can I just quit using non-declared, Python-style variables? I...
asked on 13.12.2016 / 16:36
2
answers

Group css selectors to reuse code

Given my and html and css respectively: <!DOCTYPE html> <html> <meta charset="UTF-8"> <head> <link rel="stylesheet" type="text/css" href="css/estilos.css"> <title>Teste</title> <...
asked on 10.11.2016 / 14:18
2
answers

What is Anko?

Since converting my Android projects to Kotlin, in some research that I have been doing, they quoted several times by Anko Kotlin. What is this guy from Anko? What it is? What is your goal?     
asked on 10.08.2017 / 06:20
2
answers

Create objects without reference C #

My question is, I have two instance of the class Parents, pais1 and pais2, I created the 3rd instance of the class called pais3 and said that it will be the same as the pais2 instance, until everything is ok. My problem is that when I change...
asked on 14.06.2017 / 00:58
4
answers

Separate an array into groups?

I have the following code answered by a question similar to this but I would like to upgrade, this is the current function: function separar(base, maximo) { var resultado = [[]]; var grupo = 0; for (var indice = 0; indice < base.leng...
asked on 19.05.2017 / 14:58
3
answers

Sort phone numbers in a string

I have some mobile numbers, fixed and fixed, in a database, I used the function implode() to join them in the same string, getting like this: (11) 3333-4353 (11) 98000-2222 (11) 3027-5555 (11) 97000-0333 What I want to do is sort th...
asked on 11.06.2017 / 23:17