Questions tagged as 'java'

1
answer

Print more than 1 java value

I'm studying arrays. The matrix consists of character information from the game of thrones. My Matrix: public static String [][] matrizPrincipal() { String [] [] matriz = new String [6] [114]; matriz[0][0] = "Robin Arryn";...
asked by 16.05.2015 / 14:06
2
answers

How to create bitmap of a Layout keeping the same dimensions whatever the density of the screen?

I have a layout file and I'm passing it to a bitmap that I then send to a bluetooth printer in bytes. According to the mobile resolution, it changes font sizes of textviews - the higher the resolution, the larger the font. How do I g...
asked by 21.06.2017 / 16:36
1
answer

Hibernate Criteria - Group Dates

Currently I can group dates using Projections.sqlGroupProjection (). When my date field is in the same class as I create Criteria, it works perfectly. The problem is when I create an alias, and the date field I want to group is within the class...
asked by 16.05.2015 / 13:11
1
answer

How to call youtube API with several parameters?

I'm trying to get data from multiple videos, however the Youtube API is separate for videos and playlist , so I used the playlist API to get the VideoID of each video that is in a certain playlist, but to call the videos API I want to...
asked by 29.06.2017 / 17:12
1
answer

How to store data coming from Arduino in a Java string?

I need to store data coming from Arduino on Java via serial communication only that the values sometimes not completely filled. I'm using the rxtx library. //trecho do código para leitura int avai...
asked by 02.04.2017 / 14:07
1
answer

Problem reading file line by line in Java

Hello, I'm doing a java program to convert csv files to bib. As the csv file can be 200kb or 2G I decided to read line by line so I do not have problems with low memory. I made the code as follows: try { File file = new File(caminhoAbrirArqu...
asked by 30.05.2017 / 15:00
1
answer

Simple login Firebase

I already have a main login with Firebase auth. But I need to implement another login inside that system because the client can add other administrators. The login will be simple, just check the password and email. I have this method that log...
asked by 16.02.2017 / 23:22
1
answer

Repetition structure

I'm studying repetition structure in Java here. And I came across the urge to do the following: public class Teste { public static void main(String[] args) throws IOException { for (int i = 1; i <= 2; i++) { for (i...
asked by 04.03.2017 / 19:22
1
answer

Android using findViewById from another activity

I need to assign a value to an element that is in another activity I'm trying this way: MainActivity activityprincipal = new MainActivity(); WebView view = (WebView) activityprincipal.findViewById(R.id.webView);     
asked by 22.02.2017 / 17:42
1
answer

How do I make a left join with criteria with a n n mapped table in java?

I tried to do this, however, but it is returning null in the query. Anyone have any ideas how I can resolve this? public List<Pessoa> filtrar(Pessoa pessoa) { Session session = sessionFactory.getCurrentSession(); Criteria...
asked by 10.02.2017 / 11:56