Creating a Panorama with Hugin

This topic has been covered many times before on other websites, but I thought I would give it a shot here too.

With the latest version of Hugin creating a panorama is almost stupid simple. First, you choose the selection of images that you want to stitch together. Here is the list that I chose:

Part 1Part 1 Part 2Part 2 Part 3Part 3
Part 7Part 7 Part 6Part 6 Part 5Part 5 Part 4Part 4

A Commodore Notebook?

Intro
I recently came across this article about using the Commodore 64 (the most popular model of computer ever produced) in education and the follow up article that suggests the possibility of a Commodore notebook.

Mexican Fajita Style Chicken Dish

And now for something completely different...

A friend requested this recipe after staying with us for a night, so I thought I would put it up here. Disclaimer: I never cook to a recipe, so this is slightly different each time I make it. See the list of options at the bottom to see different variations I have made.

Ingredients

  • 2-3 Chicken Breasts Cut into approx 2"x1/4"x1" pieces
  • 2 Jalapeno Peppers (Chopped Small)
  • 1 Anaheim Pepper (Chopped Small)
  • 1 Medium White Onion (Chopped Large Pieces)

Why is ++i faster than i++ in C++?

I've heard this question come up a few times in C++ programming circles, "Why is ++i faster/better than i++?"

The short answer is: i++ has to make a copy of the object and ++i does not.

The long answer involves some code examples.

int i = 1;
int j = i++; // j is equal to 1, because i is incremented after the value is returned, 
              // which means a copy was made of the old value
int k = ++i; // k is equal to 3, because i is incremented, then returned. No copy is needed

Or a more robust example of the operator overloads:

Do You Know What ++i And i++ Really Do?

An interviewer who thinks he is being clever might present you with a code sample like the following and ask you what the output would be:

//C
#include <stdio.h>
 
void dosomething(int i, int j, int k, int l)
{
  printf("%d, %d, %d, %d\n", i,j,k,l);
}
 
int main(int argc, char **argv)
{
  int i =1;
  dosomething(i++, ++i, i++, ++i);
 
  i = 1;
  printf("%d\n", i++ + ++i + i++ + ++i);
 
  i = 1;
  printf("%d\n", (i++) + (++i) + (i++) + (++i));
}

C++ Loop Optimization: Part 3: Dynamic List Generation

I felt like this topic deserved one more article. (See part 1 and part 2 for the background.)

The question was posed, "what if you make the list of integers dynamically generated?"

So, I came up with this little generator iterator adaptor. It allows you to take any generator function and treat it like a forward iterator:

#include <iostream>
#include <algorithm>
 
template<typename Gen, typename Val, int Size>
class generator_itr
{
  private:
    Gen m_g;
    Val m_cur;
    int m_iteration;
 
  public:

Syndicate content