similar to: Why does titleize remove hyphens?

Displaying 20 results from an estimated 2000 matches similar to: "Why does titleize remove hyphens?"

2010 Jun 09
1
[patch] fix bytesize in exception template; multibyte titleize
Hi all, I wanted to draw some attention to a couple of very small multibyte-related patches I believe should be included before Rails 3.0 RC1: * Use String#bytesize rather than String#length in exception templates: This is a simple case where string length is checked, but bytes is needed, so it breaks with string with multibyte chars.
2006 Sep 28
3
Quick Question: Opposite of Titleize?
Anyone know what the opposite of titleize is? I want to do ''My Title" to ''my_title'' -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2006 Jan 03
0
newbie question about .titlecase of .titleize
i just started to work with ROR, and made a form with scaffolding. I achieved to add some extra inputvalidation but i also want to add some code that changes some specific textfields with the .titlecase / .titleize and then stores it to the database. I had to add the validation code to the model file, is this also the place to add the titlecase ? the columname of the regarding textfield is
2005 Feb 08
5
How to get variable names in a function?
Hello, applying a function to a list of variables I face the following problem: Let's say I want to compute tables for several variables. I could write a command for every single table, like bravo<-c(1,1,2,3,5,5,5,);charly<-c(7,7,4,4,2,1) table(bravo); table(charly) > table(bravo); table(charly) bravo 1 2 3 5 2 1 1 3 charly 1 2 4 7 1 1 2 2 The results are two tables with the
2009 Apr 09
2
how to automatically select certain columns using for loop in dataframe
Hi, I am trying to display / print certain columns in my data frame that share certain condition (for example, part of the column name). I am using for loop, as follow: # below is the sample data structure all.data <- data.frame( NUM_A = 1:5, NAME_A = c("Andy", "Andrew", "Angus", "Alex", "Argo"), NUM_B = 1:5, NAME_B =
2015 Oct 08
1
Tranformar falsas variables char en numéricas
Hola, Una manera muy sencilla de hacerlo es esta: #------------------------------- whatcol <- 0 for(i in 1:ncol(d)){ whatcol[i] <-class(d[,i]) } whatcol #-------------------------------- > whatcol <- 0 > for(i in 1:ncol(d)){ + whatcol[i] <-class(d[,i]) + } > whatcol [1] "character" "character" "factor" "factor"
2010 Apr 15
2
Regression using R
Hello, I'm working on a very large project in which we do many calculations which include many types of regression such as, Liner, Quadratic, Cubic, Exponential, Sinusoidal, and Logarithmic. Im well aware that its easy enough to do Linear regression in R but what about the other types? I've been searching on google for such functions but to no avail. Thank you, -- Samuel Bravo
2006 Aug 30
7
Hyphens
Hi there, I''m working with some legacy data where customer phone numbers are stored with hyphens between the area code, exchange, and number (e.g. 555-555-5555). Is this the best way to store a phone number? Perhaps not, but it''s the way they were being stored, so I have to work with this format. Right, so when I save a record the log tells me acts_as_ferret indexed the
2011 Mar 08
1
form_tag for search bar with Rails 3.0.5
I have a controller and view that should be providing a search bar that brings up that brings up a selected record on submission. I have tried several variations, including just specifying the assets_path, but usually end up with either an error or a submission to the index action, rather than the show action. Currently, I have the following in my index.html.haml: = form_tag({:controller =>
2006 Jan 28
13
What''s the verb form of id?
Random question: I''ve written a method for the String class that turns an arbitrary line of text in to an identifier, e.g.: "My, what a beautiful day!" => "my_what_a_beautiful_day" "(anb*#NF(AMNV" => "anb_NF_AMNV" We''ve got all these great names already like underscore, classify, titleize and things like that. I''d
2007 Oct 22
1
Migrating from UW IMAP - pine - Thunderbird - squirrelmail
Hello! I saw your post to the mailing list (http://www.dovecot.org/list/dovecot/2006-January/010968.html) where you write "A description for pine with imap acces without entering any password is also discussed.", but I didn't find such description in this post. Would you be so kind to point me to some source where it is explained - currently users have to insert the
2005 Nov 03
1
Builder / rxml views: hyphens in XML element names
I''m having a strange problem with an rxml view - it won''t let me put hyphens in the names of XML elements. The original problem line was: xml.VISA-SSL do But in any other place, if I insert a hyphen into the name of any arbitrary element, I get the following kind of error: undefined method `theTextAfterTheHyphen'' for #<#<Class:0xb7617180>:0xb7616f28>
2006 Jun 21
3
sort matrix by sum of columns
Hi all, I would like to know how can I sort the cols of a matrix by the sum of their elements. a <- matrix(as.integer(rnorm(25,4,2)),10,5) colnames(a) = c("alfa","bravo","charlie","delta","echo") I guess I should use colSums, and then rearrange the matrix somehow according to the result. My idea is to display a "sorted" barplot:
2011 Jul 18
1
nls() and lines()
All - I'm having an issue with trying to plot a model derived from nls() onto a simple plot.? I have included a sample data set and the code that I've been using. ?? year month day?????? date location mileage? cost gallon????? cpg ? mpg????????? x 2009???? 1?? 4?? 1/4/2009????? BZN? 124585 19.39? 14.37 1.349339 10.71677 2009-01-04 2009???? 1? 15? 1/15/2009????? BZN? 124888? 23.2? 16.12
2006 Jul 21
20
New version of AWDwR
Folks: I''ve uplaoded the B1.05 version of AWDwR. It fixes a number of reported errata (and a few that weren''t reported :), and adds two significant changes: 1. It now uses the new Active Record decimal -> BigDecimal conversion. I''ve personally been waiting for this for a long time, and I''m really happy it''s now part of core. However,
2006 Jul 18
5
a best way to write this.
I have a form, with 3 fields, then in my controller I get the paramters to run a query but I don''t want to filter with paramters if they are nil or blank... I''m doing this @condition = '''' if(params.....) @condition = @condition + " myparamter = " + params[..... if(params.....) @condition = @condition + " myparamter = " +
2003 Mar 31
3
monte carlo method for circle area
Hello everyone I hope Im not bothering you all again. I have just begun to use R and so Im not yet familiarized with it.. I ve got an assignment which consists in calculating the area of a circle given a certain radius and center using the monte carlo method, which means that I have to plot a circle given its parameters. Limit the area inside it...with as many sample points as possible...and
2006 Apr 07
6
Multiple view types for a single action?
Is it possible to have more than one kind of view for a specific action, for example an .rhtml and a .rjs file to handle the view for the same action? I suspect not, but this makes me wonder if there a way to call the .rjs file from within the .rhtml so the statements within it get executed? Thanks, Andy
2005 Dec 09
1
QueryParser and utf-8 strings
Hi all, I am rather new to xapian, I just recently tried to include it in my application, so bear with me if this has already been discussed. I was playing with QueryParser and noticed that it expects input to be in ISO8859_1 encoding - characters above 0x80 are transliterated, and are not considered letters. For example, using single word (in utf-8 encoding) "bo?e" as input for
2013 Jun 24
2
[OT] bash here documents
Suppose I have this C++ program: #include <iostream> int main (int argc, char** argv) { while (1) { char cmd[80]; std::cin.getline(cmd, 80); std::cout << "response to " << cmd << std::endl; } } compiled by: c++ -o junk junk.cpp and I have this bash script: #!/bin/bash ./junk <<EOF blah bleh \cC EOF echo "Something