Posts by Skywalker • 3,151 points
126 posts
-
1
votes1
answer156
viewsA: Facebook Android Studio
The Facebook SDK version(facebook-android-sdk:4.5.1) that you are using does not work for the SDK 9 version of android that you have established in the project on line minSdkVersion 9 See other…
android-studioanswered Skywalker 3,151 -
11
votes1
answer336
viewsQ: Why serialize object to send in another Activity?
What is the explanation for serializing the object both using the implementation serializable or Parcelable. I know this serves to create a new instance of the object in the other activity, but why…
-
6
votes2
answers1129
viewsQ: How do I know if a socket client has disconnected?
I have a server that has a List with all connected clients. Client connects and connection is managed in a unique thread with infinite communication loop. The problem when I drop the client or close…
-
0
votes1
answer171
viewsA: Remove shadow from Tablayout API 21
Do this on Activity onCreate TabLayout tabs = (TabLayout)findViewById(R.id.tabs); tabs.setElevation(0);
-
2
votes1
answer161
viewsQ: Doubts about security in SSL communication of Sockets
I wonder if this communication between the sockets is safe. From this code I can safely exchange information? I am also doubtful to understand how the Sslcontext class works (it is not in this…
-
1
votes2
answers357
viewsA: How to hide title from Jtabbedpane tabs?
I managed to solve using Cardlayout, it is made for this How to use.
-
1
votes2
answers357
viewsQ: How to hide title from Jtabbedpane tabs?
I need to hide the titles of JTabbedPane because I’m creating my own buttons to access the tabs.
-
3
votes2
answers573
viewsQ: Script to remove GOOD signature from UTF-8 files
I have several file problems in UTF-8 with BOM, several tokens are being generated at the beginning of the pages, this causes several problems in the reading of json files and desindentation of HTML…
-
0
votes2
answers2260
viewsA: Store customers inside an Arraylist
Taking into account the classes as they are, you can create a method in the class Banco that returns all customers in one ArrayList. public ArrayList<Cliente> listarClientes(){…
-
3
votes2
answers774
viewsA: Generating random number in C language
Use the function srand(time(NULL)); before calling the Rand function, it serves to reload the values that will be generated by Rand. example: srand(time(NULL)); for(int i = 0; i < 8; i++) {…
-
0
votes2
answers64
viewsA: Float does not work properly
place the attribute float: left in the left colouna and float: right in the right column withdraw the margin-left: 45%; right-hand column…
-
1
votes1
answer1279
viewsQ: How to copy a file inside the jar to a folder outside of it?
I put images inside a package on the project. I need at runtime to display this image in an external program (in the case of linux notify-send), this program needs the exact path of the image, so I…
-
1
votes1
answer263
viewsA: How to generate thumbnails of a bitmap using Asynctask?
Try this. Remove the public statement ImageView imageView; Adapter Add the code to: //adicione esse atributo no seu adapter private LayoutInflater mInflater; //adicione dentro do constutor este…
-
1
votes2
answers1755
viewsA: How can I make this div disappear?
I do so using Jquery has some example in this link. It is a stylish effect and you just need to worry about the content that is inside the window. <html lang="pt-br"> <head> <meta…
-
2
votes3
answers7156
viewsA: generate a json file with java
There is a google library called GSON very simple to use. Download it, put it into your project and use the following code. //Instancia objeto responsável por manipular JSON Gson gson = new Gson();…
-
5
votes2
answers7097
viewsQ: How to create a trigger in Mysql?
I have the tables usuarios, usuario_voto, and classificacao_usuario. Usuarios: system users table. usuario_voto: table that stores a user’s vote on another. classificacao_usuario: table that stores…
-
3
votes1
answer958
viewsA: Error trying rowCount in PHP class
First, from what I read in documentation rowCount function does not receive parameter. "Returns the number of lines affected by the last DELETE, INSERT or UPDATE executed by the corresponding…
-
1
votes1
answer5993
viewsA: How to read an Excel 2013 spreadsheet and write to a Postgresql database?
I advise to use the library jxl to manipulate excel spreadsheets. I just did not test with excel 2013. Here’s an example of manipulation The example code is this import jxl.Sheet; import…
-
1
votes2
answers1206
viewsA: ". exe has stopped working"
Here is a second solution. The first was quoted by @pmg. //code... //passa o endereço de d para a função cria_matriz saber onde está na memória o d, //pois voce trabalha em escopos diferentes, //se…
-
2
votes2
answers1768
viewsA: Algorithm in C - Primes
Since it seems to be a didactic problem I will just leave a suggestion, I do not know if it can be valid here on Stak. If the code is not set later. I would begin to think differently, imagine that…
-
-1
votes1
answer1292
viewsA: Load images in listview
Tries to place the Loadbitmapimage object inside your Viewholder. en.stackoverflow.com/questions/45947/how-to-decrease-the-quality-of-an-image-on-android…
-
11
votes1
answer2249
viewsA: When and where to use webservice?
There are several explanations on the internet, I will try to answer in a less technical way and show when to use, because we learn faster with the need. So first I’m going to impose ways to need…
-
0
votes1
answer140
viewsA: Passing an Editview name to a Textview between Fragments
I’m going to pose some possible problems. Fragment Editarnome @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); con = (conexao)…
-
2
votes1
answer52
viewsA: Failure in swing application response
Your description doesn’t match what’s really going on. String palavra[] = new String[3]; palavra[0] = "bar"; palavra[1] = "ola"; palavra[2] = "alo"; String p = jTextField1.getText(); int cont = 0;…
-
0
votes3
answers2449
viewsA: How to do terminal loading effect on just one line?
I appreciate the answers but it didn’t work with me, I use linux, I tried to adapt, but still the result didn’t come out as intended. I got it fixed, I adapted it from this code and the…
-
4
votes3
answers2449
viewsQ: How to do terminal loading effect on just one line?
How can I do a loading effect by refreshing a terminal line when running a program in c? Example: carrying... points are increasing. I can do this effect in a while loop but just cleaning the screen…
-
1
votes2
answers326
viewsQ: Segmentation failure when changing a Struct’s value in C
An error is occurring Falha de segmentação when trying to access information from a struct. The code is as follows: #include <stdio.h> #include <stdlib.h> typedef struct { int val;…
-
1
votes2
answers326
viewsA: Segmentation failure when changing a Struct’s value in C
The solution to this problem was to change the location of the malloc #include <stdio.h> #include <stdlib.h> typedef struct { int val; }Info; void inserir(Info*); void main(){ //A…
-
8
votes1
answer72
viewsQ: String in php is a class?
String in java is a special class, where vc can instantiate the object only by assigning a value without using the reserved word new. But in php when we initialize a variable with a text, we can say…
-
1
votes1
answer1918
viewsA: Return a query with all data from a table for android
One way to do that would be: Convert database table data into an array of Objects in php Transform into JSON the objects. When android request page vc returns json The android transforms into object…
-
3
votes1
answer412
viewsQ: What format is the image converted when requested by the browser?
This is more of a curiosity, I did a quick search and did not find something to explain how it works. In practice when we develop, we have some methods to request an image from the server and…
-
1
votes1
answer46
viewsA: How to limit the results of a query in DB4O?
int fromIndex = 0 int toIndex = 250; List<MyObject> objetos = objectContainer.query(MyObject.class).subList(fromIndex, toIndex);
-
1
votes1
answer46
viewsQ: How to limit the results of a query in DB4O?
How can I create a query that returns a limited number of such results like the limit mysql? I’m looking in the documentation and I can’t find.
-
0
votes3
answers983
viewsA: Get URL Code ID and insert into JS
You can recover by php $galeria = $_GET['galeria']; then create an input of type Hidden in html <input type="hidden" id="galeria" value="<?php echo $galeria; ?>"> and finally recover in…
-
2
votes1
answer4337
viewsA: Adapter in a Listview in Android Studio
The ideal solution would be to add one more item in the ArrayList<ItemListView> itens and soon after you run the Adapter notifyDataSetChanged method to update the information from listview…
-
1
votes1
answer79
viewsA: Why does the count continue from the previous item and not from the 0?
First, your code needs to follow a pattern in the nomenclature you use if it is not difficult to analyze. ex.: soma, contagem, etc... The most interesting would be, as the books I read about android…
-
3
votes1
answer744
viewsQ: How to treat exception released "Integrity Constraint Violation: Cannot delete or update a Parent Row: a Foreign key Constraint fails"?
I use the class PDO for communication with the banco de dados and I don’t know a good way to capture this exceção. I looked for a class that extends PDOException but I didn’t find. I can do a query…
-
1
votes1
answer173
viewsA: Android does not interpret command " n" of a web page
Do so: String result=""; while((line = br.readLine())!=null){ result += line; } alertDialog.setMessage(result); alertDialog.setButton("Voltar",new DialogInterface.OnClickListener() { public void…
-
1
votes1
answer1260
viewsA: How to get a POST parameter in REST application
Try it like this. @POST @Path("/post/") @Produces("application/json ; charset=UTF-8") public String createPost(String loopId){ ConnectDAO dao = ConnectDAO(); Post post = new Post();…
-
2
votes1
answer2982
viewsQ: File include problems, pointing directory against the page that was opened first
I have a problem when my project has a structure with a large number of directories. When I do include in the file the url is relative to the page that was opened. And then in some files the…
-
0
votes2
answers130
viewsA: Video view overlaying another Video View on Tabactivity Android
Try calling the pause method in the Activity onPause method. @Override public void onPause() { super.onPause(); stopPosition = videoView.getCurrentPosition(); videoView.pause(); } @Override public…
-
2
votes2
answers3188
viewsA: How to receive data via POST, sent from android to PHP webservice?
Webservice receives data via POST from any customer. php webservice //Recebe dados do cliente. //Lê o json diretamente dos dados enviados no POST (input) $json = file_get_contents('php://input');…
-
4
votes2
answers3188
viewsQ: How to receive data via POST, sent from android to PHP webservice?
I had made a webservice in java, now I’m switching to PHP and I’m having difficulty implementing a page that receives via POST a JSON that the Android app sends. ANDROID public static String…
-
1
votes1
answer366
viewsA: How to create a thumbnail of an image that is saved in the comic book?
RESOLVED //Seta endereço da Imagem $src = './thumbnail/'.$objeto->id.'.jpg'; //VERIFICA SE ARQUIVO THUMBNAIL JA EXISTE //E Verifica se ARRAY DE BYTES QUE VEM DO BD é nulo if(!file_exists($src)…
-
1
votes1
answer366
viewsQ: How to create a thumbnail of an image that is saved in the comic book?
I have an image saved in BD need to know how to Resize it, how to save it in a folder.
-
2
votes1
answer794
viewsQ: How to save byte array in PHP file?
I have a array of bytes which is an image that is saved in BD, which method to use to save on hard drive?
-
0
votes1
answer815
viewsQ: Returning null when trying to display an image in p:graphicImage of Primefaces
I have an error trying to show a photo in the component graphicImage of the Primefaces. The photo can be in Base64 or Bytes. I’m using Primefaces 5.0 and JSF 2.2. .xhtml <p:dataTable…
-
1
votes1
answer4876
viewsQ: How to merge result from two tables 1 - n
I have the following problem. 1 table client that has relation with 1 table photos (respective photos from client) 1 client ratio for "n" photos; In short: client has id, name. photo possesses…
-
0
votes2
answers135
viewsQ: Outofmemoryerror error while downloading object list
I am with this error when downloading an object from the webservice that has images that are converted to Base64. The point is that if this object is already saved in the local database of android…
-
2
votes2
answers6415
viewsQ: How to pass object to another view in JSF?
What better way to pass an object to another view in JSF? I have two pages a query and another with the data to edit a particular object, the query page has a list of objects and each object has the…