teleren/devto huggingface dataset:
12 Funny Ways to Take Your Frustrations Out on ChatGPT
Tags: comedy, chatgpt, ai
Published: 2023-08-14 06:16:42

Uh, I spend more time with ChatGPT than I do with my girlfriend, cat, and family combined — is that ok? Especially since, let’s be honest, ChatGPT is like an extremely intelligent autodidact who knows everything but does nothing with it. Don’t you hate these people? 

They sit at the bar, night after night,  they have an answer for everything under the sun, and they do nothing with their lives. Miserable, shiftless, arrogant…

But this isn’t about me and my former best friend “Frank” (not his real name, but it is). 

![A 30-something man with a moustache and brown sweater](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jvmao8xvdybjc8bocef5.png)

This is about me and my *new* best friend, ChatGPT — a.k.a. Chatty G, Chat Do Re Me, Chatty Boom Batty, etc. Namely, that I like to take out my *frust* on a grey screen with tiny text which is always upbeat and only trying to help me. Here’s a list of things I do and you should definitely do, too. (And that includes YOU, “Frank”).

## 1. Greet It Inappropriately
![greeting](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/btq3r74ln4ubla64innd.png)

## 2. Give It Insane Tasks, i.e. “100 Things to Do With Dead Bats”
![bat assignment](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2uir5mf0suwkr7ra953p.png)

## 3. …At The End Barely Thank It For Its Efforts
![Thanks.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4chrcxlkhc5ot7hg5sab.png)

## 4. Mock It For Being Smart
![Mocking](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4ia3itt4wu4mfw3q6j5.png)

## 5. Punch the Screen It’s On
![punching](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ilfn150g31ru2ibgks4.png)
![reaction](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7fwj2e9xedpfbtbicl24.png)

## 6. Threaten to Leave It
![Threat](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pjz7qeo6ecx5gxs363s5.png)

## 7. Compare it Unfavourably to the Competition
![comparison](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vx707byfmlonlw924xxj.png)

## 8. Mock Its Web Design
![mocking its css](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t0qq2ipqgnnjkkxj6978.png)

## 9. Tell It No One Will Remember It
![the future](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y0i4kwim1lww5rwv7c35.png)
(BTW, Chat-GPT just called *this* a “memorable fashion choice”:)

![Justin Timberlake with cornrows](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qzjo03t4zfbd7n74iu7x.jpeg)

## 10. … Then Switch It Up and Confusingly Compliment It … 
![compliment](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w2y50i1g7n3eocbna4cq.png)

## 11. … Weirdly Confessing Your Undying Love and Devotion…
![Confession](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9j1xd2i0jwv3zt92j76y.png)

## 12. …Before Giving It Another Impossible Task
![New task](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/af72ertjvztuhgwqv0vy.png)

Happy Prompting!!
Adding Internationalization to Your Next.js App with next-translate
Tags: nextjs, react, webdev, i18n
Published: 2023-08-14 06:11:51

Hey Developers! Are you looking to make your React Next.js app accessible to a global audience? 🌍 Adding internationalization (i18n) support is the key, and today I want to share an awesome tool that can make this process a breeze: the next-translate package!

Internationalization is crucial for reaching users across different languages and cultures. With next-translate, you can seamlessly integrate multiple languages into your app, allowing your content to resonate with users worldwide.


**Why Choose next-translate?**

- **Simple Setup:** Getting started is a piece of cake! Just install the package and follow a few straightforward configuration steps.

- **Dynamic Content Translation:** next-translate enables you to translate dynamic content like user-generated data or database-driven content effortlessly.

- **SEO-friendly:** Search engines love i18n-friendly apps. next-translate helps you create SEO-friendly URLs for each language, boosting your app's discoverability.




How to Get Started:

**1. Install the package**
```
npm install next-translate
```

**2. Install the next-translate-plugin as a dev dependency**
```
npm install next-translate-plugin --save-dev
```

**3. Configure your Next.js app**
```
// in your next.config.js

import nextTranslate from "next-translate-plugin";

const nextConfig = {
  reactStrictMode: true,

};
export default nextTranslate(nextConfig);
```
wrap your nextConfig options with the nextTranslate function from `next-translate-plugin`


