concepts

Whats the concept of and differences between 'FrameBuffer' and 'RenderBuffer' in OpenGL?

I'm GL newbie, and currently learning. I'm confusing about concept of FrameBuffer and RenderBuffer. I know that they're required to render, but I want to understand them before use. I know some bitmap buffer is required to store temporary drawing result. The back buffer. And the other buffer required to be seen on screen during those d...

Application which tracks different color blobs from video feed from webcam

I wanted to create an application which tracks four different colored blobs from video feed from the webcam and outputs the x and y co-ordinates of the blob. I would prefer if I code this in Visual C++ but if that is not the best language to use I wouldn't mind exploring some other language. I also stumbled upon OpenCV which seems to be ...

Help Understanding Cross Validation and Decision Trees

I've been reading up on Decision Trees and Cross Validation, and I understand both concepts. However, I'm having trouble understanding Cross Validation as it pertains to Decision Trees. Essentially Cross Validation allows you to alternate between training and testing when your dataset is relatively small to maximize your error estimation...

Books about language paradigms and concepts

What book(s) will you recommend if the goal was to learn Different language paradigms (OO, functional, ..) Different concepts (dynamic/static typed, immutability, ..) In short, i'm looking for a book which describe and compares different language paradigms and concepts possibly with examples for real languages like Java, Lisp, Erlang...

Default template arguments for function templates

Why are default template arguments only allowed on class templates? Why can't we define a default type in a member function template? For example: struct mycclass { template<class T=int> void mymember(T* vec) { // ... } }; Instead, C++ forces that default template arguments are only allowed on a class template. ...

Good websites and/or books to learn game algorithms?

I'm interested in learning video game algorithms. (For iPhone particularly, but generally as well. I assume certain concepts are the same.) I am best off (personally) learning from a book but websites are useful too. What has helped you learn game programming algorithms and concepts? EDIT: As per request, I'll clarify the types of alg...

What is 'Pattern Matching' in functional languages?

I'm reading about functional programming (in academic purpose) and I've noticed that Pattern Matching is mentioned in many articles as one of the core features of functional languages. Can someone explain for a Java/C++/JavaScript developer what does it mean? ...

Purpose of singletons in programming

This is admittedly a rather loose question. My current understanding of singletons is that they are a class that you set up in such a way that only one instance is ever created. This sounds a lot like a static class to me. The main differnce being that with a static class you don't / can't instance it, you just use it such as Math.pi()....

What is 'document data store' and 'key-value data store'?

What is document data store? What is key-value data store? Please, describe in very simple and general words the mechanisms which stand behind each of them. ...

Does python have one way of doing things?

I have always seen in python articles/books that python is simple and it has only one way of doing things. I would like someone to explain to me this concept keeping in mind the example below, if I wanted to get the min and max values of sequence I would do the following; seq=[1,2,3,4,5,6] min(seq) #1 max(seq) #6 but I can also do t...

What way to use the CGContext to draw is suitable?

I know that the CGContext cannot call it to draw directly, and it needs to fill the drawing logic in the drawInContext, and call the CGContext to draw using "setNeedsDisplay", so, I designed a cmd to execute, but it cause some problems... like this : http://stackoverflow.com/questions/2617827/why-i-cant-draw-in-a-loop-using-uiview-in-i...

How do you think while formulating Sql Queries. Is it an experience or a concept ?

I have been working on sql server and front end coding and have usually faced problem formulating queries. I do understand most of the concepts of sql that are needed in formulating queries but whenever some new functionality comes into the picture that can be dont using sql query, i do usually fails resolving them. I am very comfort...

Correct Interactive Website System Design Concepts / Methods?

Hi all, I hope this question isn't too open ended, but a nudge in the right direction is all I need! I am currently building an online accounting system - the idea is that users can register, log in, and then create customers, generate invoices and other documents and eventually print / email those documents out. I am a Java programme...

conceptual question : what do performSelectorOnMainThread do?

Hello all, I just come across this strange situation . I was using the technique of lazy image loading from apple examples . when I was used the class in my application it gave me topic to learn but don't what was actually happening there . So here goes the scenario : I think everybody has seen the apple lazytableimagesloading . I...

ASP.NET MVC Web Controls - good or bad

What are your opinions on using web controls in an MVC context? I came across a good discussion here http://odetocode.com/Blogs/scott/archive/2009/04/09/asp-net-mvc-controls-and-good-versus-evil.aspx but would like to know what the community thinks. ...

How to pull a RANDOM and UNIQUE record from SQL via LINQ.

Okay, I found lots of posts on SO about how to pull a RANDOM item from the database when using LINQ. There seems to be a couple of differnet ways to handle this. What I need to do though is pull a RANDOM item from the database that the user has not seen before. The data I am pulling from the database is very small. Is there any way I ca...

Collision detections and how efficient they are

How exactly do you implement collision detection? What are the costs involved? Do different platforms(c/c++, java, cocoa/iphone, flash, directX) have different optimizations for calculating collisions. And lastly are there libraries available to do this for me, or some that I can just interpret for my platform of choice? As I understan...

Where does static variable work in ASP.NET page?

I had an interview today and every thing was going very good, but then an interviewer asked me a question Where Does Static Variable Work in C#- At Application Level or At Page Level. I was not very much clear about this answer as I only knew that static variables are stored on heap and I didn't knew anything about web related thing. ...

Is www.example.com/post/21/edit a RESTful URI? I think I know the answer, but have another question.

I'm almost afraid to post this question, there has to be an obvious answer I've overlooked, but here I go: Context: I am creating a blog for educational purposes (want to learn python and web.py). I've decided that my blog have posts, so I've created a Post class. I've also decided that posts can be created, read, updated, or deleted (s...

Instantiate a form, then find it later, without showing it initially

I am having a problem that is strange to me but hopefully is not so strange to someone else. : ) Some background: I am working on a simple IM client that allows the user to broadcast messages to multiple recipients. The goal is to create a chat form for each of the recipients containing the text of the broadcast message, then show that...