Oct
20
2007
Tym razem w nieco mniej technicznym tonie, choć nie będzie bez matematyki
Co powinno być szybsze - bezpośrednia podróż z punktu A do punktu B, czy może podróż z punktu A do punktu C, półgodzinna przesiadka i dalsza podróż z punktu C do punktu B?
Na PKP szybciej jest jechać A-C-B niż A-B. Spójrzcie na podlinkowany obrazek, jadąc ze Szczecina pociągiem o 16:27, lepiej jest wysiąść w Poznaniu i wsiąść w inny - tej samej kategorii, bo też pospieszny - pociąg, niż jechać bezpośrednio do Wrocławia. Mimo że dodatkowa przesiadka w Poznaniu trwa 25 minut, a bezpośredni pociąg odjeżdża wcześniej niż ten inny, na miejscu we Wrocławiu to ten inny pociąg będzie wcześniej i to aż o 13 minut

Oct
18
2007
Gosh, this blog gets too technical
I guess I need to start writing some kind of non-IT journal here. You know, the teenage-pink-blog style
Anyway, more for my own reference.
CodeIgniter is a nice and nonintrusive PHP application framework that I’ve grown to like and use it (also commercially). The problem is integrating its MVC with external applications such as CMSes.
Here’s a quick hack I’ve done to make this possible:
1. Create “external” subdirectory under “system” directory of CodeIgniter installation.
2. Place attached files there.
3. Open “system/libraries/Loader.php” file and patch it like this: find line 681 and change
global $OUT;
$OUT->set_output(ob_get_contents());
to
global $OUT;
if (!isset($OUT)) $OUT = $GLOBALS[’ci_external_out’];
$OUT->set_output(ob_get_contents());
4. For example of use, see attached index.php file, basically to call a controller method, just do this:
require_once 'ciexternal.php';
echo ci_external(’controller’, ‘method’);