Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click 'TextBox1.Text = Token() If Button1.Enabled = True Then Label1.Text = Label1.Text + " A1 " If Button1.BackColor = Color.Yellow Then Button1.BackColor = Color.Red Else Button1.BackColor = Color.Yellow End If Else Label2.Text = "" Label2.Text = True End If Button1.BackColor = Color.Yellow End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click If Button2.Enabled = True Then Label1.Text = Label1.Text + " b1 " If Button1.BackColor = Color.Yellow Then Button1.BackColor = Color.Red Else Button1.BackColor = Color.Yellow End If Else Label2.Text = "" Label2.Text = True End …

Member Avatar
Member Avatar
+0 forum 3

Identify if the following variable names and declarations are valid or invalid in writing program code visual basic 2010 1. intStud_no 2. Total weight 3. First name= Tin" 4. dblTotal 5. _index 6.qty=25 7. Ave=84 8. intProduct id 9. Int a=12 10. _xyz

Member Avatar
Member Avatar
-2 forum 2

Hi! I want to learn programming. I'm 14 years old and very fond of computing. The only problem I face is *Which programming language should I learn?* or should I learn *Programming* i.e I learn the basics of programming so that I will be capable of learning any programming language. Also, when you recommend me one of the choice I stated above then please give me resources for learning e.g book names or some websites which will start me learning from scratch. Furthermore, I want to state that I want to create cool games, softwares or even Operating Systems from …

Member Avatar
Member Avatar
+2 forum 10

hello how can i insert multiple selected data from datagridview into database using checkbox..please help

Member Avatar
Member Avatar
+0 forum 1

There are times when you need to make sure your counter starts at an odd or even number. Even is pretty simple - `counter = counter + modulus(counter)`. If counter is even it stays, if it's odd it gets incremented by 1. Odd is a bit more complicated - `counter = counter + modulus(counter + 1)`, If counter is odd it stays, if it's even it gets incremented by 1. if you're in danger of counter being the max value you can always subtract instead. These basic algorithms should work for any language that has a modulus operator/function. I've included …

Member Avatar
Member Avatar
+2 forum 4

Hey guys, I'm in desparate need of assistance with my A-Level project. I'm writing a Banking system in Python and I'm being told by the idle log that a function hasn't been defined - even though that function is right above it! My Full Code is: #'http://effbot.org/tkinterbook/tkinter-index.htm' <<< Tkinter Tutorials #Ignore the link above, it's for future reference import time import random class BankAccount(): #Class Initialisation def __init__(self, firstName, lastName, accountNumber, pinNumber, balance=0): self.fn = firstName self.ln = lastName self.accNum = accountNumber self.pin = pinNumber self.bal = balance self.transactions = [] #Class Functions def deposit(self, amount): self.bal += amount return …

Member Avatar
Member Avatar
+0 forum 2

I have a function pointer to calculate addition, substraction, etc for 2 inputed arguments and 1 inputed operation. It works fine when the code return the indexed function pointer (with the inputed index) function pointer with both inputed arguments. but when I initialize a variable with as value this indexed f.p. i. , the result is an address, when I try to dereference this i.f.p. the result is `-11`. I don't understand why. Can someone explain me why? #include <stdio.h> //Compiler version gcc 6.3.0 /*On declare 4 fonctions*/ int ad (int num1, int num2); int sub (int num1, int num2); …

Member Avatar
Member Avatar
+0 forum 3

