Displaying 20 results from an estimated 200 matches similar to: "Search Forms with Pagination"
2006 Apr 16
11
Best way to sort categories w/ pager
Ahoy,
I made this pager,
" def list
@item_pages = Paginator.new self, Item.count, 10, @params[''page'']
@items = Item.find :all, :conditions => "category_id =
#{params[:condition]}",
:limit => @item_pages.items_per_page,
:offset => @item_pages.current.offset
@categories = Category.find_all
2006 Apr 16
7
table sorting
Ahoy,
I checked the API and did some forum searches but didn''t find anything
good on table sorting.
Is there a "railish" way to do this? My current method really is lacking
(i''m on like rails day 2)
<th><%= link_to ''Name'', :action => ''list'', :order => ''name'' %></th>
2006 Jun 21
7
acts_as_taggable and paginate?
Hi there,
I''ve been trying to paginate over a list of members that all share a tag in
common using the acts_as_taggable plugin. The regular way of paginating over
a collection doesn''t seem to work with acts_as_taggable. Here''s what my
method looks like that takes in a tag name, finds all the members that share
the tag and then displays all the members. Nothing too fancy
2006 Feb 13
1
Paginate @member.items?
Is there a quick and easy way to paginate something
like @member.items (Member with has_many :items)?
Right now I do in the controller:
@item_pages, @member_items = paginate :item,
:conditions=>["member_id=?", @member.id],
:per_page=>25,
:order=>''datetime desc''
It''d be more DRY if this was possible:
@item_pages, @member_items = paginate
2005 Dec 19
6
custom find methods and pagination
i''ve got several methods in my models i use to find based on certain
criteria...i''ve done this so the controller code is less cluttered, plus the
DRY factor.
example:
class Foo < ActiveRecord::Base
def find_by_something(something)
find :all, :joins => ..., :conditions => ...
end
def find_by_something_else(something_else)
find :all, :joins => ...,
2013 Nov 22
1
Appending Excel File Data in different folders into Single Dataframe
Hi all
I have about 10 folders in my directory i.e Folder 1 – Folder 10. Each
Folder has a single excel file containing data with the following
attributes “State”,”lat”,”lon”, “address” i.e
State Lat Lon Address
Anchorage 45.87576 -12.567 Starbucks, Van dyke road, 33456,
USA
I would like to write a script in R that
2007 Jun 20
1
Count_by_content ??
Is there a count_by_content alternative to the find_by_content action?
This is because I''m wanting to do the following in my pagination method:
def list
# step 1: set the variables you''ll need
page = (params[:page] ||= 1).to_i
items_per_page = 20
offset = (page - 1) * items_per_page
# step 2: instead of performing a find, just get a count
item_count =
2006 May 25
13
.NET developer trying to understand some Rails basics
Hi All,
I''ve been a ASP.NET developer for the last few years and consider it to
be a pretty productive environment to work with. However, the
object-relational mapping (ActiveRecord) and simplicity of the Rails
framework and Ruby in general really appeals to me. .NET currently
doesn''t have something like Rails'' ORM - atleast not out-of-the-box.
Here''s my
2008 Oct 20
2
error message when plotting survival curves
I am trying to plot survival curves using the following code as an example:
>rs1799964.coxph<-(coxph(Surv(sassurvmonths,status)~age+stage+rs1799964_TNFA,method="efron"))
>plot(rs1799964.coxph,lyt=c(1,3),xlab="Survival in Months",ylab="Proportion
Surviving")
I am gettingthe following error message:
>Error in xy.coords(x, y, xlabel, ylabel, log) :
2008 Sep 16
1
logistf error message
I am new to using R. Currently, I am using the logistf package to run logistic regression analysis. When I run the following line of code:
attach(snpriskdata)
logisticpaper<-logistf(sascasecon~saspackyrs+newsbmi+EDUCATION+sasagedx+sasflung+condobst+sasadultasprev)
I get the following error message:
Error in sum(y) : invalid 'type' (character) of argument
What does this error
2001 Feb 19
7
Packet integrity error. (34)
Hi,
I am using Van Dyke SecureCRT 3.2.1 to access an AIX server running
OpenSSH-2.5.0p1. Using ssh1 with X11 forwarding enabled, the server
reports the following error (in the client session):
Packet integrity error. (34)
This problem was not evident in 2.3.0p1. Running sshd in debug gives the
output:
debug1: sshd version OpenSSH_2.5.1p1
debug1: load_private_key_autodetect: type 0 RSA1
2001 May 24
4
bug report
On Wed, May 23, 2001 at 10:49:54PM -0400, mugz wrote:
>
> I'm always a bit slow to report bugs i see, figuing someone else will
> report it and that it will eventually get fixed. This one has been
> somewhat of a problem for a while now. I run Linux Slackware -current and
> just upgraded to OpenSSH 2.9p1, but I have noticed this same bug on every
> platform and OS running
2008 Oct 02
1
specifying x-axis scale on random forest variable importance plot
i am new to R and using the random forest package. is there a way to specify
the x-axis scale range for the variable importance plot? many thanks.
-alison
--
View this message in context: http://www.nabble.com/specifying-x-axis-scale-on-random-forest-variable-importance-plot-tp19780560p19780560.html
Sent from the R help mailing list archive at Nabble.com.
2009 Mar 21
1
Re: Will latest .deb pkg for Ubuntu Intrepid work on Ubuntu Jaun
I personally use gnomesword2. I have not idea about any other WINE ports... but I find gnomesword2 to be effective.
2009 Jan 16
1
bootstrap validation of LR error message
when i try to validate my logistic regression model:
fit<-glm(y~x,binomial,data=dataname,x=TRUE,y=TRUE)
validate(fit,method="boot",B=150,...)
i get the following error message:
Error in UseMethod("validate") : no applicable method for "validate"
any insight would be appreciated. many thanks!
--
View this message in context:
2010 Oct 25
2
extracting characteristics of datasets from data()
I can use data() to find the available datasets in a package, but I'd
like to extract and display some additional
information for each dataset than what is provided by data(), e.g.,
class() and dim() for datasets for which
these are available. I'm stuck on using using lapply properly with
objects, rather than the names of objects
that I get from data()
Example:
> DS <-
2010 Sep 29
1
Fitting a half-ellipse curve
Dear mailing list,
I have following array:
X2 Y2
[1,] 422.7900 6.0
[2,] 469.8007 10.5
[3,] 483.9428 11.0
[4,] 532.4917 25.5
[5,] 596.1942 33.5
[6,] 630.8496 40.5
[7,] 733.2996 45.0
[8,] 946.4779 32.0
[9,] 996.8068 35.5
[10,] 1074.3310 23.0
I do afterwards the following:
plot.new()
plot.window(xlim=c(min(X1)-50,max(X1)+50),
2001 Feb 16
6
ssh(R) trademark issues: comments and proposal
I'd like to address several issues raised by people in relation to my
notice of the ssh(R) trademark to the OpenSSH group. Also, I would
like to make a proposal to the community for resolving this issue
(included at the end).
First, I'll answer a number of questions and arguments presented in
the discussion.
> "the SSH Corp trademark registration in the US is for a logo
2007 Jul 03
3
$operatingsystem variable.
In the documentation, there is an example such as this:
case $operatingsystem {
sunos: { include solaris } # apply the solaris class
redhat: { include redhat } # apply the redhat class
default: { include generic } # apply the generic class
}
I''ve seen the $operatingsystem variable used elsewhere.
What actually puts the value into the $operatingsystem variable?
Does
2006 Feb 23
4
looping
I have a form that prints fine for one particular criteria...
facility_id = "X"
controller code looks like this...
def fac_log
@facility = Facility.find(params[:report][:facility_id])
@placement = Placement.find(:all,
:conditions => [ "facility_id = ? and discharge_date IS NULL,
params[:report][:facility_id] ]
)
end
I can print out the form