Search Results

Search found 838 results on 34 pages for 'greg wallace'.

Page 29/34 | < Previous Page | 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • How can I run some common code from both (a) scheduled via Windows Task & (b) manually from within W

    - by Greg
    Hi, QUESTION - How can I run some common code from both (a) scheduled via Windows Task & (b) manually from within WinForms app? BACKGROUND: This follows on from the http://stackoverflow.com/questions/2489999/how-can-i-schedule-tasks-in-a-winforms-app thread REQUIREMENTS C# .NETv3.5 project using VS2008 There is an existing function which I want to run both (a) manually from within the WinForms application, and (b) scheduled via Windows Task. APPROACHES So what I'm trying to understand is what options are there to make this work eg Is it possible for a windows task to trigger a function to run within a running/existing WinForms application? (doesn't sound solid I guess) Split code out into two projects and duplicate for both console application that the task manager would run AND code that the winforms app would run Create a common library and re-use this for both the above-mentioned projects in the bullet above Create a service with an interface that both the task manager can access plus the winforms app can manage Actually each of these approaches sounds quite messy/complex - would be really nice to drop back to have the code only once within the one project in VS2008, the only reason I ask about this is I need to have a scheduling function and the suggestion has been to use http://taskscheduler.codeplex.com/ as the means to do this, which takes the scheduling out of my VS2008 project... thanks

    Read the article

  • can I have an abstract base class with the key attribute being generic

    - by Greg
    Hi, I want to create a re-usable library. I was going to use extension methods however I run into some issues in some cases for the client to have to specify in the calling method the types. QUESTION - If I use an abstract base class as the basis, can I specify an attribute/property in the class to be generic (e.g. the key property might be an 'int' in one case, or a 'string' in another)?

    Read the article

  • in .net, what programming model would be good for prototyping, but then reusable for production (for

    - by Greg
    Hi, In .NET land what would be a good approach for quick prototyping of a concept (i.e. development just on my PC) that could then be extended out to product (users across LAN/WAN), BUT in a fashion that the model/business logic code and data access layer code can be used as is? One thought for example I had as to do: (a) WinForms with business logic and Entity Framework layer to SQL Server Express on my PC, then (b) Go then to ASP.net (using the business logic / data library) with SQL Server/IIS Any comments? Other suggestions?

    Read the article

  • QuickGraph - How can I associate an Edge with a Class? (i.e. like you can with a Vertex)

    - by Greg
    Hi, Q1 - How can I associate an Edge with a Class? (i.e. like you can with a Vertex) In my case there are various types of edges I want to be able to model. So my real question I guess is how can I associate some level of data with Edges (e.g. edge type). The graph I was looking at using was: http://quickgraph.codeplex.com/wikipage?title=BidirectionalGraph&referringTitle=Documentation thanks

    Read the article

  • Modeling many-to-one with constraints?

    - by Greg Beech
    I'm attempting to create a database model for movie classifications, where each movie could have a single classification from each of one of multiple rating systems (e.g. BBFC, MPAA). This is the current design, with all implied PKs and FKs: TABLE Movie ( MovieId INT ) TABLE ClassificationSystem ( ClassificationSystemId TINYINT ) TABLE Classification ( ClassificationId INT, ClassificationSystemId TINYINT ) TABLE MovieClassification ( MovieId INT, ClassificationId INT, Advice NVARCHAR(250) -- description of why the classification was given ) The problem is with the MovieClassification table whose constraints would allow multiple classifications from the same system, whereas it should ideally only permit either zero or one classifications from a given system. Is there any reasonable way to restructure this so that a movie having exactly zero or one classifications from any given system is enforced by database constraints, given the following requirements? Do not duplicate information that could be looked up (i.e. duplicating ClassificationSystemId in the MovieClassification table is not a good solution because this could get out of sync with the value in the Classification table) Remain extensible to multiple classification systems (i.e. a new classification system does not require any changes to the table structure)? Note also the Advice column - each mapping of a movie to a classification needs to have a textual description of why that classification was given to that movie. Any design would need to support this.

    Read the article

  • Categorized SharePoint Discussion - default category to parents category on reply.

    - by Greg Ogle
    I have a Discussion Board in a SharePoint site which has an additional column named Category. When a new discussion is created, it prompts for Category, and of course this is by design. The problem is that when the discussion is replied to, it prompts for the category again. How can I separate the reply functionality so that the Category is not prompted and the Category is set to that of the discussion under which it resides? I attempted to edit a copy of NewForm.aspx in SharePoint Designer, but you can only edit which WebPart it is using, not which fields are displayed.

    Read the article

  • How can I make this code more generic

    - by Greg
    Hi How could I make this code more generic in the sense that the Dictionary key could be a different type, depending on what the user of the library wanted to implement? For example someone might what to use the extension methods/interfaces in a case where there "unique key" so to speak for Node is actually an "int" not a "string" for example. public interface ITopology { Dictionary<string, INode> Nodes { get; set; } } public static class TopologyExtns { public static void AddNode(this ITopology topIf, INode node) { topIf.Nodes.Add(node.Name, node); } public static INode FindNode(this ITopology topIf, string searchStr) { return topIf.Nodes[searchStr]; } } public class TopologyImp : ITopology { public Dictionary<string, INode> Nodes { get; set; } public TopologyImp() { Nodes = new Dictionary<string, INode>(); } }

    Read the article

  • Floating point innacuracies

    - by Greg
    While writing a function which will perform some operation with each number in a range I ran into some problems with floating point inaccuracies. The problem can be seen in the code below: #include <iostream> using namespace std; int main() { double start = .99999, end = 1.00001, inc = .000001; int steps = (end - start) / inc; for(int i = 0; i <= steps; ++i) { cout << (start + (inc * i)) << endl; } } The problem is that the numbers the above program outputs look like this: 0.99999 0.999991 0.999992 0.999993 0.999994 0.999995 0.999996 0.999997 0.999998 0.999999 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 They only appear to be correct up to the first 1. What is the proper way to solve this problem?

    Read the article

  • How to teach Django to non-web programmers? [closed]

    - by Greg
    I've been tasked with providing a workshop for my co-workers to teach them Django. They're all good programmers but they've never done any web programming. I was thinking to just go through the Django tutorial with them, but are there things in there that wouldn't make sense to non-web programmers? Do they need any kind of webdev background first? Any thoughts on a good way to provide the basics so that Django will make sense?

    Read the article

  • Why are some C#4 features allowed even when targeting 3.5?

    - by Greg
    We upgraded to VS 2010, but we haven't yet upgraded to .NET 4.0. All of our projects are still explicitly targeting 3.5. Today, a developer checked in code that looked like this: delegate T Generator<out T>(); As far as I know, "in T" and "out T" are C# 4.0 features. According to our build server, which doesn't have .NET 4.0 installed on it, I'm right. The check-in broke the build. But, why the heck does it build on his machine? Why is VS just ignoring the target framework for the project? Other C# 4.0 features, like the dynamic keyword, do not build on the developer's machine.

    Read the article

  • Unit test approach for generic classes/methods

    - by Greg
    Hi, What's the recommended way to cover off unit testing of generic classes/methods? For example (referring to my example code below). Would it be a case of have 2 or 3 times the tests to cover testing the methods with a few different types of TKey, TNode classes? Or is just one class enough? public class TopologyBase<TKey, TNode, TRelationship> where TNode : NodeBase<TKey>, new() where TRelationship : RelationshipBase<TKey>, new() { // Properties public Dictionary<TKey, NodeBase<TKey>> Nodes { get; private set; } public List<RelationshipBase<TKey>> Relationships { get; private set; } // Constructors protected TopologyBase() { Nodes = new Dictionary<TKey, NodeBase<TKey>>(); Relationships = new List<RelationshipBase<TKey>>(); } // Methods public TNode CreateNode(TKey key) { var node = new TNode {Key = key}; Nodes.Add(node.Key, node); return node; } public void CreateRelationship(NodeBase<TKey> parent, NodeBase<TKey> child) { . . .

    Read the article

  • Conditionally setting the font color of an item in a drop down box in JSF

    - by Greg
    I'm a newbie to web programming, so please bear with me. I am using JSF 1.2 and I want to conditionally set the color of the items in my drop down list. In other words, I have a collection of items that, along with a key and a value, also have a boolean property, warning, that is dynamically set by user action. I want the drop down to show all of the items, but those whose warning property is set to true should be displayed in red. I assume I have to extend the SelectItem class to add in the boolean property. How do I then conditionally set the color of the font of those items whose warning property is set to true in my JSP pages? Thanks in advance

    Read the article

  • Error with custom Class definition in protocol

    - by Greg
    I'm trying to set up a custom delegate protocol and am getting a strange error that I don't understand. I wonder if someone could point out what I'm doing wrong here (I'm still new to Ob-C and protocol use)... The situation is that I've built my own URLLoader class to manage loading and parsing data from the internet. I'm now trying to set up a protocol for delegates to implement that will respond to the URLLoader's events. So, below is my protocol... #import <UIKit/UIKit.h> #import "URLLoader.h" /** * Protocol for delegates that will respond to a load. */ @protocol URLLoadResponder <NSObject> - (void)loadDidComplete:(URLLoader *)loader; - (void)loadDidFail:(URLLoader *)loader withError:(NSString *)error; @end However, I'm getting the following error for both method signatures: Expected ')' before 'URLLoader' I feel like I must be overlooking something small and silly. Any help folks could offer would be greatly appreciated! Whoops ... it was pointed out that I should include URLLoader.h. Here it is: #import <Foundation/Foundation.h> #import "URLLoadResponder.h" /** * URLLoader inferface. */ @interface URLLoader : NSObject { NSString *name; NSString *loadedData; NSMutableData *responseData; NSObject *delegate; BOOL _isLoaded; } @property (nonatomic, retain) NSString *name; @property (nonatomic, retain) NSString *loadedData; @property (nonatomic, retain) NSObject *delegate; - (void)loadFromURL:(NSString *)url; - (void)addCompleteListener:(id)observer selector:(SEL)sel; - (void)removeCompleteListener:(id)observer; - (void)parseLoadedData:(NSString *)data; - (void)complete; - (void)close; - (BOOL)isLoaded; + (NSURL *)makeUrlWithString:(NSString *)url; + (URLLoader *)initWithName:(NSString *)name; @end

    Read the article

  • Stop lazy-loading images?

    - by Greg
    Here's the issue – I followed along with the Apple lazy-load image sample code to handle my graphical tables. It works great. However, my lazy-load image tables are being stacked within a navigation controller so that you can move in and out of menus. While all this works, I'm getting a persistent crash when I move into a table then move immediately back out of it using the "back" button. This appears to be a result of the network connections loading content not being closed properly, or calling back to their released delegates. Now, I've tried working through this and carefully setting all delegates to nil and calling close on all open network connections before releasing a menu. However, I'm still getting the error. Also – short posting my entire application code into this post, I can't really post a specific code snippet that illustrates this situation. I wonder if anyone has ideas for tasks that I may be missing? Do I need to do anything to close a network connection other than closing it and setting it to nil? Also, I'm new to debugging tools – can anyone suggest a good tool to use to watch network connections and see what's causing them to fail? Thanks!

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34  | Next Page >