1. PHP Equal-Sign Operators

    Reading some php code, you might get confused about the difference betweeen =, ==, and === (this single, double, and triple equal signs). Here's a quick summary.

    = (Assignment) Just like in (pretty much) every other programming language.

    == (Equality) Returns true if the two variables have the same value.

    === (Identity) Returns true if ...

    read more
  2. Debuggers as Pesticides

    I thought this was funny:

    Historical footnote: DDT was developed at MIT for the PDP-1 computer in 1961. At that time DDT stood for "DEC Debugging Tape". Since then, the idea of an on-line debugging program has propagated throughout the computer industry. DDT programs are now available for all DEC ...

    read more
  3. Matlab Primes to File

    The MATLAB script below will export 10000 primes to a file named 'primes.txt':

    x=primes(10000); % Insert your own value here
    fopen('primes.txt','w+'); % Insert the file name heref
    printf(ans, '%d\n',x); % Prints a new line between each prime (C-style formatting)
    fclose all;
    read more
  4. Firefox Updating Fix

    This is a problem I used to have with Firefox updates failing when I was running as a Limited User in Windows XP.

    Here are the steps to fix the problem:

    1. Close all running instances of Firefox.
    2. Open an Administrator command prompt by right-clicking on a Command Prompt icon, choose ...
    read more
  5. Adding a User to Sudoers in Fedora 11

    The following shows how to add a user to the "sudoers" file in Fedora 11 (and likely other versions of Fedora), allowing normal users to execute elevated commands with sudo ... instead of needing to switch to root (su -).

    [greg@fedora ~]$ su -
    [root@fedora ~]# chmod +w /etc/sudoers
    [root@fedora ~]# echo ...
    read more

« Page 2 / 3 »