Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
What is the importance of the ProcessHandle interface in Java 9?
ProcessHandle interface introduced in Java 9. It allows us to perform actions and check the state of a process that relates. This interface provides the process’s native process ID (pid), start time, accumulated CPU time, arguments, command, user, parent process, and descendants.ProcessHandle interface allows us to perform the following actions.It returns a ProcessHandle.Info containing further information about a processThe Pid of a processIf it is aliveRetrieve a snapshot of the direct children of a processRetrieve a snapshot of all descents of a processRetrieve a snapshot of all currently running processesAllow the process to be destroyedIt returns a CompletableFuture with a ProcessHandle for when the ...
Read MoreJava program to find the permutation when the values n and r are given
Permutation refers a number of ways in which set members can be arranged or ordered in some fashion. The formula of permutation of arranging k elements out of n elements is −nPk = n! / (n - k)!Algorithm1. Define values for n and r. 2. Calculate factorial of n and (n-r). 3. Divide factorial(n) by factorial(n-r). 4. Display result as a permutation.Exampleimport java.util.Scanner; public class Permutation { static int factorial(int n) { int f; for(f = 1; n > 1; n--){ ...
Read MoreJava program to display English alphabets
Following is an example to display English alphabets A to Z. Example public class DisplayingAtoZ { public static void main(String args[]){ char ch; System.out.println("List of alphabets are ::"); for(ch = 'A'; ch <= 'Z'; ch++ ){ System.out.print(ch+" "); } } } Output List of alphabets are :: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Read MoreJava program to calculate student grades
The following program accepts average from the user, calculates the grade and prints it.Examplepublic class CalculateStudentGrades { public static void main(String args[]) { Scanner sc = new Scanner(System.in); System.out.println("Enter average of your marks (less than 100)::"); int average = sc.nextInt(); char grade; if(average>=80){ grade = 'A'; }else if(average>=60 && average=40 && average
Read MoreJava program to find the area of a circle
Area of a circle is the product of the square of its radius, and the value of PI, Therefore, to calculate the area of a rectangleGet the radius of the circle.Calculate the square of the radius.Calculate the product of the value of PI and the value of the square of the radius.Print the result.Exampleimport java.util.Scanner; public class AreaOfCircle { public static void main(String args[]){ int radius; double area; Scanner sc = new Scanner(System.in); System.out.println("Enter the radius of the circle ::"); radius = sc.nextInt(); ...
Read MoreWhat is Http/2 Client in Java 9?
Http/2 Client API introduced in Java 9. It has more performance improvements over Http/1.1 and also supports server-side push events. This makes the website efficient and faster to browse. Http/2 Client is an incubator module named jdk.incubator.httpclient, which means that all features are still not finalized, and new changes may come in future versions of java. It exports jdk.incubator.http package that contains all public APIs.To use Http/2 Client, we need to use the incubator module, we simply pass the httpclient module into JShell using the "–add-modules" command as belowC:\>jshell -v --add-modules jdk.incubator.httpclient | Welcome to JShell -- Version 9.0.4 | For an introduction type: /help introExamplejshell> import jdk.incubator.http.*; jshell> HttpClient httpClient ...
Read MorePort number for SAP HANA Cockpit offline administration
Following perquisites should be met for accessing SAP HANA cockpit for offline administration −To access this, you need credentials of the operating system user (adm user) that was created when the system was installed.Communication port 1129: As this Port 1129 is required for communication with the SAP Host Agent in a standalone browser via HTTPS.HANA Cockpit is configured with HTTP accessWeb browser supports the SAPUI5 library sap.m.
Read MoreSoft and hard stop of HANA system using HANA Studio
To stop a HANA system, right-click the system you want to stop and choose Configuration and Monitoring → Stop System…Following options are available when you stop a system −Soft − The system is stopped after all running statements have finished or the specified timeout is reached.Hard − The system is stopped immediately. Open transactions are aborted and rolled back.
Read MoreStop and start a particular database service in SAP HANA
Yes, you can start/stop a particular service of HANA system. To stop a service, go to Administration editor → Services tab. Right-click the service and choose the required option:
Read MoreAdding a service to a tenant database
To scale out a tenant database and/or distribute it across multiple hosts, you can add further server components, for example, an additional index server or a separate XS server. You add a service to a tenant database using the ALTER DATABASE SQL command.You do this from the system database using the following command −ALTER DATABASE ADD Following perquisites should be met to perform this task −You are logged on to the system database.You have the system privilege DATABASE ADMIN.
Read More