Binary Expressions

« Previous PageNext Page »

2006-4-14

The Kid’s Bookmarks - Updates

Filed under: — Adam @ 10:30 am

I finally did some work with my other web site, “The Kid’s Bookmarks“. The web site seems to be quite a hit for little child and with the parents too. I’ve repaired 3 broken links and the rest verified as valid links. Add 9 new games with a total of 69 games. Removed 1 game. See below for additional changes and possible new features coming to the web site. Please send in your comments or suggestions. This site was made for the kids and parents. So let’s here some feedback!

New Features Coming Soon (possibly)

  • Game descriptions for older children and parents.
  • Game categories or pages to allow for faster loading site and room for additional games.
  • Multiple Web Site Editions - This would allow for separation of games and the site to grow with the children as the get older. This would mean I would break the site up into age ranges. Not sure how this will work at this point.

New Game Additions

  • Super-Fishing
  • Simon
  • Clowns
  • Turbo Spirit
  • Table Hockey
  • Space Invaders
  • Astroys
  • Busy Burgers
  • Luigi’s Revenge Interactive
  • Easter Egg Hop

Games Removed

  • Barney Online - Seems to be something wrong with it and not much there anymore.

2005-11-30

Mozilla Firefox v1.5 Released

Filed under: — Adam @ 11:30 pm

Mozilla Firefox v1.5

I’m a huge fan of Mozilla Foundation and their products. So it’ not unusual for me to immediately have the latest stable version of Firefox and Thunderbird not to mention alpha/beta versions. Unfortunately Firefox v1.5 is the first version I’ve installed and immediately afterwards down graded to the previously stable final release (v1.07). Don’t get me wrong the bug fixes, new features and other imrpovements are great. However more then 50% of my Mozilla Firefox extensions and themes are no longer compatible nor could it find updates to fix the incompatibility problem. There was a few exceptions of extensions that did work, which I have listed below. I even went out to search for updates manually for Firefox v1.5 for my extensions and themes and I came up empty. I realize these extensions and themes are independant however I use a lot of them on a daily bases and can not go without them. In my case I could have survived if Chatzilla and Zhluk.com DevBoi extensions worked.

I was very impressed with the seemless and trouble fee upgrade to Firefox v1.5. Unfortunatly when I down graded something messed up causing user control popups and links not to function normally. I ended up having to uninstall Firefox (excluding my profile) and re-install from scratch. I hope to see the extesions updated soon so I can enjoy the benefits of Firefox v1.5.

At this point I would recommend to all users thinking of upgrading to Firefox v1.5 to check to see if the extensions and themes important to you work in Firefox v1.5 before upgrading. If you do upgrade of course make sure to do a backup of your critical files including creating a list of extensions/themes/plugins/search engines. I’m not aware of an extension that will create a list of all of those but there is one extension that can handle creating a list of extensions and themes, InfoLister.

My Installed Compatible Firefox v1.5 Extensions

My Installed Incompatible Firefox v1.5 Extensions

My Installed Incompatible Firefox v1.5 Themes

2005-11-25

How To - Make CSS :hover Pseudo-Class work in IE

Filed under: — Adam @ 4:38 pm

As you may have discovered that currently IE does not support the pseudo-class :hover on non anchor element tag(s). However there is two solutions to this problem. The Suckerfish:hover or Whatever:hover. In my case I wanted to apply pseudo-class :hover onto multiple div element tags. I chose to use the Suckerfish:hover solution as it’s simple and very little code required to solve the problem. Whatever:hover has quite a bit of code and apparently has issues that might not make it work even in IE. I’m sure Whatever:hover has it’s place but in my mind either use JavaScript to solve the problem. I would prefer not to use JavaScript but what can you do :-). Here’s the Suckerfish:hover solution with my modifications (not much). I will not go much into this as the two source I have given are more then enough. I just wanted to show my modifications and to get more exposure to this problem.

CSS
I just add div.sfhover to my existing style.

div.float:hover, div.sfhover
{
background-color: #dde5f7;
}

JavaScript
I only modified this line var sfEls = document.getElementById(”nav”).getElementsByTagName(”LI”); to the following so it would be applied to an id called hover and to only div element tags enclosed in with in the hover id.

