teleren/devto huggingface dataset:
Misconceptions About Closures
Tags: webdev, beginners, javascript, programming
Published: 2023-09-27 06:38:09

The two biggest (and unfortunately widespread) misconceptions about closures:

> ### A closure is a special type of function that has access to its surrounding scope ❌

This is entirely wrong for two reasons:
1. Closures are **not** functions
2. **ALL** functions have access to their surrounding scope*

> ### To create a closure, you need to nest functions ❌

Again, entirely wrong - nesting of functions is irrelevant! Whenever a function is created, an associated closure is also created.

---

## So, what is a closure? 

From [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures):
> **A closure is the combination of a function bundled together (enclosed) with references to its surrounding state**

The closure allows the function to access the state in which it was created.

As a simplified visual:
![Closure](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sv20cf943j31pm5qt2tp.png)

*Except for functions created with `new Function(...)` which form closures with the global scope
Cracking the LeetCode 880. Decoded String at Index (Medium)
Tags: 100dayschallengeleet, c, javascript, leetcode
Published: 2023-09-27 06:56:22

---
title: Cracking the LeetCode 880. Decoded String at Index (Medium)
published: true
date: 2023-09-27 06:35:31 UTC
tags: 100DaysChallengeLeet,C,JavaScript,leetcode
canonical_url: https://www.nileshblog.tech/leetcode-880-decoded-string-at-index/
---

