similar to: erb Regex ?

Displaying 20 results from an estimated 1000 matches similar to: "erb Regex ?"

2017 Aug 28
0
regex - optional part isn't considered in replacement with gsub
"Please, consider that some SKUs have "-" in the middle, for example: "PG-9021". Then you need to include these in the list of patterns you gave. Try it again -- this time with a **complete** list. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his
2017 Aug 27
6
regex - optional part isn't considered in replacement with gsub
Hello, I need some help with regex. I have this to sentences. I need to extract both "49MU6300" and "LE32S5970" and put them in a new colum "SKU". A) SMART TV UHD 49'' CURVO 49MU6300 B) SMART TV HD 32'' LE32S5970 DataFrame for testing: ecommerce <- data.frame(a = c(1,2), producto = c("SMART TV UHD 49'' CURVO 49MU6300",
2013 Mar 15
2
Help finding first value in a BY group
I have a large Excel file with SKU numbers (stock keeping units) and forecasts which can be mimicked with the following: Period <- c(1, 2, 3, 1, 2, 3, 4, 1, 2) SKU <- c("A1","A1","A1","X4","X4","X4","X4","K2","K2") Forecast <- c(99, 103, 128, 63, 69, 72, 75, 207, 201) PeriodSKUForecast <-
2008 Aug 09
1
Reshape set operations?
I have mange to use the library reshape to give me data structures that I want. Specifically: m2008 <- melt(t2008, id.var=c("DayOfYear","Category","SubCategory","Sku"), measure.var=c("Quantity")) m2007 <- melt(t2007, id.var=c("DayOfYear","Category","SubCategory","Sku"),
2017 Aug 27
0
regex - optional part isn't considered in replacement with gsub
Omar: I don't think this can work. For example number-letter patterns 4), 5), and 6) would all be matched by pattern 6). As Jeff indicated, you need to provide the delimiters -- what characters come before and after the SKU patterns -- to be able to recognize them. In a quick look at the text file you attached, the delimiters appeared to be either "-" or " " (blank) and
2008 Feb 27
1
Hmisc xYplot won't do conditioning on factors?
Hi, I am trying to replace (lattice) standard xyplot with xYplot variant from Hmisc package to be able to add error bars to my plots. However, this does not work, e.g: library(lattice) d <- data.frame( SKU=gl(3, 1, 21, labels=c("a", "b", "c")), Weekday=gl(7, 3, 21), QCRate=runif(21)) xyplot(QCRate ~ Weekday | SKU, data=d) (this plots nice 3 panels as per
2008 Aug 05
1
RESHAPE cast help.
I have a set of data that is basically sales figures for a given year. It has columns for Yeaqr, Day Of Year, Sku, SubCatetory, and Category. The first few lines of data look like: Year DayOfYear Sku Quantity CatId Category SubCategory 1 2007 1 100091 1 10862 HOLIDAY Christmas 2 2007 1 100138 1 11160 PET COSTUMES Famous
2008 Aug 27
1
Updating a list.
I have a list that is generated from the resape package function 'cast'. It consists of three columns, Sku, DayOfYear, variable it is generated like: r2007 <- cast(m2008, DayOfYear ~ variable | Sku, sum) Now DayOfYear can range from 1:365 but there are not necessarily that many rows in the list. What I want to do is make every row in the list of lenght 365 and have the values
2008 Aug 11
3
Exporting a list of lists
I have a list List(Sku=" ", Shape=1, Scale=3, DayOfYear=daylist) Note: picture daylist as c(2,3,4,3) it is a list with variable length. Then I have a list of lists al <- c(al, List(List(Sku=" ", Shape=1, Scale=3, DayOfYear=daylist)) Note: same comment on daylist as above. So far this creates a list of lists just how I want it. If I do al[1] I get each member and the
2008 Jul 26
1
Simple vector question.
I have some data that I read in via read.csv: sales2007 <- read.csv("Total2007.dat", header=TRUE) The data looks like: > sales2007[1:605,] Year DayOfYear Sku Quantity CatId Category SubCategory 1 2007 1 100091 1 10862 HOLIDAY Christmas 2 2007 1 100138 1 11160 PET COSTUMES Famous (Licensed) 3 2007
2010 Oct 31
1
Rails application Webservices
hi all, I have a rails application at http://electric-sky-98.heroku.com/products require ''net/http'' require ''uri'' res = Net::HTTP.get_response(URI.parse(''http://electric- sky-98.heroku.com/products.xml'')) puts res.body the above code gave me the xml file below: <?xml version="1.0"
2011 Aug 23
1
Problem to migrate virtual machine between two hosts with same uuid
hi at all, i'm trying to migrate a vm between two host but fails, this is what I did: virsh # start win2008 Domain win2008 started virsh # list Id Name State ---------------------------------- 1 win2008 running virsh # migrate --live win2008 qemu+ssh://host2/system error: internal error Attempt to migrate guest to the same host
2007 Apr 03
2
Scraping and saving.
Hi, I''m working to scrape and save some ebooks. Mechanize has been wonderful so far. The link I''m having trouble with is this one. http://www.webscription.net/SendZip.aspx?SKU=0671578499&ProductID=379&format=H When I click that in the browser it saves it to a file named H_1632.zip. How do I get that name from the page. I suspect to save this to a file I would just do
2005 Oct 05
3
Shopping Cart: SKU and Product Confusion
Hi there, I''m at a loss... I was on the #ROR channel last night and spoke to a really helpful person (Defiler) who gave me some direction on building a shopping cart. Unfortunately, I wasn''t able to successfully get to where I need to go. This is the predicament I am currently finding myself in: I''m building a shopping cart for a client''s new website. They
2009 Apr 03
3
data.frame to array?
I have a list of data.frames > str(bins) List of 19217 $ 100026:'data.frame': 1 obs. of 6 variables: ..$ Sku : chr "100026" ..$ Bin : chr "T149C" ..$ Count: int 108 ..$ X : int 20 ..$ Y : int 149 ..$ Z : chr "3" $ 100030:'data.frame': 1 obs. of 6 variables: ....... As you can see one 'column' is
2010 Feb 25
2
error using pvcm() on unbalanced panel data
Dear all I am trying to fit Variable Coefficients Models on Unbalanced Panel Data. I managed to fit such models on balanced panel data (the example from the "plm" vignette), but I failed to do so on my real, unbalanced panel data. I can reproduce the error on a modified example from the vignette: > require(plm) > data("Hedonic") > Hed <- pvcm(mv ~ crim + zn + indus
2006 Aug 15
3
update or alter cart
I want to modify and update the items in the Depot - "display_cart". Since the cart is in a session, its a little hard to get at the data. I just want to create a way to change quantities, prices and recalculate. Has someone done this, and could you point me to the right direction. Thanks Chas -- Posted via http://www.ruby-forum.com/.
2006 Jun 07
3
trouble wtih webstore schema, handling product variations
Hi Railers, Does anyone have any guidance on setting up a simple way to handle product variations (e.g garment size/color)? Initially, I had thought that I would make a variation model which defined the extra bits, but it seems quite inflexible especially so if a store were to sell non-clothing items that also had variants of one flavor or another. product has_many variations title
2006 Aug 12
5
Simple Newbie db ???
I''m trying to simply write to a mysql db from the console. Model = Entry , table = entries Problem is my values keep getting turned into instance variables and end up nil. >> Entry.create(:title =>"new title", :body => "Brand new body") => #<Entry:0x27178c4 @attributes={"body"=>nil, "title"=>nil, "id"=>6},
2006 Jan 24
3
Unitialized constant
In Agile Web Development with Rails, I get this error when adding a product to my cart: uninitialized constant Cart ... Application Trace: /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/ active_support/dependencies.rb:200:in `const_missing'' ./public/../config/../app/controllers/store_controller.rb:21:in `find_cart''