alter table table_name add new_field_name int(2) default 0;
Adding field to existing MySQL table
October 15th, 2009Adding server side includes to JS and CSS files
October 7th, 2009Add the following to apache.conf to use server side includes in JS and CSS files:
AddType application/javascript .js
AddOutputFilter INCLUDES .js
AddType text/css .css
AddOutputFilter INCLUDES .css
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride All
Order allow,deny
Allow from all
Changing ENUM values
September 30th, 2009ALTER TABLE db.table_name CHANGE COLUMN old_column_name new_column_name ENUM(’first’,’second’,'third’) NOT NULL DEFAULT ‘first’;
Using Mason Methods
September 30th, 2009<& SELF:my_method,
arg1 => $arg1,
arg2 => $arg2,
&>
Easy way to get single value out of db
July 30th, 2009my $query = “SELECT COUNT(*) AS ‘c’ FROM db.table”;
my $value = $dbh->selectrow_array($query);
Photo Links
July 23rd, 2009http://www.studiolighting.net/homemade-light-box-for-product-photography/
http://digital-photography-school.com/forum/tutorials/28864-magnifying-glass-macro.html
innerHTML on P fails
July 22nd, 2009From http://channel9.msdn.com/Wiki/InternetExplorerProgrammingBugs/
innerHTML on P fails
Using innerHTML to insert new content into a p tag seems to fail consistently in 6.0.2900.2180.xpsp.050301-1521 on XP SP2. I have a repro case located at http://www.blowery.org/test/innerhtmlandp.html for your enjoyment. Just click on the link and you’ll see IE bomb out. I’ve also seen it silently fail, but I’m yet to come up with a repro case for that.
If you use a div instead of a p, innerHTML works as expected.
This behavior is by design
according to http://msdn.microsoft.com/workshop/author/dyncontent/content.asp
“Can’t put invalid HTML in the document: You cannot assign a string to innerHTML or outerHTML that contains invalid HTML. For example, trying to replace the content of the p element with another p will fail. A p element can only contain text and inline elements. However, replacing the entire p element with another p would work just fine.”
In your repro case you insert
into exististing
. Unfortunately similar mistakes break AJAX updaters on IE. — woid
Objects and JavaScript in IE8
July 21st, 2009Quick observation in IE8. If you have a form element with id=”myId”, myId is available directly through JavaScript as an object.
<input type=”text” id=”myId” value=”some value” />
<script>
alert(myId.value);
</script>
55 E 87 St, New York, NY 10128
July 16th, 2009<script type=”text/javascript”><!–
pshark_pop_propkey=25100;
pshark_pop_width=480;
pshark_pop_height=360;
pshark_pop_type=”overview”;
pshark_pop_tabs=”overview,photo,map,listings”;
pshark_pop_title=”55 E 87 St, New York, NY 10128″;
//–></script>
<script type=”text/javascript” src=”http://propertyshark.com/api/pop.js”></script>
The text is supposed to be inline
, but is it really?
And what about this
, i’m not sure