|
Hi guys,
I'm having following situation:
private function DoSomething(){<br />
int x = 6257;<br />
<br />
CheckSomething();<br />
Myclass.UseX(ref x, somethernr1);<br />
Myclass.UseX(ref x, somethernr2);<br />
Myclass.UseX(ref x, somethernr3);<br />
Myclass.UseX(ref x, somethernr4);<br />
...<br />
Myclass.UseX(ref 6257, somethernrN);<br />
}<br />
<br />
Checksomething(){<br />
int x = 7834;<br />
Myclass.UseX(ref x, somethernr1);<br />
...<br />
Myclass.UseX(ref x, somethernrM);<br />
}
Is it possible that after CheckSomething() the x value in DoSomething() has changed?
(PS: There is something that sometimes locks up the application, we can't reproduce it and we're trying to figure out where it is (via logfiles, can't debug).)
Thanks.
|
|
|
|
|
|
My thoughts exactly, but I'm trying all possibilities here .
And what if x was also (3d function) set in another thread? (timer).
|
|
|
|
|
Both x variables are local to their method, so they are unique for each specific method call regardless of which thread is doing the call. Local variables are allocated on the stack, and each thread have it's own stack. Local variables are only accessible by name inside their own method, outside the method they are never accessible by name, only if the method exposes a reference to the variable.
---
b { font-weight: normal; }
|
|
|
|
|
yep, in theory it is, anyway I changed the variable just to be sure, but to tell the truth, it's probably not that. We just don't know what's going wrong... Hope we can find it with some extra logging.
tnx.
|
|
|
|
|
|
lol, I don't smoke
|
|
|
|
|
How to create hyperlink column in datagrid (without asp .net)
io
|
|
|
|
|
DataGridViewLinkColumn
This class will help you in creating hyperlink column in datagrid.
|
|
|
|
|
Hi,
this is probably just a simple question, but I cant figure it out.
I want to change my tabpage font color when it is selected tab. Raised an selectedindexchanged event but cant change tabpage font color.. How can I do this ?? I just to want change font color that as specified in text property of tabPage ...
thanx.
meTin.eRGoktas
|
|
|
|
|
Good day.
I've set-up my SQL 2005 Express server to run on my local machine. What I want to do is develop an application that makes use of an embedded database. What I mean by this is my database must be distributed with each copy of the application. The application is not multi-user and needs to run local machine only, so as I understand it I don't need to intall a server on each client machine to do database handling. Am I right, or must I install the Express server on each client machine?
I would like to use SQL Express as it's easily embedded into Visual Studio 2005 and has a properly working visual interface. Foreign key constrains is a must have(as always). I have great difficulty in finding help on the net with regards to this.
Can someone please help me or explain to me how I can make my database embeddable? Self explanation or website reverences will be greatly appreciated.
Thank you in advance
ASBESTOS-Greetings
LiquidE
|
|
|
|
|
hmm not sure, but it could be the SQL native client is a solution.
When connection using a udl file i can give for "SQL native client" only path and file to acces the SQL 2005 database...
hope it helps..
Greetz
kurt.
|
|
|
|
|
Using SQL Express will require your end-users to install an instance of SQL Express on their machine. Programatically, you access the database the same way you would as if you were developing to a "normal" (full) SQL Server 2005 installation.
If you want a database that is actually embedded (in other words, has a minimal footprint and does not require a separate install) you should look at SQL Server 2005 Everywhere Edition[^] (also called SQL Mobile) which is also a file based database that allows you to scale up to (and integrate with) SQL Server 2005 when necessary.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
How to get Computer's HDD ID,ProcessorID,ProcessorSpeed,MainBoard Model &ID?
Thanks,
K.Alex
|
|
|
|
|
I believe such tasks can't be achieved using a high language as C#. You have to go low level and be a bit hardware specific. Most of your queries -Computer's HDD ID,ProcessorID, MainBoard Model &ID- can be done by reading the system's BIOS using Assembly code. You could also take a look at WMI (Windows Management Instrumentation) in this link[^].
Regards
|
|
|
|
|
Please tell me how to show a form only once ?
Form frm=new MyForm();
frm.show();
this code will open new form each time I am calling it.
thank you
|
|
|
|
|
try showDialog() instead of show().
I don't know if this will work, but try it.
ASBESTOS-Greetings
LiquidE
|
|
|
|
|
If you don't know if it'll work, then why bother posting? Tat like that devalues the usefulness of the forums.
|
|
|
|
|
If you define a member variable in your class, then you can test whether the member is null or not to decide whether to show the form:-
class MyClass
{
...
MyForm m_frm;
public void OnButton1Click(object sender, EventArgs e)
{
if (m_frm == null)
{
m_frm = new MyForm();
m_form.Show();
}
}
}
The problem with that is that if the user closes the form, they'll not be able to reopen it. To do that you'd need to handle the form's Closing event, and set the m_frm reference to null.
|
|
|
|
|
Does anybody how to generate numbers according to a gaussian (or Normal) distribution?
I read something about RandomNumberGenerator Class but I don´t find anything about gaussian distributions
Thanks a lot
Kurtz
|
|
|
|
|
I'v published an article on .NET random number generators and distributions[^] here CP. Amongst others it provides an implementation of a normal distribution. Hope it will help you
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Does anybody how to generate numbers according to a gaussian (or Normal) distribution?
I read something about RandomNumberGenerator Class but I don´t find anything about gaussian distributions
Thanks a lot
Kurtz
|
|
|
|
|
|
Hi,
All my auto-generated classes are Public by default. Is it possible to make some of them internal by default?
If I edit the code manually it will get auto-generated when I change the dataset, which I don't want to happen.
Any help much appreciated.
Andrew
|
|
|
|
|
hi,
i hv to use the rownumber(rowindex) to fetch a row from database.i was trying to use LIMIT keyword for this.but it didn't work.(i.e i th row from database).
please help me .
iam using VISUAL STUDIO 2005.
|
|
|
|