teleren/devto huggingface dataset:
🚀10 Trending projects on GitHub for web developers - 5th February 2021
Tags: javascript, css, testing, webdev
Published: 2021-02-05 14:56:12

Trending Projects is available as a weekly newsletter please sign up at [www.iainfreestone.com](https://www.iainfreestone.com) to ensure you never miss an issue.

### 1. AnimXYZ

AnimXYZ helps you create, customize, and compose animations for your website. Powered by CSS variables to allow a nearly limitless number of unique animations without writing a single keyframe. Save time and have complete control over how your elements move.

{% github https://github.com/ingram-projects/animxyz %}

---

### 2. Cheval

Copy to the clipboard using JavaScript without writing JS. A full solution for all browsers and all devices.

{% github https://github.com/ryanpcmcquen/cheval %}

---

### 3. post-me

Communicate with web Workers and other Windows using a simple Promise based API

{% github https://github.com/alesgenova/post-me %}

---

### 4. Lightweight Charts

Financial lightweight charts built with HTML5 canvas

{% github https://github.com/tradingview/lightweight-charts %}

---

### 5. Revo Grid

Powerful virtual data grid smartsheet with advanced customization. Best features from excel plus incredible performance

{% github https://github.com/revolist/revogrid %}

---

### 6. Mocha

Simple, flexible, fun JavaScript test framework for Node.js & The Browser

{% github https://github.com/mochajs/mocha %}

---

### 7. retry-axios

A super flexible interceptor for Axios that makes it easy to retry requests.

{% github https://github.com/JustinBeckwith/retry-axios %}

---

### 8. Picnic CSS

A beautiful CSS library to kickstart your projects. An invasive CSS library to get your style started.

{% github https://github.com/franciscop/picnic %}

---

### 9. Flexbox Patterns

Patterns for using flexbox CSS to build awesome UI components.

{% github https://github.com/cjcenizal/flexbox-patterns %}

---

### 10. VSCode Typer

Automated typing in Visual Studio Code. Great for live coding on stage

{% github https://github.com/domesticmouse/vscode-typer %}

---

Trending Projects is available as a weekly newsletter please sign up at [www.iainfreestone.com](https://www.iainfreestone.com) to ensure you never miss an issue.

If you enjoyed this article you can [follow me](https://twitter.com/iain_freestone) on Twitter where I regularly post bite size tips relating to HTML, CSS and JavaScript.
The Easiest Way to Implement ValueObjects in Laravel
Tags: laravel, php
Published: 2021-02-05 13:55:01

## First.
You don't need to find a way to implement ValueObjects.
You should only make a "app/ValueObjects" directory.

But, I released the package "imunew/laravel-value-objects" that you can generate files automatically by the "php artisan make:value-object" command.

The source code is [here](https://github.com/imunew/laravel-value-objects).

You can install it with "composer require imunew/laravel-value-objects".

## I want a ValueObject like this
The following is what we are looking for in a ValueObject.

- immutable
  - Only set data only with the __construct
  - Don't make the setter public
  - `@property-readable` properties can be accessed
- Like the `Eloquent` Model
  - No need to write getter per properties
  - Can implement Accessor (get{Attribute}Attribute)
  - You can create a file with the command "php artisan make:value-object".

I tried to find a package on `packagist`, but there was none that met my requirements.

The [chalcedonyt/laravel-valueobject](https://packagist.org/packages/chalcedonyt/laravel-valueobject) is immutable, and has a make command, which is nice, but, unfortunately, it stopped being updated after `2015-11-13` and was not compatible with `Laravel 6.x` or later.

## It works like this.
### Example 1) Range class.

```php
namespace App\ValueObjects;

use Imunew\Laravel\ValueObjects\ImmutableObject;

class Range extends ImmutableObject
{
    /**
     * Range constructor.
     * @param int $start
     * @param int $end
     * @param int $step
     */
    public function __construct(int $start, int $end, int $step = 1)
    {
        $this->setAttribute('start', $start);
        $this->setAttribute('end', $end);
        $this->setAttribute('step', $step);
    }

    /**
     * @return array
     */
    public function getRangeAttribute()
    {
        return range($this->start, $this->end, $this->step);
    }
}
```

```php
$range = new Range(1, 10);
echo $range;
// [1,2,3,4,5,6,7,8,9,10]
```

### Example 2) DirectoryTree class
```php
namespace App\ValueObjects;

use Imunew\Laravel\ValueObjects\ImmutableObject;

class DirectoryTree extends ImmutableObject
{
    /**
     * Range constructor.
     * @param array $directoryTree
     */
    public function __construct(array $directoryTree)
    {
        $this->attributes = $directoryTree;
    }
}
```

```php
$directoryTree = new DirectoryTree([
    'app' => [
        'Http' => [
            'Controllers' => [],
            'Middleware' => [],
            'Requests' => [],
            'Resources' => [],
        ],
        'ValueObjects' => []
    ]
]);

echo json_encode($directoryTree->get('app.Http'));
// {"Controllers":[],"Middleware":[],"Requests":[],"Resources":[]}
```

## Conclusion.
I think I've created a nice `Laravel` package.
Please try to use it.

Bye.
bash script - Check if environment variable was set.
Tags: environment, if, bash
Published: 2021-02-05 14:56:09

Here's how you check if a environment variable was set using a bash script:

```bash
#!/bin/bash

if [ -z "$AWS_ACCESS_KEY_ID" ]; then
  echo "You need to set AWS credentials! Check out the project documentation."
  exit;
fi
```

This script is working on macOS Catalina.
Regex: Extract YouTube ID from URL
Tags: php
Published: 2021-02-05 14:50:29

```
if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/\s]{11})%i', $url, $match)) {
    return $match[1];
}
```
Day 6: Anagram Detector
Tags: 100daysofcode, java
Published: 2021-02-05 14:36:27

Detect if given word or phrase form an anagram.

```java
import java.util.Arrays;

public class DaySix
{
    public static void main(String[] args)
    {
        String input = "Dormitory ? Dirty room\n" +
                "Conversation ? Voices rant on\n" +
                "The eyes ? They see\n" +
                "Inch ? Chins\n" +
                "Fourth of July ? Joyful Fourth\n" +
                "Elbow ? Below\n" +
                "The Morse Code ? Here come the dots\n" +
                "Astronomer ? Moon starer\n" +
                "Vacation Time ? I'm Not as Active\n" +
                "Listen ? Silent\n" +
                "Eleven plus two ? Twelve plus one";

        String[] line = input.split("\n");
        String[][] wordSet = new String[line.length][2];

        for(int i = 0; i < line.length; i++)
            for (int j = 0; j < 2; j++)
                wordSet[i][j] = line[i].split("\\?")[j].trim();


        for(String[] cur: wordSet)
            System.out.println( "\"" + cur[0] + "\"" + (isAnagram(cur[0], cur[1]) ? " is an anagram of " : " is NOT an anagram of ") +  "\"" + cur[1] + "\"");


    }

    private static boolean isAnagram(String str1, String str2)
    {
        char[] charArr1;
        char[] charArr2;

        charArr1 = str1.toLowerCase()
                .replaceAll("'", "")
                .replaceAll("\\s", "")
                .toCharArray();
        charArr2 = str2.toLowerCase()
                .replaceAll("'", "")
                .replaceAll("\\s", "")
                .toCharArray();

        Arrays.sort(charArr1);
        Arrays.sort(charArr2);

        return Arrays.equals(charArr1, charArr2);
    }
}
```
An easy way to understand Booleans
Published: 2021-02-05 14:35:34

Why true why false?
Why 0 is false? 

Mainly just think as if it is valuable . 


```let example1 = false;
let example2 = true;
let example3 = null;
let example4 = undefined;
let example5 = '';
let example6 = NaN;
let example7 = -5;
let example8 = 0;)```



like 

0 doesn’t value any, so 0 is false, 
"" has nothing inside,(no value) that is why is is false.
"  " with space, it  has something inside, and is a string, has value, so it is true.

NaN not a number, doesn’t value any.
-5 is value of -5. so it is valuable.

At the beginning I was always use false as wrong, but it is mainly just by value, has value? or doesn’t value any.

That's my understanding ...
Hope this can help you as well.
0auth v.2(Token) #QuickReview
Tags: 0auth, token, authorazation, authentication
Published: 2021-02-05 14:32:16

Good Morning guys. I was trying to find a good,quick and understandable example,to analyse the 0auth model(token).

After a lot of frustrated documentation,i get inspired from a youtube video that's not saying more than you need to understand for the workflow.

Let's start 0auth token is a way to authorize user's access resources which are protected from the resource owner.
They are suggested because they are more confidential than the classic model that we use all this years with the simple authentication wich was authorizing the front-user to access the end-user stuff(database,resources,priviligies,etc)

Lets see an image how that works and after that i will describe you a small example to capture it better in your mindset
![image](https://dev-to-uploads.s3.amazonaws.com/i/v1ra4a3onmmja01xi7ue.png)

This is the basic flow let's understand it a bit.

As a client i am trying to prove who am i to the owner's resources,
if am the right person the server gives me permission and then with that kind of permission(Authorazation Grant) i am sending back to the server a request to create me a token,  
the server sends me the token and with that token i am requesting again to access the protected routes/resources 
understood?

Lets see now the example that inspired me for this section

I am going vacation somewhere and i rent a hotel.
To recieve a key from the receptionist, i showed  to him my ID credentials,as also gave my credit card.
The receptionist gave me back a keycard.Then i took this card and i went  toward to my room,i swipped my card and of course i get in my room.
So the keycard is the like an 0auth token, an access token just says wether or not, the bearer of the token is allowed to access the thing they are trying to access,in this case the hotel room.
The door doesn't care who i am. 
It doesn't need to know my name or any unique identifier it just needs to know whether or not this card is allowed to acces this door at this time.So to recap the card doesn't care about me but when it needs to give me access to the (resource/"room") 0auth is exactly the same thing.

Take a look of OktaDev video : 
[0authExample](https://www.youtube.com/watch?v=BNEoKexlmA4)

Have a nice workday guys, in case for further explanation do not hesitate to contact me or find me in github or linkedin.
GitHub : https://github.com/feco2019
Linkedin : https://www.linkedin.com/in/dimitris-chitas-930285191/
NodeJs Chat-Bot AI 🤖 Backend
Published: 2021-02-05 14:25:00

Hi friends,
I created a simple Chat-Bot AI 🤖 Backend video guide, 
to understand the logic behind this new technology that is growing very fast in this days.

For this project I used [NPM node-wit](https://www.npmjs.com/package/node-wit)
[Wit.ai web site ](https://wit.ai/)

Yes, you need to know JavaScript and Nodejs basics,
this is the YouTube video link
[Chat-Bot Backend YouTube guide](https://youtu.be/wmP9rTgnVLA)

If you are interested to the code this is the GitHub page where you can download project.
[GitHub Repo](https://github.com/sitowebveloce/nodejs-chat-bot-backend)

If you also want create a simple HTML CSS JavaScript UI (User Interface)
I have created a video guide, this is the link
[Chat-Bot UI YouTube guide](https://youtu.be/V5eUrVMD7fg)

Thank Bye 🖖🏻!
How to Create an Online Furniture Auction Website?
Tags: ecommerce, webdev, onlineauction, marketplace
Published: 2021-02-05 14:15:55

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/klgdqiko4ibuggs8avrd.png)
Online auction websites, especially auction marketplaces, are increasingly popular in our times. To ascertain these words, you can look at the brightest examples of online auction marketplaces: eBay, AtomicMall, Bonanza, eBid and much more. 

As Statista claims, up to 1,7 billion consumers visited furniture and decor websites in March 2020, the time when world-wide quarantine has started. 

Furniture merchants also can take advantage of selling on online furniture auction marketplaces, and this article will describe why.

Let’s start with online furniture auction formats:

* New furniture auctions. 
* Antique furniture auctions (such auctions are in great demand among lovers of the antique).
* Furniture liquidation auctions (the retailers are frequently large companies that sell pre-owned furniture of dissolved organizations in bulk).
* Restaurant furniture auctions.
* Hotel furniture auctions. 

Now let’s review trending technologies in online auction development that can significantly improve user experience. 

1. **Artificial intelligence**. It is an efficient instrument that allows investigating user behaviour, analyzing big data that forms the basis for further marketing strategies.

2. **Augmented reality**. Using augmented reality in your furniture business, you have the possibility to create online catalogues to help clients imagine if a certain piece of furniture will fit into their interior.

3. **Mobile app**. Since the era of mobile gadgets have come long ago, it is high time to adopt mobile first strategy and develop your own mobile app for online furniture marketplace and please mobile users.

If you are still looking for the answer on how to develop a successful online furniture auction website, [welcome to this article](https://dinarys.com/blog/online-furniture-auctions-marketplace) to find a step-by-step guide.
Random Quote Generator Project
Tags: javascript, webdev, 100daysofcode, codenewbie
Published: 2021-02-05 14:00:35

In this project you will learn how to use API, async and await javascript function . how we can fetch data from APi and much more.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4jyh8yaehlx6p8mlpyxp.png)
plz subscribe and support this channel.
https://youtu.be/-8BRfiAk_2M
JS Test #5: Can you use an arrow function as a getter?
Tags: beginners, programming, javascript, codenewbie
Published: 2021-02-05 13:50:23

![code-snippet](https://learn.coderslang.com/js-test-5.png)
Are there any issues with the `getId` function? What will be logged to the screen? 	

<!--more-->

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

So, `getId` is an arrow function, thus it doesn’t have `this` of its own.

It’s not bound to `this` of the `obj` object and when we try to get `this.id` it will be evaluated to `undefined` and not `1`.

---

**ANSWER**: `undefined` will be logged to the console.
How to fix error 413 Request Entity Too Large in nginx
Tags: nginx, programming, linux, docker
Published: 2021-02-05 13:49:30

This error often appears when you try to upload a large file. I’ve had it recently in my project and here’s how I solved it.

<!--more-->

If you’re using **nginx** as a reverse proxy, then you should be aware of the fact that there’s a limit to the size of the body in the HTTP requests.

Sometimes it defaults to **2MB**, and sometimes it’s even smaller.

In any case, if you’ve already got the error `413 Request Entity Too Large`, this means you either make your request body smaller or simply increase the threshold for the max body size.

## Regular **nginx** installation

If the nginx is installed on your server regularly, then you should edit the configuration file inside the `/etc/nginx/conf.d` directory.

Look for the key `client_max_body_size`.

If it’s already present, then change its value to something that fits you. For example, `client_max_body_size 25m;` will set the max body size limit to 25MB.

## Dockerized **nginx**

If you have the nginx installed as a docker container with something like `jwilder/nginx-proxy`, then you’ll need to take a different approach.

List all the volumes bound to your `nginx` container and find the one mapped to the `/var/lib/docker/volumes/nginx_vhost` directory.

In this volume, you should see a single folder `_data` and a file `default` inside of it.

Simply add the same line that sets the max body size for the HTTP requests to it and you’ll be good to go:

```bash
client_max_body_size 25m;
```

If the file `default` doesn’t exist - go ahead and create it. And if you need a different limit to the max body size, you can change it to your preference as well.
CSS Combinator Selectors
Tags: css, webdev, uiweekly, design
Published: 2021-02-05 13:34:46

### .abc.xyz
> Chained Class Selector : will select elements that have both class names.
```
.nav__item.selected {
   color : #fff;
}
```


###<br> .abc .xyz
> Descendant Selector : will select all matching elements inside parent element.
```
.div img {
   width : 100%;
}
```

###<br> .abc > .xyz
> Direct Descendant Selector : will select only direct children of the parent and ignore elements that are nested further.
```
.nav > .li {
   font-size : 2rem;
}
```

###<br> .abc + .xyz
> Adjacent Sibling Selector : will select first element immediately preceded by the former element.
```
.list-item + .list-item {
   color : #3254a8;
}
```

###<br> .abc ~ .xyz
> General Sibling Selector : will select all sibling elements on the same level.
```
.container ~ p {
   font-size : 2rem;
}
```
<br>_Save it_. Its time to show your CSS skills!
Friendly CLI: a modern C++ library for Linux
Tags: showdev, cpp, linux
Published: 2021-02-05 13:32:08

Hello community! Let me introduce a lightweight library that doesn't require external dependencies. It provides following main classes.
- `Terminal`. Use it to find out terminal abilities, such as width or how many colors does it support.
- `Text`. Provides an easy-to-use API for text formatting: change style, foreground and background colors.
  ![Colorize and stylize anything](https://raw.githubusercontent.com/lem0nez/friendly-cli/main/images/colorize-and-stylize-anything.png)
  By using the `Palette` class you can create your own theme or choose one of the built-in using the `Theme` class.
- `Progress`. Create and customize progress bars.
  ![Downloading the Internet](https://raw.githubusercontent.com/lem0nez/friendly-cli/main/images/downloading-the-internet.png)

To see full description and code examples, go to the project's GitHub page.
{% github lem0nez/friendly-cli no-readme %}
Thank you for attention!
How to Install Gradle on AlmaLinux 8
Tags: gradle, linux, almalinux, technology
Published: 2021-02-05 13:31:09

In this tutorial, we’ll discuss about how to install Gradle on AlmaLinux 8.

Gradle is an open-source build automation tool focused on flexibility and performance. Gradle build scripts are written using a Groovy or Kotlin DSL. Read about Gradle features to learn what is possible with Gradle.

<strong>Prerequisites</strong>
A <a href="https://www.hostnextra.com/kb/how-to-install-gradle-on-almalinux-8/">AlmaLinux 8 installed dedicated server</a> or <a href="https://www.hostnextra.com/vps-hosting.html">KVM VPS</a>.
A root user access or normal user with administrative privileges.

Let’s get started with the installation.

Learn more: <a href="https://www.hostnextra.com/kb/how-to-install-gradle-on-almalinux-8/">Install Gradle on AlmaLinux 8</a>
Wednesday JavaScript Challenge
Tags: javascript, challenge, wednesday, community
Published: 2021-02-05 13:08:33

*(check out [my blog](https://raffaelepizzari.com/))*

Hello everyone,

last week [Mel](https://twitter.com/_moodybones) has started a nice initiative called "**Wednesday JavaScript Challenge**" in [CodeJourneys](https://codejourneys.org/) (a dev community). 

Every Wednesday in February 2021 we are going to work on a JS challenge from the book "[Eloquent JavaScript](https://eloquentjavascript.net/)" by Marijn Haverbeke.

Everyone is welcome to share their solution on [GitHub](https://github.com/codejourneys-org/wednesday-javascript-challenge) (adding the solution to any “challenge”), on [JsBin](https://jsbin.com/?html,output) or just in our [Slack channel](https://join.slack.com/t/codejourneys/shared_invite/zt-kreea6v7-s~xMerv7Ek2kHPCDcOAx3Q).

Once a week we [meet each other on Slack and Zoom](https://join.slack.com/t/codejourneys/shared_invite/zt-kreea6v7-s~xMerv7Ek2kHPCDcOAx3Q) and talk about the solutions together. 

**No matter how much experience you have, everyone is very welcome.**

Have a nice day! :sunny:
Daily Developer Jokes - Friday, Feb 5, 2021
Tags: jokes, dailydeveloperjokes
Published: 2021-02-05 13:00:26

---
title: "Daily Developer Jokes - Friday, Feb 5, 2021"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Friday%2C%20Feb%205%2C%202021"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e12592cb43a5.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ What did the Class say in court when put on trial?

___A:___ I strongly object!
 -->
Day 32:100DaysOfCode
Tags: 100daysofcode, programming, productivity
Published: 2021-02-05 12:55:38

exams are close so studied some semester subjects...

leetcode ques on dp nd bst(easy nd medium)
trapping rain water algo studied.

practised some ques from past contest of codeforces
gave one contest on codechef was particularly based on pattern ques was able to solve 3 out of 8 in 45 mins...


EOD
You can Follow me->
https://github.com/singhtaran1005
https://www.linkedin.com/in/taranpreet-singh-chabbra-27517918a/
Best "get together", conference, meeting software for events?
Tags: discuss, question, meetings, conferences
Published: 2021-02-05 12:51:36

---
title: Best "get together", conference, meeting software for events?
published: true
description: 
tags: discussion, question, meetings, conferences
//cover_image: https://direct_url_to_image.jpg
---

**Question:** which get together, conference, meeting software do you like most for remote events?

For example we used [confer-o-matic](https://www.conferomatic.com/) for an internal conference meeting. It was awesome, I love the gamification background of the software but also that you could stand in a group an chat with each other as soon as you got into a chat zone.