所以我遇到了难以解决的强化问题
public Datatable GetData(string uid){
Sqlcommand command = new SqlCommand();
command.Parameters[0].value = uid //Issue found here
错误在上面显示的代码的最后一行中发生,表明uid是引起问题的uid。我不确定该如何处理。清理传递给函数的字符串是否可以解决此问题?如果是这样,这与跨脚本有何不同?
很抱歉,这是一个愚蠢的问题,但我们将不胜感激。 谢谢。
答案 0 :(得分:0)
改为尝试这个
...
//block checking collision
if (i != j && squares[i].collides(squares[j])) {
squares[i].changecolor();
//set intersection color
fill(50);
//calculate parameters
newX = Math.max(squares[i].position.x, squares[j].position.x);
newY = Math.max(squares[i].position.y, squares[j].position.y);
newW = Math.min(squares[i].position.x + squares[i].w, squares[j].position.x + squares[j].w) - newX;
newH = Math.min(squares[i].position.y + squares[i].h, squares[j].position.y + squares[j].h) - newY;
//draw rectangle
rect(newX, newY, newW, newH);
}