sfHover = function()
{
var sfEls = document.getElementById("hover").getElementsByTagName("div");
for (var i=0; i {
sfEls[i].onmouseover=function()
{
this.className+=" sfhover";
}
sfEls[i].onmouseout=function()
{
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

Source: Suckerfish:hover
Source: Whatever:hover

2005-11-3

CSS - Centering A Table

Filed under: — Adam @ 1:02 pm

Centering a table in css is quite simple to achieve however how one would think to center a table is not always the correct way to do so.

Common Mistakes

  • Table align attribute (deprecated)
    • One may say why not just use the table element attribute align? Well this attribute is deprecated and not recommended to be used. This is why we have CSS to separate styling and structuring.
  • Table style text-align: center;
    • One might think to just apply a style on to a table by using text-align: center;. However text-align can only be applied on non-block level element. A table is a block level element.

Solutions

  • Method 1 - Using Margins
    • To center a table one must apply a style with margin-left: auto; margin-right: auto;. This can be done like so:

      table.center { margin-left: auto; margin-right: auto; }

      Then apply the class style like so:

        <table class="center">
          ...
        </table>
        
  • Method 2 - Using Percentages
    • If you desire to have a table with a specific width, you can do this:

      table.center { width: 70%; margin-left: 15%; margin-right: 15%; }

      Then apply the class style like so:

        <table class="center">
          ...
        </table>
        
  • Method 3 - Using Fixed Width
    • If one desires to have a table with a fixed width you can do this:

      div.tablecontainer { width: 98%; margin: 1%; }
      table.center { margin-left: auto; margin-right: auto; width: 200px; }

      Then apply the class style like so:

        <div class="tablecontainer">
        <table class="center">
          ...
        </table>
        </div>
        

      You can set the “width: 200px” to whatever width you desire.

Notes / IE Exception To The Rule

These methods worked perfectly in Mozilla Suite/Firefox, Opera and IE 6. However these methods did not work in IE 5.5 or IE 5.01. You can over come this problem by doing a couple additional styles and the use of a div or span element tag.

  • IE 5.01 & IE 5.5 Additional Solution
    • For these methods to work in IE 5.01 & IE 5.5 one must add some additional styles. First enclose your table with a div or span element tag with a css class such as tablecontainer and then create an additional style to your tr and td element tags like so:

      div.tablecontainer { text-align: center; width: 98%; margin: 1%; }
      div.tablecontainer tr, div.tablecontainer td { text-align: left; }
      table.center { margin-left: auto; margin-right: auto; }

        <div class="tablecontainer">
        <table class="center">
          ...
        </table>
        </div>
      

      The “text-align: center;” is what will cause the table to center in these versions of the IE browser. The tables will not center without it. The draw back of having “text-align: center” is it will center all the text inside your table cells. This is counter acted by applying a style to “tr” and “td” to align left. If you have th element tags, make sure to set a style so it aligns the text entered back to the default behaviour if desired (i.e. table.tablecontainer th { text-align: center; }).

Source: Center a table with CSS by Scott Granneman
Source: Centring using CSS

2005-9-30

Handcoding vs WYSIWYG

Filed under: — Adam @ 9:49 pm

Now a days it is easy to get your code written by an editor, but are you learning how things really work? Very well written statement. Also do not forget about following standard compliance, World Wide Web Consortium (W3C). Interesting read, that should be passed on to certain people.

read more | digg story

2005-9-2

Mod_Rewrite and Regular Expressions

Filed under: — Adam @ 12:01 pm

This is one of the best posts/articles I’ve found for a beginner to read that explains regular expressions and how they work using the Apache module, mod_rewrite. Even if you are not interested in mod_rewrite this is still a good read to understand regular expressions.

read more | digg story

2005-8-11

Web Site User Friendly URLs with mod_rewrite, won’t work

Filed under: — Adam @ 3:01 pm

I’ve read through many articles discussing “User Friendly URLs” and I have come to the conclusion that Apache module mod_rewrite and the use of an external prg (program) using preferably PHP but if necessary Perl, is the answer. If there is a better answer please let me know. As for now I can’t seem to figure out how to get my “User Friendly URLs” method to work using Apache mod_rewrite.

What I want to achieve is to create virtual paths such as www.domain.com/products/ or www.domain.com/products/erv/ with trailing slashes that is passed into mod_rewrite to process this virtual path. Which breaks up the path into separate values (i.e. “products”, “erv”). Then queries the database for the topic id to determine if “erv” and/or “products” exists. If it does exist the topic id would be returned to the page to be processed other wise a 404 error should occur to the client. I don’t want to have to input direct references to all the paths into Apache’s httpd.conf or .htaccess as I have 11 topics with 70+ sub-topics to deal with. Going to a database is the best option I believe. In theory this should work however I’ve tried my own mod_rewrite RewriteRules and RewriteMap with no success of a value being returned. I’ve even tried examples that demonstration a similar method but no success. If anyone has an idea how to achieve this or can direct me into the right direction please let me know.

PHP code example to break up the path into separate values.
list($value1, $value2, $value3) = explode(”/”, $_SERVER[’SCRIPT_URL’]);

httpd.conf mod_rewrite in VirtualHost directive.

RewriteMap content prg:/var/www/htdocs/venmar/getTopicId.php
RewriteRule ^(.*)/(.*)/$ /index.php?nTopicID=${content:$1|0}

2005-8-9

PHP/MySQL Query Example

Filed under: — Adam @ 3:25 pm

A basic MySQL query using PHP with commenting marked with //.

// SQL statement that will be sent to the MySQL database server.
$szQry = “SELECT column1, column2 FROM foo”;

// MySQL database login credentilas; host (127.0.0.1), username and password.
$szDBConn = mysql_connect(”host”,”username”,”password”);

// Select database using the login credentials provided above.
mysql_select_db(”database_name”, $szDBConn);

// Send SQL statement to database.
$saResults = mysql_query($szQry, $szDBConn);

// Fetch results retured back from the SQL statement.
$obResults = mysql_fetch_row($saResults);

MySQL Lost connection to MySQL server during query

Filed under: — Adam @ 12:41 pm

For more than 3 hours I’ve been trying to find a solution to the error I kept receiving when doing a basic query to MySQL through PHP. It kept returning back to me “Lost connection to MySQL server during query”. Right away I went to my PHP, MySQL and Apache logs to find more information. I came back with nothing more than the error message I already received. So as I usually do off I went to Google and IRC for some help. Neither were leading into any direction to a solution. Even after finding the MySQL documentation talking about the “Lost Connection” or “server has gone away” error I didn’t find a solution. I started talking to dhartmei on EFNet in the #OpenBSD channel for some assistance. He stepped me through doing the following at the command prompt.

# nc -v 127.0.0.1 3306
Connection to 127.0.0.1 3306 port [tcp/mysql] succeeded!
Host ‘localhost.domain.com’ is not allowed to connect to this MySQL

# netstat -an | grep 3306
tcp 0 0 *.3306 *.* LISTEN

# mysql -h 127.0.0.1 -u username -p database
Enter password:
ERROR 2013: Lost connection to MySQL server during query

This determined that port 3306 was listening for connections however localhost/127.0.0.1 returned an error message of “Host ‘localhost’ is not allowed to connect to this MySQL”. If you haven’t caught on already this means I forgot to set MySQL permissions correctly for the user. Remember that localhost and 127.0.0.1 is different according to MySQL permissions.

A quick GRANT (i.e. grant all ON database.table TO username@localhost identified by ‘password-here’) command in MySQL resolved the problem.

2005-7-20

How to Install PHP from Source

Filed under: — Adam @ 2:01 pm

This installation example for Unix/Linux installs dependency support for Midgard CMS. Make sure Expat, zlib (comes with OpenBSD) and iconv are installed before proceeding. I have added additional configuration for MySQL (so the correct MySQL libraries are used), Microsoft SQL Server, apxs, XML, exif, dba and mbstring. Refer to the PHP configurator for details (# ./configure –help).

# ./configure –with-mysql=/usr/local –with-mssql=/usr/local –with-apxs –with-xml –with-zlib-dir=/usr/lib –with-expat –with-config-file-path=/var/www/conf –with-iconv=/usr/local/bin/iconv -–with-exif –-with-dba –-with-mbstring
# make
# make install
# make clean
# cp php.ini-recommended /var/www/conf/php.ini

Review/edit /var/www/conf/php.ini (path may vary) file to match your requirements. To meet the requirements of Midgard CMS you will require to do the following.

Add extension=midgard.so into your php.ini file.
Add the extensions path to extension_dir. Type “php-config –extension-dir”. Place the returned path into your php.ini file.
Ensure the file_uploads=on.
Ensure the short_open_tag=on.

Midgard/PHP CLI Segmentation Fault

Filed under: — Adam @ 1:43 pm

Midgard CMS will crash PHP CLI if its loaded in the global php.ini. Add PHP settings to your Apache HTTP Server configuration file /var/www/conf/httpd.conf (path may vary). Put the below PHP settings into your httpd.conf file. This may also go into your Midgard httpd.conf if you want. Make sure to restart your Apache HTTP Server so configuration changes take affect.

php_value extension midgard.so
php_value register_globals 1

Midgard CMS - PEAR Install - Segmentation fault

Filed under: — Adam @ 1:34 pm

If you are experiencing “segmentation fault” when trying to do a PEAR package install on a system using Midgard CMS, do the following.

  • Comment out “extension=midgard.so” line in php.ini.
  • Restart Apache HTTP Server.
  • Re-run Pear package install (i.e. pear install Mail).
  • Uncomment out “extension=midgard.so” line in php.ini.
  • Restart Apache HTTP Server.

« Previous PageNext Page »

Take back your mailbox - CAUCE.org

Powered By Wordpress PHP: Hypertext Preprocessor MySQL Powered Download Juice, the cross-platform podcast receiver
Proud To Be Canadian Get Firefox Valid XHTML Valid CSS
<NO>OOXML Logo


26 queries. 0.411 seconds.
Copyright © 2004 - 2005 by Adam Douglas