473,703 Members | 2,657 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I need help on this THREAD problem !


Hello,

I am trying to write a multithread program that simulates producers and
consumers. My program can have many producers and many consumers (each in a
separate thread). It has a storage place (buffer) with "n" capacity. The
user provides these parameters on startup. The buffer works with a circular
queue.

It's a console application. My implementation is working with Semaphores
to synchornize everything. I think it's synchornized OK, but the problem is:
I tell it to produce 10 products, and it produces 10 products, but the
consumers consume only 8 (they should consume all the products). I can't
find out why this happens.

Any help on this will be appreciated.

Thanks in advance!!!

Leonardo Hyppolito
here is the code:

It's also published (with syntax highlighting) here:

http://www.rafb.net/paste/results/u2946385.html
----

using System;
using System.Threadin g;

namespace TesteProdCons
{
public class Semaphore
{
private int counter;

// constructor
public Semaphore(int c)
{
counter = c;
}

public void p()
{
lock(this)
{
while(counter <= 0)
{
Monitor.Wait(th is, Timeout.Infinit e);
}

// we have control, decrement the counter
counter--;
}
}

public void v()
{
lock(this)
{
counter++;
Monitor.Pulse(t his);
}
}
}

// can hold 1 product at a time (buffer of 1 position)
public class Storage
{
// semaphores used for synchronization
private Semaphore notFull;
private Semaphore notEmpty;
private Semaphore exclusive;

// prodBox is the buffer that keeps the products
private int[] prodBox;
private int readIndex;
private int writeIndex;
private int capacity;

// actual product number
private static int n;

// max number of products to be produced
private static int nMax;

// property for n
public int Number
{
get {return n;}
set {n = value;}
}

// property for nMax
public int MaxNumber
{
get {return nMax;}
set {nMax = value;}
}

// writes a string representation of the storage
public override string ToString()
{
string ret = "";
for (int i = 0; i < capacity; i++)
{
ret = ret + prodBox[i] + " ";
}
ret = ret + "readIndex= " + readIndex + " writeIndex=" + writeIndex;
return ret;
}
// constructor
public Storage(int max, int cap)
{
n = 0;
nMax = max;
notFull = new Semaphore(cap);
notEmpty = new Semaphore(0);
exclusive = new Semaphore(1);
prodBox = new int[cap];
capacity = cap;
readIndex = 0;
writeIndex = 0;
}

public int Product
{
get
{
// wait for a nonEmpty resource
notEmpty.p();

// wait for exclusive access
exclusive.p();

// read the product
int ret = prodBox[readIndex];

Console.WriteLi ne(" " + Thread.CurrentT hread.Name + " reads " + ret);

// set the new readIndex
readIndex = (readIndex + 1) % capacity;

// for debug
//Console.WriteLi ne(" " + Thread.CurrentT hread.Name + "--> " + this);

// release the exclusive access
exclusive.v();

// release a notFull resource
notFull.v();

return ret;
}
set
{
// wait for a notFull resource
notFull.p();

// wait for exclusive access
exclusive.p();

// if already reached maximum number of productions,
// abort the producer thread

if(n >= nMax)
{
Console.WriteLi ne("Aborting " + Thread.CurrentT hread.Name +
" (reached max number of productions)");
Thread.CurrentT hread.Abort();
}

// store the product
prodBox[writeIndex] = value;

// set the new writeIndex
writeIndex = (writeIndex + 1) % capacity;

// increment the actual product number
n = n + 1;

// write information on screen
Console.WriteLi ne("++ [" + Thread.CurrentT hread.Name + "] produces n." +
Number + ": " + value);
//Console.WriteLi ne(" " + Thread.CurrentT hread.Name + "--> " + this);

// release the exclusive access
exclusive.v();

// release a notEmpty resource
notEmpty.v();
}
}
}

public class Producer
{
// a reference to the storage
private Storage a;

// seed for the random
private int seed;

// constructor
public Producer(Storag e arm, int s)
{
a = arm;
seed = s;
}

// entry point for the producer thread
public void produce()
{
Random r = new Random(seed);
while(a.Number <= a.MaxNumber)
{
// get a random integer (from 0 to 2 seconds)
int prod = r.Next(2001);

// store the product
a.Product = prod;

// rest for a while...
Thread.Sleep(20 0);
}
}
}

public class Consumer
{
// a reference to the storage
private Storage a;

// constructor
public Consumer(Storag e arm)
{
a = arm;
}

// entry point for the consumer thread
public void consume()
{
while(true)
{
// get the product value
int prod = a.Product;

// "consume" the product (pauses for the product's miliseconds)
Thread.Sleep(pr od);
Console.WriteLi ne("-- [" + Thread.CurrentT hread.Name + "] consumed " +
prod);

}
}
}

class TesteProdCons
{
static void Main(string[] args)
{
int numProducts;
int numProducers;
int numConsumers;
int capacity;

// read information from the user
Console.Write(" Max number of products: ");
numProducts = Int32.Parse(Con sole.ReadLine() );
Console.Write(" Number of producers: ");
numProducers = Int32.Parse(Con sole.ReadLine() );
Console.Write(" Numero of consumers: ");
numConsumers = Int32.Parse(Con sole.ReadLine() );
Console.Write(" Capacity of the storage buffer: ");
capacity = Int32.Parse(Con sole.ReadLine() );

// a single shared storage place
Storage a = new Storage(numProd ucts, capacity);

// one producer object for each producer thread,
// to have different random generators
Producer[] prod = new Producer[numProducers];
Thread[] tProd = new Thread[numProducers];

// only one consumer object for all consumer threads
Consumer c = new Consumer(a);
Thread[] tCons = new Thread[numConsumers];

Random r = new Random();

// create the producers objects and threads
for(int i = 0; i < numProducers; i++)
{
prod[i] = new Producer(a, r.Next(999999)) ;
tProd[i] = new Thread(new ThreadStart(pro d[i].produce));
tProd[i].Name = "p" + (i+1);
}

// create the consumers threads
for(int i = 0; i < numConsumers; i++)
{
tCons[i] = new Thread(new ThreadStart(c.c onsume));
tCons[i].Name = "c" + (i+1);
}

// start the threads
foreach (Thread t in tProd) {t.Start();}
foreach (Thread t in tCons) {t.Start();}

Console.WriteLi ne("Storage, producers and consumers created!");
}
}
}
Nov 15 '05 #1
4 1975

