teleren/devto huggingface dataset:
Mastering AWS CloudFormation: Creating an S3 Bucket with Versioning Enabled
Tags: aws, s3, cloudformation, devops
Published: 2023-11-27 06:22:41

AWS CloudFormation, a powerful IaC service, allows you to define and provision AWS resources seamlessly. In this step-by-step guide, we will walk through the process of creating an S3 bucket with versioning enabled using AWS CloudFormation.

**Step 1: Create a CloudFormation Template**
AWS CloudFormation uses templates, written in JSON or YAML, to declare the AWS resources needed for your infrastructure. So Open your favorite text editor and create a new YAML file, for example, s3-bucket.yaml. Define the S3 bucket and enable versioning:

```
AWSTemplateFormatVersion: "2010-09-09"
Description: Simple cloud formation for bucket creation

Resources:
  MyS3Bucket:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: my-unique-bucket-name
      VersioningConfiguration:
        Status: Enabled
```
In this example, we're creating an S3 bucket named my-unique-bucket-name with versioning enabled.

**Step 2: Deploy the CloudFormation Stack**
Open the AWS Management Console and navigate to the CloudFormation service.
Click on "Create Stack" and select "Upload a template file."
Upload your s3-bucket.yaml file.
Click "Next," provide a Stack name (e.g., MyS3Bucketstk), and click "Next" through the following screens.
Review the settings and click "Create Stack".

**Step 3: Monitor the Stack Creation**
As CloudFormation creates your stack, monitor the progress in the CloudFormation console. The stack status will change from "CREATE_IN_PROGRESS" to "CREATE_COMPLETE" upon successful completion.

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

**Step 4: Verify the Created S3 Bucket**
Navigate to the S3 service in the AWS Management Console. You should see a new S3 bucket named my-unique-bucket-name with versioning enabled.

**Step 5: Clean Up**
In the CloudFormation console, select your stack (MyS3BucketStack) and click "Delete Stack." Confirm the deletion to remove the S3 bucket and associated resources.

**Conclusion**
You've successfully created an S3 bucket with versioning enabled using AWS CloudFormation. As you explore CloudFormation further, such as tags, access control, and event triggers, tailor your S3 bucket deployment to your specific requirements.
Last deal of the year on Lexington.
Tags: tailwindcss, astro, webdev, programming
Published: 2023-11-27 06:14:38

✺ Last deal of the year on Lexington. 

Black Friday deal Get 30% off the bundle
28 Multipage Astro & Tailwind CSS themes + future additions and updates

Until 30.11.2023

https://lexingtonthemes.com
going back to the start
Tags: gamedev, writing
Published: 2023-12-24 16:21:04

---
title: going back to the start
published: true
date: 2023-11-27 00:00:00 UTC
tags: [ 'gamedev', 'writing' ]
canonical_url: https://onwriting.games/daily/20231127-2327-going-back-to-the-start/
---

While one can read a book (or watch a movie/show) infinite times, its design is oriented for one to do it **only once**.

The "plot twist" is used up. The cliff-hanger is resolved.

Video games can also be designed this way, but the expectation is that one can **play them again**.

This property, in the game design jargon, is called **replayability**.

Why do we care about replayability?

There are expectations from the players: most associate $ with hours of gameplay. And playing again is a good way to increase hours of gameplay.

And also from those who produce games: it is so costly to generate content that creating branches that players never see is a waste of time and money.

I'm not saying we have to force players to replay our games.

It's all good with a play-through being self-conclusive and the player not wanting to play more.

What matters most to me is the arrow in the other direction: what happens when the player **wants** to explore our story through another path.

This is where most game writers fail.

The reason is simple: doing a good job requires thinking like a **game designer** and not just a writer.

One of the most common problems is that the player has to re-read a lot of the same text to go through alternative paths in the story.

No **options are provided to facilitate** this (skip text, shortcuts, etc).

This demotivates the player, leaving much content unseen, and a negative feeling about something that, **if better designed** , could have been a great experience.

It is the responsibility of the writer to ensure that the **narrative design favors replayability**.

This includes working with programmers and game designers so that the necessary features for this are developed.

It's not an easy job.

But nobody said it was easy, right?

Tomorrow I will write about a technique to address this that I've been thinking about for several years.

And I hope we can figure out more solutions, because it's an open problem.

