teleren/devto huggingface dataset:
Reduce Bundle size with Chakra UI And NextJS
Tags: react
Published: 2023-05-22 06:37:56

Reduce Bundle size with Chakra UI

Hi, I was trying to reduce the bundle size of app built with chakra and nextjs. I tried to use three different ways to import the **ChakraProvider** will share with you the impact of each way on the bundle size from the largest to the best approach.  

1. Just import it like documented on the documentation guide. **import { ChakraProvider } from "@chakra-ui/react";**  


![result 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mnmn8rdmifatboq7mrqx.png)


1. Importing it from **import { ChakraProvider } from "@chakra-ui/provider";**  
 instead of **/react**  


![result2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k7qf64xogu2lx682manm.png)



1. Importing it using next/dynamic


```
import dynamic from "next/dynamic";
    const ChakraProvider = dynamic(() => import("@chakra-ui/provider").then(
        (mod) => mod.ChakraProvider)
    );
```


![result 3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r016ahd73eznt3mvc8sc.png)



  
 You can checkout the result images attached.
Choosing Between Server and Client Components in Next.js
Tags: nextjs, react, javascript
Published: 2023-05-22 06:27:45

In Next.js, deciding whether to use Server Components or Client Components can have a significant impact on your application's performance and functionality. In this blog post, we will explore the use cases for each component type and guide when to choose Server Components or Client Components.

## Understanding Server Components and Client Components
Server Components are the default choice in Next.js. They execute on the server, allowing you to fetch data, access backend resources directly, and keep sensitive information like access tokens and API keys secure.

On the other hand, Client Components are executed on the client-side, providing interactivity and leveraging browser-only APIs. They are useful for adding event listeners, managing state with hooks like useState() and useReducer().

### Choosing Between Server and Client Components

To simplify the decision-making process, let's consider the different use cases for Server Components and Client Components:

| Use case | Server Components | Client Components |
| --- | --- | --- |
| Fetch data. | ✅ | ❌ |
| Access backend resources (directly) | ✅ | ❌ |
| Keep sensitive information on the server (access tokens, API keys, etc) | ✅ | ❌ |
| Keep large dependencies on the server / Reduce client-side JavaScript | ✅ | ❌ |
| Add interactivity and event listeners (`onClick()`, `onChange()`, etc) | ❌ | ✅ |
| Use State and Lifecycle Effects (`useState()`, `useReducer()`, `useEffect()`, etc) | ❌ | ✅ |
| Use browser-only APIs | ❌ | ✅ |
| Use custom hooks that depend on state, effects, or browser-only APIs | ❌ | ✅ |
| Use React Class Components | ❌ | ✅ |

Note: The decision between Server Components and Client Components ultimately depends on the specific requirements of your application and the nature of the task at hand. Consider the strengths and limitations of each component type when making your architectural choices.
Practice meditation easily today with Mindentify
Tags: mindentify
Published: 2023-05-22 06:17:50

Best meditation tools to track your breath, mood, and stay focused. Join Mindentify to improve your well-being path, live healthier and reduce daily stress 
Website: https://mindentify.com/en/ 
https://twitter.com/mindentify1
 https://www.tumblr.com/mindentify 
https://gab.com/mindentify
https://www.youtube.com/@mindentify/about
https://500px.com/p/mindentify?view=photos
IP2Location.io IP Geolocation API in IP2Location WordPress Plugins
Tags: programming, coding, wordpress
Published: 2023-05-22 05:59:00

