search for: yields

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

Did you mean: fields
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/'')
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? Thanks, Joe -- Posted via http://www.ruby-forum.com/.
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
...wing 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 =================================================================== --- test/mocha/expectation_test.rb (revision 62) +++ test/mocha/expectation_test.rb (working copy) @@ -...
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. _______________________________________________ Xen-devel mailing list
2009 Nov 10
0
Nelson- Siegel - (Yield Curve - Smoothening of curve)
...lty=1)   # __________________________________________________ The plot gives me two curves (1) Observed yield curve and (2) Fitted yield curve.     Unfortunately I am not able to interpret the result.   The input has 330 records (i.e. from January 1982 to June 2009) and each record has 6 yields given (for the period 3months, 6 months, 1 year, 5 years, 7 years and 10 years.)   Unfortunately I am not that good in Mathematics. Can someone help me understand whether this code is meant for smoothening of the yield curve. I shall be highly obliged.   Regards   Julia   ************...
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.
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 =>
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.caboo...
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,
2009 Dec 04
0
Renaming columns of a data.frame
A question that has come up a few times on r-help is how to rename columns of a data.frame. There are several ways to do this by hand (see the list archives). There is also a 'rename' function in the reshape package. I often use the 'transform' function shortly after reading in a data file and wanted to have a renaming function that has a syntax consistent with the
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 evaluate(&blk)
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
2008 May 08
2
[PATCH/RFC] stop_machine: make stop_machine_run more virtualization friendly
On kvm I have seen some rare hangs in stop_machine when I used more guest cpus than hosts cpus. e.g. 32 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
2008 May 08
2
[PATCH/RFC] stop_machine: make stop_machine_run more virtualization friendly
On kvm I have seen some rare hangs in stop_machine when I used more guest cpus than hosts cpus. e.g. 32 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
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 (revisio...
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)