teleren/devto huggingface dataset:
Login Authentication in react js
Tags: reactj, webdev, javascript, beginners
Published: 2023-03-23 19:44:20

hey guys 👋

Today I will share with you How to work on **Login Authentication in react js** 

So there is some Points -

✔ Firstly we will open App.js file and create some routers like - 
 Login page (auth.js),homepage,profilepage
✔ when you create all the component with all show on my GitHub 
✔ you have to create context component also which i mention in GitHub 

you can the all code on **Login Authentication** on my GitHub
[Click here ](https://github.com/shiwani295/LoginAuthentication)

I hope you like it and useful for you ♥♥

Thank You 
Shivani 😊
Boosting Your Terminal Productivity: Shell GPT.
Tags: webdev, productivity, programming
Published: 2023-03-23 19:36:09

As developers, we spend a significant amount of time in the terminal, executing commands, writing scripts, and trying to solve problems. But, how many times have you found yourself stuck, trying to remember the correct syntax or flag for a command, or spending hours looking for a specific code snippet?

```bash
sgpt "nginx default config file location"
# -> The default configuration file for Nginx is located at /etc/nginx/nginx.conf.
```

```bash
sgpt "docker show all local images"
# -> You can view all locally available Docker images by running: docker images
```

If you've been there, then Shell GPT is the tool you need. Shell GPT is a command-line productivity tool powered by OpenAI's ChatGPT (GPT-3.5), which leverages the language model's capabilities to help you generate shell commands, code snippets, comments, and documentation, among other things.

With Shell GPT, you can forget about cheat sheets and notes. Instead, you can get accurate answers right in your terminal, saving you valuable time and effort. For instance, if you're working on a project and need to generate a code snippet, you can simply type in a description of what you need, and Shell GPT will generate the code for you.

Moreover, Shell GPT is easy to install and use.

So, if you're looking for a way to boost your productivity in the terminal, Shell GPT is the tool for you. Give it a try, and you'll probably find yourself reducing your daily Google searches, and getting more things done in less time.

Shell GPT on GitHub: https://github.com/sergeyleschev/shell_gpt

Generate API Keys: https://platform.openai.com/account/api-keys
C++ else
Tags: cpp, beginners, programming, tutorial
Published: 2023-03-23 18:28:32

Hello everyone
today we will talk about else in C++


If if is false, the code to be executed needs an else statement to execute the condition block.
Syntax:

```
if (condition) 
{
  // block of code to be executed if the condition is true
} 

else 
{
  // block of code to be executed if the condition is false
}
```

**For example**

```
#include <iostream>
using namespace std;

int main()
{
int num = 20;
int num1 = 30;

if ( num1 + num == num1)
{
cout << "True";
}

else 
{
cout << "False";
}

return 0;
```

`Answer:` 

```
False
```

**Example explained:**

num1 + num == num1 cannot be equal, so False is output to the console

**if else**
Use an `else if` statement to specify a new condition if the first condition is false

```
#include <iostream>
using namespace std;

int main()
{

int time = 22;

if (time < 10) 
{
  cout << "Good morning.";
} 

else if (time < 20)
{
  cout << "Good day.";
}
 else 
{
  cout << "Good evening.";
}
// Outputs "Good evening."

return 0;
}
```

**Example explained:**
In the above example, time (22) is greater than 10, so the first condition is false. The next condition, in the `else if` statement, is also false, so we go to the next condition because condition 1 and condition 2 are both false - and print "Good evening" to the screen.

However, if the time was 14, our program would print "Good day".
Asking for help - The 30 minute rule
Tags: career, beginners, codenewbie
Published: 2023-03-23 19:31:43


As a manager, a common pattern I see with Junior engineers is that when they run into a problem they will try to solve it on their own. They may spend a whole day going down all sorts of rabbit holes trying to get around the problem.

Most of the time people don't ask for help because they don't want their teammates to feel that they are being bothered by them. Believe me when I say that it is their job to be bothered by you and it is your job to bother them with questions. Your more senior teammates are expected to help out and share their knowledge and it is your job as a junior engineer to learn from them. 

However it can be difficult to balance the trade-off between persevering with a problem or asking for help with it. That is where the 30 minute rule comes in.

## The 30 minute rule


My advice is that if you have run into a problem and have not been able to get around it after 30 minutes then you must Ask. For. Help.

30 minutes is long enough to have ruled out simple mistakes by checking what you have done. It's long enough to have Googled any error message and tried out one or two possible solutions you find online. It means that you will have done some basic due diligence to try and get around the problem yourself. The benefit of spending this time is that you will know you have a legitimate issue that you can't easily get around. You won't feel like you're annoying your colleagues with trivial problems.

It's also a good idea to not spend _less_ than 30 minutes trying to solve your issue. If you just ask for help as soon as you run into a problem you can waste the time of your colleagues if the problem you have has a trivial solution that is one Google search away. Also by not persevering and trying to find the solution yourself, you are denying yourself the opportunity to practice debugging. Debugging is a skill in it's own right and every problem debugged is an opportunity to hone this skill.

So don't waste your whole day. Use the 30 minute rule and accelerate your learning. 

---

Photo by <a href="https://unsplash.com/@kris_ricepees?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Gary Bendig</a> on <a href="https://unsplash.com/photos/KvHT4dltPEQ?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
Currying with placeholder support : Explained with detail.
Tags: javascript, programming, coding
Published: 2023-03-23 19:25:02

Currying is one of the most important concepts and also most asked JavaScript/Frontend interview question.

In this article we will be solving one question which uses currying and some array methods.


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

So, here we have some requirements to solve this question:
1) We have to check arguments length
2) We have to replace the "_", placeholder.

