Displaying 20 results from an estimated 100000 matches similar to: "Storing additional data in the session"
2011 Apr 29
1
importing and filtering time series data
Folks,
I'm new to R and would like to use it to analyze web server performance data.
I collect the data in this CSV format:
1304083104.41,Y,668.856249809
1304083104.41,Y,348.143193007
First column is a <seconds.microseconds> timestamp, rows with N instead of Y need to be skipped and the last column has the same format as the first column, except it's request duration (latency).
2009 Sep 09
4
what is the +hex in c++ stack traces?
What is the hex number after the method, e.g. +0x32f below?
It matches arg0 and I suspect it''s the c++ "this" pointer, aka hidden
first argument.
I would like to confirm, though.
Thanks, Joel
---
XUL`PresShell::ProcessReflowCommands(int)+0x32f
XUL`PresShell::FlushPendingNotifications(mozFlushType)
+0x19e
2006 Jun 30
8
before_filter: nil vs. true vs. false
Folks,
My understanding of how filters work is that I should return true if
everything is ok and false if not. How does the filter below work
then (from the Rails Recipies book)?
It would return nil if there''s a user in the session. Does nil count
as true?
before_filter :check_authentication
def check_authentication
unless session[:user]
session[:intended_action] =
2011 May 01
1
microsecond timestamp support
Does R have support for microseconds in timestamps, e.g. when reading this in
"Time","Include","Kind","Duration"
2011-04-01 14:20:36.368324,Y,U,1.03238296509
2011-04-01 14:20:35.342732,Y,C,0.0252721309662
2011-04-01 14:20:34.337209,Y,R,0.00522899627686
Thanks, Joel
--------------------------------------------------------------------------
- for hire: mac
2006 Jun 23
2
Using fixtures from IRB
Folks,
I have the standard setup with auto-generated unit tests and
fixtures. I edited the fixtures and the tests but would now like to
test associations from irb. How do I do this?
I''m not sure how to load my fixtures into irb, for example. Once they
are loaded I would create objects, save them to the db and pull
things out.
Thanks, Joel
--
http://wagerlabs.com/
2006 Jun 28
2
undefined method `use_transactional_fixtures=''
Folks,
I checked my test_helper.rb and it has
self.use_transactional_fixtures = true
My code was generated with 1.1.2 and I''m using 1.1.3 right now after
but the error persists.
I googled for this issue and it appears that a require is missing or
something like that. I can''t figure it out, please help!
/opt/local/bin/ruby -Ilib:test
2009 Sep 09
4
usdt probes vs pid$target
I added a couple of static probes to Firefox to measure actual work
done. I could have used a pid$target probe with a function name but
work is done within an if statement, which is where I placed the
static probes.
I''m wondering about my use, though. Is the following significantly
more efficient than pid$target::FunName:entry and return?
I heard somewhere that $target does not
2009 Aug 28
13
putting a running app into trace mode
Suppose I have a USDT probe in Firefox and that I''m trying to catch
the startup with a probe like this:
proc:::exec-success
/execname == "firefox-bin"/
{
start = timestamp;
}
and stop tracing when Firefox hits this USDT probe:
mozilla:::main-entry
{
exit(0);
}
How do I put the running firefox-bin into "trace mode" so that my USDT
probe fires?
Thanks, Joel
2009 Oct 28
3
where do kernel data types come from?
I have a script where I can freely reference struct nameidata*, struct
vnode*, etc. on Snow Leopard.
How does DTrace know about these data types? I understand things like
#pragma D depends_on library darwin.d
where darwin.d has typedefs.
I can''t find definitions of nameidata and vnode in any D scripts,
though. How does it work?
Thanks, Joel
---
firefox for android!
2006 Jun 30
4
More idiomatic way of writing a filter
Is there a more elegant way of writing this?
def verify_user
@user = User.find_by_username params[:username]
if @user.nil?
message = xml.error do |xm|
xm.message "User does not exists: #{params[:username]}"
end
render :xml => message
return false
else
true
end
end
Thanks, Joel
--
2006 Jun 30
0
Manually triggering session restore
Folks,
My controller is being given the session id as part of the POST
payload. Is there a way to manually trigger the session restore
process once I extract the session id?
Can someone point me to the files where this is happening?
Thanks, Joel
--
http://wagerlabs.com/
2006 Jun 30
0
Manually creating session objects
Has anyone tried manually creating session objects and storing them
in the database?
I''m taking about a setup where the ActiveRecord session store is used.
I''m sharing the database with a non-Rails platform and extended my
session table to include other data that I need to store when the
user logs in.
Thanks, Joel
--
http://wagerlabs.com/
2009 Sep 09
10
dtrace overhead and proper measuring technique
I''m trying to time a function within Firefoxwith a pid$target probe
[2]. e.g
dtrace -Zqw -x dynvarsize=64m -x evaltime=preinit -p 13954 -s menu-
construct.d -s sigcont.d
elapsed: 12.7942481ms
cpu : 7.7911194ms
count : 40 times
I''m also measuring Firefox startup time by running it arguments like
this:
... file:///Users/joelr/work/mozilla/startup/startup.html#`python
2009 Sep 14
1
return from memset on mac osx
Does dtrace have a problem catching the return from memset on Mac OSX?
The script below catches the entry just fine but the return clause is
never entered.
Thanks, Joel
---
pid$target::memset:entry
/arg1 == 0/
{
self->size = arg2;
self->ts = timestamp;
self->vts = vtimestamp;
}
pid$target::memset:return
/self->size/
{
@ts = sum(timestamp - self->ts);
@vts =
2006 Jun 27
0
More idiomatic way of doing this
Folks,
I''m trying to write a validating filter that checks if the user
exists and renders XML if not. Most of the controllers will be
returning XML on some error or other so I''m including RenderError in
ApplicationController.
Is my approach a sound one? Also, is there a shorter and more
idiomatic way of writing this:
if @user.nil?
render_user_exists
2006 Jun 29
0
@response.body accumulating in functional tests?
I have two functional tests for my user controller:
def test_bad_registration
post :register, :email => "tester1@foo.com"
assert_response :success
assert_not_nil @response.body =~ /^\<error/
assert_nil assigns[''user'']
end
def test_good_registration
@response.body = nil
post :register, :username => "tester",
2013 May 28
5
Storing Rails controller callback data in session
http://stackoverflow.com/questions/16770090/storing-rails-controller-callback-data-in-session
The idea is:
- Perform some time consuming action in background.
- Have the results from that action be propagated back to the controller
using a callback.
- Store the result in an in memory session store.
- Have the result in session be used and available from that point
onward.
2007 Mar 30
0
Storing an order object in a cookie based session
I have a simple e-commerce store and am running into a problem with the
edge rails cookie based sessions.
What I am trying to do is make the customer fill in their info, and
click "Review my Order". The order object is contructed, and stored in
the session (if it passes validation). The is sent to another page
where they can confirm all their info and press the "finalize
2006 May 06
3
Storing additional data on join tables with Rails
Hi there
I need to store additional attributes on join table. Searching the
Wiki [1] revealed two possible methods:
1) push_with_attributes, as described by Justin Palmer [2].
Unfortunately, "this method is now deprecated" [3]. Even if it wasn''t,
there seem to be inherent problems with that approach, for example
with updating those additional attributes, though Joshua Muheim
2006 Feb 11
1
Storing fied contents in a session variable before link_to
Hello,
in my rails application I have the following requierement:
I want to store the content of all editable fields (form tag) of a page
in a session variable when the "link_to" action is selected.
(Submit would be easy, for details & background please see below).
Thanks a lot
Christian
I may miss here something, but this is my problem (I tried hard to make
it clear - just let