Displaying 20 results from an estimated 5278 matches for "yielded".
2006 Sep 29
2
multiyield
..., I wrote multiyield....
Index: test/mocha/expectation_test.rb
===================================================================
--- test/mocha/expectation_test.rb (revision 62)
+++ test/mocha/expectation_test.rb (working copy)
@@ -91,6 +91,13 @@
assert_equal parameters_for_yield, yielded_parameters
end
+ def test_should_yield_multiple_times_with_multiyield
+ expectation = new_expectation.multiyield(:foo, 1, ''bar'')
+ actual = []
+ expectation.invoke() { |parameter| actual << parameter }
+ assert_equal [:foo, 1, ''bar''], actua...
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
...I made these changes...
Index: test/mocha/expectation_test.rb
===================================================================
--- test/mocha/expectation_test.rb (revision 62)
+++ test/mocha/expectation_test.rb (working copy)
@@ -91,6 +91,11 @@
assert_equal parameters_for_yield, yielded_parameters
end
+ def test_should_yield_with_block_result
+ expectation = new_expectation.yields( lambda { ''lambda return
value'' } )
+ expectation.invoke() { |*parameters| assert_equal [''lambda
return value''], parameters }
+ end
+
def test_sho...
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
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)
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
2007 Aug 12
5
stubbing a method that yeilds sequential results
...stub!(:each_result).and_yield(@result)
@attributes = {}
@results = []
@block = Proc.new { |r| @results << r }
#action
Intermediate.search_results(@attributes, &@block)
# expectation
@results.should == [@search_result]
However, what I actually need to do is check each result that is
yielded by the Connector.each_result method and compare it to the
previous one. If they are sufficiently similar I need to merge them
(and same again if the next result is sufficiently similar). I only
want to yeild merged results and results that are not similar to
their preceeding result(s) - I&...
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
I''ve just been tying my brain in knots looking at bug #8687 (
http://rubyforge.org/tracker/index.php?func=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
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
>
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)