Is this something you've experienced as a player?

What other problems do you identify that a writer might have to ensure the replayability of their stories?

Do you have any interesting examples of how a game resolved replayability?
Unleashing the Potential of HTMX in Web Development 🌐
Tags: webdev, htmx, javascript, html
Published: 2023-11-27 05:53:22

# Unleashing the Potential of HTMX in Web Development 🌐

Welcome to the exciting world of HTMX, the rising star in the realm of web development! It's time to explore how HTMX is revolutionizing the way we create dynamic, user-centric web applications and why it's quickly becoming a favorite tool among developers. 🌟

## Exploring HTMX: What's the Buzz About? 🐝

HTMX stands out as a compact, yet potent JavaScript library, empowering developers to use AJAX, CSS Transitions, WebSockets, and Server Sent Events within HTML. Imagine it as a wizard’s tool 🧙‍♂️, effortlessly turning static pages into vibrant, interactive experiences, without the usual complexity of JavaScript frameworks.

### Streamlined Approach, Powerful Outcomes 🔥

HTMX's magic lies in its straightforward approach. By enhancing HTML with additional attributes, HTMX keeps developers in their comfort zone of HTML, while still packing a punch in functionality. This approach leads to achieving robust interactivity with minimal code, striking a perfect balance between simplicity and capability.

### Speedy Development and Simplified Upkeep 🏗️

The speed and ease of development with HTMX are unparalleled. It allows for partial page updates, avoiding full page reloads, resulting in snappier applications. This not only delights developers but also enhances the user experience. Plus, with less intricate code, maintaining your projects becomes much simpler.

### Compatibility and Flexibility: The Perfect Team Player 🤗

HTMX's versatility in integrating with various back-end frameworks, from Django to Flask, is a major plus. This adaptability makes it an ideal addition to existing projects, allowing you to harness its strengths regardless of your current setup.

## Practical Uses of HTMX in the Real World 🌟

- **Dynamic Forms**: Create forms with instant validation and submission, eliminating the need for page refreshes.
- **Instant Search Results**: Develop search features that update as you type, providing a seamless user experience.
- **Endless Scrolling**: Implement auto-loading of content, making traditional pagination obsolete.
- **Real-Time Dashboards**: Craft dashboards that refresh dynamically, ideal for live data and analytics.

## Embracing HTMX: The Future of Web Development 🎇

HTMX is more than a tool; it represents a shift towards more streamlined, enjoyable, and accessible web development. It focuses on blending simplicity with performance, allowing for the creation of not only powerful but also manageable and user-friendly applications.

Are you prepared to dive into the world of HTMX? The future of web development is exciting, efficient, and above all, enjoyable! Let’s embark on the journey of crafting standout web applications in the digital world. The possibilities with HTMX are limitless. Let the coding adventure begin! 🚀👩‍💻👨‍💻
Apache AGE for Geospatial Operations and Analysis
Tags: apacheage, postgres, geospatialdata
Published: 2023-11-27 05:45:41

Apache AGE is a powerful tool that efficiently integrates graph database capabilities with geospatial data analysis. By combining these two, it offers an efficient solution for handling and deriving insights from geospatial information. In this documentation, we'll explore how to utilize Apache AGE for geospatial operations and analysis.

**Understanding Apache AGE**
Apache AGE is a graph database that extends the functionalities of PostgreSQL by integrating the property graph model into the database. This extension enables you to store and manipulate graph data while benefiting from PostgreSQL's robustness and scalability.

**Setting Up Apache AGE**
Before diving into geospatial operations, setting up Apache AGE is the initial step. Ensure you have PostgreSQL installed, and then add the AGE extension using the following commands:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b47oxqbfwqlh0ltsejjp.png)
This creates a new database named age_demo and adds the AGE extension to it.

**Loading Geospatial Data**
Apache AGE supports the storage and querying of geospatial data types. You can import geospatial data in various formats such as GeoJSON, WKT (Well-Known Text), or WKB (Well-Known Binary). For instance, to load GeoJSON data into a graph, use:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m9fufxjrfihvkk5fozj8.png)
Here, location is a column of type GEOMETRY representing a point with longitude and latitude coordinates.

