SORTING

Sorting is a process to arranged the data in some type of order.
This is order may increasing, decreasing and numerical value or dictionary
in case of alphanumerical values.
Bubble Sort.
Bubble sort is very simple and easy to implement the sorting technique
Algorithm
Bubblesort(a,n)

Here a is a linear array of n element Step 1. Repeat step 2 and 3 for i= 1 to n-1. 2. Set j=1 [ Intilize counter ]. 3. Repeat Step While(j>n-1)

\$). if a[i] > a[i+1] then
interchange  a[i] and  a[i+1]
End if structure.
\$). j= j+1.
End of inner loop.
End of step 1 outer loop.
4.Exit

def bubbleSort(a):

n = len(a) for i in range(n): for j in range(0, n - i - 1): if a[j] > a[j + 1]: temp=a[j] a[j] = a[j+1] a[j+1]=temp # Or we can a[j], a[j + 1] = a[j + 1], a[j] # before sorted array. a = [4, 3, 5, 1, 2, 11, 20,45,22,63] # function for bubble sort. bubbleSort(a) print("After Sorted array is:") # b indicate the size of the array. b = len(a) for i in range(b): print(a[i],end=" ")

Introduction to Java Security

Introduction to Java Security The Java security architecture includes a large set of application programming interfaces (APIs), tools, and implementations of commonly-used security algorithms, mechanisms, and protocols. The Java security APIs span a wide range of areas. Cryptographic and public key infrastructure (PKI) interfaces provide the underlying basis for developing secure applications. Interfaces for performing authentication and access control enable applications to guard against unauthorized access to protected resources. The JDK includes a number of providers that implement a core set of security services. It also allows for additional custom providers to be installed. This enables developers to extend the platform with new security mechanisms. The JDK is divided into modules. Modules that contain security APIs include the following:

Module Description java.base Defines the foundational APIs of Java SE;  contained packages include java.securityjavax.cryptojavax.net.ssl,  and…

SQL Injection

Overview A SQL injection attack consists of insertion or "injection" of a SQL query via the input data from the client to the application. A successful SQL injection exploit can read sensitive data from the database, modify database data (Insert/Update/Delete), execute administration operations on the database (such as shutdown the DBMS), recover the content of a given file present on the DBMS file system and in some cases issue commands to the operating system. SQL injection attacks are a type of injection attack, in which SQL commands are injected into data-plane input in order to effect the execution of predefined SQL commands. Threat ModelingSQL injection attacks allow attackers to spoof identity, tamper with existing data, cause repudiation issues such as voiding transactions or changing balances, allow the complete disclosure of all data on the system, destroy the data or make it otherwise unavailable, and become administrators of the database server.SQL Injection is ve…