Tony’s Technical Blog

Collection of useful resources and technical documents

  • About Me
  • Acroynms
  • Resources
  • Web2.0
  • RSS
  • Comments RSS


Control Panel



  • Remember me
  • Register

Search

Categories

  • Apache
  • CSS
  • EXIF
  • Flash
  • GeoIP
  • JavaScript
  • Microsoft Windows
  • MySQL
  • PHP
  • Ruby on Rails
  • Windows Live Maps API

Keyword Cloud

across additional address answer apache application article automatically bitwise client community complete correct database directory documentation downloads element enabled everything feature following functions further google homepage htaccess humble information install interested internet javascript language library location looking manual maxmind microsoft mootools operator player prevent question rather reading reference registration relatively result script secret_question server service simple simply software solution support syntax transparent trying update useful variable version virtual virtualhost website windows working

Archives

  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • February 2007

Links

Other

  • Tony Collings
Pages (8): [1] 2 3 4 » ... Last »
You are here : Home

Peak-a-Boo

April 11, 2008

Filed under: CSS — Tony Collings @ 5:51 pm

A colleague came across this one the other day at work. Working on a revised homepage design there was an issue with a z-index opacity layer overlaying some pretty Flash we’d done. Mac/FF : The damn Flash kept disappearing. After some research she found this solution, it ended up being rather simple but could have had us banging heads on desks for hours.

http://opensoul.org/2007/4/26/firefox-mac-flash-css-opacity-peek-a-boo

You simply create a transparent PNG of your required color/opacity and create a repeating CSS background. Then you need to provide a hack for IE ( surprise surprise ) because IE doesn’t support transparent PNG’s prior to IE7. Voila !


Comments (0)

The Humble Tilde

April 8, 2008

Filed under: PHP — Tony Collings @ 11:03 am

That’s the great thing about code, there is always something new to learn. I came across this one the other day.

The humble tilde (~) In some articles I read that it’s often used in Propositional Logic, in others it’s a reference to a home directory. In PHP though it’s a ‘Bitwise Operator’.

“…it’s usually used with flag values, where each bit represents an option that is on or off. You have a bunch of constants defined as the individual bit values, like say E_DEBUG, then ~E_DEBUG means “turn on everything except E_DEBUG”. Often used as a mask to turn a particular bit off, as in $flags &= ~E_DEBUG which turns off E_DEBUG while leaving the other bits in $flag unchanged.” - Mark J. Reed, php.general - NNTP Newsgroup (news.php.net)

Here’s some other strange syntax in PHP :

@ - The ‘at’ symbol suppress any errors returned from an expression
http://us2.php.net/manual/en/language.operators.errorcontrol.php

$$ - Is a variable variable
http://us.php.net/manual/en/language.variables.variable.php

% - Is the remainder (Arithmetic Operator)
http://us2.php.net/manual/en/language.operators.errorcontrol.php

&$ - Is a referenced variable

~ - Bitwise Operator ( ^ is also a Bitwise Operator )
http://hu.php.net/manual/en/language.operators.bitwise.php


Comments (0)

The Haversine and Store Locators

March 1, 2008

Filed under: PHP, GeoIP — Tony Collings @ 4:55 am

You learn something everyday. I’ve been asked to create a distributor feature of satinsmooth.com and was beginning to wonder where on earth you would start. I wanted to tie it in with the Google Maps API and do some fancy Web2.0 UI stuff. Well after a bit of searching I started to read about the Haversine formula on the Wiki.

Now I’ll admit I’m not the greatest at maths, but it lead me onto some more searches and eventually this article on Google. Brilliant, this is an excellent starting point ! Having never created a store locator before I’m going to append notes to this article based on my findings so anyone else happening across this on the internet will know what to do !


Comments (0)

Next Page »

 
  • 20 queries. 1.949 seconds.
  • Powered by WordPress
  • XHTML
  • Website Statistics