/*************************************************************************************
 * javascript.php
 * --------------
 * Author: Ben Keen (ben.keen@gmail.com)
 * Copyright: (c) 2004 Ben Keen (ben.keen@gmail.com), Nigel McNie (http://qbnz.com/highlighter)
 * Release Version: 1.0.8.1
 * Date Started: 2004/06/20
 *
 * JavaScript language file for GeSHi.
 *
 * CHANGES
 * -------
 * 2008/05/23 (1.0.7.22)
 *  -  Added description of extra language features (SF#1970248)
 * 2004/11/27 (1.0.1)
 *  -  Added support for multiple object splitters
 * 2004/10/27 (1.0.0)
 *  -  First Release
 *
 * TODO (updated 2004/11/27)
 * -------------------------
 *
 *************************************************************************************
 *
 *     This file is part of GeSHi.
 *
 *   GeSHi is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   GeSHi is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with GeSHi; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 ************************************************************************************/

$language_data = array (
    'LANG_NAME' => 'Javascript',
    'COMMENT_SINGLE' => array(1 => '//'),
    'COMMENT_MULTI' => array('/*' => '*/'),
    //Regular Expressions
    'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"),
    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
    'QUOTEMARKS' => array("'", '"'),
    'ESCAPE_CHAR' => '\\',
    'KEYWORDS' => array(
        1 => array(
            'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
            'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
            'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
            'while', 'write', 'with'
            ),
        2 => array(
            'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
            'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
            'protected', 'public', 'super', 'true', 'use', 'var'
            ),
        3 => array(
            // common functions for Window object
            'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home',
            'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
            'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status',
            'stop',
            )
        ),
    'SYMBOLS' => array(
        '(', ')', '[', ']', '{', '}',
        '+', '-', '*', '/', '%',
        '!', '@', '&', '|', '^',
        '<', '>', '=',
        ',', ';', '?', ':'
        ),
    'CASE_SENSITIVE' => array(
        GESHI_COMMENTS => false,
        1 => false,
        2 => false,
        3 => false
        ),
    'STYLES' => array(
        'KEYWORDS' => array(
            1 => 'color: #000066; font-weight: bold;',
            2 => 'color: #003366; font-weight: bold;',
            3 => 'color: #000066;'
            ),
        'COMMENTS' => array(
            1 => 'color: #006600; font-style: italic;',
            2 => 'color: #009966; font-style: italic;',
            'MULTI' => 'color: #006600; font-style: italic;'
            ),
        'ESCAPE_CHAR' => array(
            0 => 'color: #000099; font-weight: bold;'
            ),
        'BRACKETS' => array(
            0 => 'color: #009900;'
            ),
        'STRINGS' => array(
            0 => 'color: #3366CC;'
            ),
        'NUMBERS' => array(
            0 => 'color: #CC0000;'
            ),
        'METHODS' => array(
            1 => 'color: #660066;'
            ),
        'SYMBOLS' => array(
            0 => 'color: #339933;'
            ),
        'REGEXPS' => array(
            ),
        'SCRIPT' => array(
            0 => '',
            1 => '',
            2 => '',
            3 => ''
            )
        ),
    'URLS' => array(
        1 => '',
        2 => '',
        3 => ''
        ),
    'OOLANG' => true,
    'OBJECT_SPLITTERS' => array(
        1 => '.'
        ),
    'REGEXPS' => array(
        ),
    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
    'SCRIPT_DELIMITERS' => array(
        0 => array(
            '<script type="text/javascript">' => '</script>'
            ),
        1 => array(
            '<script language="javascript">' => '</script>'
            )
        ),
    'HIGHLIGHT_STRICT_BLOCK' => array(
        0 => true,
        1 => true
        )
);

?>
/*************************************************************************************
 * javascript.php
 * --------------
 * Author: Ben Keen (ben.keen@gmail.com)
 * Copyright: (c) 2004 Ben Keen (ben.keen@gmail.com), Nigel McNie (http://qbnz.com/highlighter)
 * Release Version: 1.0.8.1
 * Date Started: 2004/06/20
 *
 * JavaScript language file for GeSHi.
 *
 * CHANGES
 * -------
 * 2008/05/23 (1.0.7.22)
 *  -  Added description of extra language features (SF#1970248)
 * 2004/11/27 (1.0.1)
 *  -  Added support for multiple object splitters
 * 2004/10/27 (1.0.0)
 *  -  First Release
 *
 * TODO (updated 2004/11/27)
 * -------------------------
 *
 *************************************************************************************
 *
 *     This file is part of GeSHi.
 *
 *   GeSHi is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   GeSHi is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with GeSHi; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 ************************************************************************************/

$language_data = array (
    'LANG_NAME' => 'Javascript',
    'COMMENT_SINGLE' => array(1 => '//'),
    'COMMENT_MULTI' => array('/*' => '*/'),
    //Regular Expressions
    'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"),
    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
    'QUOTEMARKS' => array("'", '"'),
    'ESCAPE_CHAR' => '\\',
    'KEYWORDS' => array(
        1 => array(
            'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
            'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
            'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
            'while', 'write', 'with'
            ),
        2 => array(
            'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
            'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
            'protected', 'public', 'super', 'true', 'use', 'var'
            ),
        3 => array(
            // common functions for Window object
            'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home',
            'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
            'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status',
            'stop',
            )
        ),
    'SYMBOLS' => array(
        '(', ')', '[', ']', '{', '}',
        '+', '-', '*', '/', '%',
        '!', '@', '&', '|', '^',
        '<', '>', '=',
        ',', ';', '?', ':'
        ),
    'CASE_SENSITIVE' => array(
        GESHI_COMMENTS => false,
        1 => false,
        2 => false,
        3 => false
        ),
    'STYLES' => array(
        'KEYWORDS' => array(
            1 => 'color: #000066; font-weight: bold;',
            2 => 'color: #003366; font-weight: bold;',
            3 => 'color: #000066;'
            ),
        'COMMENTS' => array(
            1 => 'color: #006600; font-style: italic;',
            2 => 'color: #009966; font-style: italic;',
            'MULTI' => 'color: #006600; font-style: italic;'
            ),
        'ESCAPE_CHAR' => array(
            0 => 'color: #000099; font-weight: bold;'
            ),
        'BRACKETS' => array(
            0 => 'color: #009900;'
            ),
        'STRINGS' => array(
            0 => 'color: #3366CC;'
            ),
        'NUMBERS' => array(
            0 => 'color: #CC0000;'
            ),
        'METHODS' => array(
            1 => 'color: #660066;'
            ),
        'SYMBOLS' => array(
            0 => 'color: #339933;'
            ),
        'REGEXPS' => array(
            ),
        'SCRIPT' => array(
            0 => '',
            1 => '',
            2 => '',
            3 => ''
            )
        ),
    'URLS' => array(
        1 => '',
        2 => '',
        3 => ''
        ),
    'OOLANG' => true,
    'OBJECT_SPLITTERS' => array(
        1 => '.'
        ),
    'REGEXPS' => array(
        ),
    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
    'SCRIPT_DELIMITERS' => array(
        0 => array(
            '<script type="text/javascript">' => '</script>'
            ),
        1 => array(
            '<script language="javascript">' => '</script>'
            )
        ),
    'HIGHLIGHT_STRICT_BLOCK' => array(
        0 => true,
        1 => true
        )
);

