The idea I'm playing with right now is having a multi-leveled "tier" system of analytical objects which perform a certain computation on a common object and then create a new set of analytical objects depending on their outcome. The newly created analytical objects will then get their own turn to run and optionally create more analytical...
I need to improve on a regular expression I'm using. Currently, here it is:
^[a-zA-Z\s/-]+
I'm using it to pull out medication names from a variety of formulation strings, for example:
SULFAMETHOXAZOLE-TRIMETHOPRIM 200-40 MG/5ML PO SUSP
AMOX TR/POTASSIUM CLAVULANATE 125 mg-31.25 mg ORAL TABLET, CHEWABLE
AMOXICILLIN TRIHYDRATE 125 ...
This .NET API works OK if I'm trying to open the Registry in a machine that's in the same domain as I am (and my logged-on user has admin rights on the target machine).
It gets tricky if it's an out-of-domain machine with a different, local administrative user (of whom I do have the password).
I tried to use WNetUseConnection() (which ...
FxCop is currently reporting the same rule violation for a particular method -- it has two out parameters, because I want to return two values to the caller without creating a struct for it. I wonder if anonymous types would solve my problem, but I didn't know about them at the time I had written the method.
Anyhow, I'm getting CheckId...
I have a WiX installer that I would like to check for .Net 3.5, and install it if it does not exist. I have the following lines in my wixproj file:
<BootstrapperFile Include="Microsoft.Net.Framework.3.5">
<ProductName>.NET Framework 3.5</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Windows.Installer.3.1">
...
Update: I tried this on another, more cleanly installed, machine. I could not reproduce this on that machine. If I find out what offending (VSStudio) component causes this, I will let you know.
I create some UIElements from code behind and was anticipating the garbage collection to clear up stuff. However, the objects are not free-ed at...
I have an ASP.NET v2.0 CMS, it uses MS EntLibs 3.1 and MS SQL 2005.
For the next major release I want to upgrade the verison of .Net it's based on, do I go to 3.5 or straight to 4.0; or do I upgrade to 3.5 now as a transistion and plan go to 4.0 in 3 to 6 months? Or something else?
Upgrading the MS SQL 2005 data provider to MS SQL 200...
I built a TicTacToe game application (I'm using TCP protocol) that consist of server and client (that run two times to represent the 2 opponents). I have a problem and I can't find the solution for it, that is why I'm asking this question. the problem is : when the client try to connect the server on my machine, it never connect because ...
I've created a program that moves files to and from various directories. An issue I've come across is when you're trying to move a file and some other program is still using it. And you get an error. Leaving it there isn't an option, so I can only think of having to keep trying to move it over and over again. This though slows the en...
We are in the process of migrating our ASP.NET MVC 1.0 web app to MVC 2.0 but we have run into a small snag.
In our report creation wizard, it is possible leave the Title text box empty and have it be populated with a generic title (in the post action).
The code that does the update on the model of the Title is:
if (TryUp...
I am using MATLAB Builder NE (MATLAB's integrated .NET assembly builder), but I am having an issue with data types.
I have compiled a small, very simple, function in MATLAB and build it for .NET. I am able to call the namespace and even the function just fine. However, my function returns a value, and MATLAB defaults to returning it ...
Hi Folks,
We have a software house developing code for us on a project, .NET Web Service (WCF) and we are also paying for a test harness to be built as a separate billable task on a daily rate. I have just joined the company and am reviewing what we are getting from the software house and wanted to know what you guys in industry thought...
I just found this code in reflector in the .NET base libraries...
if (this._PasswordStrengthRegularExpression != null)
{
this._PasswordStrengthRegularExpression = this._PasswordStrengthRegularExpression.Trim();
if (this._PasswordStrengthRegularExpression.Length == 0)
{
goto Label_016C;
...
Would this be a proper way to dispose of a BackGroundWorker? I'm not sure if it is necesary to remove the events before calling .Dispose(). Also is calling .Dispose() inside the RunWorkerCompleted delegate ok to do?
public void RunProcessAsync(DateTime dumpDate)
{
BackgroundWorker worker = new BackgroundWorker();
worker.RunWor...
Hi all,
I want to use Windsor container and its silverlight version in my .net 4.0 framework and silverlight 4.0 solution. I even compiled the source code for .net 4 but unit tests didnt pass. Has anybody tried to do this?
I also tried Unity IOC framework and that doesnt even compile.
...
I am trying to retrieve file path for a html file that is embedded in resource (resx file) in VS2008 C# project. I want to give path of this file to native webbrowser control (PIEHtml) to be able to navigate (DTM_NAVIGATE) in my application. I know I can pass the string to this control using DTM_ADDTEXTW but since html text size is so bi...
Hi all,
I have got a question with regards to upgrading asp.net mvc applications from v1 to v2...
I've noticed in the ASP.NET MVC v2 Release notes that we need to add this code (please see below) when upgrading, but it did not state what would be the purpose of it because I've tried experimenting some of my apps to asp.net mvc 2 withou...
Hi Everyone,
Referencing my Earlier Question, regarding downloading a file from a server and handling exceptions properly. I am positive that I had this solved, then in classic programming fashion, returned days later to frustratingly find it broken :-(
Updated code:
private static void GoGetIt(HttpContext context)
{
var...
Input "col1, col2, col3, coln"
Output "@col1, @col2, @col3, @coln"
...
When would one choose to use Rx over TPL or are the 2 frameworks orthogonal?
From what I understand Rx is primarily intended to provide an abstraction over events and allow composition but it also allows for providing an abstraction over async operations.
using the Createxx overloads and the Fromxxx overloads and cancellation via dispos...