teleren/devto huggingface dataset:
Day 26/366
Tags: 1percentplusplus, 100daysofcode
Published: 2024-04-26 19:24:34

🚀 **Today's Learning:**

🌟 DSA

- Check for a cycle in a linked list
- Find the junction point in a linked list having a cycle

🌟 Dev

- custom Hooks in React

🔍 **Some Key Highlights:**

DSA

To check for a cycle in a linked list, you use two pointers: slow and fast. Both start at the head of the list. In each iteration, the slow pointer moves one step forward while the fast pointer moves two steps forward. If there's a cycle, eventually the fast pointer will catch up to the slow pointer. If at any point the fast pointer reaches the end of the list, there's no cycle. This algorithm is efficient and uses constant space, making it suitable for large linked lists.

To find the junction point of a cycle in a linked list, you first determine if there's a cycle using the aforementioned approach. Once you find the meeting point of the slow and fast pointers, you reset one pointer to the head of the list and keep the other at the meeting point. Then, you move both pointers forward one step at a time until they meet again; this time, at the junction point of the cycle. This method efficiently identifies the junction point of a cycle in a linked list without requiring extra space.

DEV

Custom hooks in React are reusable functions that allow you to extract component logic into separate functions. You create a custom hook by prefixing its name with "use" to follow the convention. These hooks can encapsulate any kind of logic, such as fetching data, managing state, or handling subscriptions. Custom hooks enable you to share logic between components without having to resort to higher-order components, render props, or other patterns. By creating custom hooks, you promote code reusability and maintainability in your React applications.

 #100daysofcode #1percentplusplus #coding #dsa
Storage server
Published: 2024-04-26 19:11:38

在快节奏的数字环境中，服务器的选择对于寻求最佳性能、可靠性和安全性的企业和组织至关重要。 香港和台湾成为服务器托管的重要目的地，提供一系列为满足不同需求而量身定制的解决方案，从高性能计算到强大的 DDoS 防护。 让我们深入了解一下香港服务器、台湾服务器、CN2服务器、DDoS防护、存储服务器等的主要特性和优势。

