I was writing a class that contained some functional-esque methods. First I wrote them using List as parameters and return types. Then I thought "Hey, you could also use a more generic type!" so I replaced the Lists with Seq, hoping that I could make my stuff faster one day by feeding them something else than lists.
So which general pur...
Im attempting to convert a simple 3D room explorer/configurator app that is a hacky mess into something a little better.
I have now begun separating it out using an MVC pattern, but have found a major performance decrease. I think this is down to the Controller updating the camera parameters in the Model, which is then notifying the vie...
I can't figure out a good design for this.
I have an edit product page. It allows you to change basic product details, product name etc.
Then I have a function to upload images of the product.
I also have a small page for adding different prices based on date ranges for the product.
What I can't figure out, is how to have these on...
Possible Duplicates:
Why build Javascript functions as jQuery plugins?
Am I using too much jQuery? When am I crossing the line?
I am trying to learn jQuery & front-end technologies in general. Right now my point of focus is jQuery. The framework has some really awesome plugins. But at what point does one consider the need fo...
Please don't judge me for what I'm doing because I realise it's a bizzare thing to do but my Boss wants it as an internal tool.
I needed to Sync the tasks with a Microsoft Project File with an outlook calendar via an outlook add on. The add on takes tasks that don't have any sub tasks and places them in the calendar spanning the time o...
Edit: Found duplicate
I've whittled down some problem code to the simplest working case to illustrate the following: my typedef in a pure abstract base class is not being inherited by the derived class. In the code below I'd like to inherit the system_t typedef into the ConcreteTemplateMethod:
#include <iostream>
// pure abstract te...
I am designing a web interface to a certain hardware appliance that provides its own custom API. Said web interface can manage multiple appliances at once. The data is retrieved from appliance through polling with the custom API so it'd be preferable to make it asynchronous.
The most obvious thing is to have a poller thread that polls ...
I was reading the example in this: http://en.wikipedia.org/wiki/Specification_pattern
and it seems an interesting pattern.
The example can be applied as it is, if the different Specs did not share state or pass on information from one to another.
What if each produces some information apart from making the decision that can be reused by...
I am constructing enum values that have a data structure like the following:
enum MetaType {
HUMAN(
new MetaTypeAttribute(AttributeType.BODY, 1, 6),
new MetaTypeAttribute(AttributeType.AGILITY, 1, 6),
new MetaTypeAttribute(AttributeType.REACTION, 1, 6)
),
ORK(
new MetaTypeAttribute(AttributeType.BODY, 4, 9),
new MetaTypeAtt...
Is there such a thing as a manager design pattern that controls how different entities interact?
This is for a project for which the Environment, EnvironmentListener, and Entity classes have been predefined by our professor.
The static class, Environment, has a single EnvironmentListener interface that has a nextAction() method it ju...
On a standard web signup form, users are required to have a unique email for the site.
if the email is already in use, a new user cannot be created with that email - but this opens op for exploiting this to find out, what emails are members of the site (at least check if a specific email is in use).
Making sure a bot cannot mass-query ...
Hi,
I'm working on a project about user contributed recipes and connecting them in different ways. One of the things that i used to do without thinking is whenever there is an edit form e.g. whenever the user is editing a recipe, i redirect the user to a relevant page, the Save Changes button would redirect to the recipe page, or the re...
I've implemented this short example to try to demonstrate a simple delegation pattern. My question is. Does this look like I've understood delegation right?
class Handler:
def __init__(self, parent = None):
self.parent = parent
def Handle(self, event):
handler = 'Handle_' +event
if hasattr(self, handler):...
I friend of mine just posted on Buzz a question:
When you hit "Forgot your password" in most of the pages, they
will send you an email with a link
(most of the time it will expire after
sometime) to reset your pass. In most
cases that link includes something
like a UUID. Is there a name for this
technique? Making an expir...
1) One reason to use encapsulation is that by hidding internal implementation details we are able to modify this details without breaking the existing code – this makes perfect sense
a) But I don't understand the argument that encapsulation should be used in order to prevent users from setting the internal data of an object into an in...
OK i have seen other posts about this but none really specifically answer my question.
Where in an application should validation logic be?
I have a small application that allows new products to be instered into an applications database. There are different products with different fields i.e. product name, order number, description etc...
Is MVC architecture appropriate for an app that is a UI centric app?
Example: you want to build a basic flowchart app. Does it make sense to make the GUI components the view, the "node" and "line" objects part of the model, and the click handlers the controllers?
It feels weird to me because there is not much functionality in the mod...
Possible Duplicate:
Examples of GoF Design Patterns
At an interview a while back I was asked for some examples of Design Patterns within the JDK.
Off the top of my head I was able to identify
Flyweight - as used in the String pool
Singleton - in java.lang.Runtime
Iterator - as used on Collections classes
Not that many.
Wh...
Hi all ,
I am starting to design my own CMS , and i want it to be modular to add more functionality later by me or by any other developer
I put my eyes on joomla CMS (very popular ,robust and extensible)
I want to make a CMS with asp.net to be just skeleton and all functions are done through components
Functions like :-
User manage...
I am new to GWT and getting back to programming after long gap...my question is about MVP implementation in GWT, I have gone through the following post and they were quite helpfull, but i still have some doubts
http://stackoverflow.com/questions/2056/what-are-mvp-and-mvc-and-what-is-the-difference
http://stackoverflow.com/questions/123...