Posts by Aline • 3,739 points
129 posts
-
1
votes1
answer92
viewsQ: I played this style in drawable to have edge in my Edittext, it worked but I didn’t understand anything of it
I copied on the net this code to give an edge but do not understand why it has three items, someone help me? <?xml version="1.0" encoding="utf-8"?> <layer-list…
-
5
votes1
answer3670
viewsQ: What is savedInstanceState?
I’m new on android and want to learn more so I’m in github seeing some projects ready and I’d like to know what this is: @Override protected void onCreate(Bundle savedInstanceState) {…
-
3
votes1
answer839
viewsQ: What is this? private List<Map<String, Object>> expenses;
A list of maps? Seriously I was scared of this. I’ve never seen this in my life... private List<Map<String, Object>> listarGastos() { gastos = new ArrayList<Map<String,…
-
1
votes0
answers47
viewsQ: Why should I use a Linearlayout within another Linearlayout?
I don’t understand this example: <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" >…
-
1
votes1
answer2400
viewsQ: How do I display the data in an Edittext of an Activity in another Activity?
package com.example.alinesilvagonzaga.teste; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.text.Editable; import…
-
0
votes1
answer665
viewsQ: Error grabbing the selected item in a Spinner and showing in a Toast
I’m new on android and would like to know where is the error here. I’m trying to display list data with a Spinner component. So is the Activity: package sucesso.com.br.testecomponentes; import…
-
5
votes2
answers134
viewsQ: When do I need to use a class that inherits from an Arraylist of a kind? I don’t understand what that’s for
Example: public class ListaAdapterItem extends ArrayList<Item>{ } And I got a class Item: public class Item { private int imagem; private String nome; private String descricao; public Item(int…
-
1
votes1
answer90
viewsQ: How does foreign key in c#?
I have two tables Contact(Man) and Woman. A man can have several women and a woman is for a man. public class Contato { public int id { get; set; } public String usuario { get; set; } public String…
-
3
votes1
answer191
viewsQ: How to show data from two tables in c#?
I built a webservice in c#. With a table it was easy to display but what if I have two tables how would it look for me to display this data? I did so it’s the easiest way: [WebMethod] public String…
-
3
votes2
answers1007
viewsQ: How do I display what’s on the list?
I have this method that adds things to the list: public Pedido adicionarPedido(int quantidade, String nome){ lista.add(new Item(quantidade, nome )); return this; } And I’ve entered that class into…
-
3
votes2
answers383
viewsQ: About method chaining. Why are you giving nullPointerException?
I got the class Request: package teste; import java.util.ArrayList; import java.util.List; public class Pedido { List<Item> lista = new ArrayList<Item>();; Cliente cliente; public Pedido…
-
6
votes1
answer3084
viewsQ: Call a method that calls another method of the same class?
Example have the class Metodo: public class Metodo { private String string; public String mostrar(String nome, String sobrenome){ this.string = "Nome: " + nome + "Sobrenome: " + sobrenome; return…
-
11
votes3
answers981
viewsQ: What do the two dots in a row (.) mean in a file path?
I still don’t understand what this means. Why should I put these two points? Example: ..\Images/Logo.png
-
2
votes1
answer2436
viewsQ: Switch capital letters to lower case letters
I have a richfaces datatable component that returns a database record and this record comes with uppercase letters. Example: PAULO FERNANDES DA SILVA. There would be something I could do to edit…
-
0
votes1
answer156
viewsQ: How to know if the Cpf field does not exist in the database?
Example of what I’m trying to do: vRS = sql.executeQuery(); while(vRS.next()) { nome = vRS.getString("nome"); cargo = vRS.getString("cargo"); } What I want to do is when the record does not exist to…
-
15
votes1
answer703
views -
3
votes1
answer75
viewsQ: When declaring an interface in the class, who should implement it?
class Gerente extends Funcionario implements Autenticavel { He meant that Gerente implements the interface Autenticavel, or Funcionario which will implement the interface?…
-
-3
votes3
answers149
viewsQ: Check two denials in an if expression
I’m putting this on: if(!teste.trim().equals("") || (!(teste == null))){ // ...faz algo sem NullPointerException... } But the second clause is not working, the one that tests if it is not null. I…
-
12
votes3
answers1093
viewsQ: How to check if at the end of String is one or zero?
How can I check whether at the end of a string is 0? The problem with this code is that the string may contain: jrp_documento.jrp_doc_001fornecedor|0 My need is to check if at the end of the string…
-
0
votes1
answer74
viewsQ: How to check and take the value 0 or 1 of a string and save that number to that column?
I have to keep the number 0 in a variable desc and 1 in the variable asc, if one of these values is found in the string. How do I do it? package testes; import java.util.ArrayList; import…
-
11
votes2
answers353
viewsQ: Is that a polymorphism?
Is that polymorphism? If so, why? I think it’s because there’s no method call. Please explain to me if I’m correct or correct me. Thank you :) OutputStream saida = new…
-
1
votes1
answer288
viewsQ: About Jasper Ireports, I need to sort columns coming from the database to be displayed sorted in the report
The problem I’ve already sorted by iReport ide, query sql in the string of the clienteDAO class, but my boss wants me to sort with one of the Jasper yard classes, I’m searching unsuccessfully.…
-
3
votes1
answer280
viewsQ: Crud with simple java REST webservices. Problems with jersey client class
I have this class but it is giving many mistakes do not know what I do today that I try to solve. What I do? package manager.client; import javax.ws.rs.client.Client; import…
-
0
votes1
answer123
viewsQ: Inserting items into an Arraylist does not work as expected
I need to add an item to the list 9 times, only when I print, only the data appears 12 , "Oi", "Aline". What am I doing wrong? package webservice; import java.util.ArrayList; import java.util.List;…
-
0
votes1
answer796
viewsQ: Doubt with webservice put and delete method. How to implement in java?
What I have to implement to provide a Webservice that supports PUT or DELETE. I’m new to this webservice world if you could help me by sending me at least one link from where I can read something…
-
6
votes1
answer201
viewsQ: Why are you giving this Static variable error?
Why is giving this build error and how can I fix it? Cannot make a Static Reference to the non-static field service…
-
2
votes1
answer255
viewsQ: How to print information that is in json format but is printed in a way that allows the user to read?
The application is printing in this json format but I don’t want it to print like this. For example I just want you to print "Translation": "Hi dear" and only. I am using eclipse and the java server…
-
0
votes1
answer1148
viewsQ: How to set the key and value of an object creating an instance and put the values in the map?
I only know how to hashmap in a way that is creating an instance in the put method to insert values. Follow the way I do: import java.util.Map; public class Teste { public static void main(String[]…
-
4
votes1
answer92
viewsQ: How does one method work within another? E.g: service.metodo(arguments). execute();
I’m not understanding this method within another method someone explains it to me? Another example of my doubt: ImageKeywords keywords = service.getImageKeywords(image, forceShowAll,…
-
0
votes0
answers91
viewsQ: About updating only one jsp page html tag
I have a Japplet application it has a button that when clicking it takes the data typed in the textfield and plays in a url that is an index.jsp and there is a getParameter that takes this field.…
-
1
votes0
answers125
viewsQ: I need to take the data from the browser url and pass this data to an application
I have a java web start application. And I need to make the browser pass the parameters to that application. The javascript function is taking the data from the url but is not yet passing to the…
-
0
votes1
answer80
viewsQ: The function writes to the file in txt. I need to sum but the vector is as char
My teacher passed this code that writes to the txt file. Inserts random number. After executing this code he wants me to sum the values written in txt, but they were written in a char vector and for…
-
4
votes2
answers549
viewsQ: Error while reading C file
But before making this code I created a text file called numero.txt and included it in the file: 23;45;89;-230 452;0;97;1 87;2;4;6 346;97;-5;3 Follow code with error, but I can’t find the error.…
-
0
votes1
answer490
viewsQ: Is giving error in the matrix using the while loop
How do I make the matrix be rotated with the while loop? My teacher wants the matrix to be displayed with the while loop I only know how to do with the for loop. Follow example with errors of how I…
-
1
votes1
answer40
viewsQ: I have a file (not txt) and want to open this file without the need of the user to click
I’m a beginner and I’m having second thoughts. Follow an example of how I want it to be: <!DOCTYPE html> <html> <head> </head> <body> <!-- Como fazer esse link abrir…
javascriptasked Aline 3,739 -
0
votes1
answer206
viewsQ: Load applet through javascript
I have a java web start project (a applet more precisely) and I want to rotate (display the applet) with javascript. Chrome has a way to run the applet, but you need to click on the link. I want a…
-
0
votes0
answers37
viewsQ: Error opening the eclipse
This problem is occurring after I changed the jdk was with 1.7 and started using 1.8. Does anyone know the solution? Follow message when trying to open eclipse. java was started but returned exit…
-
3
votes1
answer80
viewsQ: unescape method in javascript
I’m having second thoughts on script down below: function getURLParam(name) { var regex = "[\\?&]"+name+"=([^&#]*)"; //mais código return unescape(results[1]); I’m new to javascript, I can’t…
javascriptasked Aline 3,739 -
0
votes0
answers183
viewsQ: About the applets that will be discontinued, I used netbeans java web start but it didn’t work with Chrome browser
I really need to know the whole to use the java web start plugin free, because I know it has solution; What would be the best technique to launch applets in the browser Chrome? I generated the…
-
-3
votes1
answer113
viewsQ: Why don’t you want to step up?
I want to increment the cont variable if the character vector is not null, do you understand? But nothing happens. Why? #include <stdio.h> #include <stdlib.h> #include <string.h>…
-
0
votes1
answer1485
viewsQ: Run an application without eclipse but using Tomcat. How do I?
I’m used to running the project in the eclipse ide but now I’ve created an html page in Notepad++ and need to put this page to run with the Tomcat web server. I was doing two clicks on my html page…
-
-1
votes2
answers53
viewsQ: Doubts regarding applet 'param' and an Archive pointing to a jar
I can’t understand what this applet stops at, does anyone explain to me? And why does the applet have that Rchive that points to a jar? Why do they stop? <applet code="TesteApplet.class"…
-
0
votes0
answers62
viewsQ: Applet asks for main method when executing, but does not have this method
I packaged the project in a jar that is an applet and I want this applet to run here in the old firefox browser linux, however, it asks to select a main method, but Applet has no main method. How to…
-
0
votes1
answer79
viewsQ: Error: make a query(query) in dao which is an alias
This query normally functions in postgresql: select nome as "pessoas?" from pessoa But in java I did a dao which has a method called find: sql = "select nome as 'teste?' from pessoa where id=?";…
-
1
votes1
answer125
viewsQ: ERROR starting the java project with Tomcat
I put the project War in the webapp folder but the application does not appear in the browser gives this error: SEVERE: Error deploying web application archive webrun.war…
-
0
votes0
answers41
viewsQ: Questions with the Jsobject class
"To pass an applet value to HTML, I needed to create an object from the Netscape.javascript.Jsobject class." My question is this Jsobject class is working in current browsers? I made a code here now…
-
5
votes2
answers84
viewsQ: Why does the new instance of Actionlistener receive a parenthesis and a ;(semicolon) at the end?
I’ve never seen this kind of code structure in the instance, what does it do? The class ActionListener To instantiate it, you have to put it like this: ActionListener trataEventos = new…
-
0
votes0
answers75
viewsQ: If I’m going to create a J2EE application in Eclipse, should I download the Javaee version?
What is the most suitable version of Eclipse to work with J2EE?
-
1
votes2
answers590
viewsQ: A person can have multiple phones. How to do this with vector and not with list?
I’m having trouble connecting Telefone with class Pessoa, a person can have up to three phones. How does this? package model; public class Pessoa { private String nome; private String endereco;…
-
5
votes2
answers7033
viewsQ: What is to bind?
I can’t find the meaning of Bind to explain to me what this is. I would like an example of Bind with the same java language.