examples

MVC alternatives: examples of MVA & AVC?

I'm interested in learning about the alternative patterns to Model-View-Controller, specifically the Model-View-Adapter and Application-View-Controller patterns. Google results tend to be either a high-level overview or Java-based. Can anyone either provide, or point me to, an example of these patterns in either PHP, Python or JavaScr...

Cocoa multi window drag and drop example

I am looking for a cocoa example that illustrates how to drag an image from one window to another. If not I would like to see an example that shows dragging an image from a source and destination in the same window. If anyone has a link to any such examples I would greatly appreciate it. ...

Kohana 3: Example of model with validation

I find examples and tutorials about models and about validation. And I places that say the validation (or most of it at least) should be in the model, which I agree with. But I can't any examples or tutorials that show how that should be done. Could anyone help me with a simple example on how that could be done? Where would you have th...

Java Jackson: Example of @JsonTypeResolver usage

Could not find any examples of @JsonTypeResolver usage in the docs or elsewhere. ...

What are good example R packages written using RUnit or roxygen?

I'm writing an R package that's going to be used by others, so I'm trying to get this one right! I want to use roxygen for documentation and RUnit for unit testing, but I haven't used them before. What packages exist (either on CRAN or elsewhere) that use either of these tools well? ...

Framebuffer Documentation...

Is there any documentation on how to write software that uses the framebuffer device in Linux? I've seen a couple simple examples that basically say: "open it, mmap it, write pixels to mapped area." But no comprehensive documentation on how to use the different IOCTLS for it anything. I've seen references to "panning" and other capabi...

Can I download samples & demos available online for ExtJS?

Hello. Can I download samples & demos available online for ExtJS? ...

Example open source client-server code projects

What are some open source client-server projects which might be best to look at and mimic their code organization style? Java is preferred but not required. Related: I'm still trying to determine an answer to my question from a few minutes ago, "Should client-server code be written in one 'project' or two?" and I think it would benefi...

Example for accessing Tcl functions from Python

I see that elmer makes it possible to run Python code from Tcl. But is it possible the other way around? Could anyone give an example in Python? Update: by this I mean, being able to access Tcl objects, invoke Tcl functions, etc instead of simply running some Tcl code. ...

Java swing examples - Ants running around a world getting food from piles?

I haven't done any swing programming in a while, so I'm looking for some GUI examples that are at least close to what I'm trying to do. The gui that I'll need to be representing is small nodes (let's say ants) travelling around collecting food from food piles (which just means small nodes travelling to bigger nodes). Once the node (ant...

CSRF (Cross-site request forgery) attack example and prevention in PHP

I have an website where people can place a vote like this: http://mysite.com/vote/25 This will place a vote on item 25. I want to only make this available for registered users, and only if they want to do this. Now I know when someone is busy on the website, and someone gives them a link like this: http://mysite.com/vote/30 then th...

Examples of what Lisp's macros can be used for

I've heard that Lisp's macro system is very powerful. However, I find it difficult to find some practical examples of what they can be used for; things that would be difficult to achieve without them. Can anyone give some examples? ...

Real website/-application use cases where dependency injection was useful (excluding unit testing/mocks)?

In what concrete web project(s) (you don't have to name them by name of course), specifically what part of the web-application/website, that you have worked on, has dependency injection proven to be a good choice. Can you give concrete examples where you actually substituted one component for another with DI during the life span of the p...

Searching for a complex and well-designed PHP OOP application to learn from

Basically, I am diving ever deeper into complex programming practices. I've almost no friends that are experienced (or more experienced than me) programmers to learn from, so I am looking for the next best thing - learning from the work of strangers. Can anyone recommend a real world finished and working application written well and OOP...

growl example windows 7

I grabbed the growl for .NET on this page http://www.growlforwindows.com/gfw/developers.aspx i ran the examples and nothing happened. Am i suppose to do something before running the example? I am using windows 7. ...

Websites with horizontal sliding panels

In a recent meeting, I mentioned that I've seen a few websites with horizontal sliding panels and thought the UI was elegant, uncluttered and accessible. Naturally, I was asked to provide examples of those sites, but can't seem to dig up any of them now. Actually, I've been looking on an off for the past few days. (blush) Sooo.... I t...

Can you help me think of problems for my programming language?

I've created an experimental toy programming language with a (now) working interpreter. It is turing-complete and has a pretty low-level instruction set. Even if everything takes four to six times more code and time than in PHP, Python or Ruby I still love programming all kinds of things in it. So I got the "basic" things that are writ...

What are the basics of dealing with user input events in Android?

Hello. I thought I had understood this question, but something is quite wrong here. When the user (me, so far) tries to press keys, nothing really happens, and I am having a lot of trouble understanding what it is that I've missed. Consider this before I present some code to help clarify my problem: I am using Android's Lunar Lander e...

Examples of architecturally well-designed ASP.NET WebForms sites

What's an example of a reasonably modern, well-designed, fairly complex ASP.NET webforms site, with source code available? Particularly that use MVP or MVC patterns. Note: I'm not looking for sites that use the ASP.NET MVC framework. I'm looking for sites built with traditional webforms, even if they happen to use the MVC pattern ...

Restrictons of Python compared to Ruby: lambda's

Hi, I was going over some pages from WikiVS, that I quote from: because lambdas in Python are restricted to expressions and cannot contain statements I would like to know what would be a good example (or more) where this restriction would be, preferably compared to the Ruby language. Thank you for your answers, comments and fe...