teleren/devto huggingface dataset:
AR Game ~ Applied AR to practice ~
Published: 2024-06-09 11:17:36

Table of contents

- Background
- Creation of applied AR
- Execution of the game
- Next Step

# Background
I will develop AR Game with Unity, AR foundation and so on. To learn AR development, I am researching about AR and the software related it. This blog shows the research and the process of developing AR game. If you have a question, I am happy to answer it.

# Creation of applied AR

This post will show the implement of AR game, which is named memorial world. I referenced the below course to learn how to create the AR game. 

https://www.udemy.com/course/build-augmented-reality-ar-apps-with-arfoundation-unity/

If you want to create the similar game, you should check it out. 

## Game Mechanics

In this game, your memories are displayed in an AR space. You can see photos that remind you of your memories in the AR space, and seeing them in places that remind you of your memories will bring back even more memories. 

## Technology

In this game, while players can see pictures when they enter the AR entrance, player can not see them when they are out of the AR entrance. Therefore, it is necessary to change how to draw objects depending on the player's position. To change it, these below functions will be used in this game. 

- Shader
- Stencil Buffer
- Stencil Test
- Culling

### Shader
This is the program that writes the way to draw. This allows objects to show on scenes. It can shows various expressions on objects such as shade. 

### Stencil Buffer
Shader and Stencil are similar and determine how objects are displayed. Stencil makes it possible to change the visibility of objects from certain areas and show pictures only at the entrance of the AR, which is what we want to do this time.

### Stencil Test
Each pixel on the screen has a **Stencil buffer** value and the object has a **Reference value**. The stencil test uses these values to determine whether the object is allowed to be drawn.

### Culling
The process that prevents Unity from performing rendering calculations for GameObjects that are completely obscured (occluded) by other GameObjects. In this game, it is used for being able to see real world from the inside of AR room. 

https://docs.unity3d.com/Manual/SL-Cull.html

# Execution of the game
At this time, I displayed free images related anime OnePiece in the AR space for the purpose of introduction. You can actually your memory images. Also, I deployed it to my iOS device and confirmed to display AR objects. Please watch the video below. 

