What empty foreach do in PHP

While ago I was fighting with one bug. There was code witch was working, but stop working when I add empty foreach.
  1. //that work with rest of code
  2. function fun(){
  3. $table= array();
  4. //...
  5. return $table;
  6. }
  8. //that do not work with rest of code
  9. function fun(){
  10. $table= array();
  11. //...
  12. foreach( $table as $key => $val ){}
  13. return $table;
  14. }

Canvas – no more Flash

We all know Flash and Java. If you write webpage with it and if your users install it, then they can watch animation elements on your web page. But today I was playing with something new called "Canvas". (more…)

Softpedia certification

Few months ago I create program "Log Watcher" to observe logs of my webpage. I put it to sourceforge.net here so maybe somebody will also use it. In last week I recived emial with information that my program get Softpedia certification. (more…)

python fast tutorial

This tutorial is for thous who can programing but don't know Python language. I will show how to use variables, loops, arrays, functions, and how to write scripts. (more…)

C++ lesson 2 – variables

In that lesson I will describe what are variables. (more…)

too big jquery-ui elements

Yesterday I was installing jquery-ui at one of my websites. When I do that as it was writen in instruction all jquery-ui elements was 2 times bigger. I search a while and find how it was solved in demos at jquery.com. That CSS code:
  1. body{ font: 62.5% "Trebuchet MS", sans-serif;}
  2. .demoHeaders { margin-top: 2em; }
  3. #dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
  4. #dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
  5. ul#icons {margin: 0; padding: 0;}
  6. ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left; list-style: none;}
  7. ul#icons span.ui-icon {float: left; margin: 0 4px;}
Unfortunatly that solution change (destroy) all layout of website. So here is step by step instuction how to do it correct. (more…)

C++ lesson 1 – print text

Basic lesson of programing in C++. I will show how to print text at screen. (more…)

C++ lesson 0 – compiler

In this lesson I will help you do decide which C++ compiler select. I will describe here Microsoft Visual C++ Express, Microsoft Visual Studio Profesional, Codeblocks and g++. Of course you can use different one if you want. (more…)

My old homepage

Today I take my old webpage and put it back to internet at psobieraj.peter-sobieraj.com. Maybe somebody will find it useful. Most parts of that page is in polish only. I was using that wepage to publish useful mathematics materials for friends during studies. (more…)

First post

In Blog | Tags:
This is first post at my blog. And with this very first post I offcialy open my blog. Soon I will add here few interesting projects and useful information.