473,413 Members | 1,731 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Set up Display on status line with Threading

I have a Windows App that is doing some work and then writing a "Now
Processing..." line to the status line of the window as well as the Textbox
on the form.

But the problem is that the work is in another class from the main class.
So it couldn't access the Status Line or textbox.

So what we did was set them up as properties:

string IStatusDisplay.Status
{
get
{
return Status.Text;
}
set
{
Status.Text = value;
}
}

string IStatusDisplay.StatusBar
{
get
{
return toolStripStatusLabel1.Text;
}
set
{
toolStripStatusLabel1.Text = value;
this.Refresh();
}
}

Then in my code I would call it like:

Maintenance.CheckAll(this);

And the function is:

public static void CheckAll(IStatusDisplay display)
{
...
display.StatusBar = "Now Processing... " +
Path.GetFileName(file);

display.Status += file + Environment.NewLine;

}

This works fine until you try to set it up and call it from a thread - for
one thing you can't use the this.Refresh() because you get an error:

this.Refresh();

Gets me this error:

Cross-thread operation not valid: Control 'FieldNameMapSetup'
accessed from a thread other than the thread it was created on.

Here I am in another function doing a - "display.StatusBar". It is
executing the above property until it hits the "this" statement.

or if you access a button on the page like:

btnExit.Enabled = true;

I get the error:
Cross-thread operation not valid: Control 'btnExit' accessed
from a thread other than the thread it was created on.

I am trying to find out how to access the controls on the Form from either
the same class or a different class (which was why we were passing "this" to
the other class).

This all works fine until you put it in a thread.

Thanks,

Tom
Oct 11 '08 #1
9 4080
On 11 Oct, 06:23, "tshad" <t...@dslextreme.comwrote:
I have a Windows App that is doing some work and then writing a "Now
Processing..." line to the status line of the window as well as the Textbox
on the form.

But the problem is that the work is in another class from the main class.
So it couldn't access the Status Line or textbox.

So what we did was set them up as properties:

* * * * string IStatusDisplay.Status
* * * * {
* * * * * * get
* * * * * * {
* * * * * * * * return Status.Text;
* * * * * * }
* * * * * * set
* * * * * * {
* * * * * * * * Status.Text = value;
* * * * * * }
* * * * }

* * * * string IStatusDisplay.StatusBar
* * * * {
* * * * * * get
* * * * * * {
* * * * * * * * return toolStripStatusLabel1.Text;
* * * * * * }
* * * * * * set
* * * * * * {
* * * * * * * * toolStripStatusLabel1.Text = value;
* * * * * * * * this.Refresh();
* * * * * * }
* * * * }

Then in my code I would call it like:

* * * *Maintenance.CheckAll(this);

And the function is:

* * * * public static void CheckAll(IStatusDisplay display)
* * * * {
* * * * * * ...
* * * * * * * * display.StatusBar = "Now Processing... " +
Path.GetFileName(file);

* * * * * * * * display.Status += file + Environment.NewLine;

* * * * }

This works fine until you try to set it up and call it from a thread - for
one thing you can't use the this.Refresh() because you get an error:

* * * * * * * * this.Refresh();

Gets me this error:

* * * * Cross-thread operation not valid: Control 'FieldNameMapSetup'
accessed from a thread other than the thread it was created on.

Here I am in another function doing a - "display.StatusBar". *It is
executing the above property until it hits the "this" statement.

or if you access a button on the page like:

* * * * * * btnExit.Enabled = true;

I get the error:
* * * * * * Cross-thread operation not valid: Control 'btnExit' accessed
from a thread other than the thread it was created on.

I am trying to find out how to access the controls on the Form from either
the same class or a different class (which was why we were passing "this"to
the other class).

This all works fine until you put it in a thread.

Thanks,

Tom
As a solution to getting the status from one class to another use
events. The event notifies the form (or any other classes using the
class) of the status change. Call a method to trigger the event.. e.g.
OnStatusChanged()

Your class would contain an event something like this....

