search for: ebrad

Displaying 10 results from an estimated 10 matches for "ebrad".

Did you mean: brad
2007 Jul 09
5
Color coding table rows depending on an attribute
I need to show a different background color depending on the type of comment posted. The type of comment is determined from a drop-down selection. I figured the simplest way would be to do something like I have below, but I can''t seem to get it to work: <tr <%= puts ''"style = "background: red;"'' if comment.comment_type == ''Hiring
2007 Dec 06
8
Default value for country_select
Using Country_select how to have default valur set to United States. I have a select drop down in my Ui to display the Country names. But i need United tates to be selected as default value. I use country_select to populate the country names. This is how i use <%= f.country_select :country, :selected=>''United States'' %> i also tried <%= f.country_select :country,
2007 Feb 25
5
Dynamically uploading a list that's already in a form
I have the classic case of: Posts, and Categories. When the user submits a post, he has a drop-down list of categories. I want to put a "Add category" link next to the list of categories. This is already inside a form, so a "link_to_remote" that creates a small AJAX form inside the "submit post" form will not work because that will mean to embed a form in another
2007 Dec 12
3
datetime_select and Active Record
If I have a form similar to the one below, and ''start'' is a "string" field in my Database. Is there a way to take all of the date/time params and put them into ''start'' without too much hacking? I would like this to be as clean as possible. <p><label for="start_time">Start Time</label><br/> <%=
2013 Jan 08
0
bagging SVM Ensemble
...trainset <- dataset[-testindex,] trainindex<- sample(index, trunc(length(index)*70/100)) es<-numeric(m) eb<-matrix(nrow=m,ncol=k) eslin<-numeric(m) espoly<-numeric(m) esrad<-numeric(m) estan<-numeric(m) eblin<-matrix(nrow=m,ncol=k) ebpoly<-matrix(nrow=m,ncol=k) ebrad<-matrix(nrow=m,ncol=k) ebtan<-matrix(nrow=m,ncol=k) set.seed(123) for (i in 1:m){ index <- 1:nrow(dataset) testindex <- sample(index, trunc(length(index)*30/100)) testset <- dataset[testindex,] trainset <- dataset[-testindex,] tuned <- tune.svm(class~., data = trainset, gam...
2007 Nov 07
7
Help on loop
Hey, I have got a script that returns a long list of font family names, which I all want to store in a variable (array). I tried doing this with @f = font.family also in the for loop below but it only prints the last item when I want to display the results. require ''rubygems'' require ''RMagick'' include Magick for font in Magick.fonts puts font.family end
2007 Dec 06
3
number_to_currency
I am using the number to currency function because i live in the uk and the company want me to only show values of the pound of course.I have created all my application using ruby script/generate scaffold_resource.... I have come across with a problem... this code is in my applcation: def number_to_currency(number, options = {}) options = options.stringify_keys precision, unit, separator,
2007 Dec 05
4
render :update and controller private methods
Probably asked and answered, but... Why are controller private methods inaccessible inside the block passed to render :update ? This does not work: class MyController < ApplicationController def some_action render :update do |page| page.replace_html ''an_element'', some_private_method end end private def some_private_method return
2007 Dec 12
6
Add a month to a Date object
Howdy all, This may be the dumbest question in the world, but how can you "add one month" to a Date object? I can''t just add 30 days, because months have varying lengths. Any help would be much appreciated... Thanks! -Neal --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2007 Sep 06
2
HABTM Loops
So, I have a "schedules" table and a "hours" table, joined by a "hours_schedules" table. Think of the hours table as a category for when people will schedule themselves to work, which happens in weekly increments. At any given hour, there will be X number of people working. I need to represent each worker with an asterisk symbol in the weekly view. For example,