teleren/devto huggingface dataset:
Running Kiwi mining pool and redis server as a beginner
Tags: aviadpineles, aviadpinelespaviad, node, redis
Published: 2023-04-11 08:18:12

Hi i am using kiwi token mining pool i have set redis on windows as the time pass while running pool with miners i was getting the error of redis that data is not presit in disk so i set the limit for maxmemory and use the maxmemory policy to delete the data after some time but policy require expiry on the keys but my data of pool is generated auto i cannot set the expiry on the  keys....as while i am using max_memory policy after some time pool does not respond to the miner....please suggest any solution...
React - Create a custom component from native HTML element with typescript
Tags: webdev, react, beginners, typescript
Published: 2023-04-11 08:00:00

Sometimes we need to **overload** some native HTML tags with our own component.

Let’s take a simple example.

You need to create a `Button` component but you want your `button` to have a custom style. You’ll probably write something like :

```typescript
interface ButtonProps {
	value: string;
}

const Button = (props: ButtonProps) => {
	return (
		<button className="myClass">{value}</button>
	)
}
```

This code is totally fine. However, what happens if you want to pass some native attributes to your `button` like the `onClick` method or the `type`? You’ll surely add props to your `interface` :

```typescript
interface ButtonProps {
	value: string;
	type: string;
	onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
}

const Button = (props: ButtonProps) => {
	const {value, onClick, type} = props;
	return (
		<button 
			onClick={onClick} 
			type={type} 
			className="primary">
				{value}
		</button>
	);
}
```

Well, our code is still ok. Now, we also want to pass our classes dynamically to our component:

```typescript
interface ButtonProps {
	value: string;
	type: string;
	onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
	className: string;
}

const Button = (props: ButtonProps) => {
	const {value, onClick, type, className} = props;
	return (
		<button 
			onClick={onClick}
			type={type}
			className={className}>
				{value}
		</button>
	);
}

const App = () => {
	return (
		<div>
			<Button 
				type="button"
				value="Submit"
				onClick={(e) => {console.log("Clicked!"}}
				className="primary"
			 />
		</div>
	);
}
```

Do you see the problem with this approach? Each time we’ll need to use a native property of our `button` tag, we will need to add a property to our interface to be able to overload it in our component.

Fortunately, we can change our interface to avoid these repetitions :

```typescript
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {}

export default function Button(props: ButtonProps) {
  return <button {...props}>{props.value}</button>;
}
```

In this way, you can pass all the previous `props` to your component without adding every attribute in your `interface` because it extends all the button tag native attributes :

```typescript
<Button
    value='Submit'
    type='button'
    onClick={(e) => {
      console.log("submitted!");
    }}
    className='primary'
/>
```

Furthermore, a big advantage of this approach is that you can overload the attribute in your component in order to have more control :

```typescript
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {}

export default function RadiusButton(props: ButtonProps) {
  // Here we overload the className and add our own class to the button
	return (
		<button {...props} className={`${props.className border-radius}`} >
			{props.value}
		</button>
	);
}
```

So next time you need to create a basic component with custom attributes, try to extend your component with native HTML Element attributes.
Azure Functions Tips: disable the home page for a function app
Tags: azurefunctions, azure, serverless
Published: 2023-04-11 08:00:00

When you create a Functions App in Azure, you choose its name and Azure provides you the URL of the home page for the app.

![The URL of your Function App in the Azure portal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/npzfk21h5thewj21mifk.png)

You have this URL even your Function App doesn't contain any Http Trigger Functions and if you try to navigate to that url, you can see the following page:

![The default welcome page for the Function App](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/evdm1gmz67zdzyrn1l2m.png)

If you want, you can disable the welcome page using the `AzureWebJobsDisableHomepage` setting in the function app configuration.
You disable the welcome page setting the Function App configuration as in the following picture:

![The disable welcome page configuration](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r219nd8n3m9qjy448f6g.png)

