similar to: scan syntax question

Displaying 20 results from an estimated 50000 matches similar to: "scan syntax question"

2006 Jul 05
2
splitting a paragraph into words and spaces
I''m using this: <% words = article.content.split(/ /) %> <%= words[0..20] %> to (ostensibly) split a paragraph into component words, with spaces in between, then print to html only the first 20 items, words and spaces. I got this (split(/ /)) from the online pickaxe book at http://rubycentral.com/book/ref_c_string.html#String.split . The problem is, the resulting array
2006 Jul 31
2
[UPDATE] More info on RubyConf 2006 registration
Hi -- Registration for RubyConf 2006 is still scheduled to open on August 2, in the early evening Pacific (US West Coast) time. Also, there''s more info at http://www.rubycentral.org/conference (e.g., the fact that this year we''re only taking credit cards, etc.). David P.S. Any LA area Rubyists around? I''ll be there this week doing Rails training. --
2006 Dec 12
0
[787] trunk/wxruby2/doc/lib/wxlatex_parser.rb: Fix a couple of Ruby warnings
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!-- #msg dl { border: 1px #006 solid; background: #369; padding:
2011 Apr 18
2
acts_as_commentable validations
Hi all, I recently started back up with Rails and things are going well up until now. I''ve set up acts_as_commentable in my Post model and it''s working great. Problem is users are able to create a "blank" comment. I''ve added the following validations in the comment.rb file generated by acts_as_commentable to limit the comment length: [code]
2007 Jul 16
9
DRBD facts
Hi, I can''t find a way to add a page on the wiki (i''m logged in but there is no edit button on the facter recipes page), so here is a recipe for DRBD. It has been tested on version 0.8.4. Can someone publish it on the web site? if FileTest.exists?("/proc/drbd") result = {} Thread::exclusive do File.readlines("/proc/drbd").each do |l| if l =~
2011 Aug 08
1
keeping output in memory
Dear R afficianados! I'm writing a script to create a frequency list for multiple files. I've written a "for" loop to iterate through the selected folder and creating lists for each file. In the line "write(freq.list, file=filename[[1]], sep="", append=FALSE)" I've written the individual lists to file. However, I would really like to keep them in memory
2011 Mar 07
2
Sweave with scan()-ed data
In an Sweave slide, I want to use sem::read.moments() and sem::specify.model(), which work by using scan() to read the following lines, up to the first blank line. However, Sweave throws an error: > Sweave("sem-thurstone.Rnw") Writing to file sem-thurstone.tex Processing code chunks ... 1 : term hide (label=arrests-setup) 2 : echo term hide (label=thurstone-data) Error:
2005 Oct 26
1
syntax for interactions in lme
Hello, I am trying to make the switch from SAS, and I have a fairly elemental problem with syntax using the nlme package for analyzing mixed models. There was a previous question on this topic posted to this list, so I apologize for redundancy, but I didn't understand the advice given to that inquiry. The model I want to run has the following factors: Host (fixed) Sire (random) Dam
2006 Jul 25
2
Ruby Central''s Regional Conference Grant Program
Hello everyone -- We are very pleased to announce the launching of the Ruby Central Regional Conference Grant Program for 2006. This program will provide grants of up to $1500 US to approximate six to eight regional conferences, over the next year. You can download full details at either of these addresses: http://www.rubycentral.org/rcg2006.pdf
2006 Jun 13
0
[ANN/ADV] Rails Recipes is Shipping
Hi All, Pragmatic Dave Thomas tells me that Rails Recipes (http://pragmaticprogrammer.com/titles/fr_rr) is now shipping! He and Andy apparently have over a ton of books to deliver. If you''ve ordered a paper book, it''s soon on the way. If you''ve been waiting, now''s the time. Amazon is also has the book in stock
2006 Aug 29
0
Several bug-fixes and improvements(?)
Hey guys, I have been working with RedCloth for the past week or so in order to try and upgrade a University''s blog system (blogs.warwick.ac.uk) to Textile2, having used a bespoke Java-based Textile1 implementation in the past. As such, it''s been an important part of this that it works as much as possible to give the same results for Textile1 code, but with the added features
2013 Jun 06
1
[supermin PATCH] RFC: Add a --names-only flag.
This takes a list of package names, adding them to the image without pulling any dependencies. Only implemented for Debian at the moment. zypper wasn't build-tested because I don't have the dependency. --- src/.depend | 2 +- src/supermin.ml | 6 +++--- src/supermin_cmdline.ml | 13 ++++++++++--- src/supermin_cmdline.mli | 10
2018 Feb 17
0
readLines interaction with gsub different in R-dev
I think the problem in R-devel happens when there are non-ASCII characters in any of the strings passed to gsub. txt <- vapply(list(as.raw(c(0x41, 0x6d, 0xc3, 0xa9, 0x6c, 0x69, 0x65)), as.raw(c(0x41, 0x6d, 0x65, 0x6c, 0x69, 0x61))), rawToChar, "") txt #[1] "Am?lie" "Amelia" Encoding(txt) #[1] "unknown" "unknown" gsub(perl=TRUE,
2019 Apr 08
0
[PATCH v4 2/7] common: Bundle the libvirt-ocaml library for use by virt-v2v
Add a copy of the libvirt-ocaml library, currently available at: https://libvirt.org/git/?p=libvirt-ocaml.git;a=summary This is a snapshot at commit d3ed8dcf1b0a6a8a855ceecbe0bb97f21e6665e3, which has all the features we need (and that builds fine). It is expected to stay synchronized with upstream, until there is a new upstream release, and it will be widespread enough. --- .gitignore
2018 Feb 17
2
readLines interaction with gsub different in R-dev
| Confirmed for R-devel (current) on Ubuntu 17.10. But ... isn't the regexp | you use wrong, ie isn't R-devel giving the correct answer? No, I don't think R-devel is correct (or at least consistent with the documentation). My interpretation of gsub("(\\w)", "\\U\\1", entry, perl = TRUE) is "Take every word character and replace it with itself, converted to
2007 Feb 28
3
[ win32utils-Bugs-8942 ] several typo in windows-pr.
Bugs item #8942, was opened at 2007-02-28 23:59 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=8942&group_id=85 Category: windows-pr Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Katsuyuki MIYAMUKO (miyamuko) Assigned to: Nobody (None) Summary: several typo in windows-pr. Initial Comment: I found typo in windows-pr. Attached
2015 Sep 17
0
CentOS-6 - LogWatch Cyrus-IMAPD script was CentOS-6 - LogWatch
On Mon, September 14, 2015 14:51, James B. Byrne wrote: > The Logwatch imapd service script distributed with CentOS-6 does not > generate anything when I run logwatch --service all on a cyrus-imapd > host. Is this expected behaviour? Is there a separate script for > cyrus-imapd or are their configuration options required to get the > existing script to work. > > I have found
2006 Aug 12
7
Redirect back to last page?
I have a few pages where a user may do something (add tags, login, etc) and I would like to redirect them back to the last page they were at before calling that action. Is there an easy way to do this? -- Posted via http://www.ruby-forum.com/.
2006 Jan 10
1
Validating Umlauts
Hi there, I''m building a rails application for German and English speakers. However, I''m having some problems validating German-specific characters (????). I have a tag-model which validates format of :name, :with => /^\w+$/. This throws an exception if german characters are used. My tables are all utf-8 and my environment.rb has the lines $KCODE = ''u''
2010 May 12
0
[LLVMdev] Need help for my PBQP regAlloc proj in llvm....
Hi Prasad, The comments at the beginning of RegAllocPBQP.cpp list the two most relevant papers for PBQP register allocation. // (1) Hames, L. and Scholz, B. 2006. Nearly optimal register allocation with // PBQP. In Proceedings of the 7th Joint Modular Languages Conference // (JMLC'06). LNCS, vol. 4228. Springer, New York, NY, USA. 346-361. // // (2) Scholz, B., Eckstein, E.