I’m so heartbroken about this spill in the gulf situation. All those animals. They’re polluting our oil.
—This is real ya’ll.
Sarah The Palin (via vruz) (via abcsoupdot)
From Hipster to Hippie.
thedailywhat : hipsterrunoff
SNL - Fake Millionaire.
via chuck @phun.org
RROD
1. 6:30pm get RROD
2. Google how to fix it.
3. Website (support.microsoft.com) tells me I need to accept cookies. WTF. I am letting you use cookies. But I get it, you don’t like Safari.
4. Switch to Firefox
5. Go trough how to fix it steps, realize I have to send it in for repair
5. Website tells me I might NOT be within warranty period
6. Google “how to check if console is under warranty”
7. Hit a website that only points me to the main page of support.microsoft.com
8. Getting frustrated.
9. Try xbox again. Oh look at that, it turned on!
10. 3 minutes later, xbox freezes with a loud beep
11. Back to website. Follow steps of how to send it in for repair.
12. Asks me for my serial number without telling me where to find it.
13. Unplug xbox from everything, type in numbers.
14. Fill in address, etc. Asks me to select what my language “English Australian, English Canadian, English etc…”
15. Popup tells me to choose my address (both options provided are the same!), click whatever
16. Hit next page, tells me my normal warranty expired but I still qualify for the 3 RROD fix.
17. Click Repair.
18. Tells me I have to go to support.microsoft.com and choose my country because they don’t ship to the outside US.
19. Freaking pissed now.
20. Realize that while it says “International” on the top left corner, it doesn’t mean I’m on a non-US site.
21. Go to Canadian site. Follow all steps again.
22. 10 minutes later, site is asking for my credit card.
23. 7:30pm FUUUU.
Prototype 1.5 to 1.6 upgrade nightmare.
The issue: in prototype 1.5, there are some Ajax.Request calls that return onComplete, the response, and then a second variable passed through with json from php. Prototype 1.5 handled this perfectly fine.
But on the new prototype (1.6.1), Ajax.Request doesn’t handle that second variable. So the there are some chunks of code not executing because the variable is null.
This has taken me 2 days to figure out. Two whole days of researching, reading random people’s code, reading documentation, and when none of those panned out, reading the prototype file side by side to find what changed.
So, on to the practical example of what happened.
For prototype 1.5..
// In the php file that handles the ajax request
if( $_POST['ajax_request'] ) {
$arrSomeStuff['name'] = "John Smith";
$arrSomeStuff['city'] = "Toronto";
echo json_encode( $arrSomeStuff );
}
//and the javascript request:
new Ajax.Request('some_url.php', {
parameters : { 'ajax_request' = 1 },
onComplete: function(response, arrSomeStuff){
$('name_div').update(arrSomeStuff.name);
},
onFailure: function(response){
// handle errors
}
});
// assumes all the other defauls from Ajax.Options
The above code, processed just fine… until Prototype 1.6, where you can’t do that because the second parameter is the response.headerJSON. Something completely unnecessarily for my use. I need it to be the response.responseJSON option!
So if you want to get this to work with 1.6, you have to send along the right header in the php file.. otherwise javascript will read responseJSON as null
// NEW: send the content type
header('Content-type: application/json');
echo json_encode( $arrSomeStuff );
// And the javascript request has to be modified like so:
onComplete: function(response){
var arrSiteVariable = response.responseJSON;
// do whatever
}
There is another method of course, you could just forget about sending the json header, and parse the response.responseText string, which contains everything sent back from the server. (This might be a good thing because responseJSON only works for “small ammounts of text”, the limit is not specified. So trial and error friends)
The reason for this change? Well, the Ajax class now wraps xmlHttpRequest in this: Ajax.Response class/object/whatever thing. For more info: http://www.prototypejs.org/api/ajax/response
Now if you excuse me I have to go shoot myself, as there are about 20 or so Ajax.Request per javascript files, and there are about 50ish files.
Google Maps loads into the dom, doesn’t display
Its because I had a z-index:-1 on the div that the maps get loaded. Changed it to 1, 2, 3, anything positive, and it started working.
Random changes like that to the google maps api over the weekend, suck.
Hugo Chavez Just Joined Twitter
(via negevrockcity)
hmm this should be interesting.
Yes, it is. How is he going to deal with the 140 character limit?! lol.