To concatenate in PHP you use a ‘.’, not a ‘+’. Likewise, you don’t use ‘.’ to reference an object’s members, you use ‘->’.
Move along, nothing to see.
To concatenate in PHP you use a ‘.’, not a ‘+’. Likewise, you don’t use ‘.’ to reference an object’s members, you use ‘->’.
Move along, nothing to see.
12 Nov, 2008
Posted by: Matt Williams In: gotchas| javascript
First off, let me say that I really like DIY Map. It’s quick, and responsive, with an easy to use interface, as well as allowing you to make changes on the fly easily.
That said, I discovered lastnight / this morning that there are some quirks with its updating through the Flash JavaScript Integration Kit. [...]
Been a while since I’ve written. I’ve been sick and working on a side project. That said, I’ll be writing more……
Today’s note/reminder is a gotcha about YUI datasources. If you have JSON feeding the datasource and you’re getting back more fields in the results than you’re expecting, the datasource will not behave properly. For example, [...]
A coworker and I discovered an issue with jboss’ run.sh (which starts the app server). The problem lies in different flavours of unix (or unix-like) shells returning different values for wait.
The relevant code is:
# Wait until the background process exits
WAIT_STATUS=0
[...]
12 Sep, 2008
Posted by: Matt Williams In: Uncategorized| eating crow| gotchas| programming| ruby
More about methods, it’s inspired/spurred by a comment on methods, public_methods, and private_methods by Pit Captain. It also corrects some misconceptions I had (and may have (wrongly) given others).
I’ve added a new category, “eating crow” for this and any other postings where I step back and re-evaluate my posts. This is [...]
05 Sep, 2008
In this blog entry, dear reader, we examine the statemachine and treetop gems via an old standby, a Zork imitation. And, despite the title, you won’t find a grue.
$ ruby adventure.rb
This is the beginning. Like all tales, there’s a beginning, a middle and an
end….
Paths lead n.
What do you want to do?
n
This is a path in [...]
29 Aug, 2008
Posted by: Matt Williams In: Uncategorized| css| gotchas| web design
For a project I’m currently working on I wanted to make some “bubble” tooltips. In order to cut down on the size/number of images, I’m using css sprites. A quick google reveals that nobody else has (at least on the first page) put together tooltips using sprites. The technique will work with any sort of [...]
I found out something interesting today. Per the W3C, the total “width” that a block element uses is:
If ‘left’ or ‘right’ are given as ‘auto’, their computed value is 0. The following constraints must hold between the other properties:
‘margin-left’ + ‘border-left-width’ + ‘padding-left’ + ‘width’ + ‘padding-right’ + ‘border-right-width’ + ‘margin-right’ = width of containing [...]
26 Aug, 2008
Posted by: Matt Williams In: gotchas| programming| ruby
Yesterday, I posted an article entitled Break my code, please, wherein I posted a very fragile piece of code, with the challenge to find ways in which to break it.
What follows is a discussion of the code and why it is bad/fragile/easily broken…..
There’s a number of things we can should take into account when writing code — boundary cases, etc., that can make or break a programme. Yes, testing is important, but I think that developing good defensive programming practices is even more important. That said; I present the following, fragile, code. Just about every line has [...]
Matt Williams is a geekly jack of all trades residing in Columbus, OH, USA.
| Adopt a Dragon from Dragcave |
|---|
![]() ![]() ![]()
![]()
|