teleren/devto huggingface dataset:
No more State Management with Signals
Tags: javascript, signal, state
Published: 2023-12-31 16:12:40

State management and I have never been on good terms. The sheer amount of boilerplate code and the usage of strings during development have always been pain points for me. At its worst, the entire algorithm can be scattered across the entire source code, making it challenging to decipher the application's behavior and when the firing stops. Consequently, I only resort to using state management when absolutely necessary and make a conscious effort to avoid it wherever possible.

Recently, a new star has emerged on the horizon that seems poised to replace traditional state management. It appears to be more straightforward to comprehend and requires less code. What are your thoughts on this? Do you believe the era of traditional state management is coming to an end, and if not, what factors are contributing to its endurance?
Stir some chaos into your schedules: Chaotic Schedule package
Tags: laravel, schedule, prng, crypthography
Published: 2023-12-31 16:06:07

Hello everyone, I would like to share a fresh Laravel Package I've developed with you. This package uses pRNG and cryptography methods to randomize scheduled command run intervals. 

# Chaotic Schedule

https://github.com/skywarth/chaotic-schedule

Laravel package for randomizing command schedule intervals via pRNGs.

Packagist: https://packagist.org/packages/skywarth/chaotic-schedule

## Installation

0. Consider the requirements
   - PHP >=`7.4` is required


1. Install the package via composer:
```bash
composer require skywarth/chaotic-schedule
```

2. `(optional)` Publish the config in order to customize it
```bash
 php artisan vendor:publish --provider "Skywarth\ChaoticSchedule\Providers\ChaoticScheduleServiceProvider" --tag="config"
```

3. Done. You may now use random time and date macros on schedules

##  Problem Definition

Ever wanted to run your scheduled commands on random times of the day, or on certain days of the week? Or you may need to send some notifications not on fixed date times, but rather on random intervals hence it feels more *human*. Then this is the package you're looking for.

This Laravel packages enables you to run commands on random intervals and periods while respecting the boundaries set exclusively by you.


### Use Cases

- I have a command to send notifications to my clients. But I would like it to be sent at a random time between `14:00` and `17:00`
- I would like to send some gifts to users if they are active between my special event period which is every week `Friday` and `Saturday` between `00:00` and `04:20`
- My boss asked me to generate and send statistical reports regarding database activities every month, but only on `Monday`, `Wednesday` and `Friday`. And this report has to be delivered in the morning between `08:00` and `09:30` and I want it to look like I've personally generated and sent it personally. So random time and date is crucial to stage this.
- I would like to send reminders to customers and I want it to look and feel *human*. So random run times and dates every week would help me a lot. Otherwise, if I send every week on `Tuesday` `11:00` they would know this is automated and ignore these. 
- I'm trying to detect certain anomalies in my data, and therefore it would help me a lot to run a command completely randomly but with a minimum of at least 100 times a year.
Why Your CSS Code Is a Slow, Broken, and Hard-to-Manage Mess
Tags: webdev, css, web, programming
Published: 2023-12-31 16:00:30

## CSS: A Source of Trouble
CSS plays a vital role in creating web apps. Despite its simplicity, working and maintaining large CSS codebases is becoming a headache for most developers.

In this article, I explain the CSS mistakes that lead to slow loading, and unresponsive and unmaintainable code bases of web apps. We will discuss how to avoid those mistakes and the tools which help to overcome these mistakes.


## Why CSS Code is Slow?
Unoptimized CSS can lead to slower web pages. Consider this graph. 
![conversation-rate](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kt7g1ndvvvdi4hbcwyg2.png)

In this case, the conversation rate is inversely proportional to the page speed. The more unoptimized CSS there is, the slower the page loads, and the lower the page traffic and conversation rate.


Continue reading the full article here: https://journal.hexmos.com/css-mistakes/
Amazon Aurora PostgreSQL now supports RDS Data API
Tags: aws, database, api, cloud
Published: 2023-12-31 15:21:35

By using RDS Data API (Data API), you can work with a web-services interface to your Aurora DB cluster. Data API doesn't require a persistent connection to the DB cluster. Instead, it provides a secure HTTP endpoint and integration with AWS SDKs. You can use the endpoint to run SQL statements without managing connections.

