After reading about the differences between appSettings and applicationSettings in a web.config file, I'd rather use the applicationSettings section and benefit from the strongly typed settings. But with the appSettings section, you could previously have a separate section on a different file and simply reference it on the web.config us...
I am working on a WPF application for a vertical market. In a discussion today about how to build the data structure to support the selection of a dozen checkboxes and radio buttons, I thought about the possibility of serializing an object to XML and storing that in SQL Server, then deserializing it when the data needs to be displayed.
...
I am looking for a managed/unmanaged API that will allow me to find which objects reference another object and are potentially keeping it from being garbage collected.
Such an API might look like this:
var foo = new Foo();
var bar = new Bar();
bar.Foo = foo;
var references = GC.GetReferencesTo(foo);
// references is an array that con...
I have the following assignment for homework.
Requirements
design a class called TokenGiver with the following elements:
a default constructor, a parametrized constructor that takes an int
a method that adds a specified number of tokens to the number of tokens
a method that subtracts exactly ONE token from your number of tokens
a m...
Hi guys
Alex James talks about using stub entities to stub-out/fake relationships. The context in which this is discussed is for updates/inserts/deletes.
I need to be able to do the same thing for a fetch. I want to be able to fetch some objects and have the foreign key reference objects be stub entities. How could I do this.
Cheers
...
I've got a project where we'll need to generate a lot of fixed-length random codes (Read: Millions) from a set of characters (EG: 12 digit alpha-numeric or 9 digit alpha-numeric lower-case only without the l character). We're going to then store these codes in an MSSQL database (SQL Server 2008). The language we're using is C#.
We also ...
I am trying to generate a proxy from a 3rd party wsdl and xsd files. I am calling svcutil like so:
svcutil *.wsdl *.xsd /language:C#
It returns this error: 'SchemaLocation' must successfully resolve if contains any child other than .
There is only one element in all the files, and it's schemaLocation attribute points to another f...
Hi, the underlying database on a project has changed from sql 2005 to MySql 5.1
The code has loads of method similar to below. I'm presuming it is just a case of switching the 'con' variable SqlConnection to a MYSql specific connection. Has anyone had any experience with this? I have never touched a mySql db. Any help much appreciated. ...
i am getting an error
Line 31:
<asp:LinkButton ID="company" runat="server" OnClick="company_Click">Companies
Management</asp:LinkButton><br />
that 'ASP.default_master' does not contain a definition for 'company_Click'
whereas the code i have written is with the ID companies as
protected void companies_Click(object sender, Even...
I'm using an XmlReader.ReadInnerXML to read an XML document (as text) embedded within in an element of an outer XML document. This works fine except for the handling of tab characters in attributes of the inner XML. Example:
<document>
<interface>
<scriptaction script="	one tab
		two tabs
		...
I know that SortedDictionary is a binary search tree (and it can almost do what I need to do!) but I can't figure out how to do everything I need in the correct complexity.
So here are the constraints (and the data structure which I know has it)
Inserting and Deletion in O(log n) (SortedDictionary)
Search in O(log n) (SortedDictionary...
Hi guys
I'm faced with my first real practical usage of a many-to-many relationship and am having a little bit of trouble with the approach...
I'm using ASP.Net MVC and have the following 2 entities: Activity <---> Program.
Now I was wondering what people think of the approach and if there is a better way of doing this:
When pull o...
It's possible to use the same strong name key for multiple related projects/assemblies.
I'm interested to know whether there are any drawbacks to using this approach. SPecifically, can it lead to a lack of security?
One area I'm thinking about this is in the use of the friend assemblies.
...
NOTE: I am not exactly sure how to title or tag this question, so if you have any ideas, PLEASE help!
I'm currently envisioning a few possible projects that involve dynamically rendering something (whether it is a point, a line, text, or music notes on a staff, for hypothetical example), but, if I were to undertake these projects, I'm n...
Hi
I been wondering this for a while. Why use String.Concat() instead of using the plus operator. I understand the String.Format since it a voids using the plus operator and make your code looker nicer.
like for example
string one = "bob";
string two = "jim";
string three = one + two;
string three = String.Concat(one,two);
...
Let's say I have a class which has three properties as below.
public class Travel
{
public int MinAirportArrival { get; set; }
public int MinFlightTime { get; set; }
public int TotalTravelTime { get; set; }
}
TotalTravelTime must be at least the sum of MinAirportArrival and MinFlightTime but could also be more in the event the...
I'm currently looking at python because I really like the text parsing capabilities and the nltk library, but traditionally I am a .Net/C# programmer. I don't think IronPython is an integration point for me because I am using NLTK and presumably would need a port of that library to the CLR. I've looked a little at Python for .NET and w...
Hello Guys,
I want to create a notebook in asp.net web/app, which has prefix of Username and current time, and then user starts to type after that.
Like this
Monu 11/11/2009 37 min. ago said : blah blah sadgggsddshdhs
and on every enter press, the line should break and
Monu 11/11/2009 30 min. ago said :
starts again. This prefix t...
Is there any disadvantages in using array in generic class? If yes, what are they? If No what are the advantages?
...
I've just created an upload page on an ASP.NET MVC application using the standard HTML for file uploading and it's working great using FireFox, IE8, Chrome, and Opera but it won't work for IE6 or IE7.
Anybody know of any differences in IE6/7 that could be causing this to fail?
...