I'm using Prism V2 with a DirectoryModuleCatalog and I need the modules to be initialized in a certain order. The desired order is specified with an attribute on each IModule implementation.
This is so that as each module is initialized, they add their View into a TabControl region and the order of the tabs needs to be deterministic and...
Can anybody tell me how to call a method on a different controller from within an action method? I don't want to redirect. I want to call a method on a different controller that returns a string and use the response within my action method.
...
In lucene, I can do the following
doc.GetField("mycustomfield").StringValue();
This retrieves the value of a column in an index's document.
My question, for the same 'doc', is there a way to get the Doc. Id ? Luke displays it hence there must be a way to figure this out. I need it to delete documents on updates.
I scoured the docs b...
I have GridView with CheckBox in it's header and another one in each row:
<asp:GridView runat="server">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<input type="checkbox" onclick="checkAll(this.checked)" />
</HeaderTemplate>
<ItemTemplate>
<input name="checkSelect" type="checkbox" value='<%# Eval("ID") %>' />
...
I am connecting to my mail server using IMAP and Telnet. Once I am connected I am marking all items in the inbox as read. Some times the inbox will only have a couple of e-mails, sometimes the inbox may have thousands of e-mails. I am storing the response from the server into a Byte array, but the Byte array has a fixed length.
Pri...
Is there any way for people using VS2008 to step into and read the source code for the MSDN libraries?
I come from a Java background where this is possible...
...
I am using DataGrid from the WPF Toolkit and I need to be able to maintain focus on the bottom of the grid (i.e. the last row). The problem I'm having right now is that as rows are added the scrollbar for the DataGrid doesn't scroll along with the new rows being added. What's the best way to accomplish this?
...
I know how to implement them, but what I don't know is whether to apply the transformation pixel by pixel or is there another way to affect the whole image, using a single call, etc?
AFAIK Get.Set Pixel is very slow. I am not sure if they did it this way.
So if it's the grayscale/desaturate filter as a simple case, how would one write ...
I want to use YUI Compressor (the original) and use it as part of typical MS build processes (Visual Studio 2008, MSBuild).
Does anyone have any guidance or thoughts on this? For example, good ways for incorporating into project, what to do with existing CSS and JS references, and the like.
I am happy to hear on the benefits of YUI Com...
I have a Lucene Index on a central file system. In my IIS application, I have methods to query the index and another to update the index.
To update the index, I have to lock the file until the changes are committed. My problem in implementing this is choosing the best design pattern to maintain good concurrency.
Am I best off using a s...
The link below is an image URL where the extension has been stripped. I assume this is being done with content negotiation tools. I know that it's a GIF having viewed the HTML meta data with Firebug. What I would like to know is a simple way working in C# on .NET, how would I get the file type of this URL?
http://ep.yimg.com/ca/I/yhst-...
I have an array of integers in string form:
var arr = new string[] { "1", "2", "3", "4" };
I need to an array of 'real' integers to push it further:
void Foo(int[] arr) { .. }
I tried to cast int and it of course failed:
Foo(arr.Cast<int>.ToArray());
I can do next:
var list = new List<int>(arr.Length);
arr.ForEach(i => list.Add...
I have a List<T> and I need to avoid the behavior I'm about to outline:
// assume cls and numberToAdd are parameters passed in.
int pos = numberToAdd;
List<MyClass> objs = new List<MyClass>(numberToAdd);
for(int i = 0; i < numberToAdd; i++)
{
objs.Add(cls);
objs[i].X = -((pos * cls.Width) + cls.Width...
I have a LINQ query to retrieve the maximum value of an integer column. The column is defined as NOT NULL in the database. However, when using the MAX aggregate function in SQL you will get a NULL result if no rows are returned by the query.
Here is a sample LINQ query I am using against the Northwind database to demonstrate what I am d...
I'm building the JSON string "by hand" server-side.
Should I Convert.ToString(System.DateTime.Milliseconds) on the server-side and use javascript Date.setTime(milliseconds) on the client side?
...
Below is a quick example of what I am doing. Basically, I have multiple interfaces that can be implemented by 1 class or by separate classes, so I store each one in the application. My only question is about the variables myInterface, yourInterface, and ourInterface. Do they reference the same object or are there 3 different objects?
...
I'm attempting to implement a PreInsertEvent listener using the latest version of NHibernate. One of the things I want to do with in this listener is find the database table that my entity is going to be mapped too. (Assuming that it is only one table).
Does anyone know where in the IEntityPersister I might be able to find this?
...
Hello,
I am writing some class and it wont compile without "using System.Linq". But i don't understand why its needed. What i am writing has nothing to do with Linq. How can i find out where a namespace is used?
And the very badly written piece of code (I am trying to figure out what i want it to do):
using System;
using System.Collecti...
Hi,
Whenever I try to use:
ApplicationManifest appManifest = (ApplicationManifest)ManifestReader.ReadManifest("ApplicationManifest", clientSetupFilesFolder, false);
I get an "access denied" exception to the path while debugging. I am running Visual Studio 2008/SP1 under Admin. However, if I use StreamReader/StreamWriter, I have no p...
OK, what am I missing here? MSDN says the following with regard to DateTimeSerializationMode:
In versions 2.0 and later of the .Net
Framework, with this property set to
RoundtripDateTime objects are examined
to determine whether they are in the
local, UTC or an unspecified time
zone, and are serialized in such a way
that ...