composition

Compose LINQ-to-SQL predicates into a single predicate.

(An earlier question, http://stackoverflow.com/questions/3782799/recursively-compose-linq-predicates-into-a-single-predicate, is similar to this but I actually asked the wrong question... the solution there satisfied the question as posed, but isn't actually what I need. They are different, though. Honest.) Given the following search te...

Composition issues in entity framework 4: The entity is currently read-only

Using WCF RIA Services and entity framework 4. I have 3 DTOs: School, State, District. The state DTO has a District property with composition. And the School DTO has a State property with composition and a District association. The idea, is that when we create/update a school, we also allow the user to enter the state and district (w...

Help with the logic of an script for composing multiple videos.

Hi All, I'm working on a Video Application and would like to hear some opinionenter code here of other developer about the logic for this section of the application. The application I'm working on will allow two live video streams to be recorded, and combined into a single FLV file. The application will have two "channels", I will hav...

When a module is imported into a Ruby class, is it similar to composition?

When you import a module into a class, is it similar in nature to OOP composition? ...

Can I use icons with RGBA transparency when using GTK+ drag and drop?

Hi, I am in the process of adding drag and drop support to an existing Mono/C#/GTK# application. I was wondering whether it was possible to use RGBA transparency on the icons that appear under the mouse pointer when I start dragging an object. So far, I realized the following: I can set the bitmap in question by calling the Gtk.Drag.S...

What Methods Can Be Employed For Using Composition Over Inheritance?

I have a web application (in ASP.NET MVC) with a Quotations controller. This controller can handle multiple Quotation types, MotorQuotation, PropertyQuotation, etc... Currently it is using inheritance i.e. a Quotation model and it's children, to model the domain. The various children classes have differences in the data they store and n...

How To Handle An Inheritance Hierarchy With One Controller In ASP.NET MVC?

I have an abstract parent class called Quotation, with children MotorQuotation and PropertyQuotation. I am trying to use one controller (QuotationsController) to handle the Quotation hierarchy. How would this be implemented in ASP.NET MVC? Note: Would it be better to use composition? Edit: For instance, one question that could come up...

python function list chained executing?

Hi, In python I defined functions: def foo_1(p): return p + 1 def foo_2(p): return p + 1 def foo_3(p): return p + 1 def foo_4(p): return p + 1 def foo_5(p): return p + 1 I need execute those function as a chain may like this: foo_1(foo_2(foo_3(foo_4(foo_5(1))))) May I know if I can push the functions into a list then execute those...

Composition of composition not working...

Hello, I am currently using RIA services with an object containing a child containing itself a child and it's not working :-( ! I have an update method for the BaseObject and the FirstChild are correctly present in the client but it behaves as if I have no SecondChild object (the type is not event created on the client)... Here are...

makePersistent is appending elements to my list instead of replacing the list

I'm using the GAE datastore with JDO to hold course information. Each Course has a List of GradeDefinition objects (e.g. "A=90%+", "B=80%+", etc) When I try to change the List, the new elements are simply appended behind the old elements. I suspect there is a problem with the way I am using detachable objects and persistence managers....

Some pointers in designing an OO package to link into an exisiting system

Hey everyone, I'd like a few pointers as to a very specific situation i'm in regarding desigining and implementing a package in Java in an object-oriented manner. I hope i can get the idea across in a clear and not so sophisticated manner - or maybe not. Any ideas on useful design patterns to look at? Here goes.. The outline of the pr...