首页 \ 问答 \ Yii2禁用供应商模块的资产(Yii2 disable asset of a vendor module)

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
更新时间:2021-10-23 17:10

最满意答案

我不认为有任何需要使用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 use spline. From the documentation for spline:

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.

Spline Plot

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:

enter image description here

Edit

This gives a continuous y function at the end-knots, but y' is not smooth at the end-knots. If you would like y' to be smooth you could pad your input arrays and use this as the input to your spline 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);

enter image description here

相关问答

更多
  • 我不认为有任何需要使用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 ...
  • 好。 我将为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 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)