.net

SmartAssembly memory management

Hi All, Just came across this website. Feature 9 is memory management and they claim that their product "automatically releas[es] memory [that is] no longer needed." Is this a marketing ploy, or do you think they have some trick up their sleeves? Are they just making a claim based on what they .Net runtime provides in any case (or are ...

What is the perfect Regex for doing wiki formatting (.Net)?

H guys, I've got this wiki formatting algorithm which I am using at Stacked to create HTML out of "wiki syntax" and I am not really sure if the current one I am using is good enough, optimal or contains bugs since I am not really a "Regex Guru". Here is what I am currently using; // Body is wiki content... string tmp = Body.Replace("&",...

Calling a function from the main thread and making it working in paralel with a function in the main thread (part 2)

dear all; thnx for all your replays .. i tried your options and i want to ask if that was right and is are the 2 threads working in paralel or not.. and here is my code : // in the Form.Load() Timer1.Enabled = true; Timer1.Start(); if (InvokeRequired) { Invoke(new GetFromServerHan...

Unable to Generate an Excel in an Atlas Update Panel

I am unable to generate an excel in an Atlas Update Panel. (Since a response cannot be ended/written [XML] in the update panel) I don't want to use asp:updatepanel .. Is there any other way? Any correct answer will be highly appreciated... Thanks in advance ...

System.Transaction implicit transaction messing with my other connections

I'm trying to use System.Transaction.TransactionScope to create a transaction to call a few stored procedures but it doesn't seem to clean up after itself. Once the transaction is finished (commited or not and the transaction scope object is disposed) subsequent connections to the database open up with the read commit level of serializab...

Proxy objects in IronPython

I'm trying to make a proxy object in IronPython, which should dynamically present underlying structure. The proxy itself shouldn't have any functions and properties, I'm trying to catch all the calls in the runtime. Catching the function calls is easy, I just need to define getattr() function for my object, and check does appropriate fun...

Why is Visual Studio not able to open .csproj files?

Hello! I have the odd problem that I am not able to open the properties of my .NET projects in Visual Studio. If I try to open it by clicking on the Properties tree node in the Solution Explorer I get the following message: There is no editor available for '....csproj'. Make sure the application for the file type (.csproj) is instal...

Should I use decimal, float or double for this simple math result?

Hi folks, I'm doing some really simple math and saving the result to a MS SQL2008 DB. I'm averaging out the some numbers, which are byte values between 1<->5. I wish to record probably 2 decimal places only. I don't care about rounding for the 2nd decimal place (eg. a 1.155 == 1.5 or 1.6 .. i'm not too phased). So .. should i store th...

Get dataset child rows in proper order

I have typed dataset with 1:N relationship between two tables. Child table has 'Order' column, that I use for sorting (ordery by) in SP when loading data into dataset. As I understand, this order is not guaranteed when working with dataset. I need GetChildRows of parent row and ensure that rows are in specific order defined in order co...

Web service can't open named pipe - access denied

Hi All, I've got a C++ service which provides a named pipe to clients with a NULL SECURITY_ATTRIBUTES as follows: hPipe = CreateNamedPipe( lpszPipename, PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, BUFSIZE, BUFS...

How can i get the cpu information in .net?

like whether it is pentium or AMD etc. ...

Which are the must-have-newsletters subscriptions for .net/java programmers?

I think there are several newsletters which are very good in content. EDIT: Such as http://www.javaspecialists.eu/archive/archive.jsp ...

Inheriting the equality comparer

I have a Customer class. public class Customer { private string _id; private string _name; // some more properties follow I am inheriting the EqualityComparer form MyEqualityComparer(of Customer). This I am intending to use in LINQ queries. MyEqualityComparer is intended for partial check between two objects. If the custom...

How can I make Named Pipe binding reconnect automatically in WCF

I'm writing a service that will only get calls from the local host. Performance is important so I thought I'd try the NetNamedPipeBinding instead of NetTcpBinding and see If I could see any noticeable performance gains. If a client, after having performed one or more requests to the server, is idle for a longer period of time the next r...

Suggestions for a cheap/free .NET library for doing Zip with AES encryption?

I'm trying to find an zip compression and encryption component with encryption suitable for use by the US Federal Government, so I can't use Zip 2.0 encryption, it has to be AES or the like. I've already found SharpZipLib (can't do AES encyrption), and Chilkat (can do AES encryption, but costs money). Am I missing any other options? ...

Application.Exit didn't kill a message pump?

I have thread exception handler which saves the exception stack trace and should close the application. I call Applicatoin.Exit, but that only closes the window, living the app running windowless. I know, that this usually happens because some background threads are still running. I attached windbg to the windowless process and there s...

Programming to an interface. How to decide where its needed?

I understand that programming to interfaces helps with loose coupling. However, is there a guideline that explains when its most effective? For example, I have a simple web application that collects data on employees, their training plans, expenses and computes their expense for the year etc. This is a fairly simple application and I ca...

How can I debug with a single proc on a multi-proc system?

My development machine is a quad core system, but I just ran into ( and I am still debugging ), and problem when my application is deployed to single processor systems. I get a dead lock. I would like to be able to debug using only a single processor, rather than having to build a development VM to debug with. Is it possible to tell V...

Asp:TextBox and VNI-Times, Vietnamese Text Problem

I need to be able to allow a user to enter Vietnamese text into a text box. I have been instructed to use VNI-Times and provided a sample word document with Vietnamese text. When I paste the text from the sample document into the textbox it is encoded incorrectly. I have tried installing the font (VNI-Times) on both my machine and the ...

FxCop Custom Rule - Inspecting winform control properties

I am looking for an example of a FxCop Rule that inspects the properties of controls created. Has anyone seen one? Or know how to respond to a property set in the FxCop SDK? Rich. ...