32,204 Topics
| |
Hello everyone, I have some problems with my program , hope you can help me to solve it. 1- I need a method for the** Clear Time** button that remove the counter to be 0. ` private void btclearActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: min=0;sec=0; lblsec.remove(lblsec); … | |
| i am stuck at aparticular place and cant help myself. my professor asked me to built a notepad using .io and .awt pakages only and i am unable to do the save function in the notepad can anyone please help me |
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 … | |
where theuser tries to guess a 3 digit target number Whenthe user guesses a number, the computer • Prints k `+' if the guessed number has k same digits as the target number and also in their correct positions. | |
I have the following Java code snippet: Map<String, List<String>> phones = new HashMap<>(); phones.put("User1", Arrays.asList("0502324547", "0651634767")); phones.put("User2", Arrays.asList("0977634321", "0697654221")); phones.put("User3", Collections.singletonList("0970011223")); Map<String, String> map = phones .entrySet() .stream() .flatMap(e -> e.getValue().stream().map(v -> new AbstractMap.SimpleEntry<>(v, e.getKey()))) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); Using it I'm converting Map<String, List <String>> to Map<String, String> and then passing … | |
My name is Henry, and I started programming about 10 years ago. I always loved playing video games, even from a young age. That passion eventually turned into something much more. Learning programming languages is very popular at the moment. A lot of people leave their current workplaces to learn … | |
Hi, In C program Function has three parts, Function Declaration. Function Definition. Function Calling. In java i cannot able to declare a function .Is it possible to declare a function in Java. For example: [code] import java.io.*; import java.util.*; class Fun_example { // show();//Cannot able to Declare a Function ? … | |
Hello, I am working a program that starts at a direction and goes to the destination and reverse. I have reversed the list and used a if statement for the switching the directions from R (Right) and L (Left) but it doesnt want to work properly. My question is how … | |
Hello , in working on java program And i made 4 classes with main So they want me If the class if ( convener ) they want me to enter the id to dsplay the 1-allocate method 2- drop method 3-print report Dont know how to do it | |
hi everyone, i am very new in java. can anyone help me to solve the following problem: A school conducts a 100 mark exam for its student and grades them as follows: Grade: Grade A: Marks>75 Grade B: 75>Marks>60 Grade C: 60>Marks>50 Grade D: 50>Marks>40 Write ajava program to calculate … | |
how would one convert this to python? var unlockedState = 1000; var lockedState = 2200; var motorPin = 14; var buttonPin = 4 var ledPin = 17 var blynkToken = 'blynk_token_here'; // *** Start code *** // var locked = true //Setup servo var Gpio = require('pigpio').Gpio, motor = new … | |
class Node(object): def __init__(self, data): self.data = data self.nextNode = None class Queue(object): def __init__(self): self.head = None self.tail = None self.size = 0 def enqueue(self,data): self.size += 1 newNode = Node(data) if self.head is None: self.head = self.tail = newNode else: newNode.nextNode = self.head self.head = newNode def dequeue(self): … | |
| |
Hi, Question. How does UserDetailsService catch the username that I have submitted in the custom login page which I have created? TIA :) | |
I have written a code to generate bar codes and saved them to a pdf file . The code executes successfylly but the PDF file does not open saying giving an error whome picture I am uploading. Please see my code and Picture with the error. ![barcodeError.PNG](/attachments/large/4/466b7c7d36a50fd6f88d0a7f157907c8.PNG) public void createPDF(String … | |
Hi java coder here im converting a program into delphi for a project basicaly ive forgotten my whole delphi maths soo can anyone convert this into delphi [CODE](l1 & 0x2 ^ 0xffffffff) == -3;[/CODE] | |
There is a network of tracks (list), tracks are of two types - standard (with one start and one end point) and with a fork ( one start and two end points). These points are called nodes. It is known that each track can only be connected to one other … | |
Hello! This is my first time trying to use Java, and I was trying to learn something with the "Scanner userInput" and ".nextInt()". After I put a bit of code on, it showed me: Exception in thread "main" java.util.InputMismatchException at java.util.Scanner.throwFor(Unknown Source) at java.util.Scanner.next(Unknown Source) at java.util.Scanner.nextInt(Unknown Source) at java.util.Scanner.nextInt(Unknown … | |
Im just learning javascript and want to make a code for a prank on my friend. I want it that when i plug in a certain usb it will pop up a fake virus alert after a couple of seconds, and when you exit off it will pull back up … | |
Create a Java program that will compute for the average (Final Grade) of three (3) input numbers (Prelim, Midterm, Pre-final). The input grade should ONLY accept values ranges from 70 to 100, and will display a message if the input grade/s is invalid. The program should also be capable of … | |
Hello I have a abstract class: import javax.swing.JOptionPane; public abstract class Question { static int nQuestions = 0; static int nCorrect = 0; String question; String correctAnswer; abstract String ask(); void check() { nQuestions++; String answer = ask(); if (answer.equals(correctAnswer)) { JOptionPane.showMessageDialog(null,"Correct!"); nCorrect++; } else { JOptionPane.showMessageDialog(null,"Incorrect. The correctanswer is … | |
Does anybody know a good way to break a screen up into multiple sections for filling out lengthy multi section data? I would like something that I can break data inputs up into sections and move onto the next section when I finish filliing out a section prior, sequentially. What … | |
I have a program that i need to convert from java to c++... i just need help doing it... heres the java: [code] /* Name: Joseph Coleman Class:CSCI 1302 Assignment: Employee + ProductionWorker Academic Honesty: The integrity of students and their written and oral work is a critical component of … | |
I made a JavaFX Discord Server for people who like to talk about JavaFX stuff, or need help with certain projects, I really like to work with java, especially with people who are working with JavaFX (: Here is the discord link: https://discord.gg/yZ3Y3Fd or https://discord.gg/AzFaNU | |
How do I make a cube in javafx that have 6 different textures on each side of the cube? The only way I know how to solve this, is by making 6 imageviews and give them each a specific coordinates that make them look like a cube. Is there a … | |
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 … | |
I am crafting a code generator for something, and I have encountered some things that I do not know yet. Excuse the scambled eggs in this code, but could you please tell me what a job is, and how to get it to run a stored procedure for me? I … |
The End.