You can enable Data API when you create the Aurora DB cluster. You can also modify the configuration later. For more information, see [Enabling RDS Data API](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html#data-api.enabling).

**Note-** Currently, for Aurora MySQL, Data API and query editor aren't supported for Aurora Serverless v2 or for provisioned DB clusters.

**Region and version availability**
RDS Data API is available for the following types of Aurora DB clusters:

- Aurora PostgreSQL using specific PostgreSQL versions. These clusters can use Aurora Serverless v2 instances, provisioned instances, or a combination of both.

- Aurora Serverless v1 clusters using either Aurora PostgreSQL or Aurora MySQL.

**Limitations with RDS Data API**

- RDS Data API (Data API) has the following limitations:
You can only execute Data API queries on writer instances in a DB cluster.

- With Aurora global databases, you can enable Data API on both primary and secondary DB clusters. However, until a secondary cluster is promoted to be the primary, it has no writer instance. Thus, Data API queries that you send to the secondary fail. After a promoted secondary has an available writer instance, Data API queries on that DB instance should succeed.

- Performance Insights doesn't support monitoring database queries that you make using Data API.

- Data API isn't supported on T DB instance classes.

- For Aurora PostgreSQL Serverless v2 and provisioned DB clusters, RDS Data API doesn't support enumerated types.

**Enabling RDS Data API when you create a database**

While you are creating a database that supports RDS Data API (Data API), you can enable this feature. The following procedures describe how to do so when you use the AWS Management Console, the AWS CLI, or the RDS API.


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


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

**Enabling or disabling Data API (Aurora PostgreSQL Serverless v2 and provisioned)**

Use the following procedures to enable or disable Data API on Aurora PostgreSQL Serverless v2 and provisioned databases. To enable or disable Data API on Aurora Serverless v1 databases, use the procedures in [Enabling or disabling Data API (Aurora Serverless v1 only).](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html#data-api.enabling.modifying.sv1)


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

more details [RDS Data API for Aurora Serverless](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html)
Monthly Amazon Location Service Updates - 2023.12
Tags: amazonlocationservice, amplifygeo, amplify, amazonlocationserviceupdates
Published: 2023-12-31 15:00:00

![img](https://day-journal.com/memo/images/logo/aws/location-service.png)

### Monthly Amazon Location Service Updates - 2023.12

<br>

This is a summary of the December updates for Amazon Location Service.

<br>

## 2023.12 Updates

No updates


<br>

## Other Info

[Amazon Location Service Demo](https://location.aws.com)
Official Amazon Location Service demo.

[Amazon Location Service Developer Guide](https://docs.aws.amazon.com/location/latest/developerguide)
Official Amazon Location Service Documentation.

[AWS Geospatial](https://github.com/aws-geospatial)
Official AWS Geospatial samples.

[Amazon Location Service Samples](https://github.com/aws-samples/amazon-location-samples)
Official Amazon Location Service samples.

[Amplify Geo Docs](https://docs.amplify.aws/lib/geo/getting-started/q/platform/js)
Official Amplify Geo Docs.

[amazon-location-service-starter](https://github.com/dayjournal/amazon-location-service-starter)
Build environment to get started with Amazon Location Service.

[A Summary of How to Build Amplify Geo and Amazon Location Service](https://dev.to/aws-builders/a-summary-of-how-to-build-amplify-geo-and-amazon-location-service-5hal)
Summary of Amazon Location Service and Amplify Geo. (as of December 2021)  

[dev.to](https://dev.to/dayjournal)
Articles on Amazon Location Service.

[tags - Amazon Location Service](https://day-journal.com/memo/tags/Amazon-Location-Service)
[tags - Try](https://day-journal.com/memo/tags/Try)
Notes on Amazon Location Service. (Japanese)

<br>

## Related Articles

{% link https://dev.to/aws-heroes/monthly-amazon-location-service-updates-202311-3jch %}
Beginner's TypeScript #12
Tags: programming, beginners, typescript
Published: 2023-12-31 15:00:00

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

⭐ **Narrowing Down Union Types** ⭐

Consider this function:

```ts
const coerceAmount = (amount: number | { amount: number }) => {};
```

What this is saying is that what we pass into **coerceAmount** can be either a number or an object that contains an **amount**.

Inside of the **coerceAmount** function, we can check if **amount.amount** exists, then return it. Otherwise, return **amount**:

```ts
const coerceAmount = (amount: number | { amount: number }) => {
  if (amount.amount) {
    return amount.amount;
  }
  return amount;
};
```

TypeScript gives us an error.

Hovering over **amount.amount** tells us:

```bash
Property 'amount' does not exist on type number.
```

This is a TypeScript quirk where you can not access a property unless you know it is there.

One way to fix the type error is updating our **if** to check if the **typeof** amount is an object. If so, return **amount.amount** otherwise just return **amount**.

```ts
const coerceAmount = (amount: number | { amount: number }) => {
  if (typeof amount === 'object') {
    return amount.amount;
  }
  return amount;
};
```

This would also work by checking if the **typeof** amount is a number and then returning the amount. Otherwise, return **amount.amount**:

```ts
const coerceAmount = (amount: number | { amount: number }) => {
  if (typeof amount === 'number') {
    return amount;
  }
  return amount.amount;
};
```

Using the **typeof** operator to narrow down different branches of a union type is a really powerful technique.

It is also really useful when interfacing with APIs that you did not create.

---

I hope you found it useful. Thanks for reading. 🙏

Let's get connected! You can find me on:
- **Medium:** https://medium.com/@nhannguyendevjs/
- **Dev**: https://dev.to/nhannguyendevjs/
- **Hashnode**: [https://nhannguyen.hashnode.dev](https://nhannguyen.hashnode.dev/)/
- **Linkedin:** https://www.linkedin.com/in/nhannguyendevjs/
- **X (formerly Twitter)**: https://twitter.com/nhannguyendevjs/
Job Apply
Tags: jobapply, apply, applynow, newjobapply
Published: 2023-12-31 14:33:39

SOI (2nd page submit reg form)

The prefilled is available 

t1= First name

t2= last name

t3= phone number 

t4= email

t5= zip code 

Real job listings are ported into the site as well as EDU offers[](https://getflirty54.blogspot.com/2023/12/blog-post.html)
[Job Apply now](https://getflirty54.blogspot.com/2023/12/blog-post.html)
Laravel: Rýchle projekty pre každého
Tags: laravel, php
Published: 2023-12-31 14:31:27

1. **Blogový Systém**: Klasický projekt, kde môžete implementovať CRUD (Create, Read, Update, Delete) operácie.

2. **E-shop**: Jednoduchý obchod s produktmi, kategóriami, košíkom a objednávkovým procesom.

3. **Rezervačný Systém**: Pre hotely, reštaurácie alebo udalosti, s možnosťou spravovať dostupnosť a rezervácie.

4. **Správa Úloh (Todo List)**: Aplikácia na správu úloh s možnosťou pridávať, odstraňovať a označovať úlohy ako dokončené.

5. **Sociálna Sieť pre Malú Komunitu**: Základné funkcie ako profil, príspevky, komentáre a priateľstvá.

6. **Systém Správy Obsahu (CMS)**: Vlastný CMS systém pre správu obsahu webových stránok.

7. **Fórum**: Jednoduché diskusné fórum s vláknami, príspevkami a užívateľskými účtami.

8. **Receptár**: Aplikácia na zdieľanie a správu receptov s možnosťou hodnotenia a komentovania.

9. **Portfólio Stránka**: Dynamická portfóliová stránka pre umelcov alebo programátorov s admin rozhraním.

10. **Systém na Správu Inventára**: Pre malé podniky na správu zásob.

11. **Rezervačný Systém pre Reštaurácie**: S možnosťou vyberať stoly a časy rezervácií.

12. **E-learningový Portál**: Platforma pre online kurzy s lekciami, kvízmi a správou používateľov.

13. **Realitný Portál**: Zoznam nehnuteľností s možnosťou vyhľadávania a filtrovania.

14. **Systém na Správu Projektov**: Pre správu tímových úloh, časových plánov a spolupráce.

15. **Finančný Manažment**: Aplikácia pre osobné financie, rozpočty a sledovanie výdavkov.

16. **Chatovacia Aplikácia**: Jednoduchý real-time chat s použitím Laravel Echo a WebSockets.

17. **API pre Mobilné Aplikácie**: Vytvorenie RESTful API, ktoré môže byť použité mobilnými aplikáciami.

18. **Systém na Správu Lekárskych Záznamov**: Pre lekárske kliniky na správu pacientov a ich záznamov.

19. **Rezervačný Systém pre Udalosti**: Na správu vstupeniek, udalostí a účastníkov.

20. **Feedbackový Systém pre Zákazníkov**: Aplikácia na zber spätnej väzby od zákazníkov pre rôzne služby alebo produkty.
A Beginner Developer 2023 Recap
Tags: recap, webdev, javascript, typescript
Published: 2023-12-31 14:26:03

Looking back, 2023 was the year my brain did more code crunches than I did at the gym (which, by the way, were few). This was the year I decided to dive headfirst into a career transition to programming - not that I was running away from my current job, but let's just say that developing software and bringing projects to life makes my heart beat faster.

In my current job, which has as much to do with software development as a duck has to do with classical ballet, I ended up creating 5 tools to make everyone's life easier (including mine). I think I ended up being more useful than I expected!

Personally, I lost count of how many projects I started. I finished some, others... well, let's just say they are in a "creative pause". I completed a Full Stack JavaScript course and a postgraduate in multi-platform mobile development that I started in 2022, and I did a bunch of other courses on Udemy. Let's just say my brain was on a learning marathon.

I used AI assistants in programming less than I expected. They are good for shaking off the rust or writing that basic code, but at the peak of programming "flow", these assistants are like someone trying to help cook and just making a mess. Useful, but sometimes they hinder more than they help. It's like giving a recipe book to a chef while he's preparing dinner! 🤖💻👨‍🍳

I learned some cool things that I will take to all my future projects:

1. TypeScript: at first, I thought it was just a "gourmet" version of JavaScript. But now, without it, I feel like I'm trying to navigate without GPS. Lost, confused, and always searching for that guidance beacon that TypeScript offers.
2. Clean Architecture: it was like those gourmet recipes you see on TV and think "I'm never going to make that". But, surprise! I ended up adopting it in my project, like someone who starts making artisanal burgers at home. Unexpected, a bit challenging, but incredibly satisfying for the organization it provides.
3. Unit and integration testing: before, I saw them as a tedious task. Now, I realize they are more crucial than I thought. If I applied the same dedication to testing my social life as I do with my code, maybe I wouldn't just be great at the keyboard, but also a master of casual conversation. Imagine that, implementing TDD (Test Driven Dating) to improve my social skills! 😄👨‍💻🎉

And, by chance, I entered the open-source world with a project for the abstraction of the DataJud API, from CNJ. It became more popular than I expected (check it out: https://github.com/joaotextor/busca-processos-judiciais).

Now I'm working on a personal SaaS project and thinking about another one. They certainly won't make me the next Bill Gates, but the learning is worth every second.

Finally, here's my GitHub retrospective. I hope next year's numbers are even more impressive!

A happy new year to everyone, with lots of health and dreams fulfilled (and, of course, lots of code)!

{% youtube EVEOCo417FI %}
Quotation Marks, Single or Double?
Tags: discuss, programming
Published: 2023-12-31 14:21:38

Which type of quotation marks are the best or the right ones to use, the single or the double ones? I tend to use double quotation marks because I find those easier to find and use on my Scandinavian keyboard (they do not share the same key) but I would love to hear what you guys suggest.

For example in Python: 
print("Hello world!")
print('Hello world!')

Quotation marks, single or double? Which ones do you use and why?
FastX Transport: The Ultimate Guide to Shipping and Delivery Services
Published: 2023-12-31 14:13:41


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ilf4rl4jubw2br5xl3m.jpeg)Are you looking for a reliable and efficient shipping and delivery service for your business or personal needs? Do you want to learn how to choose the best option for your cargo, budget, and timeline? Do you want to know the tips and tricks to optimize your shipping and delivery experience?

If you answered yes to any of these questions, then this guide is for you. In this guide, you will discover everything you need to know about FastX Transport, the ultimate shipping and delivery service provider. You will learn:

- what makes it different from other shipping and delivery services
- What are the services offered by FastX Transport and how to select the most suitable one for your needs
- What are the benefits of using FastX Transport and how to maximize them
- What are the challenges and risks of using FastX Transport and how to overcome them
- What are the best practices and recommendations for using FastX Transport and how to implement them
- What are the future trends and opportunities for using FastX Transport and how to prepare for them

By the end of this guide, you will have a comprehensive understanding of [FastX Transport](fastx) and how to use it effectively and efficiently. You will also have the confidence and skills to ship and deliver anything, anywhere, anytime with FastX Transport.

So, what are you waiting for? Let's get started and explore the world of FastX [Transport](fastx), the ultimate shipping and delivery service provider.
Understanding The Sharding in MongoDB
Tags: mongodb, sharding, backend, database
Published: 2023-12-31 14:00:00

Before understanding sharding, we need to understand the vertical and horizontal scaling of the Database.

Suppose your data collection has a big growth and now you must extend your database server. If you extend the capacity of your database server eg. RAM, ROM or CPU then it would be called verticle scaling of the database. 


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




But if you increase the number of servers to divide the data into chunks and distribute data into those multiple small servers, that would be called horizontal scaling of the database.


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


Now, let's come to the Sharding in MongoDB. Sharding in MongoDB is a method or approach for distributing or partitioning data across multiple machines, that is the horizontal scaling of the MongoDB database. It is beneficial when a single machine can't handle properly large modern-day workloads or data(eg. ~100 million of data) anymore. Then enabling horizontal scaling of the database by distributing chunks of data. This means you are adding several server machines into your server rack so that all the data can be shared with the data set and loaded within all the servers of the rack. Horizontal scaling allows us for near-limitless scaling to handle big data and intense and massive workloads.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ul941t28knh3hfhjiko8.png)
Hair Patch In Zirakpur - Kalakaar Hair Studio
Tags: hairstudio, nail, face, makeup
Published: 2023-12-31 13:57:49

Hair services
Non-surgical hair replacement (hair patch)
Hair extensions
Keratin
Smoothning/rebounding/straight therapy
Hair color
Advance Hair cutting Male/ Female
Hair styling
Hair Fall Treatment
Dandruff treatment for hair
Advance Hair Color Technique
Nail Services
Acrylic nail extensions
Gel nail extensions
Press on nail extensions
Nail extensions removal
Power polish
Nail art
Makeup
Party makeup
Bridal makeup
HD makeup
Airbrush makeup
Lash services
Temporary Eyelash extensions
Permanent eyelash extensions
Skin Services
Chemical peel
Cleanup
Facial
Waxing (honey/Rica/ Brazilian
Body polish
Manicure
Pedicure
[](https://kalakaarhairstudio.co.in/)
SvelteKit + EdgeDB
Tags: sveltekit, edgedb
Published: 2023-12-31 13:26:42

# SvelteKit 프로젝트 생성

https://kit.svelte.dev/docs/creating-a-project

```shell
$ npm create svelte@latest my-app
$ cd my-app
$ npm install
$ npm run dev
```

# EdgeDB 설치

https://www.edgedb.com/docs/cli/index 를 봐도 되는데, 나는 그냥 https://github.com/edgedb/homebrew-tap 보고 brew로 설치했음

```shell
$ brew install edgedb/tap/edgedb-cli
```

# EdgeDB 생성 및 실행

https://www.edgedb.com/docs/intro/projects#initializing

```shell
$ edgedb project init
$ npx @edgedb/generate edgeql-js
$ edgedb ui
```

# scheme 작성

* `dbschema/default.esdl` 수정
* 로그인을 위해 미리 `using extension auth` 추가했음

```
using extension auth;

module default {
  type user {
    name: str;
  }
}
``` 

# migration 생성 및 적용

```shell
$ edgedb migration create
$ edgedb migrate
```

이후 브라우저에서 user 테이블에 테스트 사용자 추가

# 프로젝트에 EdgeDB 연결

https://www.npmjs.com/package/edgedb

```shell
$ npm i edgedb
```

`app.d.ts` 설정

```ts
import { Client } from "edgedb";

declare global {
  namespace App {
    interface Locals {
      db: Client;
    }
  }
}

export {};
```

`hooks.server.js` 설정

```js
import * as edgedb from "edgedb";

export const handle = async ({ event, resolve }) => {
  const client = edgedb.createClient();
  event.locals.db = client;

  return resolve(event, {
    filterSerializedResponseHeaders(name) {
      return name === "content-range";
    }
  });
};
```

# user 정보 가져오기

`page.server.js` 수정

```js
export async function load({ locals }) {
  const user = await locals.db.query("select user { id, name }");
  return { user };
}
```

orm을 사용하고 싶다면 https://www.edgedb.com/docs/clients/js/index 참고 

# auth 사용하기

https://www.edgedb.com/docs/guides/auth/index