Displaying 20 results from an estimated 3000 matches similar to: "A Good Tutorial on Params and Variables"
2005 Aug 26
2
Salted Login Hash Woes
I had the Salted Login Hash Generator working at one point and then it
just stoped working. It was around the time that I changed hosts and I
think that it just might not be able to connect to the new server. I
have tried everything though and it just doesn''t seem to work out. I''m
now thinking that maybe it has to do with something else that I changed
in the project.
Is
2008 Apr 30
4
what is .....undefined method `authenticate'
def login_submit
if session[''user'']
@logged_in = true
else
@logged_in = false
end
@user = User.new(params[''user''])
if session[''user''] = User.authenticate(params[''user''][''username''],
params[''user''][''password''])
flash[:notice] =
2006 Jun 15
6
Newbie''s problem with a nil object he didn''t expect!
Dear Rubyists/Rails gurus,
Though I''ve successfully completed the various Rails tutorials online
and the Depot application from the Agile Web Development with Rails
book, I''m still pretty much a Ruby/Rails newbie. I''m trying to learn by
writing my own simple blogging application, but I''ve run into a problem
that has had me scratching my head for a few days now.
2007 Jul 11
10
read params
hi.
I am a rails newbie.
I have am Model user with name and email. How can I acces and modify the
param email before user.save?
<% form_for :user do |f| -%>
<p><label for="name">Username:</label><br/>
<%= f.text_field :name %></p>
<p><label for="email">Email</label><br/>
<%= f.text_field :email
2011 Sep 12
2
regression on data subsets in datafile
I have data of the form
tC <- textConnection("
Subject Date parameter1
bob 3/2/99 10
bob 4/2/99 10
bob 5/5/99 10
bob 6/27/99 NA
bob 8/35/01 10
bob 3/2/02 10
steve 1/2/99 4
steve 2/2/00 7
steve 3/2/01 10
steve 4/2/02 NA
steve 5/2/03 16
kevin 6/5/04 24
")
data <- read.table(header=TRUE, tC)
close.connection(tC)
rm(tC)
I am trying to calculate rate of change of parameter1 in
2007 Jan 05
8
Rails 1.2: Release Candidate 2
This is it. We''re a mere two shakes of a lamb''s tail from releasing
the final version of Rails 1.2. But before we light the fireworks and
pop the champaign, we''ll just do one itsy, bitsy, tiny test run. Like
wearing protection glasses in downtown Copenhagen on New Year''s. You
know, just for precautions.
So please do give it a good run. We''re looking
2010 Jan 29
3
Applying a function on each columns of a matrix
Hello everyone, I have the following matrix
[,1] [,2] [,3] [,4]
[1,] 0.002809706 0.0063856960 0.0063856960 0.011749681
[2,] 0.004893124 0.0023118418 -0.0005122951 -0.014646465
[3,] 0.003547897 0.0063355297 0.0030410542 0.011403953
[4,] 0.004838299 -0.0040383645 -0.0090406831 -0.011027569
[5,] 0.035648755 0.0334815590 0.0380977404
2007 Jul 18
1
passing a parameter to a file from command line
Hi,
I have a file fileFoo.R, say that contains these two lines, invoking
function foo that is specified in "foo_details.R":
source("foo_details.R")
foo(parameter1)
I want to specify and pass parameter1 in my command line when invoking R
in linux: R --no-save <fileFoo.R.
How can I do that?
And how can I retrieve the value of parameter1 in my fileFoo.R function
2008 Nov 20
2
Elegant way to transform dataframe?
Hello,
I have a dataframe with columns like:
parameter1 parameter2 metricname value
and I'd like to transform it into a dataframe with columns:
parameter1 parameter2 metric1 metric2 metric3
where the values for each metric would be in the appropriate column. There are often multiple values for a given (parameter1, parameter2, metricname) triple. In this case, I want to use the
2000 Sep 20
1
'fixing' list components
I have a list x (say) that will contain many inputs to and outputs a model.
x$input1 <- assign.input1(parameter1, parameter2)
is one way to assign input1, but it would be neater to be able to do
assign.input1(x, parameter1, parameter2)
Is this a good idea? If so, what is a good way to do it?
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing
2006 Oct 08
9
Organizing tests and mocha expectations
I''m simultaneously getting into using Mocha and RSpec-style tests
(courtesy of the simply_bdd plugin) and I''m struggling with some
issues while trying to organize my specs/test. Here''s a code example
illustrating the problem:
context "update cliient invalid data" do
include ClientsControllerSpecHelper
specify "should render edit form" do
2007 Mar 27
1
basic handling of data.frame
Hello,
I'm new to R but wan't to use it to compute the statistics of my medical study.
The study includes several parameters for a number of patients. Each
parameter was assessed by a number of readers, once with a special
condition, once without.
Now I have a data.frame with colums like:
PatientID, ReaderID, SpecialCond(yes/no), Parameter1, Parameter2.....
the rows are not sorted, and
2006 Oct 05
2
A statement over multiple lines (i.e. the ... feature in Matlab)
Hello again list,
I thought I'd start a new thread, seeing as it's completely different
from my previous question. Some functions I have written require many
parameters, and so do not fit nicely into an 80 column width display.
This is usually avoided, by spreading that particular statement over
a few lines. This is something that I do in Matlab with the following:
myFunc(
2006 May 05
2
newbie ruby string match question
All,
I want to know in the Application.rb controller if I''m on the login screen.
When I''m on the page I care about the controller variable is
"#<ActiveRbac::UserController:0x408b3d6c>"
So I want something like:
if controller contains ActiveRbac::UserController
What is the right syntax for the above?
Thanks
Greg
--
Greg Freemyer
The Norcross Group
Forensics
2006 Jan 11
17
Different Types of Users and User Engine
My question is how have people implemented different types of users in
their Web applications using user-engine?
As for my application, I use single table inheritance in order to derive
several different types of users, such as "moderators," "editors," etc
...
For example, let''s say that I want to create a moderator. I define a new
moderator class and Controller like
2013 Dec 02
1
Class parameter flexibility with ENC, hiera or both
Dear puppetteers,
I am having a philosophical question about parametrized classes.
When building modules, one wants to be as flexible as possible, to try
to target as many puppet flavors as possible. This is our target:
- Foreman users, using foreman as an ENC with smart variables (or
potentially any other ENC, but I would say this is the most widespread one).
- Pure Puppet''s site.pp
2002 Nov 09
2
Nonlinear regression and categories
Hi there:
I'm trying to run a large number of nonlinear regressions on a time
series dataset, where the data will be formatted something to the effect of:
ObservationID,time,dependentvar
I'll have a number of time and dependentvars for each observation, and I
want to apply a nonlinear regression to one ObservationID at a time, and I
want to have a dataset that is the parameter
2006 Apr 20
5
Integrating with Legacy Databases
This seems like it must have been asked before - I really _did_ try to
find it in the archives, so my apologies if it''s already out there.
Utilizing ActiveRecord, I would like to specify a prefix for the
column names in my table. For example, in ''Recipe 16 Integrating with
Legacy Databases'' (Rails Recipes, from PragProg, by Fowler) they deal
with integration with a
2005 Dec 09
7
UserEngine - rake bootstrap aborted
Hi there,
I''ve just installed login_engine and user_engine from the repositories,
followed the setup procedures as documented in:
vendor/plugins/user_engine/README
But I''m getting the following failure:
vince@vaio:~/Projects/Booking$ rake bootstrap
(in /home/vince/Projects/Booking)
rake aborted!
undefined method `edit'' for class `UserController''
2012 Jun 18
1
using hiera for node classification
Hi All,
I''ve been trying to use Hiera for node classification, my sit.pp is simple:
node default {
hiera_include("classes")
}
which has been working well with simple class definitions like:
user@host$ cat testagent.yaml 2012-06-18 14:55:48 jon pts/13
---
classes:
- motd
Is anyone doing this in production? I''ve seen a little about this on line
but it