{% youtube https://www.youtube.com/watch?v=Nrgw7_sTPD4 %}


If you have any questions about Unity and AR, I'm happy to answer them. 

# Next step 
I will research APIs related AR and location information to use them for my game.
If you could use notion to build an app/startup , what would you make?
Tags: nocode, beginners, productivity, startup
Published: 2024-06-09 11:04:47

I've been working hard on a framework that converts notion pages to usable apps. I wanted to know what use cases would be most popular.

This would be a purely **no code solution** (maximum code would be a simple DSL) and the focus is on actually getting an app out there that you've just built in notion.

If anyone is interested in trying out the framework please let me know!! Thank youu

Assume the following integrations are available

1. Sign in with Google, phone number etc
2. Payments from your end users and subscriptions
3. Normal notion pages or content can be used as UI
4. Notion databases are used to model any data with forms and views etc etc
5. Chat between any user in your app

or anything else you want.. just tell me any app idea you have. The technical side would be sorted.
App
Published: 2024-06-09 10:58:52

रिऍक्ट-डॉक ची माहिती.

बेस्ट एज्युकेशनल डॉक्युमेंटेशन आणि ब्लॉगिंग प्लॅटफॉर्म वॉज लोड ऑल इंडियन स्टुडंट्स.
अँप लिंक : https://dev-reactdoc-app.pantheonsite.io/
Software Testing QA
Published: 2024-06-09 10:53:08

**What is Software Testing?**

Software testing is the process of verifying and validating whether a software web or application is bug-free and meet user requirements. The main aim of the software testing is to identify missing requirements or mistakes.

**Why Software Testing Important?**

Because if there are any bugs or errors in the software, it can be identified early and can be solved before delivery of the software product.

**What do we need to know about Software Testing?**

Software testing contains many of features that we need to be knowledgeable of.

**Two way of Testing:**
1.	_Manual Testing_ – Testing Team will manually verify each and every test cases without using any tools.
2.	_Automation Testing_ – Testing Team will test that application using automation tool i.e. Selenium and advantage is save the execution one, we can run multiple time for same test cases 

**Software Development Life Cycle**:

The SDLC is a process that defines the tasks that software developers perform to plan, design, develop, test, and deploy & maintenance software

**Why SDLC is important?**

The software development lifecycle (SDLC) is an important process for software development because it provides an organized approach to developing software. The SDLC assists in ensuring that software is produced in a uniform and effective manner that satisfies the needs of users and stakeholders
1.	__Plan __– this is fundamental stage in SDLC and it’s done by BA and BA is keep it as per client requirements in BRS document. BRS is created to serve the purpose of guideline for the next phase of the cycle and BRS is communication between of each team.
2.	__Define _Analyst_ -  It has enough details to define a SRSD, user stories, or technical specifications for software programmers. 
3.	__Design_ _– There are two type of document design (HLD and LLD ) . The HLD contains overall Design, Designed by Designer. LLD contains information about HLD like platform, tools , database ( SQL, MySQL, Oracle, MongoDB,)
4.	_Development_ – This phase on maintain by Developer. The start code for software
5.	__Testing_ _– Tester will be performing on this phase and they will do end-end verify by follow STLC.
6.	__Deploy_ _– This is development to production phase.

**What is the relevance of software testing?**
Software testing is improve the quality of the software and providing a high-quality product as meet client.
Search & Replace Texts in DOCX
Tags: javascript, editofficefile, docx, ooxml
Published: 2024-06-09 10:53:00


![Search & Replace Texts in DOCX](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vul4d3xx7peo7k93zvxk.png)

Hey guys, I have created a package name [edit-office-file](https://www.npmjs.com/package/edit-office-files) which can search & replace multiple text strings inside a DOCX file as well other office files.

1. First install the pkg: `npm i edit-office-files`.

2. Usage style:

```js

import {SearchAndReplace} from 'edit-office-files';

async function main() {
  const searchTexts = ['Hello World', 'are You', 'coloured'];
  const replacementTexts = ['REPLACEMENT1', 'REPLACEMENT2', 'REPLACEMENT3'];
  const reader = new SearchAndReplace('assets/document.docx', searchTexts, replacementTexts, 'updated.docx');
  await reader.process();
}

main();

```


Here is the [github link](https://github.com/satyajitnayk/edit-office-files) for the project.
Differences between primary, core and task nodes in Amazon EMR cluster
Tags: aws, emr, cluster, nodes
Published: 2024-06-09 10:43:42

The key differences between primary, core, and task nodes in an Amazon EMR cluster are:

**Primary Node (also known as Master Node):**

- The primary node is responsible for coordinating the cluster and managing the execution of jobs.
- It runs the main Hadoop services, such as the JobTracker, NameNode, and ResourceManager.
- There is only one primary node in an EMR cluster.
- The primary node cannot be terminated during the lifetime of the cluster, as it is essential for the cluster's operation.

**Core Nodes:**

- Core nodes host the Hadoop Distributed File System (HDFS) and run the DataNode and TaskTracker services.
- They are responsible for storing and processing data in the cluster.
- Core nodes cannot be removed from the cluster without risking data loss, as they contain the persistent data in HDFS.
- You should reserve core nodes for the capacity that is required until your cluster completes.

**Task Nodes:**

- Task nodes are used for running tasks and do not host HDFS.
They can be added or removed from the cluster as needed, without the risk of data loss.
- Task nodes are ideal for handling temporary or burst workloads, as you can launch task instance fleets on Spot Instances to increase capacity while minimizing costs.
- The cluster will never scale below the minimum constraints set in the managed scaling policy.

Here's a table summarizing the key differences:

![EMR nodes summary](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/23i535b8s12gnmcasriy.png)

---

More details regarding,

1. Selecting and deploying an Amazon EMR cluster: click [here](https://docs.aws.amazon.com/prescriptive-guidance/latest/amazon-emr-hardware/select.html)
2. Estimating Amazon EMR cluster capacity: click [here](https://docs.aws.amazon.com/prescriptive-guidance/latest/amazon-emr-hardware/capacity.html)
JWT
Published: 2024-06-09 10:43:23

JSON Web Token compact URL-safe means of representing claims to be transferred between two parties securely. These tokens are often used in authentication and authorization protocols.

1. Structure: JWTs consist of three parts separated by dots: Header, Payload, and Signature. These parts are base64url encoded JSON strings.

 - Header: Contains information about the type of token (JWT) and the signing algorithm used.
 - Payload: Contains the claims. Claims are statements about an entity (typically, the user) and additional data. There are three types of claims: registered, public, and private claims.
 - Signature: To create the signature part, you need to take the encoded header, the encoded payload, a secret, the algorithm specified in the header, and sign that.

2. Authentication: When a user logs in, the server generates a JWT and sends it to the client. The client stores the token, usually in local storage or a cookie.

3. Authorization: When the client makes subsequent requests to the server, it includes the JWT in the request, typically in the Authorization header. The server then verifies the JWT to ensure it's valid and hasn't been tampered with. It then uses the information in the token to determine if the user is authorized to access the requested resources.

4. Statelessness: JWTs are stateless, meaning the server doesn't need to keep a record of the tokens it issues. This makes JWTs ideal for use in distributed systems and APIs.

5. Expiration: JWTs can have an expiration time (in the Payload), after which they're no longer considered valid. This adds an extra layer of security as even if a token is stolen, it will only be valid for a limited time.

6. Security: To ensure the integrity of the token, it's important to sign it using a secret key known only to the server. This prevents tampering with the token by unauthorized parties.

JWTs provide a flexible and secure way of transmitting information between parties and are widely used in modern web development for authentication and authorization purposes.
ติดตั้ง thai locale ใน CenOS/Alma/Rocky linux ใน docker
Published: 2024-06-09 10:43:10

วันนี้ลองเล่น almalinux 9.4 image แล้วมันไม่ได้มี locale thai มาให้ จะติดตั้งก็ง่ายๆด้วยคำสั่ง `localectl` เพราะว่าอยู่ใน container จึง research หาสักพักเลย จึงจะ note ไว้หน่อยละกัน

almalinux image ไม่ได้ใส่ avialable locale มาให้เรามันมีแค่ POSIX locale ดังนั้นเราต้องติดตั้งเพิ่ม เราเช็คได้ว่ามันมี avialable locale อะไรมาให้บ้างด้วย `locale -a`
ซึ่งจะมีแค่
```
[root@d121e84764c6 /]# locale -a
C
C.utf8
```

locale file ของ avialable locale Redhat จะอยู่ที่ และ `/usr/share/i18n/locales`
 file chracter map จะอยู่ที่ `/usr/share/i18n/charmaps` ถ้าเรา `ls` ดูน่าจะยังไม่มีเลย
การติดตั้งก็หา package มาลงตามนี้
`yum -y install glibc-locale-source glibc-langpack-en glibc-langpack-th` ซึ่งภาษาไทยก็จะอยู่ใน package `glibc-langpack-th`

หลังจากติดตั้งแล้ว เราลอง list avialable locale อีกที
```
[root@13c0780e7ad2 /]# locale -a
...
...
th_TH
th_TH.utf8
```

จากนั้นเราก็ใช้ได้เลย โดย set environmant var LANG
`export LANG=th_TH`
แล้วเช็ค locale ของ current terminal เราด้วย `locale` จะได้ตามนี้
```
[root@13c0780e7ad2 /]# locale
LANG=th_TH.utf8
LC_CTYPE="th_TH.utf8"
LC_NUMERIC="th_TH.utf8"
LC_TIME="th_TH.utf8"
LC_COLLATE="th_TH.utf8"
LC_MONETARY="th_TH.utf8"
LC_MESSAGES="th_TH.utf8"
LC_PAPER="th_TH.utf8"
LC_NAME="th_TH.utf8"
LC_ADDRESS="th_TH.utf8"
LC_TELEPHONE="th_TH.utf8"
LC_MEASUREMENT="th_TH.utf8"
LC_IDENTIFICATION="th_TH.utf8"
LC_ALL=
```
เป็นอันว่าเรียบร้อย ที่เหลือก็ไปเซ็ตให้มันใช้ได้กับทุกๆ user ในไฟล์ `/etc/locale.conf` หรือ per user ในไฟล์ `$HOME/.i18n` 

**note** locale package ของฝั่ง ubuntu จะเป็น **language-pack-XX**

**อ้างอิง**

https://stackoverflow.com/questions/58304278/how-to-fix-character-map-file-utf-8-not-found

https://access.redhat.com/solutions/974273
Mastering CSS Unit Size Conversion: Simplify Your Workflow
Tags: css, px, size
Published: 2024-06-09 10:43:02

When it comes to responsive web design, managing CSS unit sizes efficiently is crucial. Understanding how to convert between different units can greatly enhance your design process. Among these conversions, px to rem is one of the most commonly used, especially for creating scalable and accessible web interfaces.

**Understanding px to rem Conversion**

The px (pixel) is a fixed unit representing a dot on the screen, which is an absolute measurement. On the other hand, rem (root em) is a relative unit that stands for the font size of the root element (usually the `<html>` element). The primary advantage of using rem over px is scalability. When you use rem units, you ensure that your design scales proportionally based on the root font size, making it more responsive.

Here’s a simple formula to convert px to rem:
\[ \text{rem} = \frac{\text{px}}{16} \]

For example:
- 16px = 1rem
- 32px = 2rem
- 48px = 3rem

Using rem units helps in maintaining consistency across different devices and ensures that your website remains accessible by allowing users to adjust the base font size according to their preferences.

**A Superior Solution: CSS Unit Size Converter**

While the basic conversion can be done manually or using simple online calculators, what if you need to convert an entire CSS file? Manually converting each unit is tedious and error-prone. This is where a comprehensive tool can make a significant difference.

I highly recommend checking out the CSS Unit Size Converter available at [css-nexus.com/SUC/px-to-rem](http://css-nexus.com/SUC/px-to-rem). Unlike other tools that only convert individual values, this site allows you to input your entire CSS code and automatically converts all the px values to rem (or any other unit you prefer). This feature can save you a tremendous amount of time and effort, ensuring accuracy and efficiency in your workflow.

**Features of CSS Nexus Unit Size Converter:**
- **Batch Conversion:** Convert entire CSS files at once.
- **Customizable Base Values:** Set your base value for rem conversion according to your project needs.
- **Multiple Unit Support:** Besides px to rem, it supports various other unit conversions, making it a versatile tool for any CSS project.
- **User-Friendly Interface:** The intuitive interface makes it easy for both beginners and experienced developers to use.

By using this tool, you can streamline your CSS workflow and focus more on the creative aspects of your web design, rather than getting bogged down with repetitive tasks.

Try it out at [css-nexus.com/SUC/px-to-rem](http://css-nexus.com/SUC/px-to-rem) and take your web design efficiency to the next level.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/22qvjwi138c9e3rbua1v.jpg)
lá số tử vi
Published: 2024-06-09 10:35:38

Tử Vi, hay Tử Vi Đẩu Số, là một bộ môn huyền học được dùng với các công năng chính như: luận đoán về tính cách, hoàn cảnh, dự đoán về các " vận hạn" trong cuộc đời của một người đồng thời nghiên cứu tương tác của một người với các sự kiện, nhân sự.... Chung quy với mục đích chính là để biết vận mệnh con người.

Lấy lá số tử vi để làm gì ?
Xem lá số tử vi trọn đời có bình giải chi tiết sẽ giúp cho quý bạn mệnh biết về tương lai, vận hạn theo các năm. Khi lấy lá số tử vi theo giờ sinh và ngày tháng năm sinh thì quý bạn cần khám phá phần luận giải lá số để nắm bắt vận mệnh của chính mình. Lá số tử vi trọn đời mang yếu tố tham khảo giúp quý bản mệnh tránh việc không nên, tăng cường việc tốt từ đó có một cuộc sống suôn sẻ và nhiều may mắn.

Lá số tử vi trọn đời thể hiện điều gì ?
Trên mỗi lá số tử vi sẽ thể hiện các phương diện cuộc sống của quý bản mệnh theo từng năm tuổi cụ thể như: công danh, sự nghiệp, gia đạo, tình duyên, tiền tài, sức khỏe, anh chị em, quan hệ xã hội...
Để tra cứu và lấy lá số tử vi trọn đời trực tuyến miễn phí quý bạn cần cung cấp đầy đủ và chính xác nhất về họ tên, giờ sinh, ngày sinh, tháng sinh, năm sinh và giới tính.
Ngoài ra: cách xem lá số tử vi có thể thay đổi theo các năm. Vì vậy để luận đoán và có cái nhìn chính xác nhất về tương lai và vận mệnh của mình trong năm Kỷ Hợi 2019 cũng như trong năm Canh Tý 2020. Quý bạn nên lấy lá số tử vi 2019 và cách lập lá số tử vi để tham khảo chi tiết tử vi năm 2020 của mình, cũng như phân tích và khám phá lá số tử vi trọn đời của các năm khác.
Xem thêm tại: https://tuvi.vn/lap-la-so-tu-vi
Understand the Liskov substitution principle using a simple example.
Published: 2024-06-09 10:24:44

Imagine you're building a delivery system.
Consider an entity class Vehicle and its subclass Car.

```csharp
public class Vehicle
{
    public virtual void StartEngine()
    {
        // General engine start logic
    }

    public virtual void LoadCargo(int weight)
    {
        // General cargo loading logic
    }
}

public class Car : Vehicle
{
    public override void StartEngine()
    {
        // Car-specific engine start logic
    }

    public override void LoadCargo(int weight)
    {
        if (weight > 500)
        {
            throw new InvalidOperationException("Cars cannot carry more than 500kg");
        }
        // Car-specific cargo loading logic
    }
}
```

The code violates the Liskov Substitution Principle (LSP) because of the `LoadCargo` method in the `Car` class. Here's why:

1. **Base Class Contract:** The base class `Vehicle` defines a `LoadCargo(int weight)` method with seemingly generic cargo loading logic. This implies any `Vehicle` can handle loading cargo of any weight.

2. **Derived Class Restriction:** The derived class `Car` overrides `LoadCargo` and introduces a weight limit of 500kg. This contradicts the base class contract by throwing an exception for weights exceeding the limit.

3. **Substitutability Issue:** If you use a `Car` object anywhere that expects a `Vehicle` for cargo loading, you might encounter unexpected behavior (the exception) when the weight exceeds 500kg. This breaks the principle of seamless substitution.

**How to Fix the Violation:**

**Solution : Refine Base Class Contract (Weight Limit Property):**

```csharp
public class Vehicle
{
    public virtual int MaxWeightLimit { get { return int.MaxValue; } } // Default unlimited weight

    public virtual void StartEngine()
    {
        // General engine start logic
    }

    public virtual void LoadCargo(int weight)
    {
        if (weight > MaxWeightLimit)
        {
            throw new InvalidOperationException("Vehicle cannot carry more than its weight limit");
        }
        // General cargo loading logic
    }
}

public class Car : Vehicle
{
    public override int MaxWeightLimit { get { return 500; } }

    public override void StartEngine()
    {
        // Car-specific engine start logic
    }

    public override void LoadCargo(int weight)
    {
        // Car-specific cargo loading logic (can be empty if no specific logic needed)
    }
}
```

**Explanation:**

- We introduce a `MaxWeightLimit` property in the base class `Vehicle` with a default value of `int.MaxValue` (effectively unlimited).
- The base class `LoadCargo` method now checks against `MaxWeightLimit`.
- The `Car` class overrides `MaxWeightLimit` to set its specific limit of 500kg.
- This way, both `Vehicle` and `Car` consistently handle weight limits through the base class contract, adhering to LSP.
Ponytail Hair Extensions: A Perfect Solution for Instant Glamour
Published: 2024-06-09 10:12:27

One of the concerns often associated with traditional hair extensions is the potential for damage to natural hair caused by adhesive bonds, heat application, or constant tension. Ponytail extensions, however, provide a damage-free solution that allows you to enjoy the benefits of longer, fuller hair without compromising the health of your natural locks. Because they are designed to be clipped onto the hair rather than bonded or glued, ponytail extensions pose minimal risk of damage when applied and removed correctly.

Affordable Luxury

While professional hair extensions can be costly and require regular maintenance to upkeep, ponytail extensions offer an affordable alternative that delivers instant results without breaking the bank. Whether you choose synthetic or human hair extensions, ponytail extensions are available in a wide range of price points to suit any budget. This accessibility makes it easy for anyone to indulge in the luxury of long, voluminous hair without overspending.

Boost of Confidence

There’s something undeniably empowering about having a fabulous hairstyle that makes you feel confident and beautiful. Whether you’re attending a glamorous event, going on a hot date, or simply stepping out for a night on the town, ponytail extensions can give you that extra boost of confidence you need to conquer the day. With your hair looking its absolute best, you can walk tall and exude confidence in every step you take.

https://pahairextensions.com/en-us/collections/tape-hair-extensions