香港服务器：利用连接性和性能
香港服务器以其强大的基础设施、高速连接以及在亚太地区的战略位置而闻名。 这些服务器利用先进的网络技术来提供低延迟、高带宽的解决方案，非常适合开展区域和全球业务的企业。
**_[storage server](https://www.simcentric.com/servers/dell/sc7020f/)_**
台湾服务器：连接创新和可靠性
台湾服务器以其技术创新和可靠性而闻名，提供可扩展的资源、优化的网络路径和无缝连接。 台湾服务器注重性能和安全性，可满足寻求具有低延迟和高正常运行时间的经济高效托管解决方案的企业的需求。

CN2 服务器：优化网络效率
CN2（中国下一代互联网）服务器通过优先考虑数据流量、减少延迟和优化路由路径来提高网络效率和性能。 这些服务器在香港和台湾特别受欢迎，可为工作负载要求较高的企业提供增强的连接性和可靠的数据传输。

Anti-DDoS 防护：防范网络威胁
在当今的网络环境中，DDoS 攻击对在线平台构成重大威胁，导致服务中断并导致停机。 集成到香港和台湾服务器的反 DDoS 保护机制可通过检测和消除恶意流量来降低这些风险，确保不间断的访问和数据安全。

存储服务器：有效管理数据
存储服务器对于数据管理和备份至关重要，它为处理大量数据的企业提供可扩展的存储解决方案。 香港和台湾的存储服务器具有RAID配置、数据冗余和高速访问等功能，优化了数据存储和检索过程。

专用服务器和定制解决方案
对于具有特定性能要求和安全需求的企业，专用服务器提供对计算资源的独占访问。 香港和台湾的托管提供商提供专用服务器选项，包括根据业务需求量身定制的高安全性、高性能和可定制配置。

选择正确的服务器解决方案
在选择服务器解决方案时，企业会考虑性能要求、数据安全性、可扩展性、地理位置和预算限制等因素。 咨询香港和台湾经验丰富的托管提供商可以帮助企业做出明智的决策并实施符合其目标的服务器解决方案。

结论：通过优质服务器解决方案助力业务成功
总之，香港服务器、台湾服务器、CN2 服务器、抗 DDoS 保护、存储服务器和专用服务器选项为寻求数字基础设施性能、可靠性和安全性的企业提供了多样化的解决方案。 通过利用这些服务器解决方案的先进功能，企业可以优化其运营、增强数据管理实践并降低网络风险，最终使企业在当今的竞争格局中取得成功。
InfogrAIphify - a Coze workflow
Tags: cozechallenge, devechallenge, ai, machinelearning
Published: 2024-04-26 19:04:36

*This is a submission for the [Coze AI Bot Challenge](https://dev.to/devteam/join-us-for-the-coze-ai-bot-challenge-3000-in-prizes-4dp): Trailblazer.*

## What I Built
So, InfogrAIphify is a minor side-project I'm working on, intending to turn any article available on the internet into an infographic or a "tl:dr;" image. This is the third version, as the first is a [single Python script](https://github.com/phalkmin/InfogrAIphify), the second one is on [Cloudflare Pages](https://dev.to/phalkmin/infograiphify-create-infographics-from-articles-5hhb), and this one is on Coze, but ALSO Telegram and Discord!



## Demo

You can [check on Coze](https://www.coze.com/store/bot/7362215659595481094?panel=1&bid=6cavkmvrc7g05), but if you really want to use it, add the bot to [Telegram](https://t.me/InfogrAIphifybot) or [Discord](https://discord.com/api/oauth2/authorize?client_id=1233484765517316230&permissions=8797166831616&scope=bot).

![prompt](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nl5vhd73ygm84towr83a.png)

![workflow](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ukz8c1stzcp9wyz00e05.png)

![telegram1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m2l71xjxyljl0wz9l6qy.png)

![telegram2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rt4e6jd1r1v15j8ib2ig.png)

## Journey

Creating a full plugin seemed overcomplicated because of how much Coze allows me to do, (documentation is kinda simplified for plugins, and the discord channel had some people with the same questions I had, so I knew it would be too much work :P ) so instead I made it using a **Workflow** that crawls a page, scans for the content, and from it creates a prompt for DallE, and then returns the image.

Creating a workflow is simple: select the plugins/components you want to use, connect everything, and fill out the forms. Then test until it works as you intended 🥷🏽 

Can I make it better? Yeah, add style choices, better prompts, etc.
Understanding Git: A Beginner's Guide !! -part 2-
Published: 2024-04-26 18:45:08

Certainly! Here's the provided information formatted with Markdown:

```markdown
# CONFIGURATION DES OUTILS

Configurer les informations de l'utilisateur pour tous les dépôts locaux avec Git.

```bash
# Configurer le nom d'utilisateur pour tous les dépôts locaux
git config --global user.name <votre_nom_d'utilisateur>

# Configurer l'adresse e-mail pour tous les dépôts locaux
git config --global user.email <votre_adresse_email>
```

# CRÉER DES DÉPÔTS

Démarrer un nouveau dépôt ou obtenir un depuis une URL existante.

```bash
# Créer un nouveau dépôt Git
git init

# Cloner un dépôt depuis une URL distante
git clone git@github.com:name/chemin/vers/dépôt

# Cloner une copie de travail d'un dépôt local
git clone /chemin/vers/dépôt
```

# EFFECTUER DES CHANGEMENTS

Consulter les modifications et effectuer une opération de commit.

```bash
# Ajouter des fichiers à l'index
git add temp.txt

# Afficher l'état des fichiers modifiés, ajoutés ou non validés
git status

# Valider les modifications avec un message de commit
git commit -m "Description du commit"

# Réinitialiser l'index et le répertoire de travail à l'état du dernier commit
git reset --hard HEAD

# Afficher les différences entre le dernier commit et l'état actuel
git diff

# Afficher les conflits d'un fichier
git diff --base <nom-fichier>

# Afficher les conflits entre les branches à fusionner
git diff <branche-source> <branche-cible>
```

Feel free to use this Markdown-formatted text in your documentation or wherever you find it suitable!
Gerbang Olympus" oleh Pragmatic Play: Perjalanan Menuju Mitos dan Keberuntungan
Published: 2024-04-26 18:41:39

Berlatar belakang Gunung Olympus, rumah bagi para dewa Yunani kuno, "Gerbang Olympus" membenamkan pemain dalam dunia mitos dan legenda. Gulungannya dihiasi dengan simbol-simbol yang terinspirasi oleh mitologi Yunani, termasuk Zeus, Athena, Poseidon, dan Hades, serta berbagai permata dan artefak berharga. Perhatian terhadap detail dalam desain menciptakan suasana visual menakjubkan yang menarik pemain ke dalam inti aksi.

Salah satu fitur menonjol dari "Gates of Olympus" adalah mekanisme gameplaynya yang inovatif. Permainan ini dimainkan dalam grid 6x5, menawarkan pemain banyak peluang untuk mendapatkan kombinasi pemenang. Alih-alih garis pembayaran tradisional, kemenangan diberikan berdasarkan kelompok simbol yang cocok, menambahkan lapisan kegembiraan ekstra pada setiap putaran. Format unik ini membuat gameplay tetap segar dan menarik, dengan potensi kemenangan besar mengintai di setiap sudut.

Inti dari daya tarik game ini adalah fitur bonusnya, yang dapat memicu pembayaran besar-besaran dan membuka potensi penuh dari "Gerbang Olympus". Fitur yang paling didambakan adalah putaran Free Spins, yang diaktifkan dengan mendaratkan empat atau lebih simbol Scatter di mana saja pada gulungan. Setelah dipicu, pemain diberikan sejumlah putaran gratis, di mana fitur pengganda ikut berperan.

https://wuhuhotel.net/
CrabGrab: new OSS Rust crate for cross-platform screen/window capture
Tags: rust, opensource
Published: 2024-04-26 18:37:04

Hey everyone, I wanted to share a library and tool we're working on to get feedback/thoughts from the opensource community. If you've ever wanted to build your own open source Loom alternative or integrated screen sharing/recording into your app, we just released a cross-platform (Mac and Windows for now, Linux to come) Rust library that let's you do just that, called CrabGrab: https://github.com/AugmendTech/CrabGrab (crate here: https://crates.io/crates/crabgrab).

It's the core screen capturing engine powering our "smarter" Loom alternative at augmend.com, and something we believe deeply in sharing with anyone who wants to build their own or use it to do something fun like screen-sharing with Clippy: https://github.com/AugmendTech/Snippy.

Would love to hear what you think. Thanks!
1289. Minimum Falling Path Sum II
Tags: php, leetcode, programming, algorithms
Published: 2024-04-26 18:25:41

1289\. Minimum Falling Path Sum II

Hard

Given an `n x n` integer matrix `grid`, return _the minimum sum of a **falling path with non-zero shifts**_.

A **falling path with non-zero shifts** is a choice of exactly one element from each row of `grid` such that no two elements chosen in adjacent rows are in the same column.

**Example 1:**

![falling-grid](https://assets.leetcode.com/uploads/2021/08/10/falling-grid.jpg)


- **Input:** `grid = [[1,2,3],[4,5,6],[7,8,9]]`
- **Output:** `13`
- **Explanation:** 
````
The possible falling paths are:
[1,5,9], [1,5,7], [1,6,7], [1,6,8],
[2,4,8], [2,4,9], [2,6,7], [2,6,8],
[3,4,8], [3,4,9], [3,5,7], [3,5,9]
The falling path with the smallest sum is [1,5,7], so the answer is 13.
````
**Example 2:**

- **Input:** grid = [[7]]
- **Output:** 7


**Constraints:**

- `n == grid.length == grid[i].length`
- `1 <= n <= 200`
- `-99 <= grid[i][j] <= 99`

**Solution:**

```
class Solution {

    /**
     * @param Integer[][] $grid
     * @return Integer
     */
    function minFallingPathSum($grid) {
        $n = count($grid);
        $minFirstPathSum = 0;
        $minSecondPathSum = 0;
        $prevMinPathCol = -1;
        $kInfinity = PHP_INT_MAX; 
        foreach ($grid as $row) {
            $newMinFirstPathSum = $kInfinity;
            $newMinSecondPathSum = $kInfinity;
            $newMinPathCol = -1;
            for ($j = 0; $j < $n; ++$j) {
                $currentSum = ($prevMinPathCol != $j ? $minFirstPathSum : $minSecondPathSum) + $row[$j];
                if ($currentSum < $newMinFirstPathSum) {
                    $newMinSecondPathSum = $newMinFirstPathSum;
                    $newMinFirstPathSum = $currentSum;
                    $newMinPathCol = $j;
                } else if ($currentSum < $newMinSecondPathSum) {
                    $newMinSecondPathSum = $currentSum;
                }
            }
            $minFirstPathSum = $newMinFirstPathSum;
            $minSecondPathSum = $newMinSecondPathSum;
            $prevMinPathCol = $newMinPathCol;
        }
        return $minFirstPathSum;
    }
}
```


**Contact Links**

- **[LinkedIn](https://www.linkedin.com/in/arifulhaque/)**
- **[GitHub](https://github.com/mah-shamim)**
How to create a react project from scratch
Tags: webdev, javascript, beginners, react
Published: 2024-04-26 18:17:22

React is an open-source javascript library for building front-end applications. React lets you build user interfaces out of individual pieces called components.

You can create your own Button, Thumbnail and Hamburger menu component in React and combine them together to form a navigation menu.

To start a new project in React, you need to follow the following steps

## Step 1: Setting Up the Environment
Before starting a new project in react, you need to make sure that you have NodeJS install on your system. You can download the latest version of node at [https://nodejs.org](https://nodejs.org). Follow the instructions on the node website to do the installation.

After installing node, there's another important thing you need to install called [ NPM(node package manager)](https://www.npmjs.com/). npm will install JavaScript packages in your project and also keep track of details about the project.

## Step 2: Creating a New Project

- Open your terminal or command promt and navigate to the folder or directory that you want to create the project and run the code below

```react
npx create-react-app my-react-app

```

- Note that **my-react-app** is the name of the application and you can replace with the desired name of your project.

## Step 3: Running the Project

- Navigate to Your Project Directory: Once the project is created, navigate into the project directory:

```react
cd my-react-app

```

- Run the following command to start the application on a development server:

```react
npm start

```
This command will start the development server and open your default web browser to view your React application. You can now start editing your React components in the src directory. Any changes you make will be automatically reflected in your browser.
Download Terabox Premium APK: No Ads Version
Published: 2024-04-26 18:08:10



## Introduction
In this guide, we'll discuss how to download the Terabox Premium APK without any ads. Terabox is a popular cloud storage service that allows users to store and manage their files securely. The Premium version offers additional features and benefits, and by downloading the APK file, users can enjoy these perks without any interruptions from advertisements.

## What is Terabox Premium APK?
[Terabox Premium APK](https://teraboxpro.com/) is the modified version of the Terabox app, providing users access to premium features without the hassle of ads. With this version, users can enjoy enhanced storage options, faster upload and download speeds, and other premium benefits.

## How to Download Terabox Premium APK without Ads
Follow these simple steps to download the Terabox Premium APK without ads:

**Find a Trusted Source:** Look for a reputable website or platform that offers the Terabox Premium APK file. Make sure the source is reliable to avoid any potential risks or malware.
**Enable Unknown Sources:** Before downloading the APK file, ensure that your device allows installations from unknown sources. You can do this by going to Settings > Security > Unknown Sources and toggling the option.
**Download the APK File:** Once you've found a trusted source, click on the download link to initiate the APK file download process. Make sure to choose the latest version of the Terabox Premium APK for optimal performance and features.
**Install the APK:** After the download is complete, locate the APK file in your device's Downloads folder or the location where you saved it. Tap on the file to begin the installation process.
**Follow Installation Prompts:** You may be prompted to grant permissions or confirm the installation process. Follow the on-screen instructions to complete the installation of the Terabox Premium APK on your device.
**Enjoy Terabox Premium Features:** Once installed, open the Terabox app and log in to your account to access the premium features without any ads. You can now enjoy seamless file storage and management without interruptions.

## Conclusion
Downloading the Terabox Premium APK without ads allows users to experience the full benefits of the premium version without any interruptions from advertisements. By following the simple steps outlined in this guide, users can enjoy enhanced storage options, faster speeds, and other premium features offered by Terabox. Always ensure to download APK files from trusted sources to avoid any security risks.
DevOps. Monitoring Databases. On-Premise and Cloud Environments.
Tags: monitoring, database, postgres, devops
Published: 2024-04-26 17:58:43

Dear Readers,

I’m happy to share my talk:

“DevOps. Monitoring Databases. On-Premise and Cloud Environments.”

{% embed https://youtu.be/iRZArq-cSk4?si=agw4vO2eAGnxXHLE %}
Pest Control Canberra
Published: 2024-04-26 17:56:33


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9o692mz9v0s365ljnwnf.jpg)
**Website :** https://pestcontrolcanberraarea.com.au/

**Address :** 2 Phillip Law Street, Canberra, ACT, 2601

**Phone :** +61 2 6147 2277

Pest Control Canberra is your trusted local pest control experts in Canberra, dedicated to ensuring the safety and comfort of your home or business. Carrying 50+ years of experience, thousands of happy clients, we have been a top-player in the pest control industry across Canberra Area. Our extensive range of services has earned us a steadily growing, highly satisfied clientele who are not only single-transaction customers, but are mostly return clients who are consistently happy with the service we provide. Our team understands the unique challenges that pests can present, and we are here to provide effective solutions that are both safe and environmentally friendly. Whether you're dealing with ants, spiders, rodents, or any other unwanted guests, we have the knowledge and expertise to address the issue promptly and efficiently. Our technicians are fully trained, certified, listen to your concerns, thoroughly assess the situation, and develop a plan that meets your needs and budget. We attend to a number of pest or vermin-related problems – so whether it’s a bed bug problem or a millipede infestation, we’ll know exactly what to do. Our heart is for our customers to have a liveable, pleasant, and safe place to live or conduct business in. Let us help you reclaim your space and enjoy a pest-free environment!

Reach out to us any time for an affordable, reliable and effective pest solutions across Canberra.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0i1jfeq2f6r61a3jp822.jpg)
My Learning Experience with Postman
Tags: postman, postmanstudent, postmanapi
Published: 2024-04-26 17:56:07


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zzv3asympawralj76e1h.jpeg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o0ydg6426mrst3d06ee6.jpeg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s4h1krl8cio7wkz75404.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fzb4zx2roqhmkgjjotuu.jpg)
**Postman Futminna API Tour**

My learning experience with Postman was awesome, and I learned a lot. The event was organized by @abdulkabirsultan, Postman student leader at the Federal University of Technology Minna (FUTMinna).

It was a two-day workshop. On the first day, we focused on **Postman API fundamentals** through the Postman Student Academy to earn **Postman API Fundamentals Student Certification**. We learned about API basics and how to interact with them using Postman. Topics covered included API requests, request parameters, sending data with POST, introduction to variables and scripting using JavaScript Object Notation (JSON), PATCH and DELETE methods, Postman's Codegen Feature, and at the end, we were given a Postman Student Expert badge. Throughout the workshop, we were guided by the Postman student leader, @abdulkabirsultan.

The second day (Day 2) involved project-based learning with the Theme: **"Project-Based Learning: Build an AI Text Summarizer App"** on the Postman Academy platform. We learned how to build a project (an AI text summarizer app) using Postman, Hugging Face, and Replit. It was a full-stack app where we used HTML, CSS, and JavaScript for the frontend, and for the backend (server side), we utilized Node.js and Express. We designed and built the app, which functions to summarize input text. We integrated Hugging Face API for the summarizing functionality, used Postman for API testing and other tasks, while Replit was used for coding.

My learning experience with Postman was awesome and fantastic. I learned a lot. Thanks to Postman,  and
 @abdulkabirsultan.
My Experience with Postman
Tags: postman, postmanstudent, postmanapi
Published: 2024-04-26 17:56:00

**Postman Futminna API Tour**

My learning experience with Postman was awesome, and I learned a lot. The event was organized by @abdulkabirsultan, Postman student leader at the Federal University of Technology Minna (FUTMinna).

It was a two-day workshop. On the first day, we focused on **Postman API fundamentals** through the Postman Student Academy to earn **Postman API Fundamentals Student Certification**. We learned about API basics and how to interact with them using Postman. Topics covered included API requests, request parameters, sending data with POST, introduction to variables and scripting using JavaScript Object Notation (JSON), PATCH and DELETE methods, Postman's Codegen Feature, and at the end, we were given a Postman Student Expert badge. Throughout the workshop, we were guided by the Postman student leader, @abdulkabirsultan.

The second day (Day 2) involved project-based learning with the Theme: **"Project-Based Learning: Build an AI Text Summarizer App"** on the Postman Academy platform. We learned how to build a project (an AI text summarizer app) using Postman, Hugging Face, and Replit. It was a full-stack app where we used HTML, CSS, and JavaScript for the frontend, and for the backend (server side), we utilized Node.js and Express. We designed and built the app, which functions to summarize input text. We integrated Hugging Face API for the summarizing functionality, used Postman for API testing and other tasks, while Replit was used for coding.

My learning experience with Postman was awesome and fantastic. I learned a lot. Thanks to Postman,  and
 @abdulkabirsultan.
PostgreSQL: Deleting all records from a table, except for the first and last ones.
Tags: postgres, database, sql, data
Published: 2024-04-26 17:54:40

Deleting all records from a table containing a high number of rows, except for the first and last ones, is a non-trivial task due to the volume of data and the potential impact on performance.

In PostgreSQL, you can use subqueries and window functions to identify which rows are the first and last based on certain criteria (such as a unique identifier or date).

Step 1: Identifying the First and Last Rows

First, we need to define which rows are considered the first and last. For instance, if we have an id column that uniquely identifies each record and represents a serial number, we can assume that the smallest and largest id correspond to the first and last rows, respectively.

Step 2: The Deletion Query

The query to delete all records except for the first and last would look like this:

```
DELETE FROM your_table
WHERE id NOT IN (
 (SELECT MIN(id) FROM your_table),
 (SELECT MAX(id) FROM your_table)
);
```

This query first calculates MIN(id) and MAX(id), which are the identifiers for the first and last rows, respectively. Then, the DELETE operation is applied to all rows whose identifiers do not match these two values.

Important Considerations

Performance:

Deleting a large number of rows can significantly affect database performance. This can cause long lock times and slow down the system. It is recommended to perform such operations during low-activity periods or in stages.

Transactions:

Such bulk delete operations should be performed within a transaction to enable rollback in case of any issues.

Backup:

Always create backups of data before performing bulk deletions, especially when dealing with billions of rows.

Phased Deletion:

If the table is very large, consider deleting data in phases to minimize the load on the system.

```
WITH rows_to_delete AS (
 SELECT id FROM your_table
 WHERE id NOT IN (
 (SELECT MIN(id) FROM your_table),
 (SELECT MAX(id) FROM your_table)
 )
 LIMIT 100000 - delete a limited number of rows at a time
)
DELETE FROM your_table
WHERE id IN (SELECT id FROM rows_to_delete);
```

Using this method, you can gradually reduce the load by performing deletions in small batches.

`ask_dima@yahoo.com`