teleren/devto huggingface dataset:
Decision Making and Loops in JavaScript
Tags: html, css, javascript, 100daysofcode
Published: 2021-02-09 10:30:08

There are situations when we want to run the code at different conditions, such as, if one condition applies run a particular code, if another condition applies another code is run. This is prioritized with "if" and "else if" conditionals as follows:

```
function getColor(phrase){
   if (phrase === "stop"){
       console.log("red");
   } else if (phrase === "slow"){
       console.log("yellow");
   } else if (phrase === "go"){
       console.log("green");
   } else {
       console.log("purple");
   }
}
```

We can run codes in multiple loops if we want to with the help of loops. With loops, our code runs until a certain condition is satisfied such as:

```
for (let i = 25; i >= 0; i-=5) {
    console.log(i)
}
```
Arrays and Object Literals in JavaScript
Tags: html, css, javascript, 100daysofcode
Published: 2021-02-09 10:29:59

Arrays are like a set of primitive types that is used to store information in them in the form of numbers, strings, booleans etc. Arrays can be modified by adding or removing data.

```
let lottoNumbers = [1, 2, 3, 4, 5, 6];
```

Object literals are also like arrays except for the fact that data is stored in them with a key. Every primitive type data that is stored in them has a key assigned to it which can then be called out to display or modify that data.

```
let product = {
    name: "Gummy Bears",
    inStock: true,
    price: 1.99,
    flavors: ["grape","apple","cherry"]
}
```
Learning the Primitive types of JavaScript
Tags: html, css, 100daysofcode, javascript
Published: 2021-02-09 10:29:49

Firstly we learned about the primitive types Numbers and Strings, which are just as the name suggest that if we input number they are treated as a mathematical number and strings are treated as a string of information that we have inserted. Next up, we see Booleans which are just a true and false response from the script and other primitive types which are null meaning empty and undefined meaning not-defined or non-existing in our script.
Starting with JavaScript
Tags: html, css, 100daysofcode, javascript
Published: 2021-02-09 10:29:38

Ahhhh. Feels like an era spent on HTML and CSS but finally graduated both of them and now starting with JavaScript. Finally, we get to the verb of our Web developer bootcamp journey with which we can actually make our site do something other than just displaying content nicely. After a nice meet and greet the language, we dive into the basics of JavaScript such as learning about the primitive types which include Numbers, Strings, Booleans, Null and Undefined. We ran our JavaScript code in the Google Chrome Console initially just for the sake of simplicity. We learn about all the primitive types one by one in the upcoming sections.
Museum of Candy Project
Tags: html, css, 100daysofcode, javascript
Published: 2021-02-09 10:29:11

After I completed the CSS section of the Web Developer Bootcamp including Bootstrap, we were pretty much done with learning basic CSS, now all that remained was to bring all the skills, that I picked up in the CSS section, to practice. For that, I recreated a simple webpage that was a code-along exercise of the course where we added a navigational bar, a header section and 3 more lorem ipsum sections just to practice responsive images and order of columns. In this exercise, I learned how to make a website responsive and got to see how we can use bootstrap to layout our content properly. It was a good overall practice of the basic HTML and CSS properties that I had learned in the previous section.

I have deployed that site on Netlify under the link infallible-wozniak-d9d3e2.netlify.app. You can also find the source code on Github.

Github link: github.com/saqibs3291/Museum-of-Candy
CSS Framework(Bootstrap)
Tags: html, css, javascript, 100daysofcode
Published: 2021-02-09 10:28:55

When we are working on a big project, adding styles to all of our content can be a lot of work, especially when we are new to programming and are not not familiar with the tips and tricks to get our work done quickly. So, there are CSS frameworks that help us add styles to our content in short time without having to style each of our individual element. When we use a CSS framework like Bootstrap, we don't need to write as much CSS code as we would have to if we are not using the framework. In Bootstrap, all of the CSS is pre-written and we just call out a particular style for our content by simply adding the specific class in our HTML markup which then picks up that particular style from Bootstrap style sheet. This is a much more time efficient process of adding styles to our markup. Other than this, adding navigational bars and laying out our content on the webpage with the grid system is also relatively simple and it helps us making our webpage responsive as well.

