Diving into Ruby
For fun and profit I’ve been spending today learning Ruby. A day and already I’m digging around in lambda functions and introspection. Which would be impressive in other contexts and tantamount to bragging “I’ma genious!” otherwise, except that I can’t accept the credit - thus far it’s all Ruby. Twelve hours in and this [...]
Scarfing Flickr Images
My gf was trying to grab an image of puppies or kitties or something off of Flickr for a Photoshop contest she was entering and discovered that Flickr makes a whole-hearted attempt to protect user’s images throug the clever use of layers of divs.
I, knowing that once it’s in the browser window nothing is safe, [...]
C# 3.0 with steps backwards?
I’m a big fan of C# as a language, I think Microsoft’s done a hell of a job with and it’s far easier to use than Obj-C or Java (quite probably because of the IDE, which is unparalleled - how’s that for some flame-bait?) so I’m a bit surprised, if the post contains actual factual [...]
Prototype.js docs updated
Given that it’s a bit of a battle to read the whole source code to figure all its functions out, the updated unofficial documentation for Prototype.js v1.4.0 is most welcome.
“Why is a documentation update newsworthy?” you ask. “And is life really that boring at 2am?” you wonder.
“Because Prototype.js kicks all sorts of javascript ass”, I [...]
ASP.Net: Declaration Expected
If you’re working in ASP.Net and writing some VB like so (nonsensical pseudo-code):
<script runat=”server” language=”VB”>
Label_Name = Left( theName, 5 )
</script>
and you get a Declaration Expected error that highlights a line inside your <script /> block you may not actually have an error with your code per se. You may just [...]
SQL Query Analyzer: Viewing Variable Values
Say you’re in SQL Query Analyzer writing some SQL that will one day grow up big and strong into a stored procedure and it isn’t working. You’re getting a cryptic error message when you execute*:
DECLARE @timezoneOffset float
DECLARE @baseDate datetime
DECLARE @sqlStr varchar(40)
SET @timezoneOffset = -3
SET @baseDate = CONVERT( varchar(40), DATEADD( hh, @timezoneOffset, GETDATE() )
SET @sqlStr = [...]
The handiest <div> ever
This has got to be the handiest <div> ever:
<div class=”clear”></div>
div.clear {
height: 0px;
line-height: 0px;
font-size: 0px;
clear: both;
}
Any sufficiently-advanced technology…
i can just hear the old developers now: “what is this <hr /> you speak of and how is it that with but a few mere glyphs and symbols you are able to replace all mine spacer images and table rows and yet it appears verily the same??? The table row be sacred, sorcerer!”
Safari and the “does not allow calls” Javascript error
If you’re mucking about with Javascript in Safari and the Javascript Console shows you the following error:
Object (result of expression yorFunctionNameHere) does not allow calls.
it might mean you don’t actually have a function named whatever it is you’re trying to call. Ie: in this case I don’t have yorFunctionNameHere but I do have [...]
No compiler in Ubuntu
If you’re running Ubuntu and you happen to get this error when you make:
no acceptable c compiler found in path
You need to first do the following:
sudo apt-get install gcc
If you then get this error:
C++ preprocessor “/lib/cpp” fails sanity check
You probably then need to install: g++, gcc and cpp.