teleren/devto huggingface dataset:
ChatGPT, will it replace software engineers anytime soon?
Tags: chatgpt, ai, discuss
Published: 2022-12-21 15:30:34

ChatGPT is a language model developed by OpenAI that has the ability to generate human-like text. It has been trained on a large dataset of text and is able to generate coherent and realistic responses to a given prompt. In this blog post, we will explore the capabilities of ChatGPT and discuss its potential applications and limitations.

##But What is ChatGPT?

ChatGPT is a variant of the GPT (Generative Pre-training Transformer) language model, which was developed by OpenAI. It is designed to generate human-like text by predicting the next word in a sequence based on the words that come before it.

One of the key features of ChatGPT is its ability to maintain the context of a conversation and generate responses that are relevant to the previous messages. This allows it to engage in coherent conversations with users and respond to a wide range of prompts

ChatGPT has a number of potential applications. Some examples include:

1. Chatbots: ChatGPT can be used to create chatbots that can engage in realistic conversations with users. This could be useful in a variety of settings, such as customer service or online education.
2. Content generation: ChatGPT can be used to generate text for a variety of purposes, such as news articles, social media posts, or marketing copy.
3. Code generation: ChatGPT can generate code that is syntactically correct and might even solve a given problem. This could potentially save time on tasks such as writing boilerplate code or generating code snippets.

Despite its impressive capabilities, ChatGPT has several limitations that should be considered.

1. Understanding: ChatGPT lacks the ability to understand the meaning of the words it generates and the context in which they are used. This means that it is limited to generating text based on patterns it has learned from its training data, rather than understanding the underlying concepts.
2. Creativity: ChatGPT is limited to the knowledge and information that it has been trained on, and is unable to come up with original ideas or think creatively.
3. Real-world constraints: ChatGPT is not aware of real-world constraints such as budgets, deadlines, or technical limitations, and cannot take them into account when generating text or code.

##So will it replace Software developers from market?

> 


> No for now
 It is important to note that ChatGPT is a language model and not a software engineer. While ChatGPT can generate code that is syntactically correct and might even solve a given problem, it lacks the ability to understand the constraints of real-world software development.

Software engineering involves much more than simply writing code. It involves designing and architecting systems, working with a team of developers, testing and debugging code, and understanding the needs and goals of the users of the software. It also involves ongoing maintenance and updates to the software. A language model like ChatGPT cannot replace the skills and knowledge that a human software engineer brings to the table.
Static Application Security Testing using SonarQube
Tags: webdev, tutorial, security, testing
Published: 2022-12-21 15:30:00

