All Questions

5
answers

How to receive a JSON object from an external url / domain?

I found a lottery API that brings me the result data of a lottery of Lotofácil, but I'm not able to access the data of the JSON object. I'm trying this way: $(document).ready(function(){ $.get( "http://developers.agenciaideias.com.br/lo...
asked on 24.10.2014 / 19:25
3
answers

Screen Inheritance - Android

Wanted creates a base (Activity) screen for the android app I'm developing so all other screens inherit from this base. Therefore, the screen would have an area reserved for the top of the page, a central region where the content will be variabl...
asked on 23.02.2015 / 12:29
2
answers

How to organize the code without losing performance?

Using functions instead of putting the code directly influences the performance of a program? For example: void minhafuncao(){ printf("Funcao"); } main(){ minhafuncao(); } instead of main(){ printf("Funcao"); } I know macros have...
asked on 09.04.2015 / 17:45
4
answers

Apply color to font in element clicked only with CSS

I have the following HTML: <div class="trabalheSubEsqTitulo">Fale Conosco</div> When I click on the div trabalheSubEsqTitulo , I want it to apply color:red , however, I only want this with CSS. Can you do it?    ...
asked on 17.11.2014 / 17:16
3
answers

Reverse a 3-digit number in C

I need to make a program that the user type a three-digit number and the program reverses that number for example 123 -> 321 , I would like to know the logic to do this, because I can not think of anything.     
asked on 15.10.2014 / 19:48
3
answers

How to create the service of a controller?

Hello, I would like to know if it is possible with this code to create a service. Because all the videos I see they just create services for things that will be duplicated in the code and related or localhost links. If you can help me, thank you...
asked on 26.10.2015 / 05:53
3
answers

How do Javascript functions behave in relation to scope?

In Javascript, functions are objects and can be passed as a parameter to other functions. But when a function with dependencies on an object, such as variables and other functions, is passed to another object? Does it always run from the first o...
asked on 17.01.2016 / 02:25
6
answers

How to make an "alert" in PHP?

I'm doing an e-mail form in PHP, and I'm trying to make a alert when the client clicks submit a validation. The validation seems to work because it redirects to the page I want, but does not show alert . Is this code correct?...
asked on 14.03.2015 / 18:07
4
answers

What's wrong with my map version for an array in JS?

var kiko = [1,2,3,4,5,6]; var forEach = function(array, newArray, action){ for (var i=0; i<array.length; i++){ var newArray = []; newArray.action(array[i]); }; }; forEach(kiko, newKiko, push) newKiko I'm studyi...
asked on 10.06.2015 / 19:20
4
answers

How to prevent user from entering numbers for a given data?

How do I make my Java program not accept numbers as given by the user? I would like, in a field that requires the user's name, if a number is inserted, such as a badge, do with what program reorder the name. I have already thought of sever...
asked on 14.12.2014 / 00:37