问题标签 [uint]

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 回答
77 浏览

matlab - Julia NetCDF 仅返回 Uint8

我正在从 matlab 迁移到 Julia。使用 julia v 0.4.2 和 Meggart 打包 NetCDF

我正在尝试以与在 matlab 中导入变量相同的方式导入变量:

而且,如果我在 Matlab 上查看变量的内容,我有:输入 24x19 字符和内容:

然而,在朱莉娅,我只得到:

而且我不知道如何使用它或如何恢复有用的数据。你能解释一下吗?

0 投票
2 回答
6861 浏览

types - What's the differences between a UINT and a WORD with Profinet

I'm developing a project on a Siemens PLC and i'm wondering if I should use a Word or a UINT to store a 16-bit value. Is there any differences between the two?

0 投票
0 回答
72 浏览

swift - 在 App 中创建 UInt8 失败,但在 Playground 中继续

我已将 Objective-C 脚本转换为 Swift 以形成 AAC 帧的标题。但是,代码无法在应用程序中运行,并因 EXC_BAD_ACCESS 而崩溃。将代码复制到操场会输出我所期望的没有错误的结果。不知道该去哪里,因为它似乎应该工作。我总是可以使用 Objective-C 版本,但这感觉就像在解决这个问题。

在此处输入图像描述

0 投票
1 回答
358 浏览

image - 在 MATLAB 中使用 improfile 时不确定我的代码哪里出错了

我目前正在研究获取一堆图像并计算这些堆栈的强度分布以将它们与另一堆图像进行比较的代码。

这是我的代码:

这些是我得到的一组错误(当然都与一个错误有关):

在此处输入图像描述

当我whosd_I 和 c_I 时,这就是我得到的:

在此处输入图像描述

那么这个错误到底是什么意思,我试图查看文档,但我不确定是什么N意思。

感谢您的回答,请不要犹豫,提出任何可以进一步澄清问题的问题。

0 投票
2 回答
4613 浏览

c# - 日期/日期时间作为包装 api 中的 uint

我正在使用一个没有真正记录的 C++ api 的包装器。一些公开的方法需要 uint 类型的字段(from 和 to)。这些字段实际上是 datefrom 和 dateto,但类型不是这样。我尝试了不同的方法,包括将 datetime 转换为 DOS unsigned int 表示

,但如果不是错误,api函数调用仍然没有返回任何内容。,我还尝试了简单的表示形式:20160101,这是有道理的,但没有成功。有没有一种将日期和时间表示为无符号整数的已知方法?

0 投票
1 回答
187 浏览

c - 从 uint_16t 转换后的 uint8_t 值

我必须为学校做一个小作业。我正在用 C 写这个。问题是:

给定

的价值是p[3]多少?

我做了一些研究,发现这些数字将使用 little-endian 重新输入我的计算机。所以

但是,当我打印时,p[]我得到

我对此感到非常困惑,谁能告诉我为什么会这样?

0 投票
2 回答
6100 浏览

go - Are reads and writes for uint8 in golang atomic?

As in the title, are read and write operations regarding uint8, atomic? Logically it must be a single cpu instruction obviously to read and write for a 8 bit variable. But in any case, two cores could simultaneously read and write from the memory, is it possible to create a stale data this way?

0 投票
1 回答
1961 浏览

c# - 为什么我不能从 uint 中减去一个 int?

我有两个变量。

类型必须保持intuint。但是我不能用它们进行基本的算术运算。

无法将类型“int”隐式转换为“uint”。存在显式转换(您是否缺少演员表?)

所以我每次都必须做这样的事情?

来自 C/C++/Java 背景,这让我很困惑。
我在这里缺少什么吗?

为什么这种行为与提到的其他语言不同?
有更好的选择吗?

我认为这是该语言新手的常见绊脚石。
不,我不依赖下溢。

0 投票
1 回答
3435 浏览

swift - 如何快速将 UIColor 类型的值转换为 Uint

我得到了这个 UIColor :

我需要在 Uint 中转换。我怎样才能做到这一点?

编辑 :

颜色样式字段需要 Uint

0 投票
2 回答
775 浏览

swift - Swift: Why does UInt.max == -1

As the title states, lldb reports the value of UInt.max to be a UInt of -1, which seems highly illogical. Considering that let uint: UInt = -1 doesn't even compile, how is this even possible? I don't see any way to have a negative value of UInt at runtime because the initializer will crash if given a negative value. I want to know the actual maximum value of UInt.