teleren/devto huggingface dataset:
The Regex basics
Tags: javascript, programming
Published: 2023-02-18 07:59:26

> The fast notes about how to use Regular Expressions in Javascript:

##Define JS regex:
* `var reg = new regex(“is”);`
* `var reg = \is\`

#####Define as global(all string) `g`, case-insensitive `i`

##String + Regex fn: 
* test()		// true or false.
* exec()	// {token, index, string}
* replace()	// 2 params (regex, replacement text)
* match()	// true or false.
* search()	// index of first one

#####Define a char `.` ex: `.at` match word with any chart and `at` ex: cat.

#####Define special chart set before \ stop char: `/.`  == . and \/\/ == \\

##Repetition: 
* `a{num}`		// a{3} === aaa.
* `{num1, num2}`	// at least n1 at most n2 ex: a{3,4} === aaaa.
* `{num1, }` 	 	// at least n1 to ∞.
* `?` == {0,1}		// One or Empty ex: \https?\ == http || https.
* `+` == {1,}		// One or more times ex: .+ == at least char.
* `*` == {0, }		// Zero or more times

##Group chars:
* `[a-z]` any chars from small a to z. Concat chars ex: [A-Z] or [0-9].
* `[^bc]` nagative not include b or c chars.
* `\w` == [a-zA-Z0-9] 		// Alpha chars: chars or digits
* `\W` == nagitve w			// non chars not digits ex: ? #space
* `\d` 	   \D				digits
* `\s` 	   \S				Space char ex: [\s-] = space pr dash

##Capture Group:
* `(ar|at)` 	// car cat
* (d{3})? 		// optional  group of 3 digits or not ex: 982
* `(?=bar|boo)`	// lookahead get word after, but not include
* `(?!bar|boo)`		// negative that word that not followed with …

##Word Boundaries:
* `\b` 	// Word start or end of chars ex: \bis = is island , is\b = this
* `\B` 	// Not start but exist in word of ex: \Bis == this
* `\bis\b` 	// standalone a word ex: is 
* `\Bis\B`	// in middle of word ex: history
* `\1`		// become one group ex: (the)\s?\1 == the the
* `(?=\1)`	// Only first lookahead ex: (the)\s?\ (?=\1) = the

##Start and end of line:
* `^12`	// start of line of 12
* `\\gm` 	// support multi-lines.
* `16$`	//At the end of line 16
One App 5 Frameworks - Chapter 3: Angular
Tags: angular, webdev, javascript, beginners
Published: 2023-02-18 07:53:25

Angular is a full-featured framework developed by Google. It's powerful and feature-rich, making it a good choice for large-scale applications.



## Learning Curve

Angular has a very steep learning curve. You can get started with your application in the initial few hours/days, but it takes months / years to learn to do things the 'Angular' way. It's inbuilt support for RxJS just adds to this learning curve. However, when mastered, these tools bring in a plethora of customizations you will find useful for all possible scenarios that you might encounter in an application.



## Community

Angular, being backed by Google has one of the best communities in the framework industry. They have a team of dev-rel engineers who constantly interact with the community collecting feedback from the people who use their product.

They also have an annual developer survey to gather the insights and recommendations from the users of the framework, top recommendations from the survey directly translate to features in upcoming releases.



## Developer Experience

Angular has a more complex syntax and a strict structure when compared to lightweight libraries like React and Vue, but it comes with a lot of built-in features that can save time and effort.

Also all the Angular applications follow a very similar structure making it easy for any angular developer to get used to a new project.

The built in libraries for Routing, HTTP requests make it a very easy experience for developing large scale applications. With the release of the new stand-alone components, smaller applications can also be built pretty quick with angular.

I used NGRX for state management, and while it also had a learning curve when compared to redux, it got the job done.


## Conclusion

Angular will be my recommendation if you want to build a very large application at enterprise standards. The rich feature set of angular made sure that this is achievable.

While it also scales well with smaller application due to the recent changes around the introduction of stand-alone components, there are multiple other frameworks that achieve the same in less effort.


## Application

You can find the application [here](https://github-repo-finder-angular.netlify.app/)
dti content script.js causing problem in few JSP pages
Published: 2023-02-18 07:43:16

dti content script.js causing problem  in few JSP pages.

Browser Console Error: 
    Uncaught (in promise) unknow action   dti_content_script.js
    Uncaught (in promise) unknow action   walkme_loading_content_script.js

Using jquery-1.7.2.min.js
Using Okta min.js   https://global.oktacdn.com/okta-auth-js/4.5.0/okta-auth-js.min.js
Please let me know if you have any idea
SonoFit - Ear Reviews, Price, Benefits, Results And Where to Buy?
Tags: webdev, javascript, beginners, programming
Published: 2023-02-18 07:27:23

[SonoFit](url) Hair Ingerdients loss, an extremely more myth than science. It's hard to study, since there's not a reliable method for measuring hair thickness. But foods that are good with the skin will also good to ones hair. For instance, a diet program rich in omega-3 fats and minerals, including zinc and silica is advised for hairdressing as well as natual skin care.
[](https://www.outlookindia.com/outlook-spotlight/sonofit-drops-reviews-hearing-support-active-ingredients-and-hidden-truth-you-must-know-it-news-263013)
https://www.crunchbase.com/event/sonofit-d3eb
https://www.crunchbase.com/organization/sonofit
https://medium.com/@fit_sono/sonofit-price-results-side-effects-uses-customer-reviews-1e2bda5b48f5
https://techplanet.today/post/sonofit-ear-reviews-price-benefits-results-and-where-to-buy
Build a project on Windows 11 using MinGW
Tags: cmake, mingw, crossplatform, windows11
Published: 2023-02-18 06:57:04

Assuming that the CMakeLists.txt is located in the root folder of the project, follow these steps:

+ 1. Create a build folder:

`mkdir build
`

+ 2. Change to the build folder:

`cd build
`

+ 3. Use MinGW to generate the Makefile

`cmake -G "MinGW Makefiles" ..
`
(The ".." at the end of the cmake command tellls it to look for the CMakeLists.txt file in the parent directory)

+4. Compile the project using mingw32-make:

`mingw32-make
`
**Reference:**
[1]https://cmake.org/cmake/help/v3.12/generator/MinGW%20Makefiles.html
This week’s newsletter is out! (18-02-2023) - Emotionally Damaged Humans Club
Tags: javascript, tech, webdev
Published: 2023-02-18 06:38:03

---
title: This week’s newsletter is out! (18-02-2023) - Emotionally Damaged Humans Club
published: true
description: Another week of great javascript, tech and web development links.
tags: javascript, tech, webdev, discuss
---

Emotionally Damaged Humans Club

https://markjgsmith.substack.com/p/mark-smiths-newsletter-18-02-2023

Would love to hear any comments and feedback you have.

[@markjgsmith](https://twitter.com/markjgsmith)
Handling Imbalanced Data in Machine Learning
Tags: python, machinelearning, programming, beginners
Published: 2023-02-18 06:34:48

Hello Everyone,

If you are a beginner in the field of Machine learning and Data Science, you must be dealing with the steps involved in the phase of preprocessing of data. One of such steps is "Handling Imbalanced Data"

I have covered this topic in minute detail in my blog, which you can find here: [Blog Link](https://pinakdatta.hashnode.dev/handling-imbalanced-data-in-machine-learning)


It covers all the details that you need to know as a beginner about "Imbalanced data" and kick off with some good projects.

Hope this helps!
Formatter for Jupyter notebooks
Tags: python, jupyter, formatter, programming
Published: 2023-02-18 06:14:56

# Introduction

If you are into Data Science or Machine Learning, you have probably come across jupyter notebooks (.ipynb files). The problem I faced when using jupyter notebooks was that the black formatter didn't work on them. I had tried using the 

```
$ black notebook.ipynb
```

command many times. This article is meant to help with code formatting in Python Notebooks.

___

# nbQA

So, we will be using a python library called nbQA along with code formatters like Black and isort.

## Installation

Install the library using:

```
$ pip install nbqa
```

## Usage

You can use various formatters along with nqba and I will demonstrate how to use a few of them. before trying the formatters, make sure you have installed them already.

### black

Format the notebook using black as shown below:
```
$ nbqa black notebook.ipynb
reformatted notebook.ipynb
All done! ✨ 🍰 ✨
1 files reformatted.
```

### isort

Similarly, format the notebook using isort:
```
$ nbqa isort notebook.ipynb
Fixing notebook.ipynb
```

### yapf
```
$ nbqa yapf --in-place notebook.ipynb
```

### autopep8
```
$ nbqa autopep8 -i notebook.ipynb
```

### mdformat

To format the markdown cells in your notebook, use:
```
$ nbqa mdformat notebook.ipynb --nbqa-md --nbqa-diff
```

### doctest

To run tests for iPython notebooks using doctypes:
```
$ nbqa doctest notebook.ipynb
```

___

I hope you liked it. That's all for this time.
![The end](https://i.giphy.com/media/lD76yTC5zxZPG/giphy.gif)
Create MERN stack blog website guidelines!
Tags: webdev, javascript, beginners, programming
Published: 2023-02-18 06:08:28

To create a MERN stack blog, you'll need to follow these steps:

- Set up a development environment: You'll need to install Node.js, Express, React, and MongoDB to build your website.

- Build the back-end: Create a MongoDB database to store your users' data, such as usernames, passwords, posts, and comments. You'll then need to create a REST API using Express that interacts with your database to handle user authentication and data management.

- Build the front-end: Use React to create the user interface for your website, including the login page, registration page, post and comments page, and profile page.

- Implement authentication: You'll need to implement secure authentication for your users, such as storing hashed passwords in the database and using JSON Web Tokens (JWT) to validate user sessions.

- Create post and comment functionality: You'll need to add functionality to allow users to create posts, and for other users to leave comments on those posts.

- Implement profile functionality: You'll need to create a profile page that displays the user's information, such as their username, posts, and comments.

- Add sections: To organize your website's content, you can add sections to categorize posts and make it easier for users to find what they're looking for.

- Add experts with a tick: To recognize experts in your community, you can add a feature that allows users to mark themselves as experts in certain topics, and display a special symbol next to their name (e.g., a tick).

By following these steps, you'll be able to create a MERN stack blog website.
How to Create Jenkins Pipeline Project for Selenium Java Maven project(Beginners)
Tags: webdev, beginners, programming, tutorial
Published: 2023-02-18 05:57:40

In this video, we are going to learn about the jenkins pipeline for java project with maven and Selenium. Jenkins pipeline is very important
concept that you as QA / Dev should learn.

{% embed https://youtu.be/kaG3nTdiRX0
 %}

This is LIVE DEMO where we will be running our Selenium Maven Java(git) Project with Jenkins pipeline.


🟣🟣What is Jenkins pipeline?
Jenkins Pipeline (or simply "Pipeline" with a capital "P") is a suite of plugins which supports implementing and integrating continuous delivery pipelines into Jenkins.
The definition of a Jenkins Pipeline is written into a text file (called a Jenkinsfile) which in turn can be committed to a project’s source control repository

A Pipeline is a user-defined model of a CD pipeline


🟣🟣 LINK To Slide
http://sdet.live/notes


🟣🟣 LINK To the Project
http://sdet.live/notes


🟣🟣 Link to Jenkins pipeline Syntax generator
https://www.jenkins.io/doc/book/pipel...


#jenkinspipeline #jenkins #jenkinstutorial #jenkinspipelinmaven 

🟢 30 Days of Automation Testing
https://go.scrolltest.com/automation


🟢 30 Days of API Testing
https://apitesting.co/30days


🟢 30 Days of Rest Assured
https://go.scrolltest.com/30days-rest...


🟣🟣 Download Slides and Notes - http://sdet.live/notes

🟣🟣 My Resume Template - http://sdet.live/notes


✅ API Testing –
https://www.learnapitesting.com


✅ Cypress Tutorial with LIVE Projects –
http://cypresstutorial.com


🔗 Join the Facebook Group - http://scrolltest.com/fb

🔗 Learn API Testing(with Postman) - https://learnapitesting.com/

🔗 Rest API Testing with Python - http://masterapitesting.com/

🔗 E2E Frontend Testing with Cypress - http://cypresstutorial.com/

🔗 Join Our Automation Newsletter - http://scrolltest.com/tta

🔗 Master API Testing Bundle - https://apitesting.co/bundle

🔗 Rest Assured MasterClass- https://apitesting.co/enroll


———————————————————————————
Step by step guide on how to use useReducer and useContext together?
Tags: react, webdev, tutorial, reactnative
Published: 2023-02-18 05:52:07

Before reading the article, If you are interested in react, JavaScript, or frontend development in general, Do checkout and subscribe [xplodivity](https://www.youtube.com/@xplodivity/videos) on youtube.


![reducer function](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/usp6y8b94d7xacn3t5za.png)

In the example, we start by creating a reducer function that takes the current state and an action as arguments and returns a new state based on the action type. The reducer is responsible for updating the state based on the actions it receives.


![create context](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j1paiitfifpkar19p9l8.png)

Next, we create a context using React.createContext(). The context will allow us to share state and dispatch function between components.


![useReducer hook and count provider component](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h9ni08eo84jj9n5ssri6.png)

Then we create a CountProvider component that uses the useReducer hook to manage the state. The useReducer hook takes two arguments: the reducer function and an initial state. It returns an array containing the current state and a dispatch function that can be used to dispatch actions to the reducer. The CountProvider component wraps its children with the CountContext.Provider component and passes down the state and dispatch function as context values.


![counter component](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/onu11muqdie80si6mddp.png)

Finally, we create a Counter component that uses the useContext hook to access the state and dispatch function from the context. The useContext hook takes the context object as an argument and returns the current context value, which is an object with the state and dispatch function in this case. In the Counter component, we display the current count and two buttons that dispatch increment and decrement actions when clicked.


![wrap count provider](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ot5erl12unygq7i4zd2o.png)

With this setup, we can use the CountProvider component to wrap any components that need access to the count state and dispatch function. The state and dispatch function will be passed down the component tree via context, allowing the child components to access and update the state without having to pass props down manually.
🔥Top 10 Things to not do while coding! (Latest 2024)
Tags: programming, tutorial, beginners, productivity
Published: 2023-02-18 05:48:09

Coding is a highly skilled profession that requires attention to detail, focus, and a good understanding of the coding language. However, even the most experienced coders make mistakes, and some mistakes can lead to hours of frustration or even worse, program crashes. To help you avoid these pitfalls, here I collected the top 10 things to not do while coding and how to avoid logic errors in programming. Also we will see common programming mistakes! Lets see!

- 
Don't Neglect Testing: Testing is an essential part of coding that should never be overlooked. Without testing, your code may not work as intended, and bugs can go unnoticed, leading to serious consequences.

- 
Don't Forget to Comment: Comments are a crucial part of coding as they help others understand your code. They also help you remember what you were thinking when you wrote the code, and they make it easier to debug your program.

- 
Don't Write Sloppy Code: Sloppy code can lead to bugs, crashes, and security vulnerabilities. Make sure to write clean, efficient, and well-documented code to avoid these issues.

- 
Don't Hardcode Values: Hardcoding values can make your code less flexible, and changes to the code can become more challenging. Instead, use variables and constants to make your code more adaptable and easier to maintain.

- 
Don't Overcomplicate Your Code: Simple code is often better than complex code. Avoid adding unnecessary complexity to your code, and strive for simplicity to make it easier to understand and maintain.

- 
Don't Mix Business Logic with User Interface Logic: Business logic should be separated from user interface logic to make it easier to maintain and test your code. Keep your code organized, and avoid mixing the two.

- 
Don't Ignore Error Handling: Error handling is an essential part of coding that can save you hours of debugging time. Make sure to handle errors effectively to prevent crashes and other issues.

- 
Don't Be Afraid to Ask for Help: If you're stuck on a coding problem, don't be afraid to ask for help. There are many online communities and forums where you can find help and support.

- 
Don't Assume Your Code Is Secure: Security is a significant concern when coding, and it's essential to make sure your code is secure. Don't assume that your code is secure, and take steps to ensure that it is.

- 
Don't Give Up: Coding can be challenging, and it's easy to get discouraged when things don't go as planned. However, it's essential to persevere and keep trying. With time, practice, and patience, you can become a skilled and successful coder.

## Closing up

In conclusion, coding is an exciting and challenging profession that requires discipline, patience, and attention to detail. By avoiding these common mistakes, you can improve your coding skills, write more efficient code, and avoid costly errors. Remember to test your code, comment frequently, and strive for simplicity and clarity. With these tips, you'll be on your way to becoming a proficient and successful coder.
Celebrating Love from Afar 💕
Tags: love, valentine
Published: 2023-02-18 05:45:14

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

## A guide to make valentine’s day special with your long-distance partner.

When you are in a long distance relationship, Valentine’s Day can be difficult. But it doesn’t have to be that way! You can make this special day just as memorable as if you were in the same place with a little creativity and effort.

**“Relationships do not require perfection; they only require effort!”**

Here are some ideas for how to celebrate Valentine’s day with your long-distance partner:

**Plan a virtual date 💻👩‍❤️‍👨:**
Make a virtual date for you and your partner to enjoy. This could be a video call or a movie night via video conferencing. You can cook dinner together or order takeout from your favourite restaurants and share it online.

**Deliver a care package 🎁:**
Surprise your partner with a care package containing their favorite treats, a special gift, and a touching love letter. Include items that will remind them of you, such as a photo of the two of you or a special trinket.

**Play a game together 🎮:**
Choose a game that you and your partner can play online while spending quality time together. Board games, card games, and even video games are available.

**Write love letters 💌:**
Write each other love letters and exchange them on Valentine’s Day. You can also write letters to others in which you describe your favorite aspects of your relationship and your future plans together.

**Watch a movie together 🎥:**
Choose a movie that you both love and watch it together, even if you’re miles apart. You can use a video call or a shared screen to watch it at the same time.

Whatever you do to celebrate Valentine’s Day, the important thing is to focus on the love you share and to make the most of the time you have together. A little planning and creativity can go a long way towards making this day special and memorable for you and your long-distance partner.

**“Distance means so little, when someone means so much!!”**

So, go ahead and spend Valentine’s Day with your long-distance partner!
Drawbacks of using useContext hook in react
Tags: react, reactnative, webdev, tutorial
Published: 2023-02-18 05:27:03

Before reading the article, If you are interested in react, JavaScript, or frontend development in general, Do checkout and subscribe [xplodivity](https://www.youtube.com/@xplodivity/videos) on youtube.

Some of the issues in using the useContext hook are:

**Performance:** The useContext hook can create performance issues because it causes components to re-render whenever the context value changes. If the context value is updated frequently, this can lead to excessive re-rendering and potential performance issues.

Re-rendering a component is an expensive operation that can impact the performance of an application, especially if there are many components that are subscribed to the same context. To reduce this, it is important to minimize the number of context updates and to make sure that they are only performed when necessary.

**Implicit relationships:** The useContext hook creates implicit relationships between components by allowing components to subscribe to a context and re-render whenever the context value changes. This means that if a component is using useContext to subscribe to a context, it is dependent on that context for its state and behavior.

These implicit relationships can make it difficult to understand how changes to the context will affect the components using it. For example, if a context value is updated in one part of the application, it can have unintended consequences for components that are subscribed to that context elsewhere in the application.

This can make it difficult to understand the full impact of a change to the context, especially if the relationships between components using the context are complex. To mitigate this, it is important to design context carefully and to understand the relationships between components that are using it.
Java It Is! A Q1 Check-In
Tags: update, java
Published: 2023-02-18 05:11:22

I was really pumped to [cover a lot of developer topics this year](https://dev.to/joshaustintech/excited-for-2023-4939). After a month and a half of trying to squeeze everything together, I've come to the realization I simply don't have the time to learn and build everything I want to. And that's OK.

An older friend who retired comfortably from the spoils of the .COM Era shared some simple yet profound bits of advice this week when I asked him what was his recipe for success:

> Focus on what you know best.

For me, that would definitely be Java.

> "How can I make my family's life better?"

So far, for my situation, it's sticking with Java. In my current situation, the majority of the highest-paying jobs are in Java.

Around the same time I encountered [DHH's article on investing in things that don't change](https://world.hey.com/dhh/invest-in-things-that-don-t-change-6f7f19e1). Java is definitely still very familiar even if you haven't touched it in 10 years.

That doesn't mean I'll stop exploring other things, like Rust and blockchains and Swift (oh my!), but I need to deliberately spend less time on those other things so I can sharpen the strongest skill I have.

I've started working on my first RIFE2 project, and I've started reading a book on the Java game engine FXGL. These should keep me preoccupied for a while. If I run out of Java-related things to do I expect to revisit [JBake](https://jbake.org/) and maybe Java for Android.