14 results for: recursive
Hashmap: Overflow Lists
In this short series of articles we will go to see how it is possible to create the Hashmap data structure in C. In the implementation we're going to use the doubly concatenated lists as auxiliary data structures. Let's look at a possible implementation. Header file Let's first have a look to what…
Category : C language 18-06-2020 by Alessio Mungelli
The most popular Array Sorting Algorithms In PHP
There are many ways to sort an array in PHP, the easiest being to use the sort() function built into PHP. This sort function is quick but has it's limitations, especially when sorting things like dates as PHP usually guesses which value is higher than the other and can produce…
Category : Php 25-08-2020 by Luigi Nori
How to clone objects in JavaScript
Primitive and referenced values (objects) behave very differently when we want to make a copy of them. Primitive values Let's suppose a variable name that has a primitive value associated with it (number, string, boolean, undefined and null). If we make a copy of this variable name to another variable name2, any…
Category : Javascript 11-05-2021 by Luigi Nori
Popular DNS Attacks and how to prevent them
DNS services are essential for web browsing. However, it is one of the most vulnerable to attacks. This guide will detail the most dangerous DNS attacks and some actions that will protect the network infrastructure. One of the reasons why DNS services have some susceptibility to attack is the UDP transport…
Category : Security 20-07-2020 by Silvia Mazzetta
Linux For Dummies: Permissions
In the previous articles I made a short introduction to the Unix world and in the following article I have dealt with the basic commands for the file system management. Today we are going to talk about permissions. We are going to take Ubuntu as an example, but in the other distros the working mechanism…
Category : Operating systems 14-03-2020 by Alessio Mungelli
Java Sorting Algorithm: Selection Sort
Today we are going to analyze a sorting algorithm that is not very efficient but often used in various fields. We are talking abou the Selection Sort. Let's have a look. Intuition The idea behind it is to divide the array to sort into two sub-arrays: the first that contains the sorted data…
Category : Java 31-03-2023 by Alessio Mungelli
Java Sorting Algorithm: Bubble Sort
Programming, the need to order the collections of data or objects that must then be manipulated often arises. Ordering a list can be useful in cases where you have to do very quick searches. We will see later on how to maintain an ordered list is useful to carry out dichotomous…
Category : Java 15-12-2019 by Alessio Mungelli
Java Sorting Algorithms: Quick Sort
Welcome back to this overview about the Java world! Today, we are going to talk about a renowned sorting algorithm: the Quick Sort. The Quick Sort is not very suitable for educational purposes because its implementation may not be trivial, but at the performance level it offers some advantages that are not indifferent, unlike…
Category : Java 14-12-2019 by Alessio Mungelli
Implementing Quicksort algorithm in Javascript
We've been wanting to write an article about sorting algorithms for some time now because sometimes we forget how useful they can be when we want to optimize our code. So yesterday we played with the quicksort algorithm in Javascript (one of the most efficient when you have to order arrays).…
Category : Javascript 16-08-2019 by Janeth Kent
ES2019 JavaScript and its new features
ECMAScript 2019 has finished and rolled out new exciting features for developers. The proposals which have been accepted and reached stage 4 by the TC39 committee would be included in the specification of that year and the others - are postponed to the next year. What that’s mentioned above is a…
Category : Javascript 18-02-2019 by Janeth Kent
Useful Terminal Commands Every Web Developer Should Know About
The command line interface (CLI), or Terminal is considered by many to be the Holy Grail of computer management. At one time the CLI was the only way to accomplish anything on a computer; then, the CLI gave way to the graphical user interface (GUI) as the popularity of PCs…
Category : Operating systems 22-06-2018 by Janeth Kent
Syncronize Files Between Servers With RSYNC
Synchronize Files With rsync Synchronizing files from one server to another is quite awesome. You can use it for backups, for keeping web servers in sync, and much more. It's fast and it doesn't take up as much bandwidth as normal copying would. And the best thing is, it can be…
Category : Networking 03-02-2014 by Janeth Kent
PHP Recursive Backup of MySql Database
This script can be used to make backup of your MySql database, you can use the script in conjunction with cronjobs $user = 'myuser'; $passwd = 'mypass'; $host = 'myhost'; $db = 'mydb'; // Delete the tables if they exists? $drop = true; // Tables that will be created $tables = false; // Compression algorythm that we will use $compression…
Category : Databases 24-06-2013 by Janeth Kent
PHP Recursive Backup of Directories
This script can be used to make backup of entire directories and subdirectories in our servers, you can use the script in conjunction with cronjobs //specify the source dir and target dir $src = $_SERVER.'/test/backup/dir1'; $dst = $_SERVER.'/test/backup/dir2'; function recurse_copy($src,$dst) { $dir = opendir($src); @mkdir($dst); while(false !== ( $file = readdir($dir)) ) { if…
Category : Programming 24-06-2013 by Janeth Kent