teleren/devto huggingface dataset:
Next JS - Google sheet to E-commerce store
Published: 2022-10-14 06:58:11


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4nvmjck877adteg0oavm.png)


In this series, we will build an online store using Google Sheet as the data-source.

⚛️ Building an online store
🧑‍🎨 Designing the layout with MUI V5
📝 Consuming/ Fetching data from a Google Sheet
📚 Category filter based on the genre of books
🔔 Send message to a Slack channel on every new order
💾 Using [Deta](https://www.deta.sh/) Database for temporary storage
✉️ E-Mail account Verification (Nodemailer and Gmail Service)


[Live Demo](https://gsheet-bookstore-tut.vercel.app/) 

[Project Details](https://www.desicodes.io/projects/gsheet-to-store) 

[Youtube Playlist ](https://www.youtube.com/playlist?list=PLmA3URVkjqnneH6bzeFia7HXaZh4ehSAL)
Nivito website
Published: 2022-10-14 06:56:11

[Nivito website](https://www.nivito.fr/) Le robinet de salle de bain Nivito est la touche finale parfaite à votre concept de maison confortable et élégant. Ce robinet haut de gamme présente une finition chromée et un design élégant et moderne qui complètera n'importe quel décor. La poignée unique facilite le réglage de la température et du débit de l'eau, tandis que l'aérateur intégré conserve l'eau sans sacrifier les performances. Avec son apparence raffinée et sa fonctionnalité supérieure, le robinet de salle de bain Nivito sera assurément un ajout bienvenu à votre maison.
Cryptocurrency App Development Company
Tags: cryptocurency, omninos
Published: 2022-10-14 06:43:54

Cryptocurrency App Development Company is a subset of digital currency designed to serve as an exchange mechanism for secure online transactions via cryptography. Bitcoin is the world's first decentralized record currency. It has been a huge success, with a good response from the global community. It has prepared the path for the emergence of new cryptocurrencies. These digital currencies are also known as Bitcoin forks.Many companies, banks, economists, and governments understand the importance of cryptocurrency app development. A well-known initiative known as a Blockchain development project has also been launched by some firms. The Omninos solution assists organizations and entrepreneurs in incorporating cryptocurrency applications into their systems. We are glad to declare that we have a team of bitcoin developers who are professionals in the development of cryptocurrency apps.
Visit us:  https://omninos.com/cryptocurrency-app-development-company
HOW SEO HELPS YOUR BUSINESS GROW
Tags: seo
Published: 2022-10-14 06:43:05


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pc07utxk8tq1ztv9l33b.jpg)
Maintaining a business or organization is not easy in this competitive world. Advertising and branding are important terms for the growth of companies. Previously, posters, pamphlets, radio announcements, and television ads were cost-effective and failed to reach exact relative audiences. Today’s world has moved to online platforms for all purposes, which has created a new era.

Digital marketing plays a significant role in ensuring your message reaches the right audience at the right time and in the right place. SEO plays a crucial role in the growth of a business. For this reason, SEO is so essential for business growth. In this article, I had presented my view on [how SEO helps your business grow](https://absyz.com/how-seo-helps-your-business-grow/).
Acrylic fibers market Size, Share, Demand and Forecast to 2028
Tags: acrylic, fibers, market
Published: 2022-10-14 06:38:38

The Global Acrylic Fibers Market was valued at USD 3,413.7 Million in 2020 and is expected to rise at CAGR of 4.3% from 2021-2026 to become USD 4,331.3 Million by 2026. Increasing per capita income with continuously changing fashion trends is driving the fibers market. There has also been continuous technological advancement which is helping in bringing down the cost and ultimately increasing the growth of the market.
Announcing TremorCon 22' 📣
Tags: tremor, community, opensource, tremorcon
Published: 2022-10-14 06:36:16

## What’s Tremor ? 🔗
Tremor is an open-source early-stage event processing system for unstructured data with rich support for structural pattern-matching, filtering and transformation.

Since the spring of 2021, Tremor has continually participated in the LFX Mentorship program, under CNCF to guide developers looking to get involved in open-source projects.

## TremorCon and Aviyel ✨
After a tremendously successful TremorCon 2021, we are eager to showcase some of our mentees' contributions during the past year, as well as a few of our industry use-cases. It's officially annual now. Come on, let's go to TremorCon 2022- it'll be fun!

## Itinerary For The Day 📅
11:00 AM

**Outlining a UI for Tremor**
We will present a prototype UI for Tremor, its motivation, explore the design decisions behind the implementation, fantasize about future work and see it in action.

11:30 AM

**Shaking up the realtime stack**
the various patterns and pieces I've replaced with tremors

12:00 PM

**Coffee Break**
Tea works too

12:30 PM

**Rust, the best and worst thing to happen to Tremor**
Implementing Tremor's plugin system has been the best way to learn all about Rust. Join me in this talk to learn how Rust shaped the final design, both through the fun and not-so-fun times.

1:10 PM

**Docusaurus to the Rescue: A New Era for Tremor's Documentation**
With the different content sources for Tremor's different content forms, things were bound to get ugly fast. Enter Docusaurus- and now, you can find everything in one place. Quite pleasantly too.

1:30 PM

**Lunch Break (1h)**
Have some snacks and get energy for the second half of the day

2:30 PM

**Patching up a fragmented env with OTEL and Tremor**
We'll look into how we're using OTEL and Tremor to standardize our Logging infrastructure to be compliant to our Non-Functional Requirements.

3:00 PM

**How I made tremor's release process boring by automating it 👨‍💻**
Why do we need automation? Because no one loves repeating the same processes over and over again! So I decided to take tremor's long checklist process of manual release, and converted it into a single-click automated release! I'll also be talking about my experience working with tremor and its amazing community.



## Speaker Lineup

- Ben Gamble

- Mariano Guerra

- Prashant Mishra

- Sharon Koech

- Mario Ortiz Manero

- Endre Karlson

- Natali Vlatko

- Heinz Gies

- Darach Ennis

- Matthias Wahl

RSVP - https://aviyel.com/post/3821/announcing-tremorcon-22

Can’t wait to see you all !!❤
2 Weeks of Hacktoberfest, How is it going??
Tags: hacktoberfest, opensource, showdev, discuss
Published: 2022-10-14 06:23:47

Hi friends👋🏻,

**I completed my Hacktoberfest Mission with 4 Pull Request ( 1 accepted and 3 pendings just for a bunch of hours ).**

**_And you? How is it going?_** ( comment to tell me yours ). 

I would remind you that I'm partecipating at Hacktoberfest mainly as a maintainer.

My main project, that partecipates for the second year to the Hacktoberfest, is the **CXXGraph**:

*Header-Only C++ library for Graph Representation and Algorithms with a simple interface.*

{% github ZigRazor/CXXGraph %}

Then I have some side projects someone that partecipate to the Hacktoberfest for the first time. The projects are in C++ and Python, but you can contribute also with documentation Pull Request or other things that gives values to the projects.
The project are the followings:

*A C++ Library that give microservice framework ( Server / Client ) upon 0mq framework.*

{% github ZigRazor/CXXMicroservice %}

*A Python implementation of simply configurable State Machines.*

{% github ZigRazor/PyStateMachine %}

*A library in C++ to manage multi threading and parallel applications.*

{% github ZigRazor/MTL %}

*A C++ Library to which implements the structures and algorithms for finite automata, pushdown automata, and Turing machines.*

{% github ZigRazor/CXXAutomata %}

You can visit the issues pages of each projects to see the open issues and you can ask me all you need to understand the project goal, the issue problem, or anything you need to contribute.

In the next days I will open some other issues on the projects, that can be important to improve the projects and give the possibility to get involved also to the novice of the Open Source.

For any info you can contact me at zigrazor@gmail.com
If you want open an issue on the projects feel free to do it.
**All contributiuons are appreciated.**

Happy Coding! 💻
and Happy Hacktoberfest!
BOM & DOM
Tags: javascript, webdev, beginners, tutorial
Published: 2022-10-14 06:07:02

BOM refers to **Browser Object Model** while DOM refers to **Document Object Model.**.

## BOM

BOM often defined as a set of JavaScript browser objects . We can access BOM via a **window** object . So let's say if we open up inspector tool and type console.log(window) , we can view the list of methods as well properties.

Image..
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/you7vl154wkel769i3hz.png)

## DOM

DOM refers to your HTML in JavaScript. So let's open the  inspector tool , click on the “Elements” tab and you’ll see the DOM.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0wfyv785fysrk5cpssdf.png)


We can access dom  properties with document object


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mu3rme5qdjqsnepoqhtr.png)


Happy Learning
Delete the Middle Node of a Linked List
Tags: javascript, leetcode
Published: 2022-10-14 06:03:17

You are given the head of a linked list. Delete the middle node, and return the head of the modified linked list.

The middle node of a linked list of size n is the ⌊n / 2⌋th node from the start using 0-based indexing, where ⌊x⌋ denotes the largest integer less than or equal to x.

For n = 1, 2, 3, 4, and 5, the middle nodes are 0, 1, 1, 2, and 2, respectively.
 
Example 1:
Input: head = [1,3,4,7,1,2,6]
Output: [1,3,4,1,2,6]
Explanation:
The above figure represents the given linked list. The indices of the nodes are written below.
Since n = 7, node 3 with value 7 is the middle node, which is marked in red.
We return the new list after removing this node. 

Example 2:
Input: head = [1,2,3,4]
Output: [1,2,4]
Explanation:
The above figure represents the given linked list.
For n = 4, node 2 with value 3 is the middle node, which is marked in red.

Example 3:
Input: head = [2,1]
Output: [2]
Explanation:
The above figure represents the given linked list.
For n = 2, node 1 with value 1 is the middle node, which is marked in red.
Node 0 with value 2 is the only node remaining after removing node 1.


```js
/**
 * Definition for singly-linked list.
 * function ListNode(val, next) {
 *     this.val = (val===undefined ? 0 : val)
 *     this.next = (next===undefined ? null : next)
 * }
 */
/**
 * @param {ListNode} head
 * @return {ListNode}
 */
var deleteMiddle = function(head) {
  let fast = head;
    let slow = head;
    let dummy = new ListNode(); //to deal with edge case that we need to delete the head node
    dummy.next = head;
    
    let prev = dummy;
    
	//both pointers travel
    while(fast && fast.next){
        fast = fast.next.next;
        prev = slow;
        slow = slow.next;
    }
    
	//delete the node
    while(slow.next){
        slow.val = slow.next.val;
        prev = slow;
        slow = slow.next;
    }
    
    prev.next = null;
    return dummy.next;
};
```
Next.Js Security: Ooh, You Aren’t Supposed To Access That
Tags: nextjs, javascript, typescript, security
Published: 2022-10-14 05:43:57

Dear Next.js Afficionado,

Are you aware that there are bad people who make money by getting access to expensive stuff like online courses, software, etc., and later reselling them for peanuts?

What shm**ks, right?

So if you have valuable files that you want to give away to subscribers or customers only, then you need to protect those files.

For example, let’s say your employer creates a detailed guide that helps the customers solve a specific problem. They want to put this guide on the website and collect emails in exchange for it.

So how do you stop the bad actors from getting its URL and putting it on social media, blogs, forums, and other public online places?

That’s the topic of my newsletter this week…

I wrote for a similar use case where I needed to restrict access to [a free template](https://buhalbu.com/nextjs/templates/nextjs-portfolio-template).

So if you are interested, [click here and discover](https://buhalbu.com/nextjs/issues/nextjs-download-file) the following:

- Three feasible ways to protect a file
- How to choose the proper protection
- Lots of code snippets
- Why you should never put valuable files in Next.Js’ public folder
- What’s a “signed URL,” and when it’s useful

This newsletter issue almost hits the 1000-word mark, so if you’re not in the mood for heavy reading… don’t have time… or opened this email on your smartphone, then you can bookmark it for later.

It’s not super urgent. Just the [typical stuff](https://buhalbu.com/nextjs/issues/nextjs-download-file) every geek likes to read about.

Be happy,
Sashe Vuchkov
A new fashion sector for 2022: Metaverse fashion
Tags: augmentedreality, fashion, node, designers
Published: 2022-10-14 05:35:37

Fashion is getting more virtual, and designers are exploring new ways to integrate augmented reality into the clothing we wear. Let’s know how?


For more information: [https://bit.ly/3SNBbXe](https://bit.ly/3SNBbXe)
How to copy to clipboard with angular material
Tags: angular, javascript, codever
Published: 2022-10-14 05:26:04

Use the `click` event to pass the text to the handling function, in this case `copyToClipboard(bookmark.location)`

```typescript
<span class="btn-light btn-sm" (click)="copyToClipboard(bookmark.location)" title="Copy link to clipboard">
  <i class="far fa-copy copy-link"></i><span class="copy-btn-text">{{copyLinkButtonText}}</span>
</span>
```

To programmatically copy a string use the `Clipboard` which service copies text to the user's clipboard.
We use a `setTimeout` to visually inform the user for a brief moment that the **copy** was successful


```typescript
import { Clipboard } from '@angular/cdk/clipboard';

export class BookmarkListElementComponent {

copyLinkButtonText = '';

  constructor(private router: Router,
              private clipboard: Clipboard) {}

  copyToClipboard(location: string) {
    const copied = this.clipboard.copy(location);
    if (copied) {
      this.copyLinkButtonText = ' Copied';
      setTimeout(() => this.copyLinkButtonText = '', 1300);
    }

  }
}
```

See it in action at [www.codever.land](https://www.codever.land):

[![Copy-to-clipboard-demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i5bb3tud51tszpfbb8ya.gif)](https://www.codever.land)

See the **reference link** (official docs) how to use it for longer texts.

<span style="font-size: 0.9rem">
  <strong>Reference - </strong>
  <a href="https://material.angular.io/cdk/clipboard/overview" target="_blank" style="font-weight: lighter">
     https://material.angular.io/cdk/clipboard/overview
  </a>
</span>

<hr/>

> Shared with :heart: from [Codever](https://www.codever.land/snippets/63465a59a89ae15f46e41c65/details). Use :point_right: [**copy to mine**](https://www.codever.land/snippets/63465a59a89ae15f46e41c65/details) functionality to add it to your personal snippets collection.
Blur Background CSS Generator
Tags: webdev, tooling, javascript, beginners
Published: 2022-10-14 05:22:07

I just released a tool to generate the CSS for a customized blur background. Afterward, you can easily copy the code and use it on your website.

[Try it out here](https://wweb.dev/resources/blur-background-css-generator/)

I'd love to hear your feedback for improvements!

You can customize the gradient background color as well as the gradient color of the circles. You can set the position and the size of the circles as well.

As everything on wweb.dev this tool is under the MIT license. This means that you can use the generated backgrounds for commercial or private projects without attribution.
Here is a demo on how it looks like:


![a demo of how the background generator works](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5aokjownjqo5rdfmaiqg.gif)


Enjoyed this tool? Help me grow by sharing it with your friends and colleagues.

Cheers, Vincent from [wweb.dev](https://wweb.dev)!
Laravel 8 Run Specific Seeder Example
Published: 2022-10-14 05:14:21

In this article, we will see the laravel 8 run specific seeder example. If you want to run only one seeder in laravel then you can run a specific seeder. 

here we will see you how to run a specific seeder in laravel 8 or how to run a seeder in laravel.

Laravel includes the ability to seed your database with data using seed classes. All seed classes are stored in the database/seeders directory. All seeders generated by the framework will be placed in the database/seeders directory.

So, let's see run specific seeder in laravel 8.

Using db:seed Artisan command you can seed your database but --class option to specify a specific seeder class to run seeder individually:

> Run Specific Seeder In Laravel 8

I have added some steps below to run a specific seeder in laravel 8. you may use the --class option to specify a specific seeder class to run individually.

```
php artisan db:seed --class=AdminSeeder
```

Now, you will find the seeder file in this file location database/seeders/AdminSeeder.php.

```
<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\Models\Admin;


class AdminSeeder extends Seeder

{
/**
* Run the database seeds.
*
* @return void
*/

    public function run()
    {

        Admin::create([

            "name" => "admin",
            "email" => "admin@gmail.com",
            "password" => bcrypt("12345")

        ]);

    }

}
``` 

Using the below command you can run all seeder in laravel. You may execute the db:seed Artisan command to seed your database. By default, the db:seed command runs the Database\Seeders\DatabaseSeeder class, which may in turn invoke other seed classes.

```
php artisan db:seed
``` 

Using the below command you can run migrate with seeder in laravel. You may also seed your database using the migrate:fresh command in combination with the --seed option, which will drop all tables and re-run all of your migrations. This command is useful for completely rebuilding your database.

```
php artisan migrate:fresh --seed
```
 
Using the below command you can run force seeder for production in laravel. To force the seeders to run without a prompt, use the --force flag.

```
php artisan db:seed --force

//To run spicific seeder

php artisan db:seed --class=AdminSeeder --force
```
VS Code doesn't work
Published: 2022-10-14 04:47:06


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wj78ms1ejuvela2pi1fx.PNG)

doesn't want Compiling at all. I switched to play in the lanuch.js file and follow a method to solve it. There is no result. I also installed MinGW, Node.js. I'm Changed the path. There is no result in the solution. Guys?
JANA in 3 days - PWA with Ionic +Capacitor + React
Tags: pwa, ionic, react, capacitor
Published: 2022-10-14 04:35:40

I present to you: [JANA](http://jana.johnboncalos.me) - my "Just Another News Aggregator" app created only after 3 days of coding in Ionic and React using [Capacitor](https://capacitorjs.com/) Plugins. The process was without a sweat. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f7cpgexgetrhmsdpe91t.png)

JANA is just a simple news aggregator with the articles coming from various RSS feeds. I decided not to display images to make it more readable and add to the simplicity and it's dark mode in default. I also decided not to collect user data but allow them to filter news sources in the settings menu and the data will be stored in the app itself using Capacitor's "Preferences" plugin.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d5hgyn4axv9iv4e51hwu.png)

Ionic's straightforward components are much easy to use with the helpful docs at your disposal. Along with Capacitor which deals with native android and iOS part you'll have a smooth sailing building your first progressive web app. The documentation is well written and super understandable.
Ternary operator in python
Tags: python, operations, c, cpp
Published: 2022-10-14 04:25:38



Ternary operator provides short and concise way to write the conditional statements and allows to evaluate and test the condition in a single line of code.

`Syntax:
true_value if condition else false_value`


Example:

```
# initialize values 
x, y = 5, 10
# expression with ternary operator 
largest = y if x<y else x
# print largest result
 print(largest)
Output
10
```

Like as ternary operator using if..else we can also implement the same using list, tuple, dictionary and lambda.

**Using List**

`Syntax:
[false_value, true_value] [condition]`

```
# initialize values 
x, y = 5, 10
# expression using List
 largest [x, y][x < y] =
# print largest result 
print(largest)
Output
10
```

**Using Dictionary**
`Syntax:
{True: true_value, False: false_value} [condition]`

```
# initialize values
 x, y = 5, 10
# expression using Dictionary
 largest = {True: y, False: x}[x < y]
# print largest result 
print(largest)
Output
10
```

**Using Lambda**
Syntax:
`(lambda: false_value, lambda: true_value) [condition] ()`

```
# initialize values
x, y = 5, 10
# expression using lambda 
largest = (lambda: x, lambda: y)[x<y](
# print largest result
 print(largest)
Output
10
```
Average of Levels in Binary Tree
Tags: javascript, leetcode
Published: 2022-10-14 04:12:58

Given the root of a binary tree, return the average value of the nodes on each level in the form of an array. Answers within 10-5 of the actual answer will be accepted.
 
Example 1:
Input: root = [3,9,20,null,null,15,7]
Output: [3.00000,14.50000,11.00000]
Explanation: The average value of nodes on level 0 is 3, on level 1 is 14.5, and on level 2 is 11.
Hence return [3, 14.5, 11].

```js
/**
 * Definition for a binary tree node.
 * function TreeNode(val, left, right) {
 *     this.val = (val===undefined ? 0 : val)
 *     this.left = (left===undefined ? null : left)
 *     this.right = (right===undefined ? null : right)
 * }
 */
/**
 * @param {TreeNode} root
 * @return {number[]}
 */
var averageOfLevels = function (root) {
  if (root === null) {
    return null;
  }
  let q = [root];
  let averageArray = [];

  while (q.length) {
    let level = [];
    let sum = 0;
    let count = 0;
    let loopTill = q.length;
    // looping only till the length of q;
    while (loopTill) {
      // removing first element from queue
      let node = q.shift();
      // adding up node val to get sum & also incrementing count tokeep track of nodes at each level
      sum = sum + node.val;
      count = count + 1;
      if (node.left !== null) {
        level.push(node.left);
      }
      if (node.right !== null) {
        level.push(node.right);
      }
      // reducing value as we have remove first element using shift() above
      loopTill--;
    }
    //get average of this level
    let averageOfLevel = sum / count;
    averageArray.push(averageOfLevel);

    q = level;
  }
  return averageArray;
};

```