teleren/devto huggingface dataset:
Validating an Office add-in's manifest file
Tags: officejs
Published: 2020-10-25 18:31:03

The Office add-ins manifest validator examines your add-in's manifest file to determine if it's correct and complete. 
If you created your add-in project using the Yeoman generator for Office add-ins (version 1.1.17 or later), 
you can validate the manifest by running the following command in the root directory of the project.

Console

```npm run validate```


If you didn't use the Yeoman generator to create your add-in project, you can validate your add-in's manifest by completing the following steps.

* Install Node.js.

* Run the following command in the root directory of your project.

 **Important**
Replace **MANIFEST_FILE** with the name of your manifest file.
 
Console
 
``` npx office-addin-manifest validate {{MANIFEST_FILE}} ```
Simple Captch in Spring Boot
Tags: captcha, recaptcha, java, springboot
Published: 2020-10-25 18:30:32

**SimpleCaptcha** is a simple Java library which can be used to develop random "captcha" generation for verification and validation purposes. Captcha is combination of background , text and line(noise) like below:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0krpqd5vxqsk4oylv8zh.png)

I used **Spring boot** to develop; this application is **complete CRUD** in which I did all necessary operation of user. User can register with verification and edit with verification and deleted also. Application allows to view all registered users also. Here is my **git**, you can download complete code.

https://www.linkedin.com/posts/abdallah-mahmoud-864314102_user-registration-captcha-activity-6726196313769291776-PW2K
Ruby on Rails Reference - CLI Commands, Bundler, Macros
Tags: ruby, rails
Published: 2020-10-25 18:29:39

## Gems

Gems are Ruby Libraries, and the gem command is like npm in the nodeJS world. Here are some of the main Gem commands.

