129 Topics

Member Avatar for
Member Avatar for ricedragon

Okey , This is suppose to be a chat and server program and I am down to the last part but I cant seem to figure this out. I Use the JtextField to get the Input from the user and it is suppose to hold it until the sent button …

Member Avatar for harinath_2007
0
232
Member Avatar for mrar85

Write a program that launches 100 threads. [COLOR="Red"]Each thread adds 1 to a variable sum that initially zero. You need to pass sum by reference to each thread. In order to pass it by reference, define an integer wrapper object to hold sum[/COLOR]. Run the program with and without synchronization …

Member Avatar for mrar85
0
2K
Member Avatar for Pravinrasal

I want display 2nd cycle after sleeping 1st cycle time 1 second after that display 2nd ,3rd and so on.... I bold my thread code in above program.... [CODE] public class MainDrawCycle extends JPanel implements ActionListener ,Runnable { JButton button; JLabel lblclkValue,lbldispValue,lblTitle; JTextField textField; JScrollPane pane; JPanel panel; JFrame frame; …

Member Avatar for JamesCherrill
0
438
Member Avatar for MeSam0804

hi, I wanted to get the directories in a specific path and I wrote that by threading programming but when I call [CODE]waithandle.waitall(mywaithandles)[/CODE] , I get the unhandled exception of type 'System.ArgumentNullException' occurred in mscorlib.dll Additional information: Value cannot be null. error. Can anyone help me what to do ? …

Member Avatar for MeSam0804
0
313
Member Avatar for swissknife007

[CODE] #include<stdio.h> #include<conio.h> #include<stdlib.h> struct node {struct node * left; struct node * right; int info; }; typedef struct node node; node * root=NULL,*loc,*par,*save,*child; int item; void pre(node *); void in(node *); void post(node *); void find() { node * ptr; loc=root; par=NULL; if(root==NULL) { loc=NULL; par=NULL; return; } if(root->info==item) …

Member Avatar for swissknife007
0
241
Member Avatar for evlmangesh

Hi guys, This code has been on my back since a few days now and I kinda need help on it ASAP. Basically what I wanna do is use PipedInputStream and PipedOutputStream to accurately time thread create operations. So I have to calculate System.nanoTime() in the run() method of the …

0
98
Member Avatar for teo236

how can I sleep my program without sleeping others (or making them slower)? I am using a windows application. here is a fragment of my code: [CODE] //#includes... int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, char * cmdParam, int cmdShow) { MSG msg; int status; Window myWind(SW_SHOW,"Name",150,120,500,0); for(int i=0;i<550;i++){ myWind.setLocation(i,i); …

Member Avatar for teo236
0
198
Member Avatar for casey_sunako

I have this problem.. I keep getting this error: Cross-thread operation not valid: Control 'ListView1' accessed from a thread other than the thread it was created on. Here is my code: [CODE]Imports System.IO.Directory Imports System.IO Public Class Video_to_Mp3 Public folderopen As String Dim ofd As New OpenFileDialog Dim sizetext As …

Member Avatar for Unhnd_Exception
0
286
Member Avatar for notuserfriendly

Hello, first this is not a homework assignment so please respond whenever you have time as a speedy solution is not exactly needed. I have been learning C# recently from a microsoft book and had an idea of a program i want to make. Basically i want to be able …

Member Avatar for notuserfriendly
0
212
Member Avatar for kytro360

I am trying to run the following code in a thread but I keep getting this error: [QUOTE][QUOTE]Cross-thread operation not valid[/QUOTE][/QUOTE] for both listboxes. Heres the code I am using: [CODE] try { for (int i = 0; i < listBox4.Items.Count; i++) { listBox4.SetSelected(i, true); listBox5.SetSelected(i, true); listBox4.SelectedItem.ToString(); string[] details …

Member Avatar for nick.crane
0
249
Member Avatar for ihatehippies

I made a simple ThreadManager class that receives tasks and spawns threads to complete the tasks. Currently it keeps all the threads alive until I explicitly set threadmgr.waiting=False and all of the tasks are complete. I'm trying to eliminate the need for the former. What I would prefer is that …

Member Avatar for ihatehippies
0
173
Member Avatar for AshfaqueIW

Hi all, I am working on a C++ application which involves a thread. My application draws the waveform on screen. The drawing speed should be 25mm/s and the thread should run every 10.56ms for this speed to obtain. But with either 10ms or 11ms set as the Time period for …

Member Avatar for mike_2000_17
0
174
Member Avatar for sathya88
Member Avatar for machine91

I want to have two threads with a queue exchanging data (in the form of lists) between the two threads. However, at the moment I cannot fathom out how to write the code simply for taking the first list from the queue, processing it(which I have written the function for) …

Member Avatar for Gribouillis
0
248
Member Avatar for baby_c

Hey dear Friends... I'm developing a code for an assignment given that find a solution for a modified Dining philosophers problem.. For that problem I had to create four classes. [ICODE]Philosopher[/ICODE] , [ICODE]chopStick[/ICODE] , [ICODE]samllBowl [/ICODE] and [ICODE]bigBowl[/ICODE].. I implemented the class [ICODE]philosopher[/ICODE] as Runnable.. And the problem is this.. …

Member Avatar for baby_c
0
164
Member Avatar for MoZo1

So I have a component that renders very slowly. The problem is that I can only render inside the event handling thready, which shouldn't be freezed. Long ago in pascal/assembly I used backbuffer and page flipping. I've read that Java supports double buffering, but no info about thread safety. So …

Member Avatar for JamesCherrill
0
205
Member Avatar for harius

Hi.Im working on an ASP.NET website.In this application there are some local functions and a call to an external C# exe.Every thing works fine if I use a msgbox control before this form redirects to the output page.If I dont use this msgbox before redirecting, the output is different than …

Member Avatar for harius
0
156
Member Avatar for ljdellar

I posted a bit of help under the Windows 7 section, and I have been asked to make the thread sticky, but there's nothing I can find to tell me how this is done. Anyone know how? Thanks LJ

Member Avatar for jingda
0
197
Member Avatar for solomon_13000

Why is the value 22 created for the code below? [CODE] public class Pregnant extends Thread{ int x = 0; public static void main(String[] args){ Runnable r1 = new Pregnant(); new Thread(r1).start(); new Thread(r1).start(); } public void run(){ for(int j=0;j<3;j++){ x = x + 1; x = x + 10; …

Member Avatar for masijade
0
125
Member Avatar for Taimoor Rana

Hello, I'm currently looking for a book the covers "how to develop a game". I have basic knowledge of Java. I know: arrays,classes,GUI,basic animation with Timer class,basic graphic. I want to move on and start learning threads, collitions, keyboards and mouselistener and all other game related topic... I was wondering …

Member Avatar for Taimoor Rana
0
173
Member Avatar for yancouto

I'm creating a silly game, and the first thing I want to make is to tell you "You Lose" if the all that you control with the mouse is not inside the frame. I created a JComponent and every 20 milliseconds it is repainted (A thread does that). Inside it, …

Member Avatar for hanvyj
0
1K
Member Avatar for ashwinshenoy

Hi Guys, I am developing a VB application along with MS Access... When I initially load my form I need to put my application to sleep for 3 seconds or else data wont load properly. So for this 3 seconds I would like to show a progress bar displaying a …

Member Avatar for Luc001
0
898
Member Avatar for Ravenn

hi:) i'm writing a windows form program that controls 4 stepper motors, using visual studio express 2010, c++ i'm using a for loop that has to cycle for up to 1200 times. it works well enough but it's kinda slow and, when it's connected to my hardware and given more …

Member Avatar for jonsca
0
250
Member Avatar for Kanoisa

Hi all, I'm currently thinking about how to make a thread safe queue. Specified as such: [LIST] [*]Single reader [*]Multiple writers [*]Dynamically sized [*]Suitable for both a reader sleeping on a queue or as a polled queue [/LIST] So what I'm looking at so far (pseudo)code wise is the following …

Member Avatar for Kanoisa
0
630
Member Avatar for Xlphos

When I try to reply to a thread I get asked to login. I do this and then instead of the message box coming up, the login page keeps coming up. Why is this happening? Anyone else having this issue? I am using Firefox 3.5.

Member Avatar for The Dude
2
1K
Member Avatar for msaranya

Hi, I am trying to include a commented threaded system for my webpage. I have the db design ready... Comments Table Comment Id Parent ID (will be zero for the base comment) Comment Description Submitted by Submitted on I am able to store comments inside the table.I need to display …

0
84
Member Avatar for Arsench

Hello world, I’m trying to call from one PERL script (file) to another PERL (file) script passing arguments. The case is that I want to do it running multi threads. Example: I have 2 arrays. [CODE] Array1 = (“arg1”,”arg2”); Array2 = (“arg1”,”arg2”); [/CODE] In parallel mode I want to run …

0
71
Member Avatar for deviliq

Hey there :) :) :) I'm doing a "simulation" project for the first-come, first-served (FCFS) CPU scheduling algorithm. To give u an idea of what this is: CPU Scheduling is all about having a Scheduler determine which process should be allocated to the CPU next. It has many various algorithms …

Member Avatar for Taywin
0
3K
Member Avatar for GregMaClean

Hello, Although I am a student, this project is not for school. I am trying to make a program that blocks an application from running. The irritating program resists having it's process ended (it automatically restarts via another process that also cannot be terminated). However, I have found that the …

0
198
Member Avatar for Alex_

Hello. I am trying to make a thread pool for a server that will process incoming socket connections. The purpose is to have limited available connections at a time. I can't grasp this concept fully to implement it. Perhaps some of you can help me! Please try. Below is my …

Member Avatar for Alex_
0
344

The End.