?>
/*************************************************************************************
 * javascript.php
 * --------------
 * Author: Ben Keen (ben.keen@gmail.com)
 * Copyright: (c) 2004 Ben Keen (ben.keen@gmail.com), Nigel McNie (http://qbnz.com/highlighter)
 * Release Version: 1.0.8.1
 * Date Started: 2004/06/20
 *
 * JavaScript language file for GeSHi.
 *
 * CHANGES
 * -------
 * 2008/05/23 (1.0.7.22)
 *  -  Added description of extra language features (SF#1970248)
 * 2004/11/27 (1.0.1)
 *  -  Added support for multiple object splitters
 * 2004/10/27 (1.0.0)
 *  -  First Release
 *
 * TODO (updated 2004/11/27)
 * -------------------------
 *
 *************************************************************************************
 *
 *     This file is part of GeSHi.
 *
 *   GeSHi is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   GeSHi is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with GeSHi; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 ************************************************************************************/

$language_data = array (
    'LANG_NAME' => 'Javascript',
    'COMMENT_SINGLE' => array(1 => '//'),
    'COMMENT_MULTI' => array('/*' => '*/'),
    //Regular Expressions
    'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"),
    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
    'QUOTEMARKS' => array("'", '"'),
    'ESCAPE_CHAR' => '\\',
    'KEYWORDS' => array(
        1 => array(
            'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
            'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
            'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
            'while', 'write', 'with'
            ),
        2 => array(
            'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
            'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
            'protected', 'public', 'super', 'true', 'use', 'var'
            ),
        3 => array(
            // common functions for Window object
            'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home',
            'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
            'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status',
            'stop',
            )
        ),
    'SYMBOLS' => array(
        '(', ')', '[', ']', '{', '}',
        '+', '-', '*', '/', '%',
        '!', '@', '&', '|', '^',
        '<', '>', '=',
        ',', ';', '?', ':'
        ),
    'CASE_SENSITIVE' => array(
        GESHI_COMMENTS => false,
        1 => false,
        2 => false,
        3 => false
        ),
    'STYLES' => array(
        'KEYWORDS' => array(
            1 => 'color: #000066; font-weight: bold;',
            2 => 'color: #003366; font-weight: bold;',
            3 => 'color: #000066;'
            ),
        'COMMENTS' => array(
            1 => 'color: #006600; font-style: italic;',
            2 => 'color: #009966; font-style: italic;',
            'MULTI' => 'color: #006600; font-style: italic;'
            ),
        'ESCAPE_CHAR' => array(
            0 => 'color: #000099; font-weight: bold;'
            ),
        'BRACKETS' => array(
            0 => 'color: #009900;'
            ),
        'STRINGS' => array(
            0 => 'color: #3366CC;'
            ),
        'NUMBERS' => array(
            0 => 'color: #CC0000;'
            ),
        'METHODS' => array(
            1 => 'color: #660066;'
            ),
        'SYMBOLS' => array(
            0 => 'color: #339933;'
            ),
        'REGEXPS' => array(
            ),
        'SCRIPT' => array(
            0 => '',
            1 => '',
            2 => '',
            3 => ''
            )
        ),
    'URLS' => array(
        1 => '',
        2 => '',
        3 => ''
        ),
    'OOLANG' => true,
    'OBJECT_SPLITTERS' => array(
        1 => '.'
        ),
    'REGEXPS' => array(
        ),
    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
    'SCRIPT_DELIMITERS' => array(
        0 => array(
            '<script type="text/javascript">' => '</script>'
            ),
        1 => array(
            '<script language="javascript">' => '</script>'
            )
        ),
    'HIGHLIGHT_STRICT_BLOCK' => array(
        0 => true,
        1 => true
        )
);

?>
/*************************************************************************************
 * javascript.php
 * --------------
 * Author: Ben Keen (ben.keen@gmail.com)
 * Copyright: (c) 2004 Ben Keen (ben.keen@gmail.com), Nigel McNie (http://qbnz.com/highlighter)
 * Release Version: 1.0.8.1
 * Date Started: 2004/06/20
 *
 * JavaScript language file for GeSHi.
 *
 * CHANGES
 * -------
 * 2008/05/23 (1.0.7.22)
 *  -  Added description of extra language features (SF#1970248)
 * 2004/11/27 (1.0.1)
 *  -  Added support for multiple object splitters
 * 2004/10/27 (1.0.0)
 *  -  First Release
 *
 * TODO (updated 2004/11/27)
 * -------------------------
 *
 *************************************************************************************
 *
 *     This file is part of GeSHi.
 *
 *   GeSHi is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   GeSHi is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with GeSHi; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 ************************************************************************************/

