Where programming puts a human face

Coding recepies

Virtualenv is a great way to manage Python environments. Today I ran into an issue when I had to run the script parts of which required sudo privileges and the rest of it needed all my virtual environment packages. When we run sudo all virtualenv settings (environment variables, aliases, functions, etc) become unavailable.Virtualenv user guide offers following solution:

Currently there is a but in iOS8 custom transitions. When the custom transition is complete, i.e. [transitionContext completeTransition: YES] is called, UIWindow shows empty with no view hierarchy at all. That is seen as a black screen which is appearing instead of destination view controller’s view.
The workaround is to add all views back:

Pascal triangle is one of the most famous recursive problems. It has a simple and elegant implementation in Objective-C as well as in many other languages. It turned out, that formatting the output seems more challenging than actual calculation for triangle elements: