teleren/devto huggingface dataset:
Here are some topics you can start practicing with in JavaScript:
Published: 2023-11-05 11:42:40

**Here are some topics you can start practicing with in JavaScript:**

- 
**Variables and data types:**
These are the building blocks of JavaScript, and you'll need to know them in order to write any code.

- 
**Operators:**
Operators are used to perform operations on data, such as addition, subtraction, and multiplication.

- 
**Control flow:**
Control flow statements are used to control the flow of execution in your code. For example, you can use if-else statements to make decisions and loops to repeat blocks of code.

- 
**Functions:**
Functions are reusable blocks of code that can be called from anywhere in your code.

- 
**Objects:**
Objects are used to represent data and behavior. They're one of the most powerful features of JavaScript.

- 
**The DOM:**
The DOM is the object model for the web, and it's used to manipulate the content of HTML documents.

- 
**Events:**
Events are used to handle user interactions, such as clicks, mouse movements, and key presses.

- 
**Ajax:**
Ajax is used to make asynchronous requests to the server and retrieve data without refreshing the page.

- 
**WebSockets:**
WebSockets are a two-way communication channel between the client and the server.

- 
**Promises:**
Promises are a way to handle asynchronous operations in a more elegant way.

Once you have a basic understanding of these topics, you can start practicing with more advanced concepts, such as:

- 
**Classes:** Classes are used to create reusable objects.

- 
**Inheritance:** Inheritance is used to create objects that share the same properties and methods as other objects.

- 
**Polymorphism:** Polymorphism is used to allow objects to be treated differently depending on their type.

- 
**Modules:** Modules are used to organize and share code.

- 
**Packaging:** Packaging is used to distribute JavaScript code in a way that can be easily used by other developers.

- 
**Testing:** Testing is used to ensure that JavaScript code works as expected.

- 
**Debugging:** Debugging is used to find and fix errors in JavaScript code.

The best way to learn JavaScript is to practice. There are many online resources that can help you get started, such as tutorials, code samples, and forums. You can also find JavaScript books and online courses that can teach you more about the language.
Getting your open source to 500+ stars 🌟in 3 months.
Tags: opensource, kubernetes, programming
Published: 2023-11-05 11:33:05

As a DevOps engineer navigating the ever-evolving landscape of technology, I began my journey on Stack Overflow asking and answering questions. With each answered question, the upvotes became affirmations, fostering a sense of contribution and motivation within me.

Gradually, I transitioned from answering questions to actively contributing to open source projects I utilized in my work. Adding features, fixing bugs, and opening pull requests became my routine. The first significant reward I received for one of my pull requests was a turning point, igniting a renewed enthusiasm for further engagement.

Inspired by conversations with other maintainers and contributors, I ventured into creating my own open source project. The initial experience brought modest success, motivating me to refine my approach. I realized that success in the open source world often stems from addressing widespread issues that affect not just me but a larger community, particularly within a prominent ecosystem.

With this realization, I embarked on a new endeavor a project within the Kubernetes ecosystem, using Golang, a language beloved by Kubernetes users. This strategic choice not only aligned with the preferences of the community but also facilitated the ease of project usage.

The launch was just the beginning. I dedicated time to garner exposure and build a community around the project. Listening to users' feedback and guiding them through the project's functionalities became an integral part of the journey. The evolution from a passive user to an active contributor and finally to a project maintainer allowed me to witness the power and impact of open source collaboration.

Navigating the Kubernetes ecosystem and contributing in a language revered by its users wasn't just about the project itself. It was about fostering a community, facilitating interactions, and enabling others to participate and contribute. The journey in the open source realm has been more than just code—it's about collaboration, learning, and evolving together in a collective effort to push technology forward.

Key Points for Success:

- Consistent contribution and engagement in open source projects
- Addressing widespread issues that impact a larger community
- Strategic alignment with prominent ecosystems and languages
- Building and nurturing a community around the project. 

And, of course, lots of luck played its part in this incredible journey of open source contribution, where opportunity and chance intertwined with dedication and effort, propelling this story of success. 

-------

Check out kor a tool for finding unused Kubernetes resources [here](https://github.com/yonahd/kor)
Web APIs: The Magical Portals in JavaScript's Enchanted Realm
Tags: javascript, webdev, programming
Published: 2023-11-05 11:15:30

Greetings, aspiring sorcerers of the code domain! 🌌✨ As we journey deeper into the mystical land of JavaScript, we find ourselves at the doors of ancient portals known as Web APIs. They allow our spells to interact with realms beyond the immediate world of JavaScript. Ready your wands, for today we unlock these doorways!

## **Introduction: What are these Magical Portals?**

Web APIs (Application Programming Interfaces) serve as gateways. While JavaScript lays the foundation for our enchantments, Web APIs provide access to browser-specific spells, like interacting with the Document, fetching distant scrolls, and even conjuring animations.

## **Document Object Model (DOM): The Living Parchment**

The DOM is a living, breathing representation of your webpage. Think of it as an enchanted scroll that reshapes and transforms as you cast spells upon it.

- **Manipulating Elements**: With incantations like **`getElementById`** or **`querySelector`**, you can select and alter parts of the scroll.
- **Responsive Spells**: React to events such as clicks or key presses with spells like **`addEventListener`**.

## **XMLHttpRequest & Fetch: Seeking Ancient Tomes**

Sometimes a sorcerer needs knowledge from distant realms. These tools let you summon data from far-off servers.

- **Old Scrolls**: **`XMLHttpRequest`** was once the primary spell for this task.
- **Newer Enchantments**: The **`Fetch API`** provides a modern, promise-based way to retrieve distant tomes.

## **Timers: Time-Bending Potions**

The sands of time are not beyond a wizard's control! With **`setTimeout`** and **`setInterval`**, you can delay spells or repeat them at fixed intervals.

## **Other Mystical Doorways**

- **Geolocation API**: Discover the location of a wandering adventurer.
- **Web Storage**: Safely store potions and artifacts across sessions.
- **Canvas & WebGL**: Craft stunning visual enchantments and illusions.

## **Unveiling More Magic**

While these are but a few doors in the vast castle of Web APIs, many more await the curious mage. The **[MDN Web API Reference](https://developer.mozilla.org/en-US/docs/Web/API)** serves as a guidebook to this grand repository of knowledge.

## **Sorcerer’s Assignments: Test Your Conjuring Prowess 🌟**

1. **Scroll Alterer**: Use the DOM to change the title of a webpage.
2. **Distant Summons**: Employ the Fetch API to retrieve information from a public API.
3. **Temporal Trick**: Create a countdown timer that alters the webpage when time runs out.

## **Conclusion**

Web APIs bridge the world of JavaScript and the vast capabilities of the browser, letting you craft richer, more interactive spells. By mastering these gateways, your journey as a web mage becomes even more thrilling and boundless.

Forge ahead, intrepid sorcerer, and may your spells always find their mark! 🪄🌟
Dagasv388 - Link Đăng Ký Đá Gà Trực Tiếp Thomo
Published: 2023-11-05 10:52:15

Dagasv388 là một nhà cái cá cược nằm trong chuỗi sòng bài lớn nhất Campuchia và được xem là một trong những mạng giao tổng hợp hoàn toàn hợp pháp trên thị trường. Dưới sự giám sát của chính phủ Campuchia và theo quy định của nước chủ nhà
Địa Chỉ: 16285 Tân Kỳ Tân Quý, Tân Sơn Nhì, Tân Phú, Thành phố Hồ Chí Minh, Việt Nam
Email: dagasv388com1@gmail.com
Website: https://dagasv388.com.co/
Điện Thoại: (+63) 9270358054
#dagasv388 #sv388 #dagasv388_casino
Social Links:


https://dagasv388.com.co/da-ga-cua-sat/
https://dagasv388.com.co/da-ga-cua-dao/
https://dagasv388.com.co/huong-dan-tai-app-da-ga-sv388/
https://dagasv388.com.co/huong-dan-dang-ky-dagasv388/
https://dagasv388.com.co/huong-dan-dang-nhap-da-ga-sv388/
https://dagasv388.com.co/huong-dan-nap-tien/
https://dagasv388.com.co/huong-dan-rut-tien/
https://dagasv388.com.co/lien-he/
https://dagasv388.com.co/gioi-thieu/
https://www.facebook.com/dagasv388com/
https://twitter.com/dagasv388com
https://www.youtube.com/channel/UCgEYI1kYwFhbE7nYb_ic2Pg
https://scholar.google.com/citations?hl=vi&user=0RQN2x8AAAAJ
https://www.pinterest.com/dagasv388com/
https://500px.com/p/dagasv388com
https://social.msdn.microsoft.com/Profile/dagasv388com
https://social.technet.microsoft.com/profile/dagasv388com/
https://www.skillshare.com/en/user/dagasv388com
https://soundcloud.com/dagasv388com
https://bbs.now.qq.com/home.php?mod=space&uid=5877778
https://draft.blogger.com/profile/04786440302388516747
https://twitback.com/dagasv388com
https://favinks.com/profile/dagasv388com
https://www.blogger.com/profile/04786440302388516747
https://dagasv388com1.blogspot.com/
https://www.reddit.com/user/dagasv388com
https://gravatar.com/dagasv388com1
https://medium.com/@dagasv388com
https://www.flickr.com/people/dagasv388com/
https://www.tumblr.com/dagasv388com
https://dagasv388com1.wixsite.com/my-site
https://dagasv388com.weebly.com/
https://wellfound.com/u/dagasv388com
https://www.goodreads.com/user/show/170655950-dagasv388com
https://vimeo.com/dagasv388com
Shopify - the peculiarity that I hit my forehead
Tags: shopify, chatgpt, javascript
Published: 2023-11-05 10:46:10

Another client has a store created on Shopify. It is important to clarify that the store sells bags, casual clothes and clothes for an active lifestyle and yachting: https://rewind.com.ua.

That is, three main areas of activity.

And then the task comes: to present these main directions on the main page in the form of cubes. Where each cube represents the goods of its category.


![Product blocks on rewind.com.ua](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k3nxm9d2u5rstqv1r1xq.jpg)

The idea of building was simple: to set an array of categories, and even better - a ligament of the product-category, so that you can decide in manual mode which goods to be withdrawn in cubes. And then, sorting out the array, to configure its conclusion. Nothing complicated.

Working mainly on PHP, such a problem is solved in 3 minutes. If not for one "but" - in Shopify you can’t clearly set an array!

Not wanting to spend a lot of time learning Liquid, I turned to GPT for help.

His idea turned out to be simple and brilliant at the same time: yes, it is impossible to set the array directly, but you can set the line and divide it (as "split" in JS) into array!


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

And to perform all further actions as if we have an ordinary array. In principle, this is an array, only obtained not in a direct way, but by converting the line.

A trifle, but unpleasant! Thanks to GPT for saved time!
Using Notion as a Presentation Tool
Tags: notion, typescript, npm, cli
Published: 2023-11-05 10:28:14

Notion is a powerful tool to organize knowledge and share it others. 

For me, Notion is a presentation tool as well as the content management tool.

Here is the simple description of my npm package named `notion-to-slides`.

{% embed https://speakerdeck.com/khiroyuki1993/notion-to-slides-convert-notion-page-to-presentation-slides %}

Amazingly, this slides is also made by notion.

You can convert the Notion page to a presentation by just a single command.

```bash
$ npx @kromiii/notion-to-slides --url [your notion page url] --theme [marp theme]
```

H1 and H2 Heading in the notion page will be used as the slide title, and the rest of the content will be used as the slide body.

There are two advantages of using notion as a presentation tool.

1. Your slides become simple, which means readers can easily understand the points you want to say.
2. You can make the slides intuitively compared to directly editing the markdown file.

Currently, we have a famous chrome plugin published by Wunderpresentation, but it sometimes fail to embed images.

That is the motivation to develop this package, and it will save the people who have the same problem as me.

Enjoy.
22. A Sunday committed to coding (Day 20)
Published: 2023-11-05 10:26:50

As it rained hard outside, I stayed inside and committed to a 7-hour study today! Managed to complete 50% of my first assignment. It's a portfolio website, and I have the following pages on it:

- About
- Blog
- Contact
- Skills
- Experience

I am using SCSS and everything went absolutely fine, till I decided to use the @import feature while using [Partial files](https://www.w3schools.com/sass/sass_import.php).

Now, the entire responsiveness and page width have gone for a toss just when I was supposed to happily wind up the day :(

I need help!

I am beginning to see that constant troubleshooting from one's own mistakes is a constant thing in coding. Maybe, it's just not me.
Deleting a cluster in Big Animal
Tags: delete, cluster, cloudcomputing, database
Published: 2023-11-05 10:20:42

In our series of Big Animal, we will see how we can delete a cluster in the application. You can easily restore deleted clusters for as long as the backup is available. The backup is available for the retention period set for each cluster. After the retention period is over the application automatically deletes the backup. To stop the management costs on the cluster, you can also contact EDB's BigAnimal support team. Otherwise, the costs accumulate way too much.

## Delete your cluster:
1. Go to the clusters page in the portal.

2. To delete the cluster perform one of the following actions:
 - Select the Delete cluster icon in the row for the cluster.
 - Select the cluster you want to delete. From quick actions on the cluster details page, select the delete option.

3. Confirm that you want to delete the cluster. Once the process finishes, the cluster is listed on the Deleted tab of the Clusters page. 

4. To stop the associated management costs, contact EDB's support team.

## Restoring your cluster:
You can also restore your deleted cluster for as long as the backup is available.
1. Select the Delete tab on the clusters page in the BigAnimal portal. 

2. Select the restore icon for the cluster you want to restore.

3. On the cluster restore page review the selections in the cluster summary. Select the restored cluster to begin the restore process.

When the process is completed, the restored cluster is available on the Clusters page.


## References:
1. https://www.postgresql.org/docs/
2. https://www.enterprisedb.com/docs/biganimal/latest/using_cluster/03_modifying_your_cluster/
3. https://www.enterprisedb.com/docs/biganimal/latest/using_cluster/05a_deleting_your_cluster/
Hacktoberfest experance
Tags: hacktoberfest, hacktoberfest23
Published: 2023-11-05 10:04:59

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title, structure, and words! ✨ -->

### Intro
I am very happy to have the opportunity to participate in hacktoberfest again. This is an incredible experience in communicating with people, solving bugs or errors in the code, creating additional modules. I have been participating since 2019 and it is a great joy for me to help this event. [My github account;)](https://github.com/madmaxWMFU)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/io9jhgvhlhik5r3uzxft.png)
PDF generation with Gotenberg
Tags: pdf, gotenberg, node
Published: 2023-11-04 18:54:06

---
title: PDF generation with Gotenberg
published: true
tags: ['pdf', 'gotenberg', 'node']
canonical_url: https://sevic.dev/notes/pdf-generation-gotenberg/
---

[Gotenberg](https://gotenberg.dev) is a Docker-based stateless API for PDF generation from HTML and Markdown files.

To get started, configure Docker compose and run the `docker-compose up` command.

```yml
version: '3.8'

services:
  gotenberg:
    image: gotenberg/gotenberg:7
    ports:
      - 3000:3000
```

API is available on http://localhost:3000 address.

Run the following commands to generate PDFs

- from the given URL

  ```bash
  curl \
    --request POST 'http://localhost:3000/forms/chromium/convert/url' \
    --form 'url="https://sparksuite.github.io/simple-html-invoice-template/"' \
    --form 'pdfFormat="PDF/A-1a"' \
    -o curl-url-response.pdf
  ```

- from the given HTML file

  ```bash
  curl \
    --request POST 'http://localhost:3000/forms/chromium/convert/html' \
    --form 'files=@"./index.html"' \
    --form 'pdfFormat="PDF/A-1a"' \
    -o curl-html-response.pdf
  ```

PDF/A-1a format is used for the long-term preservation of electronic documents, ensuring that documents can be accessed and read even as technology changes.

### Demo

The demo with the mentioned examples is available [here](https://sevic.dev/demos). It also contains examples using Fetch API and Axios package.
Triplets and Sorting
Tags: perl, python, theweeklychallenge
Published: 2023-11-05 09:42:31

## Weekly Challenge 241

Each week Mohammad S. Anwar sends out [The Weekly Challenge](https://theweeklychallenge.org/), a chance for all of us to come up with solutions to two weekly tasks. My solutions are written in Python first, and then converted to Perl. It's a great way for us all to practice some coding.

[Challenge](https://theweeklychallenge.org/blog/perl-weekly-challenge-241/), [My solutions](https://github.com/manwar/perlweeklychallenge-club/tree/master/challenge-241/sgreen)

## Task 1: Arithmetic Triplets
Submitted by: Mohammad S Anwar

You are given an array (3 or more members) of integers in increasing order and a positive integer.

Write a script to find out the number of unique Arithmetic Triplets satisfying the following rules:

1. `i < j < k`
1. `nums[j] - nums[i] == diff`
1. `nums[k] - nums[j] == diff`


### My solution

This seems pretty straight forward. For any given number in the list, check if that number + diff and that number + diff × 2 are also in the list. If it is, increment the `count` variable by one.

```python
for i in ints:
    if i+diff in ints and i+diff*2 in ints:
        count += 1
```

My Perl solution follows the same logic. As Perl does not have an in-built `in` function, I first create a hash of the numbers. I could have use List::Util's any function, but that gets a bit messy for my liking. YMMV :)

```perl
my %ints = map { $_, 1 } @ints;
```

### Examples

```bash
$ ./ch-1.py 0 1 4 6 7 10 3
2

$ ./ch-1.py 4 5 6 7 8 9 2
2
```

## Task 2: Prime Order

### Task

You are given an array of unique positive integers greater than 2.

Write a script to sort them in ascending order of the count of their prime factors, tie-breaking by ascending value.

### My solution

This is very similar to the second task three weeks ago, and the second task from challenge 233. Read my [original post](https://dev.to/simongreennet/similar-frequency-3i6b) about how I do the sorting in this task.

To determine the prime factors of a number, I created a function all count_primes. It has two variables, `primes` is the number of primes while `count` is the (possibly prime) divisor we are looking at.

I iterate until the input is 1. If the number is divisible by `count`, then I add one to `prime`. If it is not, I add one to `count` and loop again.

```python
primes = 0
count = 2

while i > 1:
    if i % count == 0:
        primes += 1
        i = i / count
    else:
        count += 1

return primes
```

### Examples

```bash
$ ./ch-2.py 11 8 27 4
(11, 4, 8, 27)
```
Hemingway – Multipage blog theme
Tags: webdev, tailwindcss, astro
Published: 2023-11-05 09:23:50

Hemingway – Multipage blog theme

Built with Astro, Tailwind and MDX

Learn more:

→ https://lexingtonthemes.com/info/hemingway/

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j406i4vxjqsilkymy9mk.png)
Choosing the Right Azure Function
Tags: azure, azurefunctions, devops, tutorial
Published: 2023-11-05 09:20:37

In my previous [blog post](https://dev.to/ipazooki/what-is-azure-function-4h57), I discussed Azure Functions and demonstrated how to create and trigger them using an HTTP request. However, what are Azure Durable Functions, and how do they differ from Azure Functions? Furthermore, when should we use them? In this blog post, I will address these questions.

### Azure Function:
Azure Function is a serverless computing service that allows you to run code without managing infrastructure, servers, or operating systems.

### Azure Durable Function
Azure Durable Function, on the other hand, is an extension of Azure Function that enables you to write stateful functions in a serverless environment. Stateful functions can maintain state across multiple executions and orchestrate complex workflows using durable tasks. Durable tasks are functions that can be scheduled, awaited, and retried by the orchestrator function.

### When to Use Azure Function:

- **Event-Driven Scenarios:** When responding to events quickly, such as HTTP requests, database triggers, file uploads, or queue messages.
- **Small Units of Code:** For short-lived tasks or microservices where individual functions handle specific, independent tasks.
- **Cost-Efficient Scaling:** Functions are a good choice when you have unpredictable workloads, as they scale automatically and you only pay for the resources used during execution.

### When to Use Azure Durable Functions:
- **Long-Running Processes:** When dealing with workflows that involve chaining multiple functions together or require state management over extended periods.
- **Stateful Orchestration:** For complex processes that require coordination, time-outs, human interaction, or parallel execution of multiple functions in a coordinated workflow.
- **Monitoring and Debugging:** Durable Functions offer built-in capabilities for managing the state and tracking the progress of long-running tasks, making it easier to monitor and debug these processes.

### Conclusion:
Choose Azure Functions for stateless, short-lived tasks triggered by events, where you need rapid response and cost-effective scaling. Opt for Azure Durable Functions when dealing with complex workflows, long-running processes, or orchestrating multiple functions in a stateful and coordinated manner. 

If you have any questions or feedback, please leave a comment below.

Thank you for reading!