Ankith Reddy has Published 996 Articles

Create a vertical slider with custom min, max, and initial value in Java

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:26

152 Views

While creating vertical slider, we can set custom values as well. Let us take three integer variable and set the int values for min, max as well as the initial value of the slider −int val = 50; int min = 0; int max = 100;Set it to the slider ... Read More

HTML canvas stroke() Method

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:26

2K+ Views

The stroke() method of the HTML canvas is used to draw the path. This path is drawn with moveTo() and lineTo() method. The element allows you to draw graphics on a web page using JavaScript. Every canvas has two elements that describes the height and width of the canvas ... Read More

How to get last 12 digits from a string in MySQL?

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:26

1K+ Views

You can use RIGHT() function from MySQL to get the last 12 digits from a string. Let us first create a table −mysql> create table DemoTable    (    Number varchar(200)    ); Query OK, 0 rows affected (0.59 sec)Insert records in the table using insert command −mysql> insert into ... Read More

8085 program to divide two 16 bit numbers

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:26

3K+ Views

Here we will see how to divide two 16 bit numbers using 8085.Problem StatementWrite 8085 Assembly language program to divide two 16-bit numbers.Discussion8085 has no division operation. To perform division, we have to use repetitive subtraction. To perform 16-bit division, we have to do the same but for the register ... Read More

How to set orientation and split components along x-axis in Java?

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:26

158 Views

Let us first create components to split. Here. We have two labels −JComponent one = new JLabel("Label One"); one.setBorder(BorderFactory.createLineBorder(Color.red)); JComponent two = new JLabel("Label Two"); two.setBorder(BorderFactory.createLineBorder(Color.blue));Now, set orientation and split along x-axis with HORIZONTAL_SPLIT −JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); split.setLeftComponent(one); split.setRightComponent(two);The following is an example to set orientation and split ... Read More

How to search a word by capital or small letter in MySQL?

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:26

504 Views

You can use BINARY along with the LIKE operator. Let us first create a table −mysql> create table DemoTable    (    Header text    ); Query OK, 0 rows affected (1.09 sec)Insert records in the table using insert command −mysql> insert into DemoTable values('Programming tutorials on MySQL'); Query OK, ... Read More

8086 program to determine product of corresponding elements of two array elements

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:26

449 Views

Here we will see how to find product of two array elements and store result into memory.Problem StatementWrite 8086 Assembly language program to find product of two arrays stored at 501 onwards and 601 onwards. The size of array is stored at location 500. After calculating product store result at ... Read More

8085 program to perform AND operation in nibbles of 8 bit number

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:26

587 Views

Here we will see how to AND two nibbles of an 8-bit number.Problem Statement:Write 8085 Assembly language program to perform AND operation of two nibbles of an 8-bit number. Number is stored at F050, we will store result at F051.DiscussionTo get the nibbles, we have to mask at first. So ... Read More

Java Program to select all cells in a table

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:26

453 Views

To select all cells in a table in Java Swing, you need to use the selectAll() method. Let’s say the following are our table rows and columns −String[][] rec = {    { "001", "Shirts", "40" },    { "002", "Trousers", "250" },    { "003", "Jeans", "25" },   ... Read More

How to understand if a bigint is signed or unsigned in MySQL?

Ankith Reddy

Ankith Reddy

Updated on 30-Jul-2019 22:30:26

1K+ Views

If you do not specify unsigned, then bigint will be signed. If you specify an unsigned, then bigint will be unsigned.Let us first create a table −mysql> create table DemoTable    (    Number bigint, // signed    Number2 bigint unsigned // unsigned    ); Query OK, 0 rows affected ... Read More

Advertisements