teleren/devto huggingface dataset:
My Coding Journey: A Revelation in Abstraction
Tags: beginners, javascript, python
Published: 2023-08-29 12:08:41

Today, I want to take you on a journey! a journey from the halls of my college days to the dynamic world of the software industry. Along the way, I stumbled upon a realization that completely transformed the way I perceive coding concepts.

**Back to College Days: The Beginning**

During my college years, coding was all about mastering syntax and glue together lines of code. Little did I know that a moment was waiting to unfold. It all started when an industry veteran paid a visit to our campus. With a decade of real-world experience under his belt, he asked a very simple question: "What exactly is object-oriented programming (OOP)?" The room buzzed with anticipation.

 **The Unexpected Twist: A Puzzle of Concepts** 

What happened next left me shocked. The answers, even from our brightest minds, were rejected. It became apparent that we had confined our understanding to textbook definitions. We had memorized concepts, but their true essence had slipped through the cracks.

**The Journey to Uncover Abstraction** 

The moment arrived when we dived deep into the concept of "abstraction." We had all crammed the definition as "hiding complexity from the user." But there was a catch. We had overlooked a crucial detail—the audience. When asked about abstraction, the wrong response was "end user." Yet, this left a nagging question: How could the end-user possibly know about the backend workings of code, hidden beneath layers of user interface?

**A Paradigm Shift: The True Purpose of Abstraction**

My journey took a turn when I entered the industry. Real-world scenarios revealed a deeper truth about abstraction. It wasn't about shielding the end user but empowering fellow developers. It was about providing a high-level overview of the code, stripping away the unnecessary complexities that could hinder understanding.

**The Use of Abstraction: A Clearer Vision** 

How could one's code communicate efficiently with fellow developers without drowning them in details? The answer lay in abstracting lower-level details using classes, objects, and functions. The goal was clear “to offer a concise yet comprehensive understanding of functionality, minus the overwhelming low level details.”

**The Journey Continues: A Guiding Star**

As my coding journey progresses, I carry this revelation as a guiding star. My perspective has shifted, and my understanding has deepened. Every line of code now holds the potential to be more than just syntax—it's a language of abstraction, facilitating seamless collaboration among developers and enabling us to create wonders together.

**Embrace the Revelation: A New Perspective** 

Remember that our coding journey isn't just about code—it's about the philosophy behind it.
how to create a fascinating background color changer using JavaScript
Tags: webdev, javascript, beginners, programming
Published: 2023-08-29 12:05:53


In this tutorial, we're excited to show you how to create a fascinating background color changer using JavaScript. Before we dive into the step-by-step instructions, take a quick look at the video demonstration below to see the magic in action

