Tag Archives: tricks

Setting encoding for log4php MySQL table

log4php is best configured using XML file.

Database encoding is best set to UTF-8, since it will allow storing non-Latin values in the log.

It can be achieved by the following modification of the DSN setting line in the XML configuration file (under Appender):

<param name="dsn" value="mysql:host=localhost;dbname=mysql;charset=UTF8" />

Advertisements

Flip mouse wheel direction

Since we have got scroll wheels in our mice and touch-screens in our tablets/phones, we are not really using scroll bars for scrolling any more. So it makes sense to assign the mouse wheel direction to the actual scrolling direction (upwards = upwards), rather than to the position of the scroll thumb. This is how to do it in Windows 7 (fastest way):

  1. Copy this text:
    Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 1 }
  2. Press / click Start.
  3. In search field, type powershell.
  4. In the results, right-click Windows PowerShell, and click Run as Administrator.
  5. In the PowerShell, go to menu (press Alt+Space) > Edit > Paste, press Enter.
  6. PowerShell just returns to the prompt again.
  7. Unplug and plug in your mouse.

That’s it. There will be no response from PowerShell, but the mouse wheel direction should be flipped now.

Taken from: http://superuser.com/a/364353/74819