I am looking for a good design/alogrithm/pattern for the following:
I have a large list of TODO tasks. Each one of them has an estimated duration. I want to break the larger list into smaller sublists, each sublist containing a max of 4 hours of work.
My current algorithm is something like this:
while( index < list.Count )
{
Li...
I've written a simple abstract generic class in C# (.NET 2.0) and I preferably want to limit it to only reference types, so I can indicate no value by a null. However, I also want to use types such as long and decimal, why don't allow null (being structs after all). I considered making the class
public abstract Field<Nullable<T>>
{
...
For some reason, ldap and directory services does not work when the computer is not joined to the domain. The error messages from .net is domain not available. Anyone know what needs to be done?
the basic...
domainAndUsername = domain + @"\" + username;
entry = new DirectoryEntry(_path, domainAndUsername, pwd);
entry.Authenticatio...
Hi,
I need to upload a massive (16GB, 65+ million records) CSV file to a single table in a SQL server 2005 database. Does anyone have any pointers on the best way to do this?
Details
I am currently using a C# console application (.NET framework 2.0) to split the import file into files of 50000 records, then process each file. I uplo...
Hi, I have a scenario where I am populating a combo box with the template names. Amongst the templates one would be a default template. I want to highlight the default template name when I populate the combo box (so that the user knows which one among the items is the default). Is it possible to do so? If yes how? I am using a Windows Fo...
Hi! How can I display only selected headers in DataGridView control?
For example I have DataTable with headers ("Name","Age","Status"), but I'd like to omit "Age" column when displaying.
Thanks! :)
...
I have wrriten a managed code for SMO application.How can i comiled it using
.NETFRAMEWORK2.0. i dont wnat to use visulastudio due to certain limitataions.
how can i do this. can nay body help me in this regard.
msbuild.exe TestMsBuild.sln /:t Rebuild /:p configuration=release gives error as
TestMsBuild.sln : Solution file error ...
Hi
i want comile a my c++ program using .NETFRAMEWORK libraries only at command prompt.how can i do this ??
Plz help mee..
...
See the four lines in the Go() method below:
delegate void Action<T>(T arg);
delegate void Action();
void DoSomething<T>(Action<T> action)
{
//...
}
void DoSomething(Action action)
{
//...
}
void MyAction<T>(T arg)
{
//...
}
void MyAction()
{
//...
}
void Go<T>()
{
DoSomething<T>(MyAction<T>); // throws compiler...
I am an senior-slash-"advanced" C#/.NET developer, currently using 3.5 Framework with WPF/WCF and Silverlight (WPF/E). I have come up right through 1.0 and 2.0 and so am well versed with the evolution of .NET. My next project could be "back" into 2.0 Framework, but with enough complexity (and time pressure) so as to call on "expert" skil...
I'm looking to deploy a ASP.net web application in Shared Hosting.
I'm getting Security Exception,
System.Security.SecurityException:
Request for the permission of type
'System.Security.Permissions.FileIOPermission,
mscorlib, Version=2.0.0.0,
Culture=neutral,
PublicKeyToken=b77a5c561934e089'
failed.
Any help to fix an...
Dear All,
I have an ASP.NET web page(Not MVC ) (HomePage.aspx) and another page (PRiceList.aspx).I have a login feature in my Home page.So when a user logged in the site, They can go to the pricelist.aspx page easily using a link in homepage.If some one is entering the page with out logging in , I want to show a modal login box (backgro...
Hi, I am using a StringDictionary to store key value pairs. I need to use the keys and values interchangeably i.e. I should be able to get the key from the value as in my case the values will be distinct.
Is there a direct way I could do it (without looping)? Or if there is any other collection I could use to achieve this?
Currently I...
Consider that there is a ComboBox which is populated through its DataSource property. Each item in the ComboBox is a custom object and the ComboBox is set with a DisplayMember and ValueMember.
IList<CustomItem> aItems = new List<CustomItem>();
//CustomItem has Id and Value and is filled through its constructor
aItems.Add(1, "foo");
aIt...
Hello,
is there a way to run migrations from within the application itself?
Thanks!
...
Some background:
I have a windows service with 5 web references, Everything works great in several environments Dev,Test,QC. Dev and Test are running windows 2003, QC and PROD windows 2000. We pushed the service to production with the same set of assemblies and config files and are receiving this error. The exception is not consistent th...
Hi, I'm struggling a bit with socket programming (something I'm not at all familiar with) and I can't find anything which helps from google or MSDN (awful). Apologies for the length of this.
Basically I have an existing service which recieves and responds to requests over UDP. I can't change this at all.
I also have a client within my ...
I have an ASP.NET page where I have a button When a user clicks on the button,I will check whether the user has logged in or not.If not logged in I will show a modal popup to login (using jQueryUI). I have placed one textbox(txtPassword) and one button(btnLogin) control in the Div which will be shown by the jQueryDialog.But in btnLogin's...
I've got a site using .netCART. It's running fine in production with Windows Server 2003 and .NET 2.0. On the new server (Windows Server 2008) everything is working except for credit card decryption in the store admin. No errors are being sent, no exceptions thrown, just the encrypted string being output to the screen instead of a decryp...
I have an app, which is a bunch of c# web services sitting on top of ASP.NET 2.0 in IIS7 on Win2k3. Following the last release, we keep getting connection timeouts. A quick investigation using Perfmon confirmed that our application is leaking connections.
However, there have been so many code changes in the last release, that it is r...