Questions tagged as 'java'

1
answer

How to collect tweets through the Streaming API, restricting a geographic location?

I would like to collect tweets through a certain keyword in real time, however I would like tweets only posted in brazil, because when doing the collection the api returns me tweets from all over the world. I'm using the twitter4j library. In th...
asked by 11.04.2014 / 20:25
3
answers

HTML tags with RegEx

It is as follows, using the following expression: <div class="teste">(.+?)</div> And that's the content, for example: <div class="teste">asdasdad<div>zxczxczxc</div>lkjlkjjlkj</div><div>asdasd<...
asked by 20.07.2014 / 06:18
2
answers

JavaScript to interact with Java

You can get a javascript value and put it inside a variable in java . EX: var len = $(" #relacaoPax select[name=tipo] ").length; console.log( "len = " + len ); }); <% int l = len; System.out.println( "//L = " + l ); %&g...
asked by 22.07.2014 / 19:04
1
answer

outputStream writing a byteArray - XSS validation

I'm working with software that passes through a "Security Application" that indicates lines of code that are potentially unsafe (theoretically). Based on the code below, the application signals the outputStream.write() line accusing of...
asked by 24.04.2014 / 19:36
4
answers

How to remove the last plus "+" that appears to me in the console starting from this code?

Can someone tell me how to get the last "+" that appears on the console from this code: import java.util.Scanner; public class Power2 { public static void main(String[] args){ Scanner input = new Scanner(System.in); System....
asked by 26.04.2014 / 02:15
1
answer

How do I implement a preprocessor annotation?

I've learned that Annotations in Java are just a way to inject metadata into code. However, I have seen that frameworks and some libraries have annotations that "magically" generate code or define compilation rules. One example is projectlombok:...
asked by 27.08.2014 / 23:28
1
answer

How to implement and execute liquibase?

How do I implant liquibase? and run it? I have projects in java and I use the oracle database. This tool has the possibility to generate from the version file of the bank state, can generate in .SQL ?? Can you use this file to go back to a...
asked by 08.09.2014 / 16:26
2
answers

Calculate Distance Api Google Maps v3 Automatically in a Loop

I would like to calculate the distance between two points using the api Google Maps V3 automatically without the use of interface, and send them to java for future processing. The coordinates are in a MySQL database. I'm even getting more tha...
asked by 09.09.2014 / 01:47
1
answer

How to make the list of Combobox items bigger than Combo itself?

How can I make visible all the contents of the combobox that I have without increasing its size? Today it looks like this: Iwantittolooklikethis: Update Through a comment, I found the solution this link .     
asked by 07.11.2014 / 17:59
1
answer

How to use an attribute of an object to increment a counter?

I have the exercise practically solved, only one "counter" is missing. "In order to determine the monthly amount to be received by each employee, the customers they collect should be counted. Each client must have an attribute with the ident...
asked by 05.04.2014 / 18:46