[IP2Location.io](https://www.ip2location.io/#devto) is an enhanced IP geolocation API lookup service that provides detailed information about the location of an IP address. Developers and businesses widely use this service for a variety of applications, including fraud detection, content personalization, targeted advertising, and more. It comes with different plans that provide varying levels of granularity for geolocation information. The great thing here is that it has a Free plan that allows you to query up to 30K IP addresses for free each month. Exploring more about the geolocation information supported for each plan, such as country, region, city, zip code, ISP, usage type, proxy data, and more at [IP2Location.io](https://www.ip2location.io/ip2location-documentation#devto).

We are excited to announce that this incredible feature is now available in [IP2Location Country Blocker](https://wordpress.com/plugins/ip2location-country-blocker) and [IP2Location Redirection](https://wordpress.org/plugins/ip2location-redirection/). IP2Location Country Blocker is a WordPress plugin that blocks unwanted visitors from accessing the frontend (blog pages) or backend (admin area) by countries or proxy servers. On the other hand, the IP2Location Redirection WordPress plugin redirects visitors to a blog page or a predefined URL based on their country and region geolocated using their IP address. This feature is now available in version 2.28.5 or later for IP2Location Country Blocker and version 1.26.6 or later for IP2Location Redirection.

## How to Use IP Geolocation API in IP2Location Plugins
To use the API Web Service in the plugin, you need to change the lookup mode to API Web Service in the plugin settings page. However, you need an IP2Location.io API Key to enable this feature. Get started with a [free API key](https://www.ip2location.io/pricing#devto).

The screenshot below shows an example of the plugin settings page after configuration.

![IP2Location WordPress plugin settings page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p6uzm91gt81zfxka5q5d.png)


## Conclusion
In conclusion, the integration of IP2Location.io IP Geolocation API in IP2Location WordPress plugins provides a great advantage to users who need to block unwanted visitors and redirect them to a specific page or URL based on their location. This integration is a significant improvement in the functionality of these plugins and is expected to benefit users in their website management and analysis. Most importantly, you do not need to regularly update the geolocation database. Our service takes care of that for you.
I Created a Microsoft Edge Extension to Hide Chat on Whatsapp
Tags: webdev, javascript, browser, productivity
Published: 2023-05-22 05:55:03

I recently created a Microsoft Edge extension called Hide Chat. This is a privacy-enhancing extension for Web Whatsapp that hides the recent chat section on web.whatsapp.com and shows it on hover. Please note that this extension is not affiliated with, endorsed by, or associated with Whatsapp in any way.

I was using a similar extension to Hide Chat for Whatsapp, but I later learned that it was tracking my data. I was concerned about my privacy, so I decided to create my own extension that would not track my data.

The Hide Chat extension is available for free on the [Microsoft Edge Add-ons store](https://microsoftedge.microsoft.com/addons/detail/hidechat/onnmdefpjmbiiciejfdjnhhejbdgkbaa). To install the extension, users can simply search for "Hide Chat" in the store and click on the "Add to Edge" button.

## Users

As of May 14, 2023, Hide Chat has 499 active weekly users.

### Weekly Users by Country

| Date | Ireland | Korea | United States |
|---|---|---|---|
| 2023-04-23 | 26 | 239 | 22 |
| 2023-04-30 | 62 | 308 | 39 |
| 2023-05-07 | 80 | 289 | 45 |
| 2023-05-14 | 89 | 365 | 45 |

Hide Chat has been downloaded by users in many countries. The extension is most popular in Ireland, Korea, and the United States.

I am grateful for the support of all of my users. I am excited to continue to develop Hide Chat and make it even more useful.
All About Postman Student Leader Program
Tags: postmanapi, postman, api, beginners
Published: 2023-05-22 05:44:57

### All About Postman Student Leader Program:

About the Program :

Pre-Requisites :- Need to Complete Postman Student Expert Certification to Apply Further for Postman Student Leader Program

Benefits-
Become a leader, educator and advocate for API literacy on your campus. As a Postman Student Leader, you will receive:

- Access to Postman resources to organize events on your campus
- Postman Student Leader Badge to showcase online and future employers
- Opportunities to speak and participate in Postman events
- Invitation to the online Postman Student Leader Program community 


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

Evaluation:- 
Evaluation will be done within 2-3 months of submiting the application form on basis of your answers and public speaking skills in video.
Now what?
Published: 2023-05-22 05:37:30

## A blank page.

At the moment I am in the same boat as lots of developers and looking for a job. To be honest, it is not going too well. There are a couple of factors as to why; being a bit too inexperienced, living in a foreign country without the language ability and the current job market. In a way I am really lucky, I can afford to not work because of my partner, however I always strived to be financially independent and it scares me to not be at the moment. 

The whole game is emotionally draining and I am tired. Sometimes I even think about quitting. But I know that I just need one person to give me a chance and then it will all be well. In the meantime I should continue to work on my Frontend skills.

## The game plan.

As I also want to write more and get into writing, I thought that writing about tech would be a great way to stay up to date. I am thinking of short and quick explanations about Frontend technologies I am interested in and that I use. A short post every other day. First here and maybe late on my own blog. Who knows? A commitment while I continue searching for new opportunities.
How to center a <div> every time!
Tags: webdev, css, beginners
Published: 2023-05-22 05:19:54

I'm sure we have all been there! Starting web development and you are tasked with placing an item in the center of the screen or box. Searching Stack Overflow and the internet will give you many valid ways to place this div in the center, but for me, these have been the easiest to use and remember.

Using the display property, we can break down the behavior of the elements within the body or container you are trying to center. When setting the display property, we want to put the CSS code inside the element that contains the div we are looking to center, not the div itself. In our recommended styles, we will use both the flex and grid displays, but they will both satisfy the need to center your div.

# Display Flex : 
```CSS
.wrapper{
  display: flex;
  justify-content: center;
  align-items: center;
}
```
The first way I center div's is using a flex display with the properties justify-content and align-items, both set to center. justify-content will handle the centering of the x-axis, while align-items will take care of the y-axis.


# Display Grid : 
```CSS
.wrapper{
  display: grid;
  place-items: center;
}
```
My other preferred way to center div's is using a grid display. This one is even easier to commit to memory as after you set display to grid, you just need to set place-items to center. This will both horizontally and vertically center your div inside the element.


### Thank you for Reading!
LIFE HOOD IN SETTLEMENT
Published: 2023-04-28 07:16:24

Good morning ,
This is the life of people live in settlement,
according to my settlement there is many tasks
and many values of person which are distinguished
to every one but some tasks become when there is 
bad leadership in his/her settlement
there are many tasks which are the following:

1.Servises:this point talks about system of the leader 
uses for leading who follows them ,but some of those
leaders are unfindable in his/her values for assist 
the settlement more of them are dictator.

2.Population:in population some people are hunger because 
there isn't any activities carried out for assist them 
for removing those hungry occur to some people.

3.Climate:this is the first in living to many lives of human living and animals but if there is bad climate the live it fall down because  can't find any satisfied food for attain 
well live hood'

now there is many opportunities for assist them for 
achieving to well live hood we can educate some leaders 
which are support your own settlement to assist it,
job creation it's first for removing those hungry 
curried in people because if there is present of job 
many person attend for getting money to help them
removing those hungry ,
saving is key used for removing poverty in society 
if the people get skills to roles of saving it assist
them to achieve his/her own goals and can prepare the
project for earning more incomes.
commitment to every one for living in good location without
any body hide in outside with others,
education for all without any one missed education 
in  settlement.
Thanks for reading!!!!!!
Create Basic Static website with AWS S3 and Terraform
Tags: terraform, aws
Published: 2023-05-22 04:58:37

variables.tf

```terraform
variable "bucketName" {
  type    = string
  default = "example-web-app-terraform"
}

```

provider.tf

```terraform
provider "aws" {
  region  = "ap-southeast-1"
  profile = "zeke"
}

```

main.tf

```terraform
resource "aws_s3_bucket" "example" {
  bucket = var.bucketName
}

resource "aws_s3_bucket_public_access_block" "example" {
  bucket                  = aws_s3_bucket.example.id
  block_public_acls       = false
  block_public_policy     = false
  ignore_public_acls      = false
  restrict_public_buckets = false
}

resource "aws_s3_bucket_policy" "example-policy" {
  bucket     = aws_s3_bucket.example.id
  policy     = templatefile("s3-policy.json", { bucket = var.bucketName })
  depends_on = [aws_s3_bucket_public_access_block.example]
}

resource "aws_s3_bucket_website_configuration" "example-config" {
  bucket = aws_s3_bucket.example.bucket
  index_document {
    suffix = "index.html"
  }
}

resource "aws_s3_object" "example-index" {
  bucket       = aws_s3_bucket.example.id
  key          = "index.html"
  source       = "./index.html"
  content_type = "text/html"
}

```
Revisiting box-sizing best practices
Tags: webdev, css, webcomponents
Published: 2023-05-22 04:50:13

We've all googled "best way to set `box-sizing: border-box;`" and come across this fun article from CSS Tricks about setting box sizing.

https://css-tricks.com/box-sizing/

If you haven't read it, let me spare you some time.

Here's the "recommended" approach due to increased flexibility.

https://css-tricks.com/box-sizing/#aa-universal-box-sizing-with-inheritance

```css
html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}
```

While this works if all of your elements are in the light DOM, tonight I discovered a fun bug plaguing my site.

If you have an element that is "slotted" into a custom element's shadow DOM, it will "inherit" the `box-sizing` of the slot element.

Example:

```html
<script type="module">
  class MyElement extends HTMLElement {
    connectedCallback () {
      this.attachShadow({ mode: "open" })

      // These slots are automatically 
      // "box-sizing: content-box;" 
      // so this default slot causes all its children to have
      // the same box-sizing properties...
      this.shadowRoot.innerHTML = `<slot></slot>`
    }
  }
  window.customElements.define("my-custom-element", MyElement)
</script>

<style>
  html {
    box-sizing: border-box;
  }

  *, *:after, *:before {
    box-sizing: inherit;
  }
</style>

<my-custom-element>
  <div>My box sizing is "content-box"</div>
</my-custom-element>

<div>My box sizing is "border-box"</div>
```

If you'd prefer, I also made a CodePen reproducing this issue.

https://codepen.io/paramagicdev/pen/abRPJjB?editors=1111

The "fix" is to use the "universal" box-sizing selector.

```css
*,*:after,*:before {
  box-sizing: border-box;
}
```

Now, I don't know if the inherited box-sizing is a bug, but it sure does feel like a bug. But, at least there is a workaround. I tested in Firefox, Chrome, Safari, and Edge and got the same result in all 4. Modifying the `box-sizing` of the parent slot element does indeed fix it like you would expect.
openGauss dolphin-keywords.
Tags: opengauss
Published: 2023-04-23 02:35:11

The SQL contains reserved and non-reserved words. Standards require that reserved keywords not be used as other identifiers. Non-reserved keywords have special meanings only in a specific environment and can be used as identifiers in other environments.

The naming rules for identifiers are as follows:

An identifier name can only contain letters, underscores, digits (0-9), and dollar signs ($).

An identifier name must start with a letter (a to z) or an underscore (_).

 NOTE:

The naming rules are recommended but not mandatory.

In special cases, double quotation marks (") can be used to avoid special character errors.

Compared with the original openGauss, Dolphin modifies keywords as follows:

MEDIUMINT is added as a non-reserved keyword.
The keyword DATE can be used as a function.
LAST_DAY is added as a reserved keyword to distinguish the original LAST_DAY function of openGauss from the LAST_DAY function of Dolphin at the syntax level.
GET_FORMAT is added as a non-reserved keyword to identify the GET_FORMAT function in syntax.
DAY_HOUR, DAY_MINUTE, DAY_SECOND, DAY_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, HOUR_MICROSECOND, MINUTE_SECOND, MINUTE_MICROSECOND, and SECOND_MICROSECOND are added as non-reserved keywords for the EXTRACT function to identify the corresponding unit in syntax.
Table 1 SQL keywords


Keyword

openGauss

SQL:1999

SQL-92

FORMAT

Non-reserved (excluding functions and types)

-

-

IF

Non-reserved (excluding functions and types)

-

-

KEYS

Non-reserved

-

-

MEDIUMINT

Non-reserved (excluding functions and types)

-

-

SIGNED

Non-reserved (excluding functions and types)

-

-

UNSIGNED

Non-reserved (excluding functions and types)

-

-

ZEROFILL

Non-reserved

-

-

DATE	Non-reserved (excluding functions and types)	-	-
LAST_DAY	Reserved	-	-
GET_FORMAT	Non-reserved (excluding functions and types)	-	-
DAY_HOUR	Non-reserved	-	-
DAY_MINUTE	Non-reserved	-	-
DAY_SECOND	Non-reserved	-	-
DAY_MICROSECOND	Non-reserved	-	-
HOUR_MINUTE	Non-reserved	-	-
HOUR_SECOND	Non-reserved	-	-
HOUR_MICROSECOND	Non-reserved	-	-
MINUTE_SECOND	Non-reserved	-	-
MINUTE_MICROSECOND	Non-reserved	-	-
SECOND_MICROSECOND	Non-reserved	-	-
Predicate functions and user defined functions in Apache age
Tags: apacheage, postgressql, database
Published: 2023-05-22 04:32:32

In this blog we will discuss some of the predicate functions and then user defined functions.

# Predicate functions
Predicates are boolean functions that return true or false for a given set of input. They are most commonly used to filter out subgraphs in the WHERE part of a query. 

Some of the predicate functions are explained below:

## Exists():
Exists here returns true if the specified property is existing in the graphs, node and relationships. 

### Syntax:
exists(property)

It returns an agtype boolean value.

### Query:

```
SELECT *
FROM cypher('graph_name', $$
     MATCH (n)
     WHERE exists(n.surname)
     RETURN n.first_name, n.last_name
$$) as (first_name agtype, last_name agtype);
```
## Exists(path):
Exists(path) returns true if a path already exists there. 

### Syntax:
Exists(path)

### Query:
```
SELECT *
FROM cypher('graph_name', $$
     MATCH (n)
     WHERE exists(n)-[]-(name: 'Willem Defoe')
     RETURN n.full_name
$$) as (full_name agtype);
```

# User Defined functions:
In apache age users can add their custom functions to age. When we use cypher function calls we use default namespace of age catalog. A function can be used outside the name space and this can be done by adding namespace before the function name. 

## Syntax:
namespace_name.function_name

## Query:
```
SELECT *
FROM cypher('graph_name', $$
RETURN pg_catalog.square(5)
$$ as (result agtype);
```

The above query will return square of the number 5.
FactWise is Hiring!!
Tags: javascript, react, python, career
Published: 2023-05-22 04:17:19

FactWise is a fully funded, early-stage b2b SaaS startup building solutions for a global client base. The flagship product is an end-to-end S2P solution designed to transform procurement for product manufacturing companies across industries. Our singular focus is to create a truly distinctive procurement platform that delights users and provides sustainable positive impact to the organizations we serve. We achieve this by providing transparency and insights to leaders, streamlining and automating processes to improve efficiency, and driving bottom-line impact by unlocking savings potential. 

FactWise received funding from a US-based VC, and we are currently deploying our MVP. With exciting sales conversations in advanced stages across Europe, US, India markets, we have strong relations with leading VC ﬁrms and an exciting journey ahead! 

 

Responsibilities 
 
Our tech stack is Python/Django and React with Typescript 

-As a member of the development group, you will be primarily responsible for the design, development, and maintenance of the product:  

-Help define and create full stack architecture and deployment using React- Django-AWS in an agile environment with lots of ownership and active mentoring; 

-Work with the Product and Design teams to build new features to solve business problems and fill business needs; 

-Participate in code reviews to create robust and maintainable code; 

-Work in an agile environment where quick iterations and good feedback are a way of life; 

-Interact with other stakeholders for requirement, design discussions and for adoption of new features; 

-Communicate and coordinate with our support and professional services teams to solve customer issues; 

-Help scale our platform as we expand our product across various markets and verticals globally. 

As a young, fresh startup, we are hoping to be joined by self-starting, hardworking, passionate individuals who are committed to delivering their best, who can grow into future leaders of FactWise. 

Recruitment process: Coding challenge and assignment, technical and non-technical rounds 

Compensation: Competitive to market; includes fixed, variable and ESOP components 

Contact details: labdhi@factwise.io 

We are excited to explore possibilities for how FactWise’s growth journey may align with yours!
EFK stack!
Published: 2023-05-22 04:13:20

Hello ALl,

Hello All, 
We are using EFK stack for log aggregation,for one of the index fluentd stops pushing logs to ES , after i have added the chunk size and increased the flush interval but same error is continues
failed to flush the buffer. retry_time=6 next_retry_seconds=2023-05-20 08:36:18 +0000 chunk="5fc1bceefb80e1d0b2c5a5d40fc9c619" error_class=Fluent::Plugin::ElasticsearchOutput::RecoverableRequestFailure error="could not push logs to Elasticsearch cluster ({:host=>\"10.90.42.244\", :port=>9200, :scheme=>\"http\"}): connect_write timeout reached".

Do anyone have any suggestion here !!
Nhà Hàng Hải Sản Ngon - Ơ Kìa, Nhà hàng hải sản đỉnh nhất Đà Nẵng
Published: 2023-05-22 04:07:53

Nhà Hàng Hải Sản Ngon - Ơ Kìa, Nhà hàng hải sản đỉnh nhất Đà Nẵng

Nhà Hàng Hải Sản Ngon - Ơ Kìa, là nhà hàng hải sản có không gian sang trọng thoáng mát, menu đồ ăn đa dạng, nhiều món ăn ngon hấp dẫn, 
Nhà hàng có live music diễn ra vào khung giờ 20:00 hằng tuần với những band nhạc chuyên nghiệp, âm thanh sống động & không gian sân vườn cực kì mát mẻ.

Địa chỉ: 7 Đ. Trần Phú, Thạch Thang, Hải Châu, Đà Nẵng
Phone: 0906430707
Email: nhahangokia@gmail.com
Tags: #Okia #diadiemanuong #amthucdannang #nhahanghaisanngon #nhahanghaisandanang #seafood #nhahanghaisan
Google Map: https://www.google.com/maps?cid=8430235641332136898
Google site: https://sites.google.com/view/nhahanghaisanokia