Friday, September 30, 2016

cx_oracle - use oracle db from python

Start by downloading and installing cx_oracle:

oracle - sqlplus connect from remote machine

sqlplus username/password@host:port/service

oracle 12 - prebuilt vm credentials


Default user:


Default password:


Connecting to db



List user tables in db:
select table_name from user_tables;

Thursday, September 29, 2016

mysql db import fails with message : MySQL server has gone away!

Check the max_allowed_packet size and increase it (i.e. to 64M):

Saturday, September 17, 2016

CSS opacity influences triggering on mouseenter and mouseleave

If an element's opacity<1, then all the mouse events for the divs behind semi-transparent div will fire!

Thursday, September 15, 2016

CSS flex- solution for vertical centering

For container:

  align-items: center;

    -webkit-flex: 1; /* Safari 6.1+ */
    -ms-flex: 1; /* IE 10 */
    flex: 1;

    align-items: center;

More details:

Tuesday, September 13, 2016

AngularJS - if you are calling a function from outside of Angular / scope , always do it inside of $apply()

Otherwise, it will silently fail.

So , this is ok:

function get_ang_scope(){

    var appElement = document.querySelector('[ng-app=kalaApp]');
    var $scope = angular.element(appElement).scope();

    return $scope;


var scope=get_ang_scope();

scope.$apply(function () {
//    scope.updateCustomRequest(data, type, res);


jquery.attr setter wont execute if val is undefined

jQuery tip:

jquery.attr setter wont execute if val is undefined

Sunday, September 11, 2016

Absolute div clipped inside of a relative div

If this happens, make sure that the div which acts as bounding box has it's overflow set to visible. Not to auto or anything else!

Be careful with separate setting of overflow-x and overflow-y, it will probably set other dimension to auto mode.

Thursday, September 8, 2016

Unable to load DLL , added to references - C# 4

Unable to Load DLL xxxxxxxxxxxxxxxxxx: The Specified module could not be found. (Exception from HRESULT 0x8007007E).

The problem could be that a native dll which is need for running the xxxxxxxxxxxxxxxxx DLL is missing. You can either copy it to output/exe folder or add it to path...

Monday, September 5, 2016

Centering absolute divs horizontally

This is potentially useful snippet for centering an absolute div inside of it's relative parent:


It might be necessary to set width for the element too.

:focus class is sometime is ignored, but it can cause problems

If you are having problems determining the causes for your li or div tags odd behavior once you click them, make sure you check the behavior of :focus class on those elements. Maybe default behavior kicks in and makes problems for your design.

Also, if your background color acts strange, you might want to add more tags to your selector. Like

instead of

Sunday, September 4, 2016

Decision trees in Python and R

A nice and helpful article on Decision Trees and their implementation in Python and R.

PSR-1 and PSR-2 coding standards for PHP

Visual aspects of code play a significant role in raising or drowning developer's productivity. In case that there's too much clutte...