使用字符串函数长度检查较为频密。
为了避免这一点,您必须显式地向代码添加字符串长度检查。
To avoid this, you must explicitly add string length checks to the code.
字符串长度检查:在输入框输入超出长度的字符串将会被允许,但要确保它不被程序通过。
String length check: put excess of characters in a input box should support and make sure it is not taking that.
我没有检查变量的长度。
这个人测量了他们的胳膊长度,用游标卡尺检查了他们的眉毛下面的皮肤厚度。
The man had measured the length of their arms, checked with calipers the thickness of the skin below their eyebrows.
与字符串相关的一些典型的检查,会验证空字符串的长度是否为 0,访问范围超出索引是否导致错误消息或异常,等等。
Some of the typical string-related checks would validate whether an empty string has 0 length, accessing out-of-index results in an error message or exception, and so on.
在经过简单的检查确保两个密码长度相等之后,将在整个密码中匹配各个键——例如,确保两个密码中的第五个字符是零。
After a simple check to ensure the two passwords are of equal length, each key is then matched in the entire password - ensuring that the fifth character is a zero in both passwords, for example.
如果现在运行的服务器超过一个,而队列长度小于5,那么这个脚本就需要进行更多的检查,以决定它是否应该停止一个实例。
If there is more than one server running and the queue is less than 5, the script does some more checking to see if it should terminate an instance.
研究人员接下来安排了一个“事故”,他们切断了营区的供水。所有的男孩子都要去检查水管(长度不止1公里),看看是不是有哪里堵住了。
The researchers then staged an “incident” in which the camp’s water supply was cut off and all the boys had to check the water pipe (more than 1 km long) to see where it was blocked.
然后这个方法检查长度值是否小于或者等于127。
The method then checks to see if the length value is less than or equal to 127.
首先,我先做一个检查,我们以前使用过字符串长度函数。
First, I'm going to do a sanity check strlen so we've used string length, strlen, before.
strnlen_user函数带有两个参数:用户空间缓冲区地址和要检查的最大长度。
The strnlen_user function takes two arguments: the user space buffer address and the maximum length to check.
虽然示例里包含了在应用程序其他许多地方都可使用的长度和null检查,但是它们采用了无法重用的方式进行编码。
Although the example contains length and null checks that I could use in many other areas of the application, they're coded in such a way that they cannot be reused.
对于标准的检验(比如检查属性的名称、长度和格式),可以使用ActiveRecord提供的检验。
For standard validations like checking the name, length and format of an attribute, we can make use of validations provided by Active Record.
他们写了很多工具来检查,保证当操纵缓冲区时,总是额外传递了一个参数来代表缓冲区的正确长度。
Tools were written to check that a proper length was always passed as a separate argument when manipulating buffers; a solution Jay was not pleased with.
Perl子例程 checksize 处理整个文件(作为 Perl数组 @_ implicit的一部分)并检查函数长度。
The Perl subroutine checksize traverses over the whole file (as part of the @_ implicit array in Perl) and keeps checking for function lengths.
使用“validates_length _ of”方法检查主题名的长度是否不超过20个字符。
To check that the subject name length is not more than 20 characters, we use the "validates_length_of" method.
列在元组中的应该是两个或更多其它有效性类;与Or相同,当前不检查该元组长度。
Listed in the tuple should be two or more other validity classes; as with or, the tuple length is not currently checked.
与前面一样,过滤过程会产生一个XMLList,然后可以检查这个列表的长度,从而判断目前还留下多少个目标。
As before, the filtering process produces an XMLList, so you can retrieve the length of the list to see how many targets are left.
除了要比较长度和索引值是否相等之外,还必须检查是解析后的nullNumber还是一个空的输入字符串(或长度为0)。
In addition to comparing the length and index values for equality, you must also check for either a null Number after parsing or an empty input string (" "or length of zero).
由于它返回一个配置对象数组,因此您总是要检查返回的数组的长度。
Since it returns an array of config objects, you should always check the length of the returned array.
这个例程检查所有片段的总长度并创建一个具有这种长度的新数组。
This routine checks the total length of the pieces and creates a new, single array that is that long.
那名教练测量了他们的胳膊长度,用游标卡尺检查了他们的眉毛下面的皮肤厚度,还让他们做了立定跳远和复杂的跳房子游戏。
The man had measured the length of their arms; checked with calipers the thickness of the skin below their eyebrows; had them execute the standing broad jump and a complex version of hopscotch.
与字符串相关的典型检查包括检查空字符串的长度是否为 0以及访问范围超出索引是否导致错误消息/异常。
Some of the typical string-related checks include verifying that an empty string has 0 size and accessing out of index from the string results in an error message/exception.
现在,再添加两个测试,一个测试检查有效的主题数据,另一个测试检查在指定不正确的TAG长度时是否显示期望的错误消息。
Now, let's add a second test to assert valid subject data and a third test to see whether the expected error message is encountered when we specify an incorrect TAG length.
使用这个写入cookie的长度,我们可以检查是否有这么多空间可用。
With the length of the cookie being written, I check to see that space is available for it.
检查导向绳的长度是否足够。
检查钢丝绳,若发现钢丝绳在一个搓绕节距长度内折断根数超过6根时,需更换新的钢丝绳。
Check the steel rope. If the broken number exceeds 6 within a lay length, a new steel rope will be needed.
所以梦幻之星的演示也有安全检查的球员的名字长度。
So Phantasy star's demo does have a security check on the player's name length.
所以梦幻之星的演示也有安全检查的球员的名字长度。
So Phantasy star's demo does have a security check on the player's name length.
应用推荐