Questions tagged as 'hilos'

0
answers

Get the application that is running in the foreground

I tried using the following code to get the application running in the foreground from a service being executed from an application created by me, but the only thing I get is to get the name of my application in the foreground when it is runni...
asked by 15.05.2018 / 16:52
1
answer

Problems when inserting image from a Thread

I'm doing a simulation of a cinema and I'm trying to add an image to a JFrame from a Thread but the image does not appear in the window, this is the code I made import java.awt.Image; import javax.swing.ImageIcon; import javax.swing.JLabel;...
asked by 11.05.2018 / 21:15
1
answer

Doubts about the use of Threads, AsyncTask and Handler

In this code they use threads , handlers and AsyncTask , what I do not understand is because they use the 3 and not only threads or handlers , What is the difference? In the code I have commented the reasons and why they were used fr...
asked by 06.05.2018 / 17:33
1
answer

Doubt: Variable increment in Java

I have a jFrame (server) that by pressing its button does the following and sends the thread1 ... try { ss = new ServerSocket(9999); Hilo1 hilo = new Hilo1(ss,jLabel1,jLabel2,i); hilo.setDaemon(true); hilo....
asked by 01.05.2018 / 16:32
1
answer

How to run AsyncTask every x seconds?

Currently I call it once like this: hiloconexion = new ObtenerWebService(); try { hiloconexion.execute(GET, "1").get(); } catch (InterruptedException e) { e.printStackTrace(); } catch (Execution...
asked by 19.04.2018 / 08:30
0
answers

PyQt5 start an app several times from different threads

I'm trying to load an app in Qt that runs from Python, the app only contains a QWebView to show a web page and it has to be able to run several times and from different threads (not at the same time) my code is this: # -*- coding: utf-8 -*- fr...
asked by 08.04.2018 / 21:43
1
answer

Android - Update Wireless TextView

I want to update the data displayed in a TextView in some variables that are being updated every 5 seconds ... I can not use threads so I guess it goes with timer / timertask but I can not solve it ... In summary, I want to take a string that is...
asked by 06.04.2018 / 13:31
0
answers

Choose what amount of core I want to use

It could help me in something, I need to execute this code but choosing how much core I want to use from my pc, this is to determine the search time, for my case I have four core and I need to see what time it takes to search for a file. Than...
asked by 26.03.2018 / 23:55
1
answer

How can I assign a task to a thread?

Good I have a problem with Threads in Java when I execute my program with four Threads the execution time is greater than if I execute it with 1 and I do not understand the reason. Basically what I want is to assign each Threads the number of fi...
asked by 06.03.2018 / 20:34
0
answers

Read files Callable Java Interface

I need to read certain files that are in a folder, each file has an operation for example 2 + 2, and when you finish that you can read the result, perform the operation and show your result in the console as something like this Archivo1 2+2 4...
asked by 23.02.2018 / 20:10