Arjun Thakur has Published 1109 Articles

8086 program to determine largest number in an array of n numbers

Arjun Thakur

Arjun Thakur

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

7K+ Views

In this program we will see how to find the largest number in a given array.Problem StatementWrite 8086 Assembly language program to find the largest number in a given array, which is starts from memory offset 501. The size of the series is stored at memory offset 500. Store the ... Read More

Write a C program that does not terminate when Ctrl+C is pressed

Arjun Thakur

Arjun Thakur

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

1K+ Views

In this section we will see how to write a program in C that cannot be terminated by the Ctrl + C key.The Ctrl + C generates the keyboard interrupt, and it stops the execution of the current process. Here when we will press the Ctrl + C key, it ... Read More

IntStream.Builder build() method in Java

Arjun Thakur

Arjun Thakur

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

76 Views

The build() method builds the stream. It transitions the builder to the built state. It returns the built stream. First, add elements to the streamIntStream.Builder builder = IntStream.builder(); builder.add(10); builder.add(25); builder.add(33);Now the stream is in the built phasebuilder.build().forEach(System.out::println);The syntax is as followsIntStream build()The following is an example to implement IntStream.Builder ... Read More

How do I use `SHOW COLUMNS` as a valid data source for a table?

Arjun Thakur

Arjun Thakur

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

60 Views

For this, you can use INFORMATION_SCHEMA.COLUMNS as shown in the following syntax −SELECT *FROM (SELECT *FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME= 'yourTableName') anyAliasName;Let us first create a table:mysql> create table DemoTable (    StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    StudentFirstName varchar(20),    StudentLastName varchar(20),    StudentAge int ); Query OK, ... Read More

MySQL count(*) from multiple tables?

Arjun Thakur

Arjun Thakur

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

11K+ Views

To achieve this for multiple tables, use the UNION ALL.The syntax is as followsselect sum(variableName.aliasName) from    (    select count(*) as yourAliasName from yourTableName1    UNION ALL    select count(*) as yourAliasName from yourTableName2    ) yourVariableName;Let us implement the above syntax. Here, I am using the sample database ... Read More

How to read form data using JSP?

Arjun Thakur

Arjun Thakur

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

2K+ Views

JSP handles requests using getParameter() method to read simple parameters and getInputStream() method to read binary data stream coming from the client.Reading Form Data using JSPJSP handles form data parsing automatically using the following methods depending on the situation −getParameter(): You call request.getParameter() method to get the value of a ... Read More

MongoDB order by two fields sum?

Arjun Thakur

Arjun Thakur

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

371 Views

To order by two fields sum, you can use the aggregate framework. Let us first create a collection with documents> db.orderByTwoFieldsDemo.insertOne({"Value1":10, "Value2":35}); {    "acknowledged" : true,    "insertedId" : ObjectId("5ca285576304881c5ce84baa") } > db.orderByTwoFieldsDemo.insertOne({"Value1":12, "Value2":5}); {    "acknowledged" : true,    "insertedId" : ObjectId("5ca2855f6304881c5ce84bab") } > db.orderByTwoFieldsDemo.insertOne({"Value1":55, "Value2":65}); {   ... Read More

8086 program to transfer a block of 4 bytes by using string instructions

Arjun Thakur

Arjun Thakur

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

654 Views

In this program we will see how to transfer a 4-byte block from one location to another location.Problem StatementWrite 8086 Assembly language program to transfer a four-byte block from one memory section to another memory section. The numbers are stored at memory offset 500 – 503.DiscussionHere we are initially setting ... Read More

How to format number with “.” as thousand separators, and “,” as decimal separator?

Arjun Thakur

Arjun Thakur

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

967 Views

You can use format() function for the separators. It will work in MySQL version greater than or equal to 5.5. We are using the version 8.0.12mysql> select version(); +-----------+ | version() | +-----------+ | 8.0.12 | +-----------+ 1 row in set (0.00 sec)The syntax is as followsSELECT ... Read More

Turn on the general log in MySQL?

Arjun Thakur

Arjun Thakur

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

830 Views

To turn ON the general log, you need to use SET command. Following is the syntax −set global general_log=ON;Let us check the general log status with the help of SHOW command −mysql> SHOW variables like '%general_log%';This will produce the following output −+------------------+---------------------+ | Variable_name | Value ... Read More

Advertisements