Articles on Trending Technologies

Technical articles with clear explanations and examples

Difference between UAV and RPV

Md. Sajid
Md. Sajid
Updated on 04-Apr-2023 5K+ Views

Remote-controlled vehicles are often used for tasks such as surveying land or inspecting pipelines. They can also be used for search-and-rescue missions or to deliver supplies to people in need. Unmanned aerial vehicles, on the other hand, are typically used for military purposes. Unmanned aerial vehicles (UAVs) and remotely piloted vehicles (RPVs) may seem like they're one and the same, but there are some key differences between the two. It's important to know the difference for a few reasons: first, if you're looking to purchase one of these vehicles, you'll want to make sure you buy the right one for ...

Read More

How to escape any special character in Python regular expression?

Md Waqar Tabish
Md Waqar Tabish
Updated on 04-Apr-2023 3K+ Views

Regex, often known as regexp, is a potent tool for finding and manipulating text strings, especially when processing text files. Regex may easily replace many hundred lines of computer code with only one line. All scripting languages, including Perl, Python, PHP, JavaScript, general-purpose programming languages like Java, and even word processors like Word, support Regex for text searching. Regex may be challenging to learn because of its complicated syntax, but it is time well spent. Special Characters Text processing becomes more challenging when special characters are included because context must be carefully considered. You must think about what you see, ...

Read More

How does del operator work on list in Python?

Pranav Indukuri
Pranav Indukuri
Updated on 04-Apr-2023 939 Views

Lists are one of the four most commonly used data structures provided by Python. A list is a data structure in python that is mutable and has an ordered sequence of elements. Following is a list of integer values. lis= [1, 2, 3, 4, 5] print(lis) If you execute the above snippet, it produces the following output. [1, 2, 3, 4, 5] In this article, we will learn how a del operator works on a list in python. They are various scenarios where we use the del operator. The del operator The del keyword is mostly used in ...

Read More

How to Get a List of Current Open Processes Java?

Mr. Satyabrata
Mr. Satyabrata
Updated on 04-Apr-2023 2K+ Views

It is essential for the user to know about the processes that are running in their system, be it foreground or background. To do so in windows we have a task manager but internally it uses a program called tasklist. Tasklist aside from giving us the currently running processes, it also gives us details like process id, session name, session and memory usage of each process. In this article we will see how we can get a list of currently open processes by using Java programming language. Algorithm Step 1 − Create a process that executes the tasklist.exe Step 2 ...

Read More

How to draw an Image with drawImage() in HTML5?

Yaswanth Varma
Yaswanth Varma
Updated on 04-Apr-2023 752 Views

The "canvas" element merely serves as a container for visuals; drawing the graphics requires the use of a scripting language. It is a procedural, low-level model without an internal scene that updates a bitmap. The drawImage() function is what we employ to draw an image onto a canvas. This feature transfers a video, canvas, or picture to the canvas. Syntax context.drawImage(img, x, y, swidth, sheight, sx, sy, width, height); Where, Img − Determines whether to utilise a video, canvas, or image. Sx − The starting x coordinate for clipping. Sy − The y point at which clipping should ...

Read More

Golang program to implement returning pointer from a function

Akhil Sharma
Akhil Sharma
Updated on 04-Apr-2023 755 Views

In this article, we will write Golang programs to implement returning pointer from a function. A pointer stores the address of another variable and the address is depicted using & operator. Algorithm Step 1 − Create a package main and declare fmt(format package) package in the program where main produces executable codes and fmt helps in formatting input and Output. Step 2 − Create a function create_pointer that returns a pointer to the int Step 3 − Set the value of x in the function and return the variable back to the function Step 4 − Create a main ...

Read More

Golang program to parse time

Akhil Sharma
Akhil Sharma
Updated on 04-Apr-2023 2K+ Views

In golang we can use various internal time function to parse time. Time is parsed using parse and ParseInLocation method. Syntax time.Parse() This function belongs to time package. It is used to parse the string into time.Time value and it takes two inputs: the layout and the time string which is to be parsed. time.ParselnLocation() This function is a part of the time package. It is used to parse the string into time.Time value along with a specified location. It takes 3 arguments: the location, layout string and the time string. time.Format() This function is present in ...

Read More

Golang program to implement select statement

Akhil Sharma
Akhil Sharma
Updated on 04-Apr-2023 443 Views

The Golang Select statement is similar to the switch statement, the switch statement selects the Output based on the cases but here the Output is selected based on which communication occurs fast in the channels. Syntax func make ([] type, size, capacity) The make function in go language is used to create an array/map it accepts the type of variable to be created, its size and capacity as arguments. time.Sleep() This function belongs to the time package. Here, the word sleep depicts the meaning of the function which says that it will block the execution of goroutine for ...

Read More

Golang program to show promoted methods

Akhil Sharma
Akhil Sharma
Updated on 04-Apr-2023 559 Views

In golang, Promoted methods are the methods created under those structs which are embedded inside another struct, now the struct in which it is embedded can access its methods and fields. In this article we are going to explain how to show promoted methods using various structs like Rectangle and Square, Vehicle and car. Algorithm Step 1 − Create a package main and declare fmt(format package) package in the program where main produces executable codes and fmt helps in formatting input and Output. Step 2 − Create a Rectangle struct with two fields width and height of type float ...

Read More

Golang program to depict use of promoted fields

Akhil Sharma
Akhil Sharma
Updated on 04-Apr-2023 530 Views

In golang, promoted fields are the structs that are embedded inside another structs and their fields can also be accessed the structs in which they are embedded. In this article we are going to understand three different approaches to depict use of promoted filed with and without the help of pointers. Using Pointers In this illustration, we will make use of pointers to show the promoted fields. The field names will be set with the help of pointers and information will be printed using dot notation. Algorithm Step 1 − Create a package main and declare fmt(format package) package ...

Read More
Showing 39041–39050 of 61,297 articles
Advertisements