teleren/devto huggingface dataset:
MySQL Version Control: How to Do It Like a Pro in Git, SVN, and More
Tags: mysql, mariadb
Published: 2024-01-19 15:16:32

Should you put your MySQL database under version control? And if you do, how?

Source control is like a time-travel machine for your code. It tracks changes, avoids chaos, and helps you collaborate seamlessly.

For databases, it’s a guardian angel. It ensures data integrity, simplifies collaboration, and saves you from database nightmares. Just like version control for code, source control for databases (like MySQL) keeps a record of changes, making it easier to roll back if something goes haywire. This way, your database becomes a well-behaved team player, allowing smooth collaboration and preventing chaos.

This article will discuss versioning your MySQL databases. And your versioning time machine? dbForge Studio for MySQL. It can play nice with known version control systems like Git, SVN, and more.

In details - https://www.geekrar.com/mysql-version-control-how-to-do-it-like-a-pro-in-git-svn-and-more/
3 Tools increasing your productivity 📈🤯
Tags: programming, productivity, career, webdev
Published: 2024-01-19 15:08:16

After 1 year timeout. I return.
I understood perfectly well that an athlete who took a break would not be able to immediately return to the previous level.

I need to improve my coding skills and workload. This technique should consist of regular and sequence action each day. And for achieve this goal I used next tools:

## [Obsidian](https://obsidian.md/)

From personal notes to journaling, knowledge bases, and project management, Obsidian gives you the tools to come up with ideas and organize them.

![Obsidian](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7iqg3u80zst3fi0rspuq.png)

## [Code Time](https://www.software.com/)

This tool helps me checking my coding and active coding time every day.
 
![Code Time](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lquqo2xkioxam86936rh.png)

## [Webtime tracker](https://chromewebstore.google.com/detail/webtime-tracker/ppaojnbmmaigjmlpjaldnkgnklhicppk)
For check my timing on browser. This extension saves  time which you spend on web pages. You can check daily/weekly stats.

![Webtime tracker](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mqs55fir59s05jw25lyg.png)




_**What extensions do you use to track your productivity?**_
My created Visual studio Code Themes .
Tags: vscode, javascript, webdev, programming
Published: 2024-01-19 15:06:51

