This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_json(encode, decode): | |
data = { | |
"foo": u"The quick brown fæx jomps øver da læzy dåg", | |
} | |
x = encode(data) | |
print("ENCODED: %s" % x) | |
e = decode(x) | |
print("DECODED: %s" % e) | |
import simplejson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jQuery makes me lazy :-) | |
$(document).ready(function($) { | |
var toReplace = "/trans.gif"; | |
$('img[src$=png]').each(function() { | |
$(this).css({ | |
width: $(this).width() + 'px', | |
height: $(this).height() + 'px', | |
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + $(this).attr('src') + "', sizingMethod='scale')" | |
}).attr('src', toReplace); | |
}); |