All Questions

2
answers

Declaration of an interface with where

I am studying a lot design pattern , as I think they solve a lot and it is very opportune to study them. I got this statement from the Macoratti website and I confess, I could not explain from where . What does that mean? public interfa...
asked on 11.07.2015 / 22:38
3
answers

Use .on () instead of .bind () in CakePHP's JsHelper

When I write Ajax with CakePHP's JsHelper, if I write something like this $this->Js->get('#searchCity')->event( 'click', $this->Js->request( 'http://api.geonames.org/searchJSON', array( 'async...
asked on 14.02.2014 / 13:31
2
answers

Better applicability to make a functional interface

From Java 8, in order for an interface to become functional, does it need to have just one method? But we have the @FuncionalInterface annotation, which explicitly defines that this interface is functional. But what is the main difference in...
asked on 30.03.2016 / 06:42
2
answers

JavaFX application does not run on some computers after being exported to jar

I developed a JavaFX application, created an Ant script through build.fxbuild and generated a jar. The generated jar runs Ok on the computer in my service and on another developer's computer, however it does not run on two non-develope...
asked on 27.05.2014 / 23:49
1
answer

Display Facebook images with given hashtag via API

I'm developing a web application, and my client has asked me about appearing on his site in some area of the site, Facebook images, with the hashtag . Example, it will cover a certain example, his clients take photos and publish on Facebo...
asked on 29.07.2014 / 15:48
4
answers

How to know the number of lines a large file has in php?

How do I know the number of lines in a file using PHP? I know there are functions like file , which returns all rows of the file in array . We could simply use a count , but the problem is that I need to do this for a 60m...
asked on 13.05.2016 / 18:55
3
answers

How to change the structure of a LINQ query at runtime?

I have the following example of a program that implements the EF (Entity Framework). The bank and application structure is defined as follows: Table Pessoa : Primary key field: id_pessoa Field name: nome Field age:...
asked on 27.05.2016 / 01:17
2
answers

What are the differences between the "pt" and "en-br" values of the lang attribute?

I was not able to see any differences between the two values in the tests. Anybody know? To help: The first two characters of the value define the Language Code Reference (ISO 639-1) and the last two characters, after the tab, identify the Count...
asked on 20.03.2016 / 21:27
2
answers

How to calculate Euclidean distance

I want to calculate the Euclidean distance using the following formula: SoItried,makingthiscode:#defineSLEEP_11000voidHeaderClass::DistanciaEuclidianaEntrePontos(){intx1,x2,y1,y2,distancia;std::cout<<"Coordenadas ponto 1 (x): "; std...
asked on 11.12.2015 / 21:28
2
answers

Get AUTO_INCREMENT value from a table

I want to get the last record entered in a database table, that is, the value of AUTO_INCREMENT of the table, I tried using: SELECT MAX(id) as max FROM people It works, but if I do not have any records in the table it will return...
asked on 06.07.2016 / 19:10