First off, I’m not trying to be a complete jack-ass, just a helpful one. This article, by Stefan Ashwell, popped…
Author: chance (page 5)
Zend_Log quickstart
Lately, I’ve found that I need to create a more robust logging system for both audits and debugging. I found…
INSERT INTO `table` (`column`,`col2`) VALUES isn’t completely worthless
In most cases, when doing an insert statement I use SET to increase readability. It is also nice because I…
stupid *nix tricks
[Edit: Seems like the -u flag is on debian systems such as Ubuntu. Did a man on a FreeBSD system…
understanding zend ini (Zend_Config_Ini)
So I just spent the past half hour reading and sorting through documentation on Zend_Db, Zend_Config and Zend_Config_Ini so that…
iPhone 2.1 firmware impressions
Update: so far the battery life is holding out to be good. I’m getting less call fails but not sure…
jQuery+AJAX+JSON
update: I really should RTFM. dataType can go in any place when listing options. If I had read the docs…
update: I really should RTFM. dataType can go in any place when listing options. If I had read the docs a bit more carefully, I would’ve noticed that the reason I started getting a JSON object back instead of a XMLHttpRequest is that I specificed ‘success’ with a callback instead of ‘complete’.
Though I did figure out a better way of parsing the returned object
var myCallback=function(jsonObj){
for (k in jsonObj) {
if (iWantToCheck(k)) {
useValueOfK(jsonObj[k]);
}
}
}
Found out something interesting today. I normally try to stick to a simple AJAX return such as html or xml that is easy to manipulate. Today, I couldn’t accomplish my task without the help of JSON. I’m sure there’s other ways I could’ve told JS how to react on different succeed or fail conditions but JSON was the first one that came to mind. On to the story…I set the dataType on my ajax options to ‘json’ and was surprised to find that I was still getting a XMLHttpRequest object instead of the expected JSON object. I tried sending ‘Content-Type: application/json’ header, tried a bunch of other things I can’t remember at the moment.
SXSW
So after reading this post, I want to go. There’s a list of other things that seem interesting to. At…
Pwning your MySQL
How to find out if a specific column exists: SHOW COLUMNS FROM TableName WHERE Field LIKE (‘ColName’)
Use regex to find the source of an image
Recently, I needed to find the source of an image in a blob of text. Since the text was out…