35,586 Topics

Member Avatar for
Member Avatar for Mausam_1
Member Avatar for jonsan32

I'm hosting tounaments throughout the year, and have the price increasing each day. Code works, but I'mnot cure which elements to adjust to be able to display multiple prices adjusting simultaneously. I tried changing "rate" to "rate1" etc, but that wasn't enough... So I'm guessing variables within should be adjusted …

Member Avatar for Dani
1
150
Member Avatar for MagnusTheRed90

I need an end user license agreement for code shared amongst my home projects with other developers. The EULA needs to include a "pay to the order of x" clause, and also needs to include the ability for me to utilze the code at multiple companies that I could participate …

Member Avatar for Dani
1
52
Member Avatar for dimitrilc

## Introduction ## In Java 8, `@Repeatable` was introduced and this is the recommended way to create repeating annotations. We still have to create a holder Annotation(*annotation that holds an array of other annotations*), but we no longer have to declare the holder Annotation at the callsite. This tutorial aims …

3
239
Member Avatar for Wis_874

import requests endPoint = 'https://api.mnotify.com/api/template' apiKey = 'YOUR_API_KEY' url = endPoint + '?key=' + apiKey response = requests.get(url) data = response.json();

Member Avatar for rproffitt
0
28
Member Avatar for NALB

How to color table rows on the basis of column 'value' or 'text' in javascript can i do it in script tag to check on each row if the cell value is A color the row as green if it B color it as red ... should i do it …

Member Avatar for rproffitt
0
36
Member Avatar for 変態

I'm having trouble in my assignment Assignment :: TwoLargestElements Complete the following program so that it computes and writes out the two largest elements in the array. It always display "12" on both largest and largest2 import java.io.* ; public class TwoLargest { public static void main ( String[] args …

Member Avatar for rproffitt
0
38
Member Avatar for dimitrilc

## Introduction ## Java 15 introduced Text Blocks. The main reason behind Text Blocks is that programmers can write multiline strings without having to specify escapes for the most common scenarios. ## Goals ## At the end of this tutorial, you would have learned: 1. How to store multiline String …

Member Avatar for JamesCherrill
2
141
Member Avatar for dimitrilc

## Introduction ## Before Java 8, methods had to throw an exception or return `null`, with neither of which approaches were perfect. Optional, OptionalInt, OptionalLong, and OptionalDouble were introduced in Java 8 to represent values that might possibly be `null`. Optionals have two internal states, **empty** or **present**. An Optional …

Member Avatar for JamesCherrill
2
1K
Member Avatar for Wis_874
Member Avatar for Sagar_9

Hi All, Good Day. Is there any sample code in JAVA for generating encrypted block PIN in the similar fashion as the Hardware Security Module Regards, Sagar

Member Avatar for Sagar_9
0
93
Member Avatar for redZERO

Hi guys I can't seem to get a new line in a [CODE]JOptionPane.showMessageDialog(null, " ");[/CODE] statement. I try the /n command, but it still doesn't seem to work. Is there any way I can get a paragraph in a dialog box like this? Thanks.

Member Avatar for Samukelo
0
18K
Member Avatar for Khen Louegie

I'm supposed to make a menu with choices, the choices being different kinds of java syntax. import java.util.*; public class Start { public void menu() { System.out.println("[1] If\n[2] If else\n[3] For loop\n[4] Switch Statement\n[5] One dimension"); System.out.print("Select program: "); } public void backend() { System.out.println("[9] Menu\n[0] Quit"); Scanner q = …

Member Avatar for JamesCherrill
0
185
Member Avatar for dimitrilc

## Introduction ## There are many ways to design secure Java objects. In this tutorial, we are going to learn how to create secure Java objects by understanding **Accessibility**, **Extensibility**, and **Immutability**. ## Goals ## At the end of this tutorial, you would have learned: 1. Understand how and why …

Member Avatar for JamesCherrill
2
148
Member Avatar for Sagar_9

Hi Everyone, Is there a java code to convert SWIFT MT103 message to pacs 008 ISO20022 format? Thank you. Regards, Sagar

Member Avatar for Sagar_9
0
459
Member Avatar for dimitrilc

## Introduction ## In this tutorial, we will focus on how to manage IO permissions to read, write, and delete local files using the `SecurityManager` class. ## Goals ## At the end of this tutorial, you would have learned: 1. What policy files are and how to use them. 2. …

2
267
Member Avatar for Zirely

Hello, I need help to make this code to run please. this is just a part of the code. I have the imports below, but hsa.Console is not imported, I have tried to download de jar files for it but cannot find it. Is there a way I could make …

Member Avatar for rproffitt
0
160
Member Avatar for brodeur

// The "FriedmanRPSgame" class. import java.awt.*; import hsa.Console; public class FriedmanRPSgame { static Console c; // The output console public static void main (String[] args) { c = new Console (); // VARIABLES int rock; int paper; int scissors; // INPUT c.println (" Choose 1 for rock, 2 for paper, …

Member Avatar for Zirely
0
240
Member Avatar for katesfb

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 …

0
48
Member Avatar for jsrankin

Been programming more than half my life and been in industry for over a decade.

Member Avatar for Reverend Jim
0
47
Member Avatar for Tierra

#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 …

Member Avatar for Adnane_2
0
15K
Member Avatar for dimitrilc

## 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. ## …

3
108
Member Avatar for dimitrilc

## 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 …

2
110
Member Avatar for dimitrilc

## 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 …

3
138
Member Avatar for dimitrilc

## 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. ## …

3
206
Member Avatar for dimitrilc

## 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 …

Member Avatar for JamesCherrill
3
439
Member Avatar for mir_sheely

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 ; …

Member Avatar for Andrey_7
0
1K
Member Avatar for Mohamed_167

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 …

Member Avatar for JamesCherrill
0
490
Member Avatar for dimitrilc

## 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 …

2
346
Member Avatar for Ricky_4

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 …

Member Avatar for jwenting
1
111

The End.