42 Solved Topics
Remove Filter
|
|
Hi Guys. I'm trying to suspend a process by it name, but I found the sample that demontrate this using ProcessId. The problem is that I don't know the process ID of the process I want to suspend/resume. [Here is a sample I used.](https://social.msdn.microsoft.com/Forums/en-US/cdde6cef-3971-40a6-b4dd-02db963868ce/suspend-an-application?forum=vbgeneral) |
|
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, … |
|
Hey guys, I'm interested in learning about simple multithreading in C++ for Windows. Does anyone have any reccommended tutorials/links thats quite good? |
|
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. |
|
|
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? |
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#? |
|
|
Will there be any rating score of a thread in the future? What is the **Pro** or **Con** of it? |
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 … |
|
|
hi all! :) well i wrote a sample code to test threads and i don't get what i want the problem is that the thread i created is starting directly after i create it? but he must start when my j is equal to 25 and then i joining the … |
Hi, I am creating a simple game and I my game thread and my player2 thread seem to be executing twice each time the Thread.Sleep() expires. This is the output: Starting game: Player 2 thread Game thread Starting game: Player 2 thread Game thread Player 2 thread This is the … |
|
Dear all, I am certainly not an expert in C++ development but after some time, I had some code running and compiling for a bio-informatics tool. As always in Science, I changed my area of research of a while and when I came back to my tool, I had changed … |
|
Hello everyone. As the title suggests i need to implement a type of timer based function inside a UI Thread in MFC. Although CWinThread is a UI Thread and has a message pump it does not have a Timer function as CWnd::OnTimer Is there any way i can implement a … |
|
package vc_client1; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.net.Socket; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.DataLine; import javax.sound.sampled.Mixer; import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.TargetDataLine; public class voiceReceiver { public Thread playThread; boolean stopCapture = false; static ByteArrayOutputStream byteArrayOutputStream; AudioFormat audioFormat; static TargetDataLine targetDataLine; AudioInputStream audioInputStream; BufferedOutputStream out = … |
|
public class Thread7 implements Runnable { public static void main(String r[]) { Thread t = new Thread(new Thread7()); t.start(); public void run() { System.out.println("C"); System.out.println("D"); } System.out.println("A"); try { t.join(); System.out.println("B"); } catch(Exception e){} } } Query1: On compiling this program I get "illegal start of expression" error pointing to … |
|
Hey, I was wondering if someone would be able to tell me how I can let a user fill out a form and it would create a page with that information for other people to see (Sort of like a forum). I currently have no code for this but I … |
|
Hello guys, I start to learn&code some basic small client/server console applications in java -especially in android- and also I try to learn Threads, in fact, I managed to connect 2 different machine by uploading different projects to these machines, for example one project only consists of client and the … |
|
Hi, could some one look over my code I by myself dont get where the flaw is. It should paint 1 cube at a time but now it runs all the code through and paints all at once. package net.viped; import java.awt.Color; import java.awt.Graphics; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import javax.swing.JFrame; … |
|
hey i heard that there is something called qt signals you can use it to change the GUI out side the main thread coz when i try to change it i get an error that i cant change the gui out of the main thread but i need it to … |
|
Hi, Can anyone give me some examples with threads with win forms. I have one form which make post request to a server. When i start form and hit "start" button my form read one .txt file. I want to make when start .. read 50 rows then stop and … |
|
Having a bit of an issue with my file.scanner and that issue is that I cannot figure out how to run multi.threading when searching the files within a folder(8,000+ files). [CODE]Imports System.IO Module x Function xGetFolderFilesCount(ByVal selFolder As String) As Integer If Directory.Exists(selFolder) Then Return Directory.GetFiles(selFolder).Length Else Return 0 End … |
|
[CODE]import java.io.*; import java.util.*; import java.lang.*; class Login extends Thread { public void run() { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); Scanner s=new Scanner(System.in); while(true) { System.out.println("Enter username:"); String h=br.readLine(); System.out.println("Enter password:"); String d=s.nextLine(); } } } class Display extends Thread { public void run() { while(true) { System.out.println("ur username is:"+" "+h); … |
|
I have a kind of doubt, suppose I have a class like this: [CODE] public class AA{ public static createUser(String a, int b){ User usr=new User(a,b); BB.storeUser(usr); } } [/CODE] Now, if multiple threads call this createUser() method of this class at the same time, will it cause any kind … |
|
Hi folk. Can I use join() method in implementation of run(), like this: [CODE] public class MyThread extends Thread { @Override public void run() { int timeout = 30000; // here is some heavy work join(timeout); } } [/CODE] Is above thread terminated after timeout milliseconds if task takes longer … |
|
I'm creating a C# program that has a sizable textbox that prints out data every 5 seconds. Whatever data that is displayed is (supposed to be) cleared and replaced with new data every 5 seconds. I've created a thread so that the window opens (main thread) and the data is … |
|
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 … |
|
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; … |
|
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 ? … |
|
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 … |
|
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 … |
|
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 … |
The End.