similar to: contoller code mysteries

Displaying 20 results from an estimated 1000 matches similar to: "contoller code mysteries"

2006 Feb 03
9
Because I''m very slow - trying to use console
I can''t see how to use variables so I am using console to test things out... clients table - a column named first_name My very brief console session... >> clients = Client.find_by_sql("select * from clients where first_name = FN") ActiveRecord::StatementInvalid: RuntimeError: ERROR C42703 Mcolumn "fn" does not exist Fparse_expr.c L1034
2006 Feb 02
12
basic ''find'' question
I am struggling to understand the methodology here... I have a find.rhtml <%= start_form_tag :action => ''list2'', :first_name = client %> <%# render :partial => ''form'' %> <p><label for="client_first_name">First name</label><br/> <%= text_field ''client'', ''first_name''
2006 Jan 19
3
Migrating from Mysql to PostgreSQL
I tried to use ''rake db_schema_dump'' from old MySQL database and then use ''rake db_schema_import'' to rebuild the database in PostgreSQL. The issue here is that only some of tables can be imported successfully. For example, in the dumped schema.rb: create_table "profiles", :force => true do |t| t.column "ticker", :string, :limit
2006 Feb 17
4
Need Help with Globalize Plugin
Hi everyone, I''ve been playing around with the Globalize plugin for some days now but I can''t seem to make it work properly with my models. I''m currently using Postgres 8.0 for the database and needed to make some modifications with my migration file that was posted by Jake Morrison in the Globalize wiki...
2006 Dec 11
6
easy question, how would i search a grandparent???!
hi, i have this in my code Article.find_by_contents("#{searchstring} +city:#{passedincity}") well that returns to me only articles that belong to whatever the user selected in city. now is it possible to search the grandparent? for example class country has_many states class states has_many cities belongs_to country class city belongs_to states ...... i would like to search
2016 Sep 06
3
sieve - find in header
Hello list, have a problem with sieve script. I want to perform an action if an arbitrary headerline contains a defined string. I tried with regex: if header :regex [".*"] ["searchstri.*"] { fileinto "junk"; } This is not working because regex is only used in 2nd argument ["searchstri.*"] In 1st argument [".*"] no regex is used, sieve
2004 Jun 21
0
Bookmarklet for searching R documentation
I recently posted a request for a Mozilla search engine plugin for the R java search applet. Having recieved no response, I pursued this myself and came up with an alternative. I found a "bookmarklet" that was used to submit searches to Amazon. I modified the code to submit searches to the R search engine. I tested the following using Firefox 0.9 on Windows 2000. Create a
2004 Jun 22
3
Asterisk answering only one (dialed-) Number on a PTMP (German "Mehrgeräteanschluss")?
Hi, please excuse my poor englisch. Is it possible to connect a (privat Test-Asterisk) to my privat ISDN and allow him to only answer one dialed number? We have 3 up to 10 Numbers on each (Euro-)ISDN (2 b-chanels), it cant't be done by the last Digits cause the numbers are completely different. For Example: I have 3 Numbers (641717, 928752....) Is it possible to tell Asterisk (in
2006 Jan 06
6
Help with TextSearch :all and MySQL
Hi, I really need help with making the ''searches_on :all'' in Duane Johnson''s TextSearch work with MySQL (not sure if it works with other db''s). http://wiki.rubyonrails.com/rails/pages/TextSearch I realize that there are other search packages out there. But this particular solution best fits my small needs of searching a small database. I''ve gotten
2004 Nov 12
1
Firefox keyword searches for R & S-Plus
If you've 'rediscovered the web' with Firefox (http://getfirefox.com), you might find this tip handy. Suppose you want to search the (local) R documentation for information about the lme function. Wouldn't it be nice to just type into the browser address bar: r lme and have the search performed? Here's how (on Windows): Click on this link:
2009 Oct 27
5
Re-tasking destroy contoller action...is this bad practice?
I''m trying to get some opinions on a design I''m floating ("rails way" or not?). Say I''ve got an Author model in my Blog application and I want my administrators to be able to disable authors. I don''t want to delete authors because this would cause data integrity issues (orphaned Author foreign key in the Post model). So my plan is to re- task the
2013 Jul 01
2
R2 2008 Windows Domain Contoller VS Samba
Hi, We are using samba version 3.0.28 on Sun solaris 5.10 integrated with Windows 2003 Domain Controller. It has been running for couple of years without any issues. Recently the 2003 domain controllers are upgraded to 2008 R2 domain Controllers and the samba server that we currently have is not authenticating With the new domain controllers. Could you please let me know which version of Samba
2010 Feb 26
3
Preserving lists in a function
Dear R users, A co-worker and I are writing a function to facilitate graph plotting in R. The function makes use of a lot of lists in its defaults. However, we discovered that R does not necessarily preserve the defaults if we were to input them in the form of list() when initializing the function. For example, if you feed the function codes below into R: myfunction=function( list1=list
2012 Nov 20
1
tcl/tk problem with tklistbox,the " " character and Rcmdr.
I everyone, i have a little problem with tklistbox,the " " character and Rcmdr. Please look at this code require(tcltk) tt<-tktoplevel() levels.list2 <-tklistbox(tt,selectmode="multiple",exportselection="FALSE", height=4, yscrollcommand=function(...)tkset(levels.list2.scroll,...))
2009 Apr 15
6
Intersection of two sets of intervals
Hi, Algorithm question: I have two sets of "intervals", where an interval is an ordered pair [a,b] of two numbers. Is there an efficient way in R to generate the intersection of two lists of same? For concreteness: I'm representing a set of intervals with a data.frame: > list1 = as.data.frame(list(open=c(1,5), close=c(2,10))) > list1 open close 1 1 2 2 5
2011 Jan 08
3
Question on list objects
Hi, I have 2 questions on list object:   1. Suppose I have a matrix like: dat <- matrix(1:9,3)   Now I want to replicate this entire matrix 3 times and put entire result in a list object. Means, if "res" is the resulting list then I should have:   res[[1]]=dat, res[[2]]=dat, res[[3]]=dat   How can I do that in the easilest manner?   2. Suppose I have 2 list objects: list1 <- list2
2012 Jul 05
2
vector entry in matix
hi, i'm trying to figure out if there's any possibility to write a whole vector into a matrix or data.frame or something like that. i don't mean transormation. Here an example: [,1] [,2] [1,] "a" "d" [2,] "b" "e" [3,] "c" "f" where e.g. a is a<-c(0,1) vector of length 2, b a vector of length 4,... (i know that
2011 May 05
1
lapply, if statement and concatenating to a list
Hi R users I was wondering on how to use lapply & co when the applied function has a conditional statement and the output is a 'growing' object. See example below: list1 <- list('A','B','C') list2 <- c() myfun <- function(x,list2) { one_elem <- x cat('one_elem= ', one_elem, '\n') random <- sample(1:2,1) show(random)
2006 Oct 16
8
acts_as_ferret: can i specify a search on 1 field as suppose
to the ones i defined in my model? for example if in the model i specify acts_as_ferret to index only column 1, 2, and 3 in my table....how can i perform a search just for column 1 if need be. for example, id like to give the user the ability to just search on title name vs description, etc... thanks! -- Posted via http://www.ruby-forum.com/.
2010 Mar 15
1
rbind, data.frame, classes
Hi, This has bugged me for a bit. First question is how to keep classes with rbind, and second question is how to properly return vecotrs instead of lists after turning an rbind of lists into a data.frame list1=list(a=2, b=as.Date("20090102", format="%Y%m%d")) list2=list(a=2, b=as.Date("20090102", format="%Y%m%d")) rbind(list1, list2) #this loses the