$language_data = array (
    'LANG_NAME' => 'Javascript',
    'COMMENT_SINGLE' => array(1 => '//'),
    'COMMENT_MULTI' => array('/*' => '*/'),
    //Regular Expressions
    'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"),
    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
    'QUOTEMARKS' => array("'", '"'),
    'ESCAPE_CHAR' => '\\',
    'KEYWORDS' => array(
        1 => array(
            'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
            'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
            'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
            'while', 'write', 'with'
            ),
        2 => array(
            'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
            'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
            'protected', 'public', 'super', 'true', 'use', 'var'
            ),
        3 => array(
            // common functions for Window object
            'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home',
            'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
            'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status',
            'stop',
            )
        ),
    'SYMBOLS' => array(
        '(', ')', '[', ']', '{', '}',
        '+', '-', '*', '/', '%',
        '!', '@', '&', '|', '^',
        '<', '>', '=',
        ',', ';', '?', ':'
        ),
    'CASE_SENSITIVE' => array(
        GESHI_COMMENTS => false,
        1 => false,
        2 => false,
        3 => false
        ),
    'STYLES' => array(
        'KEYWORDS' => array(
            1 => 'color: #000066; font-weight: bold;',
            2 => 'color: #003366; font-weight: bold;',
            3 => 'color: #000066;'
            ),
        'COMMENTS' => array(
            1 => 'color: #006600; font-style: italic;',
            2 => 'color: #009966; font-style: italic;',
            'MULTI' => 'color: #006600; font-style: italic;'
            ),
        'ESCAPE_CHAR' => array(
            0 => 'color: #000099; font-weight: bold;'
            ),
        'BRACKETS' => array(
            0 => 'color: #009900;'
            ),
        'STRINGS' => array(
            0 => 'color: #3366CC;'
            ),
        'NUMBERS' => array(
            0 => 'color: #CC0000;'
            ),
        'METHODS' => array(
            1 => 'color: #660066;'
            ),
        'SYMBOLS' => array(
            0 => 'color: #339933;'
            ),
        'REGEXPS' => array(
            ),
        'SCRIPT' => array(
            0 => '',
            1 => '',
            2 => '',
            3 => ''
            )
        ),
    'URLS' => array(
        1 => '',
        2 => '',
        3 => ''
        ),
    'OOLANG' => true,
    'OBJECT_SPLITTERS' => array(
        1 => '.'
        ),
    'REGEXPS' => array(
        ),
    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
    'SCRIPT_DELIMITERS' => array(
        0 => array(
            '<script type="text/javascript">' => '</script>'
            ),
        1 => array(
            '<script language="javascript">' => '</script>'
            )
        ),
    'HIGHLIGHT_STRICT_BLOCK' => array(
        0 => true,
        1 => true
        )
);

?>
<?xml version="1.0" encoding="utf-8" ?>

<rss version="0.91" >
<channel>
<title>GizmoLA.com</title>
<link>http://www.gizmola.com/blog/</link>
<description></description>
<language>en</language>
<image>
        <url>http://www.gizmola.com/blog/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: GizmoLA.com - </title>
        <link>http://www.gizmola.com/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Centos, Amazon Linux, NFS and the dreaded &quot;nobody&quot; problem</title>
    <link>http://www.gizmola.com/blog/archives/109-Centos,-Amazon-Linux,-NFS-and-the-dreaded-nobody-problem.html</link>

    <description>
        I have been fighting a problem with mounting volumes from an NFS Server in AWS for a few days.  With more pressing issues at hand, I had to try and google for solutions for an hour or so before bed, and nothing I was doing was having any effect.  Curiously, an Ubuntu based machine that was mounting the drive using NFS3 was not having the same problem.  Only the Amazon Linux servers that were using NFS4 were having the issue, and were showing all files and directories as being owned by nobody:nobody.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;drwxr-xr-x &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;2&lt;/span&gt; nobody nobody &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;22&lt;/span&gt; Jan &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;9&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;19&lt;/span&gt;:&lt;span style=&quot;color: #000000;&quot;&gt;58&lt;/span&gt; installervc&lt;br /&gt;drwxr-xr-x &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;2&lt;/span&gt; nobody nobody 4.0K Jan &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;9&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;19&lt;/span&gt;:&lt;span style=&quot;color: #000000;&quot;&gt;56&lt;/span&gt; avatar&lt;br /&gt;drwxr-xr-x &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;2&lt;/span&gt; nobody nobody 4.0K Jan &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;9&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;19&lt;/span&gt;:&lt;span style=&quot;color: #000000;&quot;&gt;56&lt;/span&gt; accessories&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