public event EventHandler StatusChanged;
private void OnStatusChanged()
{
EventHandler handler = StatusChanged;

if(handler != null)
{
EventArgs args = new EventArgs();
handler(this, args);
}
}

Your form code will look something like this. Where you instantiate
the class subscribe to the event.

.....
MyClass class = new MyClass();
class.StatusChanged += new
StatusChangedEventHandler(class_StatusChangedEvent Handler);
....
}

private void class_StatusChangedEventHandler(object sender, EventArgs
e)
{
this.lblStatus.Text = ((MyClass)sender).Status;
}
Oct 11 '08 #2
On Fri, 10 Oct 2008 22:23:06 -0700, tshad <tf*@dslextreme.comwrote:
[...]
I get the error:
Cross-thread operation not valid: Control 'btnExit' accessed
from a thread other than the thread it was created on.

I am trying to find out how to access the controls on the Form from
either
the same class or a different class (which was why we were passing
"this" to
the other class).

This all works fine until you put it in a thread.
That's because you need to use Control.Invoke() or Control.BeginInvoke()
to execute the code that actually has to touch the control itself.

The other reply doesn't really address this. That reply is not a lot
different from your own attempt to solve the issue with a property, in
that it's just an alternate route to the same code, ultimately with the
same problem: it will try to interact with the control from a thread other
than the one that owns that control.

Without a concise-but-complete code sample to work with, it's difficult to
propose a precise change for your particular scenario. But, as an
example, you might modify your IStatusDisplay.Status property so that it
looks like this:

string IStatusDisplay.Status
{
get
{
return (string)Status.Invoke((MethodInvoker)delegate {
return Status.Text; });
}
set
{
Status.Invoke((MethodInvoker)delegate { Status.Text =
value });
}
}

That will ensure that the code inside the getter and setter that actually
interacts with the control instance is always executed on the same thread
that created your Status control instance.

You can apply a similar approach everywhere that you need to access
Control instances from a worker thread.

By the way, I note that your code actually uses the getter for the Status
property. Again, without a concise-but-complete code sample it's
difficult to make precise statements, but on the face of it this looks
like something that might be a performance issue. In particular, because
of the need to use Control.Invoke(), you tie the execution paths of your
two threads together, preventing them from working independently.

You might find that it makes more sense for the code that's actually
changing the status to maintain its own cache of the current status
string, and then just set that on the Status control. At a minimum, that
would get rid of one synchronizing round-trip, and you could even use
Control.BeginInvoke() in the setter, avoiding synchronization issues there
too.

Pete
Oct 11 '08 #3

"Peter Duniho" <Np*********@nnowslpianmk.comwrote in message
news:op***************@petes-computer.local...
On Fri, 10 Oct 2008 22:23:06 -0700, tshad <tf*@dslextreme.comwrote:
>[...]
I get the error:
Cross-thread operation not valid: Control 'btnExit' accessed
from a thread other than the thread it was created on.

I am trying to find out how to access the controls on the Form from
either
the same class or a different class (which was why we were passing
"this" to
the other class).

This all works fine until you put it in a thread.

That's because you need to use Control.Invoke() or Control.BeginInvoke()
to execute the code that actually has to touch the control itself.

The other reply doesn't really address this. That reply is not a lot
different from your own attempt to solve the issue with a property, in
that it's just an alternate route to the same code, ultimately with the
same problem: it will try to interact with the control from a thread other
than the one that owns that control.

Without a concise-but-complete code sample to work with, it's difficult to
propose a precise change for your particular scenario. But, as an
example, you might modify your IStatusDisplay.Status property so that it
looks like this:
[snip]

Ok, here is a stripped down sample that consists of 3 buttons, a textbox,
statusbar and toolStripStatusLabel.

I have 2 files (form1 and Maintenance). In form1 I am calling a function in
Maintenance that just writes to the textbox and the toolStripStatusLabel.
The first button calls the function without a thread and the second with a
thread.

I also have a this.Refresh() in the code to display on the page correctly
when not running in the thread, but in the thread it gives me the error:

