gradient

Css multiple gradient

偶尔善良 提交于 2019-12-11 20:24:12
问题 I want to style background of one element in CSS, something like this: color gradient from top to bottom with no any transparency, transparency gradient with single color from left to right: left and right with no transparency, and middle with 100% transparency Second gradient should be on higher layer than first. Both placed on 100% of element's area Code: div.panel div.panel-heading { background: linear-gradient(to bottom, #e8e8e8 0%,#dbdbdb 50%,#cdcdcd 51%,#e0e0e0 100%), /* Here I want

Rotating the gradient not the oval

不打扰是莪最后的温柔 提交于 2019-12-11 18:37:34
问题 I have an oval shape with a sweep gradient, I want to rotate the gradient not the oval itself (since when I rotate oval it is not in the right position anymore). I couldn't find anything about this. Any ideas? This is what I'm trying to do <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval"> <stroke android:width="1dp" android:color="#585858"

numpy gradient() behaves differently between versions

女生的网名这么多〃 提交于 2019-12-11 16:47:54
问题 I noticed this when searching around numpy.gradient() usages. It seems that since numpy 1.13, the function treats it input argument differently than previous versions. Here is a simple example: import numpy as np x=np.linspace(0,10,100) y=np.sin(x) dx=np.gradient(x) grad1=np.gradient(y,dx) print grad1 grad2=np.gradient(y,x) print grad2 I tested in numpy 1.13 and 1.11.3. In 1.13, gradient(array1, array2) treats array2 as coordinates (x) for array1 . But in 1.11.3, it treats array2 as the

Do the operations defined in array ops in Tensorflow have gradient defined?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 15:46:24
问题 I want to know whether the tensorflow operations in this link, have a gradient defined. I am asking because I am implementing a custom loss function and when I run it I always have this error : ValueError: An operation has `None` for gradient. Please make sure that all of your ops have a gradient defined (i.e. are differentiable). Common ops without gradient: K.argmax, K.round, K.eval. This is my custom Loss function: def calculate_additional_loss(y_true,y_pred): #additional loss x_decoded

Adding gradient effect to TextView in a ListView generates NPE

ε祈祈猫儿з 提交于 2019-12-11 15:07:14
问题 I've tried adding gradient effect to TextView . But it generates a NPE (I felt the id to was the culprit, but it wasn't so). My Activity : public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_NO_TITLE); TextView textView = (TextView)findViewById(R.id.label); Shader textShader=new LinearGradient(0, 0, 0, 20, new int[]{Color.GREEN,Color.BLUE}, new float[]{0, 1}, TileMode.CLAMP); textView.getPaint().setShader(textShader);

Android ListView : bad gradient divider

…衆ロ難τιáo~ 提交于 2019-12-11 14:23:20
问题 I have a ListView : <ListView android:id="@+id/mainList" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="1dip" android:layout_marginRight="1dip" android:divider="@drawable/list_divider" android:dividerHeight="1px" android:textAppearance="?android:attr/textAppearanceSmall" android:cacheColorHint="#00000000" /> and a shape in list_divider.xml <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient

program/library to read photoshop gradient .grd file

跟風遠走 提交于 2019-12-11 12:42:59
问题 Does anybody know program or library that can read the photoshop gradient .grd files or the file format because currently I need to export the gradient in Photoshop to another format like svg gradient. 回答1: A document describing the Photoshop Gradients File Format has been mentioned in this PS-Scripts forum: http://www.ps-scripts.com/bb/viewtopic.php?f=2&t=4925 HTH... 回答2: The cptutils package can convert grd to svg (and many other formats). I you just want to convert a couple of files the

SVG Animate Gradient Stop

不想你离开。 提交于 2019-12-11 12:41:54
问题 I have an SVG and I would like to animate a gradient stop from left to right and back. I managed to animate the left to right, but I don't know how to animate it back. Here is my code: <svg id="mySvg" width="700px" height="498px"> <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-0.4998" y1="250" x2="700" y2="250"> <stop offset="0" style="stop-color:#FFFFFF;stop-opacity:0.1"> <animate attributeName="offset" begin="0s" dur="2s" from="0" to="1" repeatCount="indefinite" /> </stop

Why the gradient of categorical crossentropy loss with respect to logits is 0 with gradient tape in TF2.0?

天涯浪子 提交于 2019-12-11 10:07:01
问题 I am learning Tensorflow 2.0 and I am trying to figure out how Gradient Tapes work. I have this simple example, in which, I evaluate the cross entropy loss between logits and labels. I am wondering why the gradients with respect to logits is being zero. (Please look at the code below). The version of TF is tensorflow-gpu==2.0.0-rc0. logits = tf.Variable([[1, 0, 0], [1, 0, 0], [1, 0, 0]], type=tf.float32) labels = tf.constant([[1, 0, 0], [0, 1, 0], [0, 0, 1]],dtype=tf.float32) with tf

Styling SELECT (Option) tags with gradient and custom arrow

你离开我真会死。 提交于 2019-12-11 09:38:44
问题 You can see my entire HTML here. You can copy/paste it into a demo document locally and see what I'm referring to. http://chopapp.com/#ny9fxmtv Basically I want to style the boxes to have both a gradient AND a custom arrow on the right. It's shown in the image above. The problem is that the gradient I am getting is via this code: background: -webkit-gradient(linear, left top, left bottom, from(#f8f8f8), to(#ececec)) ; This is line 21 in my code above. But because the "background" attribute is