Hi, i'm thinking on doing an undergrad project on building an interpreter for a simple/rudimentary custom language (perl / C like). I would be be glad if someone could point me in the right direction to start. Most of the books/resources i find are on theoretical implementation of compilers. Are there any resources aimed at interpreters ...
The amazing display on the iPhone 4 has made us make higher resolution artwork to take advantage of the new screen.
My question is, what is the better way to apply the images?
Currently, there are two methods to do so:
Using two images: "image.png" and "[email protected]". The problem with this is that, if your app needs a lot of images, t...
I've just discovered that a team I've been working with produces a Windows app that has what seems to me to be a strikingly bad close dialog, it reads:
"Changes have been made that have not been saved to a file. Do you still want to exit the application?" The options are Yes/No and Yes is the default.
Contrast this to the Microsoft Wor...
I'm starting to design a new version of one of my company's telecommunications products, and to provide load balancing and scalability I was considering some kind of (.NET open source) ESB. I'm hoping to boost the throughput of the system by avoiding relational databases and use (perhaps) non-transactional queues feeding into distributed...
I am looking for ideas to create a WPF Brush with a brushed steel look, similar to the MacOSX Panther style, preferably without resorting to an ImageBrush.
Is there a funky way to use a GradientBrush to create this effect?
Thanks in advance!
...
Hi Everyone,
At our company we are developing an application that has a large number of winforms that are all created in the same UI layer, namespace and assembly. Is there a decent way / design pattern to structure this layer?
Our UI layer communicates with the business layer wich consists of mutiple namespace like business.calculatio...
I am looking into creating something similar to a form template system on my web site.
As an example, say I want the users to be able to create form templates (similar to Wufoo, they can define any number of inputs, etc). Then from these created templates, anybody would be able to use these templates, fill them out, and therefore creat...
Python has a built in function sum, which is effectively equivalent to:
def sum(iterable, start):
return start + reduce(operator.add, iterable)
for all types of parameters except strings. It works for numbers and lists, for example.
Why were strings specially left out?
I seem to remember discussions in the Python list for the re...
Lets put some numbers first:
The largest of the list is about 100M records. (but is expected to grow upto 500). The other lists (5-6 of them) are in millions but would be less than 100M for the foreseeable future.
These are always joined based on a single id. and never with any other parameters.
Whats the best algorithm to join such list...
This is a hard one (I think), on a SQL Server 2008 R2 database. I have a NotificationTemplate with zero to many NotificationSmsTemplate child bjects, because our SMS limits messages to 160 characters, I need to send several SMS's in sequence to deliver the whole SMS communication. Per NotificationTemplate, each NotificationSmsTemplate ...
Hi,
We got a scenario where user can create recurring tasks. The recurring task can be of any type, like periodically send reports to this customer on 1st of everymonth, process invoice on every Monday. All these tasks are application specific(not user specific) and can be seen my other users as well. To cater this need, we are creating ...
Our company keeps a MiscUtilities class that consists solely of public static methods that do often unrelated tasks like converting dates from String to Calendar and writing ArrayLists to files. We refer to it in other classes and find it pretty convenient. However, I've seen that sort of Utilities class derided on TheDailyWTF. I'm just ...
The objective of prototype pattern is to clone an object by reducing the cost of creation.
Here is an example:
class Complex {
int[] nums = {1,2,3,4,5};
public Complex clone() {
return new Complex();//this line create a new object, so is it violate the objective of prototype ?//
}
}
class Test2 {
Comp...
In my company, we are using a cross-platform utility library offering a lot of services.
This includes both cross-platform code (e.g. a thread class wrapping either Win32 or pthread API) or every company specific code (e.g. classes to handle proprietary communication protocol between our servers and our clients applications).
We need t...
From what I understand about GTK, if I have a TreeView, I can't just use any widget I want to display information about a column. For text, you need a gtk.CellRendererText. For toggle buttons, a gtk.CellRendererToggle. For anything else, it seems you have to implement yourself, which, from a sample one for buttons that I saw, doesn't loo...
I'm trying to get in the habit of designing the interfaces to my websites at the very beginning before I do any actual coding. I've read "Getting Real" by 37 signals and they recommend doing the interface first, before any actual code is produced.
What exactly is meant by that? Does that mean use pure HTML and CSS to design the site and...
I am looking for an app (preferably open source) that will let us "white board" a non-trivial application. (If it were trivial we wouldn't need to white board it:)
Any suggestions?
...
Hi,
How does one build an application (Gtk/Winforms) with MVP pattern with nested presenters?
I cannot manage to get it right.
Lets say I have a main window (application shell) with a treeview (navigator presenter) and a panel (profile presenter), and want each of those 3 to be separate MVP-components?
public class ApplicationShellPre...
I'm attempting to design an achievement system in Ruby on Rails and have run into a snag with my design/code.
Attempting to use polymorphic associations:
class Achievement < ActiveRecord::Base
belongs_to :achievable, :polymorphic => true
end
class WeightAchievement < ActiveRecord::Base
has_one :achievement, :as => :achievable
end
...
How would you implement this ?
I have the following model :
class Something
{
public string Label { get; set; }
public DateTime Date1 { get; set; }
}
class SomethingStage2 : Something
{
public DateTime Date2 { get; set; }
}
class SomethingStage3 : SomethingStage2
{
public DateTime Date3 { get; set; }
}
And the ...