similar to: regex sulotion for seperating number and string

Displaying 20 results from an estimated 1000 matches similar to: "regex sulotion for seperating number and string"

2007 Nov 13
7
combine two dataframe
I have two data frame A and B adn want to cross them. A has format as: a1 a2 a3 1 2 3 2 3 1 1 3 2 ... B: b1 b2 1 2 2 1 ... the combine result shall be something like a1 a2 a3 b1 b2 1 2 3 1 2 1 2 3 2 1 2 3 1 1 2 2 3 1 2 1 1 3 2 1 2 1 3 2 2 1 .... is there a function able of doing this instead of loops? Thanks, Sun
2006 Aug 31
6
newbie question about index
Hi, I am trying to convert a variable a = sample(1:3,100,rep = T) represents choices into a 3X100 dummy varible b with corresponding element set to 1 otherwise 0. eg. a: 1 3 2 1 2 3 1 1.... b: 1 0 0 1 0 0 1 1.. 0 0 1 0 1 0 0 0... 0 1 0 0 0 1 0 0... Is there something like b[a] =1 existing? I could not figure this out myself. ---------------------------------
2008 Jan 11
3
filtering data frame based on two columns
Hi, I have a data frame df with column names a,b and c. Now I want to get a subset of df that satified the condition a == 1 and b == 2, how do I specify this. For one condition like a == 1 I can use subdf = df[,df$a==1] to get the right answer, but subdf = df[,df$a==1 && df$b ==2] does not return the right answer. Some quick tips please.
2007 Oct 09
2
AlgDesign--exact and approximate design
Hi I am trying to generate a design using Algdesign and came across terms of "exact design" and "approxiamte theory design", I did not find a reference to explain what they are, could some one shed some light about this on me? Another question is, I want to measure the main effects and at least two interactions, variables are factors, how do I ensure this in formula,
2007 Feb 05
2
Nitpicking: rc21 startup banner says rc19
> [jhg at helios RPMS]$ rpm -q dovecot > dovecot-1.0-1_42.rc21.fc5.at but: > dovecot: Feb 05 10:49:21 Info: Dovecot v1.0.rc19 starting up
2005 Aug 10
5
validates_format_of on an optional field using :if
Hi there, I''ve got the following in my model: validates_format_of :postcode, :with => /^([a-zA-Z]{1,2}[0-9]{1,2} [0-9]{1}[a-zA-Z]{2})$/, :message => "is not valid", :if => :postcode ... but it''s not working - it always insists on validation, even if postcode is empty. Basically, the postcode field is optional, but if it''s filled in, I want to
2006 May 18
3
Google Map
Used a great howto @ http://iamrice.org/articles/2005/12/09/using-google-maps-in-the-uk-with-rails for using google maps on uk sites. Just having one issue I can''t seem to work out how to draw the postcode from my table I keep getting hit by method errors. The controller is require ''postcode_2_latlong'' postcode = Postcode.new("TN22 2LG") # I want this to
2006 Jan 31
11
ez_where plugin updated features.
Friends- I wanted to let people know that there is a new experimental release of this plugin. I would love feedback on syntax and features. There is now a full test suite with fixtures that covers all the available syntax. Look at the test suite for more syntax possibilities. There have been many additions since my last release. Fabien Atelier has been working on this with me and has
2006 Feb 28
1
Wrong id after join!
The Problem ----------- After using a join in my find the id attributes set in my Entity objects are wrong! It is setting the Entity id to the value from Postcode id! The Code -------- entities = Entity.find(:all, :conditions => [...omited...], :joins => "as e inner join postcodes as pc on substring_index(e.postcode,'' '', 1) =
2007 Oct 10
2
how to generate and evaluate a design using Algdesign
Hi, I have some problems when using AlgDesign->optFederov() generating designs. I have 6 variables, all factors. 3^2 and 4^4, I want to have a design that can take care of main effects and two interactions within 2 pair of variables v3-v4 and v5-v6, the following is the code ################ require(AlgDesign) set.seed(1) levels = c(v1=3,v2=3, v3=4,v4=4,v5=4,v6=4)
2006 May 03
10
get Addresses and house numbers from Post Code?
Hi, does anyone know a way to get the address and a list of house numbers from a Post Code? Is their an online web service that will do this? I''m creating an app for a chinese take-away and this functionality is important. What do you think is the best way of achieving this? for UK post codes. Thanks Chris -- Posted via http://www.ruby-forum.com/.
2006 May 02
4
useful bit of code (hopefully)
Hi, I often find myself using bits of code like this inside ActiveRecord, perhaps it''s useful for others, or others can improve on it: ########### # fix user input before validating it before_validation :sanitize_input # santize input before actual validation is called # this uses the little methods defined below def sanitize_input trim %w(adres postcode woonplaats email naam
2007 Jan 29
6
repeat downloads of message headers in 1.0rc19
I upgraded one server to 1.0rc19 (from rc15) over the weekend, and have since received several reports of dovecot erroneously retrieving older messages as new mail. I've seen this myself intermittently on KMail, and users have reported it on Thunderbird, Squirrelmail, and Outlook. I see some things in the archives that suggest that this was a problem in older 1.0 release candidates, but
2006 May 30
6
Reuse Partials
Hi all, This is my first official post as RoR developer, so here it is. I''ve got a partial for a Address (Postcode, Address, City, ...). I want to use this partial multiple times on the same form? So I want to fill in multiple addresses and insert them individualy. How do I go about doing this? Kind Regards, Eugene Louw -- Posted via http://www.ruby-forum.com/.
2008 Sep 22
1
Ccreating methods on the fly / counting distinct field values
Hi, I''m pretty new to ruby and rails, so apologies if this has been covered before (I couldn''t find a thread on it). I want to retrieve a count of records held in the DB for every distinct value of an attribute. E.g. given a class Address with a postcode field, I would like to retrieve an array of ValueCount objects. The ValueCount object would hold the value retrieved from
2009 Jan 07
9
Crossbow integration with Solaris 10/08
Hi, >From what I have read, the create-vnic feature in dladm is only available within the context of crossbow...? Specifically, what I am wondering is whether it is at all possible to successfully install crossbow on top of Sun''s "Standard/sunsolve supported" Solaris 10/08 rather than OpenSolaris, per. Se.... Is this at all feasible? Many thanks in advance.. Best
2008 Jun 18
1
Question
Hi list, I am trying to convert my Data from 1st following format to the second. Any comment? You could copy following in Tinn R Data<- data.frame(location=c("postcode","sector","long/lat","sector"),Grade=c(" h","m","L","h"),value=c(2,3,5,6)) #Question: how can I reshape Data to the following # Grade postcode
2006 Apr 19
9
geolocation db?
I''m currently planning a social app in Rails that relies on being able to see how far you are from everyone else. It''s my intention to store rough geo-coordinates as part of the sign up process. My intention is to capture their zipcode or postal code, and then be able to query a webservice once for that data. It''s also possible that there might be a database or even
2007 Jul 26
3
Spec for validation plugin
Hi, I''m writing a specification for a model called Location which has a post_code attribute which should be a valid UK postcode. I''m using the http://svn.designbyfront.com/rails/plugins/validates_as_uk_postcode/ validates_as_uk_postcode plugin to handle the validation but I''m not sure how I should properly specify my model. Heres the model code: class Location <
2012 Jan 06
2
Zipcode validation
Hi All, How to validate Zip/Postal code enterd is valid based on country selected? Is there any plugin for checking zipcode format for different countries.. Thanks -- 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