teleren/devto huggingface dataset:
Virtual Reality: Stepping Into the Future, One Immersive Experience at a Time
Published: 2024-06-22 10:16:53

VR is no longer just a sci-fi fantasy; it's here, it's real, and it's changing the way we experience the world. From gaming and entertainment to education and healthcare, virtual reality (VR) is rapidly transforming various industries. Let's dive into the exciting world of VR and explore its potential.

What is VR?

Virtual reality is a technology that creates immersive, interactive experiences by simulating the real world. Using headsets and other specialized devices, VR transports users into digital environments that engage their senses. This technology has evolved significantly, offering a wide range of applications beyond just gaming.

VR in Action: A Glimpse into the Future

Gaming: VR gaming has revolutionized the industry, offering unparalleled immersion and interactivity. Imagine stepping into the shoes of your favorite game character and feeling the adrenaline rush of combat!
Education: VR can transform learning by providing immersive and engaging educational experiences. Students can explore historical events firsthand, dissect virtual organs, and travel to distant planets without leaving the classroom.
Healthcare: VR is proving to be a powerful tool in healthcare, offering new possibilities for patient treatment, rehabilitation, and training for medical professionals.
Architecture and Design: Architects and designers can now use VR to create virtual walk-throughs of buildings, allowing clients to experience the space before it's even built.
Tourism and Travel: VR opens up the world to everyone, allowing you to explore exotic destinations, visit historical landmarks, and experience new cultures without ever leaving home.
The Future of VR: Infinite Possibilities

The future of VR is bright, with continuous advancements in technology pushing the boundaries of what's possible. We can expect:

Improved Hardware: Headsets will become lighter, more comfortable, and more visually stunning with higher resolution and wider field of view.
Enhanced Immersiveness: VR experiences will become even more realistic with improved haptic feedback, providing a greater sense of touch and interaction.
New Applications: VR will continue to penetrate new industries, offering innovative solutions in areas such as retail, marketing, and even social interaction.
Join the VR Revolution

Whether you're a gamer, a student, a healthcare professional, or simply curious about the future, VR is a technology that's worth exploring. With its incredible potential to transform the way we learn, work, play, and connect, VR is poised to become an integral part of our lives. So, do your headset and step into a world of endless possibilities!
APIs: Simplifying Complex Code for Everyone
Tags: devchallenge, cschallenge, computerscience, beginners
Published: 2024-06-22 10:16:06