[1- Dark Plus Moon Light
](https://marketplace.visualstudio.com/items?itemName=moondevaa.darkplusmoonlite)

Screenshot in js 


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

[2-shades of midnight blue dark theme](https://marketplace.visualstudio.com/items?itemName=moondevaa.shadesofmidnightbluedarktheme)

Screenshot in Python

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

[3-Dark Green Jungle
](https://marketplace.visualstudio.com/items?itemName=moondevaa.DarkGreenJungle)

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

[4-Moon Violet Dark Plus
](https://marketplace.visualstudio.com/items?itemName=moondevaa.moon-violet-dark-plus)

Screenshot in js

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


[5-Semi dark theme in yellow
](https://marketplace.visualstudio.com/items?itemName=moondevaa.Semi-dark-theme-in-yellow)

Screenshot in js

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

[6-Dark Plus Chocolate
](https://marketplace.visualstudio.com/items?itemName=moondevaa.DarkPlusChocolate)

ScreenShot in Python 


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




Codes are from AI chat and thanks to opensource Projects.
🚀 Mastering the Backend: A Journey into the Heart of Development 🌐
Tags: backend, backenddevelopment, beginners, tutorial
Published: 2024-01-19 15:02:55

Welcome to the world behind the scenes! If you're ready to unravel the mysteries of backend development, fasten your seatbelt. This guide will be your ticket to the intricate realm of servers, databases, and server-side scripting. Let's embark on this adventure! 🌟

## 1. 🏗️ Building a Strong Foundation:
Lay the groundwork by understanding core backend technologies. Dive into server-side languages such as Node.js, Python, Ruby, or PHP. Platforms like Codecademy and W3Schools are your starting points for crafting the backend magic. 🧙‍♂️

## 2. 🛠️ Databases and Data Modeling:
The backbone of backend development lies in databases. Explore SQL and NoSQL databases, and master the art of data modeling. Transform your data into a symphony that resonates with your application's needs. 🎶

## 3. 🔐 Authentication and Security:
Safeguard your applications! Learn the secrets of authentication and authorization. Understand encryption, secure password hashing, and implement HTTPS. Your applications will be fortresses of security in the digital realm. 🏰

## 4. 🔄 APIs and Integrations:
Elevate your backend game by mastering APIs. Learn to create and consume RESTful APIs, connecting your application with the wider digital landscape. Your backend skills will become the glue that binds the digital world together. 🌐

## 5. 🌐 Server Management and Deployment:
Rule your kingdom with server management skills. Explore cloud platforms like AWS, Azure, or Google Cloud. Learn deployment strategies to ensure your applications run smoothly, like a well-orchestrated symphony. 🚀

## 6. 🧩 Frameworks and Libraries:
Empower your backend journey with frameworks and libraries. Dive into Express.js for Node.js, Django for Python, or Ruby on Rails for Ruby. These tools will accelerate your development, turning your ideas into reality. ⚙️

## 7. 📊 Monitoring and Optimization:
Fine-tune your applications like a skilled artisan. Explore monitoring tools, performance optimization techniques, and scalability strategies. Your backend creations will run smoothly, even under the heaviest loads. 🚦

## 8. 🌍 Stay Updated and Collaborate:
Sail the seas of backend development by staying informed. Follow industry blogs, collaborate on GitHub, and participate in developer communities. Networking and continuous learning will be your compass in this ever-evolving landscape. 🌐

## Conclusion:
Embarking on the backend development journey is a thrilling adventure. Embrace the challenges, cherish the victories, and continuously hone your skills. With this guide as your companion, the world of backend development is yours to conquer. Happy coding, fearless backend explorer! 💻🌌✨
Beginner's TypeScript #27
Tags: programming, beginners, typescript
Published: 2024-01-19 15:00:00

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

⭐ **Error Message: "Could Not Find A Declaration File"** ⭐

Inside of the index.ts file, we have a single import:

```ts
import Diff from "diff"; // red squiggly line under diff
```

There is an error under diff that reads:

```ts
// hovering over diff shows:
Could not find a declaration file for module 'diff'. Implicitly has an 'any' type.
```

The **diff** package is listed in the **package.json** file, and we can see that it is present inside the **node_modules** folder. Why is not TypeScript letting us use it?

The issue is that the **diff** package does not include any TypeScript files, specifically a **.d.ts** file that contains types.

If we look at the JavaScript files for **diff** inside of **node_modules**, we can see that there are no types.

As the error message suggests, the fix for this error is to install the types for the **diff** package:

```bash
npm i --save-dev @types/diff
```

The **@types/diff** package is maintained by a group of community members at the **DefinitelyTyped** GitHub. There are types for many popular JavaScript packages, including **diff**.

👉 **Understanding the Declaration File**

Once installed, We will find a new **@types** directory inside your **node_modules**, which contains the **diff** directory and an **index.d.ts** file.

The **index.d.ts** file describes the **diff** module, exporting a **namespace**, **interfaces**, and providing helpful comments describing the code. In this case, **index.d.ts** is not linked to the original repository and has a separate version on npm, but it is maintained in sync with the diff library.

🚀 **Using diff**

Now that we have the types, the error about lacking the necessary declaration file has gone away. We can use **CMD + click** to jump to different spots in the **diff** declaration file inside of **node_modules**.

DefinitelyTyped and the **@types** packages provide a way to add type declarations for projects that do not have built-in TypeScript support, making it easier to work with these libraries in our TypeScript projects.

---

I hope you found it useful. Thanks for reading. 🙏

Let's get connected! You can find me on:
- **Medium:** https://medium.com/@nhannguyendevjs/
- **Dev**: https://dev.to/nhannguyendevjs/
- **Hashnode**: [https://nhannguyen.hashnode.dev](https://nhannguyen.hashnode.dev/)/
- **Linkedin:** https://www.linkedin.com/in/nhannguyendevjs/
- **X (formerly Twitter)**: https://twitter.com/nhannguyendevjs/
- **Buy Me a Coffee:** [https://www.buymeacoffee.com/nhannguyendevjs/](https://www.buymeacoffee.com/nhannguyen/)
Web development 🕸️.Interesting 🤔.
Tags: webdev, beginners, programming, tutorial
Published: 2024-01-19 14:55:02

Ok internet.
That's an amazing 😍🤩 place to deep dive in all the people family members and friends.
Be smart 🏙️🤓.
Also the internet has had an amazing 😍 and technology driven rapidly increasing.
Motivated and also worked.
In the today s scenarios and the development of the world.
And the rapid distribution of Engineering and Technology in the major parts of the 🌎 and the minor parts is the 🧠.
To deep dive and learn how internet and network works is a key skill and knowledge driven and also influenced and very much needed.
As I logged in to the First and time and also 
The logged in and logged out and also the technology driven mindset and also the key and the encryption and also the 
Foremost and the 
Best thing is thay this is true win win situation.
To learn and read and also be tolerated and .

Learn the basic fundamentals and the minor details and development of the world how does this works and related.happy learning and happiness 😊 unconditional love.
TK88 - TK88TOYS
Published: 2024-01-19 14:51:57

TK88 - TK88TOYS là một trong những nhà cái uy tín và được ưa chuộng nhất hiện nay tại Việt Nam. Với nhiều năm kinh nghiệm hoạt động trong lĩnh vực cá cược trực tuyến, TK88 đã thu hút được sự quan tâm của rất nhiều người chơi. 
TK88 thường xuyên có các chương trình khuyến mãi hấp dẫn dành cho người chơi mới đăng ký tài khoản. Bạn có thể nhận được các khoản tiền thưởng hoặc lượt quay miễn phí khi đăng ký tài khoản tại nhà cái này.
TK88 hỗ trợ nhiều phương thức nạp và rút tiền để bạn có thể thực hiện giao dịch một cách thuận tiện. Bạn có thể nạp tiền bằng cách chuyển khoản ngân hàng, sử dụng ví điện tử hoặc thẻ cào. Đối với việc rút tiền, bạn chỉ cần yêu cầu rút tiền và số tiền sẽ được chuyển vào tài khoản của bạn trong thời gian ngắn.
Brand: TK88 - TK88TOYS
Address: 283 Nguyễn Thái Bình, Phường 12, Tân Bình, Thành phố Hồ Chí Minh, Việt Nam
Postcode: 72510 
Phone: (+63) 9062961731 
Email: tk88toys@gmail.com
Website: https://tk88.toys/
#tk88 #tk88_toys #tk88toys
 
Social Links:

https://www.facebook.com/tk88toys/

https://twitter.com/tk88toys

https://www.pinterest.com/tk88toys/

https://500px.com/p/tk88toys?view=photos

https://www.flickr.com/people/tk88toys/

https://www.youtube.com/@tk88toys

https://www.reddit.com/user/tk88toys/

https://www.blogger.com/profile/00655963628389330564

https://tk88toys.blogspot.com/

https://www.tumblr.com/tk88toys
An easy and simple way to implement soft delete in .Net using EF Core
Tags: dotnet, csharp, api
Published: 2024-01-19 14:50:25

When developing APIs, it's common to have to modify the behavior of DELETE so that instead of deleting a record, it simply changes a boolean property and considers that resource not to exist if the value of the property is false. This technique is known as "Soft Delete."

There are many ways to implement this behavior. The approach presented in this text can be summarized in the following steps:
1- Add a boolean property to the desired class.
2- Override the SaveChangesAsync method of the class that extends DbContext.
3- Add a filter to the entity configuration so that "inactive" entities are not returned in queries.

## Add boolean property
The first step is self-explanatory. Create an entity and add the boolean property to it. If multiple entities need this behavior, consider creating a base class or interface that contains it.

## Override the SaveChangesAsync method
If you use EF Core, you likely extended the DbContext class to create your context. The base class has a method called SaveChangesAsync, which saves the changes made to the database.

The following code aims to detect the state of the entities tracked by the ChangeTracker. If any has been deleted, it will change its state to Unchanged (instead of Deleted) and then change the boolean property added in the previous step.

```
public override Task<int> SaveChangesAsync(bool acceptAllChangesOnSuccess, CancellationToken cancellationToken = default)
{
    foreach (var entry in ChangeTracker.Entries<T>()) // Where "T" is the entity type
    {
        switch (entry.State)
        {
            case EntityState.Deleted:
                entry.State = EntityState.Unchanged;
                entry.Entity.BooleanProperty = false; // Prefer using a method for this.
                break;
        }
    }
    return base.SaveChangesAsync(acceptAllChangesOnSuccess, cancellationToken);
}
```

## Add filter
With the modification made, it's now possible to update all queries so they ignore entities where the value of the boolean property is false. However, depending on the size of your application, this may be a quite tedious task.

To avoid the described situation, EF provides a way to do this automatically through entity configuration. Example:

```
public class YourEntityConfiguration : IEntityTypeConfiguration<YourEntity>
{
    public void Configure(EntityTypeBuilder<YourEntity> builder)
    {
        builder.HasQueryFilter(x => x.Active);
    }
}
```

The above code ensures that only entities with the Active property set to true are returned in queries.

We've reached the end of the tutorial. I hope this text has been enough to implement basic Soft Delete behavior in your application.
How to install Firefox Developer edition on Ubuntu.
Published: 2024-01-19 14:45:26


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jbhn552ihimdxs7wptx2.jpg)The thing is, Firefox dev edition is not available on the default system repository so if you want to install it, you have to do it manually.

Let's get right into it.

## 1. Open terminal

## 2. Download and unpack

```
wget "https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=en-US" -O Firefox-dev.tar.bz2
```
```
sudo tar xjf Firefox-dev.tar.bz2 -C /opt/
```

```
rm -r Firefox-dev.tar.bz2
```

## 3. Install

```
sudo ln -s /opt/firefox/firefox /usr/local/bin/firefox-dev
```

## 4. Run

```
firefox-dev
```
Now at this point, you have installed Firefox dev on your system and you can run it with the above command but if you want to create a shortcut(which you should), then follow along.

## 5. Creating Shortcut

```
vi Firefox-dev.desktop
```
If you don’t know how to use vi editor :

- Press “i” to enter insert mode

- copy-paste the lines given below( ctrl +c / ctrl+v )

Paste these lines inside the file :

```
[Desktop Entry]
Name=Firefox-developer-edition
Exec=/usr/local/bin/firefox-dev
Icon=/opt/firefox/browser/chrome/icons/default/default128.png
comment=browser
Type=Application
Terminal=false
Encoding=UTF-8
Categories=Utility;
```

- press “ESC” to move out of insert mode.
- now type “:wq” and press enter key to save and exit.

 Finally :

```
sudo cp Firefox-dev.desktop /usr/share/applications/
```

## 6. Updating
To be honest with you using Firefox Developers Edition as your default browser is kinda annoying since it asks for updates very often and you have to do it manually.

But if you wanna update it, don’t download it from the browser, just run these commands:

```
wget "https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=en-US" -O Firefox-dev.tar.bz2
```

```
sudo tar xjf  Firefox-dev.tar.bz2 -C /opt/
```

## 7. Removing
In some case, you wanna completely remove Firefox dev from your system:

```
sudo rm -r /opt/firefox/

sudo rm /usr/local/bin/firefox-dev
```

```
sudo rm /usr/share/applications/Firefox-dev.desktop

rm ~/Desktop/Firefox-dev.desktop
```
Where JavaScript came from  - The Mythos
Tags: javascript, beginners, frontend, funny
Published: 2024-01-19 14:43:51

I randomly discovered this little poem, while I happened to look into [the edit history](https://stackoverflow.com/posts/7023770/revisions) of [a stackoverflow answer](https://stackoverflow.com/questions/6873981/v8-and-ecmascript-differences/7023770#7023770) (on the differences between V8 and ECMAScript). The poem was sadly removed from the post (probably for not being that relevant).

But it was so funny that I had to repost it here, so that it is not lost to the internet. I hope you chuckle as much as I did.

Here it goes:

> _In the beginning there was Brendan Eich, and Brendan said "let there be **Object**". And there was._
> 
> _In his greed, Brendan lusted for more objects, and thusly he spoke "let there be **Function**, which can be used to construct more objects"._
> 
> _Function came to exist and with nothing else to inherit from, it counted Object as its parent, and yet it also was the creator of all Objects, including its own parent._
> 
> _This incestuous contradiction only served to enrage Brendan's lust even more, and he said:_
>
> _"Let there be **String**, with which I can name all myill-begotten children; **Number**, with which I can count my conquests; and **Array**, with which I can conveniently store sets of them in."_
> 
> _Brendan's wanton act of tyrannical creation begot malformed creatures, doomed to eternally live with pieces that made no sense._
> 
> _**Number** cried out: "Why can the antithesis of me claim to be me and be confirmed by reality itself? What God is there that creates a world in which a thing can be a thing and not that thing at the same time?"_
> 
> _In a final crushing act of pure malice, Brendan rose up on his throne - the look in his eye one of a maniacal God drunk with power and void of empathy - Brendan thundered:_
> 
> _"Let there be **Boolean**! the embodiment of Truth with which I will judge my misbehaving flock; **RegExp**! with which I will measure and then butcher my most evil progeny, **String**; and **Date**! born neuter and with minimal intelligence, as an example to all the others the priviledge I've bestowed upon them, and how easily it can be taken away._
> 
> _And that's where JavaScript came from._

![A deadly pact: 10 days of work, to rule the world.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yi3b8dt12y3tfmyk2us2.jpg)

It was apparently posted by user748221 on StackOverflow back in 2011. Thank you user748221 for this lovely mythological explanation of where JavaScript came from.


![Some people just want to ...](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/emje5w62o17d9m0u9xlu.jpg)

_<center>Some.. quote from 'Batman: The Dark Knight'..</center>_
Decoding the Challenge: Investigating a Common Deployment Hitch "Error: failed to create deliver client for orderer"
Tags: hyperledgerfabric, blockchain, minifabric, devops
Published: 2024-01-19 14:33:53

In the vast realm of blockchain technology, setting up a network can be a complex task. Recently, I faced an issue while deploying a minifabric network on a virtual machine.  The error message
`"Error: failed to create deliver client for orderer: orderer client failed to connect to 123.456.789.012:5013: failed to create new connection: context deadline exceeded,"` disrupted what should have been a routine process.

![Screenshot of the issue](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mt85dloijrbpjmv0apzf.png)

For those familiar with blockchain deployment, encountering errors is expected. However, comprehending and resolving these issues is where the real journey begins. In this blog, I aim to demystify the aforementioned error, sharing the troubleshooting steps that led to its resolution. Join me as we figure out the details of this deployment problem and solve the mystery behind the error that momentarily halted progress.

###Troubleshooting steps:

* Make sure no other app or service is using the port where minifab is deploying the orderer. In my case, it was port 5013. You can check with any one of these commands
```bash 
lsof -i :<port_number>
netstat -tlnp | grep <port_number>
```

* If you find another application on the needed port, you can choose a different port range by using the -e flag in the minifab command. Just use
```bash 
minifab up -e <port_number>
```

* If you are using an old minifab version, try updating the version
```bash 
docker pull hyperledgerlabs/minifab:latest
```

* The last crucial step that finally fixed the issue was discovering a firewall on the VM causing trouble with communication between the docker containers and the host. The problem was the firewall rules set up using **Uncomplicated Firewall (UFW)**. To tackle this, I examined the firewall's status and rules by using the command
```bash 
sudo ufw status
```

![Screenshot of the ufw status output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/30ny3hzyegdh7yawz5kf.jpg)

It became evident from the output that the firewall was not allowing the port range (5000). To fix this, I added a rule permitting this port range using the command:
```bash 
ufw allow <start_port_number>:<end_port_number>
```
I cleaned everything up by these commands 
``` bash 
minifab down
minifab cleanup
```
Then, I brought the network back up. Hooray! Problem solved, and the network was up and running smoothly! XD


Through this shared experience, I want to help others save time fixing common problems. This blog is like a guide to help troubleshoot issues and show the way for people facing similar problems. Let's make it easier for enthusiasts to understand and fix things when setting up their fabric deployments. Together, we can navigate through these challenges more smoothly and enjoy a hassle-free deployment experience.  
Happy Learning :)