So, we have to write code inside function curry(as shown in question above.)


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

So, as we know that currying is a concept in javascript in which a function returns another function expecting the next argument(s).

So, here in function "curry" we had passed "func" as an argument.
and acc to this question this argument "func" is the join function.

Now, there may be a condition in which there are arguments coming to the function more than the expected function's length.


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

So, we don't want extra args, here we have used the splice method.

which is splicing the args from 0th position to the length of func(i.e., join here)
=> args.splice(0, func.length)

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

Now we need to check if the placeholder(i.e., "_" in this case) is present or not

So, we have used the Array.some() method of javascript.
**Now, let's understand that how this .some() method works, so basically it works like the filter() method but returns something else, actually as in filter method of javascript, we write some logic and if that element is present in the array then we return that element., but here in this some() method, instead of returning that element we return true if logic fits, else we return false.


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

Now, there maybe the condition where there is no placeholder present and the length is also equal to the expected length.

So we use the apply() method of javascript, basically this apply method accepts arguments as an array.(here in the code keyword "this" represents the function "func" itself)

And now the worst can happen is there is the presence of the placeholders and now we need to replace them in order to obtain expected output.

So, we need to iterate over the args to check the presence of the placeholders.

Here's the complete code.

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

I hope it helps :)
Follow for more such contents
Show specific h5 tag
Tags: javascript, html, webdev
Published: 2023-03-23 19:20:19

I have multiple data-id to a class. I need to select a particular h5 that ID matched a parent ID.

 `
<h5 class="to-list primary  data-id="399">
    
<h5 class="to-list primary  data-id="392">
    
<h5 class="to-list primary  data-id="402">
`