Cross-thread operation not valid: Control 'Form1' accessed from a thread
other than the thread it was created on.

If I comment it out, and run the threading, I get the following when the
program tries to write to the textbox (Status) from the Maintenance
function:

display.Status += file + Environment.NewLine;

Calls this to set the value

set
{
Status.Text = value;
}
And get the error:

Cross-thread operation not valid: Control 'Status' accessed from a
thread other than the thread it was created on.

but I don't get the error when setting the toolStripStatusLabel from the
Maintenance function:

display.StatusBar = "Now Processing... " + file;

Why is that? They are both using the "this" that was passed.

Just trying to understand the different ways to do this so I can choose the
right way in other situations as well.

The 3 files in my project are:
form1.cs
************************************************** **
using System;
using System.Threading;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ControlAccessAcrossClasses
{
public partial class Form1 : Form, IStatusDisplay
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
toolStripStatusLabel1.Text = "This is a test";
}

#region IStatusDisplay Members

string IStatusDisplay.Status
{
get
{
return Status.Text;
}
set
{
Status.Text = value;
}
}

string IStatusDisplay.StatusBar
{
get
{
return toolStripStatusLabel1.Text;
}
set
{
toolStripStatusLabel1.Text = value;
//this.Refresh();
}
}
#endregion

private void WithoutThreadButton_Click(object sender, EventArgs e)
{
Maintenance.CheckAll(this);
}

private void WithThreadButton_Click(object sender, EventArgs e)
{
Thread oThread = new Thread(new ThreadStart(CallWithThread));
oThread.Start();
}

private void CallWithThread()
{
Maintenance.CheckAll(this);
}

private void Exit_Click(object sender, EventArgs e)
{
Application.Exit();
}
}
}
************************************************** *************
maintenance.cs
************************************************** ************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ControlAccessAcrossClasses
{
class Maintenance
{
public static void CheckAll(IStatusDisplay display)
{
String file = "12345.txt";
display.StatusBar = "Now Processing... " + file;
display.Status += file + Environment.NewLine;
}

}
public interface IStatusDisplay
{
string Status { get; set; }
string StatusBar { get; set; }
}
}
************************************************** ************

And the form1.designer.cs
************************************************** ***********
namespace ControlAccessAcrossClasses
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be
disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Windows Form Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Status = new System.Windows.Forms.TextBox();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabel1 = new
System.Windows.Forms.ToolStripStatusLabel();
this.WithThreadButton = new System.Windows.Forms.Button();
this.WithoutThreadButton = new System.Windows.Forms.Button();
this.Exit = new System.Windows.Forms.Button();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
//
// Status
//
this.Status.Location = new System.Drawing.Point(30, 12);
this.Status.Multiline = true;
this.Status.Name = "Status";
this.Status.Size = new System.Drawing.Size(364, 286);
this.Status.TabIndex = 0;
//
// statusStrip1
//
this.statusStrip1.Items.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabel1});
this.statusStrip1.Location = new System.Drawing.Point(0, 347);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(495, 22);
this.statusStrip1.TabIndex = 1;
this.statusStrip1.Text = "statusStrip1";
//
// toolStripStatusLabel1
//
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
this.toolStripStatusLabel1.Size = new System.Drawing.Size(0,
17);
//
// WithThreadButton
//
this.WithThreadButton.Location = new System.Drawing.Point(187,
316);
this.WithThreadButton.Name = "WithThreadButton";
this.WithThreadButton.Size = new System.Drawing.Size(90, 23);
this.WithThreadButton.TabIndex = 2;
this.WithThreadButton.Text = "With Thread";
this.WithThreadButton.UseVisualStyleBackColor = true;
this.WithThreadButton.Click += new
System.EventHandler(this.WithThreadButton_Click);
//
// WithoutThreadButton
//
this.WithoutThreadButton.Location = new System.Drawing.Point(30,
316);
this.WithoutThreadButton.Name = "WithoutThreadButton";
this.WithoutThreadButton.Size = new System.Drawing.Size(114,
23);
this.WithoutThreadButton.TabIndex = 3;
this.WithoutThreadButton.Text = "Without Thread";
this.WithoutThreadButton.UseVisualStyleBackColor = true;
this.WithoutThreadButton.Click += new
System.EventHandler(this.WithoutThreadButton_Click );
//
// Exit
//
this.Exit.Location = new System.Drawing.Point(318, 316);
this.Exit.Name = "Exit";
this.Exit.Size = new System.Drawing.Size(75, 23);
this.Exit.TabIndex = 4;
this.Exit.Text = "Exit";
this.Exit.UseVisualStyleBackColor = true;
this.Exit.Click += new System.EventHandler(this.Exit_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(495, 369);
this.Controls.Add(this.Exit);
this.Controls.Add(this.WithoutThreadButton);
this.Controls.Add(this.WithThreadButton);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.Status);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();

}

