Hello coders!!!
i want to add second(00:00:02) or minutes (00:00:20) on datetime value (may be stored string type) but how? Examples:
13:30+02:02:02= 15:32:02 ,
13:30+00:00:01= 13:30:01 ,
13:30+00:01:00=13:31:00 or 13:30(not important) how can you help me? I need your cool algoritm :) thanks again...
...
Does LINQ to SQL provide out-of-the-box polymorphic associations as ruby on rails active record does? If not, is there any workaround to manually map those associations?
...
Hi,
I have a 'suite' of VS2005 unit tests that attach a db as part of the initialization. Tests modify the db fairly substantially so need to revert it to a known state before each test run.
I deploy the test db to the 'out' folder of each TestResult and attach it in the MyClassInitialize method.
DB is fairly large so this uses up lo...
Two Questions:
Is there any way to write cross platform programs on Microsoft Visual Studio?
If there isn't then could I write a C# application on VS2008 and recompile it with MonoDevelop and have it work?
...
Is simply enumerating a .NET Dictionary from multiple threads safe?
No modification of the Dictionary takes place at all.
...
Hi All,
I'm thinking in this line of code
IDataReader myReader = questDatabase.ExecuteReader(getQuest);
I'm using DAAB but I can't understand how and what's the meaning of the fact the method ExecuteReader(DbCommand) returns an IDataReader Interface.
Anyone can Explain, Please
...
I have an app which is for a global market and needs to be localisable. During development I had some problems in that my satellite assemblies never seemed to be picked up even when I changed my locale. After some research I now understand why this is and was able to test by setting the CurrentUICulture in the code and verify that thin...
Hi,
My application is processing IList's. ILists of different user defined types. I'm thinking that i can use reflection to to see what type of object the IList contains and then create a new instance of that type and subsequently add that to the IList itself?
So at any one time I might be processing
IList<Customer> l;
and I'd like ...
Got a simple form, posting to an action... the action takes the data and creates a record in the DB, and copies the image to a directory. Works great on my local dev box.
Upload the form to my host, and the image uploading doesn't work. The form acts as if it's failing the UpdateModel(), but doesn't show any validation messages.
Anyone...
I would like to get a user's group memberships in an ActiveDirectory, without being in the domain. When I run this inside the domain, all is well.
var context = new PrincipalContext(ContextType.Domain);
var principal = UserPrincipal.FindByIdentity(context, IdentityType.Name, "administrator");
foreach (var authorizationGroup in principa...
I'm building a (LAN) network application, so there is always the possibility that a connection will be disconnected, for various possible reasons. I am trying to think of a good design for handling this issue, such that it doesn't affect the rest of the application. I wrote a quick thing to try to do it, but I think it can be enhanced a ...
Hi, I have a question about the datarow and how I can update it...
I have a datatable with two columns, id and name. I do the following:
// data table has data at this point....
myTable.Columns.Add("Fri");
foreach(DataRow r in myTable.Rows) {
r["Fri"] = 4;
}
What I am trying to do here is add a new columnm...
The code segment below prints out "The types ARE NOT the same.". Why? I am aware of the fact that using interfaceOnMyType.GetGenericTypeDefinition() will solve the problem, but why should I have to do that?
class Program
{
static void Main(string[] args)
{
var myType = typeof(Baz<>);
var interfaceOnMyType = myType.Ge...
I am starting a winform application[.NET 3.5, C#], where in the the main form of the application starts at a particular specified location. Am calling the following code in the constructor for this
private void SetFormPosition()
{
this.StartPosition = FormStartPosition.Manual;
this.Left = Screen.PrimaryScreen.Wo...
Does Microsoft MVC make available a mechanism comparable to RubyOnRails internal storage container known as flash? The preference would be not using UpdatePanel tricks.
...
In a WCF service, I have two classes with the [DataContract] attribute. One of these classes has an "is-a" relationship with the other - so class B can inherit from class A. However, when I configure inheritance between these two classes, both denoted with a [DataContract] attribute, the metadata fails to load when testing the services...
We receive multiple thousands of flat files per week currently, and I have a system that runs reports on these and exports them to PDF for our people to process and reference.
I currently bulk load these into a database, make sure all fields/formatting is valid, export them, and truncate the tables on the next run.
What I'm wondering...
I have a small MVC app that works locally, but when I publish it to the server (running IIS6), all the links get messed up.
For example, a typical link when running locally would be:
http://localhost:3467/Exceptions?exdate=20090108
However, when I publish it to our dev server at \\deverserver\apps\MyProject, note the duplication in t...
I am trying to create a new instance of a Customer entity in our application, and I am having a few problems. This entity has several navigational properties, each of which has their own nav. properties. For example, each Customer entity has an Address entity, and each Address entity has a Phone Number entity etc. I haven't figured ou...
Hi guys.
I have a report, divided into set of groups, one of them is grouped by "Status".
Status values are: S, R, V.
I need to make two total fields to get
1- Count of S and V records.
2- Count of R records.
Any suggestions?
FYI: I use CrystalReport Designer embedded with VisualStudio.NET 2005.
...