With this configuration, if someone tries to browse the previous url, he gets an HTTP Status code 204 (no content).
Understanding Docker in a visual way (in 🎥 video): part 16 – Stats
Tags: docker, devops, containers, beginners
Published: 2023-04-11 07:21:05

---
title: Understanding Docker in a visual way (in 🎥 video): part 16 – Stats
published: true
description: Serie of videos about Docker. Explaining in a visual way Docker principles.
tags: Docker, DevOps, containers, beginners
series: Understanding Docker in a visual way - in video
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uzpbpram2gy74c2bb2v3.png
---

Understanding Docker can be difficult or time-consuming. In order to spread knowledge about Cloud technologies I started to create sketchnotes about Docker, then I've auto-published a book and since now I've started a new serie of video! :-)

I imagined a serie of short videos with a mix of sketchnotes and speech.

I think it could be a good way, more visual, with audio & video to explain Docker (and others technologies).

The 16th episode is talking about how to operate containers.

{% youtube IKMedfrGVnE %}

The video is in French BUT I done the subtitles in english (and french too).

And the bonus of this article, here you can find all the sketchnotes and illustrations of the video:



You can find all the commands you can see in this video and sketchnotes in the following GitHub repository:

[![scraly GitHub](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ijdpc19o3w30eo6x3j1k.png)](https://github.com/scraly/understanding-docker-in-a-visual-way)

If you liked the video and are interested to watch another ones, please give me some feedbacks (and you can also subscribe to [my Youtube channel](https://www.youtube.com/c/AurelieVache), if you want to ❤️).

I can also give you, in an article, the full english transcript and sketchnotes in high quality, about this video, if you are interested.

If you are interested, I published all the sketchnotes (and more!) on Docker to make an illustrated book:
- Avilable on paperback on Amazon: ["Understanding Docker in a visual way"](https://www.amazon.fr/Understanding-Docker-visual-way-sketchnotes/dp/B0BT6ZXR1W/ref=sr_1_1)
- Available on PDF on GumRoad: ["Understanding Docker in a visual way"](https://aurelievache.gumroad.com/l/understanding-docker-visual-way).

If you like theses sketchnotes, you can follow me, I will publish others sketchs shortly :-).
Tech Industry Burnout: How Can We Prevent It?
Tags: discuss, beginners, codenewbie, mentalhealth
Published: 2023-04-11 07:00:00

Working in the tech industry can be rewarding, but it can also be stressful and intense. Long hours, tight deadlines, and high pressure can all contribute to burnout, which can lead to physical and mental exhaustion, decreased productivity, and even depression. 

Have you ever experienced burnout? How did you recognize it and what steps did you take to address it?

---

Follow the [CodeNewbie Org](https://dev.to/codenewbieteam) and [#codenewbie](https://dev.to/t/codenewbie) for more awesome discussions and online camaraderie!
Web3 Bounties: How to Participate and Get Involved in 2023
Tags: web3, blockchain, opensource, contributorswanted
Published: 2023-04-11 06:43:38

Web3 bounties are an essential growth and development lever for the web3 ecosystem, offering rewards to web3 developers and professionals for finding and fixing bugs, creating new applications, and contributing to open-source projects.

With the rise of web3 bounty platforms and networks like Kleoverse, it's becoming easier for web3 organizations and projects to provide opportunities for web3 professionals to find and participate in bounties.

By following bounty guidelines carefully and building your skills and reputation, you can earn rewards, establish yourself as a web3 professional, and support the web3 community.

### How to Participate in Web3 Bounties
If you're interested in participating in web3 bounties, there are several steps you can take to get started. Here are some tips on how to participate in web3 bounties:

### Find web3 bounties
There are several ways to find web3 bounties, such as using the Kleoverse bounty board among others, following social media accounts of web3 bounty platforms, and joining web3 community forums.

### Apply for web3 bounties
Once you find a web3 bounty that you're interested in, you'll need to apply for it. With Kleoverse, this typically involves creating your profile and portfolio, showcasing your skills with proof-of-talent, and applying to contribute to a bounty.

### Tips for getting started
If you're new to web3 bounties, it's essential to start with smaller, less complex bounties to build your skills and reputation. Additionally, it's crucial to read and understand the bounty guidelines carefully to avoid making mistakes that could lead to disqualification.

### Some common requirements and qualifications
Web3 bounty programs typically require specific qualifications and skills, such as experience with blockchain technology, smart contracts, coding in specific programming languages, Content marketing experience, etc. Make sure to read the requirements carefully and ensure you meet them before applying.

## Ready to prove your Talent?
Kleoverse was created for web3 developers and other professionals to find web3 jobs and bounties, and it includes everything a web3 organization or project needs to maximize its company's growth.

Kleoverse acts as a curation layer for web3 talents and web3 organizations to showcase their talents and hire web3 professionals respectively. Kleoverse also serves as a bounty platform where interested web3 professionals can find open bounties from their favourite web3 organizations.

Feel free to check the top web3 bounties at Kleoverse Talent Platform for Web3 Builders: https://kleoverse.com/
Top Mobile app development company in Kochi
Tags: mobileappdeveloper, mobile, development, webdev
Published: 2023-04-11 06:37:32

Kochi is a major port city in the southern Indian state of Kerala. The city is known for its booming IT industry and has become a hub for software development and mobile app development companies. If you're looking for a top mobile app development company in Kochi, here is one of the best options: iROID Technologies.

iROID Technologies is a leading [mobile app development company in Kochi](https://www.iroidtechnologies.com/) with a global presence, having worked with clients from over 100 countries. They have a team of experienced mobile app developers who specialize in building custom mobile applications for iOS and Android platforms, as well as cross-platform apps using React Native and Flutter. 

The company's development process is based on agile methodologies, which allows them to quickly adapt to changing requirements and ensure timely delivery of projects. They offer end-to-end app development services, including ideation, UI/UX design, development, testing, and deployment.

iROID has a proven track record of delivering high-quality mobile apps that are both user-friendly and scalable. Their portfolio includes a range of successful apps in various industries, including healthcare, finance, education, and e-commerce. They also provide post-launch support and maintenance services to ensure the app runs smoothly and stays up-to-date with the latest technologies.

Overall, iROID Technologies is a reliable and innovative [web development company in Kerala](https://www.iroidtechnologies.com/service/website-design-development) that can help turn your app idea into a reality.

Learn More visit their site : www.iroidtechnologies.com
openGauss Concepts
Tags: opengauss
Published: 2023-04-11 06:31:51

## Database
Databases manage various data objects and are isolated from each other. While creating a database, you can specify a tablespace. If you do not specify it, the object will be saved to the PG_DEFAULT tablespace by default. Objects managed by a database can be distributed to multiple tablespaces.

## Tablespace
In openGauss, a tablespace is a directory storing physical files of the databases the tablespace contains. Multiple tablespaces can coexist. Files are physically isolated using tablespaces and managed by a file system.

## Schema
openGauss schemas logically separate databases. All database objects are created under certain schemas. In openGauss, schemas and users are loosely bound. When you create a user, a schema with the same name as the user will be created automatically. You can also create a schema or specify another schema.

## User and Role
openGauss uses users and roles to control the access to databases. A role can be a database user or a group of database users, depending on role settings. In openGauss, the difference between roles and users is that a role does not have the LOGIN permission by default. In openGauss, one user can have only one role, but you can put a user's role under a parent role to grant multiple permissions to the user.

## Transaction
In openGauss, transactions are managed by multi-version concurrency control (MVCC) and two-phase locking (2PL). It enables smooth data reads and writes. openGauss stores them together with the version of the current tuple. A VACUUM thread is introduced to periodically clear historical version data. Unless in performance optimization, you do not need to pay attention to the VACUUM process. In addition, openGauss automatically commits transactions.
How to keep the socket connection open on a Browser Extension minimize (Chrome/ Firefox)
Published: 2023-04-11 06:03:00

I have a web application (containing telephony controls). I wanted to convert it to a browser extension. 

I have started writing a Chrome extension. I want to keep my extension running in the background (on a minimize).   

My extension consumes a third-party library (for telephony controls). This library maintains a socket connection.

When I load the extension for the first time it initializes the connection and things work as expected but when I minimize the extension and try to re-open it, it went to re-initialize the library again. This causes a significant delay because there will be a lot of minimize/ maximize requests. 

Is there any way to maintain the initialization/ state/ connection of my extension on minimize?

I have used `chrome.storage.local.set` to store the initialized version in local storage & `chrome.storage.local.get` to get the initialized flag. Used `chrome.runtime.onMessage` & `chrome.runtime.sendMessage` for communication between scripts.
Project 2 Final Post
Published: 2023-04-11 05:38:27

Hello!

I am excited to share with you the results of my recent project to recreate the badgesapp.psu.edu website with a search function. While the project did not go entirely as planned, I am proud of what I was able to accomplish and believe that others can benefit from my work.

First, I was able to create a semi functioning website that looks and behaves much like the original. Users can view different badges, however there is a small issue with the search function.

Like I said before, I did run into some difficulties when trying to implement the search function. While I was not able to complete this part of the project as I had hoped, I was still able to learn a great deal about how search functions work and what I need to do to improve my skills in this area.

For those who are interested in seeing my work, I have made my code available on GitHub https://github.com/ADeo123/dashboard. You can browse through the various files and see how I approached different parts of the project. I hope that this can be a helpful resource for others who are working on similar projects or who are interested in learning more about web development.

I have also created a running demo of the website, which you can access at https://dashboard-adeo123.vercel.app/. This will allow you to see the website in action and get a sense of how it looks and behaves. I encourage you to check it out and let me know what you think.

Overall, I am happy with what I was able to accomplish with this project, and I believe that it can be a helpful resource for others who are interested in web development. While I did encounter some challenges along the way, I learned a great deal from the experience and am excited to continue working on new projects in the future.
God bless ThinkPads
Tags: hardware, linux
Published: 2023-04-11 05:38:14

I recently found myself in a bit of a predicament. My beloved ThinkPad L440 was suffering from a serious issue - I accidentally injected 12V on the 5V rail of the left-hand side USB 3.0 port, causing the LCD backlight to immediately go out. After testing the LCD panel on another computer, it was clear that the issue was with the board itself. I was left wondering how I could trace the problem and replace the faulty component, and my frustration only grew as I began to suspect that a protection diode or an IC had been damaged.

It was clear that my trusty ThinkPad L440 was in need of some serious repairs, and I began to consider my options. While I could have spent the time and money to fix the broken component, I realized that it might be time to consider upgrading to a newer model. That's when I discovered the ThinkPad T460s, and I thus became a proud owner of the T460s.

The T460s offers all of the features that I loved about my L440, but with some serious upgrades, there's a little caveat though, less upgradability: while my older L440 allowed a CPU replacement, my new T460s has it soldered-in, same goes for RAM (I've got a 4GB soldered + 4GB SODIMM setup). The newer model boasts a sleeker design, longer battery life, and improved performance. Plus, as a Linux enthusiast, I knew that the T460s would be a perfect fit for my needs. Its hardware compatibility out-of-the-box with Linux makes ThinkPads just the great choice for all the penguin lovers and FOSS enthusiasts.

Of course, one of the biggest advantages of purchasing a second-hand ThinkPad is the price. I was able to get a great deal on a T460s in excellent condition, and I know that it will last me for years to come. And as someone who cares deeply about the environment, I appreciated the fact that I was making an eco-friendly choice by opting for a second-hand model rather than buying a brand new laptop.

You can get an used ThinkPad for VERY cheap on eBay or similar sites, but it all depends on the path you want to follow.

If you're into FOSS, you might wanna get a ThinkPad you can LibreBoot, like the X220 or T60 both of which range between $100-150 USD. If you want the newest features however you might want to consider something in the X1 Carbon lineup, or a X280 that ranges between $250-300 USD, in my case I'm somewhere in between those, so you might want to follow my steps and get either a T440p/L440 (both have same specs, but beware, the L440 CAN'T be installed with a FOSS firmware option like CoreBoot on the T440p) or a T460/T460s, both raging between $150-250 USD.

To finish this post, I want to finish with a cherry on top, and that is: it turned out the only issue with my older L440 was a shorted SMD fuse and a BIOS corruption, after reprogramming the BIOS and removing that fuse, my L440 continued working just fine! So really, God bless ThinkPads.
The Power of Automating Your Development Workflow
Tags: beginners, productivity, programming, cloud
Published: 2023-04-11 05:07:15

In today's fast-paced development environment, automation is becoming more and more important. By automating routine tasks, developers can save time, reduce errors, and increase efficiency.

Automating your development workflow can take many forms, from automating the build and deployment process to automating testing and code reviews. With the right tools and techniques, you can streamline your development process and make your team more productive.

Here are some ways to automate your development workflow:

- Use Continuous Integration (CI) tools: CI tools like Jenkins, Travis CI, and CircleCI can automate your build process, running tests, and deploying code to production.

- Adopt Infrastructure as Code (IAC): By treating infrastructure as code, you can automate the process of setting up and configuring servers and other resources.

- Implement Continuous Delivery (CD): CD tools like AWS CodePipeline, GitLab CI/CD, and Azure DevOps can automate the process of deploying code to production.

- Use Automated Testing Tools: Testing is an essential part of the development process, and automated testing tools like Selenium, JUnit, and Cucumber can save time and reduce errors.

- Implement Automated Code Reviews: Automated code review tools like CodeClimate, Codacy, and SonarQube can help you identify code quality issues and security vulnerabilities before they become a problem.

By automating your development workflow, you can focus on what matters most – delivering high-quality software. So, if you haven't already, start exploring the many tools and techniques available to automate your development process today!
Tips to build an audience and get engagement on Twitter:
Tags: chrom, extension, sideprojects, producthunt
Published: 2023-04-11 04:58:40

**1. Consistency is key** - tweet at least 3 times per day with informative content for your target audience.**
**2. Use GIFs to get more clicks and visibility.**
**3. Utilize groups and lists to stay up-to-date with other profiles that interest you.**

Also, check out a free Chrome Extension for managing relationships on Twitter - **_hummin_**. 

It helps identify potential friends and manage relationships with ease. Sign up for the launch notification on their page.
If you're interested, please let me know! 
Check out our landing page: hummin.io
or Find @enjoy_eom on Twitter
DBMind Mode-component
Tags: opengauss
Published: 2023-04-11 04:57:08

This subcommand can be used to start DBMind components, including the exporter for monitoring metrics and other AI functions. It forwards the commands passed by the user through the CLI client to the corresponding components. For details about the commands of different components, see the corresponding sections of the components.

**Command Reference**
You can use the –help option to obtain the help information about this mode. For example:

gs_dbmind component --help


usage:  component [-h] COMPONENT_NAME ...

positional arguments:
  COMPONENT_NAME  choice a component to start. ['extract_log', 'forecast', 'index_advisor', 'opengauss_exporter', 'reprocessing_exporter', 'slow_query_diagnosis', 'sqldiag', 'xtuner']
  ARGS            arguments for the component to start

optional arguments:
  -h, --help      show this help message and exit

Table 1 Parameters of the gs_dbmind component subcommand

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