Could someone give an example of using inheritance vs composition and also when its best to use composition as opposed to inheritance.
Thanks for any replies.
I have some code that looks like this:
<Expander Header="{Binding SelectedSlot.Name}"
Visibility="{Binding ShowGroupSlot, Converter={StaticResource BooleanToVisibility}}">
<Controls:GroupPrototypeSlotControl Slot="{Binding DataContext.SelectedSlot,
RelativeSource={RelativeSource Mode=FindAncestor, …
I'm developing a JavaScript application that's meant to be run either from a web server (over http) or from the file system (on a file:// URL).
As part of this code, I need to use XMLHttpRequest to load files in the same directory as the page and in subdirectories of the page.
This code works fine ("PASS") when executed on a web…
I'm following the tuitions on XMLHttpRequest 2 from :
https://developer.mozilla.org/en/DOM/XMLHttpRequest/Sending_and_Receiving_Binary_Data
and
http://www.html5rocks.com/en/tutorials/file/xhr2/#toc-send-arraybuffer
They're great tutorials for the client side, and here is a working extract from my script:
var imagebuffer = new…
Where is a good place to go to find a job where I can (frequently) use Haskell?
Just to be clear, I am not asking:
What's the Haskell market like?
Why is Haskell used so little in the industry?
What is Haskell actually useful for?
Nor am I asking you to tell me that Haskell jobs can't be found. That is the default conclusion…
I am using YUI to test my JavaScript app, and want to integrate the test results into my CruiseControl build system. How can I use CruiseControl to run the tests? I initially thought about using the JUnit plugin to drive the tests, but that is a no go.
Does anyone else have this working?
(Please note: Changing either YUI or…
The problem is where a class should be created in my code. An example is I have a UI class and a main logic class that controls other objects.
Should the main logic class create the UI object, or should the UI object create the instance of the main logic class?
An explanation of which method is best and why would be ideal.
…
Hi!
LINQ to Entities has many LINQ methods marked as "Unsupported" (http://msdn.microsoft.com/en-us/library/bb738550.aspx).
Is any way to implement some of these methods by hands? Or I should wait next release of EF?
I'm especially needing this method:
IQueryable<TResult> Select<TSource, TResult>(this…
I'm trying to create a web app that lets users share files with each other through Dropbox. At the moment, Dropbox handles all the sharing, and there's one central Dropbox account running on the web server that shares the folder with the people who want it.
I'm trying to change it so people don't have to accept a…
I have an array (for checkboxes) that I need to pass alongside the regular form in an ajax post, but can't seem to get this to work:
new_data = [a,b,c,d,e];
somedata_assoc = JQuery.param({'choices[]': new_data});
$.ajax({
type: "POST",
url: contract_qurl,
data:…
Everything about this UIButton renders great except the text that's supposed to be on it. NSLog demonstrates that the text is in the right place. What gives?
UIButton *newTagButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[newTagButton addTarget:self…
Hello, I have good familiarity with CSS but for some reason I am unable to achieve the result I want in this case.
Here is the link to my test site
http://danberinger.com/test.html
Keep in mind that I want a 2 column layout and that the background wrapper…
I am kind of new to SVN, I haven't used it in detail basically just checking out trunk and committing then exporting and deploying.
I am working on a big project now with several developers and we are looking for the best deployment process. The one thing we…
I have a RIA service methods which return quite a large amount of (binary) data to my silverlight application. The methods themselves (database access etc) complete quickly, but since I upgraded to v1.0 from the RC2 I've been experiencing timeouts, even when…
Hi,
I am using Eclipse for C++ development on windows. I have also written a code generator that take an xml file and produces several C++ files. The project I am working on is currently setup to use the internal builder. What I would like to do is to…
OK so, I have this problem with my applet. It only paints ONE row before it produces the error.
Here's my code: http://www.so.pastebin.com/RkG5YHVQ
Here's the error: http://www.so.pastebin.com/z1qWpFS6
:\
In my program I've got two data files A and B. The data in A is static and the data in B refers back to the data in A. In order to make sure the data in B is invalidated when A is changed, I keep an identifier for each of the links which is a long…
I'm slowly learning the ins and outs of LINQtoSQL, but this is confusing me.
Here is the statement I have:
IQueryable<IEvent> events = (from e in db.getEvents()
select e).Select(x => SelectEvent(x, null));
…
I'm trying to ensure that my Rhino scripts (running under Java 6) are strict so that if a script developer misspells an expression I want an exception to be thrown. Currently what happens is the expression simply evaluates to "undefined".
Now…
I want to execute a SQL query inside PL/SQL and populate the results into an associative array, where one of the columns in the SQL becomes the key in the associative array. For example, say I have a table Person with columns
PERSON_ID …
Often you just want to notify the user that something has occurred, but there's really no need for any input from them. In this common scenario, I sometimes see code like this:
MessageBox.Show("Something has occurred", "Something",…
We work with IBM products and we typically use IBM Http Servers (read Apache) as a reverse proxy for our application servers. For performance reasons we serve static content (.gif, .jpg, .css, .html etc.) from our http servers, to…
this is likely a naive question, but I want to do this right the first time.
I have a MVC solution which has the following:
Data project - C#
Services project - C#
MVC Web Project - ASP.NET MVC
Test Project
Currently, I…
I'm currently building a HTML/JS AIR application. The application needs to display to the user a different 'window' - dependant on whether this is the first time they've launched the application or not. This part is actually…