teleren/devto huggingface dataset:
Mindmap: Never forget anything again
Tags: product, sideprojects, productivity, programming
Published: 2023-04-10 09:28:52

> _Did you know that you can impress or influence people just by remembering small details like their dog's name or their daughter's birthday ?_

Well, I did not, Until I read this life changing book "**How to Win Friends and Influence People**" by _Dale Carnegie_. This book says that regardless of your job profile, 85% of your financial success depends on your skills in Human engineering. I was surprised when I read this. 

I started keeping a journal since I read this book. I maintained notes about people I meet, be it my friends, colleagues, or even family members. These notes contain details about people like their birthdays, their work anniversaries, their favorite sports team, and movies that they like. Being in a remote job, I meet my colleagues once every 4-5 months so I even started noting down things that we talked about and I refer to that when I am going to meet them next time.

Every sunday, I look at this journal and see what's coming up this week. Since then, I have never forgotten anyone's birthday. I wish work anniversaries to all my colleagues. I even remember the names of the pets of all my friends.

It was all working very well until I had too many people added to the journal. Eventually, it became hard to manage. I had 53 people in my journal to be specific, and I had to scroll through all of them every Sunday to see what's coming up in the coming week.
That's when It struck me. I decided to optimize the whole process and go digital. This was the beginning of [Mindmap](https://themindmap.app/).

It took me ~3 weeks to build and productionize the first cut of Mindmap. Here, I can add people to my mindmap like I used to add in my journal. I can add facts about these people. These facts can be a **_General_** fact which is just a piece of information that can be referred to later, Or It can be a **_Timed_** fact which can be used to save events like birthdays, anniversaries, etc. I also added a notification section that shows the upcoming events in next week as well as next month.

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

I have recently added weekly email notifications as well. Now, I get an email every **sunday**, describing all the events coming up in next week. 

I am still evaluating more features to add onto this and  I am open to feedback as well. Please do give it a try and let me know if you want me to improve something in this.

Checkout Mindmap here: https://themindmap.app/

Cheers!!!
3 Awesome Jamstack Resources Website
Tags: jamstack, jamstackresources, staticsitegenarator, websitetemplate
Published: 2023-04-10 09:28:15

Jamstack is a modern web development architecture that has been gaining popularity among developers in recent years. It is a powerful combination of JavaScript, APIs, and Markup that allows for fast and highly scalable web applications. 

However, getting started with Jamstack development can be overwhelming, especially if you are new to the ecosystem. That's why we've put together a list of the top Jamstack resources websites to help you on your journey.

