Free Education: Udacity and Stanford/Berkeley classes

After having had great success with the free university class on Artificial Intelligence (ai-class) at Stanford University a lot more classes are going to start in co-operation with Berkeley University in the following days and weeks:

Apart from that one of the ai-class teachers, Sebastian Thrun, quit his job at Standford and started Udacity, a company taking university and education to a new level of being open and free.
They are going to offer two courses both starting on February 20th:

Other classes coming in 2012:

  • Theory of Computation
  • Operating Systems
  • Computer Networks
  • Distributed Systems
  • Computer Security
  • Algorithms and Data Structures
  • Software Engineering Practices
  • Building Web Applications

Ubuntu User Days

Ubuntu User Days Banner
The Ubuntu User Days on Saturday January 14th 13:30 UTC to Sunday 03:00 UTC on #ubuntu-classroom on the freenode chat network statt. The sessions will be English and aim to teach beginners and intermediate users basic knowledge of Ubuntu.

User days is a series of courses where users can:

  • learn how to install Ubuntu
  • find equivalent programs in Ubuntu
  • learn how to get help
  • learn the basics of how to use Ubuntu
  • learn how to get involved in the community

If you don’t connect to IRC using a Chat Client you can use your web browser and connect here.

For schedule, logs and more information see the Ubuntu Wiki

PHP: variables in variables

Let’s start with an example:

$bar="foo";
$foo="fooVal";
$foo_something="foo_somethingVal";

echo $bar; // prints: foo
echo $$bar; // prints: fooVal
echo ${$bar."_something"} // prints: foo_somethingVal

You can access the value of a variable with a ‘$’ sign. A nice but often a bit tricky feature is to use a second ‘$’ sign to have a variable in the variable name. If you don’t only need the variable itself but an extra string added you have to use ${} around the variable and the string as seen above. The wrapping with the brackets should also be used to adress arrays. Otherwise it’s not clear if the inner or the outer variable should be handled as an array.

EOS (german software for learning object orientated programming)

Only in german:

EOS ist eine kleine Software von Martin Pabst, die an die Erlernung von objektorientierten Sprachen heranführen soll.
Es können einfach 2D-Objekte erstellt werden und verändert werden. Zusätzlich sind einfache Kontrollstrukturen vorhanden (Bedingungen, Schleifen, etc.). Es werden mit dem Programm Beispiele mitgeliefert.

An bayerischen Gymnasien wäre eine Anwendung in der 6. Klasse zur Einführung in die objektorientierte Programmierung denkbar, allerdings ohne die Verwendung von Kontrollstrukturen. Diese sollten erst in der 7. Klasse benutzt werden, möglicherweise erst heranführen mit einem Programm wie Robot Karol

Die Software ist leider nur für Windows verfügbar, kann allerdings auch unter Linux mit ‘wine‘ benutzt werden.

Chat sound notification with jQuery and HTML5

HTML-Code:

<audio preload="auto" id="chatton">
  <source src="sound/chatton.ogg" type="audio/ogg" />
  <source src="sound/chatton.mp3" type="audio/mpeg" />
</audio>

JavaScript-Code in jQuery(document).ready():

jQuery(window).bind("blur", function() {
    hasfocus = false;
});

jQuery(window).bind("focus", function() {
    hasfocus = true;
});

Function to play sound:

function playSound() {
    jQuery("#chatton").get(0).play();
}

Code when receiving message:

if(!hasfocus) {
    playSound();
}

(Used in LocCom-Chat)

Jack: use static sound card names

Everybody who has more than one sound card and uses jack or QjackCtl will have noticed the card’s number changing with reboots. There is an easy method to avoid that.

Find the desired soundcard with cat /proc/asound/cards, which results in something like this:

 0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xf9ffc000 irq 44
 1 [BCF2000        ]: USB-Audio - BCF2000
                      BEHRINGER BCF2000 at usb-0000:00:1d.7-1.3,
                      full speed

The name in the square brackets can be used instead of the number: hw:0 -> hw:Intel.
In QjackCtl this would look like this:
Example in QjackCtl