Posts

Showing posts from October, 2008

VMware cursor, etc. key misbehavior under Linux/Ubuntu Intrepid (8.10)

Cursor (arrow) keys acting like the Win key... and other strange key misbehavior caused by inappropriate key mapping? The following solved this problem for me: echo 'xkeymap.nokeycodeMap = true' > ~/.vmware/config resp. echo 'xkeymap.nokeycodeMap = true' >> ~/.vmware/config if ~/.vmware/config already exists (a new line will be appended)

How to search and find files with certain extensions

The lines are self-explaining ...I hope :) find ./ -regex ".*\(py\|html\|tpl\)$" or the same in another notation find ./ -iname "*.py" -or -iname "*.tpl" -or -iname "*.html"

How to convert Decimal in Hex and Hex in Decimal numbers in JavaScript

Trying to convert decimal numbers in hexadecimal numbers and vice versa , I wanted to use the "modulo 16" (to convert decimal to hex numbers) resp. "modulo 10" (to convert hex to decimal numbers) operations but fortunately, before writing the corresponding functions, I have read the corresponding JavaScript reference and found two functions that saved me some useless effort: var base = 16 var decimal = 255 var hexadecimal = 'f0b4' document.writeln('Dec notation: ' + decimal + ' - Hex notation: ' + decimal.toString(base) + '<br/>') document.writeln('Hex notation: ' + hexadecimal + ' - Dec notation: ' + parseInt(hexadecimal, base) + '<br/>')

How to get rounded corners in CSS 3 without images

Below the magic CSS3 property that saves a lot of effort to get rounded HTML element corners: -moz -border-radius: 0 1em 0 1em; -webkit -border-radius: 9px; border-radius: 0 1em 0 1em; /* the second notation is for browsers that already support this CSS3 property */ The " border-radius " CSS property can be applied on any (X)HTML element, including fieldsets and labels . Hereby "-moz-" is the Mozilla/Firefox specific prefix for its experimental support of some CSS 3 properties. "-webkit-" is the corresponding WebKit engine based browser (Chrome, Safari, and Konqueror) prefix. See W3C's CSS 3 Border Module Working Draft 7 for more information!

How to fix: LC_MESSAGES/django.po: format specification for argument doesn't exist in 'msgstr'

I have got this LC_MESSAGES/django.po:48: a format specification for argument 'myVariable' doesn't exist in 'msgstr' msgfmt: found 1 fatal error error message executing django-admin.py with the compilemessages argument. These lines #: templates/main.html.py:75 #, python-format msgid "Doppelstandard %(myVariable)s" msgstr "Double standard ..." in my django.po file and these lines in templates/main.html {% blocktrans myVariable as myVariable %}Doppelstandard {{ myVariable }}{% endblocktrans %} caused this error message. After modifying the above statement to #: templates/main.html:17 templates/main.html.py:75 #, python-format msgid "Doppelstandard %(myVariable)s" msgstr "Double standard %(myVariable)s ..." everything worked well. So I have simply extended the " msgstr " by the encapsulated variable name from the " msgid ".

How to delete all .svn directories in a Subversion folder

Messed up with Subversion and want simply a clean restart ? You can have a clean slate by executing this command which is actually a one-liner shell script find . -name ".svn" -type d -exec rm -rf {} \; in the directory you want to clean from Subversion folders containing its metadata by deleting all directories named ".svn" .