Found 448 Articles for Programming Scripts

Why to Learn Perl?

Mohd Mohtashim
Updated on 28-Nov-2019 06:47:48

139 Views

Perl is a programming language developed by Larry Wall, specially designed for text processing. It stands for Practical Extraction and Report Language. It runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX Following great features make this language necessary for the Programmers to learn −Perl is a stable, cross-platform programming language.Though Perl is not officially an acronym few people used it as Practical Extraction and Report Language.It is used for mission-critical projects in the public and private sectors.Perl is an Open Source software, licensed under its Artistic License, or the GNU General ... Read More

How to create a process in Linux?

Arnab Chakraborty
Updated on 31-Jan-2020 10:54:58

11K+ Views

A program loaded into memory and executing is called a process. In simple, a process is a program in execution.Let’s inspect how to create a process in LinuxA new process can be created by the fork() system call. The new process consists of a copy of the address space of the original process. fork() creates new process from existing process. Existing process is called the parent process and the process is created newly is called child process. The function is called from parent process. Both the parent and the child processes continue execution at the instruction after the fork(), the ... Read More

Process Representation in Linux System

Arnab Chakraborty
Updated on 11-Oct-2019 13:06:54

809 Views

Linux can manage the processes in the system, each process is represented by a task_struct C data structure. It is found in the include file in the kernel source-code directory. The task vector is an array of pointers to every task_struct data structure in the system. As well as the normal type of process, Linux supports real time processes. All the required information i.e; the state of the process, scheduling and memory-management information, list of open files, and pointers to the process’s parent and a list of its children and siblings are contained in this structure.A process who creates ... Read More

Explain how to remove Leading Zeroes from a String in Java

Venkata Sai
Updated on 29-Jun-2020 14:48:21

2K+ Views

Whenever you read an integer value into a String, you can remove leading zeroes of it using StringBuffer class, using regular expressions or, by converting the given String to character array.Converting to character arrayFollowing Java program reads an integer value from the user into a String and removes the leading zeroes from it by converting the given String into Character array.Exampleimport java.util.Scanner; public class LeadingZeroes {    public static String removeLeadingZeroes(String num){       int i=0;       char charArray[] = num.toCharArray();       for( ; i

TypedArray.values() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 13:33:13

34 Views

The values() function of the TypedArray returns an iterator object which holds the values of the typed array. The next() method returns the next element in the iterator object.SyntaxIts Syntax is as followstypedArray.values()Example Live Demo    JavaScript Example           var typedArray = new Int32Array([11, 5, 13, 4, 15, 3, 17, 2, 19, 8 ]);       var iterator = typedArray.values();       document.write("Contents of the typed array: ");       for(i=0; i

TypedArray.sort() function in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 13:33:45

56 Views

The sort() method of the Typed Array object arranges the elements of the array in ascending order and returns it.SyntaxIts Syntax is as followsarrayBuffer.sort()Example Live Demo    JavaScript Array every Method           var typedArray = new Int32Array([11, 5, 13, 4, 15, 3, 17, 2, 19, 8 ]);       document.write("Contents of the typed array: "+typedArray);       document.write("");       var resultantArray = typedArray.sort();       document.write("Resultant Array: "+resultantArray);     OutputContents of the typed array: 11,5,13,4,15,3,17,2,19,8 Resultant Array: 2,3,4,5,8,11,13,15,17,19

TypedArray.fill() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 13:09:24

57 Views

The fill() function of the TypedArray object replaces all the required/desired elements of the array with specifies value (fixed). This function accepts three numbers one representing a fixed value and the other two represents the start and end indexes of the portion of the elements to be replaced (end value is optional).SyntaxIts Syntax is as followsint32View.fill(464, 3);Example Live Demo    JavaScript Array every Method           var int32View = new Int32Array([64, 89, 65, 21, 14, 66, 87, 55]);       document.write("Contents of the typed array: "+int32View);       document.write("");       result ... Read More

TypedArray.every() function in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 13:10:46

24 Views

The every() function of TypedArray accepts a string value representing the name of a function, tests whether all the elements in an array passes the test implemented by the provided function.SyntaxIts Syntax is as followstypedArray.every(function_name)Example Live Demo    JavaScript Array every Method           var int32View = new Int32Array([64, 89, 65, 21, 14, 66, 87, 55 ]);       document.write("Contents of the typed array: "+int32View);       document.write("");       function testResult(element, index, array) {          var ele = element>35          return ele;       ... Read More

TypedArray.entries() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 13:14:17

40 Views

The entries() function of TypedArray returns an iterator of the corresponding TypedArray object and using this, you can retrieve the key-value pairs of it. Where it returns the index of the array and the element in that particular index.SyntaxIts Syntax is as followstypedArray.entries()Example Live Demo    JavaScript Example           var int32View = new Int32Array([21, 64, 89, 65, 33, 66, 87, 55]);       document.write("Contents of the typed array: "+int32View);       document.write("");       var it = int32View.entries();       for(i=0; i

TypedArray.copyWithin() function in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 13:14:56

34 Views

The copyWithin() function of the TypedArray object copies the contents of this TypedArray within itself. This method accepts three numbers where first number represents the index of the array at which the copying of elements should be started and, the next two numbers represents start and end elements of the array from which the data should be copied (taken).SyntaxIts Syntax is as followsobj.copyWithin(3, 1, 3);Example Live Demo    JavaScript Example           var int32View = new Int32Array([21, 64, 89, 65, 33, 66, 87, 55 ]);       document.write("Contents of the typed array: "+int32View);   ... Read More

Advertisements