teleren/devto huggingface dataset:
Difference between props and state in React.js
Tags: react, javascript, webdev, beginners
Published: 2024-02-08 14:38:03

When learning React.js, some of the first and most important concepts you will learn are props and state. One of the issues faced by beginners is not knowing the difference between props and state and when to use them.

This article will teach us the difference between props and state and when to use them.

#Difference between props and state 

##Props

- Props are like arguments used to pass data from parent to child components.
- Props are immutable; they can't change once they've been set. 
- Props are used in both functional and class components.
- You use `this.prop` to access props in class components as well as an argument in functional components.

## State:

- A state is like a component memory used to store and change data within a component.
- State is mutable; its data can change at any time.
- State is only present in class components. Functional components can only use state using React hooks.
- You use `this.state = {...}` to initialize the constructor of a class component and the `useState()` method to change it.


#When to use props and state

You use props whenever you want to parse data from parent to child components. You use state to store and change data within a component. 

You can use Props to parse state data from parent to child components.

#Conclusion
Now that you know the difference between props and state and when to use them, I urge that you practice using them on many easy projects. You might not get the hang of it at first, but with continuous practice, you will get better and master using them in no time.

Also, learn and practice other React concepts like events, conditionals, and hooks to get better at React.js.
Thank you
And 
Happy Hacking.
Creative Code on CodePen | Available for Collaboration and Projects! 🚀
Tags: css, webdev, frontend, french
Published: 2024-02-08 14:37:56

Check out some of my latest experiments in CSS, HTML, and JS on CodePen! If you're interested in collaboration, or if you need a bit of assistance with your code, feel free to reach out via email at telumire@gmail.com.