*This is a submission for [DEV Computer Science Challenge v24.06.12: One Byte Explainer](https://dev.to/challenges/cs).*

## Explainer

An API is like a school book written by professionals to explain gravity to a small kid. All complex mathematics are compiled so that a small kid could understand and use it. Similarly, developers write complex code and provide it to other users via an interface or book called an API.

## Additional Context

This explains APIs using an analogy accessible to beginners: comparing them to school books that simplify complex topics, like gravity, for young children. It demonstrates how APIs make complex code usable for everyone through a straight forward interface.

<!-- Please share any additional context you think the judges should take into consideration as it relates to your One Byte Explainer. -->

<!-- Team Submissions: Please pick one member to publish the submission and credit teammates by listing their DEV usernames directly in the body of the post. -->

<!-- Don't forget to add a cover image to your post (if you want). -->

<!-- Thanks for participating! -->
Latest Newsletter: Politics, Bitcoin and UFOs (Issue #169)
Tags: javascript, tech, webdev, discuss
Published: 2024-06-22 10:14:43

---
title: Latest Newsletter: Politics, Bitcoin and UFOs (Issue #169)
published: true
description: UK & France election politics, Bitcoins future with inscriptions and runes, St George & the history of dragons, Trump on All-in pod, science & UFOs
tags: javascript, tech, webdev, discuss
---
Latest Newsletter: Politics, Bitcoin and UFOs (Issue #169)

UK & France election politics, Bitcoins future with inscriptions and runes, St George & the history of dragons, Trump on All-in pod, science & UFOs

https://markjgsmith.substack.com/p/saturday-22nd-june-2024-politics

Would love to hear any comments and feedback you have.

[@markjgsmith](https://twitter.com/markjgsmith)
Expert Detective Services in Delhi | City Intelligence
Tags: legal
Published: 2024-06-22 10:11:43

City Intelligence is a renowned [detective agency in Delhi ](https://www.cityintelligence.net/)offering comprehensive detective services in Delhi, Gurgaon, Noida, and Faridabad. As an established private detective agency in Delhi, we provide solutions to complex problems both across India and internationally. With over 22 years of experience, our team of skilled investigators, many with law enforcement backgrounds, deliver effective results. We understand that not all issues have straightforward solutions, but we present the best options tailored to your needs. Our expertise ensures realistic assessments, timely completion & cost-effective services, making us a trusted private detective in Delhi. For more info connect us on - UG 38A, BHIKAJI CAMA PLACE, DELHI -  110066, RAJEEV@CITYINTELLIGENCE.NET, 9811510888
Xưởng in tem nhãn giá rẻ tphcm
Published: 2024-06-22 10:01:45

https://indecalnhanh.net/ chuyên in tem nhãn nhanh các loại decal giấy✔️Tem bảo hành✔️Tem bể✔️Decal trong✔️✔️✔️
0974864274
xuongintemdecal.tphcm@gmail.com
39/3 Hoang Du Khuong P12 Q10, HCM 700000
#indecal #intemnhan #innhangiay #indecalgiay
https://indecalnhanhnet.zohosites.com
https://hashnode.com/@indecalnhanhnet
https://hackmd.io/@indecalnhanhnet
Letz Understand NPM Versioning: A Beginner's Guide
Tags: webdev, javascript, version, node
Published: 2024-06-22 10:00:00



## Introduction

In This Blog, We will understand more about the versioning of npm packages or any application.


![yes image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yb8xkgakkfk8h0i4ewfs.png)

[ Hello Buddies ]

Let's get started...

Now, Let's take an example of one npm package called "express".


![versioning of npm](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9xdv046lhjmkbek3xsuh.png)

We have an npm called "express" and its version is "^4.19.2".
Now, let's break down that version with the use of dot(.) and understand each part individually.

```
"^4.19.2"
```

1. First Part = **4**
2. Second Part = **19**
3. Third Part = **2**

> The first part we can call a major part of the version.

1 - First Part > [ **MAJOR** ] = [ 4 ]

> If in the future, "4" will become "5" it means that a **major update** will be there which might break the backward compatibility.


2 - Second Part > [ **MINOR** ] = [ 19 ]
> It means that, if the current version is "19" and it will be 20 or more then it will have some **minor fixes** and it's recommended to update to the new version.


3 - Third Part > [ **PATCH** ] = [ 2 ]
> It means that, if the current version is "2" and it will be 3 or more then it means that some **small bug** fixed will be there which will not affect any functionality and it's optional also so if we need to update then update it or it'll not affect anything.

Now, Let's understand the what is the meaning of **"^"** symbol in the version.

> The caret (^) symbol means that it will accept only minor and patch updates. If there is a change in the MAJOR version, it will not accept it.

![thanks minions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rilhxpukrkoyskrnoyd5.png)

Thanks!!
Chill Pill Reviews
Published: 2024-06-22 09:47:04

I've recently reviewed the Chill Pill, a compact, lightweight device designed for stress management through electrotherapy. It's affordable, with a sleek, modern look, and straightforward to operate. Its non-addictive nature and safety-first approach reassure users about its gentleness. The device is portable and convenient for use anywhere, which is a significant advantage. Customer feedback is mixed, though; while many report effective stress relief, others question its overall efficacy due to the lack of clinical trials. Given these varied experiences, it's clear more rigorous testing might be necessary to substantiate its claims of effectiveness. There's more to uncover about its unique capacities and potential limitations.

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

➡️ 🌈 𝐒𝐚𝐥𝐞 𝐈𝐬 𝐋𝐢𝐯𝐞 😍 𝐒𝐡𝐨𝐩 𝐍𝐨𝐰❗𝐎𝐟𝐟𝐢𝐜𝐢𝐚𝐥 𝐖𝐞𝐛𝐬𝐢𝐭𝐞 👉 [Click Here](https://deals.getchillpill.io/MNDJL8Q/24X9WZ1/)
Custom Sublimated Polos: Elevate Your Brand with Unique Style
Published: 2024-06-22 09:43:59

Custom sublimated polos represent more than just apparel; they are a powerful tool for enhancing brand visibility, fostering team spirit, and making a memorable impression. With their vibrant prints, durability, and sustainability benefits, these polos cater to diverse industries and purposes, from corporate branding to team uniforms and beyond. By investing in high-quality sublimated polos, businesses and organizations can elevate their image and stand out in today's competitive market.

Whether you're aiming to unify your team, promote your brand, or simply upgrade your wardrobe with personalized style, custom sublimated polos offer a modern solution that blends creativity with functionality. Embrace the art of sublimation and discover how these versatile garments can transform your organization's look and feel.

http://marcopolos.com
Third Party Manufacturing Company
Published: 2024-06-22 09:42:04

Ultrabiolabs, a leading **[third-party manufacturing company](https://www.ultrabiolabs.com/third-party-pharma-manufacturing
)**, specializes in high-quality pharmaceutical production. With state-of-the-art facilities and stringent quality controls, Ultrabiolabs ensures reliable and efficient manufacturing solutions for your business needs, from formulation to packaging. Partner with Ultrabiolabs for unparalleled expertise and innovation in third-party pharmaceutical manufacturing.
Completed MySQL and Database Design Course
Published: 2024-06-22 09:22:29

🚀 Exciting News! 🚀

I'm thrilled to share that I have successfully completed the MySQL and Database Design Course from Scaler Academy! 🎓📊

This comprehensive program has equipped me with advanced skills in database management, SQL queries, and the intricacies of designing robust, scalable databases. From understanding complex data models to optimizing queries for performance, this journey has been incredibly enriching and insightful.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q8ec2t3djoe0dhe5wnf1.png)
How to authorize user to view only their own created notes?
Tags: webdev, beginners, programming, database
Published: 2024-06-22 09:22:11

As in my last post, I learned how to access the database and display all notes from all users, as well as how to show notes created by a single user. 

## Diving in code 

Today, I learned how to authorize users to view and edit only their own notes.

## On VS Code Side
In fresh VS Code (version 1.90 at the time of work), we have following dependencies:

- authenticate the user 

- create separate files to show responses to user when enters id to view note

## User Authentication 
User authentication allows users to view only their own created notes, and if a user enters a non-existent note ID, the process is terminated using the abort function and if a user tries to access another user's note, show a screen with the heading "Unauthorized".
All of these changes are made in `note.php` file.

```php
<?php

$config = require('config.php');
$db = new Database($config['database']);

$heading = 'Note';
$currentUserId = 1;

$note = $db->query('select * from notes where id = :id', [
    'id' => $_GET['id']
])->fetch();

if (! $note) {
    abort();
}

if ($note['user_id'] !== $currentUserId) {
    abort(Response::FORBIDDEN);
}

require "views/note.view.php";
```
As the user enters correct id then related note is shown on page. 

## Response file
If a user enters a wrong user ID that belongs to another user, the response is checked and the relevant error file is executed. 
```php
<?php

class Response {
    const NOT_FOUND = 404;
    const FORBIDDEN = 403;
}
```

## 403 Error File

If the ID is present in the table but belongs to another user, a 403 error page is shown to the user, displaying a heading that reads: `You are not authorised to view this page` and a link 🖇️ that is underlined: `Go back to home`.


```php
<?php require('partials/nav.php') ?>

<main>
    <div class="mx-auto max-w-7xl py-6 sm:px-6 lg:px-8">
        <h1 class="text-2xl font-bold">You are not authorized to view this page.</h1>

        <p class="mt-4">
            <a href="/" class="text-blue-500 underline">Go back home.</a>
        </p>
    </div>
</main>

```

## 404 Error File 
When a user enters a id that is not present in database table neither related to any note then an error page is shown to that user which includes a heading that reads: `page not found.` and a blue text 🖇️: `Go back to home`.

```php
<?php require('partials/nav.php') ?>

<main>
    <div class="mx-auto max-w-7xl py-6 sm:px-6 lg:px-8">
        <h1 class="text-2xl font-bold">Sorry. Page Not Found.</h1>

        <p class="mt-4">
            <a href="/" class="text-blue-500 underline">Go back home.</a>
        </p>
    </div>
</main>


```
I hope that you have clearly understand it.
Scoop helps installed application from the command line
Tags: scoop, windows, terminal, commandline
Published: 2024-06-22 09:07:30

Bismillahirahmanirahim, nota ini merupakan nota rujukan aku sahaja. sesapa pun boleh guna. 

Guna window powershell , execute command di bawah untuk install scoop. 
```
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
```

Dalam windows 11, kena buat work around sikit dalam proses install scoop , boleh semak sini 

1. https://stackoverflow.com/questions/74870579/error-installing-scoop-command-line-installer

2. https://community.wappler.io/t/scoop-installer-failed/40795/2

Antara command yang biasa digunakan dalam scoop 

```
1. Scoop install 7zip  // install perisian
```

```
2. scoop update 7zip // update perisian
```

```
3. scoop cleanup 7zip // remove perisian versi lama setelah update versi baru
```

```
4. scoop uninstall 7zip // remove perisian 
```

```
5. scoop status 
```

ada perisian yang tiada dalam senarai asas scoop, perlu masukkan menggunakan arahan 

```
scoop bucket add extras

```

boleh tengok senarai bucket di sini untuk perisian-perisian lain .. 

1. https://scoop.netlify.app/buckets/
2. https://rasa.github.io/scoop-directory/by-bucket
Adamjee notes for class 9 physics
Tags: pak, study
Published: 2024-06-22 09:19:57

PakStudy.org is a helpful website for students, focusing on Adamjee notes for classes like 9, 10, and 12. We offer easy-to-understand study materials for subjects such as Mathematics, Chemistry, and Pak Study itself. Our aim is to support students with reliable resources that make learning easier and more effective.
I was looking for adamjee notes for class 9 maths and I found latest notes on [https://pakstudy.org/](https://pakstudy.org/) you must visit 
I just found adamjee notes for class 9 maths notes. Easy writen and well explained
Just found the latest Class 9 Maths adamjee notes on PakStudy.org they're really helpful!
การ reset password ของผู้ใช้งาน postgres ในกรณีที่ลืม pasword
Published: 2024-06-22 09:17:12

ในตอนติดตั้ระบบฐานข้อมูล PostqreSQL ขึ้นมาจะมีการสร้างผู้ใช้งานชื่อ postgres ข้ึนมาโดยอัติโนมัติเพื่อบริหารจัดการฐานข้อมูลเบื้องต้น
ในบางสถานการณ์ที่เราลือรหัสผ่านของผู้ใช้งาน postgres ทำให้เราไม่สามารถเข้าไปบริหารจัดการบางอย่างได้ บทความนี้จะแสดงขบวนการ reset password ของผู้ใช้งาน postgres ในกรณีฉุกเฉิน
โดยในการ reset password จะดำเนินการผ่านไฟล์ pg_hba.conf ซึ่งจะิอยู่ที่ตำแหน่ง /var/lib/postgresql/data บน linux หรือ C:\Program Files\PostgreSQL\16\data บน Windows โดยไฟล์ดังกล่าวมีหน้าที่ในการควบคุมการ authentication จาก client ที่เชื่อมต่อเข้ามาโดย hba ย่อมาจาก host base authentication

1.ทำการสำรองไฟล์ pg_hba.conf โดยการเปลี่ยนตำแหน่ง หรือเปลี่ยนชื่อไฟล์ผ่านคำสั่ง
```bash
# cp pg_hba.conf pg_hba.conf.bak
``` 
2.เปิดโปรแกรม text editor ในการแก้ไขไฟล์ pg_hba.conf จากนั้นไปบริเวณท้ายไฟล์ในบรรทัดที่เป็น host all all all scram-sha-256 ให้เปลี่ยนคำว่า scram-sha-256 เป็น trust จากนั้นทำการบันทึกไฟล์
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3kofqr8eroe7wc92u1yf.png)

3.ทำการ restart service PostgreSQL ผ่านคำสั่ง
```bash
# pg_ctl restart
```
4.ทำการเข้า PostgreSQL อีกครั้งผ่านคำสั่ง
```bash
# psql -U postgres
```
5.จะเข้ามายัง shell ของ PostgreSQL โดยไม่ต้องป้อนรหัสผ่านจากนั้นให้ทำการเปลี่ยนรหัสผ่านผ่านคำสั่ง
```sql
postgres=# ALTER USER postgres WITH PASSWORD 'new_password';
```
เมื่อ new_password เป็นรหัสผ่านใหม่
6.นำค่า pg_hba.conf ที่สำรองไว้แทน pg_hba.conf ที่แก้ค่าไปจากนั้นทำการrestart PostgreSQL service  แล้วทดสอบเข้า psql โดยใช้ รหัสผ่านที่ตั้งใหม่
Student Challenge Business Owner
Published: 2024-06-22 09:16:40

🌟 Ready to level up your cloud skills? Join me in taking on the Microsoft Cloud Skills Challenge! 🚀 Whether you're a beginner or an expert, there's something for everyone. Let's dive into the latest tech and boost our knowledge together. Sign up now and let's ace this challenge! 💪 

#CloudSkillsChallenge #MicrosoftLearn

Link - https://learn.microsoft.com/training/challenges?id=8e09e508-3630-4878-a560-cc21847ea473&WT.mc_id=cloudskillschallenge_8e09e508-3630-4878-a560-cc21847ea473&wt.mc_id=studentamb_388267
How to Find the Maximum Consecutive Ones in an Array
Tags: algorithms, computerscience, cpp, tutorial
Published: 2024-06-22 09:07:16

Finding the maximum number of consecutive 1's in a binary array is a common problem that can be efficiently solved with a linear time algorithm. In this article, we will discuss an optimal approach to solve this problem.

### Solution: Optimal Approach

This approach scans through the array once, keeping track of the current streak of consecutive 1's and updating the maximum streak encountered.

**Implementation**:

```cpp
// Solution: Optimal Approach
// Time Complexity: O(n)
// Space Complexity: O(1)
int findMaxConsecutiveOnes(vector<int> &arr, int n)
{
    int maxOnes = 0;
    int count = 0;

    for (int i = 0; i < n; i++)
    {
        if (arr[i] == 1)
        {
            count++;

            if (count > maxOnes)
            {
                maxOnes = count;
            }
        }
        else
        {
            count = 0;
        }
    }

    return maxOnes;
}
```

**Logic**:

**1. Initialize Counters**: Use the `maxOnes` variable to store the maximum number of consecutive 1's found and `count` to store the current number of consecutive 1's.
        
**2. Traverse the Array**: Iterate through each element in the array. If the element is `1`, increment `count` and update `maxOnes` if `count` exceeds `maxOnes`. If the element is not `1`, reset `count` to `0`.
        
**3. Return Result**: After the loop ends, return `maxOnes` as the result.
        

**Time Complexity**: O(n)

* **Explanation**: The array is traversed once, resulting in a linear time complexity.
    

**Space Complexity**: O(1)

* **Explanation**: The algorithm uses a constant amount of extra space for the counters.
    

**Example**:

* **Input**: `arr = [1, 1, 0, 1, 1, 1]`
    
* **Output**: `3`
    
* **Explanation**: The maximum number of consecutive 1's is `3`.
    

---

### Edge Cases

* **Empty Array**: If the input array is empty, the function should return `0` as there are no elements.
    
* **Array with No 1's**: If the array contains only 0's, the function should return `0` as there are no 1's.
    
* **Array with No 0's**: If the array contains only 1's, the function should return the length of the array as all elements are consecutive 1's.
    
* **Single Element Array**: If the array contains only one element, which could be either `0` or `1`. Then the function should return `0` if the element is `0` and `1` if the element is `1`.
    

### Additional Notes

* **Efficiency**: This approach is optimal with a time complexity of O(n) and space complexity of O(1), making it suitable for large arrays.
    
* **Practicality**: The algorithm is straightforward and easy to implement, making it a practical choice for solving this problem in real-world scenarios.
    

### Conclusion

Finding the maximum number of consecutive 1's in a binary array can be efficiently solved using a linear scan approach. This method ensures optimal performance with minimal space usage, making it a robust solution for various applications.

---
Securing Your Application with HTTP Basic Authentication in Nginx
Tags: nginx, security, cloud, http
Published: 2024-06-22 09:01:59

## Introduction
In this guide, we’ll walk you through setting up HTTP Basic Authentication for your application using Nginx. This will help you add an extra layer of security by requiring a username and password to access your application.

## Setup Instructions
**Step 1: Install Apache Utilities**
First, we need to install apache2-utils, which provides the htpasswd utility for creating password files. I’m using an Ubuntu machine, so I have installed apache2-utils using the following commands.

```
sudo apt update
sudo apt install apache2-utils
```
**Step 2: Create the Password File**
Next, we’ll create a password file that Nginx will use to authenticate users. We’ll store this file in /etc/apache2/.htpasswd.

```
sudo htpasswd -c /etc/apache2/.htpasswd yourusername
```
Replace yourusername with the username you want to use. You'll be prompted to enter and confirm a password.

**Step 3: Configure Nginx**
Now, we need to modify the Nginx configuration to use this password file. Open your Nginx configuration file at /etc/nginx/sites-available/yourconfigfile

```
server {
    listen 80;
    server_name yourdomain.com;

    location / {
        proxy_pass http://localhost:YOUR_APPLICATION_PORT;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        auth_basic "Restricted Access";
        auth_basic_user_file /etc/apache2/.htpasswd;
    }
}
```
Replace yourdomain.com with your actual domain name and YOUR_APPLICATION_PORT with the port your application is running on. This configuration tells Nginx to forward requests to your application and to use basic authentication with the credentials stored in /etc/apache2/.htpasswd.

**Step 4: Enable the Configuration**
Create a symbolic link from your configuration file in sites-available to sites-enabled to enable it in Nginx.

```
sudo ln -s /etc/nginx/sites-available/yourconfigfile /etc/nginx/sites-enabled/
```
Replace yourconfigfile with the name of your Nginx configuration file.

**Step 5: Test the Nginx Configuration**
Before restarting Nginx, it’s a good idea to test the configuration to ensure there are no syntax errors.

```
sudo nginx -t
```

**Step 6: Restart Nginx**
Finally, restart Nginx to apply the new configuration.

```
sudo systemctl restart nginx
```
**Conclusion**
Your application is now protected with HTTP Basic Authentication. When users attempt to access your site, they will be prompted to enter the username and password you configured. This added layer of security helps protect your application from unauthorized access.
High-speed, adaptive streaming video player for web
Tags: javascript, ui, react, webdev
Published: 2024-06-22 08:56:30

Hello guys, I'm working on a future-oriented video player. If anyone wants to give advice or support on this project, they can contact me.


Repository: https://github.com/ahmetilhn/savior-video-player
Mail: ahmetilhan.dev@gmail.com