search for: binary_data

Displaying 6 results from an estimated 6 matches for "binary_data".

2007 Mar 28
3
attachment_fu Not Resizing
...ut I could equally well be barking up the wrong tree): attachment_fu/processors/rmagick_processor.rb: module ClassMethods # Yields a block containing an RMagick Image for the given binary data. def with_image(file, &block) begin binary_data = file.is_a?(Magick::Image) ? file : Magick::Image.read(file).first unless !Object.const_defined?(:Magick) puts "binary_data.nil? : #{binary_data.nil?}" puts "file.nil?: #{file.nil?}" puts "const_defined? : #{Object.const_defin...
2015 Nov 03
3
Problema R se cuelga neuralnet
...jemplo cualquiera para preguntar si a otros les pasa lo mismo o es un problema puntual en mi computadora (uso R revolution win 10). # install, load package install.packages(NeuralNetTools) library(NeuralNetTools) # create model library(neuralnet) AND <- c(rep(0, 7), 1) OR <- c(0, rep(1, 7)) binary_data <- data.frame(expand.grid(c(0, 1), c(0, 1), c(0, 1)), AND, OR) mod <- neuralnet(AND + OR ~ Var1 + Var2 + Var3, binary_data, hidden = c(6, 12, 8), rep = 10, err.fct = 'ce', linear.output = FALSE) ¿Pueden correr el código sin problemas o tienen el mismo inconveniente?...
2015 Nov 03
3
Problema R se cuelga neuralnet
...pasa lo mismo o es un problema puntual en mi computadora (uso R revolution win 10). > > # install, load package > install.packages(NeuralNetTools) > library(NeuralNetTools) > > # create model > library(neuralnet) > AND <- c(rep(0, 7), 1) > OR <- c(0, rep(1, 7)) > binary_data <- data.frame(expand.grid(c(0, 1), c(0, 1), c(0, 1)), AND, OR) > mod <- neuralnet(AND + OR ~ Var1 + Var2 + Var3, binary_data, > hidden = c(6, 12, 8), rep = 10, err.fct = 'ce', linear.output = FALSE) > > ¿Pueden correr el código sin problemas o tienen el m...
2010 Feb 24
6
Yet another send_data :image question...
...'ve got a basic scaffold working for image file creation, and - to a point - image file display. The send_data function is working in my controller - no problem. The model code is able to parse the uploaded file construct too. def show @image = Image.find(params[:id]) send_data(@image.binary_data, :type => @image.content_type, :disposition=>"inline") end The issue with my output page, specifically "show". All attempts to render the page, result in *only* the image (.jpg, .png, ... format unimportant) being rendered. No other HTML makes it to the browser. I'&...
2008 Jul 05
18
Java Bridge Itext Example Anyone?
I MAY be able to derive something out of the present example given here : http://blog.codeinmotion.com/index.php/2006/12/22/pdf-generation-in-ruby-on-rails/ but this deals with filling out forms. Is there a simpler example that just allows you to talk to itext , send it some plain text and get back a pdf and then send that pdf to the user as downloadable / renderable data? -- Posted via
2006 Nov 10
0
Override logger for large binary data
...g in my config/environment.rb I can trim the binary data dumps: class Logger private alias old_format_message format_message def format_message(severity, timestamp, progname, msg) # uses a non-greedy match msg.to_str.gsub!(/= x''(.*?)''(,|\s)/,''= x\''BINARY_DATA\''\2'') "#{msg}\n" end end But, I know that this is a kluge so any advice on how to control the dump on column level within the model or even on the model level will be much appreciated. Thanks much. --~--~---------~--~----~------------~-------~--~----~ You rece...