I had previously insured that the user UID and group GID for the user that would be writing files (in my case &quot;apache&quot; was the same (with the same UID and GID) on the NFS server and the servers mounting the nfs volume.&lt;br /&gt;
&lt;br /&gt;
As it turned out the problem was with the configuration (or lack thereof) of the rpcidmapd service.  NFS4 relies on this service to map users between machines.  The &quot;idmapd&quot; requires that the domain of both the client and server should match for the UID/GID mapping to work, and in my case it wasn&#039;t.  Probably many people with proper DNS configuration don&#039;t hit this problem, but we did not have a proper DNS setup, as these machines are part of a growing cluster.  Compounding the problem I had set the configuration files to have meaningless host names rather than a domain.&lt;br /&gt;
&lt;br /&gt;
You can tweak this setup by editing the: &lt;strong&gt;/etc/idmapd.conf&lt;/strong&gt; file, and find the &quot;Domain&quot; variable:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;Domain = &amp;#160;yourdomain.com&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Set these to be the same for the server and all the clients.&lt;br /&gt;
&lt;br /&gt;
The last problem was that I had to restart the idmapd process, which has an /etc/init.d control script named  /etc/rpcidmapd&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;root&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;@&lt;/span&gt;web1 init.d&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;# ls -lath | grep rpcid&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #660033;&quot;&gt;-rwxr-xr-x&lt;/span&gt; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;1&lt;/span&gt; root root 2.7K Jul &lt;span style=&quot;color: #000000;&quot;&gt;28&lt;/span&gt; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;2011&lt;/span&gt; rpcidmapd&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Restart the process on both the nfs server and any nfs clients.  If the source of your problem is the same as mine, your user &amp;amp; group mapping problems should be solved:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;sudo&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;etc&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;inti.d&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;rpcidmapd restart&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Finally!!!!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;drwxr-xr-x &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;2&lt;/span&gt; apache apache &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;22&lt;/span&gt; Jan &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;9&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;19&lt;/span&gt;:&lt;span style=&quot;color: #000000;&quot;&gt;58&lt;/span&gt; installervc&lt;br /&gt;drwxr-xr-x &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;2&lt;/span&gt; apache apache 4.0K Jan &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;9&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;19&lt;/span&gt;:&lt;span style=&quot;color: #000000;&quot;&gt;56&lt;/span&gt; avatar&lt;br /&gt;drwxr-xr-x &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;2&lt;/span&gt; apache apache 4.0K Jan &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;9&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;19&lt;/span&gt;:&lt;span style=&quot;color: #000000;&quot;&gt;56&lt;/span&gt; accessories&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
 
    </description>
</item>
<item>
    <title>Calculate a person's age in a MySQL query -- continued</title>
    <link>http://www.gizmola.com/blog/archives/108-Calculate-a-persons-age-in-a-MySQL-query-continued.html</link>

    <description>
        &lt;em&gt;The serendipity cache blew up on me for this article so I had to split it into 2 parts.&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;DATE_ADD to the rescue&lt;/h2&gt;&lt;br /&gt;
MySQL knows how to work with the Gregorian calender, and I believe it is easier to let MySQL do the work, rather than trying to figure out how to implement the different cases.  I chose to implement the &quot;last day of the month&quot; technique.  In this case, we&#039;ll do this by creating a mysql date based on March 1st of the current year, and subtract one day from it to get to the last day of February.&lt;br /&gt;
&lt;br /&gt;
If you read my article on &lt;a href=&quot;http://www.gizmola.com/blog/archives/99-Finding-Next-Monday-using-MySQL-Dates.html&quot; title=&quot;Calculating week start using MySQL&quot;&gt;&quot;Finding next monday&quot; using mysql date functions&lt;/a&gt;, you would have seen how DATE_ADD() can be used to help solve a lot of problems, even though the name can be misleading when you are actually using it to subtract. Using it with the following test dates proves that mysql has fully implemented the leap year logic accurately:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/108-Calculate-a-persons-age-in-a-MySQL-query-continued.html#extended&quot;&gt;Continue reading &quot;Calculate a person&#039;s age in a MySQL query -- continued&quot;&lt;/a&gt;
    </description>
</item>
<item>
    <title>Calculate a person's age in a MySQL query</title>
    <link>http://www.gizmola.com/blog/archives/107-Calculate-a-persons-age-in-a-MySQL-query.html</link>

    <description>
        Recently a question was posed on the &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1371&amp;amp;entry_id=107&quot;  onmouseover=&quot;window.status=&#039;http://www.phpfreaks.com/forums/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;Phpfreaks.com forums&quot;&gt;Phpfreaks.com forums&lt;/a&gt;, as to the best way for someone to store a user&#039;s birth date using the MySQL database.  One person suggested using a varchar as they were most familiar with string functions.  My answer was to use the MySQL date type.  &lt;br /&gt;
&lt;br /&gt;
I provided a quick &quot;advantages of using date&quot; comparison list:&lt;br /&gt;
&lt;strong&gt;Storing as a DATE&lt;/strong&gt;&lt;br /&gt;
&amp;bull;A MySQL Date requires 3 Bytes of storage&lt;br /&gt;
&amp;bull;You can do Date arithmetic inside mysql (search for dates within ranges) and use mysql functions to calculate values directly in a query&lt;br /&gt;
&amp;bull;It intrinsically will only store valid dates&lt;br /&gt;
&amp;bull;You can format it in numerous ways&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Storing as a Varchar&lt;/strong&gt;&lt;br /&gt;
&amp;bull;A string will require minimum 8 bytes, or 10 with separators&lt;br /&gt;
&amp;bull;can&#039;t do any form of efficient native range queries&lt;br /&gt;
&amp;bull;can&#039;t reformat it easily in SQL&lt;br /&gt;
&amp;bull;will allow completely invalid dates&lt;br /&gt;
&lt;br /&gt;
I thought a great proof of the benefit of this approach was to show that you could have MySQL calculate the person&#039;s current age in a query, using their birthday.  Certainly with a string, using PHP for example, you would typically query the database to pull out the string and for each row, turn it into a PHP date and do some calculations in your code, and you&#039;d arrive at the same place, but I wanted to show just how capable SQL -- and in this case MySQL can be especially when you use the native data types and some functions.&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/107-Calculate-a-persons-age-in-a-MySQL-query.html#extended&quot;&gt;Continue reading &quot;Calculate a person&#039;s age in a MySQL query&quot;&lt;/a&gt;
    </description>
</item>
<item>
    <title>SQL UPDATE for strings in MongoDB</title>
    <link>http://www.gizmola.com/blog/archives/106-SQL-UPDATE-for-strings-in-MongoDB.html</link>

    <description>
        MongoDB currently does not offer the equivalent of a SQL Update statement when you want to change the value of a string to something that is based on the current value.  In my case I needed to find spaces and change them to underscores -- something done easily in php with str_replace(), and in MySQL with REPLACE.&lt;br /&gt;
&lt;br /&gt;
If you had a table named foo with a column named &quot;mystr&quot; you could do this sort of update like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;sql geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;UPDATE&lt;/span&gt; foo &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;SET&lt;/span&gt; mystr &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;mystr&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039; &#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;_&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
MongoDB does have collection.update() that works with a series of &quot;modifier&quot; operations, but none of them are useful for doing modifications to the current value of a document field when that field is a string.&lt;br /&gt;
&lt;br /&gt;
MongoDB does however support javascript, and the javascript replace() function implements a regular expression search and replace.  I was able to accomplish the update using the forEach() method to process the resulting documents one at a time.  While not as efficient as having mongo do this internally with a specially built update modifier, at least this method only needs to operate on documents that are known to require modifications, and could be run in the mongo interactive client easily.&lt;br /&gt;
&lt;br /&gt;
Again, assuming the collection is named &quot;foo&quot; and the document field is named &quot;mystr&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;javascript geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;db.foo.find&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; mystr: /&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;+/ &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.forEach&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; function&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;u&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; u.mystr = u.mystr.replace&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;/&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;/g, &amp;quot;_&amp;quot;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;; db.foo.save&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;u&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
An existing patch promises to add a new update() modifier but until such a time as it exists, this approach can be used when you need to update strings in a collection, referencing the existing values in the transformation. 
    </description>
</item>
<item>
    <title>Load the Url symfony helper in a model or form class </title>
    <link>http://www.gizmola.com/blog/archives/105-Load-the-Url-symfony-helper-in-a-model-or-form-class.html</link>

    <description>
        I&#039;m doing some symfony work and needed to use the Url helper in a form class to return an error message that included a link.  I would consider this one of those exceptions where you really need to be able to have markup in a class rather than in a template.  &lt;br /&gt;
&lt;br /&gt;
I should probably mention that this is the way that works in version 1.4.3, and that the method that works in actions will not work in a form class. That method is:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;php geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;sfContext&lt;span style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;getInstance&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;getConfiguration&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;loadHelpers&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
That method was deprecated and there is also &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1369&amp;amp;entry_id=105&quot;  onmouseover=&quot;window.status=&#039;http://webmozarts.com/2009/07/01/why-sfcontextgetinstance-is-bad/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;problems with sfContext&quot;&gt;this article to consider&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
In this case, the solution was to access the sfApplicationConfiguration object.  In order to use the Url helper so you can call link_to() you need to also include the &#039;Tag&#039; helper.  &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;php geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;sfApplicationConfiguration&lt;span style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;getActive&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;loadHelpers&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1370&amp;amp;entry_id=105&quot; title=&quot;http://www.php.net/array&quot;  onmouseover=&quot;window.status=&#039;http://www.php.net/array&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;Url&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;Tag&#039;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// now you can use link_to(...)&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Obviously this would allow you to load other helpers in the same way ... i18n for example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 
    </description>
</item>
<item>
    <title>How to configure AVReloaded to work with Longtail's JW Player Google Analytics Pro plugin</title>
    <link>http://www.gizmola.com/blog/archives/103-How-to-configure-AVReloaded-to-work-with-Longtails-JW-Player-Google-Analytics-Pro-plugin.html</link>

    <description>
        &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1359&amp;amp;entry_id=103&quot; title=&quot;http://allvideos.fritz-elfert.de/&quot;  onmouseover=&quot;window.status=&#039;http://allvideos.fritz-elfert.de/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; &gt;Allvideos Reloaded  (AVReloaded)&lt;/a&gt; is a really nice piece of software engineering from Fritz Elfert.  Rather than hardcode for all the individual players out there, Fritz created a macro system that allows you describe the parameters for any player, so it can be configured and updated.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;serendipity_imageComment_left&quot; style=&quot;width: 110px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a class=&#039;serendipity_image_link&#039; href=&#039;http://www.gizmola.com/blog/uploads/images/gap_scrn.png&#039;&gt;&lt;!-- s9ymdb:241 --&gt;&lt;img width=&#039;110&#039; height=&#039;20&#039;  src=&quot;http://www.gizmola.com/blog/uploads/images/gap_scrn.tn.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Click for screenshot of Google Analytics Event categories, generated by the Longtail GA Pro plugin&lt;/div&gt;&lt;/div&gt;Like the Allvideos plugin, AVReloaded comes bundled with the ubiquitous &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1361&amp;amp;entry_id=103&quot; title=&quot;http://www.longtailvideo.com/players/&quot;  onmouseover=&quot;window.status=&#039;http://www.longtailvideo.com/players/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; &gt;JW Player for Flash&lt;/a&gt;.  If you are streaming flash movies from your website, one &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1362&amp;amp;entry_id=103&quot; title=&quot;http://www.longtailvideo.com/addons/plugins/107/Google-Analytics-Pro?q=&quot;  onmouseover=&quot;window.status=&#039;http://www.longtailvideo.com/addons/plugins/107/Google-Analytics-Pro?q=&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; &gt;worthwhile plugin is longtail&#039;s Google Analytics Pro&lt;/a&gt;.  The current license price for the plugin is $19 from longtail&#039;s site.  If you&#039;re already using Google Analytics, the plugin feeds &quot;Content&quot; events from the player to Google Analytics which will show up under the &quot;Event Tracking&quot; menu.  Ever have questions like:  &quot;I wonder what videos people are actually watching on my site&quot; or &quot;for this new video, how many seconds do they watch before they get bored and close it?&quot;  If so, then this plugin is for you.   The player will generate events that GA groups into 3 categories: &quot;Video Plays&quot;, &quot;Percentage Played&quot; and &quot;Seconds Played&quot;.  Drilling down you get a nice list of the Videos on your site.   For example, finding out that people only watch on average 10% of that promotional video for your product is probably a sign that you may need some better material. &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/103-How-to-configure-AVReloaded-to-work-with-Longtails-JW-Player-Google-Analytics-Pro-plugin.html#extended&quot;&gt;Continue reading &quot;How to configure AVReloaded to work with Longtail&#039;s JW Player Google Analytics Pro plugin&quot;&lt;/a&gt;
    </description>
</item>
<item>
    <title>Joomla K2 Component ERD Schema and Tree traversal optimization with Catalog Mode</title>
    <link>http://www.gizmola.com/blog/archives/102-Joomla-K2-Component-ERD-Schema-and-Tree-traversal-optimization-with-Catalog-Mode.html</link>

    <description>
        &lt;div class=&quot;serendipity_imageComment_left&quot; style=&quot;width: 300px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a class=&#039;serendipity_image_link&#039; href=&#039;http://www.gizmola.com/blog/uploads/images/k2_schema.png&#039; onclick=&quot;F1 = window.open(&#039;/blog/uploads/images/k2_schema.png&#039;,&#039;Zoom&#039;,&#039;height=1199,width=1263,top=8,left=336,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes&#039;); return false;&quot;&gt;&lt;!-- s9ymdb:234 --&gt;&lt;img width=&#039;300&#039; height=&#039;285&#039;  src=&quot;http://www.gizmola.com/blog/uploads/images/k2_schema.tn.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Joomla K2 component Schema in png format&lt;/div&gt;&lt;/div&gt;In the recent profile of GB4K.com, I talked about the use of the K2 component from the Folks at JoomlaWorks.  While doing some customization, I decided to reverse engineer the K2 tables that are created and used by the component.  I provide the diagrams for interested parties and developers looking to understand how K2 is designed.  Keep in mind that these are logical diagrams, since Joomla and K2 have no intrinsic support for MySQL other than using the MyISAM engine, which doesn&#039;t support key constraints.  Click on the image to get the .png version, or &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1331&amp;amp;entry_id=102&quot;  onmouseover=&quot;window.status=&#039;http://www.gizmola.com/blog/index.php?serendipity[subpage]=downloads&amp;amp;thiscat=4&amp;amp;file=23&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;Download the .pdf version of the Schema here&quot;&gt;this link for a .pdf&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
One thing I noticed about K2, is that its tree traversal code can require a lot of queries to be run, especially if you have a lot of categories.  Over on the K2 forums, one K2 user with a large number of subcategories was complaining about the substantial overhead involved in displaying the top level Category for their site.  With over 1000 subcategories, the site was being hammered with an equal number of queries.&lt;br /&gt;
&lt;br /&gt;
This is because by default K2 will do a query for every category to find its child categories and items.  Since this is a recursive problem there&#039;s no inherent MySQL solution that would allow the developers to solve this problem in SQL (like the Oracle Start With ... Connect By syntax) so it&#039;s somewhat understandable that the JoomlaWorks developers provided a short circuit mechanism into the category configuration they call &quot;Catalog Mode&quot;.  The description of this configuration flag, which defaults to &quot;No&quot; is: &lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;If you select &#039;yes&#039; then only the items directly belonging to this category will be retrieved. If you select &#039;no&#039; then items from all sub-categories will be retrieved. Setting this option to &#039;no&#039; is ideal for news/portal/magazine/blog layouts.&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
This setting simply shuts off the recursion behavior for the category. 
    </description>
</item>
<item>
    <title>Profile of the GB4k.com launch -- Joomla reborn</title>
    <link>http://www.gizmola.com/blog/archives/101-Profile-of-the-GB4k.com-launch-Joomla-reborn.html</link>

    <description>
        &lt;!-- s9ymdb:220 --&gt;&lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1327&amp;amp;entry_id=101&quot;  onmouseover=&quot;window.status=&#039;http://www.gb4k.com/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;Check out the Global Broadcast 4 Kids website.&quot;&gt;&lt;img width=&#039;350&#039; height=&#039;239&#039; style=&quot;float: left; border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://www.gizmola.com/blog/uploads/images/gb4klaunch.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;I&#039;ve been helping out Scott McGinnis with a revamp of his web-videos-for-kids and tweens site, &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1320&amp;amp;entry_id=101&quot; title=&quot;http://www.gb4k.com&quot;  onmouseover=&quot;window.status=&#039;http://www.gb4k.com&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; &gt;Global Broadcast 4 Kids&lt;/a&gt;, aka &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1320&amp;amp;entry_id=101&quot; title=&quot;http://www.gb4k.com&quot;  onmouseover=&quot;window.status=&#039;http://www.gb4k.com&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; &gt;GB4K.com&lt;/a&gt;.  &lt;br /&gt;
&lt;br /&gt;
Scott was a pretty successful actor in the 1980&#039;s, who transitioned to directing in the 90&#039;s, and like a lot of directors in Hollywood, got his first chance behind the camera courtesy of Roger Corman.  After a stint making low budget features, he went on to direct episodes of &quot;Angel&quot; and the TV series &quot;Honey I Shrunk the Kids&quot;, and for the last few years, has been producing educational webisodes using Prosumer video equipment, and editing the episodes on a Mac with Final Cut Pro.  &lt;br /&gt;
&lt;br /&gt;
The subject matter and production values aren&#039;t that much different from what you might expect to find on basic cable networks like The History Channel or Disney Channel.  The GB4K &quot;twist&quot; is that all the segments feature kids and teens as the newscasters, reporters and narrators.  GB4K has already proven to be a great training ground for a number of its young &quot;stars&quot;, as GB4K alumni have gone on to success at the Disney Channel, and in feature films.  There&#039;s lots of material in the archive, and he creates a number of new episodes each week, from sports and entertainment news, movie premier &quot;red carpet&quot; interviews, how-to videos on dancing and skateboarding, history channel-esq features on subjects like Guitars and Merry-go-rounds, and environmental science and the latest in Green living practices and Green news.  The site also includes music videos he directed and produced for Amber Lily and Jadagrace Berry.  A great example of what Scott is able to accomplish as a one-man directing, production and post production crew, is the &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1321&amp;amp;entry_id=101&quot; title=&quot;http://www.gb4k.com/gbk4channels/gb4kentertainment/item/28-express-yourself-jadagrace&quot;  onmouseover=&quot;window.status=&#039;http://www.gb4k.com/gbk4channels/gb4kentertainment/item/28-express-yourself-jadagrace&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; &gt;Jadagrace &quot;Express Yourself&quot; &lt;/a&gt;video, which in my opinion compares favorably with music videos costing 10-20x as much.&lt;br /&gt;
&lt;br /&gt;
Despite having a substantial library of video content, frequent updates, and a clear cut audience, problems with the website had put GB4K into a holding pattern. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/101-Profile-of-the-GB4k.com-launch-Joomla-reborn.html#extended&quot;&gt;Continue reading &quot;Profile of the GB4k.com launch -- Joomla reborn&quot;&lt;/a&gt;
    </description>
</item>
<item>
    <title>Get files from subversion without creating a sandbox using svn export</title>
    <link>http://www.gizmola.com/blog/archives/100-Get-files-from-subversion-without-creating-a-sandbox-using-svn-export.html</link>

    <description>
        One of the first things people learn about using subversion is how to do a &quot;checkout&quot; using &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1297&amp;amp;entry_id=100&quot;  onmouseover=&quot;window.status=&#039;http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.ref.svn.c.checkout&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;svn checkout&quot;&gt;svn co&lt;/a&gt;.  The svn checkout command pulls files from the subversion repository into your &quot;sandbox&quot; and in so doing creates what subversion calls a &quot;working copy&quot;.  A working copy includes a &lt;em&gt;.svn&lt;/em&gt; directory in every subdirectory of the working copy, which is chock full of directories and files that svn uses to determine what you&#039;re doing in your sandbox.&lt;br /&gt;
&lt;br /&gt;
A &quot;working copy&quot; is designed to be just that -- a copy of the source tree built with the assumption that you will be making changes and committing them back to subversion. But what do you do if you want the files, but you don&#039;t need or want a sandbox?&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/100-Get-files-from-subversion-without-creating-a-sandbox-using-svn-export.html#extended&quot;&gt;Continue reading &quot;Get files from subversion without creating a sandbox using svn export&quot;&lt;/a&gt;
    </description>
</item>
<item>
    <title>Finding &quot;Next Monday&quot; using MySQL Dates</title>
    <link>http://www.gizmola.com/blog/archives/99-Finding-Next-Monday-using-MySQL-Dates.html</link>

    <description>
        Several people who read my article on &lt;a href=&quot;blog/archives/51-Exploring-Mysql-CURDATE-and-NOW.-The-same-but-different..html&quot;  title=&quot;Exploring Mysql CURDATE and NOW. The same but different&quot;&gt;Exploring Mysql CURDATE and NOW. The same but different&lt;/a&gt; posed questions regarding how to return a valid MySQL date equivalent to &quot;Next Monday&quot; given any particular day, as determined by MySQL&#039;s CURDATE().  This is a little bit tricky, but can be done entirely in MySQL syntax, making it usable with Calendar applications built on top of MySQL queries, without the need to use serverside date functions.  This builds upon concepts discussed in my prior article, so if you have trouble understanding the implications of using CURDATE or DATE_ADD, you should probably take a minute and read that article. &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/99-Finding-Next-Monday-using-MySQL-Dates.html#extended&quot;&gt;Continue reading &quot;Finding &amp;quot;Next Monday&amp;quot; using MySQL Dates&quot;&lt;/a&gt;
    </description>
</item>
<item>
    <title>Centos Virtual LAMP server -- Part II</title>
    <link>http://www.gizmola.com/blog/archives/97-Centos-Virtual-LAMP-server-Part-II.html</link>

    <description>
        &lt;a href=&quot;blog/archives/95-Run-a-Centos-Lamp-development-server-on-XP-using-VirtualBox.html&quot;  title=&quot;Part  1 LAMP on VirtualBox&quot;&gt;*Part 1 of this series is here*&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Customizing your LAMP server&lt;/h3&gt;&lt;br /&gt;
Unix people are probably familiar with the father of the DNS system -- the /etc/hosts file.  The hosts file has a simple format:&lt;br /&gt;
&lt;br /&gt;
ipaddress hostname&lt;br /&gt;
&lt;br /&gt;
In the days prior to DNS, people would update a master hosts file and copy it around to all the servers in the enterprise.  Surprisingly Windows versions also support this file, as a way of overriding DNS, so we can use this to our advantage, by adding an entry for our development server.  In this example, I&#039;m going to use dev.gizmola.com, which is not a real server.&lt;br /&gt;
&lt;br /&gt;
One important reason to do this is that Apache and other web servers, use a feature of HTTP 1.1 that specifies a header field named &quot;Host:&quot;.  This mechanism facilitates the service of multiple domains from a single apache server, through the configuration of apache virtual host (or vhost) entires.  The server uses the Host name in the HTTP header to determine how to route requests, so without host name resolution. you have to use non-standard ports and other mechanisms that are more trouble than they&#039;re worth. a&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/97-Centos-Virtual-LAMP-server-Part-II.html#extended&quot;&gt;Continue reading &quot;Centos Virtual LAMP server -- Part II&quot;&lt;/a&gt;
    </description>
</item>
<item>
    <title>Intel's T6500 -- No VT for you!  Sony: You got Vaio VT? We turn it off.</title>
    <link>http://www.gizmola.com/blog/archives/96-Intels-T6500-No-VT-for-you!-Sony-You-got-Vaio-VT-We-turn-it-off..html</link>

    <description>
        At the time I&#039;m writing this, you can easily find websites still listing the specifications for Intel&#039;s T6500 chip as including Intel VT.  The T6500 is prevalent in the consumer Notebook space particularly because it was built to work with an 800mhz front side bus, allowing it to go in cheaper motherboards.  You&#039;ll find the T6500 in a lot of midrange and budget 64bit notebook computers, from nearly all the major notebook manufacturers.  Whether or not you care about VT depends on your interest in 64bit Virtualization software from Parallels to VMWare to Sun Virtualbox to Xen to VirtualPC.  &lt;br /&gt;
&lt;br /&gt;
VT is a marketing name for the hardware assisted virtualization workaround, originally named Vanderpool, that adds the Virtual Machine Extensions (VMX) instructions needed by VM&#039;s like Xen and Sun VirtualBox to provide 64bit OS virtualization.   AMD has a similar set of extensions it added, marketed as AMD-V, although they built in the memory segmentation support that alleviates the problem with 64bit memory virtualization as far back as the D revisions of their AMD64 chips.   One such website includes this boilerplate--&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
T6500 contain Advanced Technologies about Intel Virtualization Technology that increasing manageability, security, and flexibility in IT environments, virtualization technologies like hardware-assisted Intel Virtualization Technology (Intel® VT)&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;serendipity_imageComment_left&quot; style=&quot;width: 110px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a class=&#039;serendipity_image_link&#039; href=&#039;http://www.gizmola.com/blog/uploads/images/T6500spec20july2009.JPG&#039;&gt;&lt;!-- s9ymdb:193 --&gt;&lt;img width=&#039;110&#039; height=&#039;88&#039;  src=&quot;http://www.gizmola.com/blog/uploads/images/T6500spec20july2009.tn.JPG&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Click to see full size screenshot of original Intel specification.&lt;/div&gt;&lt;/div&gt;If you were to have visited Intel&#039;s own site prior to July 20th of 2009, you would have found information indicating that the chip had VT support.  This is a fairly mind boggling omission when you consider that the chip was manufactured, delivered to customers, and has been sold to customers for well over a month before Intel corrected its own site!  On July 21st, Intel updated its website, and VT support is now removed from the specs.  An Intel representative agreed that the information on the site was incorrect, once challenged by a consumer with a T6500 based machine, who had used Intel&#039;s own tools to enumerate the features on the chip.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
I am sorry, I was mistaken. Thanks for bringing this to my attention.&lt;br /&gt;
&lt;br /&gt;
The T6500 does not support VT. I used ark.intel.com as my reference, but as you pointed out, the information turned out to be incorrect. The processor feature information for the T6500 contained within ark.intel.com has been corrected. VT is actually not a feature of the T6500.&lt;br /&gt;
&lt;br /&gt;
The processor identification tool is correctly reporting that VT is not a supported feature of the Intel® Core2 Duo Processor T6500.&lt;br /&gt;
&lt;br /&gt;
John S.&lt;br /&gt;
Intel Customer Support&lt;br /&gt;
&lt;/blockquote&gt; &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/96-Intels-T6500-No-VT-for-you!-Sony-You-got-Vaio-VT-We-turn-it-off..html#extended&quot;&gt;Continue reading &quot;Intel&#039;s T6500 -- No VT for you!  Sony: You got Vaio VT? We turn it off.&quot;&lt;/a&gt;
    </description>
</item>
<item>
    <title>Run a Centos Lamp development server on XP, Vista or Win 7 using VirtualBox</title>
    <link>http://www.gizmola.com/blog/archives/95-Run-a-Centos-Lamp-development-server-on-XP,-Vista-or-Win-7-using-VirtualBox.html</link>

    <description>
        If you use a Windows based workstation or notebook computer virtualization offers a way for you to run a linux server environment using the same linux distribution and configuration you&#039;ll use in production.  Virtualization allows you to explore clustering and network setups that can&#039;t be tested on your workstation alone and simplifies your development environment by keeping the LAMP environment contained inside a VM.  &lt;br /&gt;
&lt;br /&gt;
While VMWare offers these capabilities with their VMWare workstation product, Sun has created a free alternative called VirtualBox, with many of the same capabilities in VMWare workstation.  VirtualBox runs on a variety of intel chip based operating systems including OS/X, Windows XP &amp;amp; Vista, Linux and Solaris, and supports the installation of many different &quot;Guest&quot; operating systems.  In this article, I&#039;ll detail the installation and configuration of Centos.  Centos is a great choice for a Linux server operating system, as it is widely used by hosting companies due to its Redhat Enterprise Linux (RHEL) core.&lt;br /&gt;
&lt;br /&gt;
Our goals in this setup will be:&lt;br /&gt;
&lt;br /&gt;
&amp;bull; Centos server running the LAMP stack&lt;br /&gt;
&amp;bull; XP can be used to develop code using the IDE of your choice.  &lt;br /&gt;
&amp;bull; The XP Workstation can communicate with the linux server using standard tools: putty, winscp, firefox&lt;br /&gt;
&amp;bull; The setup works even when no other networking is available.  When a network is available, no network reconfiguration is required.&lt;br /&gt;
&amp;bull; Use XP to setup private domain resolution so apache vhost configurations can be tested.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get started.   &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/95-Run-a-Centos-Lamp-development-server-on-XP,-Vista-or-Win-7-using-VirtualBox.html#extended&quot;&gt;Continue reading &quot;Run a Centos Lamp development server on XP, Vista or Win 7 using VirtualBox&quot;&lt;/a&gt;
    </description>
</item>
<item>
    <title>Too much information about the MySQL TIMESTAMP</title>
    <link>http://www.gizmola.com/blog/archives/93-Too-much-information-about-the-MySQL-TIMESTAMP.html</link>

    <description>
        The MySQL timestamp is an oddity, being both a mySQL &quot;Data Type&quot; as well as a type of specialty column that provides a built in default.  It doesn&#039;t help matters, that the timestamp was changed significantly around mysql version 4.1.  &lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;The Old TIMESTAMP&lt;/h3&gt;&lt;br /&gt;
In older mysql versions, the TIMESTAMP was not in the same format as a DateTime column, and you could also set up truncation by defining the TIMESTAMP to have a fixed size.  For example, you could define a TIMESTAMP column to be a TIMESTAMP(4) which would then only store the 4 digit Year portion of a DateTime value.  I won&#039;t go into much detail on the pre version 4.1 TIMESTAMP, however, if you&#039;re stuck with an older version of MySQL I recommend you read the manual carefully before you attempt to use any of the information here.  I&#039;m going to concentrate on the current TIMESTAMP.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;TIMESTAMP Properties&lt;/h3&gt;&lt;br /&gt;
At its most fundamental, the TIMESTAMP is really nothing more than a Unix TimeStamp, which is to say, that internally it is stored as an integer value of seconds.  Where a MySQL DATETIME column can be used to store any date and time from Jan 1, 1000 to 12/31/9999, the TIMESTAMP is limited in the same ways that the Unix timestamp is currently limited -- it can only store values from Jan 1, 1970 to Jan 9, 2038.  &lt;br /&gt;
&lt;br /&gt;
Those familiar with Unix design, will recognize the Jan 9, 2038 date as being the next big &quot;Y2K&quot; computing panic, and if you&#039;re young enough, you may realize a large payday in your future, selling remediation services to companies in roughly another 28 years.  The folks at &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1020&amp;amp;entry_id=93&quot;  onmouseover=&quot;window.status=&#039;http://www.y2038.com/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://www.y2038.com/&quot;&gt;http://www.y2038.com/&lt;/a&gt; are already estimating this to be as much as a 10 trillion dollar jackpot, although no doubt by that time most of the coding will be done by the Morlocks from their &lt;em&gt;underground cave cities&lt;/em&gt;.   Outsourcing of IT to Morlocks will be a major industry trend by the year 2020, mark my words.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/93-Too-much-information-about-the-MySQL-TIMESTAMP.html#extended&quot;&gt;Continue reading &quot;Too much information about the MySQL TIMESTAMP&quot;&lt;/a&gt;
    </description>
</item>
<item>
    <title>Mysql Update:  Null + 1 is Null!  </title>
    <link>http://www.gizmola.com/blog/archives/91-Mysql-Update-Null-+-1-is-Null!.html</link>

    <description>
        &lt;h3&gt;&lt;u&gt;You can&#039;t add to Null&lt;/u&gt;&lt;/h3&gt;&lt;br /&gt;
Here&#039;s something about mysql create table definitions that can easily catch you if you aren&#039;t careful.  Consider this table definition:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;mysql geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;TABLE&lt;/span&gt; screenshots &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;id &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;INT&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;AUTO_INCREMENT&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;PRIMARY&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;KEY&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; votes &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;mysql&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt; CREATE TABLE screenshots &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;id&lt;/span&gt; INT NOT NULL AUTO_INCREMENT PRIMARY KEY, votes INT&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;; &amp;#160; &amp;#160; &amp;#160;&lt;br /&gt;Query OK, &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; rows affected &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;0.09&lt;/span&gt; sec&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
What the user wanted was a simple table to keep track of user submitted screen shots.  Of course the real table had a submission date, and name column but I&#039;ve omitted those in order to focus on what can happen when you allow a numeric column to have NULL values.  &lt;br /&gt;
&lt;br /&gt;
In the application in question, when a user votes for the screen shot they like, the system should &quot;count&quot; the vote, by increasing the values in the &quot;votes&quot; column by one.  Initially the developer working on this application was trying to read the value from the database, and in a PHP web script, they would increment this value and take the result and set &quot;votes&quot; to be equal to it in an UPDATE statement.  I explained that this could cause lost votes, because if two or more users were voting at nearly the same time, each would overwrite the value of the &quot;vote&quot; column.  In fact there are scenarios far worse than that --- a user with a cached page could vote and set the vote count back days or weeks.  I didn&#039;t bother to mention the possibility that someone might recognize what was going on in the web form, and start tampering with it, since it was plainly evident that the form was passing the current number of votes.  &lt;br /&gt;
&lt;br /&gt;
One of the many benefits of using a relational database is built in concurrency.  In an UPDATE statement, you can add to the value of the column without having to know what its original value is, just as computer languages allow assignment to a variable that references the variable&#039;s current value (ie. $a = $a + 1, $a++).&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;mysql geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;UPDATE&lt;/span&gt; screenshots &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;SET&lt;/span&gt; votes &lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt; votes &lt;span style=&quot;color: #FF00FF;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #008080;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;WHERE&lt;/span&gt; id &lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt; &amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
All that&#039;s needed is to have the serverside language provide a value for a particular &quot;id&quot;  and the votes will be tallied and updated correctly.  Even more importantly, mysql will serialize the updates, insuring that no votes are lost.&lt;br /&gt;
&lt;br /&gt;
However, given the original Mysql CREATE TABLE statement , what will happen if our code embeds the UPDATE statement provided? &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/91-Mysql-Update-Null-+-1-is-Null!.html#extended&quot;&gt;Continue reading &quot;Mysql Update:  Null + 1 is Null!  &quot;&lt;/a&gt;
    </description>
</item>

</channel>
</rss>

