我对此问题非常困惑,无法理解.在Enumerable文档中,我读到了这个:
实现System.Collections.Generic.IEnumerable
还有一些像Select()return IEnumerable<TSource>这样的方法我们可以Where()在使用之后使用其他方法.例如:
names.Select(name => name).Where(name => name.Length > 3 );
Run Code Online (Sandbox Code Playgroud)
但Enumerable不从继承IEnumerable<T>和IEnumerable<T>不包含Select(),Where()以及等太...
我错了吗?
或存在任何理由?
在Security + book中,已经告知DoS攻击可能无法检测到,攻击者可以使用无效的IP地址.
无效的IP地址是什么意思?它是僵尸IP吗?我们怎么能面对呢?
我有一个在PHP中使用数据库的类.这个类中的Add函数是:
function Add($post_id)
{
if(!is_numeric($post_id))
{
return 1181;
}
$query = "...";
$result = mysql_query($query, $this->link);
return $result;
}
Run Code Online (Sandbox Code Playgroud)
我还有一个页面获取表单数据并将它们传递给这个类.页面代码是:
$result = $obj->Add($post_id);
if($result == 1181)
{
echo 'invalid';
}
else if($result)
{
echo 'success';
}
else
{
echo 'error';
}
Run Code Online (Sandbox Code Playgroud)
返回值为1,输出必须为"成功",但我收到"无效"消息.如果我交换'无效'和'成功'条件语句,一切运作良好,但我想知道这是什么问题?