teleren/devto huggingface dataset:
Contributing to freeCodeCamp: Empowering the Coding Community
Tags: hacktoberfest, opensource, github, webdev
Published: 2023-09-17 17:19:26

I'm thrilled to share my journey of contributing to @freeCodeCamp! 🚀 My PR was recently accepted and merged, and it's been an amazing experience. I want to express my gratitude to the freeCodeCamp team for their dedication to providing free coding education to the world.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qcicfmy8wyk2v7z8h24n.png)
Django Bug Bugging You? Let Me Squash It!
Tags: career, django, webdev, codenewbie
Published: 2023-09-17 16:38:57

🌟 Introducing **Opeyemi O.(Workforce001)'s** Django Bug-Fixing Fiverr Gig! 🌟

🚀 Attention Developers and Django Enthusiasts! Are you struggling with pesky bugs in your Django projects? Say goodbye to those sleepless nights because help has arrived! 🛠️

💡 Services Offered:
✅ Expert Django Bug Fixing
✅ Quick Turnaround Time
✅ Precise Code Diagnosis
✅ Seamless Integration
✅ Affordable Rates

👨‍💻 With 3 years+ of experience in Django development, I've mastered the art of bug hunting. No bug is too elusive for me to catch and fix!

📈 Benefits of Working with Me:
✨ Rapid Issue Resolution
✨ Clear Communication
✨ Hassle-Free Debugging
✨ Improved Website Performance
✨ Peace of Mind

Ready to get your Django project back on track? Let's collaborate and make your code squeaky clean. Your success is my **priority**!

