.net

How to convert ZXZ rotation matrix to Euler angles?

I'm using Catia software. When I query the position of an object inside my CAD drawing, the system returns a 3x4 matrix [Rotations | Translations] I think that the Rotations are expressed in a ZXZ fashion but for further processing I'd like to convert that rotation matrix to a XYZ notation, is this something doable? Edit: My object ...

Detect a code fragment from looking at a binary

Without working on the source, just on the basis of a binary, is there a way (there sure must be using CodeDom, but it'll be nice if it is possible without CodeDom) to tell if a method's body has an if construct, using reflection? ...

Question on string interning performance

I'm curious. The scenario is a web app/site with e.g. 100's of concurrent connections and many (20?) page loads per second. If the app needs to server a formatted string string.Format("Hello, {0}", username); Will the "Hello, {0}" be interned? Or would it only be interned with string hello = "Hello, {0}"; string.Format(hello, userna...

DataGridView bound with iNotifyPropertyChanged object question

I have a derived DataGridView bound to a BindingList, and the object implements iNotifyPropertyChanged. I'd like to do the following: When my a property attached to my DataGridView is changed, I want to call a function that will update the header of one of my columns. Basically, I want to add my OWN response to the PropertyChanged e...

Can I write this .NET foreach loop shorter?

Hello, I think there is a shorter way of writing this foreach loop that creates a deep copy of a SortedDictionary<string, object>. Note that object is just a place holder, I'm really using some other reference type there. Thanks! Here is the code: foreach (KeyValuePair<string, object> entry in sortedDictionary) { this.mSortedDict...

Distinguish between the type used to reference an object and the type of its backing store

using System; interface IAnimal { } class Cat: IAnimal { } class Program { public static void Main(string[] args) { IAnimal cat = new Cat(); // Console.WriteLine(cat.GetType()); // This would only give me the type of // the backing store, i.e. Cat. Is there a // way I can get...

Can I inject few line of my code into someone elses .NET dll ?

I want to replace one line of code in 3d party API with my own code. I mean this is questionable practice but I need to fix their bug (the idiots call ResolveDNS on every method call which writes to TCP socket - what they were going to achieve with it?) which results in untolerable lags. I want to cache DNS name in static field and scr...

creating DLL in VB NET. Does it HAVE to be a class library?

I have another program (which I do not have the source for, already compiled) that is calling a DLL. I want to swap the DLL out and put my own in its place, to run my own model (inside the DLLs) rather than this other one that comes with the software. I have made DLLs in fortran using the G95 compiler that work declaring them dynamical...

convert .NET generic List to F# list

Is there a built-in method to convert the .NET List<> into the F# list? ...

How to detect occurrencies of a small image in a larger image?

I would like to detect the occurrencies of a small image in a larger image, as well as coordinates. How do I do it with C#/.NET? ...

Mapping large string with Fluent NHibernate

HI Guys, I'm working with an Oracle DB, and I'm trying to map this class: public class Book { public virtual int Id { get; private set; } public virtual string Author { get; set; } public virtual string Title { get; set; } public virtual string Text { get; set; } } With this mapping class: public class BookMap : Class...

How to update check boxes in a .NET checkListBox?

I've run into a problem where I want to display a list of items in a checkListBox and programmatically check them off one by one as each process I am monitoring gets completed. I will try to water my code down to the bare essentials so everyone can easily grasp what is happening. for (int i = 0; i < 10; i++) { SOME_FUNCTION(); ...

Hosted WebBrowser control attempts to download Flash content rather than playing it

I am hosting an IE browser control in a simple, .NET winforms app. When I make the control navigate to certain content on disk, the control attempts to download the file (rather than displaying the content.) The exact same URL when pasted into the IE browser will properly display the swf file in question along with processed XML data th...

.Net Xml Deserialization - Support Multiple Namespaces

Hello, I need to support XML deserialization of two very similar, yet different xml files. File 1: <?xml version="1.0" encoding="UTF-8"?> <lr:LogReport xmlns:dcml="http://www.x1.org/schemas/Types/" xmlns:ds="http://www.x3.org/2000/09/xmldsig#" xmlns:lr="http://www.x.org/schemas/LogRecord/" xmlns:xs="http://www.x3.org/2001/...

Can the .NET ReportViewer render HTML ?

One of my report's text data sources contains some formatting in HTML, just the basic formatting tags such as paragraph, bold, etc. Can the ReportViewer be made to render the formatted text? If not, can anyone recommend a work-around? Thanks in advance, Wen ...

Does HyperDescriptor work when built in .NET 4?

I'm working on a .NET 4 project, and would be able to benefit from the dynamic property access that HyperDescriptor provides, but it doesn't seem to be working properly when built in .NET 4. I downloaded the source from CodeProject, converted the solution an projects to VS2010, and updated the target framework to 4.0. While it builds, ...

Where can I find a good step-by-step tutorial on using Entity Framework with a real-esque project?

I found the MSDN quickstart guide, but it's a bit lacking in explanation and other useful things. Do you know where I can find a good tutorial for someone somewhat familiar with Linq-to-SQL but interested in EF? ...

implementing BigPipe for .NET to improve performance

a very cool article on how facebook breaks up their page into "pagelets" to maximize the work done by the server and browser when building a complex page that grabs various resources (ads, feeds, friends, etc). they call it bigpipe. steve souders actually talked about this at one of his talks and he referred to it as "flushing the docu...

When is it OK to use an XML file to save information?

What reason could there be for using an XML to save information? ...

What are the responsibilities of .NET developer?

Many times I see "Looking for .NET Developer" but doesn't specify whether you'll be working with ASP.NET, WPF, Winforms, Silverlight, ADO.NET, etc. By ".NET Developer" do the employers mean a .NET developer that is proficient in all of the above? Isn't that a little too much to know all at once? ...