32,199 Topics
| |
Hi, I am new to this forum and also new to android programming using Android Studio and am stuck on a coding problem so i am not sure this is the right forum but any help is much appreciated: I am trying to get some some code via the processing-core … | |
Been programming more than half my life and been in industry for over a decade. | |
#include <iostream> using std::cin; using std::cout; using std::endl; using std::ios; #include <iomanip> using std::fixed; using std::setw; using std::setprecision; using std::showpoint; int main() { const int PEOPLE = 5; const int PRODUCTS = 6; int sales[5][6]={{1},{2},{3},{4}}; double value; double totalSales; double productSales[ PRODUCTS ] = { 0.0 }; int salesPerson; int … | |
## Introduction ## Java 14 was released with a new type of expression called Switch Expression. Its syntax is similar to that of the Switch Statement, with a few differences. In this tutorial, we will walk through concepts related to the Switch Expression and learn how to use it. ## … | |
## Introduction ## In this tutorial, we are going to learn how to create a Java module by hand. ## Goals ## At the end of this tutorial, you would have learned: 1. What a `module-info.java` file is. 2. How to compile a module. 3. Describing a module. ## Prerequisite … | |
## Introduction ## This tutorial introduces the `CyclicBarrier` class and teaches you how to use it. ## Goals ## At the end of this tutorial, you would have learned: 1. How to use `CyclicBarrier` to synchronize tasks across multiple threads. ## Prerequisite Knowledge ## 1. Intermediate Java. 2. Basic knowledge … | |
## Introduction ## `partitioningBy()` collects a `Stream` into a `Map`. In this tutorial, we will compare the two different `partitioningBy` methods and learn how to use them. ## Goals ## At the end of this tutorial, you would have learned: 1. What `Collectors.partitioningBy` does and how to use it. ## … | |
## Introduction ## Based on the 2020 Java Ecosystem survey from Jetbrains, 75% of Java developers are still using JDK 8. JDK 11 introduces `HttpClient`, which replaces the legacy `HttpURLConnection` API. For this tutorial, we will build a `HttpClient` that consumes the free Cat Facts API. ## Goals ## At … | |
I am in trouble. I need to convert a signed 16-bit Hexadecimal no to short. Say I have a string s = "f2f7" Which is a negative number and lies in the range -32768 to 32767 so is the range of type short. But when I do short num ; … | |
I am attaching my complete code. I am not able to get why doesn't my KeyListener work. None of the KeyListener events are fires on pressing the keyboard. Please have a look and tell me the flaws in my code package swing; //First Class (separated class) import javax.swing.JFrame; public class … | |
## Introduction ## This tutorial teaches you how to create a Spring Boot application that provides RESTful API Endpoints. These endpoints are best consumed by other applications or for integrating with a SPA (Single Page Application) frontend such as Angular. For the purpose of this tutorial, we will create a … | |
Hello I am currently learning Android app development, and using Android Studio 4.1.3. I have noticed that when I run any project, even like a simple "Hello World", the Gradle build takes more than 10 minutes to complete. I have a laptop which is a Core i5 7th Gen, with … | |
``` if (credits >= 30) { pnlSuccess.setVisible(true); pnlpass.setVisible(false); busdocRef.update("onbus", FieldValue.arrayUnion(txtRFID.getText())); busdocRef.update("passengers", FieldValue.increment(1)); docRef.update("travelling", Data.busid); docRef.update("slat", slat); docRef.update("slon", slon); txtRFID.setText(""); Thread.sleep(2000); pnlSuccess.setVisible(false); pnlpass.setVisible(true); txtRFID.requestFocus(); } ``` This si the code But the pass pnl do not hide and the success panel do not show up | |
I've been writing one/two projects but I not using them. I'm not sure in which scenario I should use them. Is this consider bad programming style? | |
/*******************************************************************************************************************| | Assignment 2 | | Program is meant to extract a record from each file and create a new file for each record | | Programs creates a new directory and uses the directory for each new file | | | | written by Raymond Chappel | | | … | |
I work in IT as a UNIX Systems engineer and I am studying towards a BSc IT degree. | |
HI!! How can I create an automatic numerical progression from 0 to 500,000 in html? The code I was given is this: <p><span style="font-family: Calibri, sans-serif;"><span style="text-shadow: rgba(255, 255, 255, 0.8) 0px 3px 2px;"><sup>437</sup></span></span></p> how can i make the code progressive and automatic every three minutes? The progression I have … | |
Task is to create a basic calculator using double value and sentinel. I cannot figure out how to get the array to avoid counting the sentinel. To me, it looks like I've put in safeguards such as only looping if the value is >=0, but it still counts, lists, and … | |
How to find the first non repeated character of a given String? | |
how to create 2 array matrix in dart programming | |
Please am new here and I need you guys help am trying to save a fingerprint template into my database (Sql server) but is not working, this is my code Dim fingerprint as Memory stream = new MemoryStream Template.serializ(fingerprint) fingerprint.position=0 Dim be as BinaryReader = new BinaryReader (fingerprint) Dim bytes() … | |
size = 10 for i in range(size) : for j in range(size) : if(i == j or size - j == i + 1) : print("* ", end = "") elif(i == size/2 - 1 or j == size/2 -1 or i == size/2 or j == size/2): print(" ", … | |
how can i rerun the program using 'y' and 'n'?? package com.company; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner reader = new Scanner(System.in); while (true) { System.out.print("Enter a number: "); int num = reader.nextInt(); if (num > 0) { String number = (num % … | |
I want to explore more for my topics at any costs | |
Write a Java code using Factory Method design pattern to solve the following relationof Products, Factory, DistributorandClients.-The distributorsellsproduct including:Laptop,PC monitorand TV.-Each product has its own descriptions detail: getDetail() | |
I want to know how to create a software | |
Create a Client/Server using DatagramSocket and DatagramPacket Programming and using DiffieHellman (1024) as encryption algorithm. | |
<html> <head> <title> Exercice 6</title> </head> <body> <h1>Hello</h1> <script language= "java script"> var N=prompt("Choisissez entre: 1-addition et 2-multiplication",""); if (N==1) { document.write("<table border="2" align="center" rules="alls">"); for (var i = 0; i<=9 ; i++) { document.write("<tr>"); for (var j=0; j<=9; i++) { var s=i+j; document.write("<td>"+s+"</td>"); if (j%3==0) { document.write("</tr>"); } } … | |
Not an ArrayList. An Array. For some reason, my teacher (or rather, the lesson plan we are using) requires that we make a program that takes an array of integers and removes all the zeroes. So far I have: [CODE] public void remove(int index) { for(int i = index; i … |
The End.