Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
https://www.chrisjmendez.com/2008/06/21/ruby-mixing-in-a-module-immediately-after-an-objects-singleton-class/
2
1339
posted 17 years ago by chrisaiv
the controllers view is setup s.t. it adds the mainView as a subview to its default view in the init method
4
2824
posted 17 years ago by jonathanbp
In summary, IE7 compatibility support looks as follows:
IE=7
Display in IE7 Standards mode; Already supported in the IE8 Beta 1 release
IE=EmulateIE7
Display standards DOCTYPEs in IE7 Standards mode; Display quirks DOCTYPEs in Quirks mode...
3
2886
posted 17 years ago by gbot
Firefox ignores the alt tag on images and uses the title tag whereas IE uses the alt tag. This javascript code copies the text in all image alts to the image's title. Best when placed at the footer of each page
1
1385
posted 17 years ago by ezerick
CSS Diagnostics allows web designers and developers to highlight invalid HTML using CSS selectors. Say goodbye to the font tag by highlighting it in a large obnoxious border. It also has the ability to highlight 404 pages, old CSS classes and old Jav...
7
2851
posted 17 years ago by neal_grosskopf
REXML does not seem to have a 'lang' method, which is strange since lang is in the XML 1.0 Specification §2.12 'Language Identification', and in many other libraries. Because of Ruby's 'monkey patching', it's pretty easy to add - you just recursivel...
1
1018
posted 17 years ago by tommorris
Allow for easier editing of content by users who didn't make the site.
1
1128
posted 17 years ago by EvanL
Test-first programming, in which you write the unit tests first with the unittest module and then work on the code until it passes all the tests, seems like a good substitute for writing interfaces or documentation first. The unit tests are like an A...
0
1197
posted 17 years ago by chombee
This example shows how to compile the hello.c file out of the fuse source tar.
0
1078
posted 17 years ago by narkisr
By the legendary abigail. Fails to match if and only if it is matched against a prime number of 1's. That is, '11' fails, but '1111' does not.
I once heard him talk why this works, but I forgot most of it.
3
1569
posted 17 years ago by banzaiman