Add ZXing barcode scanning natively in your Android project in Eclipse

Barcode and QR code scanning is used in many product-related smartphone apps (shopping, inventory management, e-commerce, etc).  This tutorial will show you how you can include scanning functionality natively in your own app using the open source ZXing (Zebra Crossing) library.

(more…)

WordPress Permalinks not working

I’ve had several instances where Permalinks (SEO links) have not immediately worked on new WordPress installations, resulting in “Page Not Found” errors.  This is due to a configuration issue in the webserver (Apache, IIS, etc…).  The fix is simple but might not be obvious if you aren’t familiar with webserver configuration.

(more…)

Search and replace multiple files with Perl

Here is a very handy little perl command for replacing a string in multiple files in a directory:

perl -pi -e 's/search/replace/g;' .

If you want to replace a string in all files containing the string in subdirectories, simply add a backticked recursive grep command:

perl -pi -e 's/search/replace/g;' `grep -r search .`

How to disable a CCK field in Drupal 6

Published by in Drupal on April 28th, 2011

CCK form elements in Drupal 6 are handled differently than standard node elements.  For instance, a standard node field has the ‘disabled’ property:

$element['#disabled']

 

while for a CCK field this becomes

$element['#attributes']['disabled']

(more…)

© possumstew.com