I've run into a problem that's driving me crazy. In my application (ASP.NET MVC2 /.NET4), I simply running this:
DateTime.Now.ToShortTimeString()
All the examples I've seen indicate I should get something like: 12:32 PM, however I'm getting 12:32 without the AM/PM.
I launched LinqPad 4 to see if I could replicate this. Instead, it re...
Our application has a background thread which spawns a process through System.Diagnostics.Process:
Process.Start(
new ProcessStartInfo
{
FileName = url,
UseShellExecute = true
}
);
This used to have no issues at all. But now, the background thread is silently dying; it never returns from the call to Proces...
I've written an application with a plug-in feature, and if a plug in doesn't respond quickly to a stop request, I call Thread.Abort() on its worker thread. This seems to work most of the time, but I recently discovered that it throws an ObjectDisposedException if the thread is aborted while it's writing to the serial port. With some USB-...
We can call callback methods using delegates.
For eg,
public delegate bool ContinueProcessing();
// later in code we can write ,
ContinueProcessing cp = new ContinueProcessing(IsDataAvailable);
cp += new ContinueProcessing(IsTransactionComplete);
//later in code defination of methods
bool IsDataAvailable()
{
return true;
}
bool I...
I'm in the process of trying to learn Domain Driven design so i'm sure this will be the first of many questions (i can already think of at least a couple more but i don't want to fragment my questions). I'm using Dino Esposito's "Architecting Microsoft .NET Solutions for the Enterprise" which, in some cases, is very abstract.
First o...
Where I work, I often see code like that :
public void Test(Models.User.UserInfo userInfo, Models.User.UserParameter param)
{ ... }
Personally, I prefer to see something like that :
public void Test(UserInfo userInfo, UserParameter param) { ... }
And have an import at top.
What you think about this ? What the best practices ? W...
I'm looking for a high level, decentralized, robust, scalable lookup/message passing package I can use with .NET 2.0. I believe Chord is the correct base algorithm for this use. Explicit, proven time guarantees are a must (e.g. lookups resolve in at most log(n) messages or steps). Chord routing looks sufficient.
Suppose I want to prov...
I am connecting to a MySQL database from Visual Studio 2010 using Net/Connector.
This is the entity framework 4 linq query:
int timeThreshold = 5;
DateTime cutoffTime = DateTime.Now.AddMinutes(-timeThreshold);
try
{
using (var context = new myEntities())
{
var un...
Hi,
I am using ASP.NET MVC application. However I am not able to understand the fact that in ASP.NET MVC pages are not posted/no postbacks. How is that possible? Unless posting the data how can the MVC framework manipulate the posted data. So what is the point in telling ASP.NET MVC does not have post backs. And also what the REST princi...
How can I get a neural net file from Matlab into a FANN .net file
...
Are there any .net classes that allow for controlling an internet connection? Such as connecting/disconnecting from a wireless connection?
Any details need to be useable in any .net framework version running on XP sp/3 or later windows OS.
...
I'm not sure if this is possible, but I'll give it a go.
I'm creating a device where I have to add a customized user-interface instead of the normal operating system UI. I'm thinking of installing Windows CE (or .NET MICRO) or Linux, but I'm not sure which OS would let me do this. Also, the software (UI) would load instantly and doesn't...
Hi all!
I have such style in WPF
<Style x:Key="SubTabItem" TargetType="{x:Type TabItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding Path=IsSelected}...
I'm using the DevEx DXGrid (WPF) to show about 2,000 rows of data. I'm using a DataRow Template to get Master-Detail behavior (a new detail grid for each row).
My application responds extremely slow to almost all use input (to the grid). for example:
scrolling
expand/collapse group rows
resize app window
I've contacted DevEx suppo...
I have inherited a very large ASP.NET app that needs to be modified to use a State Server instead of in-proc sessions. I need to track down all classes used in session throughout the app and then determine if they can be serialized. Are there any tools that can be used to analyze the code to determine the classes used in session?
...
I've a string 01-India. I want to split on '-' and get only the code 01. How can I do this. I'm a .net newbie. Split function returns a array. Since I need only one string, how can this be done. Is there a ingenious way to do it using split only. Or do I've to use substring only?
...
Hi,
I want to create one help file for my whole application. and once user press help button next to any input control then appropriate help topic from file should get display. how can i create this functionality in vb.net?
...
How can I set the overridedefaultbutton to Tab so that pressing Enter tabs to the next input field, and doesn't cause a postback?
...
In Flash 10 there are methods that require that they are triggered from user-initiated actions like button click, keyboard up/down keys, etc.
Is it possible to implement this behaviour in .NET? For example, if we have this subroutine:
void SomeMethod() {
// Here some stuff
}
how to check inside it whether the method was called fro...
Hi,
I have a user control in the modules folder of my project. and I have a link like
Test in this control. When ever I mouseover this "Test" on the page, I can see the whole url like this "www.example.com\projectName\Modules". But I want to make it such a way that it should display the url as "www.example.com\projectName". I want to g...