I have this .NET regex:
^(?<prefix>("[^"]*"))\s(?<attrgroup>(\([^\)]*\)))\s(?<suffix>("[^"]*"))$
It properly matches the following strings:
"some prefix" ("attribute 1" "value 1") "some suffix"
"some prefix" ("attribute 1" "value 1" "attribute 2" "value 2") "some suffix"
It fails on...
"some prefix" ("attribute 1" "value (fail) 1"...
Replaces Question: http://stackoverflow.com/questions/184096/update-multiple-rows-into-sql-table
Here's a Code Snippet to update an exam results set.
DB structure is as given, but I can submit Stored Procedures for inclusion (Which are a pain to modify, so I save that until the end.)
The question: Is there a better way using SQL server...
I have been pushing into the .Net framework in powershell and I have hit something that I don't understand. This works fine:
13# $foo = New-Object "System.Collections.Generic.Dictionary``2[System.String,System.String]"
14# $foo.Add("FOO", "BAR")
15# $foo
Key Value
--- ...
I have two XmlDocuments and I would like to move an XmlNode selected from one of the documents and append it at a particular location in the other document.
The naively intuitive approach of simply calling AppendNode(xmlNodeFromDocument1) at the appropriate place of document 2, of course doesn't work because the method does not take car...
I am trying to retrieve an image stored in an oracle blob and place it in a new System.Drawing.Image instance. I know I can write the stream to a temp.bmp file on the disk and read it from there but thats just not l33t enough for me. How do I convert the blob object directly to an image?
...
How would you implement a GUI similar to the "My Computer" view in Windows Explorer?
In particular the "Icons" view mode. Including the grouping of different item types (as Files Stored on This Computer/Hard Disk Drives/Devices with Removable Storage groups in Windows Explorer)
In WinForms I would use a ListView for this thing but in W...
I have a ListBox that when in focus, and when I have an item selected returns a valid SelectedIndex. If I have a valid SelectedIndex and I click on a TextBox on the same Forum, the SelectedIndex now becomes -1. However I want it to keep its SelectedIndex from changing. How would I go about doing this?
...
Is there a way in C# to play audio (e.g. MP3) direcly from a Stream (I mean the real .NET class) that for instance was returend from a WebRequest without saving the data temporarily to the disk?
Solution with NAudio
With the help of NAudio 1.3 it is possible to:
load a mp3 file from a url into a MemoryStream
convert mp3 data into w...
There is a list of projects here, mainly the Facebook Developer Toolkit and Facebook.NET. However, I've seen a lot of negative feedback about the toolkit and it seems like Facebook.NET hasn't been upgraded to the latest facebook API.
Are either of these worth using? Any other good libraries out there?
Specifically I'm looking to use t...
Is there any solution how to initialize properties of component marked as 'internal'? What assembly name should I use for InternalsVisibleTo attrribute or it won't help?
...
I am looking for a drawing library or code examples to draw images or vector shapes repeated along a path which could be curved.
I found a cocoa library which is what I am looking for http://apptree.net/drawkitmain.htm but for .NET.
...
Environment:
Windows Server 2003 R2 Enterprise 64bit, SP2
.NET framework is supposedly installed (2.0 SP2, 3.0 SP2, 3.5 SP1)
I say "supposedly" because they are listed as installed under Add/Remove programs. I'm not sure it's properly installed, because the "ASP.NET" tab isn't added to any of the sites in IIS.
In the IIS Web Service Ex...
I took the plunge this afternoon and began studying LINQ, so far just mucking around with LINQ on collections. One of the first things I tried was to implement QSort.
Now -- ignoring the fact that I could just use an ORDERBY and that this is a very silly qsort implementation -- what I came up with was this:
public class lqsort
{
p...
I was wondering if its possible to inject a thread into a remote app domain running in a separate process.
My guess is that I could do this using the debugging interfaces (ICorDebug) but I was wondering if there is any other way?
...
I have a simple panel that is used as a drawing surface. The goal here is to draw a 4 pixel wide outline around a child ListView under certain circumstances. I would like to make the outline pulsate when something can be dragged into it.
I am just drawing a simple rectangle around the ListView and updating the opacity of the rectang...
I have created a common library at work, and it is installed in the GAC on our test server. I've recently updated it and I want all of our applications to be using the update. I created a publisher policy assembly and installed it in the GAC along with the update, but when a web app loads Leggett.Common, 1.0.0.0, it isn't redirected to L...
How can I get Environnment variables and if something is missing, set the value?
...
I would like to access a class everywhere in my application, how can I do this?
To make it more clear, I have a class somewhere that use some code. I have an other class that use the same code. I do not want to duplicate so I would like to call the same code in both place by using something. In php I would just include("abc.php") in bot...
I am working on a web application that was recently converted from Visual Studio 2003 to Visual Studio 2008. The application contained some web services that were written using the .NET 1.1 Framework and Web Service Enhancements 2.0. They were converted to the .NET 3.5 framework using the VS 2008 Conversion Wizard Tool.
A client appli...
My company has login integration with GroupWise, and Exchange 5.5/2000+. The Exchange 5.5/GroupWise logic is done using wldap32.dll (win32), and so the login code is in a managed c++ class. When the configuration tool (or the backend service) tries to load the dll built off this managed c++ project on my XP development box, it works fi...