👉 Visit my Fiverr gig to learn more and get started: [https://www.fiverr.com/workforce001/fix-django-bugs-quickly-and-efficiently](https://www.fiverr.com/workforce001/fix-django-bugs-quickly-and-efficiently)

Got a bug emergency? **Don't fret!** Message me on Fiverr [Workforce001](https://www.fiverr.com/workforce001/), and I'll be your bug-slaying superhero. Let's make your Django project shine! 🚀
SOLIDJS in Browser
Tags: solidjs, javascript
Published: 2023-09-17 16:36:51

For SolidJS fans, here is a way to use it directly in a browser (although you loose some performances benefits)


[SolidJS in Browser](https://flems.io/#0=N4IgZglgNgpgziAXAbVAOwIYFsZJAOgAsAXLKEAGhAGMB7NYmBvAHTRAF8L1tdEQ4tKBAAm+AFYIqdBk2J4IWAA60ATsQAEJMhrCraWDRoDkJYkriIA9Feoi0EuCJjCAbqvxoYxK2iVYrQWERAFpJAAEARnwAdnxIgCYrbSgrAGp4LGM2RRV1DQAqDQw4DSDRSV19Q1Nic0sbOwdJZzcPLx8-APLQiOi4xPTM4w0c5TVNIpKyoQq4AH0AdxgAIyqDEzMLa1t7R1aId09vX39A2d64KNj4pOWVobgs0bQ2GThNYA1qVRgMRgAyhAAOaYKAUDT0ADCsAwaAArkoOBoALwzYKSN70D4aL6-NDOVQaZFonqSJarNhsGAADzynx+f0BILBEOhsIRSgh+MJEJSHAA3JQBC4YNRiBBsXgAGyIAAMnG4IEwODwjmFMkYzH4uQmuO+v3+MCBoIw4MhaBhf053KYvK0pCgxPWhhYBHOwUcboFVLQ700yDo8IYELg3ihtGDxAAuqiDUzjSyzQAKOUASgobCMEpwRNJ3gAkrJVK4U8m06iAHxlcORhjJoP1itpDSRDOtuWdtM+15oMDB8WStAaAAqEGIv3LuKzGl+xHhqmHKQABgAeOBKOFlYgAT1gKLdWAwqmBEDQiA0co7ShpbsrUIA8gBVAByI4AogAlVeBTdoSvLj2HC+v6GgAIJKEocZTii1bADO7LWoiyYwdW1CwqoRaMCWKY5jAqhpt2M5zguS6OsuM5GKuIiHNue4wAe4D0MQITLCCJCICsQgiHelFGBoAAkwBjhOMDAcO-FURucKVkJjbEBwP7Sf+fE-jRriVjOgFsIKvo8vhyYQVyGgiLQ1DwjgDD4FxIg7kR7BUGGsCDlK-ByogACsMSKjwqr8Pg1BwFINDMXIeCcNGHBAA)

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script type="module" src="./src/index.js"></script>
  </body>
</html>
```

solid.js

```js
import {
    createSignal,
    onCleanup,
  } from "https://cdn.skypack.dev/solid-js";

  import { render } from "https://cdn.skypack.dev/solid-js/web";
  import html from "https://cdn.skypack.dev/solid-js/html";


  export {createSignal, onCleanup, render, html};
```

index.js

```js
import { createSignal, onCleanup, render, html } from "./libs/solid.js";

const [count, setCount] = createSignal(0),
  timer = setInterval(() => setCount(count() + 1), 1000);

function Titre() {
  return html`<span style="margin: 0 10px">COUNTER</span>`;
}

const App = () => {
  onCleanup(() => clearInterval(timer));
  return html`
    <div style="font-weight:bold">
      ${Titre}
      <span>${count}</span>
    </div>
  `;
};

render(App, document.body);

```
S2MANGA.TOP – Read manga free online and update daily
Published: 2023-09-17 16:31:29

https://s2manga.top/ S2Manga✔️ Read Manga and Comics online free✔️ update fastest✔️ most full✔️ synthesized with high-quality images✔️ with full English translation✔️ all manga update daily✔️✔️✔️
#readmangaonline #readmanga #mangaonline #mangaonlinefree
https://www.provenexpert.com/s2mangatop01/
https://www.scoop.it/u/s2manga-top
https://www.slideshare.net/s2mangatop01
🔥 CodeWiz on Product Hunt: The Big Reveal is Tomorrow!
Tags: ai, webdev, productivity, news
Published: 2023-09-17 16:23:31

Hey Dev.to fam! 🎉

Ever dreamt of a magical coding sidekick during those "WHY IS THIS NOT WORKING?!" moments? Well, I had that dream, and after countless nights of coding (and a fair amount of caffeine), I turned it into a reality - introducing [CodeWiz](https://codewiz.app/?utm_source=dev.to&utm_medium=blog&utm_campaign=launch).

Tomorrow, the 18th of September, is THE day. CodeWiz steps into the spotlight on Product Hunt's "Coming Soon" stage. As a solo creator, to say that the journey has been a whirlwind would be an understatement. From the first line of code to the gazillionth test (yeah, I lost count 🙈), it's been wild!

If you've ever wondered, "What if there was a tool that could give me answers without Googling for hours or scrolling Stack Overflow threads?", then CodeWiz might just be your answer.

I invite you to share the excitement, the nervous butterflies, and the pride of this milestone. Just a simple click on the ["Notify Me"](https://www.producthunt.com/products/codewiz) button on Product Hunt would mean the world.

And hey, if you've got a fellow dev buddy or two, maybe share the magic? Because, why code alone when you can code with a Wiz by your side? 🧙‍♂️

Can't wait to unveil what's been brewing!

👉 Follow the launch here: https://www.producthunt.com/products/codewiz

Stay curious, and may the code be ever in your favor!

Pietro Lungarini
The Wizardry Developer behind CodeWiz.
Top 5 Tips for Becoming a Proficient Programmer
Tags: webdev, javascript, beginners, programming
Published: 2023-09-17 16:13:06


Becoming a proficient programmer requires time, practice, and dedication. Here are the top five tips for beginners, drawn from my four years of experience, to assist you on your journey:

**1. Learn the Fundamentals**:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dynax2h1pe2amosufir1.png)
 Maintain a strong grasp of programming fundamentals such as variables, data types, loops, conditionals, and functions in your chosen language. Deeply understanding these basics is crucial, as they remain consistent across languages. This knowledge will facilitate faster learning when you need to pick up a new language in the future.


**2. Choose the Right Language**:

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


Select a programming language that aligns with your goals. For instance, if you aspire to become a web developer, start with HTML and CSS. If your aim is data science, Python is an excellent choice. After mastering the language basics, explore the most in-demand frameworks and libraries in the market related to your chosen field.

**3. Practice Regularly**: 

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


Programming is a skill that thrives with consistent practice. To enhance your coding speed and proficiency, engage in regular practice. Solve coding challenges, work on personal projects, participate in hackathons, and strive to write code every day to reinforce your skills.

**4. Read Code**:

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


Examine code written by others, particularly in open-source projects. This exposure will familiarize you with diverse coding styles, best practices, and real-world applications. Learning from existing codebases can significantly accelerate your growth as a programmer.

**5. Stay Informed**:

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


The tech industry is perpetually evolving. Stay updated with the latest developments in the field by following tech-related blogs, keeping an eye on industry trends, tools, and emerging languages, and connecting with tech enthusiasts on social media to stay informed about current events and news.

Remember that becoming a proficient programmer is a journey rather than a destination. Embrace challenges and setbacks as opportunities for learning and growth. Continuously challenge yourself to improve, and over time, you will undoubtedly become a more skilled and capable programmer.

If you are on Twitter can you follow me there as well, I keep posted these kinds of stuff there as well => {% twitter 1703431207676227934 %}
A clean way to use required value types in ASP.NET Core
Tags: aspnet, webdev, csharp, firstpost
Published: 2023-09-17 16:07:08

How do you deal with required value types in input models without having to make all of them nullable?

For a long time, the only solutions out there suggested:

* Using `[BindRequired]`, which doesn't work for body data.
* Using something like `[Range]`, which only works for integers and only if they cannot be zero.
* Just making all your properties nullable, which is ugly.

But you can actually get your input models looking like this by making a custom value provider & model binder:

```cs
record InputModel
{
    [Required(ErrorMessage = "Optional custom error")]
    public int NonNullableInteger { get; init; }
}
```

The entire tutorial is kept updated on my blog, alongside source code and an example project: https://thom.ee/blog/clean-way-to-use-required-value-types-in-asp-net-core/
Difference between n++ and ++n?
Tags: webdev, beginners, programming, codenewbie
Published: 2023-09-17 15:22:04

## Understanding Increment Operations:
Before we delve into post-increment and pre-increment, let's clarify what an increment operation is in the context of programming. Simply put, an increment operation is used to increase the value of a variable by 1. It's like counting one step forward.

Imagine you have a variable **n **set to 5. If you want to increase its value by 1, there are two main ways to do it: post-increment and pre-increment.

## Post-increment (n++):
Post-increment is like saying, "Use the current value of n, and after you've used it, increase it by 1."

For example, if you have **n = 5**, and you write **x = n++**, what happens? **x** gets the current value of **n** (which is 5), and then, as a polite gesture, **n** increases to 6. So, **x** gets 5, and n becomes 6.


```
int n = 5;
int x = n++;  // x gets 5, n becomes 6. 

```

## Pre-increment (++n):
Pre-increment, on the other hand, is more direct. It's like saying, "Increase the value of **n** by 1 first, and then use the new value."

Suppose **n = 5**. If you write **x = ++n**, this time, n becomes 6 immediately, and x receives that new value. So, **x** gets 6, and **n** is also 6.

```
int n = 5;
int x = ++n;  // n becomes 6, and x gets 6.
```

## Choosing Between Post-increment and Pre-increment:
Now that you understand how post-increment and pre-increment work, you might wonder when to use which.

In most cases, it depends on your specific programming needs. If you want to use the current value of a variable and then increment it, post-increment (**n++**) is the way to go. On the other hand, if you need the incremented value right away, pre-increment (**++n**) is more efficient.

## Conclusion:
In programming, post-increment (**n++**) uses the current value before increasing it, while pre-increment (**++n**) immediately provides the updated value. Mastering these concepts is a valuable skill for writing efficient code. Happy coding!
Compact `match` in Rust
Tags: rust, optimization, code, formatting
Published: 2023-09-17 14:42:15

`match` often used to work with enums, let's look at this example:

```rust
enum NextStep {
    TurnLeft,
    TurnRight
}

fn main() {
    let next_step = NextStep::TurnLeft;
    match next_step {
        NextStep::TurnLeft => println!("turn left"),
        NextStep::TurnRight => println!("turn right"),
    }
}
```

It may not be obvious, but enums in Rust can be brought into the current namespace, allowing for more compact code:

```rust
// ...
    use NextStep::*;
    match next_step {
        TurnLeft => println!("turn left"),
        TurnRight => println!("turn right"),
    }
// ...
```

And, to limit the effect to just `match`, you will have to set boundaries using `{}` for an additional scope:

```rust
// ...
    {
        use NextStep::*;
        match next_step {
            // ...
        }
    }
// ...
```

## My links

I'm making my perfect todo, note-taking app Heaplist, you can try it here [heaplist.app](https://heaplist.app/)
And I have a twitter [@rsk](https://twitter.com/rsk)
Advanced Concepts: Transactions and Sharding
Tags: python, mongodb, pymongo
Published: 2023-09-17 14:42:14

**Advanced Concepts: Transactions and Sharding**

**1. Transactions in MongoDB:**
 Transactions ensure data consistency and integrity when performing multiple operations as a single unit of work. MongoDB supports multi-document transactions, allowing you to group multiple operations into a transaction and ensuring that they all succeed or fail together.

```python
from pymongo import MongoClient


client = MongoClient()
db = client['mydatabase']
collection = db['mycollection']
 

with client.start_session() as session:
    with session.start_transaction():
        try:
            # Perform multiple operations within the transaction
            collection.update_one({"name": "Alice"}, {"$set": {"age": 29}})
            collection.update_one({"name": "Bob"}, {"$set": {"age": 33}})
            session.commit_transaction()
        except Exception as exc:
            print("Transaction aborted:", exc)
            session.abort_transaction()
```

**2. Sharding and Horizontal Scaling:**
 Sharding involves distributing data across multiple servers to handle larger workloads and provide horizontal scaling. MongoDB's sharding feature is particularly useful for managing large datasets and high-throughput applications.

- Enable Sharding:
 In the MongoDB shell, enable sharding for a specific database:
```javascript
use mydatabase
sh.enableSharding("mydatabase")
```

- Shard a Collection:
 Choose a shard key (e.g., a field to distribute data) and shard the collection:
```javascript
sh.shardCollection("mydatabase.mycollection", { "shard_key_field": 1 })
```

- Insert Data:
 Insert data into the sharded collection:
```python
collection.insert_one({"shard_key_field": "value", "other_field": "data"})
```
Sharding allows MongoDB to distribute data across multiple shards, improving performance and accommodating large amounts of data.

These advanced concepts, such as transactions, sharding, and replication, provide MongoDB with the capabilities needed to handle complex scenarios and large-scale applications. The provided Python code snippets offer a glimpse into how these features can be implemented.


**Conclusion:**
The combination of Python and MongoDB stands as a dynamic force in today’s software development realm. The versatility of Python and the flexible design of MongoDB combine to provide a powerful tool. Python’s applications cover web development, data analytics, and AI, while MongoDB’s derivation from traditional databases provides scalability and flexibility. The CRUD process is seamless in the PyMongo driver. Improved queries, streamlined data modeling, and integration with web frameworks like Flask and Django increase productivity. The ability to communicate and partner effectively allows manufacturers to manage complex situations. Ultimately, this deal empowers developers to have two powerful people, capable of introducing innovation in different areas.
🚀 Transform Your Web Apps: Migrate from Node.js to Bun.js with Ease! 🚀
Tags: nodejstobunjs, javascript, webdev, programming
Published: 2023-09-17 14:38:06

🚀 **** 🚀

👉 Are you ready to take your web development to the next level? Learn how to seamlessly transition from Node.js to Bun.js with our comprehensive step-by-step guide!

🔥 Unleash the full potential of your applications with Bun.js:
✅ Enhanced Performance
✅ Improved Scalability
✅ Simplified Package Management

📚 Dive deep into the world of Bun.js with our expert insights. Discover the future of web development and stay ahead in the game.

🌐 Don't miss this opportunity to boost your skills and upgrade your projects! Read the full article now.

👉 Read more: [builtbybuilder.com/blog/migrate-nodejs-to-bunjs-guide](https://www.builtbybuilder.com/blog/migrate-nodejs-to-bunjs-guide)

#NodejsToBunjs #WebDevelopment #TechnologyUpgrade #BunjsMigration #ExpertInsights
ConFoo Montreal 2024: Call for Papers is Now Open
Tags: callforpaper, conference, eventsinyourcity
Published: 2023-09-17 14:33:42



[ConFoo ](https://confoo.ca/en/2024)is a multi-technology conference specifically crafted for developers. With over 150 presentations, offered by local and international speakers, the conference wishes to bring outstanding diversity of content to expand your knowledge, increase developer’s skills and productivity.

Want to share your knowledge and expertise to hundreds of experts in your field? Want to be part of our talented team of renowned speakers? The team at ConFoo is looking for speakers and conference proposals for its 2024 event in Montreal.

Our talks are both dynamic and educational and are set to help participants build on their career. We recommend a 45-minute format, including a 10 Q&A session at the end.

You have until September 23, 2023, to [submit your proposal](https://confoo.ca/en/2024/call-for-papers).

Until then, participants can enjoy a [400$ discount](https://confoo.ca/en/2024) on their registration until September 23.
Integrating MongoDB with Web Frameworks: Flask and Django
Tags: python, mongodb, pymongo
Published: 2023-09-17 14:33:21

**Integrating MongoDB with Web Frameworks: Flask and Django:**

**1. Defining Models with Flask-MongoEngine:**
 Flask-MongoEngine simplifies integrating MongoDB with Flask applications. It provides an Object-Document Mapping (ODM) layer for MongoDB and Flask.

```python
from flask import Flask
from flask_mongoengine import MongoEngine


app = Flask(__name__)
app.config['MONGODB_SETTINGS'] = {
    'db': 'mydatabase',
    'host': 'localhost',
    'port': 27017
}
db = MongoEngine(app)
 

class User(db.Document):
    username = db.StringField(required=True, unique=True)
    email = db.EmailField(required=True)
 

# Create a new user
new_user = User(username="john_doe", email="john@example.com")
new_user.save()
 

# Query users
users = User.objects(username="john_doe")
```

**2. Integrating MongoDB with Django using Django-MongoDB-Engine:**
 Django-MongoDB-Engine allows Django to work with MongoDB as a database backend, providing a seamless integration experience.

```python
from django.db import models
from djangotoolbox.fields import ListField, EmbeddedModelField
from mongodb_engine.fields import ObjectIdField
 

class User(models.Model):
    username = models.CharField(max_length=50, unique=True)
    email = models.EmailField()
 

# Create a new user
new_user = User(username="jane_doe", email="jane@example.com")
new_user.save()
 

# Query users
users = User.objects.filter(username="jane_doe")
```

Note: Settings for this are different as you need to install some packages and modify settings, you can refer to the references section. 

By integrating MongoDB with Flask and Django using their respective MongoDB extensions, you can seamlessly use MongoDB as a database backend for your web applications. This integration provides the flexibility of NoSQL databases while leveraging the features and convenience of popular web frameworks.
Taking Queries to the Next Level: Advanced Querying
Tags: python, mongodb, pymongo
Published: 2023-09-17 14:32:58

**Taking Queries to the Next Level: Advanced Querying**

**1. Querying Techniques:**
 PyMongo offers a range of methods that allow you to craft complex queries to retrieve specific data from MongoDB collections. These techniques include filtering documents, sorting results, and limiting the number of retrieved documents.

```python
from pymongo import MongoClient


# Connect to MongoDB
client = MongoClient()
db = client['mydatabase']
collection = db['mycollection']
 

# Filtering Documents:
# Retrieve documents where age is greater than 25
filtered_docs = collection.find({"age": {"$gt": 25}})
 

# Sorting Results:
# Retrieve documents sorted by age in descending order
sorted_docs = collection.find().sort("age", -1)
 

# Limiting Retrieved Documents:
# Retrieve only the first 5 documents
limited_docs = collection.find().limit(5)

 
# Combining Techniques:
# Retrieve and print documents of people aged 25-35, sorted by name
query = {"age": {"$gte": 25, "$lte": 35}}
result = collection.find(query).sort("name", 1)

 
for doc in result:
    print(doc)
```

- Filtering Documents:
 The `find()` method can accept query criteria to filter documents based on specific conditions. In the example above, only documents with an age greater than 25 are retrieved.

- Sorting Results:
 The `sort()` method sorts query results based on specified fields. In the code snippet, documents are sorted by age in descending order

- Limiting Retrieved Documents:
 The `limit()` method restricts the number of documents returned by a query. In this case, only the first 5 documents are retrieved.

- Combining Techniques:
 Query techniques can be combined to create more precise queries. In the example, documents of people aged 25 to 35 are retrieved and sorted by name.

By mastering advanced querying techniques, you can extract specific subsets of data from MongoDB collections, enabling you to obtain the information you need efficiently and effectively.
Seamless Integration: Building Python Applications with MongoDB
Tags: python, mongodb, pymongo
Published: 2023-09-17 14:32:28

**Seamless Integration: Building Python Applications with MongoDB**

Building applications that interact with MongoDB using Python is a seamless process thanks to libraries like PyMongo. Python's versatility and MongoDB's flexibility complement each other, allowing you to create dynamic and data-driven applications.

**1. Creating Python Applications with MongoDB:**
 Python applications can easily interact with MongoDB databases to perform a variety of tasks, from storing and retrieving data to performing complex data analysis. This integration is facilitated by PyMongo's intuitive API.

```python
from pymongo import MongoClient

# Connect to MongoDB
client = MongoClient()
db = client['mydatabase']
collection = db['mycollection']

# Insert a document
new_doc = {"name": "Ajit", "age": 28}
collection.insert_one(new_doc) 

# Query documents
result = collection.find({"age": {"$gt": 25}}) 

for doc in result:
    print(doc)
```

**2. Utilising Python Classes for Modelling:**
 Python's object-oriented capabilities can be leveraged to model MongoDB documents as Python classes, providing a structured and intuitive way to interact with data.

```python
class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age


    def save_to_db(self):
        collection.insert_one({"name": self.name, "age": self.age})

 

# Create and save a Person object
alice = Person("Ajit", 28)
alice.save_to_db()
 

# Query and display Person objects
result = collection.find({"age": {"$gt": 25}})


for doc in result:
    person = Person(doc["name"], doc["age"])
    print(person.name, person.age)
```
By creating Python classes that mirror your MongoDB document structure, you can encapsulate data and operations, making your code more organized and maintainable.