gradient

linear gradient + background-size is not working in firefox

老子叫甜甜 提交于 2019-12-13 02:38:34
问题 Im using a linear gradient with a background-size of 400%. this allows me to animate between gradients on hover and active state by changing the background-position. It works great in webkit but not in firefox. It seems as though the background-size property is not acknowledged at all. Firefox is basically just squeezing the whole gradient in the element as if background-size is set to 100%. Ive got a super simple page that demonstrates the problem: http://firefoxgradient.s.cboo.st (switch b

Matlab gradient and hessian computation for symbolic vector function

ぃ、小莉子 提交于 2019-12-13 02:19:37
问题 This question was migrated from Cross Validated because it can be answered on Stack Overflow. Migrated 4 years ago . I am trying to use the Matlab "gradient" and "hessian" functions to calculate the derivative of a symbolic vector function with respect to a vector. Below is an example using the sigmoid function 1/(1+e^(-a)) where a is a feature vector multiplied by weights. The versions below all return an error. I am new to Matlab and would very much appreciate any advice. The solution may

Gradient textfields in panel with TitledBorder - performance issue

我是研究僧i 提交于 2019-12-13 01:49:43
问题 I have a panel with 3 inner panels that all use a TitledBorder . The third inner panel has a number of custom textfields that are painted with GradientPaint . The textfields come from a custom class that extends JTextField and uses an overriden paintComponent method along with a MouseListener , so that when mouse enters on a textfield area the gradient color slightly changes (and changes back again when mouse leaves the textfield). The problem is that the gradient color change does not

Is it possible to compute per-example gradients efficiently in TensorFlow, in just one graph run?

爱⌒轻易说出口 提交于 2019-12-13 01:42:15
问题 TD;DR: is there a way to evaluate f'(x1), f'(x2), ..., f'(xn) in just one graph run, in a vectorized form? Where f'(x) is the derivative of f(x). Something like: x = tf.placeholder(tf.float32, shape=[100]) f = tf.square(x) f_grad = tf.multiple_gradients(x) # f_grad contains f'(x[0]), f'(x[1]), ... More specifically, I'm trying to implement Black Box Stochastic Variational Inference (BBSVI) manually (I know I could use a library like Edward, but I'm trying to implement it myself). At one point

PowerPoint 2007/2010 VBA code to change Type of Gradient Fill on a Shape object

我与影子孤独终老i 提交于 2019-12-13 01:35:02
问题 With PowerPoint 2007 & 2010, I have been trying to change the Type of Gradient Fill on a Shape object from default "Rectangular" to "Path" for days. Searched online but seems like no such question asked. So far I can only get the Gradient Fill to be "Rectangle" (the default with 2 color gradient?). But I want it to be "Path". So far only able to do that by right click on the actual Shape --> Format Shape. "Format Shape" form shows and I can change the "Type:" from Rectangle to Path. But I

Showing two different gradients as a background using CSS?

雨燕双飞 提交于 2019-12-13 01:24:15
问题 I want to have 2 different gradients in the background of my site - I am using the following to call one gradient - how do I declare more than one (i.e. to show a different gradient on the left and a different one on the right) body { background: -webkit-gradient(linear, left top, left bottom, from(#E0E0E0), to(#fff)); background: -moz-linear-gradient(top, #E0E0E0, #fff); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#E0E0E0', endColorstr='#ffffff'); } So I want want the

How can I detect via JavaScript if browser supports CSS3 media queries and CSS3 gradient?

£可爱£侵袭症+ 提交于 2019-12-13 00:41:38
问题 How can I detect via JavaScript if browser supports CSS3 media queries? How can I detect via JavaScript if browser supports CSS3 gradient? Thank you. 回答1: Have a look at http://modernizr.com/, it's a great library for featuredetection using javascript. 回答2: Cracking open Modernizr (which can test for media queries) we see it uses the window.matchMedia (MDN page) function. We can check in plain old vanilla JS to see if this function exists (Modernizr is really awesome, but sometimes you just

smooth color interpolation along a “bresenham” line

早过忘川 提交于 2019-12-12 21:32:06
问题 I am trying to interpolate color along a line so that, given two points and their respective RGB values, I can draw a line with a smooth color gradient. Using Bresenham's Line Algorithm, I can now draw lines, but am not sure how to begin interpolating colors between the two end points. The following is part of the drawLine() function that works for all line whose slope are less than 1. int x_start = p1.x, x_end = p2.x, y_start =p1.y, y_end = p2.y; int dx = Math.abs(x_end-x_start), dy = Math

ggplot2 horizontal barplot with gradient color fill

主宰稳场 提交于 2019-12-12 17:47:58
问题 I am trying to create horizontal bar plot and would like to fill the individual bar as per their log fold values, white for lowest value and darkest for highest value. However, I am not able to do it. Here is my work, can somebody help me fix it? df <- data.frame(LogFold = c(14.20, 14.00, 8.13, 5.3, 3.8, 4.9, 1.3, 13.3, 14.7, 12.2), Tissue = c("liver", "adrenal", "kidney", "heart", "limb", "adipose", "brown", "hypothalamus", "arcuate", "lung")) df1<-df%>% arrange(desc(LogFold)) ggplot(data

Gradient for chunks in QProgressBar

落花浮王杯 提交于 2019-12-12 16:25:34
问题 Is it possible to set a common gradient for all QProgressBar chunks? If use something like this: QProgressBar::chunk:horizontal { background: qlineargradient(x1: 0, y1: 0.5, x2: 1, y2: 0.5, stop: 0 green, stop: 1 white); margin-right: 2px; width: 10px; } the result will be http://labs.trolltech.com/blogs/wp-content/uploads/2007/06/progressbar_righttext.png but I want to obtain a one gradient, stretched to all chunks. Like this: http://labs.trolltech.com/blogs/wp-content/uploads/2007/06