Notice: Trying to access array offset on value of type bool in /home/customer/www/flogvit.com/public_html/wp-content/themes/Divi/includes/builder/functions.php on line 2442
Coding | Flogvit

#javascript and parsing param string

Got a little challenge parsing strings like: Little brown="and yellow" fox=1 jumps over=lazy dog I wanted to split it into an array with key/value pairs, so the result would be: var res = [ [ 'Little', undefined ], [ 'brown', 'and yellow' ], [ 'fox', '1' ],...

@nodejs and object sort speed

I was coding a scheduler and needed a sorted array of the schedules, so I started to investigate the speed of different sorting variants I could use. I created a little program (https://gist.github.com/flogvit/c9df93ab37ca4dbd2d7f) to test 4 different variants. For...

IntelliJ and TODO

When you code, it’s often you come up with an idea or shortcoming of your function. It’s easy to code on and think you can remember it later. You don’t, trust me. So what do you do when you’re in an editor like IntelliJ? Well, you add a TODO:...

Node.js and random port

Sometimes you need to open a random port on your node server. You can of course try a random one to see if it fails, but a npm module makes this easy: npm install portfinder var pf = require('portfinder'); var http = require('http'); // If you want to change the first...
%d bloggers like this: