CLOUD COMPUTING: MISUNDERSTOOD! WHAT IS IT?

Cloud computing is something we have often heard around us in recent years. Though some of us have detailed information about it, it is a concept that many of us do not have much knowledge. What is cloud computing?

Cloud computing, in other words, Online Information Distribution; common name given to services that provide common information sharing between computing devices. Actually this is not a product, it is a service. In the past, companies, users with their own private networks in communication and sharing technology developed with the portable devices that everyone is now with the Internet at the tip of everyone’s finger. As a result, information sharing on the internet became a very natural concept. Cloud computing used to predict that data would have to be used in the online cloud, much more than the computer’s hard drives. But now cloud computing is able to offer more.

Cloud computing has many services that offer to us. However, both technically less known and introducing people to these services with different perceptions have caused many misunderstandings. We can sort them in certain materials.

Cloud Computing will store your data on the internet: Many people avoid cloud computing by considering the importance of their privacy because the idea is that their data is shared on the Internet. In fact, the backup service of cloud computing is storing our data in the company’s databases that provide this service. This allows you to access your data anywhere you have an internet connection within your competence.

Cloud Computing is only for backing up: it is one of the biggest known misinformation. In fact, this is a result of cloud computing promotions. I guess cloud computing is made up of redundancy. In fact cloud computing services are described by 3 models.

1- Infrastructure Service (IaaS)

In this most basic cloud service model, cloud providers provide servers, physical or virtual machines. Virtual machines are operated by the hypervisor as guests, such as Xen or KVM.

2- Platform Service (PaaS)

In the platform service (PaaS) model, cloud providers often distribute an information processing platform that includes the operating system, programming language execution environment, databases, and web servers.

Application developers can develop and run their own software solutions on a cloud platform without the need to manage the hardware and software layers at the expense of purchasing, without difficulty.

3- Software Service (SaaS)

In this model, cloud providers load and operate the cloud application software, and cloud users access the cloud service sites. Cloud users do not manage the cloud infrastructure and platform that the application is running on. In this way, the cloud user of the application does not need to be installed and run on his own computer.

As we can understand from these models, cloud computing provides many services. The main goal is to ensure accessibility of information from every corner of the world, to accelerate the flow of work and to eliminate the infrastructure burden required for many companies to benefit from these services.

Cloud Computing saves money only: The other most common misconception is that companies can save money when they are cloud computing. Of course, companies use their resources more efficiently with certain automations and save money, but this is not the only result of cloud computing. Apart from that, there are many advantages. When you meet face-to-face with your customers, consider that you present your meeting papers through the cloud. Think of the time and effort you will save by accelerating your workflow process as your system becomes available to every point within the company as your dependency on a single point will diminish. In addition to these, saving money actually remains on the second planet.

Private cloud has to be in the company: Many companies understand the creation of private cloud space in the data center of the company when it is called private cloud. However, in the common cloud area, private cloud space is allocated to the companies. They can get rid of special costs like maintenance and management. Both maintenance costs and time are up to you and you are getting a more productive work.

Data Servers are more secure than Cloud Computing: Another misconception is that cloud computing is more insecure than the data servers of the company. In fact, when we compare the cloud computing is safer. Since your data is distributed to thousands of harddisks in the company’s data centers, both your information will not be collected at one point and you will not lose any data in case of harddisk corruption. In fact, if you experience such a loss in your data servers, you can incur huge costs to save your data. Or creating such a data server is another big mess. You will have to use raid technology to provide data security from the data center. But raid technology is never 100% reliable. If you are experiencing data loss, you may have to spend thousands and tens of thousands of dollars to recover data on your hard drive.

Cloud Computing is expensive: Apart from those who know that cloud computing saves money, there are lots of people who think that these services are expensive. In fact, if you use it as a data backup, it will be cheaper than the data server that you will create your own company. At the same time, you do not have extra costs and responsibilities, such as maintaining your data servers in cloud computing. If you want to create your own data center you need to get a strong server. You will pay extra for the security of this server. For data security, you need to integrate software and technologies into this server. However, your IT specialist will have to spend extra time in order to keep this server running smoothly. However, you will spend much more on cloud computing with tens of thousands of dollars for this data center, and you will not get many responsibilities from the data server.

Cloud Computing is for large companies: In fact, cloud computing services are useful for everyone from big business to normal user. There are services that everyone can use and accelerate the workflow process. As a normal person can use data backup to get anywhere access to data, and small-scale companies can make web-based software run in the cloud, reducing the dependency on a computer. This can be done from anywhere. There are many examples such as this.

How To Create A Shortcut On Ubuntu

A shortcut can be created to two place on Ubuntu OS; the first to the desktop, and the second to the launcher. If you want to create a shortcut to your desktop, create the following file under the ~/Desktop directory. If you want to create a shortcut to the launcher, create the following file under /usr/share/applications/.

[Desktop Entry]
Type=Application
Icon=<path to icon>
Name=<name to appear in menu>
Comment=<tooltip>
Categories=<menu categories>
Exec=<path to executable>
Path=<set working directory if necessary>
StartupNotify=true
Terminal=false

Installing Linux, Apache, MySQL and PHP (LAMP) On Ubuntu

Installing the Default LAMP Package on Ubuntu

If you want to install the LAMP in the easiest way, you need to write the following codes in the terminal.

sudo apt-get update
sudo apt-get install lamp-server^

Do not forget to type the character “^” otherwise it will fail.

Installing Linux, Apache, MySQL, PHP on Ubuntu

If you want to load all separately, you are in the right place. This is a little more painful, but it gives you a better use and the ability to load whatever you want.

Installing Apache

sudo apt-get update
sudo apt-get install apache2

That’s it. Apache installed. To check, enter http: // localhost in your web browser and it is loaded without any problems if you see “It Works!”. If you are installing on your vps server, you must type in your ip address of your VPS from the browser.

Installing MySQL

sudo apt-get install mysql-server

It will ask you to enter the MySQL user’s root password.

Installing PHP

sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql

That’s all.

Installing PHP Modules

Type the following code in the terminal to list the php modules.

apt-cache search php5-

If you want to install one of them, you can install it into the terminal by typing the following code.

sudo apt-get modül ismi
sudo apt-get php5-cli

Project Euler – Problem 5 Solution

Problem: 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?
* https://projecteuler.net/problem=5

Php;

<?php

$number = 20;
$isFound = false;
$checkList = [11, 13, 14, 16, 17, 18, 19, 20];

while (!$isFound) {
    $divided = true;
    foreach ($checkList as $check) {
        if ($number % $check != 0) {
            $divided = false;
            break;
        }
    }
    if ($divided) {
        $isFound = true;
        echo "Number is $number";
        break;
    } else {
        $number+=20;
    }
}

Javascript;

'use strict';

var number = 20;
var isFound = false;
var checkList = [11, 13, 14, 16, 17, 18, 19, 20];

while (!isFound) {
    var divided = true;
    for (let check of checkList) {
        if (number % check != 0) {
            divided = false;
            break;
        }
    }
    if (divided) {
        isFound = true;
        console.log("Number is " + number);
        break;
    } else {
        number+=20;
    }
}

Project Euler – Problem 4 Solution

Problem: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers.
* https://projecteuler.net/problem=4

Php;

<?php

/**
 * Checks number if palindrome or not!
 *
 * @param $number
 * @return bool
 */
function check_if_palindrome($number)
{
    $is_palindrome = true;
    $array  = array_map('intval', str_split($number));
    $array2  = array_map('intval', str_split($number));
    $array2_count = count($array2) - 1;
    foreach ($array as $index => $item) {
        if ($item !== $array2[$array2_count - $index]) {
            $is_palindrome = false;
        }
    }
    return $is_palindrome;
}

$value = 0;
for ($i = 100; $i < 1000; $i++) {
    for ($k = 100; $k < 1000; $k++) {
        $result = $k * $i;
        if (check_if_palindrome($result) && $result > $value) {
            $value = $result;
        }
    }
}
echo $value;

Javascript;

'use strict';

/**
 * Checks number if palindrome or not!
 * @param number
 */
function check_if_palindrome(number) {
    var is_palindrome = true,
        array = (""+number).split(""),
        array2 = (""+number).split(""),
        array2_count = array2.length - 1;

    for (var i = 0; i < array2_count; i++) {
        if (array[i] !== array2[array2_count - i]) {
            is_palindrome = false;
        }
    }

    return is_palindrome;
}

var value = 0;
for (var i = 100; i < 1000; i++) {
    for (var k = 100; k < 1000; k++) {
        var result = k * i;
        if (check_if_palindrome(result) && result > value) {
            value = result;
        }
    }
}

console.log(value);

Project Euler – Problem 3 Solution

Problem: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ?
* https://projecteuler.net/problem=3

Php;

<?php

class ProblemSolver
{
    private $original_number;
    private $number;
    private $current_prime_number = 2;
    private $prime_numbers = [];
    private $largest_prime_number;

    /**
     * ProblemSolver constructor.
     * @param int $number
     */
    public function __construct(int $number)
    {
        $this->number = $this->original_number = $number;
    }

    /**
     * Finds the next prime number
     */
    private function find_next_prime_number()
    {
        if ($this->current_prime_number == 2) {
            $this->current_prime_number++;
        } else {
            $this->current_prime_number += 2;
        }
        $can_divide = false;
        $number = 2;
        while ($number < $this->current_prime_number) {
            if ($this->current_prime_number % $number == 0) {
                $can_divide = true;
            }
            $number++;
        }
        if ($can_divide) {
            $this->find_next_prime_number();
        }
    }

    /**
     * Finds the prime factors and largest prime factor of given number
     */
    public function find_prime_factors()
    {
        while ($this->number > 0) {
            if ($this->number == 1) {
                $this->largest_prime_number = $this->current_prime_number;
                break;
            } else {
                if ($this->number % $this->current_prime_number == 0) {
                    $this->prime_numbers[] = $this->current_prime_number;
                    $this->number /= $this->current_prime_number;
                } else {
                    $this->find_next_prime_number();
                }
            }
        }
        echo $this->largest_prime_number;
    }
}

$solver = new ProblemSolver(600851475143);
$solver->find_prime_factors();

Javascript;

'use strict';

var number = 600851475143, prime_number = 2;

function find_next_prime_number() {
    var can_divide = false;
    var n = 2;
    if (prime_number === 2) {
        prime_number++;
    } else {
        prime_number += 2;
    }
    while (n < prime_number) {
        if (prime_number % n === 0) {
            can_divide = true;
        }
        n++;
    }
    if (can_divide) {
        find_next_prime_number();
    }
}

while (number > 1) {
    if (number % prime_number === 0) {
        number /= prime_number;
    } else {
        find_next_prime_number();
    }
}
console.log(prime_number);