Note: The Bootstrap styles is added before our own style sheet if we need to write some extra CSS so that our CSS sheet can over-write the pre-defined style sheet of Bootstrap.
The CSS Box Model(Flexbox)
Tags: html, css, javascript, 100daysofcode
Published: 2021-02-09 10:28:34

Understanding the box model of CSS makes positioning and aligning our content much easier. In our CSS box model, we understand that every element has its own box model, such as if we add a paragraph to our webpage, that paragraph has a blue-box first which is the content of the paragraph, then there is padding between the content and the border of the content, then comes the border of our paragraph and outside of that border is the margin that our content is keeping from other content. In this way, we can position our content, in this case a paragraph, relative to other content on the web page.

![image](https://dev-to-uploads.s3.amazonaws.com/i/5vf68wgctdtqnrbtk6r8.png)

After learning the Flexbox, I made a small pricing table project which you can check on Github. Github link: github.com/saqibs3291/pricing-table
Common CSS properties
Tags: html, css, javascript, 100daysofcode
Published: 2021-02-09 10:28:14

With the help of CSS, we can style our HTML in any way we want. Most common properties of CSS that are used to style our content include background, background color, background image, background position, border, border style, border color, margin, padding, display, font size, font family, font weight, text align, text decoration, visibility, width etc. CSS units which can be absolute such as px and relative such as ems and rems also play an important role in understanding CSS.

Note: It is possible to add style to our markup right in the HTML file but it is not recommended, a separate style sheet should be made which can then be linked with our HTML file.
Git tip: use -
Tags: git, productivity, beginners
Published: 2021-02-09 10:21:04

Git has a cool shortcut `-` — previous branch. It's great to use when navigating between branches:
```shell
# go back to the previous branch
git checkout -
```

And during merge:
```shell
# merge the previous branch to the master
git checkout master && git merge -
```

PROTIP: Checkout is the most popular command in Git. I suggest you aliasing it with `git co` to type it faster:
```shell
git config --global alias.co checkout
```

### More on this topic
* [Git Tips and tricks](https://github.com/Imangazaliev/git-tips)
* [How I Use Git - Useful Alias](https://hugogiraudel.com/2018/02/17/how-i-use-git/)
How to Mitigate COVID-19 Risks in Manufacturing with Work Order Management Software
Tags: mobile, webdev
Published: 2021-02-09 10:17:41

As COVID-19 has left a global footprint on how organizations do business, the ways to make the workplace safer, standard processes and procedures have to be consistently reviewed, audited, and updated to guarantee the safety of employees and customers, especially in the manufacturing industry.

This blog is intended to provide employers with helpful tips to prevent and control employees' exposure to coronavirus (COVID-19) in the manufacturing environment, reduce financial overruns and mitigate the consequences of so-called “black swan” events.

In this post:

 - Coronavirus (COVID-19) and the manufacturing industry
 - Identifying and controlling the risks
 - Five actions to ensure the agility you need in 2021 and beyond
 - Legal duties for businesses and employers responding to Coronavirus disease
 - The asset management toolkit: how to create business value rapidly and intelligently with a work order management software
https://apiko.com/blog/how-to-mitigate-covid-19-risks-in-manufacturing-with-work-order-management-software/
(Advice needed)Problems with starting an Open-Source Project
Tags: discuss, machinelearning, reinforcement
Published: 2021-02-09 09:57:24

So I'm trying to build a Reinforcement Learning based Agent to do Portfolio allocation on time-series data using an ensemble of algorithms. 
What I don't understand is how do I go about creating this project. There are so many things to take care of for instance:
1. taking input data
2. creating the ensemble using high-quality implementations of DRL algorithms
3. using the ensemble to take decisions
and so on
To be honest, I don't even have absolute clarity about my project and initially thought I will get a better idea as I get started. 
Do people build a roadmap of the things to want to achieve?
Having not created any project (of this magnitude) from scratch before, the overall complexity seems intimidating.
Any tips are welcome :)
How to integrate Free SSL into your website?
Tags: security, certificate, ssl
Published: 2021-02-09 09:53:23

Adding an SSL certificate is really important for modern web applications or websites.

So without taking too much time, let's dive directly into the free SSL implementations site.

First login to [ZeroSSL](https://zerossl.com?fpr=coffeetobusiness ) website to generate SSL certificate.

After sign up, you just click on the *New Certificate* button to generate a new SSL certificate for your website. 

![image](https://dev-to-uploads.s3.amazonaws.com/i/7j4x1hpgbyjmnyzpsny1.png)

Then, add your domain name, and move to the next step.

You have three options to verify your domain, choose any one of the options.

After verification, you will have the certificate to install in your website server.

For further details, you can go to their official documentation.
https://help.zerossl.com/hc/en-us/articles/360058295094-Before-Installation

Thanks!
Who do you work for?
Tags: philosophy, technology
Published: 2021-02-09 09:50:29

---
title: Who do you work for?
published: true
description: A little counter intuitive aspect of diving (too much) in technology
tags: philosophy, technology,
//cover_image: https://direct_url_to_image.jpg
---
Maybe it is not appropriate thing to share on a platform focused on tech, but, all this diving into technological complexity is just egoism packaged professionally.

If you consider money as a fair and real thing and not just an invention for those in power, the leaf of the economical tree are the end users. You may get paid from a business, but, down the tubes, the other side at some level goes to customers - non-engineers. Do you have something for them?

How much ducks the end user gives with what Technology, library, tool we've build something? You're right - 0 - zero.  

Lately, I am thinking of analogy about software development that is scaring me. All the software complexities and all the layers above are just one big ponzi scheme. Law is just words we all agreed to accept as truth, money as value - even that it is pumped up by more abstractions like credit, taxes. Fame is also dust in the wind. 

Software choice is always at second place - after programming the mind - the wrapping up of the product - with the words that will make humans use it or see value in it. Soft skills are always more important than the tech. And unfortunately we're all making our lives harder and harder with the complexities of development.
What is ML? part 3
Tags: machinelearning, ai
Published: 2021-02-09 09:48:14

Yesterday we saw that machine learning is behind some successful products and it does have the potential to bring many more changes to our life.

So what is it?

Well, the textbook definition is that it's the building of algorithms that can perform tasks they were not explicitly programmed to do. In practice, this means that we have algorithms that analyze large quantities of data to learn some patterns in the data, which can then be used to make predictions about new data points.

This is in contrast with the classical way of programming computers, where a programmer would use either their domain knowledge or they would analyze the data themselves and then write the program that has the correct output.

<figure>
![clsc](https://dev-to-uploads.s3.amazonaws.com/i/6la3afbmtxhn6q3w2zst.jpg)
<figcaption>Regular Programming</figcaption>
</figure>
 
<figure>
![mla](https://dev-to-uploads.s3.amazonaws.com/i/1ullcvfzmiwo31910l5w.jpg)
<figcaption>ML Programming</figcaption>
</figure>

So one of the crucial distinctions is that in machine learning, the machine has to learn from the data. If a human being figures out the pattern and writes a regular expression to find addresses in text, that's human learning, and we all go to school to do that.

Now does that mean that machine learning is a solution for everything? No. In some cases, it's easier or cheaper to have a data analyst or a programmer find the pattern and code it up.

But there are plenty of cases where despite decades long efforts of big teams of researchers, humans haven't been able to find an explicit pattern. The simplest example of this would be recognizing dogs in pictures. 99.99% of humans over the age of 5 have no problem recognizing a dog, whether a puppy, a golden retriever or a Saint Bernard, but they have zero insight into how they do it, what makes a bunch of pixels on the screen a dog and not a cat. And this is where machine learning shines: you give it a lot of photos (several thousands at least), pair each photo with a label of what it contains and the neural network will learn by itself what makes a dog a dog and not a cat.

Machine learning is just one tool that is available at our disposal, among many other tool. It's a very powerful tool and it's one that gets "sharpened" all the time, with lots of research being done all around the world to find better algorithms, to speed up their training and to make them more accurate.

Come back tomorrow to find out how the sausage is made, on a high level.
How to Get the Scientific Programming School Course Bundle?
Tags: computerscience, education, elearning, courses
Published: 2021-02-09 09:33:30

## Interactive Scientific Programming Courses - Bundle

![Interactive Scientific Programming Courses - Bundle](https://dev-to-uploads.s3.amazonaws.com/i/4k9z0oh4z6y3finwniq6.png)

A course bundle purchase will enable you enrol to all the currently  **[🔥 bundled-courses](https://scientificprogramming.io/courses)** at just one price. Anything published after the bundle is purchased won't be included, but you may re-purchase the new courses/ bundle anytime. If you are not happy, we'll offer you 100% refund!

https://scientificprogramming.io/bundle-offer

How it works? Watch this video. Should you wish to get all your purchased courses later, simply **[sign-in](https://scientificprogramming.io/login)** with your purchasing email and resume from your course dashboard! 

## About 
The Scientific Programming School (**[scientificprogramming.io](https://scientificprogramming.io/)**) is the next generation  platform for creating and delivering interactive courses on high performance computing topics.
How to check if Ruby is installed on a Mac
Tags: ruby, macos
Published: 2021-02-09 09:20:44

---
title: How to check if Ruby is installed on a Mac
published: true
description: Does Ruby come installed on a Mac? Why you should not use the pre-installed Ruby. 
tags: ruby, macOS
cover_image: https://mac.install.guide/assets/images/faq/is-ruby-installed-mac.png
---

_Is Ruby installed on my Mac?_

Ruby comes pre-installed on macOS Catalina and Big Sur (see below why you may not want to use the default Ruby).

To check if Ruby is installed, enter in your terminal application:

```bash
$ ruby -v
```

(Don't type the `$` character.)

If Ruby is not installed, you'll see:

```bash
zsh: command not found: ruby
```

The `which` command will confirm that Ruby is missing:

```bash
$ which ruby
ruby not found
```

You can use the `which` command with flag `-a` to see if more than one Ruby executable is installed:

```bash
$ which -a ruby
/Users/daniel/.asdf/shims/ruby
/usr/bin/ruby
```

If Ruby is installed, the `ruby -v` command will show a response like:

```bash
$ ruby -v
ruby 2.6.3p62
```

MacOS comes with a "system Ruby" pre-installed. Use the `which` command to see if you are using the system Ruby:

```bash
$ which ruby
/usr/bin/ruby
```

If you see `/usr/bin/ruby`, it is the pre-installed macOS system Ruby. It's fine to use the system Ruby for running sysadmin scripts, as long as you don't alter the system Ruby by attempting to update it or add gems. But experienced developers don't use the system Ruby for developing projects in Ruby. See the article, [Do not use the MacOS system Ruby](https://www.freecodecamp.org/news/do-not-use-mac-system-ruby-do-this-instead/). You can [Install Ruby with Homebrew](https://mac.install.guide/ruby/12.html). Or use a version manager such as asdf, chruby, rbenv, or rvm. A version manager can also help if you're juggling multiple projects that can't be updated all at once.

For a guide that compares version managers and shows the best way to install Ruby, see [Install Ruby on a Mac](https://mac.install.guide/ruby/index.html). If you're going to build web applications with Rails, see [Install Ruby on Rails on a Mac](https://learn-rails.com/install-rails-mac/index.html).
Uniting the past and future to build a corporate identity in the higher education
Tags: design, writing, programming, webdev
Published: 2021-02-09 09:16:34

Voronezh State University of Forestry and Technologies trains specialists in forestry, woodworking, automation, economics, design, and other areas. In 2020, the university celebrated its 90th anniversary, and in honor of this, management decided to rethink the university branding and update their logo.

The previous logo of the university was 10 years old and outdated. So, a new graphic was required, something more dynamic and suitable for a variety of uses, but still recognizable. It needed to both demonstrate the high status of the university in scientific circles and look appropriate on student gear.

We developed 4 versions of the new VSUFT logo, each of which carried an idea associated with the university. Each version was completely ready for development into a full-fledged identity, as the designers had examined the role of corporate identity in university branding and carefully considered the use of the symbols in different situations and media forms.
[Check the design concepts and read more in the full article.](https://evrone.com/vgltu)
QuickBooks Loan Manager - Learn How to Set up and Use It?
Published: 2021-02-09 09:13:13

QuickBooks loan manager is a tool for the companies to track the unpaid loans and change the installments if any of them are missed out. This tool diversifies the entire loan amount into interest and principle, which helps in timely loan repayment. This also permits the user to add or remove the loans that need to be tracked and also set up the loan payments for them. This tool calculates the amortization schedule at the current rate provided by the user and thus the user will not have to work on it each and every month. 


If you are interested in knowing the <a href="https://www.quickbookspremiersupport.us/quickbooks-loan-manager/">process to setup QuickBooks desktop loan manager</a>, then in that case make sure that you stick to this post carefully till the end. You can also speak to our QuickBooks professionals via our toll-free customer support number +1-844-405-0906 and ask them to carry out the process on your behalf.
Dev.to theme resets to default again and again?
Tags: tutorial, forem
Published: 2021-02-09 09:11:00

# Is your [dev.to](https://dev.to) getting reset to the default again and again?

This also happened with me today...

So I tried a few things and eventually found the solution

## Solution

1. **Do a hot reload**: Press Ctrl+F5 (Cmd+F5 on mac) to do a hot reload.
2. **Empty cache and hard reload**: If the hot reload doesn't work, there may be something wrong with the cache. 
  1. So open developer tools by pressing F12 / Ctrl + Shift + I.
![image](https://dev-to-uploads.s3.amazonaws.com/i/pgja705qd2a64l01e2j1.png) 

  2. Right click on refresh button, and click "Empty cache and hard reload".  
![image](https://dev-to-uploads.s3.amazonaws.com/i/ti3hc865ik0p9t1l790q.png)
  
  3. Alternatively you can go to Applications pane in developer tools > Cache Storage > static-1.4 - https://dev.to". Right click on it and Delete. After that reload the page
![image](https://dev-to-uploads.s3.amazonaws.com/i/zhgzwtmplfqekgo5y828.png)
 
This will surely solve the issue.
Have a good day!😁👨‍💻
Project 43 of 100 - Resurrecting Clippy into a React JSX Component
Tags: react, javascript, 100daysofcode
Published: 2021-02-09 09:04:11

*Hey! I'm on a mission to make 100 React.js projects ending March 31st. Please follow my dev.to profile or my [twitter](https://www.twitter.com/jwhubert91) for updates and feel free to reach out if you have questions. Thanks for your support!*

Link to today's deployed app: [Link](https://100-react-projects-day-43-mr-clippy-component.netlify.app)
Link to the repo: [github](https://github.com/jwhubert91/mr-clips)

Just a short post today. I meant to publish an npm package for this component following this pretty good tutorial on dev.to about doing that with `create-react-library`. Link: [How to Publish a Custom React Component to NPM...](https://dev.to/ramonak/how-to-publish-a-custom-react-component-to-npm-using-create-react-library-4bhi) However, after publishing the npm package (link here)[https://www.npmjs.com/package/mr-clips] I discovered that I could not install it using `npm install` and got a significant error about conflicting React versions since I believe create-react-library ships with a slightly older version of React. I'll push that off to tomorrow's project.

In the meantime, I do feel I accomplished a lot with today's project- by reviving a beloved early 2000's era chatbot, Clippy. My component, which I call Mr Clips, can be imported into any page in a React project with just a little bit of code. From the readme:

```
import MrClips from 'mr-clips'

function App() {
    return (<MrClips height={200} />)
}
```

As the readme mentions, you do need to create a height prop for the MrClips component.

Tomorrow I'll deal with the error and upload a working version to npm for all to use. In the year of the meme currency and meme stock swings- it would be cool if Mr Clips aka Clippy became a commonly used chatbot throughout the web- why not?
So, you want to open two files in vim?
Tags: vim, shellscript, bash, tips
Published: 2021-02-09 09:00:17

I'm preparing some shellscripts to avoid repetition of some usual tasks. Some of them involve opening a file and then using the `:split` command in `vim`. 
Is it possible **open two files** like this from the **command line**?

Indeed, it is, you can use the `vim -o file1 file2` command. In this way vim will show the two files in split view, the first one in the upper section and the second one in the bottom section.