```

All that I am looking for is to select a specific h5 tag that data-id matches the Parent ID( var ParentID = $('#ddlSearch option:selected').val();) Then I can traverse the hierarchy from there.

$("#btn-search").click(function() {

  var ParentID = $('#ddlSearch option:selected').val();
  var selectedlastChild = $('.to-list).attr("data-id");  
  $('.list-container').each(function() {

    var delimiter = 'Id-';
    var ids = this.id.split(delimiter)[1];
    if (ParentID(399) === ids(399)) {
      if(selectedlastChild(399) ==ParentID(399))
     {
       show only <h5 class="to-list primary  data-id="399"> for example 
     and hide the rest
    }


  });



});
Download free pdf.
Tags: pdf, slideshare
Published: 2023-03-23 19:10:53

Downloading free PDFs has become a common practice among people who want to access useful information or entertainment content without spending money. Whether you are a student, a professional, or just someone who enjoys reading, there are many reasons why you might want to download free PDFs.

One of the main advantages of [download free PDFs](https://www.slidesharedown.net/) is that it is a convenient and cost-effective way to access information. Instead of buying a physical book or magazine, you can simply download a PDF and read it on your computer, tablet, or smartphone. This saves you time and money, as you do not have to go to a store or wait for a delivery.

Another benefit of downloading free PDFs is that it allows you to access a wide range of content. From academic articles and research papers to novels and comics, there are countless free PDFs available on the internet that cater to different interests and preferences.

Moreover, downloading free PDFs can also be an eco-friendly choice as it saves paper and reduces waste. Instead of printing out physical copies, you can simply read the PDF on your device, which helps to reduce your carbon footprint.

To download free PDFs, there are many websites and online libraries available that offer a vast collection of free content. These websites provide easy-to-use interfaces and search tools that allow you to find and download PDFs quickly and easily.

In conclusion, downloading free PDFs is a convenient, cost-effective, and eco-friendly way to access information and entertainment content. With so many resources available online, it is easier than ever to find and download free PDFs that cater to your interests and needs.
👀 6 Free Public APIs with interesting data for your next project
Tags: webdev, programming, beginners, api
Published: 2023-03-23 19:08:59


**APIs** provide access to pre-built functionalities and data that allow us to integrate them into our applications without having to build that part of the logic from scratch.

This can save time for building the other part of the app to allow us to focus on adding the unique and interesting touch. So here's a shortlist of some interesting _**free APIs**_  to consider use on our next project:

## 1. They Said So Quotes
This quotes API offers a complete feature rich of quotes APIs like the _**Quote of the day**_, random quote, search quotes and more!
They also allow to add your own quote and even create quote images.

**Link:** [quotes.rest](https://quotes.rest/)
**Api key required:** yes and no (the quote of the day section does not need an api key)


## 2. Pexels
The Pexels API let us access their full content library, including photos, videos. It has limits usage but if you plan to use it for a small project that limit should be more than enough.
**Link:** [pexels](https://www.pexels.com/api/)
**Api key required:** yes


## 3. REST Countries
REST Countries provides information about countries, including flags, currencies, languages, and population. It's a good choice that contains a vast set of data about countries around the world.
**Link:** [restcountries](https://restcountries.com/#api-endpoints)
**Api key required:** yes


## 4. The Movie Database
The Movie Database offers a large dataset of movies and TV, including the most populars movies, TV shows and more. It also supports the search and discover based on certain criteria.
**Link:** [themoviedb](https://www.themoviedb.org/documentation/api)
**Api key required:** yes


## 5. Spoonacular
This incredibly API offers a large set of data for ingredients, recipes, products and menu items, a great food or nutrition app could be built using this API.
**Link:** [spoonacular](https://spoonacular.com/food-api)
**Api key required:** yes

## 6. NASA
The NASA provides a lot of really cool APIs open to public. Among these, there's one called **_APOD (Astronomy Picture of the Day)_** which basically returns a new picture from space everyday, another one returns _**Mars Rover Photos**_ and there are others pretty cool too, make sure to give it a look!
**Link:** [api.nasa.gov](https://api.nasa.gov/index.html)
**Api key required:** yes



If you liked this article, don't forget to hit that 💖 button and support me with a follow, i will keep posting more content about tech, programming, career development and more! :)

What other free interesting APIs do you know about?
On change in textField value will change in SwiftUI
Tags: ios, 100daysofcode, swift, swiftui
Published: 2023-03-23 19:08:37

When we change in the textField then value whatever get then this value will change in swift

the code are as follow:

```
import SwiftUI

struct User{
    var firstName = "Saurabh"
    var lastName = "Chavan"
}

