Peng Zhang on May 22nd, 2013

This happened on Leslie, north of York Mills Rd, at around 5:30pm, during the afternoon rush hour, on May 21, 2013.

http://www.pengzhang.ca/blog/wp-content/uploads/2013/05/MD000011_x264_001.mp4

Tags: , , ,

Peng Zhang on March 31st, 2013

This is just for my own record.

  • Outgoing mail server (SMTP) settings:
    • SMTP server: smtp.mail.yahoo.com
    • Use SSL
    • Port: 465
    • Use authentication
  • Email address: Your Yahoo! Mail email address (for example, jo.bloggs@yahoo.com)
  • Password: Your Yahoo! Mail password
  • Account name/sign-in name: Your Yahoo! ID (your email address without the “@yahoo.com” at the end; for example, “jo.bloggs”)

copied from yahoo help http://help.yahoo.com/kb/index?page=content&y=PROD_MAIL_CLASSIC&locale=en_US&id=SLN3219&pir=rG6nGQNibUmlYqy07mdzAsXXVZIDm8aIQfRdEWt50T_IcTgZAoDn85SZccSoZmZ_7D0pg26sfZDbXLqHKP9KRGhB.Bjc6g–

Tags: , ,

Peng Zhang on January 25th, 2013

I have always stayed away from PNG for a long time, up until recently when I feel that I don’t need to support IE6 and have to use it to implement a web design that uses quite some shadows and gradients.

I had always thought that PNG with transparency would cause lots of trouble with the IE browser. Therefore, I was quite surprised that I sailed through the implementation relatively smoothly using PNG with transparency. The only hiccup was when I tried to fade in the lighting overlay (the PNG image with a gradient transparency).

Below is a summary of my thoughts:

  • With IE9 or later, PNG with a complex transparency, whether as foreground or background image, can display and fade in (opacity animation) without any problem;
  • With IE7 and IE8, PNG images with a subtle gradient alpha channel can be displayed natively without a problem, whether as background image or foreground image – whatever images will show through properly;
  • With IE7 and IE8, the opacity of a div containing an PNG foreground image or a PNG background with transparency can be animated, as long as the transparency is  “indexed transparency” (or paletted transparency) not “alpha transparency”; in other words, if the transparency mask consists of either the black or white values (0 or 255), the opacity animation seems to be normal;
  • With IE7 and IE8, if the transparency is a gradient channel with masking values between 1 and 255, the opacity animation will show the alpha channel momentarily during the animation, which is a problem;
  • With IE7 and IE8, animating the CSS properties of margin and background-position and etc still work perfectly well, with a PNG containing a complex transparency.
  • With IE6, 32-bit PNGs with transparency are not supported; but people claim that palletted PNGs (8-bit?) with transparency are supported. (see http://stackoverflow.com/questions/982058/are-png-images-cross-browser-compatible)

In summary, I will be using PNG with transparency a lot more from now on in web development. And PNG does not deteriorate over generations. PNG at 8-bit can have semi-transparent pixels that only Fireworks can generate that will work like transparent GIF, only better without the annoying halo) – see this article.

Here is also a good reference – PNG Alpha Transparency.

Tags: , , ,

Peng Zhang on January 13th, 2013

While window.back() works just fine, it does not work in Internet Explorer 9 that I have, because the method is not there in the window object. To go back in history in both Firefox and IE, the code is history.back().

Tags: , , , , ,

I got asked the questions about how much it costs to study in Canada as an international student once from someone from back in China. And to answer her question, I did some rough estimation using Excel. And I’d like to share this estimation document with anyone who is interested in. budget-estimation-for-international-students-in-Canada

Tags: , , , , , , ,

Peng Zhang on October 17th, 2012

I just want to record my experience with debugging WordPress and some plugins.

  • WP-Debug is a plugin that is popular based on the number of downloads, but has not been updated for more than a year; also, when activated, it could display some debug information including queries in the front end in the footer area, but it also brings up errors that bubbles up from inside one of its underlying Krumo library file; so I decided not to use it;
  • WP FirePHP is a plugin that is supposed to allow pushing logged information to the FireBug Console; but I found documentation lacking about how to actually to use the plugin, and where to write code to call its logging methods; and when activated, it adds an annoying an absolute div panel floating on top of some key areas of the admin dashboard; so I think it is not very usable at all;
  • Debug Bar is a plugin that I used that adds a debug button on the admin screen, very useful;
  • Debug Objects is also a useful plugin that I used that could be used to show debug info on the front end, very useful;

In addition to using plugins, there is a configuration settings for WordPress that is related to debugging – WP_DEBUG. It’s a setting that is set inside the wp-config.php file. There is documenation about WordPress debugging and WP_DEBUG mode on WordPress Codex pages.

Tags: , , , ,