Month: December 2015

I was on StackOverflow the other day and saw a question posed about how one might convert from Decimal to Binary, when the initial information is stored in a string. It seemed like a fun little program to take a whack at, so I did. I’ve posted my answer as well as the code solution below:

Okay let’s break down the process you require here. (only one of an infinite number of ways to do this)

1) Conversion of a number represented as a string type into an integer type.

2) Conversion of the intermediary integer type into a binary number which is held in another string type. (judging by the return type of your function, which could just as easily return an integer by the way and save the headache of representing the binary equivalent as a string)

For step 1: Use the standard library function stoi. It does what you might imagine, extracts the numerical data from the string and stores it in an integer.

So I finally got my hands on the OSVR headset from Razer. I’m not going to lie, it took its sweet time getting here (about 2 months more than the initially projected date) but the sheer degree of awesome that is possessed by a VR headset helped negate all my irritation from the delay.

In other words, I was squealing like a child when I picked it up and began the unboxing. I hope my excitement translates to you, gentle reader!

About now is when the squealing reached supersonic levels.

The HDK itself seems to be divided into:

The headset

HDMI cables for the headset

Some sort of audio cables that I haven’t yet figured out how to use

The power supply

The positional tracking kit (i.e. the Camera, a tripod stand and relevant cabling)

A cleaning brush

A hub for all the cables to connect into

And there you have it!
The OSVR HDK unboxed.

The link below is the official GitHub repository of the OSVR project, and contains all the instructions I needed to get everything setup and test the headset out in an actual VR demo.