Currently I'm in the process of designing the messaging system for my application (which uses AMQP on the backend via RabbitMQ). There are going to be multiple instances where a method can get data from multiple sources at the same time (ie. doesn't have to be sequential queries).
Originally, I was going to use the ThreadPool and QueueU...
I know what this code is doing but I'm not sure on the syntax. It doesn't seem to conform to a "standard" format. Is it mostly LINQ?
return db.Subjects.SingleOrDefault(s => s.ID == ID);
The first part makes sense but it's the part in the brackets I don't understand. How can we use s without declaring it? And how are we putting logic i...
I'm trying to write some code that populates a List (actually, it's a series of Lists, but we can pretend it's just one List). The idea is to add an IPackage to the List for the total quantity of IPackage on order. See the following code:
ParseExcel pe = new ParseExcel();
Pinnacle p = pe.ParsePinnacleExcel();
R...
Does anyone know how to write a Regex.Split in order to convert
{video="my/video/file.flv,my/location.jpg"}
into
my/video/file.flv
my/location.jpg
...
Hey there,
I have this regex:
{link=([^|{}]+)|([^|{}]+)|([^|{}]+)}
this works great and returns me three groups between the pipe symbols, ie. this, that and blah from {link=this|that|blah}. As long as the text contains no pipe, or two curly braces (as they are reserved words in my tag builder.)
However I am still getting a match if ...
I'm writing a program that needs to search a directory and all its sub directories for files that have a certain extension. This is going to be used both on a local, and a network drive, so performance is a bit of an issue.
Here's the recursive method I'm using now:
private void GetFileList(string fileSearchPattern, string rootFold...
I'm working on a project where I need to create a WSRP portlet webservice with ASP.net.
My first question is what exactly is WSRP, and are there any good examples of it available? So far I have determined that it is a SOAP xml standard that defines how to create a portlet that can be embedded in an other portal. Is that correct?
Also I...
Suppose I have
public static List<T2> Map<T,T2>(List<T> inputs, Func<T, T2> f)
{
return inputs.ConvertAll((x) => f(x));
}
private int Square(int x) { return x*x; }
public void Run()
{
var inputs = new List<Int32>(new int[]{2,4,8,16,32,64,128,256,512,1024,2048});
// this does not compile
var outputs = Map(inputs, Squa...
I have a number of internal .NET applications from our vendor that take forever to startup. Some of their services take up to 1.5 minutes to start. Upon further investigation, I noticed that under Process Explorer's TCP/IP tab, I see the application trying to make outbound connections to crl.verisign.net. Unfortunately, most of our pr...
eg.
House.CityID
House.City
I can make the City property "override" as its an association.
Can I do the same to House.CityID make it "override"
...
Almost all the .net assemblies can be de-compiled using Reflection .Which means that all .net products are open source since the code can be easily be used by other developers.
Isnt there a way so that we can encrypt the codes (at least for some security logic) so that it cannot be easily cracked or misused.
Edit
Old question Is winfor...
What is the latest version of WinForms? And how does this relate the version of .NET?
For example in VS2008 with .NET 3.5 is there Windows Forms 3.5 under the bonnet?
...
I'm running an asp.net web application with c#. The following is used:
- Windows 2003 server
- IIS6.0
- .net Framework 2.0.50727
I'm trying to implement Forms Authentication and have entered the following code in the Web.Config file:
<authentication mode="Forms">
<forms loginUrl="01_Login.aspx"
name=".ASPXFORMSAUTH"
...
Hey there,
I have been working on this regex:
{link=([^|{}]+)\||([^|{}]+)\||([^|{}]+)}
I wish to capture any non-pipe or bracket chars and place them in appropriate backreference (group).
How can I return the following:
If test string is {link=a} return a into group 3.
If test string is {link=a|b} return a into group 2, b into group...
How should I log exceptions? I never tried logging in .NET before. Nor try to dump exceptions to a txt (or binary) file. I dont require a text file, just a way to view the logs with the file and line #.
-edit- using asp.net
...
Hello!
I am looking for a regex that validates simple website addresses, i.e.
http://www.stackoverflow.com
www.stackoverflow.com
stackoverflow.com
stack-overflow.co.it
I need it for contact details, 'Website' field, then when user click it opens IE, it doesn't have to be strict, I just don't want the user to enter 'I love milk' or ...
Is there any common event for datagridview which is fired, when rowHeaderWidth of datagridview is changed or column Width of datagridview is changed?
I have used datagridview.ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e) it is invoked when column width is changed but it is not invoked when row header width of the data...
In .NET framework, Knowing how much each data types consumes memory is useful, but it's so forgettable. Is there any way to remember it?
If I know for example, that the int data type consumes 4 bytes, it's useful. But this kind of data are so forgettable specifically when I use other software such as SQL Server that memory consumption t...
I am struggling to find way to color the tab headers of a tabpage in WinForms. There are solutions to color the current indexed tab using OnDrawItem event but can it be possible to color all the tabs with different colors at a time to make them intuitive for user for a certain behavior.
Thanks in advance,
Rajeev Ranjan Lall
...
Hi all, i have a project that is structured with a .net namespace called ViewParts. This, on the other hand, consists of many different subfolder with wpf usercontrols in them.
I have added an XmlnsDefinition attribute to my AssemblyInfo.cs file to map that .net namespace to a uri for use in other window/usercontrol files. But i would r...