All Questions

3
answers

Delete text inside brackets in javascript

I have the following simple code: <input id="nick" type="text"/> <script> var c = document.getElementById('nick').value </script> I need to remove a part of the name, only if it has brackets [] . So if you have thi...
asked on 27.04.2017 / 00:55
4
answers

How can I align some components of a bootstrap3 navbar to the left and others to the right?

Starting from a navbar of Bootstrap standard we need that some buttons or links are aligned to the left, others to the center (for example: our icon brand ) and others to the right. This was the first thing I tried to do:...
asked on 17.12.2015 / 16:43
2
answers

Is it correct to use the same array as input and output in sprintf?

I found the following code: char query[255]; sprintf(query, "SELECT NOMBRE, "); switch (tipo) { case TIPO_1: sprintf(query, "%s ID", query); break; case TIPO_2: sprintf(query, "%s APELLIDO", query); brea...
asked on 13.01.2016 / 16:02
4
answers

for vs while - LOOP

I have these little questions about loops in java . What is the difference between for and while ? Is the while better for a short loop?
asked on 22.01.2017 / 11:34
4
answers

because the Boolean value of undefined is false, but when compared to false it is different.

The case var resu; undefined? resu = "esto seria inesperado" : resu = "debería dar esto"; console.log(resu); But when I'm going to confirm the theory that undefined is false : var resu; undefined ==...
asked on 25.06.2018 / 20:59
3
answers

Separate string in jQuery

If I have a text string such that: var cadena1 = "cadena_1"; And I just need to get 1 from the previous string to put it in a variable, how can I do it? Doing this: var res = cadena1.split("_"); the result is cadena,1     
asked on 23.01.2017 / 12:47
3
answers

Division in Java does not work well

It works if I enter 10 and then 2, it gives me 5. But I am applying it in another program and now I release to try and it does not give me the results that it has decimals that is to say the division of 2/10 that would be 0.2 does...
asked on 29.04.2017 / 18:07
1
answer

Is it possible to prevent json_encode from changing the accented characters?

I am generating a JSON from a query to the database. When I get the data I store it in an array and then I apply json_encode to create a JSON object. Everything works fine, but I want to know if it is possible to prevent json_encode...
asked on 22.02.2018 / 18:46
3
answers

Touring java arrangement efficiently

Lately I wanted to start thinking more than solutions, to be effective at the time of programming. And that is why I run into the following question, and as the title says: What is the most efficient way to traverse an array in Java? And...
asked on 13.04.2017 / 14:36
3
answers

Get all "Monday" in a range of dates

I need to get a list of dates whose days are "Monday" in a range of dates supplied, both inclusive. For example: If we pass the interval 01/05/2017 until 15/05/2017 the function should return:    01/05/2017       05/08/2017       05...
asked on 06.07.2017 / 14:45