All Questions

1
answer

Code does not run on command line

I have a teste.php file with the following code. <? echo "teste"; ?> When I run the command, the php -f teste.php command will output my code: <? echo "teste"; ?> instead of: teste What's happening?...
asked on 11.11.2014 / 16:16
2
answers

Inheritance or Dependency?

Well, my question is this. I am refactoring a system where I have an integration with a REST API, there is a class called Marketplace (which makes the API queries) which I currently extend from class Curl (which is a simplified int...
asked on 22.11.2014 / 15:53
1
answer

How to put legend in distributions graphs in ggplot

I have the following graph of the exponential distribution, I want to put a caption showing the parameter of my exponential. ggplot(data.frame(x=c(0,5)),aes(x))+ stat_function(fun=dexp,colour='red',size=1.4)+ stat_function(fun=dexp,args=li...
asked on 23.11.2014 / 01:29
1
answer

Custom auto increment

I have to generate an auto increment of type "000"+id , but I can not get to something concrete, my base is this below, I just wanted a light how to do it, I do not need the answer itself. > @Id @GeneratedValue...
asked on 15.10.2014 / 19:09
1
answer

JavaScript variables reference

To generate the following array: 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 Consider the following code for constructing an array with equal rows: var linha = [1, 2, 3, 4]; var matriz = [linha, linha, linha ]; matriz[3] = linha ;...
asked on 21.11.2014 / 03:47
1
answer

How to change the name of the compiled application?

How to change the name "app-release" after compiling the android application?     
asked on 14.12.2014 / 01:50
1
answer

Dynamically manipulating the DOM with jQuery

The system I'm currently working on requires a lot of AJAX and DOM manipulation, so I started learning (not long ago), jQuery. In the feature I'm currently developing, there's a jQuery plugin called multi-select , which aims to select a few...
asked on 28.10.2014 / 13:51
1
answer

How do I always get the latest video from a YouTube channel?

I have a% div of% and within it, I want the last video posted to a channel to always appear. I have this structure in jQuery, however I can not get it to pull only 1. Here is the structure: $(function() { // Baixar URLs do feed do canal...
asked on 13.11.2014 / 14:24
1
answer

Problems with dynamic allocation

In a given exercise, make a record of a struct possibly declared as follows below. typedef struct Locatarios { char nomeLocatario[MAX_NOME]; int codigoLoc; float valorAluguel; } Locatarios; Dynamic allocation is required...
asked on 14.11.2014 / 21:44
1
answer

Why does String hashCode () in Java use 31 as a multiplier?

In Java, the hash code for an object String is computed as s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1] using integer arithmetic, where s[i] is the i -th character of the string, n is the length of the string,...
asked on 02.01.2019 / 17:54