[Solved] Simple head and tails bot [closed]

[ad_1] As Scott said, result is defined inside the flip function. I haven’t really used async before, but probably this will work for you. Take out the return statement Tab the following lines. elif message.content.startswith(config.prefix + ‘coinflip’): result = random.randint(0, 1) if result == 1: print(‘Heads!’) await client.send_message(message.channel, content=”Heads!”) else: print(‘Tails!’) await client.send_message(message.channel, content=”Tails!”) 1 … Read more

[Solved] filling a form with jquery [closed]

[ad_1] Try this HTML <input type=”text” name=”” id=”voornaam” value=”” class=”full” /> <input type=”text” name=”” id=”achternaam” value=”” class=”full” /> <span class=”data-name”>Dhr. name lastname</span> jQuery $(‘#voornaam’).on(‘keyup’, function () { var name = this.value; var lastname = $(‘#achternaam’).val(); $(‘.data-name’).text(name + ” ” + lastname); }); $(‘#achternaam’).on(‘keyup’, function () { var lastname = this.value; var name = $(‘#voornaam’).val(); $(‘.data-name’).text(name … Read more

[Solved] Django 1.6.1 + MySQL + Apache 2.4.7 on Windows. Is it possible? [closed]

[ad_1] MySQLdb (the native driver for MySQL) is not compatible with Python3 yet; but the driver from Oracle for MySQL, called MySQL Connector/Python is compatible with Python 3. You should use the Oracle driver. django works with both. Once you have the driver installed, follow the connection section in the documentation. 1 [ad_2] solved Django … Read more

[Solved] Exception in button tag

[ad_1] The reason you are getting an exception is because your tag is greater then the blogids count. Add the buttons to the array and then it will not crash. For example: blogids = [[NSMutableArray alloc]init]; [blogids addObject:oneOfYourButtons]; Also if you only want to see the tags number use this: NSLog(@”The tag clicked:%d”,tag); instead of: … Read more

[Solved] how to perform addition using a textbox [closed]

[ad_1] @user3174595 : I have put in the simple code. its the easiest operation that can be performed. form1.aspx <body> <form id=”form1″ runat=”server”> <div> <asp:TextBox ID=”TextBox1″ runat=”server”></asp:TextBox> <asp:Button ID=”Button1″ runat=”server” Text=”Button” OnClick=”Button1_Click” /><br /> <asp:Label ID=”Label1″ runat=”server” Text=”0″ ></asp:Label> </div> </form> form1.aspx.cs public partial class addition : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) … Read more