Photo
Tags: cats
Text

Bilingual Money Regex

When entering money into a form, there’s all sorts of potential ways a person could want to format the value, especially when you’re trying to serve a bilingual user base. To match every possible format (I could think of) I came up with the following regular expression:

^(\$?\d{1,3}((,\d{3})*|( \d{3})*|\d*)(\.\d{2})?|\d{1,3}((,\d{3})*|( \d{3})*|\d*)(\.\d{2})?\$)$

This matches:

  • Big long numbers: 99999999
  • Leading and trailing dollar signs: $99, 99$
  • Space delimited numbers: 99 999 999$
  • Comma delimited numbers: $99,999,999
  • Cents: $99.99

This DOES NOT match:

  • Improper use of delimters: $9 99, 999 9 etc.
  • Mixed delimters: $99,999 999
  • Mixed dollar signs: $99$

Drop this regex in your validator and enjoy!

Photoset
Link

tylerbrainerd:

Today at Goodwill, I found this:

image

(sorry for poor image quality, i only had my cell phone available today)

It is a magnificent Model 500 telephone, with only very minor damage, for a princely 3.99. This was a find, as I’d been wanting one of these for some time. What follows is what I did…

Photo
Tags: cats keyboards
Photo
Tags: keyboards
Photo
Tags: keyboards
Text

Sandwich Who

badkidsjokes:

knock,knock
how’s there
sandwich
sandwich who
do you put picles in it?

Photo
archangelream:

gets me every time

archangelream:

gets me every time

(via paei-deactivated20131213)

Photo

(Source: catleecious, via owlkeepitreal)

Photo
Photo
Text

Tipsy - Now with SVG support

Tipsy is a great, simple tooltip plugin for jQuery.

At Ajah, we’re currently using Tipsy to display additional data in our d3 visualizations. However, Tipsy doesn’t feature true SVG support and incorrectly assigns an SVG element’s position in Chrome and Firefox.

In Chrome, you’ll see a tooltip only targets the top-left corner of an SVG element, and in Firefox, it will always render at the top of the page regardless of where the actual element is. This is because Tipsy assumes all elements in the DOM can provide an offsetWidth and offsetHeight, where with SVG you want the BindingBox’s width and height instead.

With our new, improved Tipsy, it will first try to detect a BB accessor if possible and otherwise fall back to using offsetWidth and offsetHeight.

You can grab it from Ajah’s GitHub.

Photo
Photo
shallow-rewards:

Natalie Bootleg was a pretend alter-ego I came up with about ten years ago, intended for a dance project I was working on with a young woman in New York. I wasn’t going to put my name on it for a number of reasons (chiefly that I was still with Pitchfork), but it never amounted to anything; she bombed out and moved back to Nantes.
Last year, while browsing through old folders of samples and half-ideas, I listened to some of the stuff we did, and it’s pretty terrible. I will never put it out, but I always liked the name and so, when Mr. Dead Girlfriends let me test-drive Elite Gymnastics’ “h e r e, i n h e a v e n” for RUIN 4, I dusted Natalie off. 
It occurred to me that on the back of EG’s success, I could buckle-down and try to relaunch a laptop-musician pseudo career without anyone knowing it was me, so I developed Natalie Bootleg as an EG-obsessed Korean-American girl living in Athol, Massachusetts. Barring a live performance of “Life/Trap,” time did not allow me to follow through on those grand designs. It never does.
This weekend, I had one of those thought-crashing “ideas” creative types often have, but in this case it was one I could conceivably realize: a tribute to Daniel Lopatin’s Chuck Person cassette, Eccojams, which has held sway over me since my first listen. Here’s hoping you enjoy some of mine.
DOWNLOAD

shallow-rewards:

Natalie Bootleg was a pretend alter-ego I came up with about ten years ago, intended for a dance project I was working on with a young woman in New York. I wasn’t going to put my name on it for a number of reasons (chiefly that I was still with Pitchfork), but it never amounted to anything; she bombed out and moved back to Nantes.

Last year, while browsing through old folders of samples and half-ideas, I listened to some of the stuff we did, and it’s pretty terrible. I will never put it out, but I always liked the name and so, when Mr. Dead Girlfriends let me test-drive Elite Gymnastics’ “h e r e, i n h e a v e n” for RUIN 4, I dusted Natalie off

It occurred to me that on the back of EG’s success, I could buckle-down and try to relaunch a laptop-musician pseudo career without anyone knowing it was me, so I developed Natalie Bootleg as an EG-obsessed Korean-American girl living in Athol, Massachusetts. Barring a live performance of “Life/Trap,” time did not allow me to follow through on those grand designs. It never does.

This weekend, I had one of those thought-crashing “ideas” creative types often have, but in this case it was one I could conceivably realize: a tribute to Daniel Lopatin’s Chuck Person cassette, Eccojams, which has held sway over me since my first listenHere’s hoping you enjoy some of mine.

DOWNLOAD

(via shallow-rewards-deactivated2013)