search for: yield

Displaying 20 results from an estimated 5254 matches for "yield".

Did you mean: field
2006 Sep 29
2
multiyield
I lied, I don''t actually need different responses each time I call the method. So the last email of mine is probably worthless. Instead, I need yield to yield 3 values when I call it once: (behavior that mimics Find.find) def test_generate(documentation = ''/test_documentation/'', destination = ''/destination/'') Find.expects(:find).with(documentation).multiyield (''filename.yaml'', ...
2006 Aug 09
3
[Markaby] yield instead of @content_for_layout?
We''re supposed to use yield instead of @content_for_layout, but I can''t get yield to work in a Markaby template: yield text yield Either one of these lines results in a ''no block given'' error (but ''text @content_for_layout'' works). Anybody know how to use yield instead? Thank...
2007 Oct 09
23
Testing layouts with RSpec on Rails
Hey guys, Does anyone have any wisdom to share on the subject of speccing Rails layouts? Most of it''s plain old view specs stuff, but are there sensible ways to verify things like the yield call? (Mocking doesn''t catch that) Thanks, Matt -- Matt Patterson | Design & Code <matt at reprocessed org> | http://www.reprocessed.org/
2005 Dec 16
3
Purpose of ''yield'' in layout file in Flickr video?
During the excellent flickr video, the presenter adds the following to the applications layout file: <body> <%= yield %> </body> What is the purpose of the ''yield'' line? I would think there would be a content_for_layout tag there instead. Thanks, Don -- Posted via http://www.ruby-forum.com/.
2006 Sep 29
1
yielding consecutive values
I''m not sure if someone has already addressed this issue, but if not, here goes. I need the following behavior: def test_generate(documentation = ''/test_documentation/'', destination = ''/destination/'') yield_results = [''/'', ''filename.yaml'', ''blah.xml''] Find.expects(:find).with(documentation).yields(lambda { yield_results.shift } ) ... end So I made these changes... Index: test/mocha/expectation_test.rb ==============================...
2013 Jun 20
2
[LLVMdev] Error in the example of sext instruction in reference manual
Hi all, There might be a simple error in the LLVM reference manual. The example for sext instruction: %X = sext i8 -1 to i16 ; yields i16 :65535 %X should yield i16: -1, as opposed to 65535. Here is the simple patch (also attached): Index: docs/LangRef.rst =================================================================== --- docs/LangRef.rst (revision 184496) +++ docs/LangRef.rst (working copy) @@ -5236,7 +5236,7 @@...
2010 Aug 09
2
[PATCH 0 of 2] Scheduler: Implement yield for credit scheduler
As discussed in a previous e-mail, this patch series implements yield for the credit scheduler. This allows a VM to actually yield (give up the cpu to another VM) when it wants to. This has been shown to be effective when used in the spinlock code to avoid wasting time spinning when another vcpu is not currently scheduled. _________________________________________...
2009 Nov 10
0
Nelson- Siegel - (Yield Curve - Smoothening of curve)
I am Julia Cains from Brisbane. This is my first mail to this group and I have recently started learning the R language.   I am trying to learn the smoothening of the yield curve. However, I came across the CRAN package – “YieldCurve” meant for Modelling and estimation of the yield curve. The problem is I am not able to understand whether this package will help me to carry out smoothening of the curve.   The related pdf file consists of following R code.     Yiel...
2007 Aug 12
5
stubbing a method that yeilds sequential results
I''ve just found myself stuck trying to rspec something so am hoping someone more knowledgable can help. I have a Connector class which has a class method ''results'' that yields results it get from a network service based on a set of attributes that I pass to it. I am wanting to yield these results from my Intermediate class up to the next ''level'' so the basic no frills set up would be this: class Intermediate def self.results(attributes)...
2006 Sep 12
3
dtrace reports different counts depending on what is being traced
We are using following dtrace script to analyze an application. However we see different number of lwp_yield and yield calls reported depending on whether we trace mutex_lock or mutex_unlock or not. The number reported when we are not tracing mutex_lock or mutex_unlock is higher. What could be going on here and which one is the correct number. This is on S10 U2. Thanks, Rao. #!/usr/sbin/dtrace -qs...
2006 Jan 23
8
yield vs @content_for_layout, etc..
I am relatively new to RoR and Ruby for that matter. A few questions for the pros: Question 1: In the 5min ajax video the presenter uses <%= yield %> in his layout. In the agile book, @content_for_layout is used. Since, yield is an actual Ruby construct, is it more efficient and preferred? What is the difference? Question 2: Links are often of the form :action => ''some_action'' However, I have also seen :actio...
2007 Sep 21
5
Stubbing yielding methods
...nc=detail&aid=8687&group_id=1917&atid=7477 ). I''ve been (1) trying to work out whether there is anything logically wrong with Mocha''s existing behaviour and (2) whether Mocha should support the requested functionality. It all centres around the use of the Expectation#yields method. I''ve put a couple of examples together to try and help me think about it. The first one (http://pastie.caboo.se/99412) is a simplified version of the example in the bug report using a block and stubbing a method that yields to that block. In the second example (http://pastie.cabo...
2006 Jan 25
2
panel function with barchart (lattice)
Folks at R help, I can't quite get the panel function to work the way I want within barchart. I guess I'm still not understanding how to piece together multiple panel arguments, especially when "groups" is specified. Example: I want to be able to add the value of "yield" to each section of each bar in this graph: barchart(yield ~ variety | site, data = barley, groups = year, layout = c(1,6), stack=TRUE, ylab = "Barley Yield (bushels/acre)" ) To do this, I add my panel function: barchart(yield ~ variety | site, data = barley, groups = year,...
2009 Dec 04
0
Renaming columns of a data.frame
...stop("Couldn't find these columns in the data: ", paste(as.vector(e)[is.na(inx)], collapse=" ") ) names(`_data`)[inx] <- names(e) return(`_data`) } d0 <- data.frame(Year = c(2009, 2009, 2009), Mst = c(27.9, 28.9, 31.0), Yield = c(110, 180.1, 25)) ren(d0, yield='Yield') ren(d0, 'yield'='Yield') ren(d0, yield='Yield', year='Year') ren(d0, yield='Yield', mst='Mst') ren(d0, yield='YIELD', mst='MST') # Error caught. # ren(d0, yield=Yield, year=Year) # F...
2007 Aug 07
2
stubs which yield and return
Is there any reason why a stub couldn''t both yield and return? I''m looking for a way to mock out a class I''ve made named "AnonymousClass": class AnonymousClass def initialize(&blk) @klass = Class.new @klass.instance_eval(&blk) if block_given? end def new @klass.new end def eva...
2017 Sep 29
5
Converting SAS Code
Hello all, My statistical analysis training up until this point has been entirely done in SAS. The code I frequently used was: *Yield Champagin; data yield; set stress; if field='YV' then delete; if field='HB' then delete; if barcode='16187DD4015' then delete; if barcode='16187DD6002' then delete; if barcode='16187DD2007' then delete; if barcode='16187DD5016' then delete; i...
2008 May 08
2
[PATCH/RFC] stop_machine: make stop_machine_run more virtualization friendly
...guest cpus on 1 host cpu triggered the hang quite often. I could also reproduce the problem on a 4 way z/VM host with a 64 way guest. It turned out that the guest was consuming all available cpus mostly for spinning on scheduler locks like rq->lock. This is expected as the threads are calling yield all the time. The problem is now, that the host scheduling decisings together with the guest scheduling decisions and spinlocks not being fair managed to create an interesting scenario similar to a live lock. (Sometimes the hang resolved itself after some minutes) Changing stop_machine to yiel...
2008 May 08
2
[PATCH/RFC] stop_machine: make stop_machine_run more virtualization friendly
...guest cpus on 1 host cpu triggered the hang quite often. I could also reproduce the problem on a 4 way z/VM host with a 64 way guest. It turned out that the guest was consuming all available cpus mostly for spinning on scheduler locks like rq->lock. This is expected as the threads are calling yield all the time. The problem is now, that the host scheduling decisings together with the guest scheduling decisions and spinlocks not being fair managed to create an interesting scenario similar to a live lock. (Sometimes the hang resolved itself after some minutes) Changing stop_machine to yiel...
2013 Jun 21
0
[LLVMdev] Error in the example of sext instruction in reference manual
On Jun 20, 2013, at 4:39 PM, Bin Tzeng <bintzeng at gmail.com> wrote: > Hi all, > > There might be a simple error in the LLVM reference manual. The example for sext instruction: > > %X = sext i8 -1 to i16 ; yields i16 :65535 > > %X should yield i16: -1, as opposed to 65535. > Here is the simple patch (also attached): These are the same value. -Chris > > Index: docs/LangRef.rst > =================================================================== > --- docs/LangRef.rst (revisi...
2017 Oct 11
0
Converting SAS Code
I have no problem setting up my mixed model, or performing anova or lsmeans on my model?s outputs. However, performing lsd mean separation is giving me fits. So I do not have a problem when using two-way anova model. When using the code: fit.yield.add <- lm(data = ryzup, Yield ~ Rep + Nitrogen + Treatment) LSD.test(fit.yield.add, trt = "Nitrogen", alpha = 0.1, console = TRUE) It works beautifully. However when I run a mixed model: yield.lmer <- lmer(data = ryzup, Yield ~ Nitrogen + Treatment + (1|Rep/Nitrogen), REML =...