Questions tagged as 'java'

1
answer

Upload and files using API Rest

I'm creating an end-point to output a file in the format (.txt), but my entity is not just the file. There are other attributes, so I need to send json this way to the server: { "nomeCliente" : "teste", "arquivo": // aqui eu enviaria o arquiv...
asked by 20.03.2018 / 18:12
1
answer

How to return a table from a POSTGRES function?

Hello, I'm trying to create a function in postgres, which at first is all correct, taking the return from the function. When I run the function, it is returning all rows, but all in only one field as a string. And I need it to come in the tab...
asked by 20.03.2018 / 19:53
3
answers

Find the size of the largest sequence of # in an array. JAVA

I'm new to Java and found this problem:    Given an array of characters ('.' or '#'), your task is to indicate the   size of the largest contiguous segment (horizontal or vertical) of   characters '#' This is my code so far: import java...
asked by 18.03.2018 / 12:37
1
answer

WELD-001408: Unsatisfied dependencies for type ServiceLocator with qualifiers @Default

I'm trying to implement a JAX-RS (Jersey) server with DataSource, I've already migrated from Tomcat to GlassFish, and now from GlassFish to WildFly 11, but I'm having the error below that I can not find a solution. >    Caused by: org.jboss.we...
asked by 10.03.2018 / 15:39
1
answer

Chronometer display value greater than 60 minutes in MM: SS format

Hello, is there a possibility of a chronometer displaying more than 60 minutes without entering the time format? My chronometer receives data from a String to set the initial value. private long minutesAndSecondsToMilliseconds(String minu...
asked by 18.03.2018 / 02:38
2
answers

How do I get the name of the Wi-Fi network (SSID)?

I want to make an app that takes the information of the Wi-Fi connection, that the cell phone is connected, being more specific I want to make an app that takes the name (SSID) of the Wi-Fi network where the phone is connected . Is it possible t...
asked by 16.05.2018 / 05:53
2
answers

Required field, fill in before saving

I am trying to validate the fields so that it is mandatory before saving the data beforehand. Follow the code protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity...
asked by 04.03.2018 / 16:00
1
answer

Generate JSON from SQLite

I have a table with several records in SQLite , and also other data in SharedPreferences . I would like to generate a JSON by pulling those records, and together that SharedPreferences data. But in search, I barel...
asked by 23.02.2018 / 17:21
1
answer

Get String from strings.xml file

I'm trying to retrieve a String from the strings.xml file for this SQL_CID variable. <string name="insert_cid">" INTO 'CID' ('COD_CID', 'NOME_CID', 'CODIGO_CID') VALUES(1, 'CÓLERA DEVIDA A VIBRIO CHOLERAE 01, BIÓ...
asked by 22.02.2018 / 22:28
1
answer

SQL function with mySQL

I'm implementing a function for a vendor search field and my sql function is in trouble, would anyone know which problem? This was a function of when I used postgree, but now I'm using mySQL. package br.com.project.bean.geral; import java.la...
asked by 14.06.2018 / 04:29