357 Topics
![]() | |
Hey Guys i am doing a small project and i am using vb.net with MS access database. i am facing a Concurrency issue sometimes when i try to save data in the datagried view. i have added the datagried view by draging and drop the table from the data source. … | |
Hey all, I was hoping I could get some advice on designing the proper threading for our project. A little background info - our company does simulators of complex electrical/mechanical systems. These simulators could have fuel systems, electrical systems, pneumatic pressure systems, etc. I suppose you can just think of … | |
I am developing a program that gets the html source code of a certain webpages in a website. I already developed one program that does so, here's the sample code Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(TextBox2.Text) Dim response As System.Net.HttpWebResponse = request.GetResponse() Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream()) Dim … | |
what does fork() do in c.? Is it same as fork operation in OS ? What is the o/p of following program ? #include<stdio.h> main() { int i=0; fork(); printf("%d",i++); fork(); printf("%d",i++); fork(); wait(); } | |
![]() | Looking to buy a new desktop for video editing/production along with using after effects and bunch of other stuff at Uni. The new Ivy Bridge proccesors have just reached the market, whats your verdict should i get one or not. If not what would you recommend Sandy i5 or i7. … ![]() |
Hello everyone)) Guys please tell me - is there any way to create thread in lunux , which will not executed itself (at all) - until will get SIGCONT signal? I can't thread self stopping after creation , because in this case - we cann't be sure that the thread … | |
I have developed an application that loaded many images in a listview using ImageList in c# .net framework 4. The images are also compressed. When many many images are loaded and compressed then it takes a long time. So I call the method in backgroundworker. In the backgroundworker I had … | |
[URL="http://www.herongyang.com/C-Sharp/"]C# Tutorials[/URL] This free book is a collection of notes and sample codes written by the author while he was learning Flash. Topics include C#, C Sharp, data types, float, expression, literal, loop, .NET, performance Table of Contents About This Book Introduction of C# (C Sharp) What Is C#? Installing … | |
there are three methods called in a backgroundworker_dowork() event in c# .net 4. I want to execute three methods synchronously. that is, 2nd method will execute after 1st method is fully executed and 3rd method will execute when 2nd method is fully executed. because 2nd method can exetue properly only … | |
[CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * MainMenu.java * * Created on Feb 22, 2012, 7:28:37 PM */ package f1carracing; import java.awt.Color; import java.awt.Graphics; import java.awt.Image; import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JOptionPane; /** * * @author … | |
You cannot vote on your own post 0 I have loaded many images in a listview using ImageList in c#. When many many images are loaded then it takes a long time. So I call the method in backgroundworker. In the backgroundworker I had to add images to ImageList and … | |
hi all, i need to know how to create a thread using pthread_create()? i have never used pthread in c. am i supposed to used function pointer? how to pass arguments in thread function? i need to know everything about pthread_create(). and yes i am using turbo c++ compiler and … | |
Hi, I have a MDIParent and forms that i want to show as child. But because each individual child performs heavy tasks I want each child to have it's own thread. here's what I am trying to do... [CODE] void showStartPage() { Form1 p = new Form1(); p.MdiParent = this; … | |
Hey guys, I am playing with the .NET 4.0's new class Parallel. I tried to open files in a directory and calculate the total bytes of them. However when I run the code, I get a different result every time. Can you explain me the problem I have? [CODE]using System; … | |
Hi all, I am looking to have a long process running in the background to my main form with a timer ticking on the main form animating the elipsis on the end of some text. Was looking for some insight into the best way to go about this and any … | |
I have a project that requires us to perform matrix multiplication via multi-threading, using the Windows API. I've got the basic code running and everything is well under sane/ideal conditions. But if my input matrices go beyond 10x10 the program ends up failing on WaitOnMultipleObjects(...) and runs the main thread … | |
I have the following situation for multithreading in C++: Struct MyData { …. } //Class to create a thread specific data Class MiscData { public: CList<CPtrArray, MyData*> myDataList; HANDLE m_dbHanle; String m_SQLCmd; MiscData () { m_dbHandle = DatabaseConnect(connection parameters); } inline FillMyDataList(MyData* data) { myData* pData = allocate memory; pData … | |
I want to learn multithreading in C++. somewhere on internet I got a piece of code using popen() function of stdio.h. I just wanted to know that if this function helps in creating the new threads or it doesn't come under multithreading. Please guide me in multithreading. | |
Guys I have a program that copies files from folder to folder using IO namespace. The problem is, when I am copying a large file, the program stops responding until the file gets completely copied. I have heard about multithreading and have been reading about it recently and I wonder … | |
Hello... I'm working on an application that contains a "BackgroundWorker", the "BackgroundWorker" worked fine but after I started to change some stuff it gives me an error ("Exception has been thrown by the target of an invocation.")... I used a breakpoint to see where it happens, the exception gets thrown … | |
I'm trying to do some socket programming in java. what i have is, i've written this program to create a server and client on my local machine and make separate two threads for socket input and out put in [B]Se.java[/B] file. Similarly two separate threads for socket input and output … | |
I was asked to write a program, based on parent-child cooperation, which uses a “parallel” merge sort to a sequence of 800 numbers from a text file.I have to read the sequence of 800 integers, which I store in an array, and then pass half of them to a child, … | |
I am trying to create a a splash screen... I have attached the image file..please have a look.. the splash screen performs a diagnostic procedure and displayed the results in a multi-line label.. I have used another thread to write msgs as results in label.. and its working as it … | |
Hi, I'm making a console application, text based game, and what I need to do is be able to do more than one thing at the same time. For example, I need to be able to make a timer that runs constantly, whilst the game is being played. I also … | |
I am designing an application which communicates with another device via a serial port. My application buffers the received binary data until the data is valid/of known format, does some processing and then writes back a response. I understand this model is known as the consumer/producer model. The issue I … | |
Hey everyone. I have recently decided to try and learn how to use java Sockets for client/server communication, as well as swing and threads, etc. and have (pretty much) completed a small client server application. The application is basically a syntax-highlighting notepad, a client swing GUI which connects to a … | |
hi, how can i pervent from crontab concurrent run ??? thats mean when my crontab Take too long , with this crontab another crontab not runs... please help me ... best regards, amir | |
Hey everyone, I've been struggling with this problem for hours now and I have read and tried every example I could find but did not find a solution to my problem: I have a DLL written in C#. The DLL export function calls three functions: PrepareData(): Heavy calculations ComputeNN(): Mild … | |
I'm trying to do the third writer/reader problem with semaphore (as mention on wiki). But it's not working properly. First 16-element array seem to work properly. But after first, it got wrong. Even though I think I'm almost there, I can't find the error at all. My code is as … | |
I don't get it why my threads can't perform properly for writer/reader problem. I think something with the semaphore. but can't solve and online can't help me too. [CODE] semaphore mutex, read, write; void *reader(void *argv) { char buffer[200]; int readNo, i=0; do { sem_wait(&read); sem_wait(&mutex); sem_getvalue(&read, &readNo); fgets(buffer, sizeof(buffer), … | |
I have written a code for checking vfork in unix. But I am getting the ambiguous behavious. When I am using exit(0) in child process , output is fine i.e; output :- Before fork I am a child My name is parent child PID=> 23133 kValue => 2 ] But … | |
Purpose: Use selected one or multiple currencies then from this, browsers open up simultaneously and auto refresh, so as to see changing currency rates I have created an app, Which using a listbox and a button creates a copy of the set form and passes a url through to the … | |
Hi, I have a custom httphandler (HttpUploadHandler.ashx) which is used for handling requests from a file uploader. It collects all the files from a client then fires a thread to do some processing on the files. When large amounts of files are added it will throw 'Thread was being aborted' … | |
Hi. Guys, I need some help. Does anyone know how to Call cross threads in vb.net while accessing the backgroundworker as well? I keep getting error everytime I run my program... 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 … | |
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 … | |
I am learning concurrency programming, I try my best yet can't solve the problem [CODE] boost::mutex mut; std::vector<int> int_vector; boost::condition_variable int_cond; void data_preparation_thread() { while(int_vector.size() != 10) { std::cout<<"data preparation thread :: vector size = "<<int_vector.size()<<std::endl; boost::lock_guard<boost::mutex> lk(mut); int_vector.push_back(4); int_cond.notify_one(); } } void data_processing_thread() { while(1) { std::cout<<"front :: data … | |
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 … | |
[CODE]class MyThread1 implements Runnable { Thread t; MyThread1() { t = new Thread(this);//create a Thread t.start();//activate the thread } public void run() //override run() of Runnable { int i; for(i =0; i< 1000; i++) System.out.print("*"); } public static void main(String args[]) { MyThread1 m1 = new MyThread1(); int i; for(i … | |
[CODE] public delegate void myDel();//declare delegate static void Main(string[] args) { myDel Del; Thread myThread; program2 myOb = new program2(); Del = new myDel(myOb.helloMethod); myThread = new Thread(new ThreadStart(Del)); myThread.Start(); for (int i=0;i<100000;i++)//main thread { Console.WriteLine(i); } } } class program2 { public void helloMethod() { for (int i = … | |
[CODE]import os import urllib from datetime import datetime import workerpool class DownloadJob(workerpool.Job): def __init__(self, fa): self.fa = fa def run(self): f = open(self.fa + '.txt','w') f.write('Example Note.......') f.close() pool = workerpool.WorkerPool(size=5) def workfile(): range1 = 51 range2 = 102 fam1 = 555 fam2 = 833 ranges = range2 -range1 fams … | |
Hi, There is a small blogging system where a user posts small blogs and they are time stamped, if this system was expanded into a distributed environment the main issue I can for see is with so many people using the system then posts will go out off order, the … | |
I'm having a hard time understanding this. I get what multithreading is- allowing a program to run more than one thread to improve performance, by splitting up some of it's resources. So I'm at the point in my app where I need to use it. I need to upload some … | |
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) … | |
A [B][I][U]concept[/U][/I][/B]:icon_rolleyes: has grown, may be it as wrong or right, that in Java [COLOR="Green"]if we do not take the help of [I]thread class[/I] or [I]runnable interface[/I] at all then also several threads get executed there[/COLOR]; If so how it happens with other languages where there is no concept of … | |
So we were offered a job yesterday, which involved developing a mobile app targeting multiple platforms. They need the code to be as cross-platform as possible, so I think that C++ is the way to go as far as the infrastructure is concerned, and then we write wrappers in other … | |
hi, i put together this code to read a text file line by line, split the resulting string into the 4 values and send these values to four text-boxes. during each cycle of that while loop it's suppose to initialize the backgroundworker_dowork, which will read the values and use them(and … | |
Hello Friends, I have 6 to 7 threads which are running parallely. Thing is I have to put Thread.Sleep() between each threads. How Can I optimize it? [CODE]else if (__selectedString.equals("Master DataInput")) { try { if (RecordStore.listRecordStores() != null) { System.out.println("IT FOUND RECORDSTORE ......"); RecordStore.deleteRecordStore("Company"); RecordStore.deleteRecordStore("Product"); RecordStore.deleteRecordStore("Model"); RecordStore.deleteRecordStore("Customer"); RecordStore.deleteRecordStore("Sales"); System.out.println("Delete All … | |
I have a form let's call it Form1 that calls another form(Form2) Form2 to has a bit a code that needs to load in the LOAD_EVENT and takes about 4 seconds. I have made a new form(frmProgress) that only has a progress bar. I want frmProgress to show up and … | |
I'm using sockets in C to write 10 bytes to a socket and then read 10 bytes from that socket. I create a parent process that forks, creating a child that acts as the socket server that writes the 10 bytes. After the 10 bytes are wrote, back in the … | |
I need to tackle the question of threading in Visual C# application development. In its most basic use, I will need to "branch out" to SQL SPs (for example), but need to be able to inform the user that "I'm doing something" - such as the following outline: 1- user … |
The End.