Learn how to use SonarQube to conduct Static Application Security Testing step-by-step, ensuring your codebase is secure and up-to-date with best practices.
In this blog, I explained step by step process of how to set up SonarQube and conduct Static Application Security testing using SonarQube.
{% embed https://blogs.appsecworld.com/2022/12/static-application-security-testing-using-sonarqube.html %}
Tutorial: How To Implement Angular Micro Frontends With Module Federation and Nx
Tags: angular, nx, microfrontend, modulefederation
Published: 2022-12-21 15:25:15

🔥🔥 🔥  New in-depth tutorial 🔥 🔥 🔥 

How To Implement Angular Micro Frontends With Module Federation and Nx 

✅ Module Federation with Nx
✅ Static Module federation
✅ Dynamic Module federation
✅ Handling "version hell"
✅ Real-life app demonstration

https://youtu.be/Pn9-v_WAplg
Apache Kafka Tutorial | What is Apache Kafka? | Kafka Tutorial for Beginners | Edureka
Tags: apachekafka, bigdata, edureka
Published: 2022-12-21 15:24:43

This Apache Kafka Tutorial video will help you understand what is Apache Kafka & its features. It covers different components of Apache Kafka & its architecture.

{% embed https://www.youtube.com/watch?v=hyJZP-rgooc %}
How to Install Hadoop on Windows 10 | Easy Steps to Install Hadoop | Hadoop Tutorial | Edureka
Tags: hadoop, hadoopinstallation, edureka, bigdata
Published: 2022-12-21 15:17:14

This Edureka video on "How to install Hadoop in Windows 10?" will provide you with detailed knowledge about the installation procedure of Hadoop in Windows 10.   1. Prerequisites to install Hadoop in Windows  2. Setting Environment variables   3.  Hadoop Configuration
{% embed https://www.youtube.com/watch?v=g7Qpnmi0Q-s %}
Apriori Algorithm Explained | Association Rule Mining | Finding Frequent Itemset | Edureka
Tags: edureka, apriori, machinelearning
Published: 2022-12-21 15:09:28

This video on "Apriori Algorithm explained" provides you with a detailed and comprehensive knowledge of the Apriori Algorithm and Market Basket Analysis that Companies use to sell more products and gain profits.
	
{% embed https://www.youtube.com/watch?v=guVvtZ7ZClw %}
How to improve performance of your SwiftUI iOS app?
Tags: ios, swift, swiftui, mobile
Published: 2022-12-21 14:34:30

SwiftUI is a powerful new framework for building user interfaces on Apple platforms.

It’s a **declarative** framework, which means you can define the desired state of your user interface and the framework takes care of updating the views to match the state.

This can make it easier to write and maintain your code, but it also means that you need to be mindful of how you use the framework to avoid performance issues.

SwiftUI has been around for almost 3 years now, and during this period, I have noticed a few things that can impact its performance, the mistakes every developer should avoid.

In this post, I’ve tried to cover a few important tips that we can take care of for SwiftUI app performance.

`Use structs instead of classes for your data model
`
SwiftUI works best with value types (such as structs) because they are easier to work with and can result in better performance. When possible, try to use structs instead of classes to store your data and pass it around your app.

This can be more efficient than using classes, which are reference types and require more memory management.

`Use lazy stacks and grids when appropriate
`
Lazy stacks and grids are efficient ways to display large lists of views, as they only create the views that are currently visible on the screen.

This can help improve the performance of your app, especially when displaying large lists of views that are expensive to create.

[Check out our blog](https://blog.canopas.com/swiftui-performance-tuning-tips-and-tricks-a8f9eeb23ec4) for more tips and tricks to boost the performance of your SwiftUI iOS app.
Write semantic HTML
Tags: html, webdev, beginners, programming
Published: 2022-12-21 14:30:37

If you are like me, you probably are using div everywhere. It's bad practice. Your code is both harder to read and not search engine optimized. Here's a list of all HTML tags that you should use to make your code more readable.

All the tags mentioned below work in a similar manner to div unless mentioned otherwise.

## 1. Article
The `<article>` element specifies independent, self-contained content.

Use it when you wish to display something that makes sense on its own. Let's take this blog. The content of this blog does not need the Hashnode website to make sense. I can put it on my website and it would still make sense. Hence I'll use `<article>` here.

Generally used to write an article (of course), a blog, a tweet or something like that, product info and so on.

## 2. Section
The `<section>` the element represents a generic standalone section of a document, which doesn't have a more specific semantic element to represent it. What that means is when you don't know what to use, use `<section>`.

## 3. Nav
The `<nav>` tag is used to define a set of navigation links. According to W3Schools, the `<nav>` element is intended only for major blocks of navigation links.

Personally, I use them only to create a menu.

## 4. Main
As the name suggests, the `<main>` tag specifies the "main" content. Also, it's best practice to not include elements like sidebars, navigation links, logos, headers and so on.

So, for this page, the blog (from the heading to the end) is the main element.

## 5. Header
Use it to display introductory content like headings, logos and navigation links. Generally, `<header>` element is used inside a navbar or as a container for headings, icons and logos.

Let's say you want to create a product page. You'll use `<article>` for the product card, and use `<section>` for something like user comments or ratings or a section that shows similar products.

## 6. Footer
A `<footer>` tag is generally used to provide extra information like additional links, contacts, copyright information, citation, project details and so on.

These are the ones you are gonna need the most. Of course, there is more! Will make a part 2 soon✌️

Also, don't overdo it.
Cypress automation login with csrftoken
Tags: sqa, cypress, csrftoken, javascript
Published: 2022-12-21 14:30:12

Here in this article, I am going to show you how to extract csrftoken from html body and use it in login form as payload.
I assume you have installed [https://nodejs.org/en/](nodejs) and create a cypress project [https://www.cypress.io/](url).
Open cypress project with this command.

> npx cypress open

It will open a cypress window then click _E2E Testing_ button. After that click on the _Start E2E Testing_ with you browser and create _New empty spec_ file with a name like _loginWithCsrfToken.cy.js_ 
Add the below code in your _loginWithCsrfToken.cy.js_ file.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/04cjn2rmjc7bzojjouk3.png)
Let's short brief about my code, here _describe_ is collection of _it_ blocks.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2zurv69l8ygyjx7bnuuq.png)
## Here i wrote a custom command, you can write it in support folder. custom command takes a name and a parameter like _csrfToken_

`Cypress.env` read the item from the _cypress.config.js_ file where i have set env variable as object. like                 `env: {
    baseUrl : "http://quotes.toscrape.com",
    username: "ranafge",
    password: "pass1478"
  }`

cy.request allow us to parse html and send http request.

Now let's go to the second part the `it` block 
``   it('Parse from csrf token from HTML', function() {
        cy.request('http://quotes.toscrape.com/login')
        .its("body")
        .then((body)=>{
            const $html = Cypress.$(body)
            const csrfToken = $html.find('form > input[type=hidden]:nth-child(1)').val();
            console.log(csrfToken)
            cy.loginWithCsrfToken(csrfToken)        .then((res)=>{
                expect(res.status).to.eql(200)
                expect(res.body).to.include('Logout')
                cy.visit(Cypress.env('baseUrl'))
            })          
        })
    })
```
Here _.its_ Get a property's value on the previously yielded subject as per documentation.

_Cypress.$_ is a jQuery function tha take a selector. After parsing the csrf token then just call the custom command with the name  _cy.loginWithCsrfToken(csrfToken) _ and pass a parameter csrfToken that extracted.

This was the first article, I appoloze for my any mistake.
Find the Town Judge
Tags: javascript, leetcode
Published: 2022-12-21 14:15:03

[Find the Town Judge](https://leetcode.com/problems/find-the-town-judge/description/)

```js
/**
 * @param {number} n
 * @param {number[][]} trust
 * @return {number}
 */
var findJudge = function (N, trust) {
  // trust map to show how many people trust the person
  const trusteeMap = {};
  // map of all trusters who trust on other people
  const trustersMap = {};

  let maxTrustee = null;

  for (let i = 0; i < trust.length; i++) {
    // trust[i][0] is one who is trusting someone
    // example [1,2] -> 1 - trust on 2
    const truster = trust[i][0];
    // trust[i][1] is one who is being trusted by someone
    // example [1,2] -> 2 is trusted by 1
    const trustee = trust[i][1];

    if (trusteeMap[trustee] !== undefined) {
      trusteeMap[trustee]++;
    } else {
      trusteeMap[trustee] = 1;
    }

    if (trusteeMap[trustee] > trusteeMap[maxTrustee] || !maxTrustee) {
      maxTrustee = trustee;
    }

    if (trustersMap[truster] === undefined) {
      trustersMap[truster] = 1;
    }
  }

  if (trusteeMap[maxTrustee] === N - 1 && !trustersMap[maxTrustee]) {
    return maxTrustee;
  } else if (N === 1 && trust.length === 0) {
    return 1;
  } else {
    return -1;
  }
};

```
Download Free Audiobooks from Reddit.
Tags: tutorial, beginners, opensource, career
Published: 2022-12-21 14:14:21

Audiobooks are a convenient way to listen to books on the go, and there are many websites and platforms that offer audiobook downloads. One such platform is Reddit, a social media and discussion website where users can find and share all kinds of content, including audiobooks.

In this article, we will discuss how to download audiobooks from Reddit. It's important to note that downloading audiobooks from Reddit (or any other website) may be illegal if the audiobook is protected by copyright. It's always best to check the copyright status of an audiobook and obtain permission from the copyright holder before downloading it.

You can download a Audiobook from reddit with three steps , steps mentioned below:

### Step 1: Find an Audiobooks Subreddit

The first step to downloading an audiobook from Reddit is to find a subreddit (a forum within Reddit) that deals with audiobooks. There are several audiobook subreddits to choose from, including r/Audiobooks and r/AudioBooks.

To find a subreddit, type the name of the subreddit (e.g. "r/Audiobooks") into the search bar at the top of the Reddit homepage and press enter. Alternatively, you can browse through the various subreddit categories to find an audiobook subreddit that interests you.

### Step 2: Find an Audiobook to Download In Subreddit

Once you have found an audiobook subreddit, browse through the posts to find an audiobook that you would like to download. You can use the search bar at the top of the subreddit to search for a specific audiobook or filter the posts by title, author, or genre.

When you find an audiobook that you would like to download, click on the title of the post to open it. In the post, you should see a link to the audiobook file (usually in the form of a .mp3 or .m4b file).

### Step 3: Download the Audiobook From Subreddit Post

To download the audiobook, right-click on the link to the file and select "Save Link As" (or the equivalent option in your web browser). This will open a save dialog where you can choose where to save the file on your computer.

Once you have selected a location to save the file, click "Save" to begin the download. Depending on the size of the file and the speed of your internet connection, the download may take a few minutes to complete.

### Enjoy Your Audiobook

Once the download is complete, you can open the audiobook file in your preferred media player (such as iTunes, VLC, or Windows Media Player) and listen to it at your leisure.


[_original article posted here_](https://dailynews.programmingeeksclub.com/how-to-download-free-audiobooks-from-reddit/)

_My Personal Blogging Website : [Programming Geeks Club](https://programmingeeksclub.com/)_
_My Facebook Page : [Programming Geeks Club](https://www.facebook.com/profile.php?id=100086258693659)_
_My Telegram Channel : [Programming Geeks Club](https://t.me/dpgcl)_
_My Twitter Account : [Kuldeep Singh](https://twitter.com/kusinghofficial)_
_My Youtube Channel: [Programming Geeks Club](https://youtube.com/@programmingeeksclub)_
Dependency Injection With Deno 1.29.1 (Node Compatibility)
Tags: cleancode, deno, node, dependencyinjection
Published: 2022-12-21 13:25:00


![Clean Architecture With Deno](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nqf9s4z2jhng6fo72xy4.png)

[Youtube Link](https://youtu.be/pjdtm5KAV2c)
[Github Repo](https://github.com/bronifty/deno-dependency-injection)

Leveraging Uncle Bob principles of Clean Code and Architecture to design some inversion of control and dependency injection in Deno's newest version with Node compatibility. The source uses classes instead of functions, because classes are cleaner (they house all properties and methods with access using a dot operator, instead of fishing around files and gathering exports). 

## To run this:

-make sure latest version of deno is installed
(deno 1.29.1) with npm: compatibility

```shell
deno run src/server.ts --allow-all
```

- answer 'y' to all prompts

## There are 2 endpoints
1 GET /
2 POST /users -d {name, age}

```shell
curl localhost:8080/

curl -X POST -H "Content-Type: application/json" \
 -d '{"name":"abc","age": 123}' \
 localhost:8080/users
```

### Note
- I did have an error in the node code because the post route kept creating duplicates despite the logic checking for that. For some reason, deno version runs much quicker and it doesn't have the bug.

### Todo
- add some tests
Displaying PDF Files in an Iframe: A Simple Solution
Tags: php, curl, iframe, webdev
Published: 2022-12-21 13:24:35

Are you looking for a way to embed a PDF file on your website without relying on external services or plugins? If so, then you're in luck! In this tutorial, we'll show you how to use PHP and cURL to download the content of a PDF file from a URL and display it in an iframe.

First, let's start by creating a function that uses cURL to download the PDF file:

```
function displayPdfFromUrl($url) {
  // Initialize cURL session
  $ch = curl_init();

  // Set cURL options
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

  // Execute cURL request
  $data = curl_exec($ch);

  // Close cURL session
  curl_close($ch);

  // Return PDF file content
  return $data;
}
```
This function takes a URL as an argument and uses **_cURL_** to download the content of the PDF file at that URL. The content is then returned as a string.

Next, we can use the **_base64_encode_** function to encode the PDF data as a base64 string, which we can then use as the **_src_** attribute for an iframe element:


![code sample](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jmh5orm2vopl3nxwlfrt.png)

That's all there is to it! With just a few lines of code, you can easily display PDF files on your website without relying on external services or plugins.
How to Make Your Own Personal Website Using HTML CSS and JS
Tags: css, javascript, tutorial, beginners
Published: 2022-12-21 13:19:57

{% youtube lzledoZLFBQ %}

In this video, we'll show you how to make a basic gaming website using HTML, CSS, and JavaScript. We'll use a responsive design to make sure the website looks good on all devices, no matter how big or small.

This is a great tutorial if you're gamer or new to web development, or if you just want to learn how to make a simple website. We'll walk you through each step of the process, and by the end of the video you'll have a gaming website of your own!

[Source code](https://www.patreon.com/posts/drew-hays-source-76195003?utm_medium=clipboard_copy&utm_source=copyLink&utm_campaign=postshare_creator&utm_content=join_link)


⏱️ Timestamps
-----------------------------
0:00 - Demo
6:48 - File structure
7:54 - Project initial
18:10 - Preloader
24:25 - Header
49:15 - Hero section
1:03:20 - 3D Tilt effect JS
1:09:04 - Service section
1:15:56 - About section
1:52:07 - CTA section
1:54:58 - Project section
2:06:02 - Testimonials section
2:10:47 - Contact section
2:23:31 - Footer
2:30:56 - Media queries
2:44:02 - Custom cursor CSS & JS
2:53:41 - Media queries
Angular in VS Code or VS 2022, publish to Azure?
Published: 2022-12-21 13:12:14

Hello all:

I am working with a website built in Angular, the devs who built it are not available. I am trying to figure out how to open the project from Visual Studio 2022 or VS Code so I can edit and/or add pages to the project, and then publish to a Windows App Service on Azure. I have ZERO experience in Angular, and have searched for a tutorial, but the sites I have found show creating a new example Angular project, not editing/building an existing site, then publishing to Azure.

Does anyone know of a step-by-step tutorial on how to do this, including all steps to install the necessary software?

Thanks for any and all input!

John.
What should we use Bootstrap or Tailwind CSS ?
Published: 2022-12-21 13:10:14

Both **Bootstrap and Tailwind CSS** are popular front-end frameworks that can help you build modern, responsive websites and web applications. They both offer a set of predefined styles and layout options that you can use as a starting point for your project, and they both make it easier to create consistent, visually appealing designs without having to write a lot of custom CSS code.

**Which one you should choose will depend on your specific needs and preferences. Here are a few things to consider:**

**Bootstrap:**

**1)** Bootstrap is a widely used framework that has been around for many years. It is well-documented and has a large community of users and developers.
**2)** Bootstrap includes a wide range of predefined styles and layout options, including styles for common UI elements such as buttons, forms, tables, and navigation.
**3)** Bootstrap uses a 12-column grid system to help you create responsive layouts that adapt to different screen sizes.
**4)** Bootstrap provides a set of predefined classes that you can use to apply styles to your HTML elements. For example, you can use the btn class to create a button, or the table class to create a table.

**Tailwind CSS:**

**1)** Tailwind CSS is a newer framework that has gained popularity in recent years. It is lightweight and easy to customize.
**2)** Tailwind CSS does not include predefined styles for common UI elements. Instead, it provides a set of utility classes that you can use to apply low-level styles to your HTML elements. For example, you can use the bg-blue-500 class to give an element a blue background color, or the text-xl class to give it a large font size.
**3)** Tailwind CSS does not use a grid system. Instead, it provides utility classes for controlling layout through CSS grid and flexbox.
**4)** Tailwind CSS is highly customizable. You can use configuration files to specify which utility classes you want to use and how they should be generated.

**Ultimately,** the choice between Bootstrap and Tailwind CSS will depend on your specific needs and preferences.

If you need a comprehensive framework that includes predefined styles for a wide range of UI elements and a grid system for creating responsive layouts, **Bootstrap may be a good choice.**
If you want a lightweight framework that provides low-level styles and is highly customizable, **Tailwind CSS may be a better option.**