struct ContentView: View {
    @State private var Users = User()
    var body: some View{
        VStack{
             Text("\(Users.firstName)  \(Users.lastName)")
            
            TextField("First Name", text: $Users.firstName)
            
            TextField("Last Name", text: $Users.lastName)
        }
    }
}
```

**Output:**



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3navekxlezmu1ceidoan.gif)
Triggers with Supabase
Tags: webdev, javascript, beginners, programming
Published: 2023-03-23 19:07:14

{% embed https://www.youtube.com/watch?v=tNhg-DhvyC8&ab_channel=CodewithGuillaume %}

Triggers are an essential component of modern databases, allowing developers to automate certain tasks and improve efficiency in database management. Supabase, an open-source platform for building scalable web applications, has recently introduced a range of powerful triggers that enable developers to create custom workflows and automate processes in real-time.

At its core, Supabase triggers allow developers to define custom functions that execute automatically whenever a particular event occurs in the database. These events can be anything from data insertions, updates, or deletions to changes in the database schema or even external events triggered by third-party APIs. By defining these triggers, developers can create a wide range of custom workflows that improve the efficiency and automation of database management.

Supabase triggers can be easily defined using the platform's user-friendly interface, which allows developers to specify the event to be triggered, the function to be executed, and any additional parameters required. The platform supports both SQL and JavaScript functions, providing a high degree of flexibility and allowing developers to choose the language that best suits their needs.

One of the key benefits of Supabase triggers is their real-time execution, which allows developers to automate processes and respond to events as they occur. For example, a trigger could be set up to automatically update a user's account details whenever they make a purchase on an e-commerce site, or to send a notification to a sales team whenever a new lead is added to the database. These automated processes can significantly improve efficiency and reduce the workload of database administrators, freeing up time for more important tasks.

Another advantage of Supabase triggers is their ability to integrate with external APIs and services, allowing developers to create complex workflows that span multiple systems. For example, a trigger could be set up to automatically import data from a third-party service whenever a particular event occurs in the database, or to send data to an external service whenever a user submits a form on a website. This integration with external systems makes Supabase triggers highly versatile and enables developers to create custom workflows that meet the specific needs of their applications.

In conclusion, Supabase triggers are a powerful tool for improving efficiency and automating workflows in database management. With real-time execution and support for multiple languages, Supabase triggers enable developers to create custom workflows that respond to events as they occur and integrate with external APIs and services. As a result, Supabase triggers are an essential component of any modern database management system and are sure to be widely adopted by developers in the years to come.

Guillaume Duhan
Selecting elements in Cypress tests: basic + advanced patterns (2 useful Cheatsheets)
Tags: cypress, testing, css, javascript
Published: 2023-03-23 18:52:07

_Greetings to all Cypress enthusiasts!_

In this very short note, I would like to share with you one very useful thing for selecting elements in [Cypress](https://www.cypress.io/) tests. To be honest, I had plans for a long time to summarize the most common CSS and jQuery selector patterns, which in fact was the reason for creating this extensive table. You can of course use the great Cypress built-in commands like _contains()_, _find()_, _eq()_, etc. to select test elements. However, skillfully combining element attributes, binding to pseudo-classes and the current state of elements, using a hierarchy and combinators, and so on can give you additional advantages and ensure reliability in choosing DOM elements.

Well, I present to you my cheatsheets with basic and advanced selector patterns and examples of their use with the Cypress _cy.get()_ command:

**Cheatsheet #1: Basic patterns**

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

**Cheatsheet #2: Advanced patterns**

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

I really hope that this will be useful for you and help you improve your skills in testing. To continue your journey with me and get even more information about testing with the awesome Cypress tool, I invite you to subscribe to my blog [“Testing with Cypress”](https://medium.com/testing-with-cypress).

_Thank you for your attention! Happy testing!_
The benefits of guest posting and how it can be used effectively in link building.
Tags: guestpostingservices, linkbuilding, nicheedits, outreachexperts
Published: 2023-03-23 18:33:14

**Benefits of Guest Posting**

Exposure and Traffic Generation: Guest posting on reputable websites allows you to reach a new audience, increasing your exposure and driving traffic to your site. The more websites you guest post on, the more people you will reach.

Quality Backlinks: Backlinks are essential to website ranking, and guest posting provides a great opportunity to create quality backlinks to your website. By including a link back to your site in the content you create, you increase the chances of gaining quality backlinks.

Building Authority and Credibility: When you [guest posting services](https://theblogscity.com/guest-posting-services/) on reputable websites, you position yourself as an authority in your industry. This can help you build credibility and establish yourself as a thought leader.

Networking: Guest posting can help you connect with other bloggers and influencers in your industry, providing opportunities for collaboration and further promotion.

**Link Building with Guest Posting**

To use guest posting effectively for [link building](https://theblogscity.blogspot.com/2023/02/link-building-is-important-aspect-of.html), you need to follow some best practices:

Identify Reputable Websites: Identify websites that are relevant to your industry and have a good reputation. These are the sites that will provide the most value in terms of exposure, traffic, and backlinks.

Create Quality Content: The content you create should be high-quality, informative, and relevant to the website's audience. This will help to establish your authority and credibility while also encouraging readers to visit your website.

Include Relevant Links: Include links to relevant content on your website within the guest post. These links should be placed naturally within the content, not forced.

Follow Guidelines: Follow the website's guest posting guidelines to ensure that your content meets their standards. This will increase the chances of your post being accepted and published.

Build Relationships: Building relationships with website owners and editors can lead to future guest posting opportunities and collaborations.
How hard is the AWS Developer Associate certification?
Tags: aws
Published: 2023-03-23 18:29:36

The difficulty level of the[ AWS Developer Associate](https://www.netcomlearning.com/developing-on-aws/course/26175/?utm_source=dev_site&utm_medium=referral&utm_campaign=aws_developer) certification varies from individual to individual depending on their prior knowledge and experience with AWS services and developer tools. However, in general, the certification is considered to be of moderate difficulty.

To pass the AWS Developer Associate certification exam, you will need to have a strong understanding of core AWS services such as EC2, S3, Lambda, DynamoDB, and API Gateway, as well as familiarity with programming languages such as Python, Java, and JavaScript.

You will also need to understand how to design, develop, deploy, and troubleshoot cloud-based applications using AWS services and tools. Additionally, you will need to be familiar with the best practices for security, scalability, and reliability in the cloud.

To prepare for the exam, it is recommended that you take an AWS Developer Associate certification training course, review the exam guide and practice exams, and gain hands-on experience with AWS services and developer tools.

Overall, the AWS Developer Associate certification requires a moderate level of technical knowledge and preparation, but with the right study plan and dedication, it is achievable for developers who are new to AWS or have some prior experience with it.