Articles on Trending Technologies

Technical articles with clear explanations and examples

Program for Fibonacci numbers in PL/SQL

Sunidhi Bansal
Sunidhi Bansal
Updated on 24-Dec-2024 13K+ Views

Given ‘n’ numbers the task is to generate the Fibonacci numbers in PL/SQL starting from 0 to n, where the Fibonacci series of integers is in the form 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 Where integers 0 (1st place) and 1 (2nd place) will have a fixed place after that, the previous two digits will be added to get the integer of the next place as shown below. 0+1=1 (3rd place) 1+1=2 (4th place) 2+1=3 (5th place) and So on. Formula Sequence F(n) ...

Read More

Show MySQL host via SQL Command?

George John
George John
Updated on 24-Dec-2024 31K+ Views

To display MySQL host via SQL command, use the system variable hostname. Query 1 The following is the query to display the host − mysql > select @@hostname; Output Here is the output − +-----------------+ | @@hostname | +-----------------+ | DESKTOP-QN2RB3H | +-----------------+ 1 row in set (0.00 sec) Query 2 Or you can use "show variables" command to show MySQL host via SQL command. show variables where Variable_name like '%host%'; Output The following is the output − +-------------------------------+-----------------+ | Variable_name | Value | +-------------------------------+-----------------+ | host_cache_size | 279 | | hostname  | DESKTOP-QN2RB3H | | performance_schema_hosts_size | -1 | | report_host | | +-------------------------------+-----------------+ 4 rows in set (0.07 sec)

Read More

Difference between hierarchical and network database model in SQL

Himanshu shriv
Himanshu shriv
Updated on 24-Dec-2024 12K+ Views

Hierarchical Data Model In the Hierarchical data model, the relationship between the table and data is defined in parent-child structure. In this structure, data is arranged in the form of a tree structure. This model supports one-to-one and one-to-many relationships. Network Model The Network model arranges data in a graph structure. In this model, each parent can have multiple children, and children can also have multiple parents. This model supports many-to-many relationships as well. Comparison Table ...

Read More

Java Program to create a vertical ProgressBar

Alshifa Hasnain
Alshifa Hasnain
Updated on 24-Dec-2024 697 Views

In this article, we will learn about creating a vertical progress bar using JProgressBar.VERTICAL in Java. Progress bars are essential for tracking task completion in GUI applications, and a vertical orientation can add a unique touch to your design. What is a Progress Bar in Java Swing? A progress bar is a visual component in Java Swing that indicates the progress of a task. It can be horizontal or vertical, depending on the application's design requirements. Java Swing provides the JProgressBar class to create and manage progress bars efficiently. Features of a Vertical Progress Bar The following are features of ...

Read More

How to add a new row to JTable with insertRow() in Java Swing

Alshifa Hasnain
Alshifa Hasnain
Updated on 24-Dec-2024 8K+ Views

The JTable component in Java Swing is widely used for displaying and managing tabular data. Adding a new row dynamically to a JTable can enhance user interactivity, especially in applications that require real-time data manipulation. In this article we will tell you a step-by-step procedure, to use the insertRow() method to add a new row to a JTable, complete with a sample implementation and an algorithm. What is JTable in Java Swing? JTable is a Swing component used for displaying and editing tabular data. It is highly customizable and supports features like sorting, selection, and dynamic data manipulation, making it ...

Read More

How to Set Up a VPN on Samsung Galaxy

Vince Brandon
Vince Brandon
Updated on 24-Dec-2024 9K+ Views

These days, the risks to online privacy and security are numerous. Considering we use our phones for most of our daily interactions and transactions, getting an extra layer of protection is worth it. Without added security, it only takes a single lapse for criminals to access the logins of your financial apps or prominent social media accounts. They could get into your phone and download your camera roll images for ransom. When you're on public WiFi, the risks increase. Cybercriminals exploit vulnerabilities in wireless hotspots. For all these dilemmas, only a VPN can provide a comprehensive solution. It keeps your ...

Read More

How to Insert Multiple Elements at Given Positions in a Vector?

C++
AYUSH MISHRA
AYUSH MISHRA
Updated on 24-Dec-2024 6K+ Views

What is a Vector in C++?A vector is a dynamic array as the size of the vector changes during the program's execution. If we insert more elements in the vector it expands its size and if we remove elements from the vector it shrinks in size. A vector is part of the Standard Template Library (STL). Problem DescriptionIn this problem, we are given a vector and have to insert an element at a certain position. In this article, we are going to learn how to insert multiple positions in a vector in C++ using different approaches. Below are some examples to ...

Read More

Left justify output in Java

Revathi Satya Kondra
Revathi Satya Kondra
Updated on 24-Dec-2024 4K+ Views

In Java, the left-justifying output means aligning text or data to the left within a specified width, with extra spaces on the right to fill the remaining space. It is commonly used when displaying tabular data or formatting strings. Left justification can be obtained using methods such as String.format() or printf(), which allow you to specify the width of the output field and the alignment of the content. Including a minus sign after the %, makes it left justified. Note − By default, output is right justified To display the Left justify output in Java is quite easy. Let us learn the following methods: ...

Read More

Printing Multi-Dimensional arrays in Java

Ankith Reddy
Ankith Reddy
Updated on 23-Dec-2024 436 Views

A multi-dimensional array can be easily printed using java.util.Arrays.deepToString() in Java. This method converts the multi-dimensional array to string and prints the array contents enclosed in square brackets. What Are Multi-Dimensional Arrays? Multi-dimensional arrays allow you to store data in a matrix-like structure, providing a way to represent tables, grids, or more complex hierarchical data. The most common type is a two-dimensional array, but Java supports arrays with more than two dimensions. int[][] array = new int[rows][columns]; Using Naive Approach The Arrays.deepToString(arr) method from the Arrays class ...

Read More

Difference between correlated and non-collreated subqueries in SQL

Himanshu shriv
Himanshu shriv
Updated on 23-Dec-2024 14K+ Views

SQL query is used to fetch data from the database. In some of the scenario you may need some perquisite data to call subsequent SQL query to fetch data from a table so instead of writing two seperate query we can write SQL query within the query. Therefore subQuery is a way to combine or join them in single query. Subqurey can have two types −Correlated subquery - In correlated subquery, inner query is dependent on the outer query. Outer query needs to be executed before inner queryNon-Correlated subquery - In non-correlated query inner query does not dependent on the outer ...

Read More
Showing 31531–31540 of 61,297 articles
Advertisements