#endregion

private System.Windows.Forms.TextBox Status;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel
toolStripStatusLabel1;
private System.Windows.Forms.ToolStripStatusLabel
toolStripStatusLabel2;
private System.Windows.Forms.Button WithThreadButton;
private System.Windows.Forms.Button WithoutThreadButton;
private System.Windows.Forms.Button Exit;
}
}
************************************************** ************

Not sure why there are 2 "partial class form1" classes.

Thanks,

Tom
Oct 12 '08 #4
On Sat, 11 Oct 2008 20:51:06 -0700, tshad <tf*@dslextreme.comwrote:
[...]
Cross-thread operation not valid: Control 'Status' accessed from a
thread other than the thread it was created on.

but I don't get the error when setting the toolStripStatusLabel from the
Maintenance function:

display.StatusBar = "Now Processing... " + file;

Why is that? They are both using the "this" that was passed.
The cross-thread exception doesn't have anything to do with what objects
or methods are used per se. The same method accessing the same object
would not throw the exception if executed on one thread (the thread that
owns the object), and yet would throw the exception if executed on a
different thread.
Just trying to understand the different ways to do this so I can choose
the
right way in other situations as well.
I'm sorry. Other than the above that I commented on, I didn't see
anything appreciably different in your most recent post as compared to the
previous one, except for the code. I did make an attempt to answer the
question; did you consider that answer at all? If you did and it wasn't
applicable, you should explain why. If you didn't, then you should.

Pete
Oct 12 '08 #5

"Peter Duniho" <Np*********@nnowslpianmk.comwrote in message
news:op***************@petes-computer.local...
On Sat, 11 Oct 2008 20:51:06 -0700, tshad <tf*@dslextreme.comwrote:
>[...]
Cross-thread operation not valid: Control 'Status' accessed from a
thread other than the thread it was created on.

but I don't get the error when setting the toolStripStatusLabel from the
Maintenance function:

display.StatusBar = "Now Processing... " + file;

Why is that? They are both using the "this" that was passed.

The cross-thread exception doesn't have anything to do with what objects
or methods are used per se. The same method accessing the same object
would not throw the exception if executed on one thread (the thread that
owns the object), and yet would throw the exception if executed on a
different thread.
>Just trying to understand the different ways to do this so I can choose
the
right way in other situations as well.

I'm sorry. Other than the above that I commented on, I didn't see
anything appreciably different in your most recent post as compared to the
previous one, except for the code. I did make an attempt to answer the
question; did you consider that answer at all? If you did and it wasn't
applicable, you should explain why. If you didn't, then you should.
I sent the example because you said it would help if you had a better
example: "Without a concise-but-complete code sample to work with, it's
difficult to propose a precise change for your particular scenario.

I did try your example, but got a couple of errors on the get:

Since 'System.Windows.Forms.MethodInvoker' returns void, a return keyword
must not be followed by an object expression

Cannot convert anonymous method to delegate type
'System.Windows.Forms.MethodInvoker' because some of the return types in the
block are not implicitly convertible to the delegate return type

