64 Topics

Member Avatar for
Member Avatar for alan.davies

Why do I always get the default filter of recommended every time I open dw? I am quite capable of decidling if I want a filter or not. How can I turn it off?

Member Avatar for Dani
1
5K
Member Avatar for Sarlacc

I wrote an application using pthreads which had 5 threads. 4 of the threads filled up 4 buffers and once they had been filled the main thread would be combine these together. This was achieve using barrier so the main thread would wait until the 4 worker threads had reached …

Member Avatar for Ben_27
0
7K
Member Avatar for Croco_1

I'm totally new to c++ programming and I need to solve this problem: in the class 5 pupils got marks for the course informatics on a total of 30 points. these points have to be typed on the keyboard and have to be changed in percent. the average has to …

Member Avatar for tinstaafl
0
421
Member Avatar for iFrolox

Hi, I got multiple threads in different classes created in this manner: private ThreadStart someName_TS; public Thread someName_Thread; public void someName() { someName_TS = new ThreadStart(someNameThread); someName_Thread = new Thread(someName_TS); someName_Thread.Start();} } private void someNameThread() { while(!Shutdown) { //Do heavy work } } The heavy work is set to a …

Member Avatar for iFrolox
0
398
Member Avatar for Siberian

I've been wondering for the longest time why I don't get email notifications to threads to which I started or subscribed too ?

Member Avatar for Siberian
0
346
Member Avatar for diafol

Noticed that Moderator badge has been dropped. I don't really care about the others, but the Mod badge was useful if I had to put my Mod hat on. Now I'm a grumpy git just pretending to be a Mod. OK it's there if you're a thread starter, but not …

Member Avatar for ~s.o.s~
1
357
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 SuperPink

Hello! I'm new to programming and I'm trying to do a basic hotel application using threads in java. Here is what i've already done: //room class public class Room { private int idRoom; private int etaj; private boolean empty; public Room() { this.idRoom = 0; this.etaj = 0; this.empty = …

Member Avatar for lalaRMa
0
2K
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 deliezer

Hi everyone, I am writing some PDE code, and I am just starting to think about parallelizing it. The code is extremely parallelizable by both CUDA (at the lowest level) and regular threading at the higher level. Specifically, I am coding a matrix multiply, and the matrix is banded, so …

Member Avatar for rubberman
0
218
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 ndeniche

Lately I have seen several threads that people have "tagged" as intended. Why is *tagged* in quotes? Because instead of putting *keywords* into the tags box, users are describing the question they're asking in the thread, and thus creating tags that look this way: **Time zone** `how` `to` `find` `frame` …

Member Avatar for ndeniche
0
389
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
295
Member Avatar for winter7621

**Please help me out** I am trying to do the following: "Create a program that calculates prime numbers from a certain number X to a number Y. Modify the program so as to run two threads at the same time. The first thread will start counting from X to Y …

Member Avatar for ktsangop
0
2K
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 np complete

As C++ has nice read me's like, `C / C++ FAQ's and Practice problems`, `C++ Books`, `"Flushing" the input stream` , how about some read mes's in PHP forum. Its a widely used language like C++, so it would be nice to have some read me's. What do others think …

Member Avatar for LastMitch
0
789
Member Avatar for CPT

i've just started learning the C# language and this is my first program to use threads. I don't understand why the consumer thread doesn't get called( only after the producer has stopped)and when it gets called it doesn't consume anything, also I've noticed that the majority of produced elements are …

0
181
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
277
Member Avatar for anisha.silva
Member Avatar for Dev93

What should be the output to the following code ? I am confused because I am getting a slightly different output everytime . Any other advise would also be appreciated . #include<iostream> #include<SFML\System.hpp> void apple_thread(void *data) { using namespace std; for(int i = 5 ; i<11 ; i++) { cout<<"I …

Member Avatar for Ancient Dragon
0
329
Member Avatar for rahul.ch

public class Thread8 implements Runnable { Demo d; public static void main(String r[]) { new Thread8().disp(); } void disp() { d = new Demo(); new Thread(new Thread8()).start(); new Thread(new Thread8()).start(); } public void run() { d.fun(Thread.currentThread().getId()); } } class Demo { static long f=0; synchronized void fun(long id) { for(int …

Member Avatar for JamesCherrill
0
227
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
261
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
223
Member Avatar for themenucha

Hi! I'm trying to emplement the job queue. Somehow i can't initialize it: the queue is empty `Inline Code Example Here` //INCLUDES #include <stdio.h> #include <stdlib.h> #include <semaphore.h> #include <pthread.h> //GLOBALS pthread_mutex_t job_queue_mutex = PTHREAD_MUTEX_INITIALIZER; int i; #define N_threads 10 int val=0; //STRUCTURES typedef struct job { int data; struct …

Member Avatar for histrungalot
0
415
Member Avatar for rugged1529

I'm trying to seem if(t3.alive) is not ever entered. It successfully goes through t1 and t2 if statment but skips over three. I've tried the do while, while (like seen). I would think if t3 is still alive the loop would still go then once it's not, its out but …

Member Avatar for skatamatic
0
3K
Member Avatar for BanksyHF

Okay, first off, this is not a thread for an answer like "Use delegates", or the like. I know how to use them, but one time I forgot to use them, and when going over my code, it worked, and I've been wondering why for a while. http://screensnapr.com/e/xx68FK.jp[/img] The image …

Member Avatar for skatamatic
0
201
Member Avatar for Buffalo101

Hi, I'm trying to create a thread for running some tasks. I copied the code from an old console application (which compiles fine), but can't figure out why it's not working now. I have searched for the error code and came across this suggestion: "Are you passing the name of …

Member Avatar for jmichae3
0
677
Member Avatar for iRamble88

[CODE=java]import java.util.Scanner; class Sum { private int value; public int get() { return value; } public void set(int sum) { this.value = sum; } } class Summation extends Thread { private int upper; private int lower; private Sum sumValue; public Summation(int upper, Sum sumValue) { if (upper < 0) throw …

0
170

The End.