Articles on Trending Technologies

Technical articles with clear explanations and examples

How to delete a key from a map in Golang?

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 02-Sep-2023 63K+ Views

To delete a key from a map, we can use Go's built-in delete() function. It should be noted that when we delete a key from a map, its value will also be deleted as the key-value pair is like a single entity when it comes to maps in Go.SyntaxThe syntax of the delete function is shown below.delete(map, key)Once we call the function in the above format, then the key from the map will be deleted.Now, let's use the above function in Go code and understand how it works.Example 1Consider the code shown belowpackage main import (    "fmt" ) ...

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

How to remove all rows having NA in R?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 02-Sep-2023 77K+ Views

To remove all rows having NA, we can use na.omit() function. For Example, if we have a data frame called df that contains some NA values then we can remove all rows that contains at least one NA by using the command na.omit(df).That means if we have more than one column in the data frame then rows that contains even one NA will be removed. Check out the below Examples to understand how it works.Example 1Consider the below data frame −x1

Read More

Difference Between RISC and CISC

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 02-Sep-2023 107K+ Views

RISC and CISC are two different types of computer architectures that are used to design the microprocessors that are found in computers. The fundamental difference between RISC and CISC is that RISC (Reduced Instruction Set Computer) includes simple instructions and takes one cycle, while the CISC (Complex Instruction Set Computer) includes complex instructions and takes multiple cycles. Read this tutorial to find out more about RISC and CISC and how these two architectures are different from each other. What is RISC? In the RISC architecture, the instruction set of the computer system is simplified to reduce the execution time. RISC ...

Read More

Difference between Open Loop and Closed Loop Control System

Manish Kumar Saini
Manish Kumar Saini
Updated on 02-Sep-2023 130K+ Views

A control system is defined as the mechanism or a system that provides the desired response or output by controlling the input and processing system. These days, control systems are being implementing in every smart devices and systems such as traffic lights system, washing machine, rocket launching systems, electrical power system, etc. Depending on the feedback path present in the system, the control systems can be classified into following two types, viz − Open Loop Control System Closed Loop Control System In this article, we will discuss all the major differences between open loop and closed loop control ...

Read More

Starting and Stopping MySQL Server

AmitDiwan
AmitDiwan
Updated on 02-Sep-2023 85K+ Views

Let us understand how MySQL server can be started and stopped on Linux and Windows −Linux – Start and Stop ServerOn Linux, the start and stop can be done from the command line as shown below −/etc/init.d/mysqld start /etc/init.d/mysqld stop/etc/init.d/mysqld restartLinux – Service CommandsSome Linux types offer service command as well −service mysqld startservice mysqld stop service mysqld restart(or)service mysql startservice mysql stopservice mysql restart Windows – Start and Stop ServerLet us understand how it can be done on Windows −Open 'Run' Window by using Win key + RType 'services.msc'Now search for MySQL service based on the version that ...

Read More

How to create a table with date column?

George John
George John
Updated on 02-Sep-2023 105K+ Views

To create a table with only date column, you can use DATE type. Let us first create a table −mysql> create table DemoTable    (    StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    StudentName varchar(20),    StudentAdmissionDate DATE    ); Query OK, 0 rows affected (0.47 sec)Insert records in the table using INSERT command −mysql> insert into DemoTable(StudentName, StudentAdmissionDate) values('Chris', now()); Query OK, 1 row affected, 1 warning (0.12 sec) mysql> insert into DemoTable(StudentName, StudentAdmissionDate) values('Robert', curdate()); Query OK, 1 row affected (0.20 sec) mysql> insert into DemoTable(StudentName, StudentAdmissionDate) values('David', '2019-05-21'); Query OK, 1 row affected (0.16 sec)Display all ...

Read More

Sort 1 to N by swapping adjacent elements

Prabhdeep Singh
Prabhdeep Singh
Updated on 01-Sep-2023 589 Views

An array is a linear data structure that stores the elements and a sorted array contains all the elements in increasing order. Sorting an array by swapping the adjacent elements means we can swap the adjacent elements any number of times and we have to sort the array. We will be given two array’s first array is the array to be sorted and another array is a Boolean array that represents whether the current element is swappable or not. If the given array is of the length N then all the elements present will be from 1 to N. ...

Read More

Numbers having difference with digit sum more than s

Prabhdeep Singh
Prabhdeep Singh
Updated on 01-Sep-2023 377 Views

The digit sum for a given number is the sum of all the digits present in the given number. We will be given a number n and s and we have to find all the numbers which are in the range 1 to n and have the difference between the number and the sum of its digits greater than s. We will implement two approaches with the code and the discussion on time and space complexity. Input N = 15, S = 5 Output 6 Explanation For all the numbers in the range 0 to 9, the difference ...

Read More

Back-Face Detection Method

Prabhdeep Singh
Prabhdeep Singh
Updated on 01-Sep-2023 8K+ Views

Programming languages are used for many purposes such as making websites, developing mobile applications, etc. Graphic designing is one of the things that we can do by using the programming language. While graphic designing, we can face a problem where we have to project a 3-D object on the 2-D plane and due to which one dimension will be reduced or one face will be hidden. In this problem, we have to detect that hidden face. Back-Face detection is also known as the name Plane Equation method, and it is a method for the object space methods in which objects ...

Read More
Showing 33951–33960 of 61,297 articles
Advertisements