[👉 CodePen Collection](https://codepen.io/collection/Rzvekr)

Let's innovate together and bring your ideas to life! 🖥️✨
INTRODUCTION TO ML
Tags: ml101
Published: 2024-02-08 14:15:43

Machine learning is a subfield of artificial intelligence that focuses on developing algorithms and statistical models to enable computers to learn from and make predictions or decisions based on data. It involves training machines to improve their performance over time without being explicitly programmed. Machine learning has various applications across industries like finance, healthcare, and technology. Professionals need to understand the potential and challenges of machine learning, as it is increasingly integrated into various aspects of business and society.
Machine learning can be broadly categorised into supervised and unsupervised learning, each involving different algorithmic approaches. The field has seen significant growth due to advancements in computing technologies, which have enhanced scalability and efficiency. Moreover, the increasing data availability has further propelled the adoption of machine learning in diverse domains.
The importance of machine learning is evident in its ability to improve existing processes, predict business performance, and reduce risks across different sectors. As a result, the demand for skilled AI professionals continues to rise. Individuals must stay informed about the various types of machine learning algorithms, the associated challenges, best practices, and their future implications.
Machine learning is a critical and rapidly evolving field, reshaping how businesses and industries operate. As it becomes more ubiquitous, individuals across various professions will likely encounter machine learning and need a fundamental understanding of its principles and application.
Os Bastidores do Guarapi - Framework Modular
Tags: webdev, guarapi, javascript, igotroasted
Published: 2024-02-08 14:08:50

## Navegando no Futuro: Frameworks Modulares e as Engrenagens das Prioridades

Vamos explorar mais a fundo a onda dos frameworks modulares, focando especialmente no Guarapi, que está na dianteira dessa revolução. Vamos entender por que a ordem dos plugins não é automática e como isso abre portas para um controle dinâmico via CLI ou até mesmo um admin frontend que ainda está na mesa de ideias.

**1. Flexibilidade nos Trilhos com o Guarapi:**

No universo dos frameworks modulares, o Guarapi é tipo o maestro da flexibilidade. Com sua abordagem modular, é possível moldar a aplicação conforme o projeto pede, e os plugins entram em cena para um upgrade personalizado.

**2. Controle Manual dos Plugins:**

A não ordenação automática de plugins no Guarapi é como ter o controle total do palco. Cada desenvolvedor decide a ordem de entrada dos plugins, garantindo que a performance seja um espetáculo otimizado. Isso é puro controle criativo!

**3. Reuso de Plugins com a Vibe do Guarapi:**

A comunidade Guarapi compartilha a visão de reuso e troca de ideias. Os plugins podem ser como peças valiosas que você pode encaixar conforme o necessário, tudo alinhado com a proposta modular e expansível do Guarapi.

**4. Testabilidade na Prática:**

A proposta do Guarapi, com seus plugins sob controle, facilita a testabilidade. Os testes unitários podem ser afiados para cada plugin, garantindo uma execução suave e sem tropeços.

**5. Admin Frontend em Potencial:**

A cereja no bolo é a ideia de um admin frontend para controlar plugins em tempo de execução. Imagina só, conectar e desconectar plugins como quem troca de figurino no backstage. O Guarapi está semeando a ideia de um controle dinâmico para os devs.

**6. Rumo ao Futuro:**

O Guarapi, com sua abordagem modular e controle manual de plugins, está apontando para o futuro. A visão de um admin frontend adiciona um toque extra de inovação. O controle em tempo de execução é como ter as rédeas da experiência de desenvolvimento nas mãos.

**Conclusão: Conduzindo a Orquestra do Desenvolvimento**

Os frameworks modulares, especialmente o Guarapi, abrem portas para uma era de controle e personalização no desenvolvimento. Controlar manualmente a ordem dos plugins é uma jogada inteligente, proporcionando um espetáculo de performance otimizado. E a visão de um admin frontend no Guarapi? Isso pode ser um divisor de águas na flexibilidade e no controle em tempo real. Vamos ficar de olho nesse enredo emocionante!

### Nossas redes:

| Plataforma   | Link                                                |
|--------------|-----------------------------------------------------|
| Reddit       | [Guarapi Subreddit](https://www.reddit.com/r/Guarapi/) |
| Daily.dev     | [Daily.dev Invite](https://dly.to/BAbWhWqJ7cs)      |
| Discord      | [Discord Invite](https://discord.com/invite/KQwZtsTF) |
| Repositório  | [Guarapi no GitHub](https://github.com/guarapi/guarapi) |
Codecademy: Recommendation Program Project
Published: 2024-02-08 14:03:35

## The 'why'
The next project in the Codecademy Computer Science course is to create a basic recommendation program to run in your terminal.

## The Program
When you run the code, you can find the code on my github page [here,](https://github.com/spookywookie73/recommendation_program.git)
 you will see a welcome screen, and will be given a list of companies to choose from.

## The Project Objectives
Store data in a data structure:
`def create_company_linkedlist():
  company_list = LinkedList()
  for company_name in consoles:
    company_list.insert_beginning(company_name)
  return company_list`
and use an algorithm to sort or search for data within a data structure:

```
def display_games():
  print("\nSelected company: " + company_choice.title() + "\n")
  console_list_head = consoles_list.get_head_node()
        
  while console_list_head.get_next_node() is not None:
    sublist_head = console_list_head.get_value().get_head_node()
          
    if sublist_head.get_value()[0] == company_choice:
      while sublist_head.get_next_node() is not None:
        print("Console name: " + sublist_head.get_value()[1])
        print("Game name: " + sublist_head.get_value()[2])
        print("Genre: " + sublist_head.get_value()[3])
        print("\n")
        sublist_head = sublist_head.get_next_node()
    console_list_head = console_list_head.get_next_node()
```

## Conclusion
It was a simple enough project in the end, but, yet again it took longer than it should have, because I kept adding more and more to it. Once I stripped it down to just do what was asked, it worked perfectly.

Thankyou for reading.
Do you know the Python Walrus Operator?
Tags: python, video, tutorial, learning
Published: 2024-02-08 14:01:57

If not, check out my latest YouTube video 🎬 to learn how to improve the quality of your Python code 🧑‍🎓 using the Walrus operator and learn a Secret trick 💡

https://youtu.be/e0vFRnEv16I
Ubuntu 22.04 NMAP Kurulum Yolları
Published: 2024-02-08 13:56:58

**NMAP Derleyerek Nasıl Kurulur?**
 
```
wget https://nmap.org/dist/nmap-7.91.tar.bz2
tar -xvf nmap-7.91.tar.bz2
cd nmap-7.91

./configure
make
sudo make install
nmap --version

```

**NMAP .deb Paketiyle Nasıl Kurulur?**

```
apt install  --download-only nmap
find / -iname nmap*.deb
cp /var/cache/apt/archives/nmap_7.91+dfsg1+really7.80+dfsg1-2ubuntu0.1_amd64.deb
dpkg -i nmap_7.91+dfsg1+really7.80+dfsg1-2ubuntu0.1_amd64.deb
dpkg -l nmap

```

**NMAP apt Paket Yöneticisi İle Nasıl Kurulur?**

```
sudo apt update
sudo apt install nmap
nmap --version

```
Unleashing the Secrets of Blockchain Development: Insights from Top Experts
Tags: blockchain, cryptocurrency, webdev, programming
Published: 2024-02-08 13:56:45

## Understanding the Basics of Blockchain Development
Blockchain development is a cutting-edge field revolutionizing the way digital transactions are conducted.

It involves creating and implementing decentralized applications using secure, transparent, and immutable digital ledgers.

Mastering [blockchain development](https://hyscaler.com/service/blockchain-development-services/) requires a strong foundation in coding, cryptography, and distributed systems architecture.

## Tips for Mastering Blockchain Development
### 1. Embrace Continuous Learning
Keeping up with the latest trends and technologies in blockchain development is crucial.

Engage with online communities, attend workshops, and participate in hackathons to enhance your skills and stay relevant in this rapidly evolving industry.
### 2. Dive Deep into Cryptography
Cryptography lies at the heart of blockchain technology. Understanding encryption techniques, digital signatures, and hash functions is essential for developing secure and tamper-proof blockchain applications.
### 3. Hands-On Experience is Key
Theory is important, but practical experience is invaluable. 
Dive into coding projects, experiment with smart contracts, and explore different blockchain platforms to gain real-world experience and deepen your understanding of blockchain development.
### 4. Collaborate with Industry Experts
Networking with seasoned professionals in the blockchain industry can provide valuable insights and mentorship. 

Joining online forums, attending conferences, and seeking mentorship opportunities can help you learn from the best and accelerate your growth as a blockchain developer.
### 5. Stay Persistent and Resilient
Mastering blockchain development is a challenging journey that requires dedication and perseverance.

Embrace failures as learning opportunities, stay curious, and continuously strive to improve your skills to overcome obstacles and achieve success in this dynamic field.
## In Conclusion
Mastering [blockchain development](https://hyscaler.com/service/blockchain-development-services/) is a rewarding endeavor that offers endless opportunities for innovation and growth.

By following the tips shared by industry experts and maintaining a proactive approach to learning and development, you can unlock your full potential as a blockchain developer and make a lasting impact in the digital landscape.
How to create custom breadcrumbs in Next js?
Published: 2024-02-08 13:54:12

To create breadcrumbs in Next js, you can follow these steps:

1. Make sure you have the `usePathname` hook imported from `'next/navigation'`.
2. Create a wrapper component around the pages where you want to display breadcrumbs.
3. Use the `NextBreadcrumb` component within this wrapper component.
4. Customize the appearance and behavior of the breadcrumbs using the props provided by `NextBreadcrumb`.

Here's an example of how you can use the `NextBreadcrumb` component in a Next.js application:

```jsx
// pages/Layout.js

import React from 'react';
import NextBreadcrumb from '../components/NextBreadcrumb';

const Layout = ({ children }) => {
  // You can customize the homeElement, separator, and other props as needed
  return (
    <div>
      <NextBreadcrumb
        homeElement="Home"
        separator=">"
        containerClasses="breadcrumbs"
        listClasses="breadcrumb-item"
        activeClasses="active"
        capitalizeLinks={true}
      />
      {children}
    </div>
  );
};

export default Layout;
```

```jsx
// components/NextBreadcrumb.js

import React, { ReactNode } from 'react';
import { usePathname } from 'next/navigation';
import Link from 'next/link';

type TBreadCrumbProps = {
  homeElement: ReactNode;
  separator: ReactNode;
  containerClasses?: string;
  listClasses?: string;
  activeClasses?: string;
  capitalizeLinks?: boolean;
};

const NextBreadcrumb = ({
  homeElement,
  separator,
  containerClasses,
  listClasses,
  activeClasses,
  capitalizeLinks,
}: TBreadCrumbProps) => {
  const paths = usePathname();
  const pathNames = paths.split('/').filter((path) => path);

  return (
    <div>
      <ul className={containerClasses}>
        <li className={listClasses}>
          <Link href={'/'}>{homeElement}</Link>
        </li>
        {pathNames.length > 0 && separator}
        {pathNames.map((link, index) => {
          let href = `/${pathNames.slice(0, index + 1).join('/')}`;
          let itemClasses =
            paths === href ? `${listClasses} ${activeClasses}` : listClasses;
          let itemLink = capitalizeLinks
            ? link[0].toUpperCase() + link.slice(1, link.length)
            : link;
          return (
            <React.Fragment key={index}>
              <li className={itemClasses}>
                <Link href={href}>{itemLink}</Link>
              </li>
              {pathNames.length !== index + 1 && separator}
            </React.Fragment>
          );
        })}
      </ul>
    </div>
  );
};

export default NextBreadcrumb;
```

Then, in your individual pages, you can use this layout component:

```jsx
// pages/somepage.js

import React from 'react';
import Layout from './Layout';

const SomePage = () => {
  return (
    <Layout>
      <div>
        <h1>This is Some Page</h1>
        {/* Your page content here */}
      </div>
    </Layout>
  );
};

export default SomePage;
```

This way, each page wrapped with the `Layout` component will have breadcrumbs automatically generated based on the page's URL. Adjust the props passed to `NextBreadcrumb` as needed to fit your design requirements.
Unleashing the Power of AWS CloudFormation: A Comprehensive Guide
Published: 2024-04-03 07:23:26

---
title: Unleashing the Power of AWS CloudFormation: A Comprehensive Guide
published: true
date: 2024-02-08 13:42:38 UTC
tags: 
canonical_url: https://imransaifi.hashnode.dev/unleashing-the-power-of-aws-cloudformation-a-comprehensive-guide
---

## Introduction:

In the dynamic landscape of cloud computing, managing and deploying infrastructure efficiently is crucial for organizations to stay agile and competitive. AWS CloudFormation emerges as a powerful ally, enabling users to define and provision AWS infrastructure as code (IaC). This blog explores the key aspects of AWS CloudFormation, its benefits, use cases, and best practices.

## **Understanding AWS CloudFormation:**

AWS CloudFormation is a declarative way to model and provision AWS resources. It allows you to describe your infrastructure requirements in a JSON or YAML template, which serves as a blueprint for creating and provisioning resources. By treating infrastructure as code, you can version-control, reuse, and share templates, ensuring consistency across different environments.

## **Key Features and Benefits:**

1. **Automation and Efficiency:**

2. **Scalability:**

3. **Version Control:**

4. **Resource Management:**

## **Getting Started:**

1. **Template Creation:**

2. **Stacks:**

## **Use Cases:**

1. **Infrastructure Provisioning:**

2. **Continuous Integration/Continuous Deployment (CI/CD):**

3. **Disaster Recovery:**

4. **Compliance and Security:**

## **Best Practices:**

1. **Modularity:**

2. **Parameterization:**

3. **Testing:**

4. **Documentation:**

## **Conclusion:**

AWS CloudFormation empowers organizations to manage their AWS infrastructure efficiently, providing a scalable and automated approach to provisioning resources. By adopting best practices and understanding its capabilities, users can unlock the full potential of AWS CloudFormation, making infrastructure management a seamless and agile process in the cloud era.
SQL Database Design Basics With Examples
Tags: sql, sqlserver, dbforge
Published: 2024-02-08 13:37:06

It is standard practice for a database architect to create a relational database that is customized for a specific solution.

On a Friday night, while riding the commuter train home from work, I had the bright idea of starting a recruitment service. To the best of my knowledge, there is currently no service that enables the rapid assessment of candidates, the development of complex filters based on specific skill sets, projects, or roles, or the exclusion of particular skill sets, roles, or organizations. When it comes to screening, the most useful criteria are firms and, to a lesser extent, skills.

This article will provide an overview of relational database design and provide an example database built-in MS SQL Server for a staffing agency: https://blog.devart.com/sql-database-design-basics-with-example.html
How to generate a list of compliance labels for all your gitlab repos
Tags: devops, gitlab, compliance
Published: 2024-02-08 13:29:56


Install `pip install python-gitlab` then run the script. It generates csv which includes full_path, http_url_to_repo and compliance_frameworks.

generate.py
```
from gitlab import Gitlab
import csv

gitlab_token = "<<my_token>>"
root_group_name = "<<group_name>>>"
output_file_name = "gitlab_compliancy_labels.csv"

gl = Gitlab(private_token=gitlab_token)
gl.auth()
# gl.enable_debug()

with open(output_file_name, "w", newline="") as csvfile:
    writer = csv.writer(csvfile, delimiter=",", quotechar="|", quoting=csv.QUOTE_MINIMAL)

    group = gl.groups.get(root_group_name)
    projects = group.projects.list(archived=0, order_by="path", include_subgroups=True, all=True)
    writer.writerow(["path", "git_url", "compliance_frameworks"])
    for project in projects:
        compliance_frameworks = project.attributes.get("compliance_frameworks")
        name = project.attributes.get("namespace")["full_path"]
        git_url = project.attributes.get("http_url_to_repo")
        writer.writerow([name, git_url, "|".join(compliance_frameworks)])
```
File Conversion - Solution?
Tags: doctopdf, file, conversion
Published: 2024-02-08 13:24:31

**Scenario**: A document management application aims to provide users with the ability to convert WORD (template documents used by Microsoft Word) into PDF format. This functionality caters to professionals and businesses looking to streamline the conversion of template documents into a more universally accessible and secure format, facilitating easier sharing, archiving, and printing.

**Requirements:**

- High-quality conversion preserving layout, formatting, and content.
- Batch processing capability for handling multiple files.
- Security and privacy of the documents processed.


**Solutions:**

_1. Using a Third-Party API_

Integrating a third-party API that specializes in document conversion provides a quick and reliable way to add DOT to PDF conversion functionality without the need for extensive development. This approach leverages the expertise of dedicated services that manage the complexities of document conversion processes.

Pros:

- Fast implementation and deployment.
- Continuous updates and maintenance by the service provider.
- Scalability and reliability, with the capability to handle high volumes of conversions.

Eg. [ApyHub's](https://apyhub.com/) Document Conversion API – Offers a wide range of file conversion options, including [Doc to PDF](https://apyhub.com/utility/converter-doc-pdf), [Xlsx to PDF](https://apyhub.com/utility/converter-spreadsheet-pdf), and [PPT to PDF](https://apyhub.com/utility/converter-presentation-pdf), with support for batch processing and retain format.

_2. Free/Open Source Library_

Solution Overview: Incorporating a library into the application codebase for document conversion. This method involves more in-depth development work but allows for greater control over the conversion process and customization.

Pros:
 - Full control over the conversion process.
 - One-time integration without ongoing costs associated with API calls.
  - Works offline, processing data in-house.

**Which one would you prefer and go with?** Do let me know in the comments.
What is 10 Minute Mail?
Tags: 10minutemail, tempmail, 10minmail, tempemail
Published: 2024-02-08 13:21:45

What is [10 Minute Mail](https://email10min.com/)?
[10 Minute Mail](https://10-minutemail.net/), also known as a [disposable email](https://10-minutemail.com/) address, self-destructs after 10 minutes. Registration and login are not required to utilize this service. It is also known as [temp mail](https://10-minutemail.com/), [10 minute mail](https://email10min.net/), disposable email, [temporary email](https://mailtemp.net/), 10 min mail. It is completely anonymous,message delivery is instant,email address generation is automatic and it's the best way to protect against spam mail.

10 minute mail,also known by names like [tempmail](https://tenminutesmail.net/),[10minuteemail](https://tenminutesmail.net/),10minemail,is designed to protect your privacy for free,the emails are self-destructed after 10 minutes,once deleted no one will ever be able to access it again.
AWS Compute Savings Plans: Are They Right for You?
Tags: aws, cloud, costs
Published: 2024-02-08 13:20:57

---
title: AWS Compute Savings Plans: Are They Right for You?
published: true
description: If you're using AWS and looking to save money on your compute costs, you've probably heard about Savings Plans. But are they the right choice for your business? 
tags: aws, cloud, costs
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2024-02-08 13:19 +0000
---

If you're using AWS and looking to save money on your compute costs, you've probably heard about Savings Plans. But are they the right choice for your business? In this video, we'll explain everything you need to know about AWS Compute Savings Plans and help you decide if they are a good fit for your organization:

{% embed https://www.youtube.com/watch?v=taR2sGuBY2M %}