teleren/devto huggingface dataset:
Day 115 of Coding: Improving Authentication and Exploring Nested Data Structures
Tags: webdev, javascript, beginners, programming
Published: 2023-05-26 22:15:42

Hello everyone,

Today was day 115 of my #365DaysOfCode and day 15 of my #100DaysOfPython. I've been making steady progress on my ongoing project and continuing my learning journey with Python.

In my project, I focused on refining the authentication process. My goal was to make the user experience more specific and relevant depending on the user type. I realized that even though a user has a valid authtoken, it doesn't necessarily mean they should have access to all authenticated pages. For example, a freelancer doesn't need to view the authenticated pages intended for clients.

Meanwhile, in my Python course, I spent time working with nested dictionaries and lists. This topic may seem complex initially, but understanding it is crucial for managing advanced data structures. Working with these nested data structures is indeed a good mental exercise. It allows me to better handle and organize complex data, an essential skill in Python programming.
From Twitter Spaces to Independent Artists: Leading Org-Based Innovation
Tags: career, management, podcast, devops
Published: 2023-05-26 22:15:03

Imagine a future where anyone can be a musician. Now ask yourself what that has in common with building Twitter Spaces. The answer? Org-based innovation. 

On this week’s episode of Dev Interrupted, we’re joined by the talented Pablo Jablonski, the engineer responsible for leading the team behind Spaces. Today, Pablo is reshaping the music industry as the VP of Engineering at United Masters. 

In this free-flowing conversation we unravel the intricacies of building Spaces, discuss Twitter’s pivotal role in public discourse and break down some of the historic challenges faced by Twitter’s engineering team.  

Pablo also explores how United Masters is bridging the gap between artists and their dreams, empowering them to take control of their own destinies. Taking cues from his time at Twitter, Pablo and his team are building a platform that aims to dismantle the music industry’s traditional hierarchies. 

{% spotify spotify:episode:4QWPbaeaykSYgz6ZKXuXFk %}

## Episode Highlights:
* (2:00) Building Periscope & Spaces at Twitter
* (7:10) Twitter's 10 Rules for Communication
* (12:59) The impact of modeling behaviors
* (15:55) Twitter today
* (22:54) United Masters
* (26:14) Applying lessons learned at Twitter
* (34:24) Any problem can be interesting
* (37:30) Future of the music industry

