I just want to keep the DVD spinning in the DVD ROM drive once the disc is inserted.
My only purpose is to reduce the disc spin up time when the user finally wishes to play the DVD at some later point in time.
Users can choose whether s/he wants to prevent the disc from spinning down.
So, the question really is how can I change the sp...
I know there is the SecureString class, but for most scenarios I don't think it's really useful.
For example, let's say I have a client/server system. The server doesn't need an application made by me, it could be even SQL Server without integrated authentication. When the user enters his password on a form in the client app, it's store...
Possible Duplicate:
Comparing two collections for equality
I need to verify if two IEnumerable<T> lists have the same elements, not necessarily in the same order.
I'm targetting .NET 3.5.
Here are the tests. The question is, how should HasSameElements() be implemented?
var l1 = new[]{1,2,3};
var l2 = new[]{3,1,2};
bool rez...
Hello,
I have a VS2008 web project with a EF1 datamodel. Now I have converted this to a VS2010 project with .Net 4. My question is about the Entity Framework. How can I see what version of EF it is. Or how can I make sure it is EF 4?
...
Hi,
I've this simple Entities from DB tables
But i want my POCO classes to be just two classes:
public class Country
{
public string ID { get; set; }
public string Name { get; set; }
public string LocalName { get; set; } // this localized
public string Region { get; set; }
public IEnumerable<City> Cities { get;...
Hello,
I am interested in using F# for numerical computation. How can I access the GPU using NVIDIA's CUDA standart under F#?
...
We've built a windows service which uses some COM+ components (developed by us). It runs on a Windows server (virtual through vmware) and something is eating memory.
Memory check
I did a small application which runs through all Process.GetProcesses and return their total memory usage:
First run:
C:\Temp>ProcessExplorer.exe
Virtual: 1...
We get the error "Attempted to read or write protected memory" when receiving a file via FTP on BizTalk Server 2006 R2 with service pack 1. We are running a 64-bit Windows 2003 Server but the host is configured for 32-bit.
Here's the full error message:
There was a failure executing the receive pipeline: (myPipeline) Source: "Pipeline ...
Hi!
I need to save Bitmap object loaded from image file (.png, .jpeg, .bmp) and save it as an icon (.ico) to a separate file.
First I tried saving Bitmap object to a file with Icon ImageFormat:
using System.Drawing;
Bitmap bmp = (Bitmap)pictureBox1.Image;
bmp.Save(@"C:\icon.ico", Imaging.ImageFormat.Icon);
This one fails, as the ic...
Hi,
My question is why do I need IDisposable? I have a class that consumes some resources
that need to be freed. I have two options
Without IDisposable
class SomeUtilityClass
{
public Stop()
{
// free resources
}
}
With IDisposable
class SomeUtilityClass, IDisposable
{
public void Dispose()
{
// free ...
I know I can read the PE specification in order to write a code that does this.
However, since I don't have a lot of time on my hands, I was hoping some of you might already have such a code sample ready to send.
Important note: Is there any difference between 32bit and 64bit?
Thank you for your time!
...
how to connect to remote server's folder and pass user credentials to gain rights to r/W and delete files in that folder? I am using .net 3.5 (C#)
...
How can I update the value of tags in an XML file using System.Xml?
...
Hello
I need list IP addresses of all connected hosts in my LAN.
What is the simpliest way to do this?
...
I am trying to display tooltip for items in combobox. I tried this code in combobox selected index changed event but it does not work as expected.
ToolTip toolTip1 = new ToolTip();
toolTip1.AutoPopDelay = 5;
toolTip1.InitialDelay = 0;
toolTip1.ReshowDelay = 0;
toolTip1.ShowAlways = true;
for (int i = 0; i < cbo.Items.Count; i++)
{
too...
I have a .NET class library that I wrote in C++. "public ref class MyClass" defines a method "MyMethod" that takes two System::Int32 parameters.
Here is MyClass first then my question:
namespace MyNetAssembly {
public ref class MyClassThatDoesStuff
{
public:
MyClassThatDoesStuff();
void MyMethod(System...
Hi all,
I'm working on an auto-configure app for new PC's. I managed to programatically set all the needed parameters, except Primary DNS Suffix of a computer (please remember that this is different from the network connection default DNS suffix).
Any help?
Update: Here's requested class for setting IP, Subnet, Gateway, and DNS of the...
dbcc checkident (MyTable, NORESEED)
Will show the identity value in a message. I can't see the message as I need to select the identity value through a DataReader.
Anyone any ideas?
Thanks folks
...
Hi.
I have a class with an API that allows me to ask for objects until it throws an IndexOutOfBoundsException.
I want to wrap it into an iterator, to be able to write cleaner code. However, I need to catch the exception to stop iterating:
static IEnumerable<object> Iterator( ExAPI api ) {
try {
for( int i = 0; true; ++i ) ...
I have a database with about 160 tables (it's a shock ! I thought it had about 50...).
We use a codebase with no DAL, and we want to start using MS Entity Framework (that's the latest, hottest thing in .net DAL, right ?) so we can use Linq and other state-of-the-art-3-years-ago stuff.
I tried to automatically generate the whole DB model...