That's not a lot of information to go on. Have you checked in the debugger
to see if there are still active producer threads after the time when you
check? Try and look at those threads in VS in thread view and see what code
they are sitting in. Maybe they're deadlocked? Also check your consumers and
make sure that they're not skipping events..

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/webblog/
----------------------------------
Making waves on the Web
"Leonardo Hyppolito" <le**********@u ol.com.br> wrote in message
news:uH******** ******@TK2MSFTN GP09.phx.gbl...

Hello,

I am trying to write a multithread program that simulates producers and consumers. My program can have many producers and many consumers (each in a separate thread). It has a storage place (buffer) with "n" capacity. The
user provides these parameters on startup. The buffer works with a circular queue.

It's a console application. My implementation is working with Semaphores to synchornize everything. I think it's synchornized OK, but the problem is: I tell it to produce 10 products, and it produces 10 products, but the
consumers consume only 8 (they should consume all the products). I can't
find out why this happens.

Any help on this will be appreciated.

Thanks in advance!!!

Leonardo Hyppolito
here is the code:

It's also published (with syntax highlighting) here:

http://www.rafb.net/paste/results/u2946385.html
----

using System;
using System.Threadin g;

namespace TesteProdCons
{
public class Semaphore
{
private int counter;

// constructor
public Semaphore(int c)
{
counter = c;
}

public void p()
{
lock(this)
{
while(counter <= 0)
{
Monitor.Wait(th is, Timeout.Infinit e);
}

// we have control, decrement the counter
counter--;
}
}

public void v()
{
lock(this)
{
counter++;
Monitor.Pulse(t his);
}
}
}

// can hold 1 product at a time (buffer of 1 position)
public class Storage
{
// semaphores used for synchronization
private Semaphore notFull;
private Semaphore notEmpty;
private Semaphore exclusive;

// prodBox is the buffer that keeps the products
private int[] prodBox;
private int readIndex;
private int writeIndex;
private int capacity;

// actual product number
private static int n;

// max number of products to be produced
private static int nMax;

// property for n
public int Number
{
get {return n;}
set {n = value;}
}

// property for nMax
public int MaxNumber
{
get {return nMax;}
set {nMax = value;}
}

// writes a string representation of the storage
public override string ToString()
{
string ret = "";
for (int i = 0; i < capacity; i++)
{
ret = ret + prodBox[i] + " ";
}
ret = ret + "readIndex= " + readIndex + " writeIndex=" + writeIndex;
return ret;
}
// constructor
public Storage(int max, int cap)
{
n = 0;
nMax = max;
notFull = new Semaphore(cap);
notEmpty = new Semaphore(0);
exclusive = new Semaphore(1);
prodBox = new int[cap];
capacity = cap;
readIndex = 0;
writeIndex = 0;
}

public int Product
{
get
{
// wait for a nonEmpty resource
notEmpty.p();

// wait for exclusive access
exclusive.p();

// read the product
int ret = prodBox[readIndex];

Console.WriteLi ne(" " + Thread.CurrentT hread.Name + " reads " + ret);
// set the new readIndex
readIndex = (readIndex + 1) % capacity;

// for debug
//Console.WriteLi ne(" " + Thread.CurrentT hread.Name + "--> " + this);
// release the exclusive access
exclusive.v();

// release a notFull resource
notFull.v();

return ret;
}
set
{
// wait for a notFull resource
notFull.p();

// wait for exclusive access
exclusive.p();

// if already reached maximum number of productions,
// abort the producer thread

if(n >= nMax)
{
Console.WriteLi ne("Aborting " + Thread.CurrentT hread.Name +
" (reached max number of productions)");
Thread.CurrentT hread.Abort();
}

// store the product
prodBox[writeIndex] = value;

// set the new writeIndex
writeIndex = (writeIndex + 1) % capacity;

// increment the actual product number
n = n + 1;

// write information on screen
Console.WriteLi ne("++ [" + Thread.CurrentT hread.Name + "] produces n." + Number + ": " + value);
//Console.WriteLi ne(" " + Thread.CurrentT hread.Name + "--> " + this);
// release the exclusive access
exclusive.v();

// release a notEmpty resource
notEmpty.v();
}
}
}

public class Producer
{
// a reference to the storage
private Storage a;

// seed for the random
private int seed;

// constructor
public Producer(Storag e arm, int s)
{
a = arm;
seed = s;
}

// entry point for the producer thread
public void produce()
{
Random r = new Random(seed);
while(a.Number <= a.MaxNumber)
{
// get a random integer (from 0 to 2 seconds)
int prod = r.Next(2001);

// store the product
a.Product = prod;

// rest for a while...
Thread.Sleep(20 0);
}
}
}

public class Consumer
{
// a reference to the storage
private Storage a;

// constructor
public Consumer(Storag e arm)
{
a = arm;
}

// entry point for the consumer thread
public void consume()
{
while(true)
{
// get the product value
int prod = a.Product;

// "consume" the product (pauses for the product's miliseconds)
Thread.Sleep(pr od);
Console.WriteLi ne("-- [" + Thread.CurrentT hread.Name + "] consumed " +
prod);

}
}
}

class TesteProdCons
{
static void Main(string[] args)
{
int numProducts;
int numProducers;
int numConsumers;
int capacity;

// read information from the user
Console.Write(" Max number of products: ");
numProducts = Int32.Parse(Con sole.ReadLine() );
Console.Write(" Number of producers: ");
numProducers = Int32.Parse(Con sole.ReadLine() );
Console.Write(" Numero of consumers: ");
numConsumers = Int32.Parse(Con sole.ReadLine() );
Console.Write(" Capacity of the storage buffer: ");
capacity = Int32.Parse(Con sole.ReadLine() );

// a single shared storage place
Storage a = new Storage(numProd ucts, capacity);

// one producer object for each producer thread,
// to have different random generators
Producer[] prod = new Producer[numProducers];
Thread[] tProd = new Thread[numProducers];

// only one consumer object for all consumer threads
Consumer c = new Consumer(a);
Thread[] tCons = new Thread[numConsumers];

Random r = new Random();

// create the producers objects and threads
for(int i = 0; i < numProducers; i++)
{
prod[i] = new Producer(a, r.Next(999999)) ;
tProd[i] = new Thread(new ThreadStart(pro d[i].produce));
tProd[i].Name = "p" + (i+1);
}

// create the consumers threads
for(int i = 0; i < numConsumers; i++)
{
tCons[i] = new Thread(new ThreadStart(c.c onsume));
tCons[i].Name = "c" + (i+1);
}

// start the threads
foreach (Thread t in tProd) {t.Start();}
foreach (Thread t in tCons) {t.Start();}

Console.WriteLi ne("Storage, producers and consumers created!");
}
}
}

