teleren/devto huggingface dataset:
How to start an Apache 2 server or service in Linux?
Tags: resource
Published: 2021-07-01 00:00:00

---
  title: How to start an Apache 2 server or service in Linux?
  published: true
  tags: Resource
  date: Thu Jul 01 2021 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/start-apache2-server-service-linux
  cover_image: https://melvingeorge.me/_next/static/images/main-dceb9f37885406be6fb50f927a70589b.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/start-apache2-server-service-linux)
  
To start an Apache 2 server or service, we can use the `systemctl` command-line utility followed by the `start apache2.service` command in Linux.

```bash
# Starts apache 2 service
sudo systemctl start apache2.service
```

### What is `systemctl`?

- The `systemctl` is a command-line utility that is used to control and manage the `systemd` services.
- It is widely used with web server services like Apache, Nginx, etc.

### Feel free to share if you found this useful 😃.

---
#100DaysOfCodeChallenge - Crop Management Information System - Day 8
Tags: 100daysofcode, flutter, dart, programming
Published: 2021-06-30 23:55:06

##Recap
On [Day 7](https://dev.to/curtlycritchlow/100daysofcodechallenge-crop-management-information-system-day-7-2m1b) we made an attempt to implement the camera functionality but the method `await _picker.getImage(source: ImageSource.camera);` threw an error that I was unable to troubleshoot. The following error was thrown.
```
Exception has occurred.
PlatformException (PlatformException(no_available_camera, No cameras available for taking pictures., null, null))
```


##Overview

In this post we'll discuss the solution to the error from Day 7.

After searching online for a solution and much frustration I found the solution in this [github issue](https://github.com/flutter/flutter/issues/62669). The solution that worked for me was to change `targetSdkVersion 30` to `targetSdkVersion 29`. The property can be found in the `android/app/build.gradle` file.

## Wrap Up

As a developer, getting stuck on an error is inevitable. Fortunately, you are likely not the first person to get stuck on that error. A diligent google search e.g. github issues or stackoverflow  will usually reveal a solution to the problem. 

## Connect with me

Thank you for reading my post. Feel free to subscribe below to join me on the #100DaysOfCodeChallenge or connect with me on [LinkedIn](https://www.linkedin.com/in/curtlycritchlow/) and [Twitter](https://twitter.com/CritchlowCurtly). You can also [buy me a book](https://www.buymeacoffee.com/curtlycritchlow) to show your support.
Sorting an Array Alphabetically using the sort Method
Tags: programming, devops, beginners, javascript
Published: 2021-06-30 23:40:58

* The `sort` method sorts the elements of an array according to the callback function.

* For example:
```
function ascendingOrder(arr) {
  return arr.sort(function(a, b) {
    return a - b;
  });
}
ascendingOrder([1, 5, 2, 3, 4]); // This would return the value [1, 2, 3, 4, 5].
```
```
function reverseAlpha(arr) {
  return arr.sort(function(a, b) {
    return a === b ? 0 : a < b ? 1 : -1;
  });
}
reverseAlpha(['l', 'h', 'z', 'b', 's']);
// This would return the value ['z', 's', 'l', 'h', 'b'].
```
* Let's use the `sort` method in the `alphabeticalOrder` function to sort the elements of `arr` in alphabetical order.
```
function alphabeticalOrder(arr) {
  // Only change code below this line

  // Only change code above this line
}
console.log(alphabeticalOrder(["a", "d", "c", "a", "z", "g"]));
```
* Answer:
```
function alphabeticalOrder(arr) {
let sortArr = arr.sort();
return sortArr;

}
console.log(alphabeticalOrder(["a", "d", "c", "a", "z", "g"]));
// alphabeticalOrder(["a", "d", "c", "a", "z", "g"]) would return [ 'a', 'a', 'c', 'd', 'g', 'z' ]
```
* OR:
```
function alphabeticalOrder(arr) {
  return arr.sort((a, b) => {
    return a === b ? 0 : a > b ? 1 : -1; // <-- a less than b
 
 });
}
console.log(alphabeticalOrder(["a", "d", "c", "a", "z", "g"]));
```


Larson, Quincy, editor. “Sort an Array Alphabetically using the sort Method.” Https://Www.freecodecamp.org/, Class Central, 2014, twitter.com/ossia.
Slow downloading on corporate proxies? Try aria2!
Tags: linux, mac, download, proxies
Published: 2021-06-30 22:52:55

### Disclosure

This is for if you have troubles downloading large files while on a company network, or want to download files faster using Linux or Mac. 

### Steps

1). Download `aria2`
  - Through brew: `brew install aria2`
  - Other systems: `https://aria2.github.io/`
  - Ubuntu Example:
![Downloading with Ubuntu](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zlq4s0h03vlkg3x4no8n.png)
 

2). `cd` to your downloads directory.

3). Run the following command: 

```sh
aria2c --file-allocation=none -c -x 10 -s 10 $URL
```

4). Replace $URL with the download URL of the file you are trying to pull.

- On the corporate network, downloading the docker for mac was taking upwards of an hour. 
- Downloading with `aria2c`:

![Quick Download](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tzngeqf4on0zdzr451wj.png)
 
The download was much quicker due to multi-threaded downloads! :smile:

### Shoutouts

Credit to [Aria2](https://aria2.github.io/) for an awesome downloading tool!

Credit to [hmj6jmh on StackOverflow](https://askubuntu.com/users/299539/hmj6jmh) for [the solution they posted to "How to make wget faster or multithreading?"](https://askubuntu.com/questions/214018/how-to-make-wget-faster-or-multithreading) which helped me solve my frustration downloading while on corporate networks.
Fix your data, not your code
Tags: codequality
Published: 2021-06-30 17:54:05


The exciting moment of starting an app from scratch is to know that you can do everything right. You'll have your CRUD operations very well thought out and ensuring that any database request is done properly, with the right data and at the right time.

Well at least, it's how I like to think about it and even though that should be fairly common, the world changes and data that was correct at the time might now be incorrect. Also it's not every day that you start an app from scratch.

Data quality plays an important role in the functioning of your application, furthermore if you have a high volume of end users using your app daily.

_This blog post will quickly go through an use case that a team had to deal with recently where the decision was to fix the data and not the code_

___

##The scenario##

*It's 2015*
+ Two status that can be assigned to an end user: ``Approved`` or ``Disapproved``
   + ``Approved``: use the app with no restrictions
   + ``Disapproved``: use the app with no restrictions but you are not part of the user listings
+ The status and when it changed is stored in a specific table in our database

*It's 2021*
+ ``Disapproved`` will now have a few restrictions in usage and continue the "invisibility mode"
+ Quickly implement the needed changes 

**But the question arises**
> What about the users that were disapproved in the past 6 years?

___

##The options

1. Make new restrictions only available for users that are disapproved starting from a certain date
1. Go through each user and understand whom should keep the disapproved status, now with the new set of restrictions

**Pros of #1**
+ Fast & easy

**Cons of #1**
+ ``Disapproved`` now has two different meanings: one before the date it goes live and another after
+ That meaning is hidden in the code (don't get me started on documentation...)
+ Random logic deciding if users have the new set of restrictions or not




**Pros of #2**
+ Data will mirror the current state of affairs
+ It can help uncover other issues that lead to a better solution. 
eg: having more than ``Approved`` and ``Disapproved``

**Cons of #2**
+ Who the hell wants to analyse a spreadsheet row by row?
+ Slower than #1
+ It might come to a place where hard decisions must be made. 
eg: choosing between continue user x disapproved or not and therefore ruin the user experience

___

##The final decision

In the end we went ahead with second option. While it took a while to review all the users and make the decision which ones should be under the new changes, we do believe that in the long run not having random decisions in the code (if statements checking and comparing dates, just because) will allows us to have a **better product and happier developers.**

___

_This is my first post at dev.to, which has been a long time coming._
Hoping this can help someone out there :)
JVM execution dilemma - Interpret or compile?
Published: 2021-06-30 22:23:32

###### I am always posting provoking post on my Linkedin, and I have decided to replicate those here. [Let's socialize!](https://www.linkedin.com/in/alexsandro-souza-dev)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7x1sfhwapydm6wog8vmn.jpeg)

The JVM execution engine has a big dilemma: Interpret or compile the code?

The interpreter interprets the bytecode and executes the instructions one-by-one. Hence, it can interpret one bytecode line quickly, but executing the interpreted result is a slower task.

JIT compiler takes more time for compiling than for the interpreter to interpret. For a code segment that executes just once, it is better to interpret it instead of compiling, but when one method is called multiple times, each time a new interpretation and a slower execution are required.

To solve the dilemma, JIT compiler internally checks the frequency of each method call and decides to compile each only when the selected method has occurred more than a certain level of times.

This is known as adaptive compiling and it was brought by the introduction of Oracle Hotspot VMs.

Now you know what to answer when asked if Java is compiled or interpreted - it is both!
Use Higher-Order Functions map, filter, or reduce to Solve a Complex Problem
Tags: javascript, devops, programming, beginners
Published: 2021-06-30 22:06:41

* Now that you have worked and looked through the posts using higher-order functions like `map()`, `filter()`, and `reduce()`, you now get to apply them to solve a more complex challenge.

* Complete the code for the `squareList` function using any combination of `map()`, `filter()`, and `reduce()`. The function should return a new array containing the squares of only the positive integers (decimal numbers are not integers) when an array of real numbers is passed to it. An example of an array of real numbers is `[-3, 4.8, 5, 3, -3.2]`.
```
const squareList = arr => {
  // Only change code below this line
  return arr;
  // Only change code above this line
};

const squaredIntegers = squareList([-3, 4.8, 5, 3, -3.2]);
console.log(squaredIntegers);
```
* Hint: 
1. You will need to filter() the `squareList` for positive integers (decimals are not integers) and you will need to `map() `the values from your filter() function to a variable.
* Answer:
```
const squareList = arr => {
  let positiveIntegersSquared = arr.filter(num => {
    if (Number.isInteger(num) && num > 0) {
      return num;
    } 
  })
    .map(num => {
      return num * num
  });

  return positiveIntegersSquared;
};

const squaredIntegers = squareList([-3, 4.8, 5, 3, -3.2]);
console.log(squaredIntegers);
```
* squareList([-3, 4.8, 5, 3, -3.2]) should return [25, 9].
Simple Dev Improvements
Tags: html, css, javascript, codepen
Published: 2021-06-30 22:02:59

We've been making several changes to [Simple Dev](https://simpledev.io/) recently. Our overarching goal with these changes is to make the site better for beginners (although intermediate developers may still benefit from these changes as well). 

All of these changes are still ongoing, so you can expect to see more in the future. Read on to learn more.

## Downloadable exercises

The biggest change is that we've created downloadable exercises to go with our tutorials. This will make it easier to practice your coding skills with our tutorials. We've created exercises for most sections so far and will finish creating exercises for the other sections soon.

## More Pens

We've added Pens from CodePen to tutorials that were missing them before, including our JavaScript and Markdown tutorials.

## More screenshots

We've added more screenshots to different tutorials on the site. We especially focused on adding relevant screenshots to our VS Code tutorials.

## More info

We've been adding more info to our tutorials to make them more beginner-friendly, especially our JavaScript tutorials. Now you can learn how to write the code and have a better understanding of what it means.

## VS Code Tips

We've started including VS Code Tips directly inside our HTML, CSS, and other tutorials where possible. This makes it easier to learn how to quickly generate tags, properties, values and more and become a more productive developer. (We still have a separate VS Code Tips section as well for tutorials on productivity and customization.)

---

## Minor changes

### Rearranged Path

The Path has been rearranged. We've divided the first set of tutorials into Text Editors 1, Web 1, Text Editors 2, and Web 2. Since we're focused on teaching VS Code now, the Atom sections have been moved to the bottom as bonus sections. Bootstrap also comes before JavaScript now.

### Projects

We created some simple projects to cap off our HTML, CSS, and Bootstrap sections. We hope to add more projects in the future.

---

## Feedback

We hope you enjoy these changes we've made to Simple Dev, especially those of you just starting out on your coding journey. If you have any feedback, leave a comment below!
Lagoon Community Hours
Tags: community
Published: 2021-06-30 21:39:10

We’re excited to announce that Lagoon community hours are starting up again! Join us once a month starting this Thursday, Jul 1, 2021 at 5PM Eastern to talk all things Lagoon with our product owner, community manager, and members of the Lagoon team.

We’ll be meeting on Zoom: [https://amazee.zoom.us/j/93518971102?pwd=UUp1RGJ6NDUyNGVxdUJNUE13czFHZz09]

Here’s the planned schedule for this year - any changes or updates will be made on this post, as well as announced on our Twitter ([@uselagoon](https://twitter.com/uselagoon)). 

~~Jul 1,  2021 5 PM Eastern~~
~~Jul 29, 2021 5 PM Eastern~~
~~Aug 26, 2021 5 PM Eastern~~
~~Sep 23, 2021 5 PM Eastern~~
~~Oct 21, 2021 4 PM Eastern~~
~~Nov 18, 2021 3 PM Eastern~~
Dec 16, 2021 3 PM Eastern

Use this link to find the event time in your timezone. https://dateful.com/eventlink/2693259984

We hope that you’ll join us and learn more about Lagoon. We want to hear from you!
Day 399 : Sunshower
Tags: hiphop, code, coding, lifelongdev
Published: 2021-06-30 21:37:42

_liner notes_:
- Professional : Another pretty productive day. Merged some PRs that I got reviewed. Updated some more code snippets and documentation. Not bad at all.

- Personal : Went through tracks for the radio show this week. Also updated the front page of https://untilit.works so that when the countdown timer reaches to zero, it fires an event that will switch the site from showing the timer to some text and a button to join the live event. I thought I already did that, but I guess I didn't. Also kind of worked out how I want the archived videos to be laid out on the site. Don't remember if I watched "Loki" though. Will probably watch it while having dinner.

![A bear cub on the top of another bear in a field of tall grass in Alaska](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ycnxsahbdqp5kmfd83wy.jpg)

All day it's been sunshower after sunshower. Close my windows, then 5 minutes it stops, I open my windows, then it starts again. haha. Going to try and catch up with "Loki" while eating dinner. Then go through some tracks for the radio show and then work on the video section of the side project.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube OH-XmrRGIaY %}
🎬Build a Step Progress Bar | JavaScript✨
Tags: html, css, javascript, beginners
Published: 2021-06-30 21:16:23

In this episode you will Learn how to build a Step Progress Bar with HTML, CSS, and JavaScript, step-by-step the easy way!

---

{% youtube qKjDXXkkg8I %}

---

🏆 Recommended Projects 🏆
🎬 Neumorphism Login Form | HTML & CSS
➤https://youtu.be/QWh0S-3D7uY
🎬 Animated Sidebar Menu with HTML & CSS
➤ Watch: https://youtu.be/QPZrQ_xPVs4
🎬 Amazing Social Media Buttons Hover Effects | HTML & CSS
➤ https://youtu.be/P9pi4hq7BBA

---

🛴 Follow me on:
👉https://www.facebook.com/WebdevMadeEasy

---
How to Make Bootable Drives With Ubuntu Startup Disk Creator
Tags: howto, linux, ubuntu, diskdrives
Published: 2022-02-22 14:47:45

---
title: How to Make Bootable Drives With Ubuntu Startup Disk Creator
published: true
date: 2021-06-30 21:04:17 UTC
tags: HowTo,Linux,Ubuntu,diskdrives
canonical_url: https://fossnaija.com/how-to-make-bootable-drives-ubuntu-startup-disk-creator/?utm_source=rss&utm_medium=rss&utm_campaign=how-to-make-bootable-drives-ubuntu-startup-disk-creator
---

[Ubuntu](https://ubuntu.com/) Linux has its own internal application, THE STARTUP DISK CREATOR, that is used to create bootable disks which is the first step towards [installing the operating system](https://fossnaija.com/linux-installation-dual-booting-with-windows-7/) on another machine or computer.

So in this video, you would see how easy it is.

#### PLEASE LIKE, SHARE AND SUBSCRIBE!

{% youtube cDp87-DfXyk %}

**Happy Linux’NG!**

The post [How to Make Bootable Drives With Ubuntu Startup Disk Creator](https://fossnaija.com/how-to-make-bootable-drives-ubuntu-startup-disk-creator/) appeared first on [Foss Naija](https://fossnaija.com).
Deploying OpenShift clusters (IPI) using vRA Code Stream
Tags: vmware, kubernetes, codestream, deploy
Published: 2021-07-01 17:42:45

---
title: Deploying OpenShift clusters (IPI) using vRA Code Stream
published: true
date: 2021-06-30 20:55:20 UTC
tags: VMware,Kubernetes,CodeStream,Deploy
canonical_url: https://veducate.co.uk/deploying-openshift-clusters-ipi-using-vra-code-stream/?utm_source=rss&utm_medium=rss&utm_campaign=deploying-openshift-clusters-ipi-using-vra-code-stream
---

This walk-through will detail the technical configurations for using vRA Code Stream to deploy [Red Hat OpenShift](https://www.openshift.com/) Clusters, register them as Kubernetes endpoints in vRA Cloud Assembly and Code Stream, and finally register the newly created cluster in [Tanzu Mission Control](https://veducate.co.uk/vmware-tanzu-mission-control-getting-started/).

The deployment uses the [Installer Provisioned Infrastructure method](https://docs.openshift.com/container-platform/4.7/installing/installing_vsphere/installing-vsphere-installer-provisioned.html) for deploying OpenShift to vSphere. Which means the installation tool “openshift-install” provisions the virtual machines and configures them for you, with the cluster using internal load balancing for it’s API interfaces.

This post mirrors my original blog post on [using vRA to deploy AWS EKS clusters](https://veducate.co.uk/vra-deploy-eks-tmc/).

##### Pre-reqs

- Red Hat Cloud Account
  - With the ability to download and use a Pull Secret for creating OpenShift Clusters
- vRA access to create Code Stream Pipelines and associated objects inside the pipeline when it runs.
  - Get CSP API access token for vRA Cloud or on-premises edition.
- Tanzu Mission Control access with ability to attach new clusters
  - Get an CSP API access token for TMC
- vRA Code Stream configured with an available Docker Host that can connect to the network you will deploy the OpenShift clusters to.
  - This [Docker container](https://hub.docker.com/r/saintdle/openshift-ci) is used for the pipeline
  - You can find the [Dockerfile here](https://github.com/saintdle/openshift-ci), and alter per your needs, including which versions of OpenShift you want to deploy.
- SSH Key for a bastion host access to your OpenShift nodes.
- Files to create the pipeline are stored in GitHub Here
  - [https://github.com/saintdle/vRA-Deploy-OpenShift-Clusters](https://github.com/saintdle/vRA-Deploy-OpenShift-Clusters)

##### Getting Started

Head over to the [full blog post here](https://dy.si/qHo3DL2). Partly because dev.to hasn't resync'd the latest changes. 


Regards

[Follow @Saintdle](https://twitter.com/saintdle)<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

[Dean Lewis](https://uk.linkedin.com/in/saintdle?trk=profile-badge)

 

The post [Deploying OpenShift clusters (IPI) using vRA Code Stream](https://dy.si/qHo3DL2) appeared first on [vEducate.co.uk](https://veducate.co.uk).
Application of data structures in Cyber security.
Tags: cybersecurity, datascience, algorithms, pentest
Published: 2021-06-30 20:52:58

Data structures are defined as the pragmatic way of storing data so that data can be used efficiently.

So why the need for knowledge about data structures for a cybersecurity analyst or expert
As data grows, search operations will be slower to perform. Although high processing speeds have come up, they still fall limited to this data growth.
Data should be organised so not all items may be required to be searched but only the required data can be searched almost instantly
Common basic types of data structures and their history
Arrays, implementation dates back to the earliest high-level programming languages like FORTRAN(1957), COBOL(1960), ALGO60 that had support for multi-dimensional arrays.
Stacks were first proposed in 1946 in the computer design of the famous Alan M. Turing.
Linked lists, were developed at RAND corporation during the period of 1955 -1956 by engineers Allen Newell, Cliff Shaw, Herbert A Simon as the primary data structure for their information processing language.
B-Tree, invented by Rudolf Buyer
AVL, published in 1962 by two soviet inventors Georgy Adelson Velsky and E. M Landis as indicated in the paper An algorithm for organisation information.

Case study:
Use of data structures in pen testing
Pen testing is the authorised simulated attack performed on a computer system to evaluate its security.
During Pen testing, deep search and analysis operations are carried out in order to search for any kind of poor vulnerabilities.
24 lessons on ML, now on GitHub
Tags: tutorial, python, machinelearning, webdev
Published: 2021-06-30 20:47:10

---
title: 24 lessons on ML, now on GitHub
published: true
description: Want to learn ML? Here's a whole course
tags: tutorial, python, ml, webdev
series: for-beginners
---

Microsoft just released 24 lessons on Machin Learning, ML. All you need are some basic skills in Python. It covers the following topics:

- Regression
- Classification
- Clustering
- NLP
- Time series
- Reinforcement Learning
- Real world apps and scenarios

It uses various SDKs in Python to solve real world problems.

Get started with ML today!

{% github microsoft/ML-For-Beginners %}

> https://github.com/microsoft/ML-For-Beginners

{% youtube Tj1XWrDSYJU %}
My foray into the coding world...
Published: 2021-06-30 20:45:11

Before entering the world of coding, I worked as a social worker. I got into coding for the opportunities it presented: the ability to work remotely, the balance of analytical skill and creative problem-solving, and the fun of designing websites and apps! Right now, I am working on a bugtracker app. My goals are to become a front-end web developer and build artfully inventive, interactive websites!