Nested CSS with pseudo class

Lately I had a bit of an design issue with a web front end based on classical php/html/css. I wanted to display images in different sizes on different pages. But I wasn´t able to touch the php / html source so my only chance was to work on the css. But – I also wasn´t able to touch the css (pseudo) classes or introduce new ones.

After quite some time of research I discovered, that CSS offers a great way to nest statements so here is what I´ve done.

The original CSS class looked like this:

.td_value_details {
vertical-align: top;
}

And here is how I nested my image size statement in it:

.td_value_details img {max-width: 600px; height: 350px;} {
vertical-align: top;
}

I really didn´t know that this was possible and I´m pretty sure it´s not best practice, but it really does the job.

 

Howto get the relative path of a file / folder in Unix / Linux with PHP

Sometimes you´ll need the relative path of a file or folder stored on your webserver. Especially if you´re one a shared environment this can be a bit tricky sometimes.

Here is a short and easy solution for your problem:

  • create a php file named ‘fullpath.php’
  • open the file and enter the following php code
  • <?php
    $dir = dirname(__FILE__);
    echo "<p>Full path to this dir: " . $dir . "</p>";
    echo "<p>Full path to a .htpasswd file in this dir: " . $dir . "/.htpasswd" . "</p>";
    ?>
  • upload the file to the folder on your webserver which you want to know the path (f.e. www.yourwebserver.com/yourfolder/)
  • open your webbrowser and go to the location you´ve uploaded the file (f.e. www.yourwebserver.com/yourfolder/fullpath.php)
  • enjoy your relative path (which could look f.e. something like this  ‘/var/www/vhosts/yourwebserver.com/httpdocs/yourfolder’)
  • Note: if you plan to use this relative path for other applications you may need to add an additional ‘/’ at the end (‘/var/www/vhosts/yourwebserver.com/httpdocs/yourfolder/’)

Source: http://www.htaccesstools.com/articles/full-path-to-file-using-php/

Virtual Box CompareExchange128 Error on Windows 10 install

If you get the “CompareExchange128” error – a CPU related error  – when trying to install Windows 10 with VirtualBox, Dirk Strauss has the solution for you:

  • shut down the vm
  • open a cmd prompt and point it to the installation directory of your VirtualBox (most likely C:\Program Files\Oracle\VirtualBox)
  • then type “vboxmanage setextradata [vmname] VBoxInternal/CPUM/CMPXCHG16B 1”
  • don´t forget to replace [vmname] with the name of your virtual machine (I had some trouble with blank spaces, so you might wanna rename your VM for a second)
  • restart the vm
  • install Windows 10

New theme & Google Mobile Friendly Test

Due to Google´s recent changes in their search index ranking I had to switch to a “more” mobile compatible theme (as an iOS user I personally really don´t care).

So here it is. In case you may ask why, here´s a brief explanation:

1.) Google decided that websites looking ugly on mobile devices will get a poorer ranking

2.) Nobody wants to fall down the index, so you´ve got to make your website look better on mobile devices (by Google standards)

3.) The mobile guide will help you with more information: https://developers.google.com/webmasters/mobile-sites/?hl=en-EN&utm_source=MFT&utm_medium=incoming-link&utm_campaign=MFT

4.) The mobile friendly test will show if you have a ugly or a good looking website on mobile devices:  https://www.google.com/webmasters/tools/mobile-friendly/

For those of you familiar with the german language I made a short video explanation:


 

Smallftpd – a (very) tiny portable FTP server for Windows

smallftp

Recently I was looking for a small and portable FTP server that needs no installation and can be configured within a minute to perform some file transfers. To my own surprise there weren´t many options on the market and so I ended up using Smallftpd 1.0.3. It seems to be really old though the Sourceforge page speaks of an update in 2013.

Anyway – it did exactly what I wanted, needed no installation, supported passive mode and even a link to a dynamic DNS service.

Smallftpd @ Sourceforge – http://sourceforge.net/projects/smallftpd/

Digidesign 002 Rack / Console Windows 7 64bit driver installation

The Digidesign 002 Rack / Console is still a very common audio interface, mainly because of its high quality. The driver installation in Windows 7 though can be a bit tricky. At first you need the correct driver from here http://avid.force.com/pkb/articles/download/Digi-002-003-Drivers. Be sure to download the correct driver for your interface. As of now it looks like this:

9.0.8. – latest version for 002 Console

9.0.6. – latest version for 002 Rack

After downloading the driver simply install click the exe file and install them. In most cases the Windows Device Manager will still show you the Digidesign 002 & 003 device with no driver installed. Then you have to do the following;

– open the device manager

– right click the digidesign device

– choose update driver

– search the computer for a driver

– choose for a list of drivers on this computer

– all devices => next

– have disk amd point to this directory C:\Programms\Avid\003 (Console)\Streaming

– select the “Avid00Console.inf” file, select Digidesign 002, ignore all the Windows warnings

– check the device manager again => the device should now be listed at audio,video & gamecontrollers

aviddd

 

 

 

Cyberlink Powerdirector 11 & 12 – Hardware encoding not working with Nvidia FX 4800