Nov 15 '05 #2
> That's not a lot of information to go on. Have you checked in the debugger
to see if there are still active producer threads after the time when you
check? Try and look at those threads in VS in thread view and see what code they are sitting in. Maybe they're deadlocked? Also check your consumers and make sure that they're not skipping events..


Thanks for answering Rick. I am trying to debug it, though it's not easy
to debug thread applications. It switches from threads and it's difficult to
keep track. But I am trying to find out.

[]'s

Leonardo Hyppolito
Nov 15 '05 #3
Hi,

In the Storage.Product setter, you don't release the
semaphore when you reached the maximum number of
productions (where you test for n >= nMax).
The 'exclusive' semaphore counter will stay at 0, locking
everyone else out. I haven't tried it, but I'm pretty
sure that's the problem. So just call exclusive.v()
before aborting the producer threads. Keep me informed ?

regards,

Bram.

-----Original Message-----

Hello,

I am trying to write a multithread program that simulates producers andconsumers. My program can have many producers and many consumers (each in aseparate thread). It has a storage place (buffer) with "n" capacity. Theuser provides these parameters on startup. The buffer works with a circularqueue.

It's a console application. My implementation is working with Semaphoresto synchornize everything. I think it's synchornized OK, but the problem is:I tell it to produce 10 products, and it produces 10 products, but theconsumers consume only 8 (they should consume all the products). I can'tfind out why this happens.

