Skip to content

Instantly share code, notes, and snippets.

swfu = new SWFUpload({
...
button_placeholder_id: "swfuploadButtonPlaceHolder",
button_image_url: "../images/swfupload/button.jpg",
button_width: "216",
button_height: "25"
...});
swfu = new SWFUpload({
...
button_text: '<span class="theFont">Upload</span>',
button_text_style: ".theFont { font-size: 16; }"
...});
<div id="swfuploadButtonPlaceHolder"></div>
svn co http://swfupload.googlecode.com/svn/swfupload/trunk/core swfupload
* {
margin: 0;
padding: 0;
}
bob={
config:{
timeout:3000,
descriptions:{
customfields:{
select:{
msg:"elementy listy podaj jako wartość domyślną, każdy oddzielony przecinkiem",
cssClass:"desc"
}
}
# =================
# = counter cache =
# =================
def after_save
self.update_counter_cache
end
def after_destroy
self.update_counter_cache
end
site={
config:{
preloaded_images:['button_1_hover.png', 'button_2_hover.png', 'footer_link_hover.png'],
images_rel_path:"/images/"
},
preload_images:function(){
jQuery.each(site.config.preloaded_images, function(){
jQuery("<img>").attr('src', site.config.images_rel_path + this);
});
extend ActiveSupport::Memoizable
def do_some_hardcore_calculations
2 + 2
end
memoize :do_some_hardcore_calculations
extend ActiveSupport::Memoizable
def do_some_really_hardcore_calculations(massacrefactor = 1)
(2 + 2) * massacrefactor
end
memoize :do_some_really_hardcore_calculations