similar to: flash object not clearing?

Displaying 20 results from an estimated 20000 matches similar to: "flash object not clearing?"

2006 Jan 13
4
Flash not cleared with ActiveRecord session store
Cheers, I''ve stumbled over a bug with 1.0 and ActiveRecord store for session while migrating from pstore sessions. I created the table with `rake create_sessions_table` and set `config.action_controller.session_store = :active_record_store` in environment.rb. Everything runs fine except that the flash messages will not be cleared. I get the same message everytime on everypage I
2005 Jun 20
6
sweep() and recycling
Hi I had a hard-to-find bug in some of my code the other day, which I eventually traced to my misusing of sweep(). I would expect sweep() to give me a warning if the elements don't recycle nicely, but X <- matrix(1:36,6,6) sweep(X,1,1:5,"+") [,1] [,2] [,3] [,4] [,5] [,6] [1,] 2 9 16 23 30 32 [2,] 4 11 18 25 27 34 [3,] 6 13 20 22
2009 Mar 17
2
sweep?
I am having a hard time understanding just what 'sweep' does. The documentation states: Return an array obtained from an input array by sweeping out a summary statistic. So what does it mean "weeping out a summary statistic"? Thank you. Kevin
2010 Aug 11
2
Sweeping a zoo series
Given a long zoo matrix, the goal is to "sweep" out a statistic from the entire length of the sequences. longzoomatrix<-zoo(matrix(rnorm(720),ncol=6),as.yearmon(outer(1900,seq(0,length=120)/12,"+"))) cnames<-c(12345,23456,34567,45678,56789,67890) colnames(longzoomatrix)<-cnames longzoomatrix[1:24,] 12345 23456 34567 45678
2006 Jun 01
5
flash not clearing after display
(Rails 1.1, Ruby 1.8.4) In the layout for one of my controllers, I have a tag to display a flash message (copied from AWDWR), like this: <div id="data"> <% if @flash[:notice] -%> <div id="notice"><%= @flash[:notice] %></div> <% end -%> <%= @content_for_layout %> </div> If the
2018 May 09
3
Seasonal weekly average
Hi, I am fairly new to 'R' and would like advice on the following. I want to calculate a weekly average number of reports (e.g. of flu, norovirus) based on the same weeks for the last five years. I will then use this to plot a chart with 52 points for the average based on the last five years; another line will then plot the current year, enabling a comparison of current weekly counts
2011 Jul 27
2
Elegant way to subtract matrix from array
there are really two related problems here I have a 2D matrix A <- matrix(1:100,nrow=20,ncol =5) S <- matrix(1:10,nrow=2,ncol =5) #I want to subtract S from A. so that S would be subtracted from the first 2 rows of #A, then the next two rows and so on. #I have a the same problem with a 3D array # where I want to subtract Q for every layer (1-10) in Z # I thought I solved this one
2011 Oct 31
1
Vectorize 'eol' characters
Dear R users, When dumping an R matrix object into a file -- typically via the 'write.table' function -- the 'eol' option can be used to specify the end-of-line character(s) which should appear at the end of each row. However the argument to 'eol' seems to be restricted to have length 1, whereas ideally I would like different rows to be written to file each with its own
2018 May 09
0
Seasonal weekly average
Hi Shakeel, Assuming that you are starting with a bunch of dates: # make a vector of character strings that can be converted to dates rep_dates<-paste(sample(1:30,500,TRUE),sample(1:12,500,TRUE), sample(2013:2017,500,TRUE),sep="/") # if this isn't your format, change it date_format<-"%d/%m/%Y" # create a data frame with a column of dates
2006 Aug 04
2
how to remove ID from stylesheet_link_tag?
When I use stylesheet_link_tag, the results come back with a timestamp ID, like this: <link href="/stylesheets/style.css?1154009736" media="screen" rel="Stylesheet" type="text/css" /> I don''t want the query string and ID on the end, but I can''t see how to disable this in the docs. How do I do this? thanks, jeff -- Posted via
2005 Apr 25
1
Problems when using sweepers with postbacks
I''m using a cache sweeper class [1] to take care of some pretty complex sweeping. However, there is a problem with the current implementation. Namely, the sweeper gets called only when an action named in cache_sweeper is called using GET. As many methods where sweeper would be useful are using postback to send the form to the same action, this causes the cache to get swept when
2017 Apr 18
3
Crash after (wrongly) applying product operator on object from LIMMA package
Hi, this is a problem that occurs in the presence of two libraries (limma, xlsx) and leads to a crash of R. The problematic code is the wrong application of sweep or the product ("*") function on an LIMMA MAList object. To my knowledge, limma does not define a "*" method for MAList objects. If only LIMMA is loaded but not package xlsx, the code does not crash but rather
2017 Apr 19
2
Crash after (wrongly) applying product operator on S4 object that derives from list
Dear Hilmar Perhaps this gives an indication of why the infinite recursion happens: ## after calling `*` on ma and a matrix: > showMethods(classes=class(ma), includeDefs=TRUE, inherited = TRUE) Function: * (package base) e1="FOOCLASS", e2="matrix" (inherited from: e1="vector", e2="structure") (definition from function "Ops")
2006 Jul 10
1
Redirects and keeping flash
My code that acts if a session has timed out looks like this: reset_session session[:expires_at] = nil # TODO - This flash is never shown, because we redirect maybe? flash[:error] = ''Your session has timed out, please login to continue.'' # An attempt to make flash stick around, not working flash.keep redirect_to :controller => ''security'',
2005 May 12
26
performance update
I have made additional progress with regard to performance. My latest data: configuration 1: r121.latest configuration 2: r121p.latest page c1 real c2 real c1 r/s c2 r/s c1/c2 /empty/index 6.75525 1.71983 148.0 581.5 3.93 /welcome/index 6.89044 1.89244 145.1 528.4 3.64 /rezept/index 4.99573
2009 Aug 09
1
binary operators that implement row and column sweeps of matrices by vectors
Submitted for perusal, comment, improvements, and/or critique. The presentation is in 3 sections: motivation, code, and comment. Motivation: As a new-comer to R from matrix oriented Gauss and Mata, I miss the tools for using a vector (and operator) to ‘sweep’ across a matrix. Here is how these work. If M is I rows by J columns, then one entry corresponding to
2017 Apr 24
2
Crash after (wrongly) applying product operator on object from LIMMA package
Hi Hilmar, weird. The memory problem seems be due to recursion (my R, version 3.3.3, says: Error: evaluation nested too deeply: infinite recursion / options(expressions=)?, just write traceback() to see how it happens), but why does it segfault with xlsx? Nb xlsx is the culprit: neither rJava nor xlsxjars cause the problem. On the other hand, quick googling for r+xlsx+segfault returns tons of
2005 Nov 03
9
[Idea] session-wide persistent variables
I was thinking about having instance variable stored and fetched from session container automatically before calling an action and after the action is finished. Using methodology of accessors it would look like: class MyController < ActionController::Base persistent_attr :person def alfa person = ''John Smith'' # render as usual view alfa.rhtml with anchor
2015 Jan 28
2
[Q] Get formal arguments of my implemented S4 method
Interrogating some (of my own) code in another package. >norm.meth <- getMethod("normalize", "MatrixLike") >message("str(norm.meth)") >str(norm.meth) >message("show(norm.meth at .Data)") >show(norm.meth at .Data) Last show() displays this: function (object, ...) { .local <- function (object, method = c("median",
2015 Jan 28
2
[Q] Get formal arguments of my implemented S4 method
I'm attempting to reflect the information for use with corresponding fields in GUI (in a different package), to provide default values, argname as key for UI label lookups, etc. So I want something much more like the formals of the implementation: { "object", "method": c("median", "vs", "tukey"),