Any help on this will be appreciated.

Thanks in advance!!!

Leonardo Hyppolito
here is the code:

It's also published (with syntax highlighting) here:

http://www.rafb.net/paste/results/u2946385.html
----

using System;
using System.Threadin g;

namespace TesteProdCons
{
public class Semaphore
{
private int counter;

// constructor
public Semaphore(int c)
{
counter = c;
}

public void p()
{
lock(this)
{
while(counter <= 0)
{
Monitor.Wait(th is, Timeout.Infinit e);
}

// we have control, decrement the counter
counter--;
}
}

public void v()
{
lock(this)
{
counter++;
Monitor.Pulse(t his);
}
}
}

// can hold 1 product at a time (buffer of 1 position)
public class Storage
{
// semaphores used for synchronization
private Semaphore notFull;
private Semaphore notEmpty;
private Semaphore exclusive;

// prodBox is the buffer that keeps the products
private int[] prodBox;
private int readIndex;
private int writeIndex;
private int capacity;

// actual product number
private static int n;

// max number of products to be produced
private static int nMax;

// property for n
public int Number
{
get {return n;}
set {n = value;}
}

// property for nMax
public int MaxNumber
{
get {return nMax;}
set {nMax = value;}
}

// writes a string representation of the storage
public override string ToString()
{
string ret = "";
for (int i = 0; i < capacity; i++)
{
ret = ret + prodBox[i] + " ";
}
ret = ret + "readIndex= " + readIndex + " writeIndex=" + writeIndex; return ret;
}
// constructor
public Storage(int max, int cap)
{
n = 0;
nMax = max;
notFull = new Semaphore(cap);
notEmpty = new Semaphore(0);
exclusive = new Semaphore(1);
prodBox = new int[cap];
capacity = cap;
readIndex = 0;
writeIndex = 0;
}

public int Product
{
get
{
// wait for a nonEmpty resource
notEmpty.p();

// wait for exclusive access
exclusive.p();

// read the product
int ret = prodBox[readIndex];

Console.WriteLi ne(" " + Thread.CurrentT hread.Name + " reads " + ret);
// set the new readIndex
readIndex = (readIndex + 1) % capacity;

// for debug
//Console.WriteLi ne(" " + Thread.CurrentT hread.Name + "--> " + this);
// release the exclusive access
exclusive.v();

// release a notFull resource
notFull.v();

return ret;
}
set
{
// wait for a notFull resource
notFull.p();

// wait for exclusive access
exclusive.p();

// if already reached maximum number of productions,
// abort the producer thread

if(n >= nMax)
{
Console.WriteLi ne("Aborting " + Thread.CurrentT hread.Name + " (reached max number of productions)");
Thread.CurrentT hread.Abort();
}

// store the product
prodBox[writeIndex] = value;

// set the new writeIndex
writeIndex = (writeIndex + 1) % capacity;

// increment the actual product number
n = n + 1;

// write information on screen
Console.WriteLi ne("++ [" + Thread.CurrentT hread.Name + "] produces n." +Number + ": " + value);
//Console.WriteLi ne(" " + Thread.CurrentT hread.Name + "--> " + this);
// release the exclusive access
exclusive.v();

// release a notEmpty resource
notEmpty.v();
}
}
}

public class Producer
{
// a reference to the storage
private Storage a;

// seed for the random
private int seed;

// constructor
public Producer(Storag e arm, int s)
{
a = arm;
seed = s;
}

// entry point for the producer thread
public void produce()
{
Random r = new Random(seed);
while(a.Number <= a.MaxNumber)
{
// get a random integer (from 0 to 2 seconds)
int prod = r.Next(2001);

// store the product
a.Product = prod;

// rest for a while...
Thread.Sleep(20 0);
}
}
}

public class Consumer
{
// a reference to the storage
private Storage a;

// constructor
public Consumer(Storag e arm)
{
a = arm;
}

// entry point for the consumer thread
public void consume()
{
while(true)
{
// get the product value
int prod = a.Product;

// "consume" the product (pauses for the product's miliseconds) Thread.Sleep(pr od);
Console.WriteLi ne("-- [" + Thread.CurrentT hread.Name + "] consumed " +prod);

}
}
}

class TesteProdCons
{
static void Main(string[] args)
{
int numProducts;
int numProducers;
int numConsumers;
int capacity;

// read information from the user
Console.Write(" Max number of products: ");
numProducts = Int32.Parse(Con sole.ReadLine() );
Console.Write(" Number of producers: ");
numProducers = Int32.Parse(Con sole.ReadLine() );
Console.Write(" Numero of consumers: ");
numConsumers = Int32.Parse(Con sole.ReadLine() );
Console.Write(" Capacity of the storage buffer: ");
capacity = Int32.Parse(Con sole.ReadLine() );

// a single shared storage place
Storage a = new Storage(numProd ucts, capacity);

// one producer object for each producer thread,
// to have different random generators
Producer[] prod = new Producer[numProducers];
Thread[] tProd = new Thread[numProducers];

// only one consumer object for all consumer threads
Consumer c = new Consumer(a);
Thread[] tCons = new Thread[numConsumers];

Random r = new Random();

// create the producers objects and threads
for(int i = 0; i < numProducers; i++)
{
prod[i] = new Producer(a, r.Next(999999)) ;
tProd[i] = new Thread(new ThreadStart(pro d [i].produce)); tProd[i].Name = "p" + (i+1);
}

// create the consumers threads
for(int i = 0; i < numConsumers; i++)
{
tCons[i] = new Thread(new ThreadStart(c.c onsume));
tCons[i].Name = "c" + (i+1);
}

// start the threads
foreach (Thread t in tProd) {t.Start();}
foreach (Thread t in tCons) {t.Start();}

Console.WriteLi ne("Storage, producers and consumers created!"); }
}
}
.