[Read full episode transcription here.](https://devinterrupted.com/podcast/from-twitter-spaces-to-independent-artists-leading-org-based-innovation/)

---

***While you’re here, check out this video from our [YouTube channel](https://www.youtube.com/c/DevInterrupted?sub_confirmation=1), and be sure to like and [subscribe](https://www.youtube.com/c/DevInterrupted?sub_confirmation=1) when you do!***

{% youtube dePEa-x48kc %}

---

## A 3-part Summer Workshop Series for Engineering Executives
Engineering executives, [register now](https://linearb.io/events/2023-summer-series/?utm_source=Dev.to&utm_medium=referral&utm_campaign=202306%20-%20Event%20-%20Summer%20Series%20-%20Podcast%20Distribution) for LinearB's 3-part workshop series designed to improve your team's business outcomes. Learn the three essential steps used by elite software engineering organizations to decrease cycle time by 47% on average and deliver better results: Benchmark, Automate, and Improve.

Don't miss this opportunity to take your team to the next level - [save your seat today](https://linearb.io/events/2023-summer-series/?utm_source=Dev.to&utm_medium=referral&utm_campaign=202306%20-%20Event%20-%20Summer%20Series%20-%20Podcast%20Distribution).

[![Register Today](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nd6b3egikvnssdi9x50g.png)](https://linearb.io/events/2023-summer-series/?utm_source=Dev.to&utm_medium=referral&utm_campaign=202306%20-%20Event%20-%20Summer%20Series%20-%20Podcast%20Distribution)
Easy login and sign up in php and database mysql [simple way]
Published: 2023-05-26 06:57:50

in this article we discuss about how to make a simple login and signup form in php with database mysql

## 1st step

```
<html>  
<head>  
    <title>PHP login system</title>  
    // insert style.css file inside index.html  
    <link rel = "stylesheet" type = "text/css" href = "style.css">   
</head>  
<body>  
    <div id = "frm">  
        <h1>Login</h1>  
        <form name="f1" action = "authentication.php" onsubmit = "return validation()" method = "POST">  
            <p>  
                <label> UserName: </label>  
                <input type = "text" id ="user" name  = "user" />  
            </p>  
            <p>  
                <label> Password: </label>  
                <input type = "password" id ="pass" name  = "pass" />  
            </p>  
            <p>     
                <input type =  "submit" id = "btn" value = "Login" />  
            </p>  
        </form>  
    </div>  
    // validation for empty field   
    <script>  
            function validation()  
            {  
                var id=document.f1.user.value;  
                var ps=document.f1.pass.value;  
                if(id.length=="" && ps.length=="") {  
                    alert("User Name and Password fields are empty");  
                    return false;  
                }  
                else  
                {  
                    if(id.length=="") {  
                        alert("User Name is empty");  
                        return false;  
                    }   
                    if (ps.length=="") {  
                    alert("Password field is empty");  
                    return false;  
                    }  
                }                             
            }  
        </script>  
</body>     
</html> 
```

## 2nd step

```
<?php      
    $host = "localhost";  
    $user = "root";  
    $password = '';  
    $db_name = "mydb";  
      
    $con = mysqli_connect($host, $user, $password,$db_name);  
    if(mysqli_connect_errno()) {  
        die("Failed to connect with MySQL: ". mysqli_connect_error());  
    }  
?>  
```
Single-Digit Spotlight v1
Tags: singledigit
Published: 2023-05-26 21:19:33

---
title: Single-Digit Spotlight v1
published: true
description: A selection of posts published on DEV that haven't yet received the attention they may deserve
tags: singledigit,
series: Single-Digit Spotlight
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5bxahrkbr0iba71tbp6r.jpeg
# Use a ratio of 100:42 for best results.
# published_at: 2023-05-26 13:15 +0000
---
Welcome to "Single Digit" Spotlight, a selection of articles published **_within the last week_** that have **_fewer than 10 total reactions_** (at the time of the post's publishing).

The goal is to highlight posts published on DEV that haven't yet received the attention they may deserve 🌱

Hope you enjoy!

{% embed https://dev.to/sandordargo/c23-even-more-constexpr-3iak %}

{% embed https://dev.to/remotesynth/the-art-of-the-cfp-getting-your-session-accepted-20co %}

{% embed https://dev.to/iamschulz/view-transition-api-4l4o %}

{% embed https://dev.to/pmbanugo/how-to-measure-your-servers-round-trip-time-in-remix-react-4kj2 %}

{% embed https://dev.to/areknawo/start-programming-blog-in-minutes-with-astro-and-vrite-e5l %}

{% embed https://dev.to/antjanus/accessibility-labels-for-content-loading-in-react-hib %}

{% embed https://dev.to/bengreenberg/unlocking-github-codespaces-for-workshops-344o %}

Shout out to @sandordargo, @remotesynth, @iamschulz, @pmbanugo, @areknawo, @bengreenberg, and @antjanus.
---
<a href="https://www.freepik.com/free-photo/golden-number-one-with-gold-crown-top-floor-champion-winner-yellow-background-by-3d-render_25829004.htm#query=spotlight%20on%20a%201&position=38&from_view=search&track=ais">Image by DilokaStudio</a> on Freepik
Basic Introduction to SQL
Published: 2023-05-26 21:01:42

MySQL is a widely recognized, freely available, and open-source database application that is highly regarded for its exceptional performance, user-friendly interface, and robust data security measures. As a result, it has become a preferred choice for many seeking a reliable database solution.
This comprehensive guide will walk you through the process of creating tables in MySQL, as well as inserting data into them. Additionally, you will learn about various techniques for querying the data stored within these tables.

**Step 1:Creating a database **

```
1. Create a database using the CREATE statement:
  CREATE DATABASE movies;
2. To verify that the database was created use the SHOW statement;
  SHOW DATABASES;
3. Select the database to make changes to it by using the USE statement:
 USE movies;
```
**Step 2**

```
Step 3: Create a Table
We’ll create a table containing information about movies:
CREATE TABLE movies(title VARCHAR(50) NOT NULL,genre VARCHAR(30) NOT NULL,director VARCHAR(60) NOT NULL,release_year INT NOT NULL,PRIMARY KEY(title));

- Verify that the table is created using the DESCRIBE command:
DESCRIBE movies;

Insert movie information in column order – title, genre, director, and release year. Use the INSERT command:
INSERT INTO movies VALUE ("Fast and furious X", "action", "Justin Lin", 2023);

- Use the SELECT command to display the table:
   SELECT * FROM movies;
```
**Step 3: Create a view**
Views are SQL queries that display data based on defined parameters.

1. Create a view named minimum_release_year to display movie titles whose release year is after 1990. Use the CREATE VIEW command and define query parameters:

CREATE VIEW minimum_release_year AS SELECT title FROM movies WHERE release_year > 2002;
2. Display the view using the SELECT command:
 SELECT * FROM minimum_release_year;
The output displays movies released after the year 2002.
#DEVDiscuss: Developer Portfolios
Tags: devdiscuss, design, webdev
Published: 2023-05-26 20:00:00

Hey Devs, happy Friday 🦥💚

First off, a shoutout to my human colleage @RachelFazio for designing a snazzy new header for my weekly discussion post! 🤩

Ok, now for the hot topic of the day: I want to discuss...**developer portfolios**.

I got a message in my inbox this week about the importance of building a portfolio when you're applying for jobs:

> As a beginner dev, do I need to write a blog and have an online presence in order to attain a career in software development? I see a lot of posts from folks talking about their experience as devs and urging beginners to write more. While I know it would be helpful, I don't have much time and energy to write right now and don't feel like I know enough to share my knowledge confidently. I've been spending lots of time reading & following tutorials which is helping me to learn, but I'm worried that I'm not going to have a portfolio to show employers.

This question made me think of a recent post from Community Member @abbeyperini about designing your developer portfolio:

{% embed https://dev.to/abbeyperini/from-idea-to-design-for-non-designers-m6d %}

It sure seems like a lot of unpaid work to do...just to get a paying job! At the same time, it's good practice, especially if you're a web developer. So, I'm wondering:

- If you have landed a dev job with the help of a portfolio, what did you include to stand out? A website, blog posts, something else?
- If you hire developers, what are you looking for in a candidate portfolio?

What do you think? Share your thoughts in the comments and let's discuss!

---

_Want to submit a question for discussion, or even ask for advice? Visit [Sloan's Inbox](https://forms.gle/VNG7TpJ3uFLrGJYW8)! You can choose to remain anonymous._
Explore $lookup operator
Tags: mongodb, mongoose
Published: 2023-05-26 06:52:09

প্রথমে দুইটি কালেকশন নিয়ে নেই, 

একটি salim1 =

```
{
	"_id": ObjectId("646f441324e5cc15f7f1ee0c"),
	"name": "salim al sazu",
	"email": "sazusalim@gmail.com",
	"class": "X"
}
```

আরেকটি  salim2 =  

```
{
	"_id": ObjectId("646f485a24e5cc15f7f1ee10"),
	"userEmail": "sazusalim@gmail.com",
	"roll": "546545423",
	"marks": {
		"bangla": 100
	}
}
```

এদের উপর $lookup চালাবো । 

একটা ডাটাবেস থেকে আরেকটা ডাটাবেসে কোন একটা ফিক্সড প্রপার্টির মাধ্যমে কানেক্ট করে যখন অন্যান্য ডাটা গুলো নিয়ে আসা হয় তখন লুক আপ বলে। 

যেমনঃ আমরা ইমেল দিয়ে তা করতে পারি। 

এই জিনিসটা আমরা খুব সহজে এগ্রিগেট এর মাধ্যমে করতে পারি। প্রথমে //db.salim1.aggregate([]) নিয়ে এর ভিতর  { $match:{}} নিবো, কারণ মেইল দিয়ে তা ম্যাচ করাবো। 

এখন আমাকে  {$lookup: {}} চালাতে হবে । 

লুক আপ এর ভিতর প্রথমে from: "salim2" কালেকশন নাম দিবো, যে কালেকশন থেকে আমি ডাটা নিয়ে আসবো। 

তারপর  যে কালেকশনের উপর এগ্রিগেট চালানো হয়েছে সেই কালেকশনের email প্রপার্টি হবে localField আর অন্য আরেকটি কালেকশন থেকে অর্থাৎ “salim2” থেকে যে ডাটা নিয়ে আসতেছি  তার ইমেল প্রাপার্টি হবে foreignField । এর প্রপার্টি নাম দিবো userEmail বা যা নাম থাকবে সেই নাম দিবো । সর্বশেষে  as ব্যবহার হবে কারণ ডাটা গুলো কি নামে সেভ হবে তাই এখানে "examResult" ব্যবহার করা হয়েছে । examResult নামে একটা প্রাপার্টি এড হবে এবং এর ভিতর ডাটা গুলো অব্জেক্ট থাকবে । 

আমরা চাইলে localField: "_id",  এবং foreignField: "userId", ব্যবহার করতে পারি। 

যদি $lookup চালাইঃ 

```
///db.salim1.aggregate([
    {$match: {email:"sazusalim@gmail.com"}},
    {$lookup: {
          from: "salim2",
          localField: "email",
          foreignField: "userEmail",
          as: "examResult"
         }}
    ])
```

রিজেল্ট পাবো এই ভাবেঃ

```
///{
	"_id": ObjectId("646f441324e5cc15f7f1ee0c"),
	"name": "salim al sazu",
	"email": "sazusalim@gmail.com",
	"class": "X",
	"examResult": [
		{
			"_id": ObjectId("646f485a24e5cc15f7f1ee10"),
			"email": "sazusalim@gmail.com",
			"roll": "546545423",
			"marks": {
				"bangla": 100
			}
		}
	]
}
```

ধন্যবাদ !
Graph Database Models
Tags: graphql, database
Published: 2023-05-26 06:36:47

**Introduction:**
Graph databases have gained significant popularity in recent years due to their ability to efficiently manage highly connected data and relationships. In this blog post, we will delve into the world of graph database models, exploring their components, characteristics, and how they differ from traditional relational databases. By understanding the various graph database models available, you can make informed decisions when choosing the right model for your data and application requirements.

**Property Graph Model:**
The property graph model is the most common and widely adopted graph database model. It represents data as nodes, relationships, and properties, making it intuitive and easy to understand. We will explore the key components of the property graph model, including nodes, relationships, labels, and properties, along with their role in representing complex real-world relationships.

**RDF Graph Model:**
The RDF (Resource Description Framework) graph model, on the other hand, focuses on representing data as subject-predicate-object triples. It provides a standardized way to express relationships between resources on the web. We will discuss the basics of the RDF model, exploring its components, such as resources, properties, and URIs, and how it enables interoperability and data integration across different systems.

**Comparison and Considerations:**
Next, we will compare the property graph and RDF graph models, highlighting their strengths, weaknesses, and ideal use cases. Understanding the trade-offs between the two models will help you choose the most suitable one for your specific requirements. We will discuss factors such as data complexity, query flexibility, scalability, and ecosystem support.
**
Hybrid and Extended Models:**
In addition to the two primary graph database models, we will touch upon hybrid models that combine elements of both property graphs and RDF graphs. These models offer flexibility and versatility, allowing users to leverage the strengths of multiple graph representations. We will also explore any emerging graph database models or extensions that are gaining traction in the industry.

**Choosing the Right Model:**
Finally, we will provide guidelines and best practices for selecting the right graph database model based on your project's requirements. Factors such as data structure, query patterns, performance considerations, and existing system integrations will be discussed to help you make an informed decision.


**Conclusion:**
Graph database models provide powerful and flexible ways to represent and manage highly connected data. By understanding the nuances and characteristics of different graph database models, you can effectively leverage their capabilities to build robust and efficient applications. Whether it's the intuitive property graph model or the interoperable RDF graph model, selecting the right model is crucial for the success of your graph database implementation.
Champs Recap: Award-Winning dbForge Database Solutions in Q1 2023
Tags: database, dbforge, dbforgeawards, databasetools
Published: 2023-05-26 19:50:26

It's time to sum up the results of the first quarter of 2023 and present the awards received by dbForge solutions on independent review platforms during this period - https://blog.devart.com/champs-recap-award-winning-dbforge-database-solutions-in-q1-2023.html


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b34l2zphblg5b0lzzzyh.jpg)
Finally...My website!
Published: 2023-05-26 19:48:55

Hello, after countless hours of waiting I have made my GitHub pages website, please visit, and judge from 1-10. Don't forget what are the disadvantages because there will be surely something wrong, because, in my opinion, nothing is perfect. Thank you 😉😉

The website:
[mannega.github.io](https://mannega.github.io)
Complex Menus Made Easy with Doodle 0.9.2
Tags: webdev, javascript, kotlin, showdev
Published: 2023-05-26 19:33:32

## Version [0.9.2](https://github.com/nacular/doodle/releases/tag/v0.9.2) brings menus, more text-field customization, and more...

* [Menus](https://nacular.github.io/doodle/docs/ui_components/overview#menu)
* More TextField Customization using [`purpose`](https://nacular.github.io/doodle-api/controls/io.nacular.doodle.controls.text/-text-field/purpose.html)
* More flexible scroll management (Web)

[**Doodle**](https://github.com/nacular/doodle) is a pure Kotlin UI framework for the Web (and Desktop), that lets you create rich applications without relying on Javascript, HTML or CSS. Check out the [documentation](https://nacular.github.io/doodle) and [tutorials](https://nacular.github.io/doodle-tutorials) to learn more.
A Detailed Comparison of Beekeeper Studio and dbForge Edge
Tags: database, databasetools, databaseide, dbforgeedge
Published: 2023-05-26 19:05:15

In this article, you'll find a side-by-side comparison of Beekeeper Studio and dbForge Edge - a multi-database suite of four comprehensive IDEs that have been designed to provide maximum functionality for the most demanding database users - https://www.devart.com/dbforge/edge/beekeeper-studio-alternatives.html

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/80uk2cv90uu3ai9rq9cm.png)
How to Detect a Click Outside of a React Component using Hooks?
Tags: react, reacthooks, useeffect, usere
Published: 2023-05-26 18:55:14

As web developers, we may come across situations where we might have to detect when a user clicks outside of a specific element, such as a modal or dropdown menu. This can be useful for closing the element or triggering some other action when the user clicks outside of it.

In React, you can detect a click outside of a component by using a technique called "event bubbling" or "event capturing". This involves attaching an event listener to the document object and checking if the click target is outside of the component. 

In this blog post, we'll understand how to detect a click outside of a React component using the [`useRef`](https://www.knowledgehut.com/blog/web-development/react-useref) and [`useEffect`](https://tekolio.com/explaining-useeffect-hook-in-react/) hooks in a step-by-step fashion using an example problem as it is better to understand things using practical examples.

Let’s start, but first to create a React app to understand this concept.

## Index

1. Creating the React App
2. What are we making?
3. Working on the App
4. Detecting the Outside Click of a functional component
5. Use a React Ref to Create a Clickable Area
6. Creating an event listener for the clickable area
7. Checking if the click is outside of the React component
8. logic inside the if statement.
9. Different Ways using which we can Detect a Click Outside of a React Component
10. Conclusion
11. Frequently Asked Question

## What are we making?
In this app, we will be making a counter app that contains a button wrapped up by a div. The initial value of the counter is 0. With each button click, the value of the counter gets increased by 1, while will decrease if anything other than the button and the wrapper element div is clicked.  See the gif below to understand

![Detecting a click outside a component](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f6rtomf908vzf5ri67zn.gif)

[Continue Reading...](https://tekolio.com/how-to-detect-a-click-outside-of-a-react-component-using-hooks/)
Code Smell 214 - Duplicate Parameter Names
Tags: webdev, javascript, beginners, programming
Published: 2023-05-26 18:55:10

*Two arguments of the same type. Two equal names*

> TL;DR: Turn on Strict Checks

# Problems

- Unexpected errors

- Ambiguity

- The Least Surprise Principle violation

- Portability

# Solutions

1. Enable [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode)

2. Use role-naming arguments

# Context

Most compilers forbid duplicate parameters since they are a common mistake in a large parameters list

# Sample Code

## Wrong

[Gist Url]: # (https://gist.github.com/mcsee/d7f79fb931bf07d11b28a4f6ca4d2239)
```javascript
function addNumbers(a, b, a) {
  console.log(a + b);
}

addNumbers(2, 3, 4);

// Outputs 7 (2 + 3 + 2)
```

## Right

[Gist Url]: # (https://gist.github.com/mcsee/1fc2681a474de57d2b124b709df9137a)
```javascript
"use strict";

function addNumbers(a, b, a) { }
//                          ^
// SyntaxError: Duplicate parameter name not allowed in this context
```

# Detection

[X] Automatic 

By enabling strict mode, the compiler will warn us

# Tags

- Naming

# Conclusion

Enable the stricter modes you can find on your compilers.

Try to [fail fast](https://dev.to/mcsee/fail-fast-48dm) and catch errors as early as possible and leave the hard and dumb work to the tools.

# Relations

{% post https://dev.to/mcsee/code-smell-188-redundant-parameter-names-8cf %}

{% post https://dev.to/mcsee/code-smell-65-variables-named-after-types-9da %}

# More Info

[Sonar Source](https://rules.sonarsource.com/csharp/RSPEC-3872)

[Mozilla Org](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode)

{% post https://dev.to/mcsee/fail-fast-48dm %}

# Disclaimer

Code Smells are my [opinion](https://dev.to/mcsee/i-wrote-more-than-90-articles-on-2021-here-is-what-i-learned-1n3a).

# Credits

Photo by [Caroline Veronez](https://unsplash.com/@carolineveronez) on [Unsplash](https://unsplash.com/photos/bbjmFMdWYfw)
    
* * *

> One of the things I've been trying to do is look for simpler or rules underpinning good or bad design. I think one of the most valuable rules is avoiding duplication. "Once and only once" is the Extreme Programming phrase.

_Martin Fowler_ 
 
{% 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 %}