Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Blogger_Importer has a deprecated constructor in /home/forthrig/public_html/wp-content/plugins/blogger-importer/blogger-importer.php on line 44
September 2018 | forthright48

Stars and Bars Theorem


Given K variables, $a_1, a_2, a_3 \dots a_K$ and a value $N$, how many ways can we write $a_1 + a_2 + a_3 \dots a_K = N$, where $a_1, a_2, a_3 \dots a_K$ are non-negative integers?

For example, if $K = 3$ and $N=2$, there are 6 solutions.

a b c
2 0 0
0 2 0
0 0 2
1 1 0
1 0 1
0 1 1

Read More

Blogger to WordPress Migration

Blogging on Blogger always has been a hassle. Here are some of the things I found annoying about writing a post on Blogger:

  1. The spacing always got messed up. I had to carefully place <br> tags here and there to keep things consistent.
  2. I had to type in HTML. Why? Cause I had codes in my posts and I wanted to highlight them using SyntaxHighlighter. For that I had to create <pre class="brush:cpp;"> tags. You can’t do that in the normal visual panel.
  3. The most annoying part is when I switched between Visual and HTML view in the editor. It always messed up my clean HTML.
  4. I had to HTML escape my code before pasting it ( < sign would need to be &lt;)

Well, that’s it actually. Writing and editing post on Blogger was a pain.

Now that I wanted to resume blogging again, the Blogger editor was making it hard to get started. It would have been amazing if Blogger had a markdown editor, but it didn’t. Nowadays, I write most of my notes in markdown, which I keep in a git repo: notes.

Then, I also read a recent blog post (TechCrunch: Blogger gets a spring cleaning) on how Google stripped down some of the (already lacking) features from Blogger. Forget about getting a markdown editor, someday the whole platform might disappear.

I had to switch before I continue. And I did. And I am glad that I did.

How did I switch? Well, basically I just followed this tutorial: How To Move Your Blog From Blogger To WordPress

Read More