![Gems](https://i.imgur.com/BEExpdU.png)

## Bundler

Keeping tracks of which Gems are used in a project can be tricky. Similar to package.json in Node you have a Gemfile that lists a projects dependencies. With bundler you can make sure all these Gems are installed.

![Bundler](https://i.imgur.com/WVSX5Aa.png)

## Ruby on Rails CLI

The Ruby on Rails CLI has several commands to make assempling your rails project very easy. Here are some of those commands.

![Rails Commands Part I](https://i.imgur.com/W0ZBpLc.png)

![Rails Commands Part II](https://i.imgur.com/DllxMZE.png)

![Rails Commands Part III](https://i.imgur.com/sE9a5Gq.png)

![Rails Commands Part III](https://i.imgur.com/j1HxLRH.png)

## Active Record Types

Active Record is the ORM that Ruby on Rails uses to work with SQL databases. When using generator commands you can specify fields and types to quickly generate models and migrations. Here are the many Active Record types.

![Active Record Types](https://i.imgur.com/POMPUEB.png)

## Model Macros

In your models there are several macros that help add features and functionality to your models.

![Rails Model Macros](https://i.imgur.com/XTWGopd.png)

## Route Macros

Macros for Routes

![Route Macros](https://i.imgur.com/0x9uQbW.png)
My First Hacktobetfest Experience🎸 (2020)
Tags: hacktoberfest, github, opensource
Published: 2020-10-25 17:39:07


### My experience from my first Hactoberfest,
For a while I wanted to participate in an open-source project but didn't know where to start. When I found out about the Hacktoberfest it was perfect for me to make my first steps into the open-source world.

### Background
I'm a Junior web developer and as mentioned before, just got into open-source.

### Progress
I managed to find more than 4 projects I could contribute to, to be honest most of them were aimed at beginners.

### Contributions
1. [interview-prep](https://github.com/hjaintech/interview-prep/pull/21): added answer to interview question about virtual DOM in react.
I'm currently preparing for interviews so it was also a good practice.

2. [github-langs](https://github.com/wildan3105/github-langs/pull/158): fixed css link colors.
unfortunately someone made a pull-request before i did

3. [RollTheDice](https://github.com/zatch3301/RollTheDice/pull/5): a Javascript game, I just added a snapshot to the README file.

4. [JS concepts examples](https://github.com/kshitij86/hacktoberfest2020-js/pull/19): added an example file to Closure. Again was a good practice.

5. [Canvas-Creations](https://github.com/zero-to-mastery/Canvas-Creations/pull/96): Added simple canvas animation. Learned about HTML canvas for the first time.


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/w50tthuymqhhhgigonqh.png)


### Reflections
It was a great experience and I learned alot about working with github and open-source. Next year I will contribute more meaningful code.
Full-Stack Developer Or Only One Framework?
Tags: webdev, javascript, beginners, help
Published: 2020-10-25 18:18:33

# Which one is more logical?

Hello Dev.to Community! 

My name is András-Pál Csokán, a wannabe web developer. I have been taking two courses since March, but it occured to me many times, whether becoming a **full-stack developer** is the right choice to make, if someone wants to get into the field in the forseeable future.
I am asking your opinion, if it makes more sense to learn and _be-job-ready-enough_ with only one or two specific frameworks(ex. **Angular, Vue, React, Next**), rather then sitting for like 2 years to gain enough experience as a full-stack developer?

Looking forward to your answers,

Cheers, András.
Overriding Bootstrap 4 Theme.
Tags: bootstrap, theme, html, scss
Published: 2020-10-25 17:58:15

- [Bootstrap theme files](#bootstrap-theme-files)
- [Overriding Bootstrap 4 theme](#overriding-bootstrap-4-theme)
- [Results](#results)

In this shot, we will show you how to override the default Bootstrap theme with our own custom theme variables.

## Bootstrap theme files

First, we need to understand how Bootstrap 4 theme files work. So, after installing Bootstrap 4 via [NPM](https://www.npmjs.com/package/bootstrap)

```terminal
npm i bootstrap@4
```

navigate to the **node_modules/bootstrap/scss/\_variables.scss** file.

> We will not make our modifications inside this file we will just take a quick look to understand how Bootstrap works and then we will make our modification in a proper way.

In this file, we will find every variable used in Bootstrap.
Scrolling down we will see some pre-defined color variables:

**_variables.scss**

```scss
$blue: #007bff !default;
$indigo: #6610f2 !default;
$purple: #6f42c1 !default;
$pink: #e83e8c !default;
$red: #dc3545 !default;
$orange: #fd7e14 !default;
$yellow: #ffc107 !default;
$green: #28a745 !default;
$teal: #20c997 !default;
$cyan: #17a2b8 !default;
```

And then it uses the following variable with its theme variables:

```scss
$primary: $blue !default;
$secondary: $gray-600 !default;
$success: $green !default;
$info: $cyan !default;
$warning: $yellow !default;
$danger: $red !default;
$light: $gray-100 !default;
$dark: $gray-800 !default;
```

After that, it creates an [SCSS Map](https://sass-lang.com/documentation/values/maps):

```scss
$theme-colors: () !default;
$theme-colors: map-merge(
  (
    "primary": $primary,
    "secondary": $secondary,
    "success": $success,
    "info": $info,
    "warning": $warning,
    "danger": $danger,
    "light": $light,
    "dark": $dark,
  ),
  $theme-colors
);
```

## Overriding Bootstrap 4 theme

In your root .sass file

```scss
// Required
@import "node_modules/bootstrap/scss/functions";
@import "node_modules/bootstrap/scss/variables";

// Adding/Overriding Colors
$theme-colors: map-merge(
  $theme-colors,
  (
    "secondary": #ddc22b,
    "tertiary": #e059c3,
    "quaternary": #25a1a1,
  )
);

// Overriding/Adding Spacers
$spacers: map-merge(
  $spacers,
  (
    10: $spacer * 10,
  )
);
$sizes: map-merge(
  $sizes,
  (
    10: 10%,
    90: 90%,
  )
);

// Bootstrap and its default variables
@import "node_modules/bootstrap/scss/bootstrap";
```

## Results

![Colors](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w3oua2b46oxpwlgxr3n5.JPG)
![Spacing and Sizes](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l8nhg3ehzhi5kxvsbzvj.JPG)

<a href="https://www.linkedin.com/in/youssefzidan/" target="_blank">
    <img src="https://img.shields.io/badge/LinkedIn-%230077B5.svg?&style=flat-square&logo=linkedin&logoColor=white" alt="LinkedIn">
Why I decided it was time to become a Software Engineer
Published: 2020-10-25 17:37:53

I really enjoyed completing several coding classes in both high school and college.  I assumed that coding would always be a part of my career. 

After leaving school, I first headed to a global investment bank and then on to a smaller investment firm.  Next, I assisted in launching another investment firm that went on to grow from 3 employees to nearly 100. 

At this point, I felt the need to try something different.  Each move to a smaller organization allowed me to realize that, similar to coding, I liked being able to see the direct results of my contributions.  With that in mind, I decided to start my own real estate investment firm.  I have really loved working and growing this company over the last several years. 

Once again, I find myself eager to give myself a new challenge.

While most of my past roles were in technology, far too many hours of those days were spent on non-tech related tasks.  I decided that it was the right time for me to pursue Software Engineering. 

While this will certainly involve learning to code in various languages, it will also require a problem-solving mindset.  The experience that I gained from having been a senior executive and also running my own small company has allowed me to sharpen the skills required for this next chapter. Problem-solving, perseverance in finding a solution, and time management will all be essential.  I expect this to be exceedingly difficult at times, but certainly not impossible.  I am looking forward to rekindling that coding spark that I once felt.
My first React App ^_^
Tags: react, portfolio, personal, javascript
Published: 2020-10-25 17:37:35

Hey everyone,

I just wanted to share with you my first React app I created.

I made my personal website and hosted it on GitHub pages.

Check it [Here](https://youssefzidan.netlify.app/)

Your feedback is always welcomed ^_^

Thanks.

<a href="https://www.linkedin.com/in/youssefzidan/" target="_blank">
    <img src="https://img.shields.io/badge/LinkedIn-%230077B5.svg?&style=flat-square&logo=linkedin&logoColor=white" alt="LinkedIn">
A small console application written in Go to check the Azure status
Tags: go, 100daysofcode, programming, development
Published: 2020-10-25 17:31:46

I made this for a project chapter in my Go book originally, but I think it's a pretty cool little console app to build on.

I want to grow this out to AWS as well, but for now, it's just Azure.

https://github.com/AdminTurnedDevOps/cloud-status-check
CRM software - what are the top picks for this year?
Published: 2020-10-25 17:22:12

Customer relationship management is complex and lead nurturing is difficult. Especially in B2B sales, knowing where a customer is in the process is instrumental. I've created a [list] (https://passiveincometree.com/best-crm-software/) of the top CRM software in order to help you streamline and simplify this.
Create your own online shop with these ecommerce tools
Published: 2020-10-25 17:14:58

With the COVID pandemic, the ecommerce industry is booming - estimates say that it has been brought forward by at least 5 years. If you want to capitalise on this trend then you need to identify and choose the best e-commerce platforms to create your store. Here are my [top picks] (https://passiveincometree.com/ecommerce-platforms/).
Building landing pages that convert
Published: 2020-10-25 17:09:58

As an online marketer, one of the most powerful tools you have at your disposable is the landing page. Despite their high ROI, they can be time-consuming to create if you do not have the right tools. That's why I created this [list] (https://passiveincometree.com/landing-page-builder/) of the top landing page builders to help you.
Managing your social media engagement most effectively
Published: 2020-10-25 17:06:49

Engaging your audience is difficult, especially if you are on multiple social media platforms. It's inefficient to log into each account and post everyday. Instead, you can opt for social media management tools to automate posting (sometimes across multiple platforms). Here are the [best ones] (https://passiveincometree.com/best-social-media-management-tools/) I have found.
Allow Upload File On Spring Boot
Tags: tutorial, java, springboot, note
Published: 2020-10-26 05:47:05

---
title: Allow Upload File On Spring Boot
published: true
date: 2020-10-25 17:00:00 UTC
tags: Tutorial,java,springboot,note
canonical_url: https://clavinjune.dev/en/blogs/allow-upload-file-on-spring-boot/
---

Add this on application configuration:

```yaml
spring:
  mvc:
   hiddenmethod:
     filter:
       enabled: true

```

[reference](https://github.com/spring-projects/spring-boot/issues/18644)
Code Smell 06 - Too Clever Programmer
Tags: codenewbie, tutorial, beginners
Published: 2020-10-25 16:59:18

*Code difficult to read, tricky with names without semantic. Sometimes using language's accidental complexity.*

TL;DR: Don't pretend you are too smart. Clean code asks for readability and simplicity.

# Problems

- Readability

- Maintainability

- Code Quality

- Premature Optimization

# Solutions

- Refactor the code

- Use [better names](https://dev.to/mcsee/what-exactly-is-a-name-part-i-the-quest-61k)

# Examples

- Optimized loops

# Exceptions

- Optimized code for low level operations.

# Sample Code

## Wrong

[Gist Url]: # (https://gist.github.com/mcsee/df27505a28b5f65faaa273b0bfe1f322)
```javascript
function primeFactors(n){
  var f = [],  i = 0, d = 2;  
  
  for (i = 0; n >= 2; ) {
     if(n % d == 0){
       f[i++]=(d); 
       n /= d;
    }
    else{
      d++;
    }     
  }
  return f;
}
```

## Right

[Gist Url]: # (https://gist.github.com/mcsee/4749cfe51de1c02848df1aa802fa5705)
```javascript
function primeFactors(numberToFactor){
  var factors = [], 
      divisor = 2,
      remainder = numberToFactor;
  
  while(remainder>=2){
    if(remainder % divisor === 0){
       factors.push(divisor); 
       remainder = remainder/ divisor;
    }
    else{
      divisor++;
    }     
  }
  return factors;
}
```

# Detection

Automatic detection is possible in some languages.
Watch some warnings related to complexity, bad names, post increment variables, etc.

# Relations

{% post https://dev.to/mcsee/code-smell-02-constants-and-magic-numbers-obb %}

{% post https://dev.to/mcsee/code-smell-20-premature-optimization-4moe %}

# Also Known as

- Obfuscator

# Conclusion

Too clever developers write cryptic code to brag. Smart developers write clean code. 
Clear beats clever.

# Tags

- Declarative

# More Info

[Boolean Flags](https://ardalis.com/are-boolean-flags-on-methods-a-code-smell/)

# Credits

Photo by <a href="https://unsplash.com/@neonbrand">NeONBRAND</a> on <a href="https://unsplash.com/s/photos/smart-brain">Unsplash</a>

* * *

> Programming can be fun, so can cryptography; however they should not be combined.

_Kreitzberg & Shneiderman_

{% post https://dev.to/mcsee/software-engineering-great-quotes-26ci %}

* * *

This article is part of the CodeSmell Series.

{% post https://dev.to/mcsee/how-to-find-the-stinky-parts-of-your-code-1dbc %}

*Last update: 2021/06/08*
Top Photo Editing Software
Published: 2020-10-25 16:53:53

The photos that you see online are often digitally edited and if you want to pursue photography as a hobby or career you will need to know how to edit photos properly. Understanding photo editing is one part of the equation but the other part is selecting the [most appropriate photo editing software] (https://passiveincometree.com/best-photo-editing-software/) based on your needs.
hello world [svelte-boilerplate; svelte-material-ui]
Tags: helloworld, svelte, svelteboilerplate, sveltematerialui
Published: 2020-10-25 16:52:30

```
#svelte, #svelte-boilerplate, #svelte-material-ui, #webpack
```

### Let's do it.
- Initial project using svelte-boilerplate template

```sh
>_ git clone https://github.com/pankod/svelte-boilerplate.git hello-word
```

- Installing packages
```sh
>_ cd hello-world && yarn install
```

- Installing svelte-material-ui, sass-loader
```sh
>_ yarn add svelte-material-ui sass-loader
```

- Make default theme
```sh
>_ mkdir src/theme && touch src/theme/_smui-theme.scss
``` 

- Adding sass-loader into webpack `webpack.config.js`
```js
// ...
rules: [
    // ...
    {
        test: /\.(sa|sc)ss$/,
        use: [
            'style-loader',
            MiniCssExtractPlugin.loader,
            'css-loader',
            {
                loader: 'sass-loader',
                options: {
                    sassOptions: {
                        includePaths: [
                            './src/theme',
                            './node_modules'
                        ]
                    }
                }
            }
        ]
    },
    // ...
]
```

- Remove line `exclude: /node_modules/,` of 
`svelte-loader` on `webpack.config.js`

```js
rules: [
    {
        test: /\.svelte$/,        
        /*exclude: /node_modules/,*/
        use: {
            loader: 'svelte-loader',
            options: {
                emitCss: true,
                hotReload: true,
                preprocess: require('svelte-preprocess')([
                    scss()
                ])
            }
        }
    },
]
```

- Update `src/App/index.svelte`
```js
<script>
    import Layout from '@Components/Layout';
    import { Label } from '@smui/button';
</script>
```

```scss
<style lang="scss">
    .container {
      background-color: #000;
      color: #fff;
      display: flex;
      flex-direction: column;
      flex: 1 1 100%;
      justify-content: flex-start;
      align-items: center;
      min-height: 100vh;

      &__middle {
        display: flex;
        flex: 1 1 100%;
        justify-content: center;
        align-items: flex-start;
      }
    }

    .message {
        font-size: 3rem;
    }
</style>
```

```html
<Layout>
    <div class="container">
        <div class="container__middle">
            <div class="message">
                <Label>HELLO WORLD</Label>
            </div>
        </div>
    </div>
</Layout>
```

Get ready for you !
Let's enjoy.
```sh
>_ yarn start:dev
```
Protect your privacy with these VPN tools
Published: 2020-10-25 16:49:12

Online data breaches are becoming more and more common and 1 in 15 people are victims of identity fraud. In fact, there is an attempted hacking once every 39 seconds. To protect your data and privacy, you can use [these] (https://passiveincometree.com/best-free-vpns/) VPN tools.
GitHub "main" branch
Tags: github
Published: 2020-10-25 16:48:16

If you have created a new GitHub repository recently, you may have noticed that the default branch name is "main" instead of "master". To change the default branch from "main" back to "master" (after creating the "master" branch), and navigate to the Settings > Branches page.

The master-slave terminology has been removed from most software (MongoDB recently renamed the "rs.slaveOk" command to "rs.secondaryOk") and GitHub is doing its part in promoting equality.
Making an extra $200/month with Survey Junkie?
Published: 2020-10-25 16:45:06

Is it really possible to make an extra $200 a month just by answering questions online. I have written a [detailed review of Survey Junkie] (https://passiveincometree.com/survey-junkie-review/) to answer that questions synthesizing my own personal experience with reviews from other people who have tried it.
List of proven SEO tools
Published: 2020-10-25 16:43:23

Search Engine Optimisation is one of the most cost-effective long-term strategies to getting visitors to your website. In order to plan your site content, you need to have the best SEO tools at your disposal to make the right choices about your niche and keywords. To make it easier, I've created this [list] (https://passiveincometree.com/best-seo-tools/) to help you choose.
Choose the best web hosting for your needs
Published: 2020-10-25 16:34:39

One of the key prerequisites of starting a website is finding a secure and reliable host. Did you know that there are over 330,000 [web host providers] (https://passiveincometree.com/best-web-hosting-services/) worldwide? I've done the heavy lifting and sifted through these options to provide you with the best web hosting services for your needs.
What are the best webinar software tools?
Published: 2020-10-25 16:30:16

Webinars are one of the highest converting forms of online marketing and 20 - 40% of webinar attendees can be turned into qualified leads. If you are interested in creating your own webinars, I've made a list of the [top webinar software] (https://passiveincometree.com/best-webinar-software/) tools on my personal blog Passive Income Tree.
Create your own website from scratch with these tools
Published: 2020-10-25 16:27:46

Creating your own website from scratch might seem like a daunting experience, but there are so many tools at your disposal nowadays that help you do it. The good news is - you don't need any knowledge of coding to use these. Check out my blog post on [these website builders] (https://passiveincometree.com/best-website-builder/) for more details.
Building landing pages that convert
Published: 2020-10-25 16:12:00

As an online marketer, one of the most powerful tools you have at your disposable is the landing page. Despite their high ROI, they can be time-consuming to create if you do not have the right tools. That's why I created this [list] (https://passiveincometree.com/landing-page-builder/) of the best landing page builders to help you.
Increase YouTube video playback rate up to 2x
Tags: javascript, video, html, youtube
Published: 2020-10-25 15:47:05

YouTube videos (along with all modern video implementations on the web) uses the [HTML5 video element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video). This new media tag implements the [HTMLMediaElement API](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement), which gives a plenty of media-related methods common to audio and video.


The standard YouTube player just allow us to increase video speed up to 2x, but, if you want to increase it even more? Well, there's a solution for that: just set the playback rate to whatever number you want!

In order to do that, you need to select the `<video>` element in the page and change its playback rate to the desired speed:


```js
document.getElementsByTagName('video')[0].playbackRate = 2.5;
```

It's a good solution, but not a practical one. Gracefully, there's a better way to make use of this functionality without having to open the console of your browser.

## JavaScript bookmarklet

<figure>
![Adding the bookmarklet on Firefox](https://dev-to-uploads.s3.amazonaws.com/i/hjvcu6sqxp24u5emozsb.png)
  <figcaption>
    Adding the bookmarklet on Firefox
  </figcaption>
<figure>

If you want to have this script always at hand, the best way is to put it inside a JavaScript [bookmarklet](https://en.wikipedia.org/wiki/Bookmarklet). Just create a new bookmark in you favorite browser and add the code below:

```js
javascript:(function() {
  const rate = prompt('Set the new playback rate', 2.5);
  if (rate != null) {
    const video = document.getElementsByTagName('video')[0];
    video.playbackRate = parseFloat(rate);
  }
})();
```

And here is an screenshot of the bookmarklet working:

<figure>
![Video speed bookmarklet working](https://dev-to-uploads.s3.amazonaws.com/i/erxbc4xcxdk7v0gun8z1.png)
  <figcaption>
    Changing the speed of an (awesome) [YouTube video](https://www.youtube.com/watch?v=G4MvFT8TGII)
  </figcaption>
</figure>

Feel free to contribute with this code in [my public gist](https://gist.github.com/DouglasdeMoura/052456a93f93d47982ccb5eefc602eb1).