Thursday, October 25, 2012

Arduino Uno - Data type size

For whatever reason, I simply can’t remember the size and range of the data types Arduino offers. So I have created a small sketch that prints them out.

Here is the result:

--- Variable type: Size in SRAM (bytes) ---
uint8_t: 1
boolean: 1
char: 1
unsigned char: 1
byte: 1
int: 2
unsigned int: 2
word: 2
long: 4
unsigned long: 4
float: 4
double: 4

The sketch with all details can be viewed at Github:Gist.

Tuesday, October 23, 2012

Getting rid of the Amazon credit card ad

I really like Amazon. I shop there a lot, get most of my MP3 from them and I also own three Kindles.

But still, since over a year Amazon tries to sell me their credit card each and every time I view my shopping basket.

image

I was not able to figure out how to disable it, so I created a one line rule for Adblock Plus to get rid of this.

Just click the ABP symbol in Firefox, select Filter preferences, click on the Custom filters tab then click on Add filter group and name the new group (e.g. Amazon CC BS).

Next, click the button right from the new group and select Show/Hide filters if the filter panel is not visible. Click on the Add filter button and add the following rule:

amazon.de##TD[class*="cbcc_column"]

The result should look something like this:

image

What this filter does is to block any HTML element with the class cbcc_column which is where this credit card ad is normally displayed.

The part before “##” tells ABP on which sites this filter should be active, in my case amazon.de. If you are using a different Amazon site, just replace amazon.de with the name of the Amazon site you are using.