design

How to create many div's with 100% height?

I need a html document, that contains multiple div's with 100% height (screen filling) one below the other. I have tried to apply every element a height of 100%, but that won't work seamless nor clean. Maybe there is a option with JavaScript? I don't have an idea. Please suggest me your solutions. chris ...

Static and default constuctor

A non static class can have static as well as default constructor at the same time. What is the difference between these two constructors? When shall I go for only static or static with default constructor? ...

Should I subclass UIControl or UIView to implement a canvas to handle touch events?

I have and EntryEditor that allows users to add postit's (views with a UItextView in them) onto it and move them around. I'm working on handling touch events: making it so only one postit is selected at a time, and unselecting the postit if the user touch's outside any postit. I've implemented the touch handling in the postit's, and I'...

Qt - multiple copies of the same app open & settings syncronisation

I have a pretty standard Qt GUI application. It uses Qt's QSettings to store a number of settings, and it all works fine. However, when multiple copies of the application are launched, and settings are changed in one or the other, the different copies can appear inconsistent (as one has the "old" copy of the data). What are the prefer...

What is the minimum needed to make a BindingList<myClass> available in VS 2008 Designer

I am setting the datasource of a control at runtime to BindingList which works fine. But I would prefer if I could see this in the designer which would mean that I could select the datamember properties at design time, rather than having to set them at runtime also. What is the minimum requirements to allow this? ...

Securing input of private / protected methods?

Hello, normally, all sane developers are trying to secure input of all public methods (casting to proper types, validating, sanitizing etc.) My question is: are you in your code validating also parameters passed to protected / private methods? In my opinion it is not necessary, if you securize properly parameters of public methods and ...

Unit Testing User Interface. What is an effective way ?

I have an accounting & payroll client/server application where there are several input form with complex data validation rules. I am finding an effective way to perform unit testing of user interface. For complex validation rules I mean: "Disable button X if I Insert a value in textfield Y" "Enable a combobox if I insert a value in a...

[Java/OO] Question about the design of dynamic subclass hierarchy handling.

I always tend to run into the following design problem that I'm never quite sure how to best resolve. It usually starts with a hierarchy of Animals at my Circus: Animal Cat BigCat Dog Elephant ... Now, each Animal needs to be trained, so that there is a separate method for each: public interface Trainer { v...

C# Memoization of functions with arbitrary number of arguments

I'm trying to create a memoization interface for functions with arbitrary number of arguments, but I'm failing miserably I feel like my solution is not very flexible. I tried to define an interface for a function which gets memoized automatically upon execution and each function will have to implement this interface. Here is an example w...

Database with "Open Schema" - Good or Bad Idea?

The co-founder of Reddit gave a presentation on issues they had while scaling to millions of users. A summary is available here. What surprised me is point 3: Instead, they keep a Thing Table and a Data Table. Everything in Reddit is a Thing: users, links, comments, subreddits, awards, etc. Things keep common attribute like up/down...

Separating code logic from the actual data structures. Best practices?

I have an application that loads lots of data into memory (this is because it needs to perform some mathematical simulation on big data sets). This data comes from several database tables, that all refer to each other. The consistency rules on the data are rather complex, and looking up all the relevant data requires quite some hashes ...

Where can I get a theme/template suitable for a webapp?

I'm building a simple web application that is mainly going to be displaying small tables of data back to the user. The problem is I can't do design to save my life. I need a simple web 2.0 style template that is CSS/HTML compliant. I know about http://themeforest.net and http://www.oswd.org/. Just wondering if there are any other sites t...

In web project can we write core services layer without knowledge of UI ?

I am working on web project. We are using flex as UI layer. My question is often we are writing core service layer separately from web/UI layer so we can reuse same services for different UI layer/technology. So practically is it possible to reuse same core layer services without any changes/addition in API with different kind of UI tech...

How to model file system operations with REST?

There are obvious counterparts for some of file systems' basic operations (eg. ls and rm), but how would you implement not straightforwardly RESTful actions such as cp or mv? As answers to the question How to implement copy paste of a resource in REST? suggest, the preferred way of implementing cp would include GETting the resource, DEL...

What considerations should be made when creating a reporting framework for a business?

It's a pretty classic problem. The company I work for has numerous business reports that are used to track sales, data feeds, and various other metrics. Of course this also means that there is a conglomerate of disparate frameworks, ASP.net pages, and areas where these reports can be found. There have been some attempts at consolidating ...

Updating access 2000 database through code in VB6

I have an application that uses an access 2000 database currently in distribution. I need to update one of the recordsets with additional fields on my customer's computers. My data controls work fine as I have them set to connect in access 2000 format but when I try to open the database in code, I get an unrecognized data format error. W...

Entity Framework with RIA services, Silverlight - tradeoff of decoupling versus rapid development

I've been playing around lately with Entity Framework, WCF RIA Services, and Silverlight 4. I'm impressed by how rapidly you can develop an application with these tools, and you get a lot "for free", such as the Silverlight UI automatically knowing about certain validations that are included as DataAnnotations on the EF model. However,...

Unity in C# for Platform Specific Implementations

My program has heavy interaction with the operating system through Win32API functions. Now I want to migrate my program to run under Mono under Linux (No wine), and this requires different implementations to the interaction with the operating system. I started designing a code that can have different implementation for different platfor...

Interesting open-source APIs (Java) for self-education?

Which is your top 3 open-source APIs (in Java) you recommend as an example of well-designed piece of art? That would be code that you had pleasure to browse through and got some insights from it. Any problem domain acceptable. Emphasis here is on educational/study quality of code, complexity level - intermediate to top. Thanks a lot fo...

Parallel programming, are we not learning from history again?

I started programming because I was a hardware guy that got bored, I thought the problems being solved in the software side of things were much more interesting than those in hardware. At that time, most of the electrical buses I dealt with were serial, some moving data as fast as 1.5 megabit!! ;) Over the years these evolved into para...