Map Icons Collection is a set of more than 700 free icons to use as placemarks for your POI (Point of Interests) locations on your maps. You can use them on Google Maps with the “My places / My maps” feature or automatically by using the Google Maps API.
Archiv der Kategorie: Coding
csv2array
Wir hatten die Aufgabe, einen Monatskalender für die chirurgische Abteilung in einem Krankenhaus zu schreiben. Der Kalender sollte jeden Tag anzeigen, also auch Tage welche keine ambulanten Untersuchungen, Aufnahmen oder OP Termine beinhalten. Weiters sollte die aktuelle Kalenderwoche dargestellt werden, ebenso allgemeine Termine wie z.B. Schulbeginn, sowie alle Feiertage.
Feiertage und allgemeine Termine sollten als solche gekennzeichnet werden.
Zuerst trugen wir die Termine und Feiertage in ein PHP-Array ein. Aber es zeigte sich bald, dass diese Datei ‘not human readable’ war, Fehler sind nicht leicht erkennbar und mussten mühsam gesucht und korrigiert werden.
$feiertage = array (
"2011-07-02" => array("text" => "Beginn Sommerferien f. Bgld, NÖ, Wien", "type" =>"t"),
"2011-07-09" => array("text" => "Beginn Sommerferien f. Ktn, OÖ, Sbg, Stmk, Tirol, Vbg", "type" =>"t"),
"2011-08-15" => array("text" => "Mariä Himmelfahrt", "type" =>"f"),
"2011-09-03" => array("text" => "Ende Sommerferien für Bgld, NÖ, Wien", "type" =>"t"),
"2011-09-10" => array("text" => "Ende Sommerferien f. Ktn, OÖ, Sbg, Stmk, Tirol, Vbg", "type" =>"t"),
"2011-09-24" => array("text" => "Hl. Rupert", "type" =>"t"),
);
Das ist nur ein Auszug, die originale Liste beinhaltet alle Termine und Feiertage von 2011 bis 2013.
Eine klare Formatierung hilft zwar bei der Lesbarkeit, aber immer noch nicht beim Schreiben bzw. Copy/Paste aus einer verfügbaren Quelle.
$feiertage = array ( "2013-01-01" => array ( "text" => "Neujahr", "type" => "f" ), "2013-01-06" => array ( "text" => "Hl. Drei Könige. Ende Weihnachtsferien", "type" => "f" ), "2013-02-12" => array ( "text" => "Faschingsdienstag", "type" => "t" ), "2013-02-13" => array ( "text" => "Aschermittwoch", "type" => "t" ), "2013-02-14" => array ( "text" => "Valentinstag", "type" => "t" ), );
Einen Ausweg und eine Lösung bietet die PHP Funktion fgetcsv . Wir legten eine CSV-Datei an, und trennten die einzelnen Spalten mit einem Tabulator.
2011-07-02 t Beginn Sommerferien f. Bgld, NÖ, Wien 2011-07-09 t Beginn Sommerferien f. Ktn, OÖ, Sbg, Stmk, Tirol, Vbg 2011-08-15 f Mariä Himmelfahrt 2011-09-03 t Ende Sommerferien für Bgld, NÖ, Wien 2011-09-10 t Ende Sommerferien f. Ktn, OÖ, Sbg, Stmk, Tirol, Vbg 2011-09-24 t Hl. Rupert
Mit einem Script wird dann das File ausgelesen und in ein Array umgewandelt.
$file = $_SERVER['DOCUMENT_ROOT'].'/calendar/feiertage.csv' ;
$handle = fopen ( $file, 'r' ) ;
$DATA = array();
while ( ($data = fgetcsv ( $handle, 1000, "\t" )) != FALSE ) {
$DATA[$data[0]]['type'] = $data[1];
$DATA[$data[0]]['text'] = $data[2];
}
print_r ( $DATA ) ;
Das Array hat nun die gewünschte Form, die Quelle ist überschaubar, leicht zu lesen und zu ergänzen.
Pdftk – The PDF Toolkit
Pdftk – The PDF Toolkit
If PDF is electronic paper, then pdftk is an electronic staple-remover, hole-punch, binder, secret-decoder-ring, and X-Ray-glasses. Pdftk is a simple tool for doing everyday things with PDF documents.
Keep one in the top drawer of your desktop and use it to:
- Merge PDF Documents
- Split PDF Pages into a New Document
- Rotate PDF Pages or Documents
- Decrypt Input as Necessary (Password Required)
- Encrypt Output as Desired
- Fill PDF Forms with FDF Data or XFDF Data and/or Flatten Forms
- Apply a Background Watermark or a Foreground Stamp
- Report on PDF Metrics such as Metadata, Bookmarks, and Page Labels
- Update PDF Metadata
- Attach Files to PDF Pages or the PDF Document
- Unpack PDF Attachments
- Burst a PDF Document into Single Pages
- Uncompress and Re-Compress Page Streams
- Repair Corrupted PDF (Where Possible)
Pdftk allows you to manipulate PDF easily and freely. It does not require Acrobat, and it runs on Windows, Linux, Mac OS X, FreeBSD and Solaris.
ffmpeg
FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video.
ffmpeg home
ffmpeg documentation
19 ffmpeg commands for all needs
ffmpeg is a multiplatform, open-source library for video and audio files. These 19 useful commands cover almost all needs: video conversion, sound extraction, encoding file for iPod or PSP, and more. Weiterlesen
JW Player for Flash and HTML5
Flash & HTML5. Together.
Why choose? Do both.
There has been a great deal of debate about Flash versus HTML5. We think it’s pointless. The revolutionary aspect of the JW Player is that Flash and HTML5 work together as part of a single player. Skins, JavaScript, and soon a library of plugins are supported regardless of which rendering mode you choose.
Want Flash for a uniform desktop experience but need to support the iPad? No problem. Standards junkie and only want HTML5? That’s cool too. Either way. One player does it all.
Why Choose the JW Player?
Because you just need it to work.
There are host of niche video players on the Internet today. HTML5 has enabled people to create simple JavaScript players with ease. But video is hard. In fact, HTML5 makes it even harder. It’s not enough to have a player, but you need a player that works in every browser and on every device, old and new.
The JW Player has evolved through the history of online video since the time Jeroen wrote the first version in 2005. The experience we have developed over those years are built into the JW Player. This is evident in our support for all the major CDNs, YouTube, Adobe’s Flash Media Server, Wowza, RTMP streaming, HTTP streaming, major advertising networks, analytics providers, and more. We have worked with these companies for years. By choosing the JW Player you can rest easy that we will offer the same support for HTML5, as we have for Flash, as the market continues to evolve.
jQuery Masonry
A dynamic layout plugin for jQuery
The flip-side of CSS floats
Web Design Resources and Tools
When developers share, we all win. Thanks to Ethan from Elementiks for making public his amazing list of tools and resources for web development.
Web Design Resources and Tools I Use
A fairly exhaustive list of free tools and resources for web designers and developers focusing on Javascript, PHP, Flash, MySQL, CSS, graphics and general design techniques.
http://elementiks.com/web_resources.php
Thanks also to Jorge Morales who shared this info on google+
BASH Programming
Bash (Unix shell)
From Wikipedia, the free encyclopedia
Bash is a Unix shell written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell (sh). Released in 1989, it has been distributed widely as the shell for the GNU operating system and as the default shell on Linux, Mac OS X and Darwin. It has been ported to Microsoft Windows and distributed with Cygwin and MinGW, to DOS by the DJGPP project and to Novell NetWare.
Bash is a command processor, typically run in a text window, allowing the user to type commands which cause actions. Bash can also read commands from a file, called a script. Like all Unix shells, it supports filename wildcarding, piping, here documents, command substitution, variables and control structures for condition-testing and iteration. The keywords, syntax and other basic features of the language were all copied from sh. Other features, e.g., history, were copied from csh and ksh. Bash is a POSIX shell but with a number of extensions.
The name itself is an acronym, a pun and descriptive. As an acronym, it stands for Bourne-again shell, referring to its objective as a free replacement for the Bourne shell. As a pun, it expressed that objective in a phrase that sounds the same as born again, a term for spiritual rebirth. The name is also descriptive of what it did, bashing together the features of sh, csh and ksh.
Ressources for BASH programming
BASH Programming – Introduction HOW-TO
Advanced Bash Scripting Guide