LeetCode 880. Decoded String at Index: Hey there, coding enthusiasts! Welcome back to another exciting coding session. Today’s problem is a treat—literally! We’re going to solve the “Decoded String at Index” or “LeetCode 880.” Approach: Reverse LeetCode 880. Decoded String at Index Leet code 880, “Decoded String at ... [Read more](https://www.nileshblog.tech/leetcode-880-decoded-string-at-index/ "LeetCode 880. Decoded String at Index (Medium)")

The post [LeetCode 880. Decoded String at Index (Medium)](https://www.nileshblog.tech/leetcode-880-decoded-string-at-index/) appeared first on NileshBlog.Tech
Dalia Coasters - Black and White
Tags: coasters, kitchen, home, decor
Published: 2023-09-27 06:12:00

Dalia Coasters - Black and White

100% hand-embroidered and handcrafted in Palestine. Our tatreez coasters are a beautiful way to share a piece of Palestinian culture in your home. Details Each piece measures 3.75" x 3.75". Handmade with vegan leather. Hand embroidered by refugee and low-income women artisans with a traditional Palestinian tatreez desi

[Dalia Coasters - Black and White](https://www.darzah.org/collections/kitchen/products/black-and-white-tatreez-coasters)

https://www.darzah.org/collections/kitchen/products/black-and-white-tatreez-coasters

Handcrafting dreams
True aspirations cannot be stopped by limitations. By creating these 100% handmade Tatreez items, over 30 ambitious women of the West Bank have found a way to handcraft their dreams with Darzah.

Each purchase is a gift…

Darzah is a project of Child's Cup Full, a non-profit enterprise. 80% of every dollar you spend goes directly to funding long-term job opportunities for women in Palestine.
Your help goes a long way

Your non-profit contributions play a huge role in bringing a positive change to the lives of our women artisans and their families in Palestine. Donations are Zakat eligible and endorsed by Al-Sheikh Ebad Al-Hamid Atah Bethlehem, Palestine. All donations are tax-deductible.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qamxe2i0ybo3lamndkvf.jpg)
7PLAY - SÂN CHƠI FAIR PLAY
Tags: 7play, 7p, 7playclub, 7pclub
Published: 2023-09-27 06:08:12

7Play là cổng game đổi thưởng xanh chín và uy tín hàng đầu hiện nay. 7Play tự hào mang đến nhiều trò chơi chất lượng cao, đa dạng và không kém phần hấp dẫn như: slot, nổ hũ, tài xỉu, xóc đĩa, bắn cá, baccarat... và đang không ngừng cải tiến sản phẩm, nâng cao bảo mật, đảm bảo người dùng nhận được chất lượng và dịch vụ tốt nhất. Đội ngũ chăm sóc khách hàng chuyên nghiệp hỗ trợ 24/7. Thỏa sức chơi game, rút ​​tiền cực nhanh - Chỉ có tại 7play! #7play, #7p, #7playclub, #7pclub
How to book the Best Car Rental in Chennai?
Tags: carrental, vanrent, busrental, topcarrental
Published: 2023-09-27 05:56:41


To secure the [best car rental in Chennai](https://www.chennaitravels.com.in/car-rental-in-chennai), start by conducting thorough research on rental companies available in the area. There are many popular car rental companies in chennai such as Chennai Travels, Zoomcar, and Skyscanner.

Carefully consider your requirements, such as the type of vehicle, passenger capacity, luggage space, and any special features like automatic transmission or GPS navigation. Booking in advance is advisable, especially during peak travel seasons, as it increases the likelihood of securing your desired vehicle at a competitive rate.

While booking, review the terms and conditions of the rental agreement, paying attention to mileage limits, fuel policies, insurance coverage, and any additional fees that might apply. Always inspect the vehicle for pre-existing damage upon pickup and document any issues to prevent disputes later. By following these steps, you can ensure a successful car rental experience in Chennai that meets your needs and budget.
Online Learning Redefined by Hrishi Online Buddhi
Tags: onlinecourse, digitalskills, detingcourse, learndigitalmarketing
Published: 2023-09-27 05:49:13

Experience a new era of online learning with Hrishi Online Buddhi. Elevate your skills and knowledge with our innovative courses.
       visit my websites
https://www.hrishionlinebuddhi.com/
Front end Development Frameworks
Tags: frontend, react, beginners, webdev
Published: 2023-09-27 05:44:12

Now, building websites usually involves a bunch of repetitive tasks. This is where front-end frameworks and libraries come in. 

A framework or a library comes with a lot of code that we can reuse in our websites. So, they help us get the job done faster. That is why a lot of companies these days use one of these popular libraries or frameworks like React, Angular, or Vue.

React is is technically a library, while Vue and Angular are frameworks. It is a library. But, subtle distinctions aside, all these tools serve the same purpose: they help us build applications faster.

Now, you don't need to learn all of these to get started. Different companies use different tools for different projects. 

So, as you move from one project to another, you may want to learn about the other tools. If you are starting out, just focus on React because it is the most popular tool in this space.

![Graph showing all the other tools to learn, that is, HTML and CSS, JavaScript, React and Git](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/60f3t73gyusa6n9btdiw.png 'Graph showing all the other tools to learn, that is, HTML and CSS, JavaScript, React and Git')

Once you learn React, you can always learn the other tools if needed. 

To learn the basics of React, you will probably need a couple months.

I hope you received excellent value in today's article. If you would like to go deeper, head over to [My Newsletter](karlgusta.substack.com), where you can find more great contents that will help you in your productivity, your impact and the quality of your life. I wish you an amazing day.
Dart #1 Variabel
Tags: dart, indonesia, bahasa, tipedata
Published: 2023-09-27 05:16:10

**Variabel pada dart**

Variabel adalah wadah/tempat yang digunakan untuk menyimpan nilai dalam program. Dalam bahasa pemerograman dart terdapat beberapa jenis variabel diantaranya ada:

```
// disini ada variabel menyimpan nilai john.
var name = "John";
```

**Tipe variabel **
Biasanya disebut tipe data. 

- **String:** Untuk menyimpan nilai teks. Contoh “John” harus dalam tanda petik
- **Int:** Untuk menyimpan nilai integer. Contoh 10, -10, 8555 
- **Double:** Untuk menyimpan nilai floating point. Contoh 10.0, -10. 2, 85.693
- **Num:** Untuk menyimpan semua jenis nomor. Contoh 10, 20.2, -20
- **Bool:** Untuk menyimpan nilai salah dan benar. Hanya menyimpan dua nilai True dan False
- **Var:** Untuk menyimpan semua nilai. Contoh ‘Bimal’, 12, ‘z’, true

Contoh sintaks:

```
type variableName = value;
```

Contoh kode:

```
void main() {
  String nama = "Al faruq";
  int umur = 23;
  double ipk = 3.8;
  num nomorhape = 62817903122;
  bool menikah = false;
  var jurusan = "informatika";
  var tahun = 2023;

  print("$nama");
  print("Umur $nama adalah $umur tahun");
  print("IPK $nama dalah $ipk");
  print("Nomor hape $nama adalah $nomorhape");
  print("Apakah $nama sudah menikah? $menikah");
  print("$nama $jurusan lulus tahun $tahun");
}
```
Error on Inputmask Tag in React.js
Published: 2023-09-27 05:15:08

Hi, I am using Inputmask Tag in react.js but on page load , it show the following error. there is any other alternate for Inputmask.
<div>
                <InputMask mask="9999999" placeholder="XXXXXXX" maskChar={null}>
               
                  {(inputProps) => <Input {...inputProps} />}
                    </InputMask></div>

react-dom.development.js:86  Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of InputElement which is inside StrictMode. Instead, add a ref directly to the element you want to reference.
Analytics
Tags: webdev
Published: 2023-09-27 05:14:53

Next.js Speed Insights allows you to analyze and measure the performance of pages using different metrics.

You can start collecting your Real Experience Score with zero-configuration on Vercel deployments.

The rest of this documentation describes the built-in relayer Next.js Speed Insights uses.

This function is fired when the final values for any of the metrics have finished calculating on the page. You can use to log any of the results to the console or send to a particular endpoint.

The metric object returned to the function consists of a number of properties:

- id: Unique identifier for the metric in the context of the current page load
- name: Metric name
- startTime: First recorded timestamp of the performance entry in milliseconds (if applicable)
- value: Value, or duration in milliseconds, of the performance entry
- label: Type of metric (web-vital or custom)

There are two types of metrics that are tracked:

- Web Vitals
- Custom metrics
Permission denied to push into remote repo!
Tags: github, git, vscode
Published: 2023-09-27 05:14:36

Here I can't able to push my file into GitHub. I shows error 
`The requested URL returned error: 403` and permission denied in terminal(Attached Image below).

```
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git add src/.   
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git add public/.  
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git commit -m "second Commit" 
On branch main
nothing to commit, working tree clean
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git branch -M main
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git remote add origin https://github.com/kungumasakthivel/Dumy.git
error: remote origin already exists.
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git remote remove orgin
error: No such remote: 'orgin'
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git remote remove orgine
error: No such remote: 'orgine'
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git remote remove origin
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git remote add origin https://github.com/kungumasakthivel/Dumy.git
PS C:\Users\LENOVO\Desktop\ReactJS\portfolio> git push -u origin main
remote: Permission to kungumasakthivel/Dumy.git denied to Agil1102.
fatal: unable to access 'https://github.com/kungumasakthivel/Dumy.git/': The requested URL returned error: 403
```

![github push error in terminal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6agclhx92ysoqis7ht13.png)

__
Font Optimization
Tags: webdev
Published: 2023-09-27 05:12:19

### Google Fonts

Automatically self-host any Google Font. Fonts are included in the deployment and served from the same domain as your deployment. No requests are sent to Google by the browser.

Get started by importing the font you would like to use from next/font/google as a function. We recommend using variable fonts for the best performance and flexibility.

To use the font in all your pages, add it to _app.js file under /pages as shown below:

Apply the font in <head>
You can also use the font without a wrapper and className by injecting it inside the <head> as follows:

```
import { Inter } from 'next/font/google'
 
const inter = Inter({ subsets: ['latin'] })
 
export default function MyApp({ Component, pageProps }) {
  return (
    <>
      <style jsx global>{`
        html {
          font-family: ${inter.style.fontFamily};
        }
      `}</style>
      <Component {...pageProps} />
    </>
  )
}
```
Image Optimization in Next js
Tags: nextjs
Published: 2023-09-27 05:09:10

According to Web Almanac, images account for a huge portion of the typical website’s page weight and can have a sizable impact on your website's LCP performance.

The Next.js Image component extends the HTML `<img>` element with features for automatic image optimization:

- **Size Optimization:** Automatically serve correctly sized images for each device, using modern image formats like WebP and AVIF.
- **Visual Stability:** Prevent layout shift automatically when images are loading.
- **Faster Page Loads:** Images are only loaded when they enter the viewport using native browser lazy loading, with optional blur-up placeholders.
- **Asset Flexibility:** On-demand image resizing, even for images stored on remote servers

### Local Images

To use a local image, import your .jpg, .png, or .webp image files.

Next.js will automatically determine the width and height of your image based on the imported file. These values are used to prevent Cumulative Layout Shift while your image is loading.

### Remote Images

To use a remote image, the src property should be a URL string.

Since Next.js does not have access to remote files during the build process, you'll need to provide the width, height and optional blurDataURL props manually.

The width and height attributes are used to infer the correct aspect ratio of image and avoid layout shift from the image loading in. The width and height do not determine the rendered size of the image file. Learn more about Image Sizing.

### Domains

Sometimes you may want to optimize a remote image, but still use the built-in Next.js Image Optimization API. To do this, leave the loader at its default setting and enter an absolute URL for the Image src prop.

To protect your application from malicious users, you must define a list of remote hostnames you intend to use with the next/image component.
Python Training In Pune
Published: 2023-09-27 04:55:13

This Python informational class covers the essentials of Python and how to apply it to true applications. The modules, example end activities, and tasks containing the educational plan cover information activities in Python, strings, contingent proclamations, mistake dealing with, shell prearranging, web scratching and the regularly utilized Python web system Django.
If you need more information about Python then you can Full information about **[Python Training in Pune](https://www.3ritechnologies.com/course/python-programming-training-in-pune/)**
Bio Link
Published: 2023-09-27 04:08:19

Profesional dengan Teknologi HTML, CSS, dan JavaScript.

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

Source : [](https://github.com/dupandesdata/dupancode/tree/main/project/biolink)
DO YOU NEED A FREELANCER FOR YOUR BLOCKCHAIN PROJECT
Published: 2023-09-27 03:55:03

 Are you looking to navigate the exciting world of cryptocurrencies and exchange websites? Look no further! As a seasoned expert in crypto and exchange platforms, I'm here to provide you with top-notch guidance and solutions. What I offer: Crypto Consultation Exchange Website 🔒 Security Audits💡 Blockchain Integration💬 24/7 Support. Join numerous satisfied clients who have benefited from my expertise in the crypto and exchange industry. Let's embark on this journey together and unlock the full potential of cryptocurrencies! Contact me now on www.fiverr.com/rasbak_stars to discuss your project
Branching Out: Introducing New Features and Smarter Error Handling
Published: 2023-09-27 03:53:00

Hey everyone!

I'm super excited to chat with you about a few cool updates I made to a project that turns text and md files into html. We are talking about adding some language options and making it smarter in dealing with errors. So, let’s jump in!

##Speaking in Tongues - Language Options
First up, I made the tool a bit of a language whiz! Now, with a simple command, it can understand and use different languages like French and Portuguese. If you don’t choose a language, it will just use Canadian English. Pretty cool, right?
Example:
```
--lang fr or -l pt-BR
```

Smoothing Out the Wrinkles - Better Error Handling
After my tool learned a few more languages, it was time to make it smarter. This meant teaching it what to do when it runs into problems – kind of like learning when to stop and ask for directions!

What I Picked Up Along the Way
Adding these new features and figuring out how to handle errors better was a real adventure. It was all about fitting new pieces into the puzzle and enjoying those lightbulb moments when everything clicked!

Curious to see how it all works? Feel free to check out [the project](https://github.com/mnajibi/tml) and see the magic happen!

Happy exploring, and here's to more coding adventures!
🚀 API Maker - Count, Distinct & Distinct with query
Published: 2023-09-27 03:38:02

## Count
👉 Get count of rows in database which satisfy our query.

✅ List of Feature
⚡️ Body payload structure is same for all database.
⚡️ Find join feature supported in count API.
⚡️ User applied condition in count API.
⚡️ Number of operator support.

⭐ Supported Operator ⭐
-----------------------
⚡️ $in
⚡️ $nin
⚡️ $and
⚡️ $or
⚡️ $eq
⚡️ $ne
⚡️ $gt
⚡️ $gte
⚡️ $lt
⚡️ $lte
⚡️ $like

---------------------------------

## Distinct [GET API]
👉 Get distinct data from the table for a given field on ascending or descending order.

⭐ Params ⭐
👉 field ▸ Retrieve the fields based on the user's needs.
👉 order ▸ Sort data in ascending or descending order.

⭐ Query Params ⭐
👉 find ▸ User can retrieve data using find object value.

✅ List of Feature
⚡️ Body payload structure is same for all database.
⚡️ Find object supported in distinct API.
⚡️ N number of combinations should be supported in distinct.

⭐ Supported Operator ⭐
-----------------------
⚡️ $in
⚡️ $nin
⚡️ $and
⚡️ $or
⚡️ $eq
⚡️ $ne
⚡️ $ne
⚡️ $gt
⚡️ $gte
⚡️ $lt
⚡️ $lte
⚡️ $like

---------------------------------

## Distinct with query [POST API]
👉 Get distinct data from the table for a given field on ascending or descending order.

⭐ Params ⭐
👉 field ▸ Retrieve the fields based on the user's needs.
👉 order ▸ Sort data in ascending or descending order.

⭐ Body ⭐
👉 User can retrieve data using find object value.

✅ List of Feature
⚡️ Body payload structure is same for all database.
⚡️ Find object supported in distinct API.
⚡️ N number of combinations should be supported in distinct.

⭐ Supported Operator ⭐
-----------------------
⚡️ $in
⚡️ $nin
⚡️ $and
⚡️ $or
⚡️ $eq
⚡️ $ne
⚡️ $ne
⚡️ $gt
⚡️ $gte
⚡️ $lt
⚡️ $lte
⚡️ $like


---------------------------------


## Youtube video link
https://youtu.be/OWCEHr_KWQc


## Websites
https://apimaker.dev


## API Docs link
https://docs.apimaker.dev/v1/docs/apis-all/generated-apis/auto-generated-count-api.html
https://docs.apimaker.dev/v1/docs/apis-all/generated-apis/auto-generated-distinct-api.html
https://docs.apimaker.dev/v1/docs/apis-all/generated-apis/auto-generated-distinct-with-query-api.html

## Follow on twitter
https://twitter.com/api_maker


## Linked In
https://www.linkedin.com/company/api-maker

## More YouTube Videos
https://www.youtube.com/@api_maker/playlists
Three ways to keep track & save with AWS Free Tier !!
Tags: aws, ec2, cost, optimization
Published: 2023-09-27 03:32:13


Welcome to another way of tracking or utilizing your savings options. It is none other than AWS Free Tier services. Right utilization of services under Free tier gives us chances of savings, a true place to look out for savings

Most of the services falls under AWS Free Tier and if the business case supports & if the account has been created/new, then it is a wise way to utilize all services falling under Free Tier( for the first 12 months)

As saying is lot easier than being done, teams go ahead & use the services but how do you keep track of the services usage or free tier limit, as charges will apply post the time range. So, there are three key ways to keep track of services under free tier and use them to the best of it. Below are those


_**Option 1 - Create Free Tier Alerts**_


i) Get notified for "AWS Free Tier Usage Alerts" by opting in for email notifications
ii) This setting has to be done from the "AWS Billing -> Billing Preferences page"


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



_**Option 2 - Using AWS Free Tier Tracker View**_

i) Another option to track the total Free Tier Services all in one single view is to access view from "Free Tier" menu from AWS Billing menu
ii) Month to Date usage & Month to Date Forecast along with total free count/requests against current utilization is reported
iii) Quite useful to know the actual usage and left overs, so that we can plan workloads & services accordingly


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


_**Option 3 - Creating a ZeroSpend Budget**_

Finally, we can create an "AWS Budget" of type "ZeroSpend" which means you will be alerted to the given email ids, on bill reaching > $0.01 which actually is above the AWS Free Tier limits. Hence usage/utilization above $0.01 is reported in this budget alert category, thus notifying that some service is being used up or other words, account has crossed free tier limits


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



i) Further below is the configuration part; a name for "ZeroSpend" budget 
ii) Email id(s) to which the notification to be sent, in case of exceeding the free tier limit
iii) Now, create the budget and only look out for alert email to action, rather checking bills or services status' daily


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


Happy Savings !!