similar to: pass ruby array to javascript function

Displaying 20 results from an estimated 2000 matches similar to: "pass ruby array to javascript function"

2007 Jun 14
4
How to convert a table to JSON (or to Javascript array)
Is there a way to retrieve an HTML table in javascript and convert it to JSON using prototype? I''m stumped :( phil --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To
2016 Sep 30
1
Sys.setFileTime()
Since there has been a recent tweak to the functionality of Sys.setFileTime() I thought it might be an opportune time to ask a question regarding the decision to set both access and modification times (i.e. settime.actime = settime.modtime = (int)ftime; ) vs provide a parameter for each. Might it be possible to change the behavior to accept two parameters (one for active and one for modtime) but
2020 May 12
1
Segfault on read.socket with long message
Thanks for the link.? Somehow the information about how to join the bugzilla site was not available at bugzilla and buried in the CRAN web site instructions on reporting bugs (which pointed me at Bugzilla and not the page you showed me). The example is pretty minimal.? I left the tracing statements (flog.trace()) and the toJSON, fromJSON in as I thought they might provide some context for
2020 May 11
2
Segfault on read.socket with long message
I'm trying to implement a connection between two processes using a simple socket mechanism. The messages are rather long object stored as JSON. R is crashing with a segmentation fault when I try to read my test message (which is 5305 bytes long). I first send the length in bytes and then I send the actual message. Here is my R code: library(jsonlite) library(futile.logger)
2012 May 09
4
Can't read xlsx file into R. Seem, Seem to have XLConnect loaded.
I have spent hours on R in Windows 7. Just installed 2 days ago so the R package should be current. Currently I am using the RGui (64-bit) for Windows. I can not read an Excel file into R from my computer. Have hours on this. Completely crazy!! I have the XLConnect package loaded. I think it is loaded because when I enter: > loadedNamespaces() [1] "base"
2008 Feb 23
1
Set without argument
Hi the list, I am defining S4 objet. Is it possbile to define a method that change the slot of an object without using <- ? My object contain a numeric and a matrix. At some point, I would like to impute the missing value in the matrix. So I would like to use something like : ----------------- setClass("MyObj",representation(time="numeric",traj="matrix")) a
2010 Dec 11
2
toJSON question
Hello, I am trying to use RJSONIO I have: x <- c(0,4,8,9) y <- c(3,8,5,13) z <- cbind(x,y) Any idea how to convert z into the JSON format below? I want to get the following JSON output to put into a php file. [[0, 3], [4, 8], [8, 5], [9, 13]] Thank you.
2009 Jul 05
2
JSON data not decoded in Rails
Hello all, I''m trying to send some json data from the browser to the server using prototype without success. On the server side ActiveSupport::JSON.decode isn''t decoding the data. Here is the code: Javacript: <a href="#" onclick=''send();return false;''>click</a> <script> function send() { var send_data_url =
2016 Jan 14
2
JDataFrame API
Hi Folks, If you need to send data from Java to R you may consider using the JDataFrame API -- which is used to convert data into JSON which then can be converted into a data frame in R. Here's the project page: https://coherentlogic.com/middleware-development/jdataframe/ and here's a partial example which demonstrates what the API looks like: String result = new JDataFrameBuilder()
2010 May 13
1
aggregate.zoo
I have been using aggregate function to determine the annual minimum in a daily time series. However, I was also hoping to determine the date of occurrence without having to loop through each year to identify the date of each minimum returned from aggregate(). Is there a more convenient way of doing so? Thanks in advance, Dave library(zoo) n <- 1000 dly <- zoo( x = rnorm(n), order.by
2008 Oct 03
7
form_remote_tag and :with
I am trying to pass the result from a javascript function along with the result from a text_field with form_remote_tag. This is what I have so far, but no go: <% form_remote_tag(:url => {:controller => ''requests'', :action => ''create''}, :with => "''data=''+request()", :update => ''request_sent'' )
2012 May 23
1
mgcv: How to calculate a confidence interval of a ratio
Dear R-Users, Dr. Wood replied to a similar topic before where confidence intervals were for a ratio of two treatments ( https://stat.ethz.ch/pipermail/r-help/2011-June/282190.html). But my question is more complicated than that one. In my case, log(E(y)) = s(x) where y is a smooth function of x. What I want is the confidence interval of a ratio of log[(E(y2))/E(y1)] given two fixed x values of
2005 Aug 04
2
Some echo?
I have a 12 channel PRI with SNOM 190's and asterisk CVS from January. Most calls are fine, all incoming calls are fine, but I am getting echo on a significant number of outgoing calls. The person on the other side hears a perfect call, but the SIPphone side gets to hear themselves. It happens 100% of the time to some numbers (outgoing only), and only sporadically to others. Has anyone
2008 Nov 10
3
Runt Recurring events
I am planning on using Runt to calculate recurring events. I calculate a Runt object in the view and use it to see if it includes a certain date, which is populates from the database, and display the info for that date if it is included. I have recurring events for every week, which was pretty easy to set up. I can just say: r = Runt::DIWeek.new(4) For a recurring event every Thursday, and
2009 Feb 24
3
Free SMS limit (using sms_fu)
I have been using SMS_fu but it seems too good to be true for production. I''m wondering, is there any sort of limit on email to sms depending on the carrier that you can send in a given amount of time? I remember reading somewhere that there is a limit to the number of free email to sms that you can send through AT&T in a given month. Does anyone know anything aobut this? I guess I
2006 Apr 25
2
JRS problem
Hi all, I''m playing with the new RJS stuff. Very cool! But I have a problem. The following code works ok: page.select(''div.blogcomment'').each do |element| page.visual_effect :highlight, element end All div''s with class blogcomment are highlighted correctly. But I just want the last elemen to be hightlighted. The following code is not working:
2016 Jan 15
2
JDataFrame API
Hi Simon, Thanks for your feedback. -- this is an observation that I wasn't considering when I wrote this mainly because I am, in fact, working with rather small data sets. BTW: There is code there, it's under the bitbucket link -- here's the direct link if you'd still like to look at it: https://bitbucket.org/CoherentLogic/jdataframe Re "for practical purposes is
2006 Aug 16
1
How to pass an array to a javascript function.
Hi - I''m having a bit of trouble with my application. I have this view that calls a javascript function "zip_map". I want to pass to it a scalar array "@zip_geo" but I don''t know how to pass an array to a javascript function in rails. This is what the code looks like: THE .rhtml file: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
2008 Jan 19
5
Time just moved backwards error even with ntpd
Scenario: server PC abruptly switched off due to power cable problems (an UPS cannot solve this issue), so during shutdown Linux was not able to resinchronize the system clock. After a few hours the server come back on, Linux booted and the services (ntpd, dovecot and many others) started But the system clock was 45 minutes ahead, so: Jan 19 11:13:39 gw ntpd[2112]: synchronized to LOCAL(0),
2006 Feb 10
7
convert rails object to javascript variables
Am i a total idiot to try and parse out a rails object for javascript in this way? <% for i in interface_items[0].attributes %> var <%= i[0] %> = "<%=h( i[1] )%>" <% end %> Am I missing something really obvious? Thanks, Mark -- -------------------------------------------------------------------- I am Mark Daggett and I approve this message.