Python: Given an array of integers, return a new array such that each element at index i of the new array is the product of all the numbers in the original array except the one at i.

This post is one of my new series solving one problem per day. For those of you solving coding challenges for your next software engineering job, here is one more problem. This problem was asked by Uber. Problem Statement Given an array of integers, return… Read More »Python: Given an array of integers, return a new array such that each element at index i of the new array is the product of all the numbers in the original array except the one at i.

Linux/ Debian / Ubuntu: Restart Apache 2 web server

Use # /etc/init.d/apache2 restart OR $ sudo /etc/init.d/apache2 restart OR $ sudo service apache2 restart OR simply create an alias for the command that works for you. alias rsws=’/etc/init.d/apache2 restart’ Using my alias ‘rswd’ $ rsws [ ok ] Restarting apache2 (via systemctl): apache2.service.

Linux: Add and list aliases

Print all existing aliases alias Add a new alias alias list=’ls -la’ In the above example, an alias list has been added which actually runs the command ls -la

My Github Pages

Just released a new version of Github pages which you can find at fahdi.github.io. Github pages are an interesting feature of github to update a personal portfolio or a project page or any static (or dynamic: look at PakistanJS). You push your code as a static… Read More »My Github Pages

Hello world!

OK, so here is hoping I blog for the next 365 days. Amen to that! Right now, it feels like in the process of making a real catapult, I’d end up with something like that Image was stolen from: http://www.instructables.com/id/Mini-Siege-Engines/