gpuzRecently I had the problem that after upgrading to Windows 8.1 I couldn´t use the hardware encoding function in Cyberlink Powerdirector 12 anymore.

I had the latest Nvidia drivers (340.52 WHQL) installed and well they were the problem. After downgrading to driver version 333.11 the hardware encoding option was back.

You can download the driver here: http://www.nvidia.de/download/driverResults.aspx/75529/de (Nvidia driver archive)

If you´re uncertain about the program using your graphics card for hardware encoding or not, download the GPU-Z tool from here: http://www.techpowerup.com/gpuz/ and check the “Sensors” tab => GPU Load. After encoding has started the GPU Load should increase dramatically.

 

 

 

GRID Autosport (PC): Stuttering Audio / Video + Slowdowns => POSSIBLE solution on ATI / AMD hardware

If you have stuttering audio & video and / or massive slowdowns in the PC version of GRID Autosport here is a solution that MIGHT help if you´re running AMD / ATI hardware.

1.) Download the latest AMD catalyst drivers from here: http://support.amd.com/en-us/download (at the date of this post 14.4) but DO NOT install them at this moment

2.) Download the AMD Catalyst uninstall utility: http://support.amd.com/de-de/download/catalyst-uninstall-utility but DO NOT run it at this moment

3.) Go to Control Panel => Programs => Programs and Features and look for the AMD Catalyst Install Manager

4.) Click change and then select “Uninstall all AMD components” (Attention: this will remove all amd based drivers (graphics, chipset, etc.))

5.) Reboot your pc

6.) Windows will now install a leagcy graphics driver (things look very messy and very low resolution) or it will install an older version of the catalyst driver (which may be one reason for the grid problems)

7.) Start the AMD Catalyst uninstall utility from step 2 and let it remove all old drivers

8.) Reboot your pc

9.) If your desktop resolution wasn´t already messed up in step 6 it should do so now

10.) Install the AMD catalyst drivers from step 1

11.) Enjoy Grid Autosport without stuttering 🙂

Easybell – zuverlässige Abwicklung und lahmes VDSL

(only in german – sorry)

Ich war bislang Telekom Entertain und VDSL 50 Benutzer. Mit der Qualität und insbesondere der Geschwindigkeit des VDSL 50 Anschlusses war ich SEHR zufrieden. Mit dem Preis weniger. Daher entschloss ich mich nach reiflicher Überlegung zu Easybell zu wechseln.

Die Abwicklung und Neuschaltung klappte 1A. Sogar der Router war rechtzeitig und vorkonfiguriert angekommen. Doch die böse Überraschung kam erst noch. Ziemlich ungläubig blickte ich auf die 18 Mbits Downstream und 2,5 Mbits Upstream den mir die Fritzbox anzeigte. Ich hatte doch VDSL 50 bestellt und das (verdammt nochmal) wollte ich auch haben. Nach einem kurzen und ernüchternden Mailwechsel mit dem Easybell Support war klar – mehr is nich. Angeblich benutzt Easybell wohl die Telefonica-Infrastruktur und damit eine andere (längere) Leitung zu meiner Wohnung als die Telekom.

Mir kamen fast die Tränen, hatte ich doch bisher meinem VDSL 50 Anschluss der Telekom regelmäßig beim “peaken” über die 50 Mbits zugeschaut. Seltsamerweise hat sich die Performance meines Anschlusses auf wundersame Weise doch nochmal erhöht, auf immerhin 25Mbits Down- und 5 Mbits Upstream. Nur leider ist das ziemlich genau die Hälfte von dem was ich haben wollte (und wofür ich auch bezahle).

In diesem Sinne…Finger weg von Easybell, Asche auf mein Haupt und zurück zum großen T.

🙁

Canon MX925 – Wo ist der CD Tray ?

PIXMA-MX92X_Default_tcm83-1018698(only in german – sorry)

Das klingt vielleicht wie ein schlechter Scherz, allerdings ist es mir nicht gelungen, den CD-Tray der zum Bedrucken von CD´s benötigt wird, zu finden. Des Rätsels Lösung: er befindet sich UNTER der Papierkassette. Also Papierkassette herausziehen, umdrehen und schon kommt der CD-Tray zum Vorschein. Diesen dann vorsichtig in die entgegengesetzte Richtung der kleinen Ösen schieben und schon kann das Bedrucken der CD´s beginnen.

An sich ist das kein schlechtes Konzept, nur sollte man dann auch an irgendeiner Stelle erwähnen, dass sich der CD-Tray dort befindet. Denn in den wirklich grausamen Handbüchern konnte ich keinen Hinweis darauf finden, genauso wie in der Kategorie “Was ist im Karton”. Keine Glanzleistung von Canon.

Und wer bei der Benutzung von My Image Garden, dem mitgelieferten Canon Tool verzweifelt, dem kann ich CD Label Print sehr empfehlen. Das Tool ist zwar auch kein Glanzstück, aber damit gelingt zumindestens das problemlose Positionieren und Drucken des Labels.

Bildquelle: http://www.canon.de/For_Home/Product_Finder/Printers/Inkjet/PIXMA_MX925/