similar to: Manually creating session objects

Displaying 20 results from an estimated 80000 matches similar to: "Manually creating session objects"

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
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).
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
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
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
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
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] =
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 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 30
0
Storing additional data in the session
Folks, I''m using the session db table to store additional data. When a user logins I would like to store their user id in the session record and save that. I''m thinking of x = Session.find(session.id) and then x.save. Is this the right way to do it? 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",
2006 Jan 30
0
Adding ActiveRecord objects to the session
Hi all, I am creating an AJAX quoting/puchasing system and I am having a bit of unexpected behavior when adding ActiveRecord objects to the session. When I add the ActiveRecord object (in this case QuotePart) to the session it automatically saves the object that was added to the session to the DB. And the oddest part is that it automatically fills in the foreign key field quote_id, even though
2006 Aug 04
1
Store ActiveRecord objects in session
I want to create a object then store it in the session, then if the user chooses to save it, its saved in the database. I have a Configuration model of which I store instansobject of in the session. Now I also want to store the object in the database. How can I make this possible? In the Configuration model I have a lot of variables and methods, but maybe its just to make the Configuration
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 Jun 11
3
Armageddon
I''m just wondering what happened to Armageddon and whether people had any more information/news about it. I''ve thought about comet but I think that a flash socket would be easier to implement. Does Armageddon have the same drawbacks as other flash sockets, namely not working over port 80 (so the companies firewall blocks it)? -- Posted via http://www.ruby-forum.com/.