similar to: Regex for splitting string

Displaying 20 results from an estimated 7000 matches similar to: "Regex for splitting string"

2006 Mar 01
6
How to retrieve attributes from HABTM?
We have tables Users and Communities linked by has_an_belongs_to_many. The join table Communities_Users has additional fields [ is_active, is_blocked, join_date] etc. These are populated using @user.push_with_attributes(:is_active => true,...). Later on how do we update or retrieve the attributes in the link table for a given user or a community with doing it explicitly using SQL? Thanks,
2006 Feb 08
2
How to install RailsCron?
Hi, I would like to start running a background procedure once a user logs in to his account on the website. For this I am considering using the RailsCron object. However, I am not able to download it. I am new to Rails. Can someone give me the excat command I should use to get RailsCron? Can someone suggest a better way of running a procedure in the background? Thanks -Yash -- Posted via
2006 Feb 11
1
How to POST raw data?
Hi, I know that ActionController::AbstractRequest provides a raw_post method that reads the data that has been posted to the HTTP server as raw data. I am trying to create a rails application that POSTs raw XML data to a web page that reads raw data. I would like to know how to POST raw data to an HTTP server using Ruby on Rails. Can you help me with this? Thanks, Yash -- Posted via
2006 Feb 11
1
Instructions required for RailsCron
Hi, I am writing a client-server rails app. The client and server maintain similar databases. Periodically, I would like them to synchronize their databases. For this, in the application, once the user logs in, I want to spawn a background process at the client that first sends the client''s new data and then receives the server''s new data. I am thinking of using RailsCron for
2006 Mar 30
1
What is the entry-point for a rails app?
Hi, I would like to run a DOS command such as "net send ..." when I start the rails application using script\server. Can you please tell me where I need to put the call? Is it environment.rb by any chance? -Yash -- Posted via http://www.ruby-forum.com/.
2006 Apr 28
9
Q: Timing of render :update in an action ?
Hey folks, am hoping someone can set me straight with a solution to an issue that has come up involving the timing of rendered page elements in relation to the completion of an action''s execution. I have an ror search app which searches through two tables consisting of 7,000 page urls and a table w/ 87,000 related keyphrases within those pages. Search results can take anywhere from 2
2008 Aug 01
2
Extract Element of String with R's Regex
Hi, I have this string, in which I want to extract some of it's element: > x <- "Best-K Gene 11340 211952_at RANBP5 Noc= 3 - 2 LL= -963.669 -965.35" yielding this array [1] "211952_at" "RANBP5" "2" In Perl we would do it this way: __BEGIN__ my @needed =(); my $str = "Best-K Gene 11340 211952_at RANBP5 Noc= 3 - 2 LL= -963.669
2008 Sep 20
2
removing a word, the following space and the next word
>Hello, I am hoping for advice as to how I could remove all words immediately following the words 'Mr' or 'Mr.' in a csv file. For example, the following phrases are included in lines of text (along with other Mr) that could be anywhere in the file: "Mr Jones ate lunch" and "Mr Smith was tied". I want to remove the words Jones and Smith (etc) leaving
2007 Sep 05
1
gsub question, not a regex question...including part of the original in the sub...
Hi all, I''ve got a simple bulletin board type of code in part of my application, and I want to implement phpbb-like tags for users to add to posts. I strip HTML out of the posts, of course. I can handle things like [b] => <b> with a simple gsub, but there''s one that is throwing me for a loop. I want users to be able to quote other users, and have the quoted text show
2005 Dec 02
43
ANN: acts_as_ferret
Hi all This week I have worked with Rails and Ferret to test Ferrets (and Lucenes) capabilities. I decided to make a mixin for ActiveRecord as it seemed the simplest possible solution and I ended up making this into a plugin. For more info on Ferret see: http://ferret.davebalmain.com/trac/ The plugin is functional but could easily be refined. Anyway I want to share it with you. Regard it as a
2005 Dec 02
43
ANN: acts_as_ferret
Hi all This week I have worked with Rails and Ferret to test Ferrets (and Lucenes) capabilities. I decided to make a mixin for ActiveRecord as it seemed the simplest possible solution and I ended up making this into a plugin. For more info on Ferret see: http://ferret.davebalmain.com/trac/ The plugin is functional but could easily be refined. Anyway I want to share it with you. Regard it as a
2009 Aug 04
4
regex question
Hi, I am getting stuck over an apparently simple problem in the use of regular expressions : To collect together the first letters of the words from the Perl motto, ?There is more than one way to do it? in the following form ? TIMTOWTDI. I tried the following code : ? ##### A regex problem with the Perl motto astr<-"There is more than one way to do it" b1<-grep("\\<",
2009 Jun 25
2
ConVirt 1.1 is released.
Hi    We are extremely happy to announce ConVirt 1.1 release. For details please visit : http://www.convirture.com/blog/2009/announcements/convirt-11-is-now-available/ ConVirt Team. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
2013 Mar 14
3
date & time manipulation- R 2.15.1 windows 7
Hi, I wanted to learn how to solve a date and time manipulation where i can do the following two 1. difference of two dates eg (differnce between 5th jan 2013 and 1st jan 2013) 2.Suppose i have week number of the year, i want to know if i can find out the day it refers to eg( say week 2 of 2013 would be 6th jan 2013 and the day is sunday) i need my result to tell me that its
2006 Apr 29
3
undefined class/module
Hi, We are running a Rails application in development mode. Intermittenly we get an error on some pages, saying : undefine class/module User. If we refresh the page, the error goes away and we see the html correctly rendered. User is a model defined in the models directory and has been listed in application.rb as model :user. I am suprised by the fact that this happens only occasionally. Can
2006 Feb 04
2
Looking for tools developed on Rails
Hi, We are trying to setup a tool developed on Ruby on Rails, that provides a Project Dashboard, with the following features: Abstract of the project. Task list Calendar The task list should provide: Task Name Owner Start and end dates %completion Dependency, etc. The Calendar should provide Day, Week and month views. Can you please suggest some tools with available source code that loosely
2006 Mar 22
1
How to go DRY?
We are creating a website for creating and maintaining communities. When members of a community are listed, we show their summary in a TABLE. So we have written a _member.rhtml partial to show this summary for that member. To show the memberlist we do render :partial => member, :collection => @members Now the problem is the row displayed for every member by the _member partial, may differ
2006 Mar 19
4
function names contain regex?
Is it possible to support something like the following: def validate_address{#/d/#) x = {#1} miscfunction(x) end And yes, I totally just made up some bogus syntax - I have no idea if a variable function name containing a regular expression is possible... perhaps through some trick of aliasing? I figure it must be possible, due to the model.find_x_and_y() methods in ActiveRecord.
2006 May 10
8
E-mail validtor??
Does anyone have a good working e-mail validator? or even some regexp to make the validates_format_of work right... that would be awesome. Also, maybe an online tutorial for regexp. i''ve always been afraid of it but i think it''s time to face the fears. thanks! -- Posted via http://www.ruby-forum.com/.
2006 Mar 23
1
Using regional settings from windows registry
Hi, On our web pages, we would like to show all dates and times in the format defined on the server''s registry. The rails application will be installed in different countries, hence we want to cater to all types date and time formats by picking it from the registry. The formats used in the registry are such as M/d/yyyy, whereas the Time class in Ruby uses formats such as %m/%d/%Y.