**Geospatial Operations**
Apache AGE provides a range of geospatial functions and queries for analysis. For example, to find nearby points within a certain radius of a given location:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cbrjknuxhwxaustxkaep.png)
This query retrieves all places within a 1000-meter radius from the specified point.

**Analysis and Visualization**
Once you've retrieved geospatial data, Apache AGE allows you to perform analysis and visualization. Utilize various statistical functions or combine geospatial queries with graph traversals to uncover insights from interconnected spatial data.
In Next js i am getting, hydration error..
Tags: nextjs, html
Published: 2023-11-27 05:42:51

1. Unhandled Runtime Error
 **Error: Hydration failed because the initial UI does not match what was rendered on the server.**

2. Unhandled Runtime Error
 **Error: Hydration failed because the initial UI does not match what was rendered on the server. **
3. Unhandled Runtime Error
 **Error: There was an error while hydrating. Because the error happened outside of a Suspense
 boundary, the entire root will switch to client rendering.**

**#guide me and comment solution to resolve this error...**
Steam System Engineering Services
Tags: react, career
Published: 2023-11-27 05:36:51

Welcome to Thermodynamic Services, your trusted partner for industrial air compressor solutions, air compressor installation services, Thermax products, industrial steam boilers, steam system engineering, hot water generators, STP plants for hotels and hospitals, ETP plants for industrial use, and RO plants for hotels and hospitals in Uttar Pradesh. We are your authorized dealer for top-notch Atlast Copco and Thermax products. Our commitment is to provide reliable and efficient solutions for your industrial needs.
Industrial Air Compressor and Installation Services:
At Thermodynamic Services, we offer a comprehensive range of industrial air compressors and professional installation services throughout Uttar Pradesh. Our team ensures that your air compressor system is installed efficiently, optimizing your production processes while reducing energy consumption.
Thermax Dealer in Varanasi and Lucknow:
As the authorized Thermax dealer in Varanasi and Lucknow, we bring you cutting-edge solutions for heating, cooling, and power generation. Our Thermax products are renowned for their quality and efficiency, ensuring that your industrial processes run smoothly.
Industrial Steam Boiler Manufacturer in Uttar Pradesh:
Our state-of-the-art industrial steam boilers are designed to meet the highest standards in performance and safety. We are the top industrial steam boiler manufacturer in Uttar Pradesh, offering tailored solutions for your specific requirements.
Steam System Engineering Services:
Thermodynamic Services specializes in steam system engineering services. Our team of experts will analyze, design, and implement the most efficient and cost-effective steam systems for your industrial operations in Uttar Pradesh.
Hot Water Generators for Hospitals & Hotels:
For hospitals and hotels in Uttar Pradesh, we provide high-quality hot water generators. These systems ensure a continuous and reliable supply of hot water, meeting the demands of your customers and patients.
STP Plant for Hotels/Hospitals and ETP Plant for Industrial Use:
We offer sustainable solutions for waste management with STP (Sewage Treatment Plant) and ETP (Effluent Treatment Plant) installations. Ensure your business is environmentally responsible and compliant with regulations.
RO Plant for Hotels and Hospitals:
Our RO (Reverse Osmosis) plants are ideal for hotels and hospitals, providing clean and safe drinking water. We prioritize the health and well-being of your guests and patients.