**4. Configure the i18n.json file for next-translate**
- create a i18n.json file in the root of your project

```
// in your i18n.json
{
  "locales": ["en", "fr", "es", "de", "zh"],
  "defaultLocale": "en",
  "pages": {
    "*": ["home"]
  }
}
```


**5. Create your translation files**

place your translation files in the /locales directory
and start translating your content. You can make
different files for the translations based on pages,
components, etc.

![translation files in project directory](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gt9jhoc25pnk7ysxo962.png)


Example of a translation file content (in spanish)


![translation file in spanish](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rol0bmu13mfsvwbdo7ql.png)



**6. Implement translations in your
components**

```
import useTranslation from "next-translate/useTranslation";

export default function MyComponent() {
  const { t } = useTranslation("home");

  return <button>{t("buttons.new_todo")}</button>;
}

```

**7. That's it. Your app now supports translations and different languages reaching to global audience.**



**Ready to See It in Action?**

Check out my simple internationalized Todo app
here [simple internationalized app](https://t3-todo-app-eta-jet.vercel.app/) to
experience next-translate in action! This practical
example demonstrates how to handle dynamic
content translation seamlessly.
⏰Time saving hack
Tags: windows, developer, systemperformance, meanstackdevelopers
Published: 2023-08-14 06:05:00


We Techies, will mostly keep our system either in hibernate or in sleep, which affect **system performance**, And by the same time we can't resume where we left by end of the yesterday or last closed works. I partially found a solution for this, on which with a single click you can open all your necessary apps in a single click.

Curious on how 🤔 💭....
Follow below

Create a fileName.bat file with following.

```
@echo off
start notepad++
start code
start C:\Users\SAISANTHOSH\AppData\Local\slack\slack.exe
start "C:\Users\SAISANTHOSH\AppData\Local\Programs\Microsoft VS Code\Code.exe"
start C:\Users\SAISANTHOSH\AppData\Local\GitHubDesktop\GitHubDesktop.exe

```
By doing this all the above mentioned 5 apps opened at once, In the same you can add multiple applications.

If you're struggling to find the location
goto **start -> Find the application (slack) -> right click and select open file location** -> select .exe (slack.exe) -> alt + enter -> a model opens copy & paste the **Target** location in it.

Below screenshot

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



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



Note: These tools were my priorities on my system, you can modify on your needs.


🔖 Don't forget to bookmark this for future references.
Give me follow on dev.to if you like this blog.

Learn & Grow together🤓🧠
Thanks 🤝🤝🤝!!!
Common NullReference Issues in C#
Tags: csharp, nullreference, issues
Published: 2023-08-14 06:03:36

Common NullReference Issues in C#
---------------------------------

NullReferenceException, the bane of every C# developer's existence. It's the kind of exception that can make you question your life choices and wonder if you should have pursued a career in something less error-prone, like tightrope walking or lion taming. But fear not, for in this article, we will explore some of the most common NullReference issues in C# and how to overcome them.

### 1\. Forgetting to Initialize Objects

One of the most classic NullReference issues is forgetting to initialize an object before using it. It's like trying to use a toaster without plugging it in, or attempting to ride a unicycle with no seat. It just doesn't work. So, always remember to create an instance of an object before trying to access its properties or methods.

 `// Incorrect way:
            MyClass myObject;
            myObject.DoSomething(); // NullReferenceException!
            
            // Correct way:
            MyClass myObject = new MyClass();
            myObject.DoSomething(); // Works like magic!` 

### 2\. Using Null Conditionals

C# 6.0 introduced the null conditional operator (?.), which is a handy shortcut to avoid NullReference issues. It allows you to safely access properties or call methods on an object without worrying about it being null. It's like having a personal assistant who checks if you have a coffee cup before handing it to you.

 `// Incorrect way:
            if (myObject != null)
            {
                myObject.DoSomething();
            }
            
            // Correct way:
            myObject?.DoSomething(); // No worries, mate!` 

### 3\. Passing Null Arguments

Another NullReference culprit is passing null arguments to methods or constructors that don't expect them. It's like trying to fit a square peg into a round hole, or offering a salad to a T-Rex. Always make sure you're passing valid objects, or handle null values gracefully within the method.

 `// Incorrect way:
            public void DoSomething(MyClass myObject)
            {
                if (myObject != null)
                {
                    myObject.PerformAction();
                }
            }
            
            // Correct way:
            public void DoSomething(MyClass myObject)
            {
                myObject?.PerformAction(); // Null-proofed!
            }` 

Remember, NullReference issues can be frustrating, but with a little care and attention, you can avoid them and keep your sanity intact. So, go forth and code fearlessly, armed with the knowledge to conquer the NullReference beast!

### References:

*   [Null-conditional Operators](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/member-access-operators#null-conditional-operators--and-)
IPipeline Behavior - Validation
Tags: csharp, dotnet, webapi, restapi
Published: 2023-08-14 05:58:13

{% embed https://youtu.be/ydISpffv3Fc %}

GitHub :
{% embed https://github.com/bugandfix/CQRS-PipelineBehaviourValidation %}

Nuget Packages : 
- FluentValidation 
- FluentValidation.DependencyInjectionExtensions
How I cleared the AZ-900 Microsoft Azure entry exam in 4 weeks?
Tags: azure, az900, certification, cloudpractitioner
Published: 2023-08-14 05:48:40



![az-900 official logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k72lm1o6cth0cp8p6tza.png)


I just begun studying for the Microsoft AZ-900 certification test, and my goal is to take the exam before the year 2023 comes to a close.

The AZ-900 certification is the first one that must be passed in order to go on with the Azure certifications program. There are also additional tests, the most notable of which is the az-104 certification, which holds a significant deal of significance in the eyes of prospective employers. It is less difficult to obtain the az-900 certification initially, followed by the az-104 certification, which is a more advanced level.


The current Azure roadmap has 3 tiers of certifications
Fundamentals, Associate, Expert

Visit the microsoft offical page for the az-900 certification (listed below)

While there are many resources to learn from I only mention here free resources and I personally not an advocate of paying lots of money for an IT certification. Some of these bootcamps and online courses can cost up to 2000$ and that is money that many students cant afford to pay, so it is important to me to write this guide to help as many students and help them pass this certification for free for the first try. 

Here are some free resources I used to prepare for the exam. 

### AZ-900 Study Resources

1. microsoft offical az-900 page - offers the basic training and is important to get to know the exam topics. 
https://learn.microsoft.com/en-us/certifications/exams/az-900/

2. Youtube  - There are lots of great youtube channels , a great one is the one by freecodecamp 

3. exam practice - AZ-900 practice questions here:
https://www.examgo.com/exams/microsoft/az-900/

To enroll in the exam , current price of admission is 99$ , but price might vary slightly in your country. You can take the exam in either a test center close to you or do it online with several restrictions like cameras etc. If your employer is a microdot Partner then you might be eligible for free enrollment. You will need to sign up with your employer email to the microdot account , and get that free voucher. 

### Tips for the az-104 exam day
: 
1. learn no more then 1-2 hours per day
2. what ever you managed to learn , 2-3 days before the exam drop everything you do and do practice questions only.
3. exam day itself schedule your exam at noon , not too early in the morning in case you don't wake up 
4. visit the text center before the day of the exam to get familiar and not be stressed on the exam day. 
5. as I mentioned before, time management is crucial . If there is a question you are not sure about , don't waste too much time on it. Mark it move forward and if you have time get back to it. 

Please feel free to share any suggestions , comments are welcomed
Lets advanced ourselves in 2023
💥Building an Stock Management and Billing Invoice Pdf WebApp with Next 13.4 , Redux and MongoDB.
Published: 2023-08-14 05:41:30

Building an Stock Management and Billing Invoice Pdf system 
with Next 13.4 , Redux and MongoDB. it can be a little difficult, but you can take guidance through my Git Hub Repository .
**Github Repository :** https://github.com/yashsingh9651/Stock_Management
webPage: https://akanksha-enterprises.vercel.app/
Login Credentials are
gmail:ashishsingh@gmail.com
pass:yash6789

Below are the depencies used on this project.
```
"dependencies": {
    "@reduxjs/toolkit": "^1.9.5",
    "atomic-spinner": "^1.2.8",
    "autoprefixer": "10.4.14",
    "bcryptjs": "^2.4.3",
    "formik": "^2.4.2",
    "html2canvas": "^1.4.1",
    "jspdf": "^2.5.1",
    "mongodb": "^5.7.0",
    "mongoose": "^7.4.2",
    "next": "13.4.9",
    "next-auth": "^4.22.3",
    "postcss": "8.4.25",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-icons": "^4.10.1",
    "react-redux": "^8.1.2",
    "react-to-print": "^2.14.13",
    "react-toastify": "^9.1.3",
    "redux": "^4.2.1",
    "tailwindcss": "3.3.2",
    "yup": "^1.2.0"
  }
```
The Unsung Hero of Kubernetes: Exploring the Crucial Role of etcd
Tags: kubernetes, architecture, devops, containers
Published: 2023-08-14 05:31:43

You've probably heard of **etcd** if you've looked into the fascinating realm of Kubernetes architecture. But are you really aware of how crucial a part it plays in the Kubernetes ecosystem? Let's embark on a journey to uncover the magic behind this unsung hero!

**📖 Bookish Definition**: At the core of the Kubernetes control plane, etcd stands tall as the distributed key-value store, holding the very essence of our cluster's configuration data.

**🧐 But what does that even mean?**

### 🚀 Let's Dive In:
Imagine a scenario: You're in charge of a microservices-based application, and suddenly, there's an unforeseen surge in user traffic. The configuration changes you quickly implement to scale up, such as increasing the number of replicas, are more than just temporary adjustments; they are delicately stored in etcd.

Why is this important? Because etcd protects consistency across your whole cluster, especially when faced with chaos and unpredictability. It shields your applications from the storm, ensuring that the cluster maintains the desired state, no matter the challenges it encounters. 🛡️

**But this is where etcd's importance really shines**: When the unexpected happens, and a node in your cluster goes down, Kubernetes must restore order swiftly. In this critical moment, etcd steps in as the ultimate source of truth. Kubernetes is given the ability to restore the cluster to its most recent desirable state, orchestrating the reemergence of a smooth operating environment for your applications. 💡

**_So, the next time you witness the remarkable prowess of your Kubernetes cluster, handling diverse workloads and gracefully navigating disruptions, remember that etcd is an unsung hero behind the scenes! 🎉_**

As you continue your journey in the realm of Kubernetes, appreciate the role etcd plays in keeping your applications resilient, scalable, and always humming along seamlessly!
Modules, es6 modules and common js
Published: 2023-08-14 05:29:23

Generally in computer programming , modules are self contained unit of code that encapsulates a set of related functions and variables that are organized such that they can be reused from another file. In the modules concept, you can define functions, variables and or objects and export them to make them accessible from other orts of the program or application. JavaScript has two standards for doing this.Common js and es modules are two different approach to organizing and managing modules in javascript. Common js is a module system designed with server side JavaScript environments in mind, designed specifically for use with node js. It's syntax involves exporting functions or variables with the "module. Exports" function. This is assigned to the to be exported variable or function which is encapsulated in curly braces. It can be imported for resuse by using the syntax "const variableName=require(" variablePath)"  

Es6 is a native module system for JavaScript unlike the common js module system, its modules are loaded asynchronously which leads to better performance and responsiveness in browser environment 
Unlike the common js that is only usable node applications, es6 is natively suported in all JavaScript environment. Its export syntax is:"export Function name" while it's import function is "import function name from " ./path ""
Getting Started with Svelte: A Refreshingly Different Approach to Web Development
Tags: webdev, javascript, svelte, beginners
Published: 2023-08-14 04:40:25

# Getting Started with Svelte: A Refreshingly Different Approach to Web Development

Are you tired of the JavaScript frameworks that come with a hefty bundle size and complex setup? If so, let's dive into Svelte, a revolutionary approach to building web applications that challenges the conventional wisdom of front-end development.

## Why Svelte?

Svelte takes a different route by shifting the heavy lifting from the browser to the compilation step. Instead of shipping a bulky runtime library to the client, Svelte compiles components into highly efficient vanilla JavaScript during build time. This means your users download smaller files, and your applications run faster.

## The Svelte Compiler Magic

Svelte introduces a compiler that analyzes your components and generates optimized code. It compiles away abstractions, leaving you with clean and performant JavaScript. This process is so seamless that it might feel like magic.

## Creating Your First Svelte Component

Let's jump in by creating a simple interactive component. In Svelte, a component consists of three main parts: the `<script>`, `<style>`, and `<main>` tags.

1. The `<script>` tag is where you define your component's logic. You can use reactive declarations to automatically update the DOM whenever your variables change.

2. The `<style>` tag contains your component's styling. It uses regular CSS syntax to style your component's elements.

3. The `<main>` tag holds the HTML structure of your component.

**Example: Creating a Button Component**

Let's create a button that counts the number of times it's clicked:

```svelte
<script>
  let count = 0;

  function handleClick() {
    count += 1;
  }
</script>

<style>
  button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
  }
</style>

<main>
  <button on:click={handleClick}>
    Clicked {count} {count === 1 ? 'time' : 'times'}
  </button>
</main>
```


## Conclusion

Svelte challenges the traditional approach to front-end frameworks, offering a clean and efficient alternative. By compiling components into optimized JavaScript, Svelte reduces runtime overhead and makes your applications faster. In our next installment, we'll explore Svelte components in more detail and learn how to create reusable building blocks for your web applications.

Stay tuned as we embark on this journey to discover the power and simplicity of Svelte. Your web development experience is about to be transformed.
How to auto format code on vscode
Published: 2023-08-14 04:29:18

#vs code #code-format

I work with vue project that add a eslint file to define some rules. And I also use vscode extension to format the code when pressing `alt + shift + f.` Then show the dropdown and add this. Then code is working auto formatting.

```
"[vue]": {
    "editor.defaultFormatter": "Vue.volar"
  }
```
Kèo cầu thủ ghi bàn - Hình thức cá cược phụ được ưu chuộng tại keonhacaibio.
Published: 2023-08-14 04:19:24

Kèo dự đoán tỉ số bởi cầu thủ là một hình thức cược phụ, nơi mà bạn sẽ chọn ra cầu thủ nào sẽ đánh dấu dấu ấn bằng bàn thắng, không quan trọng là bàn mở tỉ số hay kết thúc trận đấu. Cơ hội để bạn lựa chọn đa dạng, từ việc dự đoán cầu thủ nào ghi bàn đầu tiên, đến cầu thủ có nhiều bàn thắng nhất.
Khi bạn dự đoán đúng, lợi tức bạn thu về sẽ tuân theo tỷ lệ cược do nhà cái xác định. Nhưng một sai lầm trong dự đoán có thể khiến cho số tiền cược của bạn biến mất. Dù hình thức cược này thu hút nhiều người nhờ cơ hội kiếm lợi nhuận hấp dẫn, việc hiểu rõ và am hiểu trò chơi là điều không thể thiếu.
Dự đoán cầu thủ ghi bàn có vẻ đơn giản nhưng rủi ro cũng tương đối. Chính vì vậy, tỷ lệ cược thường được đặt cao hơn so với những loại kèo khác, như kèo không thủng lưới hoặc số bàn chẳn/lẻ. Điểm đặc biệt trong tỷ lệ cược này tạo nên sức hút độc đáo cho việc dự đoán cầu thủ ghi bàn.
Xem chi tiết tại: https://keonhacai.bio/keo-cau-thu-ghi-ban-la-gi-tai-keonhacai-bio/ 
Trang liên quan: https://www.facebook.com/keonhacaiibio/
#keocauthughiban #keonhacai #keonhacaibio
SvelteKit + DaisyUI에서 form의 저장 버튼이 2번 눌리지 않게하기
Published: 2023-08-14 03:33:04

DaisyUI의 버튼에는 `loading` 이 있다. https://daisyui.com/components/button/

그걸 사용하면 저장버튼이 두 번 눌리지 않게 할 수 있다.


```javascript
<script>
import { applyAction, enhance } from "$app/forms";
import { goto, invalidateAll } from "$app/navigation";
</script>

<form
  use:enhance={({ form, data, action, cancel, submitter }) => {
  submitter.classList.add("loading");

  try{ 
    // todo
  } catch(e){
    submitter.classList.remove("loading");
    cancel();
  }

  return async ({ result, update }) => {
    if (result.type === "success") {
      goto("/list");
    } else {
      submitter.classList.remove("loading");
      await invalidateAll();
    }
    applyAction(result);
  };
}}>
```