问题标签 [undocumented-behavior]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
458 浏览

matlab - 为什么我的人物看起来是动画的(当它不应该是动画时)?

考虑以下绘制图形的代码:

例如,当我运行此代码时,我会得到一个带有移动线的闹鬼图形,该图形应该是静态的(这个使用的是我的真实数据,看起来比示例好一点):

在此处输入图像描述

几个额外的观察:

  • 我注意到如果没有这xlim条线,什么都不会发生(即,该图是静态的,如预期的那样)。
  • 我无法让它在另一台运行相同 MATLAB 版本的计算机上工作。
  • “动画”线似乎与轴工具栏的出现和消失(右上角的缩放等)一致。
  • 当我使用它创建图形时figure('Renderer', 'painters')不会发生。

有人可以解释为什么会这样吗?这是记录在案的行为吗?知道如何控制它吗?

我正在 Windows 10 v1803 上使用 R2018b。我的屏幕连接到板载 GPU,即 Intel HD Graphics 530(驱动程序版本 22.20.16.4749)。

2019 年 9 月更新:我在 Windows 10 v1903 上的 R2019b 上也会发生这种情况。正如评论中所建议的,以下是输出opengl info

0 投票
1 回答
289 浏览

matlab - How can we use the Curve Fitting Tool during debugging?

MATLAB's Curve Fitting App (previously "tool", hence, cftool) is a graphical tool for interactive curve fitting1.

The general way of working with this tool is by choosing variables from the workspace:

enter image description here However, during debugging, data selection is disabled (this is documented):

enter image description here

... which is quite a nuisance, since we must save the data to a file, and either quit debugging or open a new instance of MATLAB before we can load this data again and use it in cftool.

I would assume that the reason for disabling the inputs is because during debugging we usually have multiple workspaces, and so iterating through them or providing user choice of the workspace is too cumbersome in terms of UX - so the developers decided to disable the inputs until such time that only a single workspace exists.

My question is this: How can we disable the "debugging detection" of cftool or otherwise specify the workspace that we're interested in, so that we can use cftool during debugging?

0 投票
1 回答
798 浏览

generics - 通用密封类的类型安全使用

当我编写通用密封类时,我发现了有趣的事情。这是第一个版本:

假设我们也有这样的请求功能

现在在使用方面我们有错误:

第一个问题Failure并且CancelledT用于进/出位置,为什么这个演员没有被检查,我需要压制它?

过了一会儿,康斯坦丁向我展示了如何声明类型安全的密封类的解决方案:

这个声明就像一个魅力,现在我有问题:

第二个问题:为什么要out在这里写修饰符?

第三个问题:为什么Producer<Nothing>是亚型Producer<MyInterface>?根据协变的定义:Producer<A>Producer<B>if的子类型的A子类型B,但Nothing不是 的子类型MyInterface。它看起来像未记录的语言外功能

0 投票
1 回答
860 浏览

c# - 通过 .NET/C# 查询 Comcast/Xfinity 每月数据配额

以下代码报告“错误:未经身份验证”。

如何使用 .NET 对此 Comcast/Xfinity API 进行身份验证,以查询/获取具有每月配额的帐户的已用和可用数据?

0 投票
1 回答
205 浏览

matlab - 以编程方式导出数据 (R2019a)

在 MATLAB R2019a中添加了一种导出图形的新方法,结果“以最小的空白围绕轴紧密裁剪”。使用轴工具栏访问此功能:

在此处输入图像描述

我的问题是:我们如何以编程方式调用这个新的导出功能?

为特定轴打开导出对话框应该相当容易(即模拟按钮单击),但我更感兴趣的是绕过对话框并将文件保存到磁盘,例如


PS
我知道这个功能可以使用 3 rd方工具来实现,比如export_fig.

0 投票
1 回答
82 浏览

matlab - matlab评估当前行(光标所在的位置)

我如何执行与 F9 相同的操作,但不标记当前行(例如,使用 shift+home,然后 F9)?

显然,这纯粹是为了方便起见 - 但是像 shift-F9 或 ctrl+F9 这样的东西会很酷吗?

如何制作那个快捷方式?有高手知道吗?

0 投票
1 回答
250 浏览

matlab - 设置 Matlab WindowButtonDownFcn 并保留默认行为

我可以手动设置WindowButtonDownFcn并有选择地覆盖右键或中键,同时保留默认行为吗?最终目标是通过单击将图形复制到剪贴板。

我尝试了以下错误消息(向右滚动)

handle以及使用andevent.listener没有成功的更多排列

在 Matlab 2019a 中测试。

编辑:这是一个模板函数,可与基于 matlabgui's kind answer 的修饰符一起使用

0 投票
0 回答
30 浏览

matlab - matlab函数可以检测是否已用分号调用

是否有(可能未记录)方法来检测函数是否由分号调用,或者这本质上是不可能的?

例子:

0 投票
1 回答
42 浏览

matlab - matlab:获取变量创建时间

如果它已过时,我想更新一个变量 - 显然这可以通过存储它的创建时间来完成。

但是 - 是否有一种(可能未记录的)方法来确定工作空间中的变量何时被声明?

0 投票
0 回答
19 浏览

c - What is cLongFixedRectangle?

Everywhere that I found online is just a raw definition like this:

#xA;

But nowhere do I see it documented or used. All I could figure out is that it seems to be defined mostly in Apple OSs and IBM OS/2 source code. What is this mysterious constant used for?