Search Results

Search found 3479 results on 140 pages for 'chris condy'.

Page 107/140 | < Previous Page | 103 104 105 106 107 108 109 110 111 112 113 114  | Next Page >

  • How do I organize C# classes that inherit from one another, but also have properties that inherit from one another?

    - by Chris
    I have an application that has a concept of a Venue, a place where events happen. A Venue is owned by a Company and has many VenueParts. So, it looks like this: public abstract class Venue { public int Id { get; set; } public string Name { get; set; } public virtual Company Company { get; set; } public virtual ICollection<VenuePart> VenueParts { get; set; } } A Venue can be a GolfCourseVenue, which is a Venue that has a Slope and a specific kind of VenuePart called a HoleVenuePart: public class GolfCourseVenue { public string Slope { get; set; } public virtual ICollection<HoleVenuePart> Holes { get; set; } } In the future, there may also be other kinds of Venues that all inherit from Venue. They might add their own fields, and will always have VenueParts of their own specific type. My declarations above seem wrong, because now I have a GolfCourseVenue with two collections, when really it should just have the one. I can't override it, because the type is different, right? When I run reports, I would like to refer to the classes generically, where I just spit out Venues and VenueParts. But, when I render forms and such, I would like to be specific. I have a lot of relationships like this and am wondering what I am doing wrong. For example, I have an Order that has OrderItems, but also specific kinds of Orders that have specific kinds of OrderItems.

    Read the article

  • Progressive enhancement of anchor tags to avoid onclick="return false;"

    - by Chris Beck
    Unobtrusive JS suggests that we don't have any onclick attributes in our HTML templates. <a href="/controller/foo/1">View Foo 1</a> A most basic progressive enhancement is to convert an that anchor tag to use XHR to retrieve a DOM fragment. So, I write JS to add an event listener for a."click" then make an XHR to a.href. Alas, the browser still wants to navigate to "/controller/foo". So, I write JS to dynamically inject a.onclick = "return false;". Still unobtrusive (I guess), but now I'm paying the the cost of an extra event handler. To avoid the cost of 2 event listeners, I could shove my function call into the onclick attribute <a href="/controller/foo/1" onclick="myXHRFcn(); return false;"> But that's grodo for all sorts of reasons. To make it more interesting, I might have 100 anchor tags that I want to enhance. A better pattern is a single listener on a parent node that relies on event bubbling. That's cool, but how do I short circuit the browser from navigating to the URL without this on every anchor node? onclick="return false;" Manipulating the href is not an option. It must stay intact so the context menu options to copy or open in new page work as expected.

    Read the article

  • C# Express 2010 Multi-Threading

    - by Chris Evans
    Hi, I have a windows app that I have been running in c# Express 2008 for a year and have been trying to convert it over the last few days to 2010. The problem I am having is it is a multi-threaded application that has to run a series of code every second. What it does is have a main thread, that calls 3 worker threads, waits for them to finish then does some additional processing, sleeps till 1 second and runs again. The problem is part of the code can call a web service that takes 8 seconds to respond, so this bit of code gets called using ThreadPool.QueueUserWorkItem. The problem is when running in 2010 when this part of the code gets called the main thread continues to run but when it awakens the sub threads it hangs until the Threadpool method finishes running. This never happens in 2008. Any suggestions? So far I put that bit of code in it's own thread rather than using Threadpool but same issue.

    Read the article

  • Amazon Product Advertising API: XXX is not a valid value for BrowseNodeId

    - by Chris
    Hello, I am using the Amazon product Advertising API to fetch the product categories. For US categories it is working. But using browse nodes from different sites I get the following error: "569604 is not a valid value for BrowseNodeId. Please change this value and retry your request." I got the browse-nodes from the following site: http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html?BrowseNodeIDs.html Where is the problem? Thanks for your help!

    Read the article

  • LINQ to Entites: How should I handle System.InvalidOperationException when checking for existance of

    - by chris
    I have a many-to-one relationship that users can edit via checkboxes. PK of Foo is ID, and fid contains the id from the checkbox. I'm checking to see if an element exists with: Foo ent; try { ent = ctx.Foo.First(f => f.ID == fid); } catch (System.InvalidOperationException ioe) { ent = new Foo(); } It seems to me that I should be able to do this without throwing an exception. What would be the best way to do this?

    Read the article

  • How can I tell if a <script> tag with a given src attribute is present on the page in ASP.net?

    - by Chris McCall
    Like the title says, I'm trying to find out if I need to include a script library that my ASP.net UserControl needs to work. I don't want to include it multiple times per page, but I want my control to be able to be used multiple times on the same page. How can I, in the codebehind of my control, check to see if a given <script/> tag is present? This is .Net 2.0, no LINQ.

    Read the article

  • Can you modify SQL DB schema in a transaction to know if all changes were applied?

    - by Chris F
    As part of my (new) database version control methodology, I'm writing a "change script" and want the change script to insert a new row into the SchemaChangeLog table if the script is executed successfully, or to reverse changes if any single change in the script fails. Is it possible to do schema changes in a transaction and only if it gets committed to then do the INSERT? For example (psuedo-code, I'm not too good with SQL): SET XACT_ABORT ON BEGIN TRANSACTION PRINT 'Add Col2 to Table1' IF NOT EXIST (SELECT * FROM sys.columns WHERE NAME='Col2' AND object_id=OBJECT_ID('Table1')) BEGIN ALTER TABLE [dbo].[Table1] ADD Col2 int NULL END -- maybe COMMIT here? INSERT INTO SchemaChangeLog VALUES(...) COMMIT TRANSACTION

    Read the article

  • Flashvar to included swf (in php)

    - by Chris
    How to pass a flashvar when I include the swf (to make an embedded player) Something like this does not work.. theme-basePath.'/swf/ebook.swf?xml="test"'; header("Content-Type: application/x-shockwave-flash"); readfile($player); ?

    Read the article

  • DataGridView live display of datatable using virtual mode

    - by Chris
    I have a DataGridView that will display records (log entries) from a database. The amount of records that can exist at a time is very large. I would like to use the virtual mode feature of the DataGridView to display a page of data, and to minimize the amount of data that has to be transferred across a network at a given time. Polling for data is out of the question. There will be several clients running at a time, all of which are on the same network and viewing the records. If they all poll for data, the network will run very slowly. The data is read-only to the user; they won't be able to edit any of it, just view it. I need to know when updates occur in the database, and I need to update the screen with those updates accordingly using virtual mode. If a page of data a user is viewing contains data that has change, he/she will see those updates on that page. If updates were made to data in the database, but not in the data the user is viewing, then not much really changes on the user screen (Maybe just the scroll bar if records were added or removed). My current approach is using SQL server change tracking with the sync framework. Each client has a local SQL Server CE instance and database file that is kept in sync with the main database server. I use the information from the synchronization event to see if any changes were made to the main database and were sync'ed to the client. I need to use the DataGridView virtual mode here because I can't have thousands of records loaded into the DataGridView at once, otherwise memory usage goes through the roof. The main challenge right now is knowing how to use virtual mode to provide a seamless experience to the user by allowing them to scroll up and down through the records, and also have records update on the fly without interfering with the user inappropriately. Has anybody dealt with this issue before, and if so, where I can see how they did it? I've gone through some of the MSDN documentation and examples on virtual mode. So far, I haven't found documentation and/or examples on their site that explains how to do what I am trying to accomplish.

    Read the article

  • Does content always have to be in chronological order in an RSS feed?

    - by Chris Henry
    I run a site where users can upload content that is displayed in a gallery where other users can sort and filter that content. While implementing RSS feeds, I was wondering how common it was for an RSS feed to display items in an order that's different from chronological. For example, displaying content by Most Views first. This could be useful for someone wanting to keep tabs on trending content. How do RSS readers handle this, since most RSS feeds are ordered chronologically?

    Read the article

  • Setting multiple jars in java classpath

    - by Chris Serra
    Is there a way to include all the jar files within a directory in the classpath? I'm trying java -classpath lib/*.jar:. my.package.Program and it is not able to find class files that are certainly in those jars. Do I need to add each jar file to the classpath separately?

    Read the article

  • jQuery delay doesn't work as expected

    - by Chris
    I have the following jQuery code $("#dropdown").hover(function() { $(this).stop(true,true).fadeTo('fast',1); $("#options").stop(true,true).slideDown(); }, function() { $(this).delay(1000).stop(true,true).fadeTo('fast',0.1); $("#options").delay(1000).stop(true,true).slideUp(); } ); What I expect to happen is when the mouse leaves #dropdown it will wait 1 second before continuing. This is not happening. What I am trying to achieve, in case there is a better way, is to leave the drop down menu visible for a second or two after moving your mouse and I would also like to prevent the events from happening again to prevent artifacts and "funnies" if you were to move the mouse over and out from the div very quickly

    Read the article

  • Will Visual Studio 2010 support HTML 5?

    - by Chris
    Since Visual Studio 2010 is slated for release in March of 2010 and HTML 5 is now starting to be used even more widely, I would like to know if Visual Studio will ship with HTML 5 templates, standard controls and support for the more common markup? A definition for support of HTML 5 would be that any new version of Visual Studio should have similar support for code-completion, validation and markup that is currently supported for HTML 4.01 and XHTML 1.0 and 1.1. Update From the Visual Web Develolper Team Blog: HTML 5 intellisense and validation schema for Visual Studio 2008 and Visual Web Developer is for downloading. Follow the instructions posted on the page to install the new scheme. Seems like the Visual Studio Team will be supporting HTML 5 after all.

    Read the article

  • How to track IIS server performance

    - by Chris Brandsma
    I have a reoccurring issue where a customer calls up and complains that the web site is too slow. Specifically, if they are inactive for a short period of time, then go back to the site, there will be a minute-two minute delay before the user sees a response. (the standard browser is Firefox in this case) I have Perfmon up and running, the cpu utilization is usually below 20% (single proc...don't ask). The database is humming along. And I'm pulling my hair out. So, what metrics/tools do you find useful when evaluating IIS performance?

    Read the article

  • What is the standard way to bundle OSGi dependent libraries?

    - by Chris
    Hi, I have a project that references a number of open source libraries, some new, some not so new. That said, they are all stable and I wish to stick with my chosen versions until I have time to migrate to the newer versions (I tested hsqldb 2.0 yesterday and it contains many api changes). One of the libraries I have wish to embed is Jasper Reports, but as you all surely know, it comes with a mountain of supporting jar files and I have only need a subset of the mountain (known) therefore I am planning to custom bundle all of my dependant libraries. So: Does everyone custom-make their own OSGi bundles for open-source libraries they are using or is there a master source of OSGi versions of common libraries? Also, I was thinking that it would be far simpler for each of my bundles simply to embed their dependent jars within the bundle itself. Is this possible? If I choose to embed the 3rd party foc libraries within a bundle, I assume I will need to produce 2 jar files, one without the embedded libraries (for libraries to be loaded via the classpath via standard classloader), and one osgi version that includes the embedded libraryy, therefore should I choose a bundle name like this <<myprojectname>>-<<subproject>>-osgi-.1.0.0.jar ? If I cannot embed the open source libraries and choose to custom bundle the open source libraries (via bnd), should I choose a unique bundle name to avoid conflict with a possible official bundle? e.g. <<myprojectname>>-<<3rdpartylibname>>-<<3rdpartylibversion>>.jar ? My non-OSGi enabled project currently scans for custom plugins via scanning the META-INF folders in my various plugin jars via Service.providers(...). If I go OSGi, will this mechanism still work?

    Read the article

  • WPF Binding not updating when binded object is updated

    - by Chris Klepeis
    I'm trying to bind to a custom control like so: <my:GanttChartTaskListView Name="ganttChartTaskListView1" ItemsSource="{Binding Source={x:Static local:TaskCollection.taskList}}" /> In my WPF Window constructor I add add an item to my taskList, when it loads I can see that item in my custom control, however, when I subsequently add items it does not update. I tried setting Mode=TwoWay, however, then it says the "Path" is required and I'm not familiar with binding like that (this is new to me). Here is my TaskCollection class: namespace ProjectManager { public static class TaskCollection { private static List<TaskItem> _taskList = new List<TaskItem>(); public static List<TaskItem> taskList { get {return _taskList; } set { _taskList = value; } } } } Any ideas? Is there a better / easier way to do this?

    Read the article

  • Stop jQuery animations stacking

    - by Chris
    I have an Options box that hovers in the top right of the webpage. It's opacity is set to 10% so as not to be obstructive to users. When they hover over (mouseenter) it I use jQuery to fade it in and slidedown the content (and the reverse on mouseout). If they do this repeatedly though the animation stacks up and you can sometimes be left in a situation where your mouse is stood still but the box is yo-yoing around. How can I get around this situation? Here is how I currently setup the animations $("#dropdown").mouseenter(function() { $(this).fadeTo('fast',1); $("#options").slideDown(); }); $("#dropdown").mouseleave(function() { $(this).fadeTo('fast',0.1); $("#options").slideUp(); }); Note I am using jQuery only and not any other plugins.

    Read the article

  • Creating a calendar in PHP

    - by Chris T
    Are there any APIs or libraries that make it easy to generate a calendar for a certain month/year? I need to have some sort of admin interface for a "event planner" part of a CMS for a local youth group and I'm at a loss as to how to generate a decent calendar. Note: I only need something to generate the calendar HTML, not manage events. I'll be coding that part.

    Read the article

  • How do I write raw binary data in Python?

    - by Chris B.
    I've got a Python program that stores and writes data to a file. The data is raw binary data, stored internally as str. I'm writing it out through a utf-8 codec. However, I get UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 25: character maps to <undefined> in the cp1252.py file. This looks to me like Python is trying to interpret the data using the default code page. But it doesn't have a default code page. That's why I'm using str, not unicode. I guess my questions are: How do I represent raw binary data in memory, in Python? When I'm writing raw binary data out through a codec, how do I encode/unencode it?

    Read the article

  • How to declare a variable that spans multiple lines

    - by Chris Wilson
    I'm attempting to initialise a string variable in C++, and the value is so long that it's going to exceed the 80 character per line limit I'm working to, so I'd like to split it to the next line, but I'm not sure how to do that. I know that when splitting the contents of a stream across multiple lines, the syntax goes like cout << "This is a string" << "This is another string"; Is there an equivalent for variable assignment, or do I have to declare multiple variables and concatenate them? Edit: I misspoke when I wrote the initial question. When I say 'next line', I'm just meaning the next line of the script. When it is printed upon execution, I would like it to be on the same line.

    Read the article

< Previous Page | 103 104 105 106 107 108 109 110 111 112 113 114  | Next Page >