example

Help me find the "ugliest" message queues API

I realize this is a weird question, but I am writing a presentation and I want to discuss the difference between intutivie APIs and unintuitive ones. Intuitiveness has to do with function names, complex signature, etc. I am using JMS as my intuitive example (especially since it's object oriented and the sample code is very obvious). I ...

Example of how to use msilib to create a .msi file from a python module

Can anyone give me an example of how to use python's msilib standard library module to create a msi file from a custom python module? For example, let's say I have a custom module called cool.py with the following code class Cool(object): def print_cool(self): print "cool" and I want to create an msi file using msilib tha...

Examples of outdated software development tools and techologies

I'm writing a paper on software process improvement. As i lack experience from actual software development companies, i made up a company that I'll use for the paper. However I need some examples on outdated tools and technologies they could use so that i have something to improve. I was thinking of CVS as the revision control system (...

Is anybody using twitter (or yammer or laconica) in their software development team? Would like to know your experience.

Hello, I'd like to know about software development teams that use twitter (or yammer or laconica) in their process. What are you reporting? Do you have automated tweet e.g. from build or test machine? Thanks a lot for your answer. ...

Domain Driven Development in C# - example web application

Are there any recommended examples (with source of course) on DDD in C# / Microsoft stack? ...

What is a good example for functional style web programming using javascript?

I'm doing javascript on a daily basis at the moment. I'm coming from an OO background and most of the code I have contact with is somewhat procedural/OO style. I'm looking for good examples that solves more or less typical web programming tasks but in a functional manner. I'm not interested to have any arbitrary example that just looks ...

Y-Combinator Practical Example

I've been reading a bit lately about functional programming and I am trying to grok the Y-Combinator. I understand that you can use the Y-Combinator to effectively implement recursion in a language that doesn't support recursion directly. However, every language that I'm likely to use already supports recursion so I'm not sure how usef...

Hibernate Example OneToMany with compositeKey

Can you give me an example of a Hibernate mapping for the following situation: Parent table(foo) with a simple primary key (foo_id) child table(bar) with a composite key consisting of a> Foreign key to parent table (foo_id) b> key(item) of type string There is one parent to many child The Parent class will have a list of Child objects...

Is This a C++ Unit Test?

Hi, I am trying to formalize my programming practices in preparation to do it professionally (I have been doing it as a hobby for 18 years). Unfortunately they didn’t really teach us useful stuff in school, so I am trying to learn these things on my own. One aspect that I am trying to learn is unit-testing. I have read various things a...

Good little project to do when learning C# WPF

I want to write a little application for myself to learn C# and WPF. The typical hello world in 2009 (twitter client) seems boring. I would like to hear your stands should I do a twitter client? Any other starters I could play around with and get used to c#? (I'm a longtime PHP programmer) ...

Synchro boost example problem

Dear everybody, I have a problem using asio. My client/server application requires only synchronous communication. So, using the examples for synchro from the boost homepage, I have set up two procedures to send and receive data. Their code is as follows: void vReceive(tcp::socket & socket, std::string & szDest){ char szTmp_Buf [BUF...

Working example for a remote OSGI service

Hi , I am new to programming with OSGI. Can anyone provide me a working example of a client/server osgi service invocation. I have been trying to acheve this for the last 2 weeks without any success. My service is being discovered and executed by an eclipse instance in the same machine, but when I try the same thing from another mach...

simple C++ hash_set example

I am new to C++ and STL. I am stuck with the following simple example of a hash set storing custom data structures: #include <iostream> #include <ext/hash_set> using namespace std; using namespace __gnu_cxx; struct trip { int trip_id; int delta_n; int delta_secs; trip(int trip_id, int delta_n, int delta_secs){ th...

Looking for a cocotron example

I have been having a lot of trouble getting cocotron to create a simple window app that can be compiled on the mac and will produce an that will run on the pc. Does anyone have a link to a simple example that I could download where all the setting are correct? This would really help me look and see what the differences are and help me ...

Guideline for code examples in job applications

Very often in job offers one is asked to provide some 'example code' together with the CV. I found it kind of difficult do decide which code is a good choice. Of cause it has to be meaningful code but on the other hand short enough to get a quick overview. It has to be well-documentated but not filled up with messy comments. Okay, sure...

Can someone post an example of creating a boost inv_adjacency_iterator using inv_adjacency_iterator_generator?

Given definitions: typedef typename boost::graph_traits::adjacency_iterator adjacency_iter; typedef typename boost::inv_adjacency_iterator_generator::type inv_adjacency_iter; I am interested in semantics of boost::tie(i, end) = inv_adjacent_vertices((*start); adjacent_vertices works fine where inv_adjacent_vertices fails with the foll...

Unexpected result on a simple example

# Barn yard example: counting heads and legs def solve(numLegs, numHeads): for numChicks in range(0, numHeads + 1): numPigs = numHeads - numChicks totLegs = 4*numPigs + 2*numChicks if totLegs == numLegs: return [numPigs, numChicks] return [None, None] def barnYard(heads, legs): pigs, chickens = solve(l...

Understanding an example

def solve(numLegs, numHeads): for numChicks in range(0, numHeads + 1): numPigs = numHeads - numChicks totLegs = 4*numPigs + 2*numChicks if totLegs == numLegs: return [numPigs, numChicks] return [None, None] def barnYard(heads, legs): pigs, chickens = solve(legs, heads) if pigs == None: print "Th...

Unexpected result in a simple example

def solve(numLegs, numHeads): for numSpiders in range(0, numHeads + 1): for numChicks in range(0, numHeads - numSpiders + 1): numPigs = numHeads - numChicks - numSpiders totLegs = 4*numPigs + 2*numChicks + 6*numSpiders if totLegs == numLegs: return [numPigs, numChicks, numSpid...

a simple/practical example of fuzzy c-means algorithm

i a writing my master thesis on the subject of dynamic keystroke authentication. to support ongoing research, i am writing code to test out different methods of feature extraction and feature matching. my current simple approach just checks if the reference password keycodes matches the currently typed in keycodes and also checks if the...