code-sample

Simple Form Sample for Interview?

Help me out, please... After a 9 month dry spell, I've finally gotten an interview for a C# Win forms position. Better yet, the job actually sounds exciting -- as opposed to, "I'll take anything to have a job again." Now, the recruiter sent someone over before me. During that candidate's interview, the questioner asked him to create a...

Visual Studio 2010 Beta 2 myTODO Error message

I have downloaded the myTODO Azure sample application and when trying to run it locally I am receiving the following very puzzling error message. The item "..\MyTodo.WebUx\MyTodo.WebUx.csproj" in item list "ProjectReferenceWithConfiguration" does not define a value for metadata "Configuration". In order to use this metadata, either q...

Sorting CSV in Python

I assumed sorting a CSV file on multiple text/numeric fields using Python would be a problem that was already solved. But I can't find any example code anywhere, except for specific code focusing on sorting date fields. How would one go about sorting a relatively large CSV file (tens of thousand lines) on multiple fields, in order? Py...

Sample code for asynchronous programming in C

Hi, I need to program asynchronous ODBC driver,which need to handle user requested ODBC APIs in asynchronous way. I am desperate to know how to write an asynchronous program portable on all platforms. Can you please provide me a basic C code on how to right asynchronous code? Thanks in advance. ...

Licensing for MSDN code samples

I am preparing several in-depth code samples for prospective employers. Within the sample I have included references to several open source projects, Moq and StructureMap. For some of the functionality I need to modify portions of an expression tree and the standard method is using an ExpressionVistor such as this example/code sample fr...

Advise/Code samples on how to make an application "Cluster Aware"

Hi All, I've browsed the web for resources regarding how to make an application/web application "Cluster Aware" using the Failover Cluster API. I found a lot of technical articles but none written from the programmer perspective. Does someone have any good links or can provide me with code samples or some other input on how to make an a...

An Open Source Project Made With Nettiers

Do you know any open source web application, which used nettiers as DAL inside the project? I want to see that, how thay use it in their's project. ...

.Net SDK or samples for OpenSRS API?

Hi, OpenSRS from Tucows has a reseller API (or rather several APIs) to allow you to register domains, manage DNS settings etc. They have API Toolkits for PHP and Ruby, but does anyone know of a .Net SDK, or have any sample code that they can share, as a basic starting point for the API? Many thanks, Tim ...

Asp.Net MVC Tutorial Unit Tests

I am working through Steve Sanderson's book Pro ASP.NET MVC Framework and I having some issues with two unit tests which produce errors. In the example below it tests the CheckOut ViewResult: [AcceptVerbs(HttpVerbs.Post)] public ViewResult CheckOut(Cart cart, FormCollection form) { // Empty carts can't be checked out i...

Need a sample code to use google calendar in asp.net

Please tell me how to use google calendar in asp.net. i needs a sample code for scheduling in google calendar using asp.net. ...

Rails: using gridify a jqgrid wrapper does not display data

Has someone a working example with sample code. I integrated the plugin as described in http://github.com/linoj/gridify. I see the grid header but no data. i have verified that I am sending data from the controller. Anyone has answers or a complete sample that is download-able? thanks sukanta ...

Is the source code of the demo at WWDC 09, Session 304 available?

At WWDC 09 in Session 304 "Game Development for iPhone, Part 1 (Graphics, Audio)", about 6 minutes after start of the Session, they showed off a small but nice OpenGL ES game demo and repeating over and over again how easy it is to implement. Is that source code of the demo available somewhere for download? ...

How this looping works in c#

Recently, in a book i read this code. Can you define the means of this code and how this code works. int i = 0; for (; i != 10; ) { Console.WriteLine(i); i++; } ...

Need help in page curl animation

Hi, I am developing one static application, which includes the animation like page curl. Is there any way to create the animation like page flipping when the user clicks on the page. Please anybody helps in this, am stroked into this part in my application. Thanks in advance. Vulvaji. ...

Rails Fields For Code Sample

Hi, Can someone explain the following code sample what does "album[photo_attributes][]" mean I found this code here http://infrastacks.com/?p=57 <div class="photo"> <% fields_for "album[photo_attributes][]", photo do |p| %> <p> <%= p.label :Photo %><br /> <%= p.file_field :data, :index => nil %> <%= link_to_function "delet...

pls give reason why this java program always comes to the else part

public class Test { public static void main(String[] args){ if (5.0 > 5) // (5.0<5) for both case it is going to else System.out.println("5.0 is greater than 5"); else System.out.println("else part always comes here"); /*another sample*/ i...

java + increasing performance and scalability

Hi, below is the a code snippet, which returns the object of a class. now the object is basially comparing to some parameter in loop. my concern is what if there are thousands of objects in loop, in that case performance and scalability can be an issue. please suggest how to improve this code for performance part public Widget get(Str...

arrayListOutOfBoundsException... Please Help?

This is my class Debugger. Can anyone try and run it and see whens wrong? Ive spent hours on it already. :( public class Debugger { private String codeToDebug = ""; public Debugger(String code) { codeToDebug = code; } /** * This method itterates over a css file and adds all the properties to an arraylist */ public void searchDu...

What is the explanation of this java code ?

I have the following code : public class Main { public void method(Object o) { System.out.println("Object Version"); } public void method(String s) { System.out.println("String Version"); } public static void main(String args[]) { Main question = new Main(); ...

exhausting all the questions in a xml database

i am developing an App,its like a test series,dere r two version FULL & LITE,for FULL total number of question in d xml database is around 300,& for LITE version its 20,so wen d test starts for lite version,each time a user starts a test,10 questions r being generated randomly one after d oder wid no repeatation,& for full version,its li...