All Questions

3
answers

Calculate distances between two coordinates

I am using this function below to calculate the difference between two coordinates. Through google maps is informed a difference of about 2 to 3km. But the function is returning me the result 56.480188542761 Km. I would like to know if there is...
asked on 04.07.2014 / 16:31
1
answer

How to mix two colors using JavaScript?

There are two fields where the user informs a color in hexadecimal. When you click mix colors , a calculation must be done in JavaScript and this will have to present a painted picture with the mixed color and the result in hexadecimal....
asked on 12.05.2014 / 06:37
1
answer

Array parameter passing error

I'm trying to understand how pointers work for an array. For this, I elaborated the small program below. I made some mistake because, in the line indicated, segmentation fault is occurring. What is the correct way to pass the pointer pointi...
asked on 14.12.2014 / 17:26
1
answer

Colapse Menu after page refresh with localStorage

How can I close a menu and keep it closed after the refresh of the page using jQuery only? It would be something like in this link . When you click the menu, the menu is reduced and so remains after the refresh page. When you click the...
asked on 16.04.2014 / 23:34
2
answers

Get user-created methods

I have a method that lists the methods that a given object has, I want to take only the methods created by the user, in this case: Add and Subtract What this method returns me: GenericClasspublicclassGenerico{publicobjectObjeto{get;set;}pu...
asked on 07.05.2014 / 22:43
1
answer

What is the difference between @Inject and @EJB in the injection of an EJB?

I have an EJB that depends on another EJB, so I'm going to use dependency injection to satisfy this dependency. My question is: what is the difference, advantage or disadvantage between @Inject and @EJB.     
asked on 29.08.2014 / 16:41
1
answer

How to load scripts js dynamically?

I'm developing a web system that needs to load js files dynamically. The reason for this is that there is a necessary logic for selecting which scripts are required, so unnecessary scripts are not loaded. The problem is that I do not know how...
asked on 02.05.2014 / 01:03
1
answer

Is there a C # error suppression mechanism similar to that of PHP arroba?

I'm studying C #, however I'm used to programming in PHP. I know that in PHP it is possible to suppress some error messages by putting @ (at) at the beginning of the expression. For example, if I wanted the variable $a not to...
asked on 07.06.2016 / 14:19
2
answers

Static Blocks, Inheritance, and Constructors in Java

Hello, during my studies in Java I came across the following doubt Given the code below: class Foo extends Goo { static { System.out.println("1"); } { System.out.println("2"); } public Foo() {...
asked on 17.12.2015 / 17:39
1
answer

Do I need to use try / catch throughout a process chain?

Assuming I have a call on my controller layer for a method in the business layer that leads to another method in the data access layer. Should I use try/catch in all of them, just in some or depends? Below, as an example, I'm usin...
asked on 16.05.2016 / 17:06