Conclusion:
Thermodynamic Services is your one-stop solution for all industrial needs in Uttar Pradesh. We pride ourselves on offering top-quality products and services that enhance your industrial operations. Partner with us to ensure efficiency, compliance, and sustainability. Contact us today for all your industrial requirements and enjoy the benefits of our trusted solutions.
conatct us on 91 78600 24711 or[ https://thermodynamic.co.in/](url)
[每次突破0.1] Javascript中的==运算和转换
Tags: javascript
Published: 2023-11-27 05:25:07

在工作生涯中，我发现还是有很多很多Frontend Developer（前端程序猿）都不是很清楚Javascript(JS)里有一些基础的知识。这期我们就说说JS里的`==`运输和转换规则。
看起来很笨对吧，`==`运算符不就是检查其两个操作数是否相等，返回一个布尔值(boolean)结果嘛。

来我们看看下面这个题例：
```javascript
if( a == 1 && a == 2 && a == 3 ) {
    console.log("恭喜你突破0.1了。");
}
```
现在我要你把上面的if statement成立，从而打印出`恭喜你突破0.1了。`，你能办到吗？

要解这道题你就要彻底的了解在JS里的`==`运输和转换规则。
在[mdn文档](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Equality)有详细说明了规则，我知道很多程序猿都是很懒惰读文档，这里我就做点简介好让你跟容易理解。

我大致总结了一下，按以下规则步骤从`1.`到`5.`依序做比较，直到得到确切的结果为止：
1. 两边相同的类型做比较，就比较值。
2. 其中一个是`NaN`，直接返回`false`。
3. `null`和`undefined`只有与自身，或互相比较才会返回`true`。
4. 两边不同的类型但都是基础类型，转换成数字重复步骤`1.`比较。
5. 一边是原始类型，一边是对象，把对象转换成基础类型后重复步骤`1.比较`。

很简明对吧，现在我们就一步一步看。

第一步: **两边相同的类型做比较，就比较值。**
这个很好理解吧，应该不用多解释。
就是`1 == 1`是`true`，`"andy" == "cooker"`是`false`。
这里有一点要注意以下，如果两边是对象，比较值是怎样呢？在JS里，变量里存的是对象的地址。这里比较值的意思比较两个变量的地址值是不是一样。

第二步：**其中一个是`NaN`，直接返回`false`。**
这个也很好理解，就一看到`NaN`就直接返回`false`。

第三步：**`null`和`undefined`只有与自身，或互相比较才会返回`true`。**
这个我就直接举例吧：
```javascript
null == null // true
null == undefined // true
undefined == undefined // true
null == 0 // false
null == NaN // false
```

第四步：**两边不同的类型但都是基础类型，转换成数字重复步骤`1.`比较。**
如果两边类型不同又是基础类型，比如`1 == true`，`1`是`Number`，`true`是`Boolean`就把，true转为`Number`进行比较。
```javascript
(1 == true)
+true // 转为Number, 是1
1 == 1 // 就是true

(1 == 'a')
+'a' // 转为Number, 是NaN
1 == NaN // 就是false

(2 == '2')
+'2' // 转为Number, 是2
2 == 2  // 就是true
```

第五步：**一边是原始类型，一边是对象，把对象转换成基础类型后重复步骤`1.比较`。**
这个的关键在如何把对象转换成基础类型，这里有3个步骤：
1. 如果对象有`@@toPrimitive`方法，就调用做比较。如果方法返回不是基础类型，抛出异常。```javascript
const a = {
      // 如果对象有@@toPrimitive方法，就会被调用
      [Symbol.toPrimitive](){
         return 1;
      }
}
```
2. 调用`valueOf`方法做比较，如果返回值不是基础类型，继续下一步。在JS里，所有对象默认都有`valueOf`方法，那么这个方法返回的是什么？默认情况下是返回对象本身。这个`valueOf`方法是可以自行更改的：```javascript
const a = {
      valueOf() {
        return 1; // 更改成返回1
      }
}
```
3. 调用`toString`方法作比较，如果方法返回不是基础类型，抛出异常。

知道了第五步的规则逻辑后，我们再来接这个题是不是容易很多了。
我们再看会这个题：
```javascript
( a == 1 && a == 2 && a == 3 )
```
我们就只要确保`a`能再做比较时依序返回`1`,`2`和`3`就可以了，那么我们可以用任何一个`@@toPrimitive`，`valueOf` 或 `toString` 来完成。
这里我就用valueOf来做演示：
```javascript
const a = {
    count: 1,
    valueOf() {
        return this.count++;
    }
}

if( a == 1 && a == 2 && a == 3) {
    console.log("恭喜你突破0.1了。");
}
```
去运行看看吧。

其实这个题并不是那么重要，关键是你得理解JS的基础，在JS里等号是如何运算的。
Happy Coding.
DATA ENTRY OPERATOR COURSE
Tags: data, entry, course
Published: 2023-11-27 05:17:19

[Data Entry Course](https://ifda.in/data-entry-operator-course.php
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8n11oi4zft7vfb4ueoks.jpg)) is a simple routine process. Due to this, it
requires no formal education or training. While going for certification programs. The duration of this course is 6 to 12 months And this course can be done after the 10th class. Can aid you in starting a career. You can also learn the skills by yourself. Data Entry careers the following technical skills strong understanding of Microsoft Excel or similar database software. The demand for skilled data entry professionals is on the rise. Excel offers the ability to make data entry by using a form for one record. It is widely used for “business and educational” sectors through which we can create documents, data entry, and databases. The data type name is a string. Numbers can be stored as a numerical type or as a string since are a set of characters including digits. Data Entry involves Inputting Data into a Database or System.
 
