|
I Googled it and found this.[^]
It describes problem, but my table has a PK.
When I try to reference to table in code, it's not there.
Anyone know what's wrong?
If it's not broken, fix it until it is
|
|
|
|
|
Could be any one of a million things. Please try and be a bit more specific about what you are doing and what results you see.
Veni, vidi, abiit domum
|
|
|
|
|
There's nothing else to tell.
I drag a table from Server Explorer into the DBML Designer but it doesn't show in code.
If it's not broken, fix it until it is
|
|
|
|
|
|
Lo
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Any way the wind blows
Nothing really matters to me
|
|
|
|
|
to me.
Mama, just killed a man
Put a gun against his head
|
|
|
|
|
Pulled my trigger
Now he's dead
|
|
|
|
|
Mama, life had just begun
But now I've gone and thrown it all away
|
|
|
|
|
Mama. Ooo ooh oo oooooo
Didn't mean to make you cry.
|
|
|
|
|
If I'm not back again this time tomorrow
Carry on, carry on, as if nothing really matters
|
|
|
|
|
Look Here[^]
Keep Clam And Proofread
--
√(-1) 23 ∑ π...
And it was delicious.
|
|
|
|
|
I got this piece of code from, I know not where, as a recommended way to write to a file.
using (FileStream fs = new FileStream(fileName, FileMode.Create, FileAccess.Write))
{
StreamWriter sw = new StreamWriter(fs);
sw.Write(textBox1.Text);
sw.Close();
}
Any thoughts?
|
|
|
|
|
electriac wrote: Any thoughts? My first thought is, "what is your question"?
Veni, vidi, abiit domum
|
|
|
|
|
Does this appear to be correct?
|
|
|
|
|
Appearances can be deceiving. Why not test it for yourself to see what happens, you may be surprised at what you can learn that way.
Veni, vidi, abiit domum
|
|
|
|
|
The term "correct" would be dependent upon the codes overall purpose. Since we know nothing of what you're doing or why, it's impossible to answer the question.
|
|
|
|
|
electriac wrote: Any thoughts? Not only the stream is disposable, but also the streamwriter.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
Hi,
I've been playing around with multi-threaded code, setting affinity on different threads, etc... In my particular application, I have noticed performance is actually better when avoiding running threads concurrently on certain processors.
To be more precise, I have an hyper-threaded CPU and when assigning work to both logical processing units inside a core, it takes longer to run. Perhaps my code isn't optimized, but that's besides the point.
So my question is: How can I detect which two (or more, I'd like to be future proof here) logical processing units are from the same core?
I've done some research online and found some information that has lead me to believe CPU0 and CPU1 would be from the same core and CPU2 and CPU3 from the other one, in an hyper-threaded dual core CPU. But my testing is telling me otherwise (CPU0/CPU2 and CPU1/CPU3).
Thanks in advance!
Nic
|
|
|
|
|
Nicolas Légaré wrote: Perhaps my code isn't optimized, but that's besides the point. Show us the code. Parallel code is hard, and an inefficient implementation will always be slower. Task switching has it's overhead.
Nicolas Légaré wrote: I have noticed performance is actually better when avoiding running threads concurrently on certain processors. Windows uses threads a lot, so I'd expect it to be quite optimized. What processor are you seeing this on, do you have an example app that reproduces the problem?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi Eddy,
Thanks for replying.
I have since fixed up my code, it had issues with terminating threads. It's much faster now with both sides of the core running.
As an exercice though, how could I detect which logical processing units are part of one core? I was able to run a CPU stress test to test two CPUs at one, the results can tell me which two CPUs make up both sides of each core. This test takes a while to run, it'd be nice to have a simple API to call to get this.
Thanks
Nic
|
|
|
|
|
Hello everybody!
Im trying to do a Form Designer on C#, looked all over the web for this...Found an project using a custom dll, but i just want to know how to put the snaplines (that lines who helps a lot to align controls like in Visual Studio) on my form with my dinamically controls.. Someone could help me?
thanks!
Rafael
|
|
|
|
|
This is unclear, are you hosting the Windows Forms designer and you want to know how to show the snaplines?
Or...
Are you trying to design your forms runtime and you want to show snaplines?
Or...
Are you using custom controls in Visual Studio and you want your controls to participate in snaplines?
|
|
|
|
|
Sorry Ron..
Im making a form designer that uses dinamically created controls..like a textbox... In this form the user can move the controls like he wants.. And i want to put these snaplines to make alignment easier...
regards,
Rafael
|
|
|
|