HI everyone, _SBLOCK *allocateMemBlock(size_t size) [ _SBLOCK *block = (_SBLOCK*)sbrk(0); void *memadr = (void*)sbrk(0); void *allocate_mem = (void*)sbrk(BLOCK_SIZE + size); if(allocate_mem == (void*)-1) [ return NULL; ] else [ block->next = NULL; block->isfree = false; block->size = size; block->memoryAddress = memadr+BLOCK_SIZE; return block; ]

Member Avatar
Member Avatar
+0 forum 8

I am trying to write a C++ solution for a problem which is written C, I have learnt C++ very long ago(may be 15 years), and the way C++ is evolved now is kind of taking long to understand and not easy as 'C' to develop a solution. Would request any experts help in solving the problem . Actually, the problem is quite big , but i broke down into small , so i that i can reuse from learnings here. I have already started with a small class here to store a list of strings and print them. But …

Member Avatar
+0 forum 0

public class HashedClass{   int ticketNumber; // keyfield string purchaserName;   Hashtable hashtable = new Hashtable();   insert();   fetch();   delete();   update();   } I started a pseudocode above, but I know it needs more work. Are there any resources that can help guide me to implementing my own java hashed perfect algorithm? I know that you have to use the direct hashed four basic operation for each four methods, right? But how can I do that based on pseudocode?

Member Avatar
Member Avatar
+0 forum 3

How to put a price on the items in the combobox? Please help . really needed it .. Thank you

Member Avatar
Member Avatar
+0 forum 1

how to select an item in the combobox and then put item quantity in the textbox. and how to price the combobox items. Really need help .. Next week is my system defense.. Thank you

Member Avatar
Member Avatar
+0 forum 1

Listed below is the original word jumble python program. According to the exercise i'm supposed to add hints see next thread on my modified program however it doesn't work correctly. [code=python] # Word Jumble # # The computer picks a random word then "jumbles" it # The player has to guess the original word # import random # create a sequence of words to choose from WORDS = ("python", "jumble", "easy", "difficult", "answer", "xylophone") # pick one word randomly from the sequence word = random.choice(WORDS) # create a variable to use later to see if the guess is correct correct …

Member Avatar
Member Avatar
+1 forum 5

Create a Project name Banking which will have the following classes with the given instance variables and the methods Create a class Account with first name , last name, address , phone number, balance (instance variables) Withdrawal and deposit methods Create checking account class extending the account class, Having additional instance variables monthly fees, over draft limit(OD), over draft active, overdraft fees Overriding the withdrawal and deposit methods Withdrawal method should check the over draft active or not if yes then should check the balance with the withdrawal amount and then perform the withdrawal, if withdrawal request is within the …

Member Avatar
Member Avatar
+0 forum 1

I am developing an app to android and ios, which purpose is get directions to a certain clicked marker (point) in the map. So, I am using the Google Maps API with node.js, and I have the data from the points stored in a MongoDB. I've been serching but I can't find anything that solves what I want to do. I want now to get those points coordinates from the data base object and then use the coordinates to when I click a marker (a point), then appears a infowindow with a button saying "go to location" and when I …

Member Avatar
+0 forum 0

Hi all, I have an application which saves data (books details like book title, author and location) to a mySql db and performs CRUD operations. I thought I'd use hibernate to take care of the ORM side of things and everything was OK when it came to create a record, but for RUD operations I had an issue. If I'm a user, I'm likely to be willing to find a book by its author, title or location, certainly not by its ID and yet as far as I can see, hibernate uses IDs for these kind of operations. I dug …

Member Avatar
+0 forum 0

Hi, I've been having issues with my program where I make the rocket do what its supposed to do when it comes to outputting a filled and hollow rocket body depending on either a odd or even value. The only problem I am currently having is duplicating the body length also known as adding stages of how long I want the boyd to be. Here's my code: [code] //Draw a Rocket with a filled or hollow body with stages #include <iostream> using namespace std; void drawOddBox(/* in*/ int, /* in */ int); //Function prototype with two value parameters void getDimensions(/* …

Member Avatar
Member Avatar
+1 forum 1

need help for factorila within range if you entered 3 in textbox, This will appeared in Listbox 1! = 1 2! = 2 3! = 6

Member Avatar
Member Avatar
+0 forum 1

My problem is setting the size of the JButton. I want it to be a little button centered below the "Hello World" JLabel field (as it is now it spans the full width of the JFrame). I am unsure what is causing the setPreferredsize to be ignored. I am an ameture/novice Java Developer and appriciate any help and all help. My code is below error free: /* Author: Ashley * This program will display a basic JFrame, JLabel, and JButton. * The JLabel will display "Hello World and the JButton will close the program */ import java.awt.*; import java.awt.event.*; import …

Member Avatar
Member Avatar
+0 forum 4

I dont understand the appearent discrepency in the treatment of the variabe x, y, and z. Why y isn't treated as x and z? #include <stdio.h> #include <string.h> int main() { char result[100] = "Philippe Dupont 30"; char x[50]; char y[50]; int z; /*We use sscanf to give a value to the three variables x, y and z. the two first are strings and don't need &.*/ sscanf(result, "%s%s%d", x, y, &z); /*Printing the value of the variables works fine.*/ printf("%s\n", x); printf("%s\n", y); printf("%d\n", z); /*But when I want to print a string in which the variables are, the …

Member Avatar
Member Avatar
+0 forum 2

Now I am making my pos software client - server based software. I am using java derby as the database. On the local host I am running the program successfully. But on the remote server I face an exception. First I tell you, how I am connecting to the remote server below: I connect my laptop to my pc through LAN Cable. I am using my laptop as client and my desktop PC as Server. On my Server I run the following command to start the Derby Server: C:\Program Files (x86)\Java\jdk1.7.0_79\db\lib> java -jar derbyrun.jar start server Above mentioned command starts …

Member Avatar
Member Avatar
+0 forum 7

Hi! I have made a POS Sotware. I have used only one JFrame as Main/Home Screen of the software and used JDialogs for all other screens. In this post I have concern with the 2 screens; Home Screen(which is a Jframe) and Sales Screen(which is a JDialog). As Home Screen appears I instantiate an instance of the Sales Screen in the constructor of Home Screen as : Sale sale = new Sale(); And on Pressing a Button on Home Screen I called : sale.visible(true); In the WindowOpened Event of the "Sale" Screen I load the products data from database and …

Member Avatar
Member Avatar
+0 forum 14

I having been trying to change the font size and textposition of a textfield but I have not had any luck. I am trying to change the font size of a text field. I would like the font that is typed in the text field to be bigger and bolded. I have tried this, but it does does not work: [CODE] Font font1 = new Font("SansSerif", Font.BOLD, 20); JTextField textfield = new JTextField (); textfield.setFont(font1); [/CODE] Also, I want the texted to be centered in the textfield. I have used this: [CODE] textfield.setHorizontalTextPostion.CENTER textfield.setVerticalTextPostion.CENTER [/CODE] Thank you for your help …

Member Avatar
Member Avatar
+0 forum 5

Hi guys. And doing a system in spring. I want to cascade a dropdown list such that the selection on the first dropdown affect what appears in the second dropdown. All these data should come from a database. What I am getting online is using php is not what I want. Any help will be appreciated. Attached is what I have done. 1. Html <fieldset class="row1"> <div> <p> <label>3rd Party Category</label> <select th:id="selectCategory" name="selectCategory" th:field="*{category}" path="category"> <option value="">Select Category</option> <option th:each="category : ${category}" th:value="${category.id}" th:text="${category.name}" /> </select> </p> <p> <label>3rd Party Name</label> <select id="selectThirdParty" name="selectThirdParty" path="thirdParty"> </select> </p> </div> </fieldset> …

Member Avatar
+0 forum 0

I am trying to create a method that will count number of zeros in a statement/numbers (numOfZero), that a string as input and returns the number of occurrence of ‘0’ in the string. And if there is no zero it should return zero. I have used String.length() and String.CharAt(int index). but getting some errors. Any help?

Member Avatar
Member Avatar
+0 forum 2

I want to form a chat bot

Member Avatar
Member Avatar
-2 forum 1

Anyone can fix this code. thank you, only TURBO C program #include<stdio.h> #include<string.h> #include<stdlib.h> #define true 0 #define false 1 struct product { char id[10]; char name[20]; int quantity; int numSold; float price; int discount; float sales; }; struct product prod[30]; int count = 0; FILE *f; int writefile() { int i; f = fopen("inventory.txt", "w"); if (f == NULL) return -1; fprintf(f, "%d\n", count); for (i = 0; i < count; ++i) { fputs(prod[i].id, f); fprintf(f, "\n"); fputs(prod[i].name, f); fprintf(f, "\n"); fprintf(f, "%d\n", prod[i].quantity); fprintf(f, "%d\n", prod[i].numSold); fprintf(f, "%f\n", prod[i].price); fprintf(f, "%d\n", prod[i].discount); fprintf(f, "%f\n", prod[i].sales); } fclose(f); return …

Member Avatar
Member Avatar
+0 forum 1

Hi, I apologize if my english is bad, I need some help printing the value of a variable in the code that I show below, I'm using emu8086 and I need that this works in this code example that is the same that comes in the examples of emu8086 (PrinterDemo.asm) with a little of modification that is of what I need to print. Thanks for your help [CODE] ; the printer demonstration. ; this is simplified/ms-dos complatible version. ; this example may not work on Windows XP, however it may work for Windows 95/98: ; http://support.microsoft.com/default.aspx?scid=kb;en-us;Q258878 ; the printer device …

Member Avatar
Member Avatar
+1 forum 2

hi everyone can someone help me on vb.net code on how to load selected row from datagridview and transfer in to combobox or radio button.. i will appreciate your help so much

Member Avatar
+0 forum 0

i am almost done with the hangman game but i just need to migrate it to graphics i know i need to use entrybox but i still dont know. [CODE]rom graphics import* from random import * MAX_BAD_GUESSES = 7 def readfile(): infile = open("wordlist.txt","r") contents = infile.read() lines = contents.split("\n") return lines def random(lines): secret_word = randint(0,len(lines)-1) return lines[secret_word].lower() def play(secret_word): guess = 0 solution = [] for i in range(len(secret_word)): solution.append("_") num_incorrect = 0 while num_incorrect < 7 and "_" in solution: print(" ".join(solution)) guess = input("Enter a letter") if secret_word.find(guess)==-1: num_incorrect = num_incorrect +1 else: i = secret_word.find(guess) …

Member Avatar
Member Avatar
+0 forum 4

The End.