Adobe Lightroom 4 tip: show filename in grid view

Normally in grid view only an index number is shown. When you hoover an image, you’ll see the filename and date taken/capture date. When selecting images based on filename this becomes a nightmare if you need to wait until the tooltip is showing.

Fortunately, there’s an option to show the filename in the grid view.

View > View options (ctrl + J) > tab Grid view “compact cell extras’ > check ‘Top label’ > choose copy name of file base name.

CSS use EM as a relative font-size, instead of PX

It goes back to Internet Explorer 3.0, but EMs are still the better way to define font-sizes. It takes a small learning curve to get the hang of it, but when it comes to quick changes in overall font-size, this is the way to go. Default font-size for most common browsers is 16 pixels. There are only three articles you need to read to tame that size with relative ems.

1em = 12pt = 16px = 100%

Useful reads

The EM formula

Child pixels / Parent pixels = Size in EM

Not good at calculating? Use the EM calculator

Still targeting Internet Explorer 6?

While Internet Explorer handles EM, it does so only when the base font is set to a percentage!

body { font-size: 62.5%; }
body wrapper { font-size: 1em; }

Audio noise reduction in Adobe Premiere Pro CS5

So you have bought ‘Adobe Premiere Pro CS5: classroom in a book’ and you are searching for a way to remove noise from an audio file? Your frustration might be skyrocketing when you find out on page 256 you need Adobe Soundboouth to do that and you don’t have an Adobe Master Collection license. Don’t despair, you won’t need Soundbooth to do that or any other third party software like Audacity .

Unfortunately, the book doesn’t mention this trivial solution for such a common problem.

Here’s how you can remove noise from an audio clip in Adobe Premiere itself. The benefit of this procedure is that it doesn’t change the audio-file in any way.

– Make sure you have an audio clip on your timeline
– In the effects panel (normally to the left of the timeline), look for ‘DeNoiser’ (Audio Effects 5.1 (or Audio Effects stereo / Audio Effects mono) > DeNoiser)
– Drag and drop this effect onto the audioclip in the timeline
– Double click the audio clip and it will be loaded into the source monitor (by default the ‘monitor’ to the left)
– Go to the effects control tab/panel: you will notice that the ‘DeNoiser’ has been added here)
– Play around with the settings (I prefer using the custom setting and set the Reduction button to -5Db or anything around that area). Start playing the video in the ‘program monitor’ and listen to the effect on the fly (while changing the settings to your liking)

Clipping Mask: a crop tool for Illustrator CS5

Looking for a crop tool in Illustrator CS5? Try a clipping mask instead! This way all your outside canvas drawings won’t be lost.

  1. Draw a rectangle above the area to be ‘cropped’
  2. Select all layers that need ‘cropping’
  3. Select Object > Clipping mask > Make

Still looking for cropping ways? Here are two examples:

Multiline regular expression problem in PHP 5.3.3

Recently I came across a very strange behaviour in a regular expression I wrote years ago.

The webserver upgraded to PHP 5.3.3 and it suddenly stopped working.

Case as follows: I use PHP to read a text-file and with the aid of PCRE (preg_match & preg_split) I look for certain matches in that text-file. The program splits different paragraphs into seperate records. But suddenly preg_split stopped working:

<?php
$paragraphs = preg_split("/\n\n/",$contents_of_file);
?>

Multiple newlines could not be detected, whereas

<?php
$lines = preg_split("/\n/",$contents_of_file);
?>

generated no problem at all. At first I thought I had to use the multiline modifier /m but that didn’t work out either.

Although a HEX editor didn’t indicate any carriage returns in the text-file I managed to get things working by doing this:

<?php
$paragrapgs = preg_split("/\r?\n\r?\n/",$contents_of_file);
?>

Curious thing: previous and newer versions of PHP (e.g. 5.3.8 in a XAMPP test environment) did not require to look for possible occurrences of carriage returns (\r).

How to import large sql files in XAMPP?

XAMPP is a very easy to use local webserver. Can be slow sometimes, but hey! it’s for testing purposes.

Ever tried to import a large SQL file? Doing so with phpMyAdmin will cause you headaches when tweaking php.ini to accept large data sets: memory_limit, post_max_size, etc…

Ever considered using the shell option? Once you have started your Apache and mySql module in the control panel, click “Shell”.

A command prompt will open and all you need to do is use this command line:

mysql -u root -p <DB_NAME> < <location of your large sql file

Example:

mysql -u root -p test < "d:\sql exports\file.sql"

Use -v to output the import process to screen

mysql -u root -p -v test < "d:\sql exports\file.sql"

Alternative method (no quotations in source command location!)

mysql -u root -p;
use <db-name>;
source C:\Temp\filename.sql;

SQL indexes

Disable indexes before you start importing, re-enable them when completed.

ALTER TABLE `table_name` DISABLE KEYS;
ALTER TABLE `table_name` ENABLE KEYS;

Further reading: https://support.tigertech.net/mysql-large-inserts

ERROR 2006 (HY000) at line 9999: MySQL server has gone away

It’s possible that this error occurs in XAMPP. It’s easily resolved by changing

  • my.ini at “\xampp\mysql\bin\”.
  • change “max_allowed_packet” to a higher value than the default 1M. E.g. 10 MB
  • restart mysql service

Beëindiging van Windows Marketplace for Mobile 6.x

Kennisgeving van beëindiging van Windows Marketplace for Mobile 6.x

8 maart 2012

Beste klant van Windows Mobile 6.x,

Microsoft stopt met de service Windows Marketplace for Mobile voor Windows Mobile 6.x. Lees de onderstaande informatie door als u wilt weten wat er gaat veranderen:

De Windows Mobile 6.x Marketplace-service wordt beëindigd

Vanaf 9 mei 2012 zal de Windows Mobile 6.x Marketplace-service niet meer beschikbaar zijn. Vanaf deze datum kunt u op uw Windows Mobile 6.x-telefoon geen toepassingen meer zoeken, kopen of downloaden via de Windows Mobile 6.x Marketplace-toepassing en -service.

Toepassingen en games die u via de Windows Mobile 6.x Marketplace-service op uw Windows Mobile 6.x-telefoon hebt geïnstalleerd, blijven gewoon werken nadat de service op 9 mei 2012 wordt beëindigd, maar via de Windows Mobile 6.x Marketplace-service zullen geen downloads meer beschikbaar zijn voor deze toepassingen en games.

Onderneem actie

Microsoft raadt u aan te controleren welke toepassingen of games u op uw Windows Mobile 6.x-telefoon hebt geïnstalleerd en eventueel beschikbare updates te downloaden voordat de Windows Mobile 6.x Marketplace-service op 9 mei 2012 wordt beëindigd.

Opmerking: alle telefoongegevens, inclusief toepassingen verkregen via de Windows Mobile 6.x Marketplace-service, gegevens en gebruikerspecifieke instellingen, worden van uw Windows Mobile 6.x-telefoon verwijderd als de gegevens van de telefoon worden gewist of als er een ‘hard reset’ wordt uitgevoerd. De gegevens op een verwisselbare opslagkaart, indien aanwezig, worden bij een dergelijke bewerking eveneens verwijderd.

Windows Mobile-toepassingen en -games die compatibel zijn met Windows Mobile 6, zijn mogelijk nog wel beschikbaar via de ontwikkelaar of een andere marketplace.

Bedankt voor uw vertrouwen in Windows Phone.

-Het Windows Phone-team