22 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for ddanbe

I wanted to upload an excel file with one of my threads, but it is refused. Do I have to zip it first and if so, why?

Member Avatar for Dani
0
330
Member Avatar for pwolf

I was following along to the following tutorial - [Derek Banas Java tutorial 18 - Threads pt2](http://www.youtube.com/watch?v=G2Xd5avyk_0) and as I decided to go over his tutorial series by following along in notepad++ and compiling with the command line, so that I can experiment and test things I'm unsure about, I …

Member Avatar for pwolf
0
1K
Member Avatar for nikolaos

One thread increases an integer named "counter" , and another decreases the same integer. Using synchronized statement on LockObject to control access to counter. If i understand correctly i have to use an Object reference. Can i use synchronized statement on counter somehow? public class Synchronized_Block_Demo { public static int …

Member Avatar for nikolaos
0
341
Member Avatar for jeffbeck8

Hi, I have a working program and I need to answer the following questions: 1:where was polymorphism was used in this application? 2:identify where overriding or overloading was used in this application? I belive overriding is used by the Runnable method to override the run() method. Would that be a …

Member Avatar for jeffbeck8
0
297
Member Avatar for crownedzero

I see this example frequently and thought I'd give it a shot but I've got something unexpected happening with my Queue. I have multiple threads utilizing my producer class but the output doesn't show that it is being written to by each thread. protected Queue<ProductMessage> prodQueue = new ConcurrentLinkedQueue<>(); @Override …

Member Avatar for ~s.o.s~
0
273
Member Avatar for anisha.silva

hi, for program to be concurrent i created 4 threads as below Thread th1 = new Thread(a1.run); Thread th2 = new Thread(b1.run); Thread th3 = new Thread(c1.run); Thread th4 = new Thread(d1.run ); th1.Start(); th2.Start(); th3.Start(); th4.Start(); how do i know when the threads are finised done with the work, …

Member Avatar for anisha.silva
0
278
Member Avatar for rahul.ch

Here when I execute the program, the output I'm getting on all the tries is 342 (naturally first 34 prints together then 2 seconds later 2 prints). My doubts is that is the order of start() [x.start() followed by y.start()] important in order of execution? Shouldn't the output be 234? …

Member Avatar for rahul.ch
0
262
Member Avatar for rahul.ch

Two doubts: 1. Placing run() inside main() generates "illegal start of expression error"? So why can't run() be placed inside main()? 2.With the above code I am getting the output as A C D B. Why B comes last is because of join(). But what I'm unable to understand is …

Member Avatar for rahul.ch
-1
225
Member Avatar for Baduizm

I Have This Workers List: private List<Worker> buildWorkerList( Producer producer ) { List<Worker> workerList = new ArrayList<Worker>( 11 ); workerList.add( new WorkerImpl( "Garnett", producer ) ); workerList.add( new WorkerImpl( "Durant", producer ) ); workerList.add( new WorkerImpl( "Xavier", producer ) ); workerList.add( new WorkerImpl( "Daniel", producer ) ); workerList.add( new WorkerImpl( …

0
154
Member Avatar for Mopikope

I am in the process of creating a jackpot game. At the moment I am stuck trying to cycle through the different pictures and stop on a random picture for 5 different slots. So far I have this for animating: private void animatePictures() { Thread timer = new Thread() { …

Member Avatar for NormR1
0
224
Member Avatar for Santi1986

how many stacks does the kernel maintain/keep track of...say if there are 12 kernel threads and around 50 user processes??

Member Avatar for rubberman
0
198
Member Avatar for Fortinbra

My web application has the ability to process data from word docs and PDF files. We recently had a client who attempted to run files that are of a significantly larger size than anything we tested with. 50MB-500MB PDFs compared to our test files of 1MB-30MB files. If they don't …

Member Avatar for riteshbest
0
117
Member Avatar for saqib_604
Member Avatar for kadamora

I'm making my first program that is using threads...the problem is that when I click the button that I created in windows form it never goes to the button click event in the debuger!!! I've read that that those threads should be background so i made like this [CODE]Thread sendcon …

Member Avatar for kadamora
0
171
Member Avatar for toadzky

My program talks to a USB device over a serial connection. I have WMI ManagementEventWatchers watching for the device to be plugged in and unplugged. If I try to enable, disable, or change anything about the GUI from the event handlers for the WMI Events, I get a InvalidOperationException because …

Member Avatar for toadzky
0
232
Member Avatar for hanslim77

I'm trying to run audio in a different thread but I have no idea why but when I call wait(), my entire program seems to wait or hang.. not sure if it's deadlock since all it does is wait(), though if I set a time period, after that period it'll …

Member Avatar for hanslim77
0
210
Member Avatar for geethasree

Hi All, this is my first query after joining the forum. I would like to know following points: 1. If I can create threads in constructor 2. If yes, can I use the same object / instance (which created this thread)in this thread to call other methods of the class …

Member Avatar for geethasree
0
2K
Member Avatar for shazzy99

Hi, I've been trying to capture video from webcam using openCV functions and openGL for rendering. The code is working fine and I can acquire and display both the cameras. Now I'm trying to record the captured video's and saving them to a file using openCV createvideowriter object. I can …

Member Avatar for shazzy99
0
313
Member Avatar for P00dle

Ok, so I wrote a very simple programme, just to practice multithreading. I know it can be coded better, but I'm still learning about this, so please be lenient. This is my code so far: [CODE]package threads; // Create a thread import java.io.File; class threads implements Runnable { // This …

Member Avatar for P00dle
0
137
Member Avatar for Unitaren

Hello, This is my first post to the community. I have never really been one to ask of much help but I am stumped. I was asked to asked to write a word count program that received input from a scanner object. The input could consist of one or more …

Member Avatar for Unitaren
0
5K
Member Avatar for mpegjohn

Hi, I am running 3 threads that each start an ffmpeg process to extract 3 snapshots form a video file. I need to be able to call this method multiple times, with different video files. It writes the three snapshots to the system. However If I try to delete these …

Member Avatar for mpegjohn
0
317
Member Avatar for katwalatapan

Hello everyone, I have installed Dev-C++ IDE on my system to run POSIX threads application. The program has compiled correctly. When I try to run the application, I am encountered with the following error Unable to locate component This application has failed to start because pthreadGC2.dll was not found. Re-installing …

Member Avatar for ajay.krish123
0
249

The End.