I also got a semicolon error on the Set. Not sure why, it looks correct.
It expects a semicolon before the last parenthesis.

string IStatusDisplay.Status
{
get
{
return (string)Status.Invoke((MethodInvoker)delegate {
return Status.Text; });
//return Status.Text;
}
set
{
Status.Invoke((MethodInvoker)delegate { Status.Text =
value });
//Status.Text = value;
}
}

Thanks,

Tom
Pete

Oct 13 '08 #6
JTC^..^ wrote:
On 11 Oct, 06:23, "tshad" <t...@dslextreme.comwrote:
>I have a Windows App that is doing some work and then writing a "Now
Processing..." line to the status line of the window as well as the
Textbox on the form.

But the problem is that the work is in another class from the main
class. So it couldn't access the Status Line or textbox.

So what we did was set them up as properties:

string IStatusDisplay.Status
{
get
{
return Status.Text;
}
set
{
Status.Text = value;
}
}

string IStatusDisplay.StatusBar
{
get
{
return toolStripStatusLabel1.Text;
}
set
{
toolStripStatusLabel1.Text = value;
this.Refresh();
}
}

Then in my code I would call it like:

Maintenance.CheckAll(this);

And the function is:

public static void CheckAll(IStatusDisplay display)
{
...
display.StatusBar = "Now Processing... " +
Path.GetFileName(file);

display.Status += file + Environment.NewLine;

}

This works fine until you try to set it up and call it from a thread
- for one thing you can't use the this.Refresh() because you get an
error:

this.Refresh();

Gets me this error:

Cross-thread operation not valid: Control 'FieldNameMapSetup'
accessed from a thread other than the thread it was created on.

Here I am in another function doing a - "display.StatusBar". It is
executing the above property until it hits the "this" statement.

or if you access a button on the page like:

btnExit.Enabled = true;

I get the error:
Cross-thread operation not valid: Control 'btnExit' accessed
from a thread other than the thread it was created on.

I am trying to find out how to access the controls on the Form from
either the same class or a different class (which was why we were
passing "this" to the other class).

This all works fine until you put it in a thread.

Thanks,

Tom

As a solution to getting the status from one class to another use
events. The event notifies the form (or any other classes using the
class) of the status change. Call a method to trigger the event.. e.g.
OnStatusChanged()

Your class would contain an event something like this....

public event EventHandler StatusChanged;
private void OnStatusChanged()
{
EventHandler handler = StatusChanged;

if(handler != null)
{
EventArgs args = new EventArgs();
handler(this, args);
}
}

Your form code will look something like this. Where you instantiate
the class subscribe to the event.

....
MyClass class = new MyClass();
class.StatusChanged += new
StatusChangedEventHandler(class_StatusChangedEvent Handler);
...
}

private void class_StatusChangedEventHandler(object sender, EventArgs
e)
{
this.lblStatus.Text = ((MyClass)sender).Status;
}
Not sure how I would do this.

