22 Solved Topics
Remove Filter
|
|
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? |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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, … |
|
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? … |
|
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 … |
|
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( … |
|
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() { … |
|
how many stacks does the kernel maintain/keep track of...say if there are 12 kernel threads and around 50 user processes?? |
|
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 … |
|
Hi! how to delete threads on daniweb.com posted by me ? |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
The End.