code-sample

XDS SubmitObjectsRequest message with a XDSFolder?

Does anyone has or point me to a sample SubmitObjectsRequest message with XDSFolder? ...

Can you help with a Delphi code sample for fingerprint recognition?

Do you know where can I find a Delphi code sample for fingerprint recognition from an image file. ...

Sourcecode for Paymentroll example in Robert C. Martin book

Throughout the book "Agile Principles, Patterns, and Practices in C#" by Robert C. Martin a small Paymentroll application is build. While most of the source code is printed in place, some classes are missing and some are incomplete. The book says on the firest page: The book includes many source code examples that are also availabl...

Looking for code samples for generative art

Generative art means pieces of art which are generated by computers. To get an idea, here is a YouTube video. Now, I'm not looking for nice pictures or cool blog posts but for actual code samples which I can run and experiment with. ...

Custom Silverlight splash screen

Has anyone created a custom Silverlight Splash screen to replace the blue balls circular progress? Does anyone have a sample or the best way to do this? ...

Looking for a simple MEF code sample

I'm looking for a simple code sample showing how to use Microsoft Managed Extensibility Framework (MEF). I really like the code at http://blogs.msdn.com/brada/archive/2008/09/29/simple-introduction-to-composite-applications-with-the-managed-extensions-framework.aspx, but it was written for MEF CTP 2 or 3 and the syntax has changed fo...

Simplest sample with 2D sprites in directx 10

As in question, I'm trying to make sprites working but it's very hard and it doesn't display, so if anyone has a simple sample I'd be grateful. ...

Is there any BlackBerrry development books or sample apps available?

Hi, I want to write a BlackBerry mobile application. I've noticed that the information for developing BlackBerry apps is obscure compared to the iPhone. The samples on the BlackBerry site don't have examples that utilize the most common form objects besides lables and buttons. Does anyone know any other sites with BlackBerry Sample...

listing of all methods of a control - like required - iPhone

yesterday I just asked following question. http://stackoverflow.com/questions/1349571/how-to-customize-tableview-section-view-iphone I found some new method. Even in apple documentation I didn't found this method. Is it some thing like hidden methods? Does anybody provides all methods listing? Including sample code. Say for example....

Helper class to wrap the Session for MVC.NET Web development?

In this post the author recommends implementing a Wrapper for the session to ease testing and decoupling the controller code. I will like to obtain ideas on how to implement a good wrapper for this purpose. I see that in CodeProject there is one sample but it looks way more than what I need. EDIT 1: Ok. Thanks to Joshua I have imp...

Where can i get good sample codes and references in PHP for MVC Framework with URL Routing?

I am trying to implement a application which i need to follow mvc framework. But I need to gather some ideas in that. Please give me some suggestions and references which includes some sample codes in PHP with URL routing. ...

Mapping enum with fluent nhibernate

I am following the http://wiki.fluentnhibernate.org/Getting%5Fstarted tutorial to create my first NHibernate project with Fluent NHibernate I have 2 tables 1) Account with fields Id AccountHolderName AccountTypeId 2) AccountType with fields Id AccountTypeName Right now the account types can be Savings or Current So the table Acco...

mouse moved -crosshair cursor

I developed a program to draw polygon triangles. The triangles were drawn using mouse drag. The coordinate of the triangles were stored in array list. Every times the mouse cursor, mouse over on the existing drawn triangles(within the area of triangle), the mouse cursor should turns to "CROSSHAIR_CURSOR", however this were not happened. ...

Java: Max/min value in an array?

It's trivial to write a function to determine the min/max value in an array, such as: /** * * @param chars * @return the max value in the array of chars */ private static int maxValue(char[] chars) { int max = chars[0]; for (int ktr = 0; ktr < chars.length; ktr++) { if (chars[ktr] > max) { max = chars[ktr]; } } return ma...

C++ map question

I have an integral position-based algorithm. (That is, the output of the algorithm is based on a curvilinear position, and each result is influenced by the values of the previous results). To avoid recalculating each time, I would like to pre-calculate at a given sample rate, and subsequently perform a lookup and either return a pre-cal...

Multiplying long values?

class Main { public static void main (String[] args){ long value = 1024 * 1024 * 1024 * 80; System.out.println(Long.MAX_VALUE); System.out.println(value); } } Output is: 9223372036854775807 0 It's correct if long value = 1024 * 1024 * 1024 * 80L;! ...

Problem with printing inside the loop: for

Hi, I have problem reading/println after the first two FOR loop in this method. This is strange. How can I solve this problem? private int spacing() { int n = numberOfTriangles(); ArrayList<Double> list_Xs1 = new ArrayList<Double>(); ArrayList<Double> list_Ys1 = new ArrayList<Double>(); for(Polygon p:triangles){ double cX =...

How can I validate US Social Security Number?

Anyone out there know how to improve this function? I'm not worried about shortening the code, I'm sure this could be done with better regex, I am more concerned about correct logic. I have had a terrible time finding documentation for SSN #'s. Most of the rules I use below have come from other programmers who work in the credit indus...

Making a Java -code more efficient, USACO

I am trying to complete the first exercise of USACO. How can you make the following code more efficient? It seems that the current problem in the program is that its execution takes too much time. Thank you for suggesting the first four sets of improvements! I made a few edits based on your comments. 5th edition of the code /* ...

Licensing Small Programs

I'm a soon to be grad and I'm just starting to work on my personal website. I wrote a couple of small apps that that I would like to use as code samples for potentional employers. I might allow the general public to download and use my apps, and naturally I wouldn't like anyone to just take my code and call it theirs. Do I need to attach...