我正在开发一款扑克游戏。
我有一个压缩序列Zip2Sequence< [String],[(Int,[Int])]>其中字符串是手,然后根据持有的牌(直线= 8,四种= 4)对手进行排名,然后是一个整数数组,以区分给定相同等级的两只手。
我知道我可以比较两个[Int]操作数:在游乐场会话中我尝试
graphRequest.start(completionHandler: { (connection, result, error) in
if let userDetails = result as? [String: String] {
if error != nil {
print(error!)
return
} else {
let id = userDetails["id"]
let profileImageURL = "http://graph.facebook.com/\(id!)/picture?type=large"
let email = userDetails["email"]
let name = userDetails["name"]
self.setUserInformation(profileImageUrl: profileImageURL, username: name!, email: email!, uid: uid)
}
}
})
http://jenkins-ci.361315.n4.nabble.com/Deleting-a-job-through-the-Remote-API-td3622851.html
然而,在我的代码中,我想区分具有相同最高等级的手,并使用以下函数
<?php
header("Access-Control-Allow-Origin:http://localhost:8100");
header("Content-Type: application/x-www-form-urlencoded");
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
$datos;
$resultados_finales;
@$db = mysqli_connect("localhost","root","","speedomart");
if($db)
{
//$query = "SELECT * FROM producto";
$query = "SELECT producto.codigo_barra, producto.nombre, producto.imagen, producto.precio, stock_prod.ubicacion from producto JOIN stock_prod ON stock_prod.idSup = 1 ORDER BY RAND() LIMIT 0,2";
$data=mysqli_query($db,$query);
while($fila=mysqli_fetch_assoc($data))
{
$codigo = $fila[0];
$nombre = $fila[1];
$imagen = $fila[2];
$precio = $fila[3];
$ubicacion = $fila[4];
$resultados_finales = array("mensage"=>"algcorrecto","codigo"=>$codigo,"nombre"=>$nombre,"imagen"=>$imagen,"precio"=>$precio,"ubicacion"=>$ubicacion);
echo json_encode($resultados_finales);
}
}else
{
$resultados_finales = array("mensage"=>"credenciales incorrectas");
echo json_encode($resultados_finales);
};
?>
返回错误二进制运算符&lt;不能应用于两个[Int]操作数。
嗯,斯威夫特,我不同意。通常在这些情况下,事实证明我错了。那我为什么错了,怎么能返回最大的[Int]?