{% embed https://youtu.be/ABmzQBYkCrE?si=5JBBb1hQbxICo_6J %}


<iframe width="560" height="315" src="https://youtu.be/ABmzQBYkCrE?si=5JBBb1hQbxICo_6J" frameborder="0" allowfullscreen></iframe>
List of top AI tools and products directories
Tags: futuretools, easywithai, ai, directories
Published: 2023-08-29 11:50:51

I recently check lots of ai directories to find top ai tools. the following websites are the best:


- [Altern](https://altern.ai/): The place to discover new AI tools and products.
- [FutureTools](https://futuretools.io): new AI tools list
- [EasyWithAI](https://easywithai.com): easy list of AI tools

you name more :)
Advanced Filtering with Sieve Expressions
Tags: sieve, email, filter
Published: 2023-08-29 11:23:00

Today we are announcing the latest release of Stalwart Mail Server: version 0.3.6. This update includes multiple enhancements to the Sieve filtering language, including the ability to evaluate arithmetical and logical expressions, and fetch data from SQL or LDAP databases to Sieve variables.

### Arithmetical and Logical Expressions

Stalwart Mail Server now incorporates the ability to evaluate arithmetical and logical operations within Sieve scripts. For instance, the following Sieve script rejects a mail if it satisfies a particular condition:

```sieve
if test eval "score + ((awl_score / awl_count) - score) * awl_factor > 2.25" {
    reject "Your message is SPAM.";
    stop;
}
```

Whether you're aiming to refine your filtering mechanisms or just add some mathematical magic to your scripts, this feature is sure to come in handy.

To learn more about expressions in Sieve scripts, check out the [Arithmetical and Logical Expressions](https://stalw.art/docs/smtp/filter/sieve#arithmetical-and-logical-expressions) section in the documentation.

### Fetching Data from Databases

Using Sieve scripts, you can now query SQL or LDAP databases and store the results as Sieve variables. This is done using the `query` command with the optional `:set` argument.

Consider this example:

```sieve
query :use "sql" :set ["awl_score", "awl_count"] "SELECT score, count FROM awl WHERE sender = ? AND ip = ?" ["${env.from}", "%{env.remote_ip}"];
```

The above Sieve script fetches the `score` and `count` columns from the `awl` table in an SQL database and stores them as the Sieve variables `awl_score` and `awl_count` respectively.

To learn more about fetching data from SQL or LDAP queries, check out the [query extension](https://stalw.art/docs/smtp/filter/sieve#directory-queries) documentation.

### Conclusion

These features allow for more advanced filtering mechanisms and more powerful Sieve scripts. We hope you enjoy them!
Управление сложностью: поиск баланса между хаосом и организацией
Published: 2023-08-29 11:19:47

Как часто вы погружаетесь во внутренний мир планирования, пытаясь создать идеальную систему? Сколько раз ваши идеи и инструменты управления порой слишком упорядоченной реальностью заканчивались сдачей позиций перед вседозволенностью хаоса?

Жизнь - это борьба с бесконечным хаосом. Трансформируя его в списки, напоминания и задачи, я искал наилучший способ организации. Пробовал разные приложения, пытаясь улучшить свою продуктивность, но хаос всегда возвращался. Иронично, но мне даже стало приятно отталкиваться от его неизбежности.

Однако уходить в крайности и полагаться только на хаос — это также не выход. Планирование необходимо, чтобы прогрессировать и развиваться. Но как наладить этот баланс?

Вот несколько инструментов, которые помогли мне организовать свой хаос:

1. **Заметки в телефоне:** это мое место для быстрых, неоформленных идей, которые еще не превратились в конкретные задачи.
2. **Доска с задачами:** каждая идея или заметка может стать задачей, если она требует выполнения.
3. **Проекты:** когда задача становится слишком сложной или объемной, я превращаю ее в проект с отдельными подзадачами.
4. **Доска идей:** некоторые заметки кажутся важными, но пока не могут быть задачами. Они остаются здесь до лучших времен.
5. **База знаний:** это место для долгосрочного хранения. Сюда попадают списки дел, книги, фильмы и другие ресурсы, к которым я хочу вернуться позже.
6. **Грязный инбокс:** сюда попадает все то, что еще не было оформлено или отсортировано.

Важно помнить, что у каждого свои потребности и предпочтения. Что работает для меня, может не подойти другому. Однако ключевое правило здесь - управление сложностью. Не создавайте слишком много уровней и категорий, иначе вы рискуете потеряться в собственной системе.

> Создание задачи — это процесс обобщения и абстракции, похожий на программирование. Вам нужно дать ей название, определиться с деталями и понять, какие действия с ней могут произойти.


В заключение, планирование и организация — это искусство, требующее баланса. Найдите свой способ организации, не позволяя хаосу или чрезмерной организации контролировать вашу жизнь.
Learn how to restore Mac email
Tags: macmail, restoremacmail
Published: 2023-08-29 11:01:42

## Learn how to restore Mac email after reinstalling Mac OS

When you reinstall an operating system, you may have to restore your email data. The only way to be hundred percent sure that your files will be restored is to take a backup before reinstallation. But it might be that you were facing issues beforehand. Running regular backups for your email accounts is always recommended. Here, you need to understand that if you were only maintaining a local backup, you might not be able to restore the data because when you reinstall the operating system, you mostly lose all the data on the device. It can also happen when your device develops a hardware issue or when there is a bug or a virus or similar stuff. This is why it is really important to maintain at least two copies with one being local and another being remote or external or better all three. 

## Restore Mac email easily 

When you understand that it is important to maintain multiple copies on multiple sites and also use regular incremental backups, it becomes evident that manual methods will not suffice. As it is clear that data security and integrity are paramount and so is the privacy of user details, free tools also clearly come out as risky methods. 

When you want automatic backups which are easy to run, when you want your backups to be safe and your credentials to remain private, and when you want more control for this task, you want an advanced backup and restore Mac tool. 

## This is the best solution

Mail Backup X is the best tool to backup and restore many email clients which also allows you to create five user profiles. You can use a top up to add more profiles when you want to scale up. It retains data integrity, privacy, and runs securely in offline mode. Your data is compressed with the 3X data compression algorithm and this enhances speed, limits use of space, and has other benefits. You can also get a free demo to test the tool's capabilities, performance, reliability, and ease of use. This helps in decision making about getting the full version. The automatic backup and resume feature is also found in this tool making the performance top notch.

## Conclusion

Whether you are **[restoring Mac mail or migrating mailboxes](
https://www.mailbackupx.com/restore-mac-email/)** or you are backing up emails, rest assured you can enjoy seamless process and results on Mac or Windows with this certified tool that has twin compatibility. Endowed with a user-friendly interface and the best design, this tool simplifies these email management tasks for you making them a breeze. At the same time, automatic 3X compression with retention of data and structure along with data encryption optimise your backups like no other tool would. If this wasn't enough, this tool also has PDF archiving feature, distributed backup option, and integrated FTP server. It can never get better than this when combined with low prices and free customer support. So go ahead and enjoy a free trial before you get the full version 
https://www.mailbackupx.com/restore-mac-email/.
Why join me at HalfStack Vienna 2023
Tags: webdev, javascript, api, eventsinyourcity
Published: 2023-08-29 10:56:16


There are conferences for Web, and there are conferences for Web. If you look at the conference calendar, you will see multiple of them. You might wonder to which one to go this fall. And you will be correct. There are so many. 

I want to introduce you to an event that could change how you define a "good conference experience" for yourself. 

The event is called "[HalfStack](https://halfstackconf.com/)," and it runs in several cities, but my pitch for you is for their [Vienna event](https://halfstackconf.com/vienna) because I will be speaking there.

HalfStack events are fun, creative, single-track events hosted in relaxed environments focusing on the attendee experience, with great food, drinks, talks, swag, and community. It's different from your ordinary tech event.

If you look at the [speakers and their talks](https://halfstackconf.com/vienna), you will see that for just one day, you will learn a lot about **APIs**, **Javascript**, **Team management**, **building stuff**, and how to bring fun back to your developer's life!

Then, you might realize that the event is just half done because the rest of the activities are before you. You can mingle with the speakers and other fellow attendees and even participate in some funny actions. All of this is included in your ticket!

## What is [my talk](https://halfstackconf.com/vienna#bogomil-shopov) about?

After three days at a metal festival, I realized something sad. In the software world, we don't have fun at work anymore. I am not talking about the HR-inspired fun; I am talking about the joy that comes from the inside. I want to change that and challenge you to bring back our fun.

My career in IT started as a servant to programmers, fixing a line or two in the code, and now I am a director in a vast international privacy company. If I look back, it was different. Oh gosh, we had so much fun in the past.

Do you remember the chair rowing? Do you remember how amazed we were to crash a keyboard or two on each other backs? Do you remember us singing songs about Java while writing fake protocols? 

### What happened to us? 

I don't know when it happened, but it seems that at some point recently, most of the world decided that IT is an elite profession that needs to produce only value no matter what.

This is a great tragedy, and it must be rectified. Why do we have feelings, emotions, and personalities if we no longer have fun?

In the talk, I will take you on a retrospective journey through the years to see what went wrong and how we fix it together. It's more like an art provocation than talk, so please keep your mind open to learn something new.

## Thanks!
Thanks for reading this small pitch that looks like a marketing message, but it's not. It comes from my heart!

 As a thank you gift I am ready to give you a 10% discount. [Click here to get a ticket with the discount.](https://ti.to/halfstack/halfstack-vienna-2023/discount/shopov-count-10)
A Step-by-Step Guide to Committing and Pushing Changes in Git Using Visual Studio Code
Tags: github, webdev, tutorial, programming
Published: 2023-08-29 10:43:36



1. **Create a New Repository on GitHub:**
   - Go to GitHub and log in to your account.
   - Click the "+" sign in the upper-right corner and select "New repository".
   - Give your repository a name, optionally add a description, choose visibility settings, and select any other desired options.
   - Click "Create repository".

2. **Initialize Git in Your Project:**
   - Open your BMI calculator project in your preferred code editor (e.g., Visual Studio Code).
   - Open the terminal within your code editor.

3. **Initialize Git:**
   - Run the following commands in the terminal:

     ```
     git init
     git add .
     git commit -m "Initial commit"
     ```

4. **Connect Your Local Repository to GitHub:**
   - Copy the URL of the repository you created on GitHub.
   - Run the following command in the terminal, replacing `<repository-url>` with the actual URL:

     ```
     git remote add origin <repository-url>
     git branch -M main
     git push -u origin main
     ```

5. **Push Your Code to GitHub:**
   - Run the following command to push your code to GitHub:

     ```
     git push origin main
     ```

6. **Your Code is on GitHub:**
   - Refresh your GitHub repository page, and you should see your code uploaded.

7. **Updating Your Repository:**
   - Whenever you make changes to your code, you can use the following commands to update your GitHub repository:

     ```
     git add .
     git commit -m "Update"
     git push origin main
     ```

Remember to keep your sensitive data (like API keys) out of your public repositories. You can use environment variables or other methods to manage such information securely.

Please note that this is a general guide. Make sure to refer to official documentation or tutorials for more detailed instructions tailored to your specific development environment and tools.
NumPy Tutorial #12: Array Sorting
Tags: datascience, python, beginners, tutorial
Published: 2023-08-29 10:43:16

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

In this blog, I will show you how to sort an array in NumPy.

---

## Sort

NumPy has provided a method called `sort` to sort an array. This method requires one argument which is the original array that you want to sort. Let see how that method works in code.

Let us create an array
```python
import numpy as np

unsorted_arr = np.array([2, 5, 1, 7, 8, 9, 3, 4, 6, 7])
```

Then, use the method `sort` to sort the `unsorted_arr`
```python
sorted_arr = np.sort(unsorted_arr)
```

Finally, print the `sorted_arr` to see the output
```python
print(sorted_arr)
```
You will see the following output
```
[1 2 3 4 5 6 7 7 8 9]
```

---

That is how you can sort an array in NumPy. Thank you for reading, and have a nice day!
Angular SSR Refused to set unsafe header
Tags: angular, xhr, node, code
Published: 2023-08-29 10:30:00

I've been trying to fix a bug where I was making an `http` call to my local host, to get list of categories. The host written in `expressjs` had a `middlewear` to check for country code in `cookies`, before pinging a public URL to get country from IP address. (I was using the generous free tier of [IPInfo.io](https://ipinfo.io/)). On client side everything worked perfectly well, since calling `Http` from the browser wrapped the header with all cookies found on the same host.

The problem was on `SSR` (Angular `Universal` using `ngExpressEngine`). When JavaScript is disabled, to test, fetching another URL is via `xhr2` library. After digging for couple of days, it turned out, the library **explicitly excludes cookies from headers**, and throws error:

> Refused to set unsafe header

Here is the [code line in question](https://github.com/pwnall/node-xhr2/blob/ab483bbbcd619697303cfa9d7cea35a5231b63cf/src/001-xml_http_request.coffee#L150).

```coffee
if @_restrictedHeaders[loweredName] or /^sec\-/.test(loweredName) or
    /^proxy-/.test(loweredName)
    console.warn "Refused to set unsafe header \"#{name}\""
    return undefined

_restrictedHeaders:
    'accept-charset': true
    'accept-encoding': true
    'access-control-request-headers': true
    'access-control-request-method': true
    connection: true
    'content-length': true
    cookie: true
    cookie2: true
    date: true
    dnt: true
    expect: true
    host: true
    'keep-alive': true
    origin: true
    referer: true
    te: true
    trailer: true
    'transfer-encoding': true
    upgrade: true
    via: true
```

There is no check for `withCredentials`, and someone already [opened an issue](https://github.com/pwnall/node-xhr2/issues/27) about it years ago.

So until then, I can only fix this problem in one of two ways, both ugly.

-   Use custom headers for these local calls.
-   Let the local interceptor call a `nodeJs` function instead of an `http` call. (I haven't figured this one out yet, but it looks promising).

Until then, keep those bugs out. 🪲

#### RESOURCE
[Xhr2 issue regarding cookie support](https://github.com/pwnall/node-xhr2/issues/27)
Мережеві адаптери Axagon: Змінюємо Підхід до Підключення
Published: 2023-08-29 10:04:31

У сучасному цифровому світі, коли поняття зв'язку та обміну інформацією набувають все більшого значення, вибір правильного мережевого адаптера стає критично важливим завданням. Тут методологія AIDA, що включає в себе етапи привернення уваги, зацікавлення, прагнення до дії та виклик дії, може допомогти нам змінити підхід до цього процесу. Саме таким чином на сучасному ринку виділяються мережеві адаптери [Axagon](https://rozetka.pl/ua/karty-sieciowe-80196/c80196/producer=axagon/) -- справжні переваги технологічного світу.

![](https://telegra.ph/file/2311fdbc201fcea1b0f28.png)

Підвищена швидкість Wi-Fi та вдосконалений зовнішній вигляд -- ось те, що робить ці адаптери видом 2в1, який включає в себе і Wi-Fi, і Bluetooth. Ця сумісність робить їх ідеальними для будь-яких пристроїв -- ноутбуків, ПК, серверів. Як метеорит, що впевнено мчить у просторі, адаптери Axagon змінюють погляд на мережеві з'єднання, надаючи можливість працювати на новому рівні.

У світі, де зміни стають єдиною постійною, [мережеві адаптери Axagon](https://rozetka.pl/ua/karty-sieciowe-80196/c80196/producer=axagon/) виходять за рамки звичайного. Вони розширюють горизонти підключення та взаємодії, надаючи нам можливість обирати найкраще. Таким чином, переваги цих адаптерів незмінно долають будь-які бар'єри і завжди забезпечують найвищу швидкість і надійність, підтримуючи ідею бурхливого розвитку сучасних технологій.
Understanding Closures
Tags: webdev, javascript, beginners, tutorial
Published: 2023-08-29 10:03:00

## What is Closures?
Closures are a foundational concept in JavaScript that allows inner functions to access variables from their parent function's scope, even after the parent function has finished executing. This makes closures a powerful tool for data privacy, callbacks, and functional programming.

## Why do I need it?

A closure is created when an inner function captures references to variables from an outer function's scope. For example:

```js
function outer() {
    let outerVar = 10;

    function inner() {
        console.log(outerVar);
    }

    return inner; // We're returning the inner function itself
}

// Execution:

const closureFunction = outer(); // `inner` captures `outerVar`
closureFunction(); // Output: 10
```
In this example, inner is a closure because it references `outerVar`. Even after outer completes execution, inner maintains access to `outerVar`.

It is because, When a function is defined within another function and it captures (references) variables from the outer function, a closure is created. The inner function holds a reference to these variables, even if the outer function has completed execution and its variables should normally be garbage-collected. But that does not happen in the case of closures.

## Access Beyond Execution:
This means that even when you call `inner()` later, long after `outer` has finished running, inner can still access and use `outerVar`. This is not how typical variables work, as they are usually disposed of after their parent function completes execution.

Closures offer a way to maintain a connection to variables that would otherwise be gone. They keep the spirit of the enclosing context alive, allowing for powerful programming techniques like private variables, callbacks, and more.

---

### Data privacy: 
Closures are used to create private variables and encapsulate data. They allow you to expose only necessary functionality to the outer world while keeping internal state hidden.

### Callbacks: 
Closures are frequently used in asynchronous programming, such as event handlers and callback functions, to maintain context across time gaps.

### Functional programming: 
Closures enable functional programming techniques like `currying` and `memoization` by preserving data between function calls.

## Caution:

While closures are powerful, they also require careful consideration of memory management. Since a closure retains references to its enclosing variables, those variables won't be garbage-collected until the closure is no longer accessible. This can lead to memory leaks if closures are not used judiciously.

## In a Nutshell

> Closures are a powerful tool that can be used for data privacy, callbacks, and functional programming. However, it is important to use closures carefully to avoid memory leaks.