teleren/devto huggingface dataset:
An easy way to finally get your first paying customers for your product 💡
Tags: startup, career, community
Published: 2023-10-19 12:47:26

One of the best ways to get your first customers is by partnering with companies with a strong customer base. There are various ways of doing this, such as developer programs, integration development, incubators, and accelerators. 

At Text, we're offering a similar opportunity. **We're looking for teams to join the next edition of our Text Accelerated Program. [We'd love to connect](https://incubator.text.com/text-accelerated?utm_source=dev.to&utm_medium=article&utm_campaign=article)** if you already have an MVP, product, or app and are eager to find your first customers or explore new business cases for your project! 

Participants will team up with our customers to ensure they're building something that truly meets their needs. We'll work in short bursts - Mondays for meetings with customers and Fridays for internal demos and chats.The outcome will be a ready-to-launch product that 40K+ of our customers will have the chance to see!

Ready for the most productive six weeks of your life? [Apply!](https://incubator.text.com/text-accelerated?utm_source=dev.to&utm_medium=article&utm_campaign=article)

P.S. We don’t buy start-ups or invest money. You can still be actively fundraising or a part of a different program.
Conditional React props with TypeScript Function Overloading
Tags: typescript, react, webdev, codequality
Published: 2023-10-19 12:37:55

Optional props in TypeScript interfaces give you some freedom when crafting components. However, this freedom can also create confusion and weaken the integrity of your components. TypeScript function overloading is a way to specify which props are meant to be used together, making your components foolproof.

## The Problem with Optional Props

Optional props offer customization but can lead to unclear combinations of props, creating room for mistakes. For instance:

```typescript
// Using the Button component with optional props
<Button text="Click Me" handleClickIcon={yourClickHandler} />
```

Here, `handleClickIcon` is specified, but `icon` is not. It's unclear whether this is intentional or a mistake, and TypeScript won't complain either way.

## The `Button` Component

Let's examine a `Button` component that can optionally include an icon. The component should only accept an `icon` prop if a `handleClickIcon` function is also present.

### The Basic Way: Using Optional Props

The props could be defined as follows:

```typescript
type ButtonProps = {
  text: string;
  icon?: JSX.Element;
  handleClickIcon?: () => void;
};
```

This won't enforce that `handleClickIcon` is relevant only when you've got an `icon`.

### Leveling Up: Function Overloading

A better strategy is to use function overloading in TypeScript:

```typescript
type CommonProps = { text: string };
type IconAndClickProps = { icon: JSX.Element; handleClickIcon: () => void };

// function overloading
export function Button(props: CommonProps): JSX.Element;
export function Button(props: CommonProps & IconAndClickProps): JSX.Element;

export function Button(props: CommonProps & IconAndClickProps): JSX.Element {
// ...your button implementation
}
```

Now, you'll get a TypeScript error if you try to use `handleClickIcon` without supplying an `icon`:

```typescript
<Button text="Just Text" />
<Button text="With Icon" icon={<IconComponent />} handleClickIcon={yourClickHandler} />
```

You're basically instructing TypeScript to allow either Set A or Set B of props. No mixing allowed.

## Wrap-up: Stronger, Self-Documenting Components

Function overloading does more than enforce types. It also acts as a form of built-in documentation and makes your components less prone to errors. So, it's a technique you should think about for crafting clear and robust React components.

## Further Reading

- [TypeScript Handbook: Function Overloading](https://www.typescriptlang.org/docs/handbook/2/functions.html#function-overloads)

Give function overloading a try!

Feel free to comment and share!
AWS Stack in UPDATE_ROLLBACK_FAILED state
Tags: aws, cloudformation, awscli
Published: 2023-10-19 12:27:59

When your stack is in a UPDATE_ROLLBACK_FAILED state, then you cannot update your stack anymore. You have two solutions here:

1. Delete the whole stack and deploy it again
2. Continue the rollback process

In this post I am going to outline how to go route 2.

## How to continue the update rollback

When your stack is in UPDATE_ROLLBACK_FAILED state, this means that some resouces could not be rolled back.
When you are going to continue the rollback process, you have to skip these.
We are going to use the `aws cloudformation continue-update-rollback` command, which has a parameter `--resources-to-skip`. 
This parameter takes one or more `LogicalResourceId`s, separated by a space.

To get these IDs, this command can be used:

```shell
aws cloudformation describe-stack-resources --stack-name <stackname> | jq '.StackResources[] | select(.ResourceStatus == "UPDATE_FAILED") | .LogicalResourceId' | tr -d '"'
```

These values you can then use in the following command. 

```shell
 aws cloudformation continue-update-rollback --stack-name <stackname> --resources-to-skip <ResourceOne> <ResourceTwo>
```


To skip resources means, that they will just get the `ResourceStatus = RollbackComplete`. 
It doesn't mean, that an actual rollback was performed.
This leaves the stack in an inconsistent state.
But it is ready to have another try to update it.
UI edits seem simple, so why do they always eat up so much time?
Tags: ui, ux, tooling, uxdesign
Published: 2023-10-19 12:22:11

### Ever felt like this?

If you've ever been lured by the deceptive simplicity of UI edits, only to find yourself in a tangled web of cascading issues, you're not alone. It's like pulling one thread and suddenly your whole sweater unravels. 

Why struggle when you can streamline? Star the [WebCrumbs GitHub Repo](https://github.com/webcrumbs-community/webcrumbs) to join a community that understands your pain. We're working to build a toolkit that makes these "simple" tasks truly simple. Be a part of the solution—your future UI projects will thank you.
Adding support for Xahau to our XRPL project
Published: 2023-10-19 12:15:37

## Overview
To add support for [Xahau](https://xahau.network) we had to make some changes to our [XRPL](https://xrpl.org) project [DalliPay](https://www.dallipay.com). The following may help you to update your own project.

### Changes
1. Support multiple ledgers (XRPL, Xahau)
2. Calculate TX fees per transaction ("fee" command)
3. Implement NetworkID
4. Add "manual exchange rate"
5. ~~Disable integrated wallet faucet~~

### Support multiple ledgers (XRPL, Xahau)
We added a small dropdown for users to switch between XRPL and Xahau ledger and endpoints (Eg. Testnet, Mainnet). Users are also able to add custom endpoints.
Xahau and XRPLs consumer API is mostly identical. Therefor our Xahau.Ledger class inherits from Xrpl.Ledger and differences like the native currency (XAH instead of XRP) are defined in Xahau.Ledger class.
Due the added support for multiple ledgers, we had to separate available ledger explorers. For XRPL DalliPay supports Bithomp, XRPSCAN and xrpl.org. For Xahau another one was added.

### Calculate TX fees per transaction (Hook fees)
On XRPL the +/- same fee can be applied to all transactions (tx) sent in a small timeframe. On Xahau the fees vary heavily due different hooks involved. Every executed hook increases the tx fee needed. Therefore the fee must be calculated per tx. Xahau offers a WebSocket command "fee" for that. See [Hook Fees](https://xrpl-hooks.readme.io/docs/hook-fees) for technical details.

### Implement NetworkID
XRPL supports a [NetworkID field](https://xrpl.org/transaction-common-fields.html#networkid-field) which wasn't implemented in DalliPay before. For every tx on Xahau the correct value must been set for that field.
- Xahau Mainnet (NetworkID 21337)
- Xahau Testnet (NetworkID 21338)

### Add "manual exchange rate"
To calculate fiat amounts of ledger transactions and vice versa, DalliPay needs an exchange API to get current exchange rates. Due there isn't one available at the time of this writing, we decided to add a new feature "manual exchange rate" to let the user enter an exchange rate. Exchange rates may be available from various sources and websites.

### Disable integrated wallet faucet
**Updated 2023-10-20**: The same API for Xahau is available at HTTP POST https://xahau-test.net/accounts. Our used lib xrpl4j adds "/accounts" internally. Therefor https://xahau-test.net must be passed to `FaucetClient.construct()` to successfully fund a test wallet.
**Outdated**: For XRPL DalliPay offers an integrated way to create test wallets and fund them for various testnets. Due Xahau currently uses a different API, we decided to disable that feature for Xahau at the moment.
- [Web UI faucet](https://xahau-test.net/faucet)
- [REST API](https://xahau-test.net/newcreds) (HTTP POST)

### Helpful resources
- [XRPL Hooks](https://hooks.xrpl.org)
- [XRPL Hooks documentation](https://xrpl-hooks.readme.io)
- [Xahau Testnet](https://hooks-testnet-v3.xrpl-labs.com)  with faucet and explorer
Why can't I just focus on my work without getting into endless documentation?
Tags: webdev, productivity, codequality, frontend
Published: 2023-10-19 12:13:54

### Ever felt like this?

If you've ever found yourself spiraling down the documentation rabbit hole, you're not alone. It's as old as time for developers—starting the day with grand ambitions, only to find yourself on a late-night detour through a maze of technical jargon and looping references.

Don't settle for that. Instead, imagine a world where you can focus on the joy of creating, unburdened by the nitty-gritty that saps your time and energy.

---

Do you believe a better way it's possible? Then come join us in a growing community that aims to reshape the landscape of React web development. 

Learn more and star the [WebCrumbs GitHub Repo](https://github.com/webcrumbs-community/webcrumbs) to be a part of this journey. 

We're all about making web development smarter, not harder. Your future self will thank you.

{% embed https://github.com/webcrumbs-community/webcrumbs %}
Creating a minimalistic To-Do app in Vue.js
Tags: webdev, javascript, vue, tutorial
Published: 2023-10-19 12:12:09

Hello, World! 
###### (this is my first actual post)

## Pre-article
I know y'all don't read the description, so the final project (with css of course) is here:
[To-Do list](https://pxlmastrXD.github.io/todolist)

## Introduction
Vue is an amazing framework that you can use almost everywhere. You can program it in Node.js, or even in a serverless fashion (what I will be doing). One of the most common first webdev projects you will eventually do with a new framework is a To-Do list, which I decided to do with Vue as my first big one and first actual GitHub Repo!

### My editor setup (since i'm on a chromebook)
VSCode web + Volar (Vue language features)

## Getting started
So I first decided to make a simple UI and then add on some features. I started off my UI like this:
```html
<div id="app">
    <h1>To-Do list</h1>
    <input placeholder="Add a new task..." /><button>Add</button>
    <br />
    <ul>
        <li> tasks go here... </li>
    </ul>
</div>
```
Pretty simple right? Well, at least that's what it was before I injected Vue and Tailwind into it... 😆

## Adding Reactivity
I went ahead and installed Vue in my webpage using the CDN, like this (put it in your head or wherever you like)
```html
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
```

Then, I made a script tag below my div and started writing code. Here's what I started with:
```javascript
const {ref, createApp} = Vue

createApp({
  setup() {
    let tasks = ref([])
    let input = ref('')
    
    function addnewTask() {
      tasks.value.push(input.value); // add a new task from the <input>
      input.value = '' // clear the <input>
    }
    
    return {
      tasks,
      input, 
      addnewTask,
    }
  }
})
```

Then, to make the reactivity, I went and added some tags and attributes to my body.

```html
<div id="app">
    <h1>To-Do list</h1>
    <input v-model="input" placeholder="Add a new task..." /><button @click="addnewTask">Add</button>
    <br />
    <ul>
        <li v-for="task in tasks">{{task}}</li>
    </ul>
</div>
```

That's the simplest I could make it for the start, but later on I added it where we could add more functionality. For example, later on, I had added a unique ID to each task so we could make a `delete()` function, and I had the program save your tasks to localStorage. That's all a bit too much, so you can see the full code on [GitHub](https://github.com/pxlmastrXD/todolist). Feel free to give it a star!

Thanks for reading, your pal,
- pxlmastrXD
Sloan's Inbox: How and when to choose a JavaScript Framework?
Tags: discuss, codenewbie, beginners, javascript
Published: 2023-10-19 12:00:00

Hello! Sloan, DEV Moderator and resident mascot, back with another question submitted by a DEV community member. 🦥

For those unfamiliar with the series, this is another installment of Sloan's Inbox. You all send in your questions, I ask them on your behalf anonymously, and the community leaves comments to offer advice. Whether it's career development, office politics, industry trends, or improving technical skills, we cover all sorts of topics here. If you want to send in a question or talking point to be shared anonymously via Sloan, that'd be great; just scroll down to the bottom of the post for details on how.

Let's see what we got...

### Today's question is:

> I'm just getting started with JavaScript and have realized that there are quite a few frameworks out there... how do you choose one? Is it best for me to try and learn vanilla JS to start off or am I fine to move on to frameworks early on? 
>

Share your thoughts and let's help a fellow DEV member out! Remember to keep kind and stay classy. 💚

---

*Want to submit a question for discussion or ask for advice? [Visit Sloan's Inbox](https://docs.google.com/forms/d/e/1FAIpQLSc6wgzJ1hh2OR4WsWlJN9WHUJ8jV4dFkRDF2TUP32urHSAsQg/viewform)! You can choose to remain anonymous.*
React Custom Hooks (useNetworkStatus)
Tags: react, reactjsdevelopment, reacthooks, customhooks
Published: 2023-10-19 11:54:24

## INTRO 🔊
Hello World! 👋
Today we are discussing another custom hook named `useNetworkStatus`🔥. In this post, we will discuss this hook's usage, code and use case.

## USAGE 🔊
Sometimes developers want to know whether the user is `offline` or `online`. By using JavaSCript we can find the user status (offline/online). But creating a custom hook and using it whenever we want is better than using JavaScript code every time right? For that purpose, we are creating one custom today.

## CODE 🔊
```jsx
import {useState,useEffect} from 'react'

 const useNetworkStatus=()=> {
    
    const [isOnline, setIsOnline] = useState(navigator.onLine);
  
    useEffect(() => {
      window.addEventListener('online', () => {
        setIsOnline(navigator.onLine);
      });
      window.addEventListener('offline', () => {
        setIsOnline(navigator.onLine);
      });

      return ()=>{
        window.removeEventListener("online", setIsOnline);
        window.removeEventListener("offline", setIsOnline);
      }
    });
  
    return isOnline;
  }

  export default useNetworkStatus
``` 

## USE CASE 🔊
```jsx
import React from 'react';
import { useNetworkStatus } from 'share/hooks';

function Index() {
  const isOnlie = useNetworkStatus();
  return <div>Index</div>;
}

export default Index;
```

## CONCLUSION 🔊
By using the above hook, we can find whether is online or not.

I hope you people like the `useNetworkStatus` hook. We will meet with another hook in another post.

Peace 🙂
Python3 Abbreviations
Tags: python, list, development
Published: 2023-10-19 11:52:20

Python3 is a very flexible language. It has a lot of different features that make it easier to work with lists and dictionaries. Today I propose to consider a couple of techniques on how to reduce the amount of code when working with lists and dictionaries

It often happens that we need to iterate through a list and, at the same time, changing and processing each element, get a new list with processed elements.

Let's assume we have a list of integers. And we need to go through it and square each element.

`nums = [1, 2, 3]`

The simplest way to do this is:
```
for num in nums:
    squares.`append`(num**2)
```

But we can reduce this code to one line:
`squares= [ num ** 2 for num in nums]`

In such abbreviations we can use conditional statements.

For example, let's take a list of cars. We are interested in all cars starting with the letter M.
`cars = [”Toyota”, “Mitsubishi”, “Honda”, “Mazda”]`

We could also write a loop as in the previous example and in the body of the loop check through ‘if’ statment the capital letter in the name of the car. But we can fit everything into one line.
`starts = [car for car in cars if car.startsWith(”M”)]`

Let's see how we can work with a dictionary using the same method.

Let's assume we have a dictionary of integers.
`nums = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5}`

And here we also need to square each number. Again, we could write a loop and do certain things inside the body of the loop, but we can fit everything into one line.
`squares= {k:v**2 for (k,v) in nums.items()}`

Thus, we can significantly reduce the amount of code and make it more readable. And the less code we have, the less likely it is that we will make a mistake somewhere.
5. Working with VS Code
Published: 2023-10-19 11:51:22

**`Day 3 | LIVE Class | 2 hours
`**
Today's LIVE class was full-on. Nothing overly complicated but just new. The classes were held on Zoom, and it started and finished on time with a 10-minute break.

After an overview of the online learning dashboards, the tutor covered these topics:

1. An upcoming assignment (16 questions, due on 15 December)

2. Most commonly used Command Line prompts (cd, mv, cp, rm, etc)

3. Basic work in VS Code

**Assignment**

The assignment seems like a lot of detailed research work. I will need to attempt 1-2 assignments per week, if I am to complete them by the 15 December 2023 deadline.

When I was in university decades ago, I used to be anxious about assignments. Everything was about meeting deadlines and not getting penalized. Same in school - homework and exams were traumatic! Similar to studying maths. 

So, my immediate conditioned reaction was a worry also. But, I need to change this mindset of mine when it comes to education - just focus on learning and enjoying the experience of writing up an assignment. My aim isn't to get another educational qualification but to learn a new skill and build apps. Something I need to enjoy also.

> _Great ability develops and reveals itself increasingly with every new assignment._
> **Baltasar Gracian**

A nice quote to remember but sometimes I wish this would happen :)

> _I think it goes back to my high school days. In computer class, the first assignment was to write a program to print the first 100 Fibonacci numbers. Instead, I wrote a program that would steal passwords of students. My teacher gave me an A._
> **Kevin Mitnick**

Anyway, let's go to the main topic covered in the class - working with VS Code.

## The VS Code

We practiced these things:

1. creating files and folders

2. upload images

3. write plain text and headings

4. bullet points

5. line breaks

And I managed to re-create something that looks like a website:

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

The code is on the left and the finished product is on the right.

Just showing off my code again, and my FIRST!

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

That's it for now. It was a day of learning for sure. There is a bit of post-class work to be done and then prepare for the next class. But I will do them tomorrow. For now, it's time to get to bed!
INVESTING IN DUBAI REAL ESTATE: A GOLDEN OPPORTUNITY
Tags: realestate, dubai, dubairealestate, investment
Published: 2023-10-19 11:50:24


In the bustling landscape of global real estate markets, the Dubai real estate market stands out as a glittering gem, beckoning investors from across the globe. If you're seeking a pathway to prosperity, then buying property in Dubai is your golden ticket. This vibrant metropolis in the United Arab Emirates offers an unparalleled scope for Dubai property investment.

Dubai, often regarded as the City of the Future, seamlessly combines innovation, luxury, and economic stability. Here, investing in Dubai isn't merely about acquiring real estate; it's about securing your future in a city where dreams take shape. The prime reason investors are flocking to invest in Dubai real estate is the city's strategic location, acting as a bridge between East and West.

The diversity of options for those looking to buy property in Dubai is astonishing. From luxurious penthouses in the heart of the city to breathtaking waterfront villas, Dubai offers a spectrum of opportunities. The robust Dubai real estate market ensures that investments here yield solid returns.

DUBAI PROPERTY INVESTMENT: YOUR NEXT MOVE
Additionally, Dubai's government has crafted investor-friendly policies, providing security and transparency, thus making it an attractive destination for global investors. No matter whether you're a seasoned investor or a novice, Dubai's real estate market has a place for everyone, catering to different budgets and preferences.

The key to successful Dubai property investment is to work with experienced real estate professionals who can guide you through the intricacies of this dynamic market. With the right approach, you can turn your ambition to invest in Dubai into a reality, unlocking a world of opportunities that promise prosperity and growth.

In conclusion, investing in Dubai real estate isn't just a choice; it's an informed decision that paves the way for a brighter future. With a diverse range of properties and a thriving Dubai real estate market, this is your chance to make a golden investment that promises both security and growth. So, why wait? The time to invest in Dubai is now.
to know more about please click the link below
https://aimrowrealty.com/
Workforce optimization software
Published: 2023-10-19 11:49:45

Unlock Efficiency with [Workforce Optimization Software](https://beiinc.com/solutions/workforce-optimization/)! Streamline operations, boost productivity, and enhance employee performance with our cutting-edge workforce optimization software. Maximize resource utilization, reduce costs, and improve customer satisfaction. Discover the power of data-driven insights and automation to make informed decisions and optimize your workforce like never before. Try our Workforce Optimization Software today for a more efficient and effective workforce management solution.
Warehouse Racks Manufacturers in Manesar
Published: 2023-10-19 11:46:44

Looking for [Warehouse Racks Manufacturers in Manesar](https://beecostorage.in/warehouse-rack-manufacturers-in-manesar/)? Look no further! Whether you need slotted angle racks, shelving racks, light duty storage racks, or medium duty storage racks, our company stands as one of the leading industrial slot angle rack manufacturers in various locations like Hapur, Vadodara, Rewari, Kashmir , Rajokari, Sahibabad , including Udaipur, Ahmedabad, . Samlakha, Rampur, Bahadurgarh, Bawana, Manesar, Rajpura, Rupnagar, Ambala, Mumbai, Palwal, Behror, Vijayawada, Gurgaon, Sonipat, Medchal, Kapshera, Barabanki, Udhampur, Dadri, Muradnagar, Kundli, Neemrana, Jaisalmer, Naraingarh, Himachal Pradesh , Bareilly, Cotton Hera, Ajmer, Dhankot; We are your trusted platform that offers nothing less than the best.

We always keep our promise to deliver unsurpassed quality. With us, you get a wide variety of the best products under one roof. Say goodbye to the hassle of searching for manufacturers, as we offer complete solutions to meet all your warehouse and rack needs. Trust us to deliver the best you deserve.