[Solved] how can i check winners by using jquery [duplicate]

$(document).ready(function() { let gameArray = []; let turn = 1; let gameOver = false; $(“#turn”).text(turn === 1 ? ‘X’ : ‘O’); $(“.smallbox”).click(function() { let squereIndex = $(this).attr(‘id’).replace(‘square’, ”) – 1; if (turn == 1 && !gameOver && gameArray[squereIndex] === undefined) { $(this).text(“X”); $(this).addClass(“X”); turn = 2; gameArray[squereIndex] = 1; } else if (!gameOver && gameArray[squereIndex] … Read more

[Solved] Prevent button press without login [closed]

You may use: <?php $disabledString = “”; if ($_SESSION[‘sess_user’]){ $disabledString = “”; }else{ $disabledString = ‘disabled=”disabled”‘; } ?> <input type=”submit” name=”submit” value=”Comment” <?= $disabledString ?> /> This will either print (button disable) in browser: <input type=”submit” name=”submit” value=”Comment” disabled=”disabled” /> Or (not enabled): <input type=”submit” name=”submit” value=”Comment” /> 1 solved Prevent button press without login … Read more

[Solved] Range Validation in asp.net [closed]

For making field MANDATORY: Use RequiredFieldValidator: <asp:TextBox ID=”txtName” runat=”server”></asp:TextBox> <asp:RequiredFieldValidator ID=”RequiredFieldValidator1″ runat=”server” ControlToValidate=”txtName” ErrorMessage=”Input Country!” EnableClientScript=”true” SetFocusOnError=”true” Text=”*”> </asp:RequiredFieldValidator> For Validating Range of Number in TextBox use RangeValidator: <asp:TextBox ID=”TextBox1″ runat=”server”></asp:TextBox> <asp:RangeValidator ID=”RangeValidator1″ runat=”server” ControlToValidate=”TextBox1″ MaximumValue=”200″ MinimumValue=”100″ Type=”Integer” ErrorMessage=”Please input between 100 to 200.”> </asp:RangeValidator> Read more about Validations Here Hope this helps you! 2 … Read more

[Solved] type of variable in Visual C#

According to the documentation, it’s not returning a byte array but an Array. Just type ByteArray_to_Hex(problem) and let Visual Studio generate the method. Then you’ll see what type it returns. Perhaps you can call ByteArray_to_Hex((byte[])problem) to explicitly cast it. solved type of variable in Visual C#

[Solved] ggplot chart, x=date, y= value, value

d <- read.table(text=readClipboard(), header=TRUE, stringsAsFactors = T, na.strings=”U”) df <- melt(d, id.var=”date”) ggplot(aes(x=date, y=value), data = df) + geom_bar(aes(fill = variable), stat=”identity”, position = ‘dodge’) or ggplot(aes(x=factor(date), y=value), data = df) + geom_bar(stat=”identity”, position = ‘dodge’) + facet_grid(variable~., scales=”free_y”, drop = F) + theme(axis.text.x = element_text(angle = 45, vjust = 1.1, hjust = 1.05)) 4 … Read more

[Solved] if statement doesnt work when included with two variables

myInput is undefined for your event, you should get the value by adding following line in your eventListener. let myInput= document.getElementById(“myInput”).value; Change your code like following. var input = document.getElementById(“myInput”); input.addEventListener(“keyup”, function(event) { let myInput = document.getElementById(“myInput”).value; for (i = 0; i < objPeople.length; i++) { if (myInput == objPeople[i].studentid && event.keyCode === 13) { … Read more

[Solved] Return the list is empty python [closed]

As is, your code shoud do nothing. I guess you are calling Main() in some way. But the function doObjects is never called. Moreover, you may have forgotten to add self.list1 = list1 in your function definition The good way to do this could be first to add to your script at the end: M … Read more