IT'S FRIDAY FRIDAY

Started by Mr. Analog, March 23, 2012, 08:38:02 AM

Previous topic - Next topic

Thorin

I came home to five girls in the house (two are mine).  One went home, three of the four are out on the trampoline having an outdoor sleepover.  It was kinda loud until I explained to them their voices could be heard down the block and they should whisper at night so they don't get caught staying up late.
Prayin' for a 20!

gcc thorin.c -pedantic -o Thorin
compile successful

Tom

I ended up ordering chinese food after work, eating said food while watching some tee-vee, playing minecraft for a couple hours, and then, instead of going to bed, I wrote this. My first real jQuery app. At least one that does something useful. :D Lets me calculate how much (in CAD) I'm going to get out of a given pay check (in USD). Grabs exchange rates from the bank of canada's handy xml feed, and then applies the 2.5% fee my bank charges me for the privilege. I could probably make it prettier. but Ugh. tired.
<Zapata Prime> I smell Stanley... And he smells good!!!

Mr. Analog

Haha, sounds like you guys had some fun Fridays
By Grabthar's Hammer

Darren Dirt

and to stretch beyond just Friday...

http://www.guardian.co.uk/lifeandstyle/2012/jun/17/fathers-day-celebrated-google-doodle
Quote
...American Sonora Dodd started the celebration [of Father's Day] in honour of her single-parent father, civil war veteran William Jackson Smart, after the success of the first modern Mother's Day in 1908. Dodd initially intended it to be celebrated on 5 June, her father's birthday, but the ceremony was pushed back to the third Sunday in June to allow her pastor to prepare a sermon.



I followed a link and noticed the Google Doodle for Mother's Day was "childish scrawls that many doting parents will wake up to on Sunday" vs. this Father's Day being Google providing an "animated version of its logo in tribute. It depicts the e from the logo covertly deploying a robot to deliver a mug bearing a #1 logo to a bespectacled letter l, before revealing itself and embracing the senior letter".

So what does that mean, kids only share the cutesy stuff with moms, while dads are looking for ways of being even more lazy than typically depicted on network television sitcoms? [/mock outrage]

_____________________

Strive for progress. Not perfection.
_____________________

Thorin

Quote from: Tom on June 16, 2012, 04:59:09 AM
I ended up ordering chinese food after work, eating said food while watching some tee-vee, playing minecraft for a couple hours, and then, instead of going to bed, I wrote this. My first real jQuery app. At least one that does something useful. :D Lets me calculate how much (in CAD) I'm going to get out of a given pay check (in USD). Grabs exchange rates from the bank of canada's handy xml feed, and then applies the 2.5% fee my bank charges me for the privilege. I could probably make it prettier. but Ugh. tired.

Was looking for the right thread to post in, thought I'd post in a Friday thread, noticed the link in the quote above so thought I'd try out the app.  Doesn't work :(  The Exchange Rate field doesn't fill properly, it fills with "[object HTMLTableCellElement]".
Prayin' for a 20!

gcc thorin.c -pedantic -o Thorin
compile successful

Tom

Quote from: Thorin on March 04, 2016, 02:00:10 PM
Quote from: Tom on June 16, 2012, 04:59:09 AM
I ended up ordering chinese food after work, eating said food while watching some tee-vee, playing minecraft for a couple hours, and then, instead of going to bed, I wrote this. My first real jQuery app. At least one that does something useful. :D Lets me calculate how much (in CAD) I'm going to get out of a given pay check (in USD). Grabs exchange rates from the bank of canada's handy xml feed, and then applies the 2.5% fee my bank charges me for the privilege. I could probably make it prettier. but Ugh. tired.

Was looking for the right thread to post in, thought I'd post in a Friday thread, noticed the link in the quote above so thought I'd try out the app.  Doesn't work :(  The Exchange Rate field doesn't fill properly, it fills with "[object HTMLTableCellElement]".
It used to work. heh. I haven't even used it in ages. Google/xe works well enough.

The xml page probably changed location or something. Dunno.
<Zapata Prime> I smell Stanley... And he smells good!!!

Darren Dirt

#36
Quote from: Thorin on March 04, 2016, 02:00:10 PM
Doesn't work :(  The Exchange Rate field doesn't fill properly, it fills with "[object HTMLTableCellElement]".

You should switch to a new browser instead of using Interweb Exploder.





















;)

/ducks







but SRSLY...

view-source:http://tomasu.net/~moose/pay.html

return $(this).find("Observation_ISO4217").text() == "USD";

^ is .find an exact match? If so, it's been updated, now the XML contains "USD_NOON" as the value. Still does multiple days though, with the final one being the most recent.

If that doesn't fix the problem, you might check if upgrading to something more recent than v1.7 of jQuery helps. #idk
_____________________

Strive for progress. Not perfection.
_____________________

Thorin

Joke's on you, I know how to do proper QA and black-box-tested in three different browsers before white-box-testing by looking at source.

Also, the problem isn't the .find(), that seems to be finding the element just fine. It's the comparison between the text of the element and a string using equals instead of like that's messing it up.

That's the problem with page scraping code - if the page changes the code usually breaks.
Prayin' for a 20!

gcc thorin.c -pedantic -o Thorin
compile successful

Mr. Analog

Dear god please read this:
http://stackoverflow.com/questions/359494/does-it-matter-which-equals-operator-vs-i-use-in-javascript-comparisons

QuoteThe identity (===) operator behaves identically to the equality (==) operator except no type conversion is done, and the types must be the same to be considered equal.

http://www.c-point.com/javascript_tutorial/jsgrpComparison.htm

It's one of those little, big things that can save ur ass (in Javascript land anyway)
By Grabthar's Hammer

Thorin

Yeah, JS type coercion, what a kick in the nuts.
Prayin' for a 20!

gcc thorin.c -pedantic -o Thorin
compile successful