In my sample, that I sent to Peter, I have form1.cs where the objects reside
(Status being a TextBox). So that the code looks something like:
***************************************
namespace ControlAccessAcrossClasses
{
public partial class Form1 : Form, IStatusDisplay
{
public Form1()
{
InitializeComponent();
}

public event EventHandler StatusChanged;
private void OnStatusChanged()
{
EventHandler handler = StatusChanged;

if (handler != null)
{
EventArgs args = new EventArgs();
handler(this, args);
}
}
********************************

Not sure where I would put the other code.

Also, how does the other class from the thread access this control?

Thanks,

Tom
Oct 13 '08 #7
On Sun, 12 Oct 2008 20:18:51 -0700, tshad <tf*@dslextreme.comwrote:
[...]
I did try your example, but got a couple of errors on the get:

Since 'System.Windows.Forms.MethodInvoker' returns void, a return keyword
must not be followed by an object expression
Sorry. That's my fault. Been operating on only half cylinders lately. :(

Anyway, the error happens because I used the "MethodInvoker" delegate type
for an anonymous method that returns a value. The signatures don't match.

If you're using .NET 3.5, try "Func<string>" instead of "MethodInvoker".
[...]
I also got a semicolon error on the Set. Not sure why, it looks correct.
It expects a semicolon before the last parenthesis.
You are missing a semi-colon after the word "value". Also my fault.

I should have warned you that I hadn't actually compiled the code I
posted. That said, you should practice the techniques more so that you're
able to fix little mistakes like that yourself in the future. :)

Pete
Oct 13 '08 #8

"Peter Duniho" <Np*********@nnowslpianmk.comwrote in message
news:op***************@petes-computer.local...
On Sun, 12 Oct 2008 20:18:51 -0700, tshad <tf*@dslextreme.comwrote:
>[...]
I did try your example, but got a couple of errors on the get:

Since 'System.Windows.Forms.MethodInvoker' returns void, a return keyword
must not be followed by an object expression

Sorry. That's my fault. Been operating on only half cylinders lately.
:(

Anyway, the error happens because I used the "MethodInvoker" delegate type
for an anonymous method that returns a value. The signatures don't match.

If you're using .NET 3.5, try "Func<string>" instead of "MethodInvoker".
Actually, I am using VS 2005 for the actual program.
>
>[...]
I also got a semicolon error on the Set. Not sure why, it looks correct.
It expects a semicolon before the last parenthesis.

You are missing a semi-colon after the word "value". Also my fault.

I should have warned you that I hadn't actually compiled the code I
posted. That said, you should practice the techniques more so that you're
able to fix little mistakes like that yourself in the future. :)
That is what I am doing.

Trying to look at the different options to get a better handle on when and
where to use each.

Thanks,

Tom
>
Pete

Oct 13 '08 #9
On Sun, 12 Oct 2008 22:30:10 -0700, tshad <tf*@dslextreme.comwrote:
>If you're using .NET 3.5, try "Func<string>" instead of "MethodInvoker".

Actually, I am using VS 2005 for the actual program.
Okay. Well, you can declare the Func<Tdelegate yourself:

delegate T Func<T>();

Or just declare a non-generic delegate for that specific use:

delegate string StringFunc();

Pete
Oct 13 '08 #10

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

Similar topics

9
by: Brian Roberts | last post by:
I have a command line Python program that sometimes takes a bit (several minutes) to run. I want to provide an optional method for an impatient user (me!) to check the status of the program. The...
3
by: William Park | last post by:
(Cross-posted because I use Mozilla Firefox, but I think it's also CSS issue.) Usually when I move mouse over a link, the URL is displayed at the bottom on "status line". On some website,...
3
by: bygandhi | last post by:
Hi - I am writing a service which will check a process and its threads for their state ( alive or dead ). The process has 5 .net managed threads created using thread.start and each have been...
4
by: Mike L | last post by:
Error occurs on "System.Deployment.Application.ApplicationDeployment.CurrentDeployment" ** Here is my code private void frmMain_Load(object sender, System.EventArgs e) {...
8
by: nickyeng | last post by:
I have written 3 files, i dont know whether i do it correctly or wrongly but somehow it compiled well and can run. My simple aim is to display the terrain.txt file into the terrain array, and then...
3
by: WSPL5 | last post by:
I have a hidden span within a table column and I cannot unhide it using style.display='block' ?? Sample code <table> <tr> <td><input name="status" value=""></td><td><input type="button"...
9
by: tomhawkins1 | last post by:
Hi I currently have a site where users can upload files. These files can be doc, wmv, jpeg, xls, dwf, dwf and dwg. These files are uploaded to /home/**user**/uploads and not /home/...
5
by: futileissue | last post by:
Beginner, so please bare with me. I'm not sure what to call what it is I'm looking for. If I have an object class, let's call it "Creature": class Creature: def __init__(self, status):...
0
by: Edwin.Madari | last post by:
updated creature running in its own thread will get you started. try it foryourself, change sleep times per your need. import os, sys, threading, time class Creature: def __init__(self,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
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...

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.