Member Avatar
Sometimes there are functions you want your program to perform in the background while you are busy doing other things. For example, if you are building a picture viewer application you may not want to wait until thumbnails are generated before getting on with the business of viewing the pictures. …
by Reverend Jim 1,183 in Software Development ()
Member Avatar
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 …
by iFrolox 4 in Software Development ()
Member Avatar
[CODE]# -*- coding: utf-8 -*- from PyQt4 import QtGui from PyQt4.QtCore import * import sys import os class VideosToMp3(QtGui.QWidget): def __init__(self, parent = None): super(VideosToMp3, self).__init__(parent) ''' Labels and GUI ''' extension = QtGui.QWidget() download_label = QtGui.QLabel("Enter YouTube video URL:") self.download_line_edit = QtGui.QLineEdit() file_label = QtGui.QLabel("Enter file name (optional):") self.file_line_edit …
by -ordi- 6 in Software Development ()
Member Avatar
So I'm building this pretty simple top trumps card game as part of an assignment. I have the game logic built, the swing GUI is in place and I plan to do all the calculation on the server app and have it update the client up with the game's state, …
by Pobunjenik 27 in Software Development ()
Member Avatar
Hey guys, I'm interested in learning about simple multithreading in C++ for Windows. Does anyone have any reccommended tutorials/links thats quite good?
by Tycellent in Software Development ()
Member Avatar
Hi Dw I'm trying to create a server that will handle simultaneous connections from clients and for simplicity I've decided to save data to the text files, it not one text file but there are many text files which will be located on the server. The clients (written in VB5.0) …
by Mr.M 32 in Software Development ()
Member Avatar
//I want to start a thread that set postion of a la lable here is part of the code t = new Thread(bar); t.Start(); public void bar() { while (true) { label2.Location = new Point(this.label2.Location.X + 10, this.label2.Location.Y); Thread.Sleep(1000); if (this.label2.Location.X > this.Width) { label2.Location = new Point(200-this.label2.Width + 10, …
by Dziri_1 in Software Development ()
Member Avatar
Quick question, the answer is eluding me on the internet. Which is unusual. When we reference and call a sub/function from a class is it automatically started on a new thread or will it join the main thread? Cheers in advance.
by dhatsah in Software Development ()
Member Avatar
Greetings. I have a bit of situation here. I'm using symfony2 and facebook SDK to set up a web service for my IPhone and Android applications. The problem is that the background work can take quite a while. User is first redirected to facebook login page where he can proceed …
by Dr_Freeman in Web Development ()
Member Avatar
Have a look at this thread... http://www.daniweb.com/web-development/databases/mysql/threads/466095/create-.mdf-file-from-mysql My machine shows seems to reformat this to plain text. So just plain page of text. Using Chrome/W7. Anybody else?
by diafol 3,020 in DaniWeb Community Feedback ()
Member Avatar
I created a thread as I was struggling with an assignment I was given. I was told today that I mustn't share my coding with anyone and was wondering if there was anyway to delete my thread. my thread is http://www.daniweb.com/software-development/python/threads/465305/python-prime-number-code-not-working
by 123pythonme in DaniWeb Community Feedback ()
Member Avatar
I'm trying to create a program where I can print output to my console application and entering test without being override. Is there anyway to accomplish this? Here is my simple code showing my issue: ` #include <iostream> #include <thread> #include <Windows.h> void myThread() { while (1) { std::cout << …
by Mathias_1 in Software Development ()
Member Avatar
Hello! I would like some help with a piece of java code that i'm having problem. I have to make simultaneous tcp socket connections every x seconds to multiple machines, in order to get something like a status update packet. I use a Callable thread class, which creates a future …
by ktsangop 23 in Software Development ()
Member Avatar
Hi I am new to this forum and i was just wondering if the following scenario is implementable. Suppose a thread is reading a file and dividing it into chunks of data(lets say in the form of arraylist, where each line corresponds to a value in arraylist). Each chunk of …
by rgrs2007 in Software Development ()
Member Avatar
I am working on a simpler version of the following question: http://www.cs.ucf.edu/courses/cnt4714/spr2011/prog1.pdf and have simplified the problem in the following manner: SO: input pipe is PIPE4 and output pipe is PIPE0 S1: input pipe is PIPE0 and output pipe is PIPE1 S2: input pipe is PIPE1 and output pipe is …
by rgrs2007 in Software Development ()
Member Avatar
I am very new to thread. However I would like to make 2 threads, Thread A and Thread B. When a button is clicked Thread A starts and so does Thread B. Thread B shows a loading image and disables users from clicking any buttons whilst Thread A executes some …
by cirbab4 in Software Development ()
Member Avatar
I have a Java code block like following: public TcpConnection(TcpSocket socket, long alive_time, ITcpConnectionListener listener) { init(socket,alive_time,listener); start(); } For the conversion in C#, When I try to replace the `start()` method with `System.Threading.ThreadStart()`, it gives an error. How can I start a thread in C#?
by mesbahuk in Software Development ()
Member Avatar
hey could anyone please tell me how to create a dialog from a background thread that is not a UI thread in Android?? something like this.. Thread t=new Thread(new Runnable() { @Override public void run() { Thread innerThread=new Thread(new Runnable() { @Override public void run() { /////***** i need to …
by cool_zephyr 7 in Mobile Development ()
Member Avatar
Hi, I have two threads A and B. Thread A prints only odd numbers. Thread B prints only even number. I want to synchronize it in such a way that on the screen I get continues numbers. How can I do that? I was thinking of using sockets. Thread A …
by srivardhanms in Computer Science ()
Member Avatar
Will there be any rating score of a thread in the future? What is the **Pro** or **Con** of it?
by LastMitch 149 in DaniWeb Community Feedback ()
Member Avatar
The assignment is to implement the Banker's Algorithm using pthreads and mutex locks. We implemented the Banker's Algorithm and it works fine. When we began implementing the pthreads and mutex locks we ran into problems. We know that each process is a thread, and that the mutex lock is acquired …
by nerdygirl118 in Software Development ()
Member Avatar
Hi Guys I was just wondering how you stop the combo box from displaying different instances of the same value. In the combo box i have villages and towns names e.g doolin. onli thing is i have many businesses from doolin on the database so when i pull the town …
by joseph.lyons.754 in Software Development ()
Member Avatar
I was looking at the possible solution to synchronise a bounded buffer ( like queue) using condition variables and think that we probably need two condition variables to correctly implement the synchronisation, one condition varaible will have a queue where the consumer thread(s) will be waiting to see if the …
by karandeepmalik in Software Development ()
Member Avatar
i'm looking for code of posting a new thread box like that found in vbulltin forums or any box like that which has basic settings as(Bold , italic, underline , add image using url, alignment , fonts type , color , size , adding codes) i don't need it for …
by mido22 in Web Development ()
Member Avatar
This Python snippet shows how to control a VPython visual 3D sphere with Tkinter GUI toolkit button clicks.
by vegaseat 1,720 in Software Development ()
Member Avatar
Hi people. I wonder how I can free the pthreads' allocated memory? #include <pthread.h> #include <stdio.h> #include <stdlib.h> #define NUM_OF_THREADS 10 void* print_thread_id(void* tid) { printf("Greetings from thread %d\n", (*(int*)tid)); pthread_exit(NULL); } int main(int argc, char* argv[]) { pthread_t threads[NUM_OF_THREADS]; int status, i; int* n_thread; for(i = 0; i < …
by fyra in Software Development ()
Member Avatar
Hi all Just looking a creating a possible java or jsp based messenger for a web site. I have tested java based lan messengers, p2p messengers and even openfire+spark+smack instant messaging, XMPP (also called Jabber) which I admit I liked a great deal. They say dont try re-invent the wheel …
by new_zal in Software Development ()
Member Avatar
So I have been working on a program lately, or actually was working on it and came back to check on it. The program is being developed for someone else, who unfortunately has not been cooperative in giving me the stuff I need to test it. The program is used …
by JOSheaIV 119 in Software Development ()
Member Avatar
Hi I'm creating a socket server in Linux using pthreads. I was just wondering, how does the server send specific messages to its clients (for instance, a PM) if each is in its own standalone thread?
by communism in Software Development ()
Member Avatar
K! Any chance of having a option to not get notifications regarding a single thread updates????? "What are you eating/drinking right now?" have gone out of bound, that i keep getting the mail notifs...... Can i unfollow only that thread only........ Sofar the only option seems to be unsuscribe the …
by PrimePackster 10 in DaniWeb Community Feedback ()