Yii2禁用供应商模块的资产(Yii2 disable asset of a vendor module)
我已经安装了位于/ vendor / mdmsoft / yii2-admin的yii2-admin模块,但我不希望它加载自己的资产包。 有没有办法禁用此模块资产包?
I have installed yii2-admin module, located in /vendor/mdmsoft/yii2-admin but I don't want it to load its own asset bundle. It there any way to disable this module asset bundle?
原文:https://stackoverflow.com/questions/30472821
最满意答案
我不认为有任何需要使用
csape
,你可以只使用spline
。 从spline
的文档:如果Y是包含两个值而不是x具有条目的向量,则Y中的第一个和最后一个值将用作三次样条曲线的endlopes。
此外,样条线允许您直接获取插值的
yy
值,因此:x = [3 4 7 9]; y = [2 1 2 0.5]; xx = 0:0.1:10; yy = spline(x,[0 y 0], xx); plot(xx,yy)
这给了我下面的情节。
看看这个,边界处的斜率为零(x = 3和x = 9),这就是我们所要求的“边界处零梯度”的“夹紧”样条。 如果您希望超出边界的零梯度,我建议您执行以下操作:
yy(xx<x(1)) = y(1); yy(xx>x(length(x))) = y(length(y));
赠送:
编辑
这在末端结处给出了连续的
y
函数,但是y'
在末端结处不平滑。 如果您希望y
'平滑,可以填充输入数组并将其用作spline
函数的输入。 这会给你一些振荡,如下所示,这可能是也可能不是你想要的。% Spline on padded input arrays x = [0 1 2 3 4 7 9 10 11 12]; y = [2 2 2 2 1 2 0.5 0.5 0.5 0.5]; yy = spline(x,y, xx);
I don't think there's any need to use
csape
, you can just usespline
. From the documentation forspline
:If Y is a vector that contains two more values than x has entries, the first and last value in Y are used as the endslopes for the cubic spline.
Also, spline allows you to obtain the interpolated
yy
values directly, so:x = [3 4 7 9]; y = [2 1 2 0.5]; xx = 0:0.1:10; yy = spline(x,[0 y 0], xx); plot(xx,yy)
This gives me the plot below.
Looking at this, the slope is zero at the boundaries (x=3 and x=9), which is what we are asking of a 'clamped' spline with zero gradient at the boundaries. If you wish to have zero gradient beyond the boundaries, I would recommend just doing the following:
yy(xx<x(1)) = y(1); yy(xx>x(length(x))) = y(length(y));
Giving:
Edit
This gives a continuous
y
function at the end-knots, buty'
is not smooth at the end-knots. If you would likey
' to be smooth you could pad your input arrays and use this as the input to yourspline
function. This would give you some oscillations as shown below, though, which may or may not be what you want.% Spline on padded input arrays x = [0 1 2 3 4 7 9 10 11 12]; y = [2 2 2 2 1 2 0.5 0.5 0.5 0.5]; yy = spline(x,y, xx);
相关问答
更多-
我不认为有任何需要使用csape ,你可以只使用spline 。 从spline的文档: 如果Y是包含两个值而不是x具有条目的向量,则Y中的第一个和最后一个值将用作三次样条曲线的endlopes。 此外,样条线允许您直接获取插值的yy值,因此: x = [3 4 7 9]; y = [2 1 2 0.5]; xx = 0:0.1:10; yy = spline(x,[0 y 0], xx); plot(xx,yy) 这给了我下面的情节。 看看这个,边界处的斜率为零(x = 3和x = 9),这就是我们所要 ...
-
rms包移动到晶格绘图平台。 您需要在面板调用或补充晶格函数之一中添加文本。 请参阅?llines或使用trellis.focus 。 [![ap <- function(...) { ltext(60, 1, "p < 0.001") } plot(Predict(f, age, sex), addpanel=ap)][1]][1] The rms package moved to the lattice plotting platform. You would need to add the tex ...
-
正如Mark Mikofski所写,返回SciPy的插值例程的对象无法添加,或者乘以标量等。在相同网格上计算样条后,可以组合它们的值 。 from scipy.interpolate import CubicSpline xdata1 = np.array([-1, 0, 1, 3, 5]) ydata1 = np.array([8, 5, 4, 2, 1]) cs1 = CubicSpline(xdata1, ydata1) # first spline xdata2 = np.array([-2, ...
-
对于非均匀分布的横坐标,您可能需要考虑广义插值技术(例如B样条)。 将数据近似为多个系数乘以基函数的总和(例如,具有非均匀选择的节点的B样条 - 或放置良好的高斯的径向基函数网络)。 这些功能必须跨越感兴趣的空间。 现在,您可以使用最小二乘法来近似加权系数 - 然后以您需要的任何分辨率重新采样。 如果采用这种方法,您可以根据平滑度来规范系统,以便在x.min()和x.max()之外提供更多合理的值。 这是搭配方法:假设您的样本值在向量x,y中。 将基础向量设置为phi_k(x)的采样版本 然后设置你的基础B ...
-
将SAS中的三次样条有效地拟合到特定的对象网格中(Efficiently fitting cubic splines in SAS to specific grid of objects)[2022-03-15]
好。 我将为2个数据集执行此操作,以帮助您拥有一堆事实。 您必须修改输入,但这应该会为您提供更好的性能。 创建一些输入 从每个输入数据集中获取第一个和最后一个值。 创建所有MNES值的列表。 将每个输入合并到MNES列表并设置上限值和下限值。 将输入附加在一起 使用BY语句运行PROC EXPAND以单次传递所有输入值并创建样条线。 诀窍是“欺骗”EXPAND认为MNES是每日时间序列。 我这样做是通过使它成为一个整数 - 日期值是SAS背后的整数。 没有差距,ETS程序将采用“每日”频率。 完成此操作后, ... -
不同的最终条件解释了您的实现与Octave之间的区别。 Octave使用not-a-knot条件(取决于输入) 请参阅help spline 为了解释你的观察结果:由于非结点条件,三阶导数在第2和第(n-1)次中断是连续的,所以这就是为什么Octave的二阶导数看起来更少'断点',因为它是一个在前两个和最后两个段上连续的直线。 如果你看三阶导数,你可以更清楚地看到效果 - 第三个导数只在第3个阶段(中间)不连续 x = 1:5; y = rand(1,5); xx = linspace(1,5); pp = ...
-
这是在patsy问题跟踪器上回答的: https://github.com/pydata/patsy/issues/108#issuecomment-309234408 tl;博士:他们是不同的,但眼球大的矩阵充满了浮点数很难:-) This was answered on the patsy issue tracker: https://github.com/pydata/patsy/issues/108#issuecomment-309234408 tl;dr: they are different, ...
-
用于2d参数曲线f(t)=(x(t),y(t))的切向量被定义为f'(t)=(dx(t)/ dt,dy(t)/ dt)。 当您需要曲线在某些点处具有dy / dx = 0时,它仅表示这些点处的切线向量将水平移动(即,dy / dt = 0)。 它并不一定意味着切向量本身是零向量。 因此,您仍然可以使用TCB样条函数来执行任何操作。 Obviously nobody had a good answer, but as it's my job, I found a solution: The Points ar ...
-
因此,如果您的控制点始终位于相同的x坐标上 并沿整个范围线性分散,然后你可以这样做: //--------------------------------------------------------------------------- const int N=5; // number of control points (must be >= 4) float ctrl[N]= // control points y values initiated with linear fun ...
-
想象一下B点和E点之间的三次曲线。 如果将其定义为具有张力参数s的基数样条,则这些点中的切向量为 T b = s *( E - A ) T e = s *( F - B ) 如果曲线定义为贝塞尔曲线,则切线矢量为 T b = 3 *( C - B ) T e = 3 *( E - D ) 如果曲线BE相同,则切线的值相等,如果已知A,B,E,F,s,我们可以找到Bezier的控制点。 反之亦然 - 如果B,C,D,E,s已知,我们可以找到基数样条的A,F点。 例如,Bezier的第一个控制点是 C = B ...