gradient

How do you remove the default Bootstrap 3 carousel control background gradients?

…衆ロ難τιáo~ 提交于 2019-12-02 15:45:58
I'm pretty sure this is the code I need to modify, but for some reason I can't get the gradients to disappear in IE. I want them completely gone! .carousel-control { text-shadow: none; opacity: 1; filter: alpha(opacity=100) } .carousel-control.left { background-image: -webkit-gradient(linear, 0 top, 100% top, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0.0001))); background-image: -webkit-linear-gradient(left, color-stop(rgba(0,0,0,0.5) 0), color-stop(rgba(0,0,0,0.0001) 100%)); background-image: -moz-linear-gradient(left, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%); background-image: linear-gradient

Subviews are not displaying for CAGradientLayer added view [duplicate]

三世轮回 提交于 2019-12-02 13:28:28
This question already has an answer here: How to Apply Gradient to background view of iOS Swift App 25 answers used below code for adding gradient layer for a view. After adding gradient layer to a view if i tried to add new subviews inside my gradient view the new view are not getting displayed func setGradientBackground(_ view: UIView ,colorStart:CGColor ,colorEnd:CGColor,cornerRadius:CGFloat) { let gradientLayer = CAGradientLayer() gradientLayer.colors = [colorStart, colorEnd] gradientLayer.startPoint = CGPoint(x: 0.0, y: 0.5); gradientLayer.endPoint = CGPoint(x: 1.0, y: 0.5); gradientLayer

How to set gradient drawable as backgroundTint attribute on FloatingActionButton

▼魔方 西西 提交于 2019-12-02 13:12:05
问题 I would like to use a gradient color instead of the traditional solid color for a Floating Action Button. I already know how to modify the background color of the button, using ColorStateList . Is there a way to implement the following drawable as a background tint color? overlay.xml <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:startColor="#c25f82" android:endColor="#5a3e60" android:angle="-270" /> </shape> 回答1: Yes, you can

MATLAB symbolic substitution

走远了吗. 提交于 2019-12-02 10:28:47
I know that in MATLAB if it is declared syms x y f=x^2+y^2 grad=gradient(f) Then grad will store value [2*x;2*y] If I want to evaluate the gradient at [2;2] I use subs(f,[x;y],[2,2]) This returns [4;4] I am coding a steepest descent algorithm that needs to be generic enough to take any function. I am wondering how to generically make use of syms and subs. Considering that some functions might not use the variables I have declared, like x and y . I know that MATLAB built in fminunc and fmincon require that the function variables be defined as x(1) , x(2) , x(3) .... for that reason. I am

Swift: gradient on a cell of a tableview

丶灬走出姿态 提交于 2019-12-02 10:25:13
On tableView's cells, I'm trying to define a gradient with the following Swift code: func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! { var cell:UITableViewCell = self.tableView?.dequeueReusableCellWithIdentifier("cell") as UITableViewCell cell.backgroundColor=UIColor.clearColor() let gradient : CAGradientLayer = CAGradientLayer() var arrayColors:Array<AnyObject> = [UIColor.blackColor().CGColor, UIColor.whiteColor().CGColor] gradient.colors=arrayColors gradient.frame = cell.bounds cell.layer.insertSublayer(gradient, atIndex: UInt32

Data type mismatch in fortran

孤街浪徒 提交于 2019-12-02 08:57:07
I've written a rudimentary algorithm in Fortran 95 to calculate the gradient of a function (an example of which is prescribed in the code) using central differences augmented with a procedure known as Richardson extrapolation. function f(n,x) ! The scalar multivariable function to be differentiated integer :: n real(kind = kind(1d0)) :: x(n), f f = x(1)**5.d0 + cos(x(2)) + log(x(3)) - sqrt(x(4)) end function f !=====! !=====! !=====! program gradient !==============================================================================! ! Calculates the gradient of the scalar function f at x=0using a

Android - how to draw 2-directional gradient?

微笑、不失礼 提交于 2019-12-02 08:23:44
问题 I started playing with gradients and I've found it's pretty easy to draw 1-directional gradient (like from top to bottom, from left to right, or in diagonale...) but how to draw 2-directional gradient? I mean something like this: Big blue rectangle it's 2-directional gradient - on top right corner there is blue and to the left its transforming to white and to the bottom it's transforming to the black. How to draw this? 回答1: Answer is: you must combine 2 different LinearGradients, for example:

Extract the gradient from the deriv command

五迷三道 提交于 2019-12-02 08:07:12
问题 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 gradient? 回答1: Not sure these count as better , but: with(attributes(a), gradient) or attributes(a)$gradient are alternatives that return the attributes as a list from which to

Android - how to draw 2-directional gradient?

大城市里の小女人 提交于 2019-12-02 05:55:52
I started playing with gradients and I've found it's pretty easy to draw 1-directional gradient (like from top to bottom, from left to right, or in diagonale...) but how to draw 2-directional gradient? I mean something like this: Big blue rectangle it's 2-directional gradient - on top right corner there is blue and to the left its transforming to white and to the bottom it's transforming to the black. How to draw this? Answer is: you must combine 2 different LinearGradients, for example: LinearGradient val = new LinearGradient(0, 0, 0, height, Color.WHITE, Color.BLACK, TileMode.CLAMP);

Directional Derivatives of a Matrix

荒凉一梦 提交于 2019-12-02 05:32:19
问题 I have 40 structures in my Workspace. I Need to write a script to calculate the directional derivatives of all the elements. Here is the code : [dx,dy] = gradient(Structure_element_1.value); dxlb = min(min(dx)); dxub = max(max(dx)); dylb = min(min(dy)); dyub = max(max(dy)); [ddx,ddy] = gradient(gradient(Structure_element_1.value)); ddxlb = min(min(ddx)); ddxub = max(max(ddx)); ddylb = min(min(ddy)); ddyub = max(max(ddy)); This is the code for one element. I Need to find out the same for all