Anvi Jain

Anvi Jain

427 Articles Published

Articles by Anvi Jain

Page 19 of 43

Disable a list item in a Bootstrap list group

Anvi Jain
Anvi Jain
Updated on 11-Mar-2026 1K+ Views

Use the .disabled class in Bootstrap to disable a list item in a list group in Bootstrap.You can try to run the following code to disable a list item −Example           Bootstrap Example                                          Beverages                       Gatorade             Coca Cola             Pepsi             Sting                    

Read More

Bootstrap well-lg class

Anvi Jain
Anvi Jain
Updated on 11-Mar-2026 212 Views

Change the size of well using the optional classes such as, well-lg or well-lg. These classes are used in conjunction with .well class.You can try to run the following code to implement well-lg class in Bootstrap −Example           Bootstrap Example                                 This has more space!       This has less space!    

Read More

Generate a random array of integers in Java

Anvi Jain
Anvi Jain
Updated on 11-Mar-2026 40K+ Views

In order to generate random array of integers in Java, we use the nextInt() method of the java.util.Random class. This returns the next random integer value from this random number generator sequence.Declaration − The java.util.Random.nextInt() method is declared as follows −public int nextInt()Let us see a program to generate a random array of integers in Java −Exampleimport java.util.Random; public class Example {    public static void main(String[] args) {       Random rd = new Random(); // creating Random object       int[] arr = new int[5];       for (int i = 0; i

Read More

Concept of Direct Memory Access (DMA)

Anvi Jain
Anvi Jain
Updated on 05-Nov-2024 4K+ Views

The microcomputer system basically consists of three blocksThe microprocessorThe memories of microprocessor like EPROM and RAMThe I/O ports by which they are connected.The possible data transfers are indicated below.Between the memory and microprocessor data transfer occurs by using the LDA and STA instructions.Between microprocessor and I/O ports also data transfer occurs by the help of two instructions IN and OUT.Through DMA data transfer, data is transferred between the Input Output ports and the memory.Fig: The figure shows possible ways of data transfers in a microcomputer system.For performing the data transfer either between the microprocessor and memory or between I/O ports ...

Read More

Java program to get text from JTextPane and display in Console

Anvi Jain
Anvi Jain
Updated on 23-Oct-2024 929 Views

In this article, we will learn how to get text from a JTextPane in Java and display it in the console. We'll use the getText() method to retrieve the text and show it in the console. Additionally, we’ll apply simple text styling like italics and color using SimpleAttributeSet to demonstrate how to manage styled text in a GUI. Steps to get text from JTextPane Following are the steps to get text from JTextPane and display it in the Console using Java − First, we will start by creating a JFrame to serve as the main window of ...

Read More

Java program to set an icon for JOptionPane

Anvi Jain
Anvi Jain
Updated on 20-Sep-2024 3K+ Views

In this program, we will learn how to set a custom icon in a JOptionPane using Java's Swing framework. A JOptionPane allows displaying dialog boxes for different purposes such as messages, inputs, or confirmations. In this example, we will create a dialog box with a custom image icon displayed alongside some text. This can be particularly useful for creating visually appealing user interfaces. Problem Statement Write a Java program to set an icon for JOptionPane. Below is the demonstration of the same − Output Steps to set an icon for JOptionPane Following are the steps to set an ...

Read More

8085 program to multiply two 8 bit numbers

Anvi Jain
Anvi Jain
Updated on 26-Oct-2023 36K+ Views

In this program we will see how to multiply two 8-bit numbers using 8085 microprocessor.Problem StatementWrite 8085 Assembly language program to multiply two 8-bit numbers stored in memory location and store the 16-bit results into the memory.DiscussionThe 8085 has no multiplication operation. To get the result of multiplication, we should use the repetitive addition method.After multiplying two 8-bit numbers it may generate 1-byte or 2-byte numbers, so we are using two registers to hold the result.We are saving the data at location 8000H and 8001H. The result is storing at location 8050H and 8051H.InputAddressData......8000DC8001AC......Flow DiagramProgramAddressHEX CodesLabelsMnemonicsCommentsF00021, 00, 80LXI H, 8000HLoad ...

Read More

How to get the datatype of MySQL table columns?

Anvi Jain
Anvi Jain
Updated on 02-Sep-2023 48K+ Views

You can get the MySQL table columns data type with the help of "information_schema.columns".The syntax is as follows −SELECT DATA_TYPE from INFORMATION_SCHEMA.COLUMNS where table_schema = 'yourDatabaseName' and table_name = 'yourTableName'To understand the above syntax, let us first create a table −mysql> create table DataTypeDemo −> (    −> Id int,    −> Address varchar(200),    −> Money decimal(10, 4) −> ); Query OK, 0 rows affected (0.60 sec)Apply the above syntax to get the MySQL columns data type. The query is as follows −mysql> select data_type from information_schema.columns where table_schema = 'business' and able_name = 'DataTypeDemo';The following is the output ...

Read More

ORDERBY word in MySQL?

Anvi Jain
Anvi Jain
Updated on 03-Jul-2020 179 Views

To order by word in MySQL, you need to use ORDER BY FIELD(). Let us first create a table −mysql> create table DemoTable (    StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    StudentFirstName varchar(20),    StudentFavouriteSubject varchar(100) ); Query OK, 0 rows affected (0.52 sec)Insert some records in the table using insert command −mysql> insert into DemoTable(StudentFirstName, StudentFavouriteSubject) values('Larry', 'Java'); Query OK, 1 row affected (0.12 sec) mysql> insert into DemoTable(StudentFirstName, StudentFavouriteSubject) values('Sam', 'C'); Query OK, 1 row affected (0.11 sec) mysql> insert into DemoTable(StudentFirstName, StudentFavouriteSubject) values('Bob', 'MongoDB'); Query OK, 1 row affected (0.17 sec) mysql> ...

Read More

How can I send mail from an iPhone application?

Anvi Jain
Anvi Jain
Updated on 30-Jun-2020 271 Views

To send an email from our application we'll need to use URL Schemes and some action on event of which the email will be sent. We can not actually send email from the application, unless it is an mailing application and we use MessageUI framework of iOS, but we can open some email app from our application with prefilled email and subject.We'll see both the ways of doing this.Let's see how we can open the MAIL app of iOS with an example.Create a project and on its first view controlleradd a button and change it's text to open "open e-mail", ...

Read More
Showing 181–190 of 427 articles
« Prev 1 17 18 19 20 21 43 Next »
Advertisements