[Jamstack.org](https://jamstack.org/)

The website provides an introduction to the JAMstack and its benefits, as well as a collection of resources, including case studies, tutorials, events, and tools. Visitors can learn about the latest trends and best practices in JAMstack development, as well as find solutions to common challenges and problems.

One of the main features of the website is the JAMstack Conference, an annual event that brings together developers, designers, and business leaders to discuss the latest trends and advancements in JAMstack technology. The conference features keynote presentations, panel discussions, and workshops from experts in the field, as well as networking opportunities and social events.

[Statichunt.com](https://statichunt.com/)

Statichunt is an open-source directory that has quickly become a go-to resource for developers seeking themes, starters, and tools for static site generators. With a community-driven approach, Statichunt constantly updates its collection with fresh and relevant content from contributors all over the world. 

This innovative platform provides developers with a one-stop shop for all their needs, from customizable templates to comprehensive starter kits. Whether you're a seasoned pro or just starting out, Statichunt has something to offer to help you build better, faster, and more efficiently. 


[Jamstacktools.org](https://jamstacktools.org/)

Jamstacktools is a robust platform that offers developers a comprehensive listing of Jamstack tools and resources. It's a centralized hub where developers can find an array of useful tools for building Jamstack applications, such as static site generators, headless CMSs, hosting platforms, and much more. 

Whether you're looking to streamline your workflow or discover new tools, Jamstacktools is an essential resource for all Jamstack developers.
AI Features
Tags: opengauss
Published: 2023-04-10 09:19:20

The history of artificial intelligence (AI) can be dated back to as early as the 1950s, even longer than the history of the database development. However, the AI technology has not been applied on a large scale for a long time due to various objective factors, and even experienced several obvious troughs. With the further development of information technologies in recent years, factors that restrict the AI development have been gradually weakened, and the AI, big data, and cloud computing (ABC) technologies are born.

The combination of AI and databases has been a trending research topic in the industry in recent years. openGauss has participated in the exploration of this domain earlier and achieved phased achievements. An AI submodule DBMind is provided for the database. Compared with other functions, it is more independent. This module can be divided into AI4DB, DB4AI, and ABO optimizer.

**·** AI4DB uses AI technologies to optimize database execution performance as well as achieve autonomy and O&M free. It includes self-tuning, self-diagnosis, self-security, self-O&M, and self-healing.

**·** DB4AI streamlines the E2E process from databases to AI applications, drives AI tasks through databases, and unifies the AI technology stack to achieve out-of-the-box, high performance, and cost saving. For example, SQL-like statements are used to implement functions such as recommendation system, image retrieval, and time series forecast. The advantages of high parallelism and column store of databases can be fully utilized to avoid the cost of data and fragmented storage and avoid security risks caused by information leakage.

The functions described in this section are stored in the **bin/dbmind** directory of the database installation directory ($GAUSSHOME). The sub-functions are stored in the **components** subdirectory of **bin/dbmind**. To invoke DBMind, you can run the **gs_dbmind** command. In addition, the built-in AI functions (such as DB4AI) of the database are presented in the form of SQL syntaxes and system functions.
How Taxes Work in Magento 2 Store and What Tax Configurations are Available
Tags: magento, magento2, magento2tutorial
Published: 2023-04-10 09:18:12

**_How Taxes Work in Magento 2 Store and What Tax Configurations are Available_**: Expenses have forever been a mind boggling issue, and organizations look to computerize their estimations to make it simpler for supervisors and further develop the shopping experience for clients. Adobe's foundation based web-based arrangement offers rule-based charge computation mechanization through the Magento framework. It applies charging rules in view of client data, thing classes, client delivery and charging addresses, and store area.

In Magento 2, a supervisor can set up various thing classes to isolate charges, in view of the thing data, client data, charge zones, and rates. The store's administrator interface gives the accompanying duty areas to simple design and the executives.

For more information, please visit this:- **_[https://webguru.dev/how-taxes-work-in-magento-2-store-and-what-tax-configurations-are-available/](https://webguru.dev/how-taxes-work-in-magento-2-store-and-what-tax-configurations-are-available/)_**
Data Export By a User Without Required Permissions
Tags: opengauss
Published: 2023-04-10 09:01:37

**gs_dump** and **gs_dumpall** use **-U** to specify the user that performs the export. If the specified user does not have the required permissions, data cannot be exported. In this case, you need to assign the permission to a user who does not have the permission, and then set the **–role** parameter in the export command to specify the role with the permission. Then, **gs_dump** or **gs_dumpall** uses the **–role** parameter to specify a role to export data.

**Procedure**
1. Log in as the OS user **omm** to the primary node of the database.

2. Use **gs_dump** to export data of the **human_resource** database.

User **jack** does not have the permissions to export data of the **human_resource** database and the role **role1** has this permission. To export data of the **human_resource** database, you need to assign the permission of **role1** to **jack** and set **–role** to **role1** in the export command. The exported files are in .tar format.

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

Table 1 Common parameters

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

For details about other parameters, see “Server Tools > gs_dump” or “Server Tools > gs_dumpall” in the Tool Reference.

**Examples**
Example 1: User **jack** does not have the permissions required to export data of the **human_resource** database using **gs_dump** and the role **role1** has the permissions. To export data of the **human_resource** database, you can set **–role** to role1 in the gs_dump command. The exported files are in .tar format.

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

Example 2: User **jack** does not have the permissions required to export the public schema using **gs_dump** and the role **role1** has the permissions. To export the public schema, you can set **–role** to **role1** in the **gs_dump** command. The exported files are in .tar format.

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

Example 3: User jack does not have the permissions required to export all databases in a cluster using **gs_dumpall** and the role **role1** (cluster administrator) has the permissions. To export all the databases, you can set **–role** to role1 in the **gs_dumpall** command. The exported files are in text format.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k0b8xdtk677wmgslgv64.png)
Build & engage your community with Discourse
Tags: opensource, elestio, discourse, community
Published: 2023-10-11 13:06:21

---
title: Build & engage your community with Discourse
published: true
date: 2023-04-10 09:01:29 UTC
tags: opensource, elestio, discourse, community
canonical_url: https://elestio.hashnode.dev/build-engage-your-community-with-discourse
---

Building a community around your product or brand can have a significant positive impact on your business. A thriving community can help you grow your customer base, drive engagement, and foster brand loyalty. But building and managing a community is no easy feat. Thats where [Discourse](https://elest.io/open-source/discourse?ref=blog.elest.io) comes in.

[Discourse](https://elest.io/open-source/discourse?ref=blog.elest.io) is a free and open-source platform that helps you build and engage with your community. It is designed to provide an intuitive, modern, and flexible experience that encourages participation and conversation. With Discourse, you can create a community that is truly your own and foster a culture that aligns with your values.

So what makes Discourse stand out? For one, it has a user-friendly interface that encourages participation and makes it easy for members to find what they need. It also has a powerful moderation system that lets you manage your community effectively and efficiently. With features like trust levels, flags, and review queues, you can ensure that your community remains safe and welcoming.

Discourse also has a wealth of customization options, allowing you to tailor the platform to your specific needs. Whether youre looking to create a Q&A forum, a knowledge base, or a social community, Discourse can be adapted to meet your requirements. Additionally, it has a robust API that makes it easy to integrate with other tools and services.

Some of the biggest names in tech, such as Figma, Epic Games, and Atlassian, have already adopted Discourse for their own communities. But its not just for big corporations. Discourse is an excellent tool for small businesses, indie hackers, and startups looking to build and engage with their audience.

To discover how to setup your own instance and a quick overview of the platform, check our video available here:

<iframe src="https://www.youtube.com/embed/83Npalu8WZI?feature=oembed" width="700" height="393"></iframe>

In conclusion, [Discourse](https://elest.io/open-source/discourse?ref=blog.elest.io) is a powerful platform that can help you build and engage your community. With its user-friendly interface, powerful moderation system, and customization options, its no wonder why so many companies have adopted it for their own communities. Whether youre a small business or an enterprise, Discourse can help you create a thriving community around your product or brand.

[Deploy your Discourse instance on Elestio](https://dash.elest.io/deploy?soft=Discourse&id=91&ref=blog.elest.io)

_Originally published at_ [_https://blog.elest.io_](https://blog.elest.io/discourse/) _on April 10, 2023._
How to create drag and drop in reactjs
Tags: javascript, react, webdev, beginners
Published: 2023-04-10 08:52:58

To create drag and drop functionality in React JS, you can use the HTML5 Drag and Drop API which allows elements to be dragged and dropped within a web page.

Here are the basic steps to create a drag and drop feature in React JS:

1. Create two components: one for the element that will be dragged, and another for the drop target.
2. In the component for the element that will be dragged, add an event handler for "onDragStart" that sets the data for the drag operation using the "setData" method of the event object.
3. Add event handlers for "onDragOver" and "onDrop" in the component for the drop target.

For detail reading please visit given link: 
[Click me for complete details](https://vocal.media/education/how-to-create-drag-and-drop-in-reactjs)
custom input filed
Published: 2023-04-10 08:52:06

I  have created a custom input component for verifying a user's phone number using four input fields. This is a useful feature for authentication processes in mobile applications.

In this code, I have used React hooks such as useEffect and useState to manage the component's state and to focus on the first input field automatically when the component mounts. 

Additionally, I have used the #useRef hook to create a reference to each input field, which allows you to focus on the next input field when the user enters a value in the current field.

The use of conditional styling with the #isFocused and #inputValues variables is a nice touch, which enhances the user experience by providing visual feedback when the user interacts with the input fields.




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

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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aepwu256tqxcxvwctrdl.PNG)
Array vs ArrayList in C#
Tags: csharp, array, arraylist
Published: 2023-04-10 08:48:00

In C#, both Arrays and ArrayLists are used to store collections of data, but they have some differences in terms of their characteristics and usage.

## Declaration

- Arrays are fixed-size collections of items that are declared with a specific size and type at the time of creation. 
- ArrayLists are dynamically-sized collections that can grow or shrink in size. 

## Initialization
- Arrays can have multiple dimensions (multi-dimensional arrays) or just one dimension (single-dimensional arrays).
- ArrayLists are not type-specific. They can store items of any type.

## Memory Allocation
- Arrays are allocated in contiguous memory locations.
- ArrayLists are allocated in heap memory, which can result in memory fragmentation and slower performance compared to arrays.

## Performance
- Arrays offer better performance in terms of access time and memory usage compared. Arrays have a fixed size and a direct memory layout, which allows for faster indexing and retrieval of items. 
- ArrayLists may require boxing and unboxing operations for value types, which can result in performance overhead.

## Type Safety
- Arrays are statically typed, meaning that they have a fixed type that is known at compile-time.
- ArrayLists are dynamically typed, allowing for items of any type to be added. This can result in runtime errors if the wrong type of item is accessed from an ArrayList.

## Flexibility
- Arrays have fixed sizes and require manual resizing and manipulation.
- ArrayLists offer more flexibility compared, as they can grow or shrink dynamically during runtime. ArrayLists also provide additional methods for inserting, removing, and manipulating items.

## Usage
- Arrays are commonly used when you need a fixed-size collection of items with a known type, and performance is a critical factor, such as when dealing with large datasets or performance-critical applications.
- ArrayLists are useful when you need a dynamic-sized collection that can grow or shrink during runtime and when you need to store items of different types.

In general, arrays are more efficient in terms of performance and memory usage, but they have fixed sizes and are statically typed. ArrayLists, on the other hand, offer more flexibility but may have performance overhead and potential type-safety issues.
The choice between Arrays and ArrayLists depends on the specific requirements of your application and the trade-offs between performance, flexibility, and type safety.
How to Effectively Debug Your Code
Published: 2023-04-10 08:38:08

Debugging is an essential skill for every programmer. No matter how carefully you write your code, bugs can and will inevitably find their way into your applications. In this article, we'll explore some tips and tricks for effectively debugging your code.

## Use a debugger
Debuggers are tools that allow you to execute your code line by line, set breakpoints, and inspect variables and objects at runtime. Most modern programming languages and IDEs come with built-in debuggers, and there are also third-party debuggers available for many popular languages. Using a debugger can be an incredibly powerful way to pinpoint the source of a bug in your code.

## Reproduce the bug
Before you can effectively debug a bug, you need to be able to reproduce it reliably. This means understanding the conditions under which the bug occurs and ensuring that you can trigger it consistently. Once you've identified the steps needed to reproduce the bug, you can use the debugger to step through your code and find the root cause of the problem.

## Write automated tests
Automated tests are an essential tool for any software development process, but they can also be incredibly helpful for debugging. When you encounter a bug, write a test case that reproduces the bug, then use the debugger to step through the code and find the root cause of the issue. Once you've fixed the bug, the test case can be added to your automated test suite to prevent the bug from recurring in the future.

## Use logging
Logging is another powerful debugging tool. By logging relevant information at strategic points in your code, you can get a better understanding of how your code is executing and identify areas where bugs may be occurring. Logging can be especially helpful for debugging issues that occur in production environments, where you may not have access to a debugger.

## Break the problem down
When debugging complex issues, it can be helpful to break the problem down into smaller, more manageable pieces. This can help you isolate the source of the bug and make it easier to fix. Start by identifying the inputs and outputs of the code in question, then work your way through the logic step by step to find the source of the problem.

## Conclusion
In conclusion, debugging is an essential skill for every programmer. By using a debugger, reproducing the bug, writing automated tests, using logging, and breaking the problem down, you can effectively debug your code and solve even the most complex issues. By using these tips and tricks, you can become a more efficient and effective developer, and produce higher-quality software.
How to deploy a NodeJS application using MRSK
Tags: kamal, node
Published: 2023-04-10 15:16:04

---
title: How to deploy a NodeJS application using MRSK
published: true
date: 2023-04-10 08:25:00 UTC
tags: kamal,mrsk,node
canonical_url: https://www.kartikey.dev/2023/04/10/how-to-deploy-a-nodejs-application-using-mrsk.html
---

[Kamal](https://kamal-deploy.org/), formerly known as MRSK, is created by DHH - founder of Rails, but the tool is not limited to deploy only Rails applications. Kamal is a simple tool that automates some Docker related commands. That is why it can support any platform/language. In this post, let’s see how to deploy a NodeJS application on a small DigitalOcean VPS using Kamal.

First of all, let’s generate an express app. I installed [`express-generator`](https://expressjs.com/en/starter/generator.html) and generated a new app using the `express express-app` command.

Then let’s create a Dockerfile:

```
FROM node:16

# Create app directory
WORKDIR /usr/src/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./

RUN npm install
# If you are building your code for production
# RUN npm ci --omit=dev

# Bundle app source
COPY . .

EXPOSE 3000
CMD ["node", "bin/www"]

```

Now, let’s use Kamal to generate the config files. Make sure you have Kamal installed on your machine. If not, you can [follow these instructions](https://kamal-deploy.org/docs/installation) on README.

Let’s init the configuration with `kamal init`. It will create `config/deploy.yml` and `.env` files in your root directory. My config file looks like this:

```
service: express-app

image: user/express-app
servers:
  - 146.190.86.77

registry:
  username: user
  password:
    - KAMAL_REGISTRY_PASSWORD

healthcheck:
  path: /
  port: 3000

```

The config file I have created here is minimal. It defines a service, provides the server IP, Docker Hub registry info and healthcheck information. After successful deploy, Kamal will ping the “/” path on port “3000” and will expect the “200 OK” response from the server.

Now, let’s deploy the app with the `kamal deploy` command. Kamal will deploy your app and you can check if it is live or not by entering the server IP address in the browser. If you want to connect your app with the database, or host multiple environment of the application like staging, production then you can check out my [previous posts](https://www.kartikey.dev/tag/mrsk/). They are platform agnostic and applicable on NodeJS apps as well.