小编Sar*_*ins的帖子

重置按钮 c# asp.net 并清除验证控件

我有 ac# asp.net 注册表,但我无法使用重置按钮来实现我想要的目标。单击重置按钮后,我的验证器要求我填写所有文本框,然后才能重置字段。

如果用户填写表单的一半并使用重置字段,重置按钮无法实现我想要的目标,因为必须填充所有文本框。

我使用的代码如下:

protected void resetButton_Click(object sender, EventArgs e)
{Response.Redirect(Registration.aspx);}
Run Code Online (Sandbox Code Playgroud)

c# asp.net reset

2
推荐指数
1
解决办法
3174
查看次数

河内塔 - 用 Python 解决中途算法

河内之塔有没有可能解决一半?我已经进行了广泛的研究,以寻找可以中途解决用户配置的代码,但我还没有找到。这是一个任务,我要求代码从用户停止解决的地方接管并继续为用户解决,而无需将谜题重置为正方形。

我知道有现成的递归算法,但这不是我正在寻找的。我正在寻找可以从用户已经解决的地方接管的算法,然后从那里继续解决。有任何想法吗?

到目前为止,我已经提出了一种算法,将优化的算法(通过递归完成)存储到数组中,然后检查用户的输入是否等于数组中找到的任何输入,然后从那里继续求解. 但是,问题出在优化算法数组中找不到用户的配置时。

到目前为止,以下是我的代码(我已经排除了 stack.py 代码):

def solveHalfway(n, start, end, middle, count):
    gameInstance.stackA = [3,2]
    gameInstance.stackB = []
    gameInstance.stackC = [1]
    loopCounter = 0 # initialise loopCounter as 0
    moveCounter = 0 # initialise the move index the user is stuck at
    indicator = 0 # to indicate whether the user's config equals the solution's config
    while loopCounter < arrayOfStacks.size(): # while loopCounter size has not reached the end of arrayOfStacks
        if loopCounter != 0 and loopCounter % 3 …
Run Code Online (Sandbox Code Playgroud)

python algorithm solver

2
推荐指数
1
解决办法
1298
查看次数

标签 统计

algorithm ×1

asp.net ×1

c# ×1

python ×1

reset ×1

solver ×1