HOWTO: Add reCAPTCHA support to Discuz! registration form

To prepare for this, you'll need:

  1. Basic understanding to PHP programming language.
  2. A reCAPTCHA API public-private key pair valid to your site. If you don't, please go to the below site to sign up for one: https://www.google.com/recaptcha/admin/create
  3. Some understanding to your own site's template settings.

OK. Let's start.

More

HOWTO: Decompress RAR file in Ubuntu, the GUI way

I couldn't find an article like this. So I made up one.

If you right-click an WinRAR file in Nautilus (Ubuntu's file manager) and open it with File Roller, it would tell you that it cannot decompress such kind of file. Ubuntu has no prompt for any steps to fix this.

File Roller, however, is capable to decompress WinRAR files. You just have to install WinRAR for Linux first.

This is actually very simple:

More

HOWTO: Use Notepad++ to Compile a Java Class

How to setup Notepad++ to compile java class

More

HOWTO: Install Gearman (with PHP extension) on Fedora 11

This is brief instruction for you to install gearmand and gearman's PHP extension on a Fedora 11 server.

More

HOWTO: Install Thrift on Fedora 11

These are the steps to install Thrift on Fedora 11.

More

HOWTO: Install Android Development Tools on Ubuntu 9.10

This is the simple steps to install an Android app development platform on Ubuntu 9.10. It's definitely not a clever method, but it works.

More

Packages to be installed before compile Apache 2.2.11 on Fedora 11

You need to install these packages with YUM first:

  1. yum install gcc gcc-c++
  2. yum install openssl openssl-devel
  3. yum install expat expat-devel

Hong Kong made Ubuntu Netbook for USD$319.9

I kicked around Golden Computer Center, one of the most famous local computer shopping centre. and found an Atom-based netbook priced at HK$2,480. (about US$319.9)!

More

Experiment: Pass by Reference in PHP, part 3

Code:


<?php
class Label {
    var 
$text;
    function 
Label($text) {
        
$this->text $text;
    }
}

$foo = new Label("foo");
$bar["foo"] = &$foo;
unset(
$foo);

var_dump($foo); print "<br/>\n";
var_dump($bar);
?>

More

Experiment: Pass by Reference in PHP, part 2

Code:


<?php

class testObj {
  private 
$flag=FALSE;

  public function 
set_flag() {
    
$this->flag TRUE;
  }

  public function 
get_flag() {
    return 
$this->flag;
  }
}

function 
test_container() {
  static 
$_test_obj;
  if (!isset(
$_test_obj)) $_test_obj = new testObj();
  return array(&
$_test_obj);
}


$array test_container();
$test_obj_1 $array[0];
$array test_container();
$test_obj_2 $array[0];

print 
sprintf("<li>object 1, before set flag: %s</li>\n",
  
var_export($test_obj_1->get_flag(), TRUE));?>

More