Nov 15 '05 #4
> In the Storage.Product setter, you don't release the
semaphore when you reached the maximum number of
productions (where you test for n >= nMax).
The 'exclusive' semaphore counter will stay at 0, locking
everyone else out. I haven't tried it, but I'm pretty
sure that's the problem. So just call exclusive.v()
before aborting the producer threads. Keep me informed ?


Bram, you are right!

I added a line to release to exclusive semaphore, in that aborting
section, and everything worked as expected.

Thanks a lot for the help :)

Cheers,

Leonardo Hyppolito
Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1305
by: Jeff | last post by:
IDE: VS .NET 2003 OS: XP pro sp2 I'm developing a server application, clients will connect to it over the net and start different tasks.... When people sends a command to the program, the command is first placed into ThreadPool for await processing... Here is the what I'm having problem with:
19
6728
by: trint | last post by:
Ok, I start my thread job: Thread t = new Thread(new ThreadStart(invoicePrintingLongRunningCodeThread)); t.IsBackground = true; t.Start(); There are lots of calls to controls and many happen in function calls from invoicePrintingLongRunningCodeThread. I need just an example in
5
1377
by: Ekempd | last post by:
Hi I need some advice about this situation an how I'm current handling it I hava a ASP.NET solution that in some point start multiples lenghty verification agains diferent databases, my big challenge is that the user click in a button "start process" and close the explorer windows... and in the backgroud all the required query are executed, when the user is back, maybe two hours late the process is finish .. I currently hadlle this...
6
1260
by: cj | last post by:
I have to take all records in a SQL db that have an empty val_code field and process and update the records with a code number in the val_code field. The processing is done by sending select info from each record to a remote server. The remote server returns the code number to be put in the val_code field. The remote server will allow me to have up to 5 "sessions" open with it at a time. I'm thinking each "session" will have to be in...
5
10849
by: not_a_commie | last post by:
So I have a motherboard with multiple CPU sockets. It seems that if I create a StopWatch on one thread and then call the Elapsed member from a different thread that sometimes I get a tick count that's a million miles away. My thinking is that I can subclass the StopWatch. Then when the Elapsed member is called, I can invoke it on the thread that the StopWatch class was created on. True? How? Or is there an easy way that I could scan...
5
2028
by: bean330 | last post by:
Hey, I'm somewhat new to C# and I need a little help, please! I'm selecting a bunch of records, setting properties on a COM executable and then calling a method on that executable to run. I want to run the executable in separate threads because they can be long-running and it would be optimal for us to run a bunch simultaneously. I've got that part working - it's pretty easy in C#. What I'm having a hard time with is managing the...
6
6868
by: Sergey Poberezovskiy | last post by:
I have the following code in C# that I have trouble converting to VB(2.0): private delegate void openDialog(); private void openWindowsDialog(openDialog open) { Thread thread = new Thread(new ThreadStart(open)); thread.SetApartmentState(ApartmentState.STA); thread.Start(); }
4
6828
by: joaotsetsemoita | last post by:
hello everyone. Im trying to time out a loot after a certain time. Probably 5 to 10 minutes. I have the following function Private Sub processFileCreation(ByVal source As Object, ByVal e As System.IO.FileSystemEventArgs) Dim strFilename As String = "c:\web\example.mdb"
3
2021
by: akshaycjoshi | last post by:
IT"S A LONG QUESTION.PLEASE BE PATIENT TO READ IT. I HAVE EXPLAINED IT TO MY MAXIMUM CAPACITY. I am making one app. in which i need to create a seperate access database for each day. Its a call charging software which monitors the calls made by extensions (just like the hotel rooms). Now there is GUI, in which there is richtextbox, a treview, and a menustrip. The treeview shows information about the all the extensions and others.
0
8750
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8662
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9244
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9111
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9004
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8961
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5922
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4679
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2439
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.