search for: 250x

Displaying 2 results from an estimated 2 matches for "250x".

Did you mean: 250
2013 Aug 16
1
as.Date.character speed improvement suggestion
...x)) { ux <- unique(x) idx <- match(x, ux) y <- as.Date.character(ux, ...) return(y[idx]) } as.Date.character(x, ...) } ## Example1: Construct a 1-million length character vector of 1000 unique dates ## By considering only unique values, speed is >250x faster > dtch <- format(sample(Sys.Date()-1:1000, 1e6, replace=TRUE)) > system.time(dt1 <- as.Date.character(dtch)) user system elapsed 12.630 23.628 36.262 > system.time(dt2 <- as.Date.character2(dtch)) user system elapsed 0.117 0.019 0.136 > identical(dt1...
2006 Jan 11
0
File_column : how can I resize/convert/whatever an image according to form-submitted values?
...mbnail" => "100x100>" } private def resize_image # stuff that processes the image with the form-provided values [:resize_dimension] (can be "w" (width) or "h" (height) ) and [:resize_to], so as to obtain the equivalent of "convert -resize ''250x'' stuff.jpg" or "convert -resize ''x100'' stuff.jpg" end end What should I put in that resize_image callback function? Would a callback be the DRY way, to begin with? Any tips, ideas, previous experiences, anyone? TIA, Dominique Rose-Rosette