hit counter

Timeline

My development logbook

Riak Content Type

The content-type is important for Riak KV: Various clients will use it to identify the difference between a response where the whole body is the key, or a response that contains siblings

It will also allow you to version your objects better. Here are a few suggestions (of course replace the text between the < >):

  • application/octet-stream – this is usually used for binary data, and is the easiest thing to set the content-type to.
  • application/vnd.<company name>.<useful type name here> – a vendor-specific type, which you can create yourself
  • application/vnd.<company name>.<useful type name here>.v<version number> – another vendor-specific type, which supports versioning.

Source: by Sam Elliott in the mailing list

Riak Allow-multi

I could not create a write conflict situation.

It turns out it is because I did not set the allow_multi property

Here is the command line:

curl -i -XPUT http://riak001:8098/riak/cart -H "Content-Type:application/json" -d '{"props":{"allow_mult":1} }'

Octopress’s Liquid Exception

When I tried to publish a blog post which contains some erlang code, I got this error message

Liquid Exception: undefined method `[]' for nil:NilClass in 2013-08-04-mypost.markdown

It is because in erlang ‘%’ is the comment character. I used ‘%%’ to start a comment and it confuses Jekyll. Switching back to a single ‘%’ fixes the problem.

Var in R

var() in R return sample variance (divide by N-1), not population (divide by N)