gradient

Extract the gradient from the deriv command

A colleague asked me the following question the other day. In the following piece of code, how do you extract the gradient: > x=5 > a = eval(deriv(~ x^3, "x")) > a [1] 125 attr(,"gradient") x [1,] 75 My answer was > attr(a, "gradient")[1] [1] 75 This syntax seems clunky to me. Is there a better way of extracting the gradien...

UITableViewCell gradient layer auto resize

I'm using the CAGradientLayer method from this answer to set a gradient on my UITableViewCells. However, for this table, I increased the height of the cells via tableView:heightForRowAtIndexPath:. My gradient layer now does not cover the full height of cell, but instead stops at the original height (see pic). I tried setting the fra...

Applying a background color to an entire Grid row in XAML Silverlight

I'm trying to apply a gradient background to just one row in a XAML Silverlight grid that I've created. I can do something like this without any trouble: <Grid> <Grid.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="Black" Offset="0" /> <GradientStop Color="W...