5 examples of data entry:-
Large data collection.
Monthly bills of a person.
Numbers of students in a class.
Numbers of persons liking a particular food.
The number of warehouses in a factory complex.
Number of hours spent on daily activities.

Scope of the Data Entry Course:-

Data Entry Operators are a big asset for companies as they help streamline the data required for business.

How can I learn basic data entry? 

Complete secondary school……
Consider a certification program……
Improve your typing skills……
Learn more software……
Apply for a role……
Easy to learn……
Ample opportunities……
Flexible work options……

Types for Data Entry Work:-The Data Entry is classified into four categories:
Nominal data. 
Ordinal data.
Discrete data.
Continuous data.

There are Three Types of Data:- 
Short-term data. This is typically transactional data.
Long-term data. One of the best examples of this type of data is certification or accreditation data
Useless data. Alas, too many of our databases are filled with truly useless data. 

Learning Outcome of Course:-
You will have great knowledge of database software and MS Office.
You will get to know about basic knowledge of office machines like computers, scanners, printers, etc
You will be able to type with higher speed and 95% plus accuracy
You will have great knowledge of computer hardware and software.
You will be able to have excellent knowledge of internet technology
You will have great command of writing and communicating.

After doing a Data Entry course, You can do the job of data entry operator variety of sectors like healthcare, transportation, and finance. Bank and public sectors, Marketing, and accounting companies, MNSs, Institutes, schools, and universities demand a Data Entry Operator Expert.
Basic Computer
Tags: basic, computer, course
Published: 2023-11-27 05:10:14

Basic computer Course](https://ifda.in/basic-computer-course.php
) Designsed for everyone who doesn’t have enough knowledge about using a computer and wants to learn about computer fundamentals.
The duration of doing a basic computer course is 3 to 6 months.

In basic computer Courses,  we learn Microsoft PowerPoint, Microsoft Excel, and Microsoft Word.
Microsoft Office is an application software that was developed and published by Microsoft in the year of 1990.
It is widely used in “business and educational”  sectors through which we can create, view & edit documents, Spreadsheets, Presentations, and data entry and database.

Microsoft Powerpoint
Microsoft word
Microsoft Excel

Microsoft Powerpoint

Information can be displayed using an electronic presentation application. This information is visually presented as a slide show the data is displayed on a slide that may be viewed on a computer monitor and projected onto a screen using an LCD projector. The presentation tool in Microsoft Office is Microsoft PowerPoint.
Microsoft PowerPoint is a popular presentation Application, although there are alternative slides such as Corel presentation.

Intro slide
Outline slide
Content slide
Final slide
Slide show
Graphs/Diagrams
Templates & Fonts
Color
Animation

Microsoft Word

Microsoft Word is a word-processing program that allows for the creation of both simple and complex documents. With Office 365, you are able to download the application to your hard drive and will also have access to the online version.

Paragraph Formatting and Objects
Working with themes and page backgrounds.
Paragraph formatting and Object arrangement.
Setting Up Document for Print with Page Setup.
Using Referencing Tools, Spelling & Grammar
Using Mailing Feature with Advance Mail Merge Technique
Document Protection & Restrict Editing Setting
Introduction to Macros, Recording & Uses.
Macros to Automate Difficult Tasks in Word Document

Microsoft Excel

Microsoft Excel enables users to format, organize, and calculate data in a spreadsheet. By organizing data using software like Excel, data analysts, and other users can make information easier to view as data is added or changed.

Clipboard operations & Paste Special
Font Formatting
Alignments
Merging Cells
Format Cells
Number
Font
Border
Fill & Protection
Conditional Formatting
Tables
Editing tools
Sorting & Filtering
Find & Replace
Pivot Tables
Charts
Now You will have a basic understanding of computer applications and Software.
You’ll be able to design presentations and documents.
You’ll be able to manage the data effectively and efficiently.
You’ll understand how to set up and protect a computer.
You’ll have great knowledge about the Internet and its functions.
You’ll become an expert in Microsoft Office.