Questions tagged as 'java'

0
answers

Query with multiple Ids and date with JPA and Spring via RESTApi

Good morning, I'm trying to set up an appointment with Spring JPA and Rest where I can insert several IDs and datainicial and datafinal. The query works if I only put an ID with the dates. The code looks like this: @GetMapping("/search") publi...
asked by 02.10.2018 / 16:50
1
answer

Retrieve the context of a Class (Model)

I have a model and I want to use the "SharedPreferences" inside it. To instantiate SharedPreferences , I need the context, how do I retrieve this context? public class PostagemCurtida { public Feed feed; public Usuario usuari...
asked by 27.09.2018 / 15:41
1
answer

JSF and JavaScript

I have the following question: How does JSF work with JavaScript? I'll be more specific. I'm working on a project with JSF (primefaces), but I can not seem to do something simple with JavaScript, which would be a var btnCarregaAnexo = docum...
asked by 03.10.2018 / 21:27
0
answers

Download Firebase Storage

Until then I have this code but without success public void baixar(){ FirebaseStorage storage = FirebaseStorage.getInstance(); StorageReference storageRef = storage.getReferenceFromUrl("gs://the-xxxxxxxxxxlpha1.appspot.com/arquivos")...
asked by 01.10.2018 / 06:05
1
answer

Factoring Press using Stack

I made a vector stack, with the basic functions (push, pop, peek) and with it I want to do a prime factorization of a value. I did the program, but when I compile it, it stays in an infinite loop that I'm not identifying and does not return anyt...
asked by 01.10.2018 / 00:12
1
answer

Error: java.lang.NullPointerException: Can not invoke method trim ()

I've tried using Port and the baseUri and does not run the rest, it always fails. Full error:    java.lang.NullPointerException: Can not invoke method trim () on null object at org.codehaus.groovy.runtime.NullObject.invokeMethod (NullObjec...
asked by 29.09.2018 / 20:38
1
answer

Android Studio java: listview in an activity, send information to it from another activity

The code of the list: public class Main2Activity extends Activity { //Atributos private SQLiteDatabase bancoDados; private ArrayAdapter<String> itensAdaptador; private ArrayList<String> itens; private ArrayList&...
asked by 29.09.2018 / 18:31
0
answers

DUVIDA WITH firebaseMessagingService sendNotification

I'm trying to use sendNotification of FirebaseMessagingService , but I'm not sure. Where do I put token of the recipient? Here is the code: private void sendNotification(String messageBody) { Intent intent = new Intent(...
asked by 30.09.2018 / 00:23
1
answer

Error: The constructor VelocityTemplate (InputStream) is undefined

import java.io.Serializable; import java.util.Locale; import javax.enterprise.context.RequestScoped; import javax.inject.Inject; import javax.inject.Named; import org.apache.velocity.tools.generic.NumberTool; import com.outjected.email.impl.te...
asked by 30.09.2018 / 17:59
0
answers

percentageCommomWords JAVA In String CHATBOT

I would like some help to implement the percentageCommomWords method in my code, because it is with contains and this ends up complicating a bit when the bot answers the right question. The code follows, but what I was needing w...
asked by 27.09.2018 / 14:28