Canon 6D exposure program number cheet sheet


CA = 0

M = 1
C1 = 1
C2 = 1
P = 2
A+ = 2
Av = 3
Tv = 4
SCN = 7
B = 9


Prestashop update all prices with SQL (fully working)

I had to update all prices of shop made with PrestaShop. Found some tutorials where in that crazy database prices are saved, but none fully working example in one place. I was updating from prices written in Lithuanian Litas to Euros. 1 Euro = 3.4528 Litas So my solution:

PHP Recursive dir size with iterator object

public function getDirSize($dir, $format = true)
    {
        $dir_iterator = new RecursiveDirectoryIterator($dir);
        $iterator = new RecursiveIteratorIterator($dir_iterator, RecursiveIteratorIterator::SELF_FIRST);
        $size = 0;
        foreach ($iterator as $file) {
            $size += $file->getSize();
        }

        if ($format) {
            if ($size / 1048576 > 1) {
                return round($size / 1048576, 1) . ' MB';

                // if the total size is bigger than 1 KB
            } elseif ($size / 1024 > 1) {
                return round($size / 1024, 1) . ' KB';

                // else return the filesize in bytes
            } else {
                return round($size, 1) . ' bytes';
            }
        } else {
            // return the total filesize in bytes
            return $size;
        }
    }

usage:


$size = getDirSize('/dir/to/get/size/');

Phalcon upgrade to 1.3.1 errors after upgrade from 1.2.6

I had plenty of errors after upgrade and the solution to all of them at once is simple - re-install php. Uninstall php/apache/nginx/sql/phpmyadmin - what you have and then install all one after one. start with apache, php, sql then phalcon :)