teleren/devto huggingface dataset:
Enhancing Personal Privacy with Temporary Email Addresses Safeguarding Personal Privacy with Temporary Email Addresses
Tags: email, privacy, tempmail, 10minutemail
Published: 2023-12-16 07:04:43

In the realm of online interactions, safeguarding personal privacy stands paramount. Temporary email addresses emerge as a vital tool in preserving individual confidentiality. These disposable email accounts shield personal information by acting as a temporary bridge between users and online platforms.

Temporary emails serve as a protective veil, preventing unnecessary exposure of one's primary email address. They prove invaluable in scenarios such as signing up for services or accessing limited-time offers, reducing the risk of spam, phishing, and unwanted solicitation.

By leveraging these transient email addresses, individuals can navigate the digital landscape with heightened privacy, minimizing the potential for data breaches or identity theft. In essence, temporary email addresses play a pivotal role in fortifying personal privacy in an increasingly interconnected online world.

Where can I use the 10-minute mail service?
The following websites are highly recommended, they are all very fast to receive emails, some only take 5 seconds, it is best to collect them!


1 10-minute mailbox, the fastest 5 seconds to receive emails, you can be extended to 30 minutes,60 minutes and 24 hours [https://www.10-minutemail.com](https://www.10-minutemail.com)

2 10-minute mailbox, receive mail very fast [https://10-minutemail.net](https://10-minutemail.net)

3 10 min email [https://email10min.com/](https://email10min.com/)

4 10minute mailbox, the page is simple, but easy to use [https://www.mailtemp.net](https://www.mailtemp.net)

5 10 min Email [https://email10min.net](https://email10min.net)

6 10 Minutes Mailbox [https://tenminutesmail.net](https://tenminutesmail.net)

7 10-minute mailbox, receive mail very fast [https://10-minutemail.org](https://10-minutemail.org)

The above mailboxes are very convenient for long-term use.
Functions in JavaScript
Tags: javascript, webdev, programming, beginners
Published: 2023-12-16 06:07:48

## Function

- A Function Declaration (defining a function)

- A Function Call (calling/executing a function)

## Types of Functions in JavaScript

-  Normal(Regular) Function:

> In JavaScript, a regular function is a reusable block of code that performs a specific task. It is defined using the function keyword, followed by a name (optional) and a set of parameters enclosed in parentheses. 

```
//Function Declaration
function functionName(a,b){
  return a+b;
}

// function call
const res = functionName(a,b);
console.log(res);
```

-  Anonymous Function:

> An anonymous function in JavaScript is a function without a specified name. It is typically defined on the fly and assigned to a variable or used directly as an argument in a function call.

```
const functionName = function(a,b){
  //Do something
}
const result = functionName(3, 4);
console.log(result);
```

- Immediately Invoked Function Expression (IIFE):

> An Immediately Invoked Function Expression (IIFE) is a JavaScript design pattern where a function is defined and executed immediately after its creation. This pattern is often used to create a private scope for variables, preventing them from polluting the global scope.

```
const result = (function(a,b){
   return a+b; 
  })(2,4);
```

- Arrow Function:

> An arrow function in JavaScript is a concise way to write anonymous functions. Arrow functions were introduced in ECMAScript 6 (ES6) and provide a more compact syntax compared to traditional function expressions. 

```
const functionName = (a,b) => {
   // do something
}
```

- Implicit Return:

> If the function body consists of a single expression, the return statement is implicit.
```
const functionName  = (a, b) => a + b;
console.log(functionName(3, 4)); 

```

**NOTE!: Every function in JavaScript returns `undefined` unless and until specified.**



_Please feel free to add more information to the post if you have any._
populate referencing fields
Tags: typescript, react, nextjs, webdev
Published: 2023-12-16 06:33:12

```ts
//=> student.service.ts
const getAllStudentsFromBD = async () => {
  const result = await Student.find()
    .populate('admissionSemester')
    .populate({
      path: 'academicDepartment',
      populate: {
        path: 'academicFaculty',
      },
    });
  return result;
};
```

here i got the admissionSemester id then I input semester id inside populate, then I get full details of this admissionSemester id.

```ts
//=>src/app/modules/academicDepartment/academicDepartment.model.ts
const academicDepartmentSchema = new Schema<TAcademicDepartment>(
  {
    name: {
      type: String,
      required: true,
      unique: true,
    },
    academicFaculty: {
      type: Schema.Types.ObjectId,
      ref: 'AcademicFaculty',
    },
  },
  {
    timestamps: true,
  },
);
```

`ref: 'AcademicFaculty',`
` .populate('modelname')`
Correlation of Claim Amount and Flag for Fraud
Published: 2023-12-16 06:22:54

**Question :**

What does the correlation of claim amount and flag for fraud at 0.86 and 1.0 respectively mean ? (See Figure 1.0 below)


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

The linear relationship of positive 1 shows a perfect relationship that if the claim amount increases the likelihood
of the fraud increases. 

However more analysis need to be done using different Data science methods to find out the causation for fraud. 

In conclusion the larger the amount of claim the more likely to be assosciated with fraud.
AppError=> Develop an AppError class in TypeScript for a MERN application utilizing Mongoose for MongoDB integration.
Tags: typescript, javascript, webdev, react
Published: 2023-12-16 06:19:06

```ts
//src/app/errors/AppError.ts

class AppError extends Error {
  public statusCode: number;

  constructor(statusCode: number, message: string, stack = '') {
    super(message);
    this.statusCode = statusCode;

    if (stack) {
      this.stack = stack;
    } else {
      Error.captureStackTrace(this, this.constructor);
    }
  }
}

export default AppError;

```

## where i am using this AppError function

```ts
//src/app/modules/academicDepartment/academicDepartment.model.ts

academicDepartmentSchema.pre('save', async function (next) {
  const isDepartmentExist = await AcademicDepartment.findOne({
    name: this.name,
  });

  if (isDepartmentExist) {
    throw new AppError(
      httpStatus.NOT_FOUND,
      'This department is already exist!',
    );
  }

  next();
});

academicDepartmentSchema.pre('findOneAndUpdate', async function (next) {
  const query = this.getQuery();
  const isDepartmentExist = await AcademicDepartment.findOne(query);

  if (!isDepartmentExist) {
    throw new AppError(
      httpStatus.NOT_FOUND,
      'This department does not exist! ',
    );
  }

  next();
});
```
Google Domains shuts down. What next ?
Published: 2023-12-16 05:37:58

Google domains has [been shut down](https://support.google.com/domains/answer/13689670?hl=en). All google users are now used to this sort of abrupt behavior from Google. 

But is there a good alternative ? Especially because when you used Google domains, you could automatically verify your domain with all other google services. 

The answer appears to be yes. [This guide gives a clear answer to what might be an alternative to Google domains](https://www.frontendeng.dev/blog/28-google-domains-shuts-down-what-alteratives). Hint. it is another google product that is unlikely to be shut down.
Animal Adventures in Film
Published: 2023-12-16 05:31:16


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/45qqjz4u27eybla8eipg.jpeg)
Paws and Claws Unleashed: Exploring the Rise of Animal Movies"
Dive into the evolution of animal movies and how they've become a significant genre in the film industry. From classics like "The Lion King" to modern hits like "The Jungle Book," discover the magic that brings our furry and feathered friends to life on the big screen.

"Tales from the Wild: Behind the Scenes of Animal Movie Productions"
Explore the challenges and triumphs faced by filmmakers when working with animal actors. From training sessions to unexpected bloopers, get an inside look at the making of your favorite animal movies.

Explore Our Social Account Also.
Youtube : https://www.youtube.com/@OnlineMCA  


#WildCinematics #AnimalMovieMagic #BehindTheScenesWild #LiveActionAnimals #FarmToFlick #AnimalAnticsFilm #FurryFilmFriends
🌟 #DEVImpact2023 Reflections
Tags: devimpact2023, discuss, frontend
Published: 2023-12-16 05:25:26

1. **_[](

1. url
)_**
<!-- ✨ This template is only meant to get your ideas going, so please feel free to modify it as you’d like, or write your own title, structure, and words! ✨ -->

### Proud Moments
<!-- Share something you accomplished in the last year that made you proud. Whether it's a coding triumph, a community initiative, or personal growth, we want to hear it! -->

### DEV Contributions
<!-- How did you contribute to the DEV Community in 2023? It could be writing articles, engaging in discussions, or helping others -- your impact matters. -->

### Brilliant Fails
<!-- What are some of the most significant challenges you encountered this last year? How did you handle problems and make improvements? -->

### Celebrate the Numbers 
<!-- Relive your moments on DEV with the cool [DEVto "wrapped"-style app](https://dev.to/code42cate/devto-wrapped-2023-13o) created by our talented member @code42cate and include your "wrapped" screen shot in this post. -->

### Shoutouts
<!-- Give a shoutout to another member on DEV who inspired, helped, or collaborated with you. Spread the appreciation and let's celebrate each other! -->

### Future Goals 
<!-- What are your coding- or community-related goals for the upcoming year? Reflect on your personal growth and share your resolutions and aspirations. -->

### What Does DEV Means to You?
<!-- In a few words or a paragraph, tell us what DEV means to you. How has this community influenced your journey? -->

<!-- ✨ Use the #DEVImpact2023 tag when posting your reflections on DEV, and let's create a wave of positivity and celebration. Here's to an incredible 2023 and many more achievements to come! ✨ -->
Operation Fire Valley Rocks
Tags: communitybuilders, thankfulforest2024, firevalleyrocks
Published: 2023-12-16 03:20:00

I'm not a poet, and it's difficult for me to write a 10-verse poem.

But luckily, this year is all about GenAI. I used GenAI to help me rewrite the poem [Jenn Bergstrom](https://dev.to/jennworks40) has written.

Using Step Functions to make a Christmas Tree reminds me of the grand old days of ASCII art. And here is the Step Functions Christmas Tree I've created.


![My Step Functions Christmas Tree](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qdklnw2r51atkk740cug.jpg)

2023 has been an adventurous year for me. I'm so thankful to the AWS Community Builders and those who make this program great.

This year, I've met many CBs on different occasions. The CB program makes me feel like I am part of the community; I know where I can find people to talk to and where I can participate.

Of course, being recognized as an AWS Security Hero is the biggest thing to me this year. Although it's just a month ago, it feels like time has passed a long way already.

Again, I'm so thankful to the people who have helped me, and pushed me along the way, Jason Dunn, Lily Kerns, Taylor Jacobsen, Johannes Koch, Chris Williams, ... _(No specific order)_

And, of course, thanks to the AWS community in Hong Kong, Amy Wong, Gabriel Koo, Anthony Lai. My fellow AWS Heroes from HK, Cyrus Wong, and Alex Lau. _(No specific order)_
Flutter: An Easy Introduction to Building Cross-Platform Apps
Tags: flutter, crossplatformdevelopemt, mobileappdevelopement
Published: 2023-12-16 02:20:00


![Flutter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tltpt1xmtloxz3f77z3t.jpeg)

No matter the year, Google has proved itself to be the leader. In 2017, Google created the open-source framework, Flutter for mobile app development. This framework is so great that even in 2023, it's still preferred by mobile web developers. In fact, it's the second most popular mobile framework till date.

It uses Dart to create user-friendly and interactive apps. The upside of using Flutter is that developers can utilize Dart's features as well. For instance, Dart has sound null safety that identifies common bugs. Developers using Flutter can also avail this feature - this can save a lot of their time. Apart from this, some other popular features of Flutter are:

1. Developers can make cross-platform apps without writing more code in Flutter. With one codebase, they can create apps for multiple platforms.

2. There's a hot reload function in Flutter that will let developers see updates without pressing the 'restart' option.

3. Flutter has both ready-made and customizable widgets. This means developers don't need to create widgets from scratch anymore.

4. Since Flutter doesn't use bridges like JavaScript and WebView to communicate between the app and platform, Flutter-made apps are fast and face fewer performance problems.

What's even better? If you want to change contrast, font size, etc., in Flutter, you can share both the UI code and the UI itself.

In most cross-platforms, code sharing is possible only between target platforms. Also, since Flutter apps are created with machine code, developers don't encounter performance bugs.

And no, in Flutter, developers don't need to test the app separately on different platforms. They just need to perform one comprehensive app test. But let's face it - despite all these features, Flutter does lack a lot. For instance, native APIs can't be called directly from Dart. Although vector animations and graphics are supported by Flutter, sometimes problems do occur. But, I'm certain that these problems will be solved over the years in the Flutter release. Because after all Flutter is Google's brainchild.
SQL for Big Data: Tips and Tricks Every Data Scientist Should Know
Published: 2023-12-16 02:03:40

As the scale of data continues to grow, mastering SQL for big data becomes essential for data scientists. In this article, we’ll explore key tips and tricks that empower data scientists to efficiently navigate and analyze large datasets using SQL. Whether you’re dealing with massive logs, complex joins, or distributed systems, these strategies will help you harness the power of SQL in the realm of big data.

## Section 1: Optimizing Query Performance
### 1.1 Efficient Indexing

```
-- Create indexes on frequently used columns
CREATE INDEX idx_column_name ON your_table(column_name);
```

### 1.2 Partitioning Tables
```
-- Partition large tables for faster query performance
CREATE TABLE your_partitioned_table
PARTITION BY RANGE (date_column) (
  PARTITION p1 VALUES LESS THAN ('2022-01-01'),
  PARTITION p2 VALUES LESS THAN ('2023-01-01'),
  ...
);
```

## Section 2: Parallel Processing
### 2.1 Using Parallel Joins
```
-- Enable parallel processing for a specific query
SELECT /*+ parallel(your_table, 4) */ *
FROM your_table
JOIN another_table ON your_table.id = another_table.id;

```

### 2.2 Parallel Aggregation
```
-- Enable parallel aggregation for improved performance
SELECT /*+ parallel(your_table, 4) */ COUNT(*)
FROM your_table;
```

## Section 3: Handling Large Joins
### 3.1 Reduce Data Before Joining
```
-- Filter data before joining to reduce the dataset size
WITH ReducedData AS (
  SELECT id, column_name
  FROM your_table
  WHERE condition
)
SELECT *
FROM ReducedData
JOIN another_table ON ReducedData.id = another_table.id;
```

### 3.2 Using Bloom Filters for Joins
```
-- Utilize Bloom filters for large joins
SELECT *
FROM your_table
JOIN another_table
ON your_table.id = another_table.id
AND BLOOM_FILTER(your_table.column_name) = BLOOM_FILTER(another_table.column_name);
```

## Section 4: Window Functions for Analytical Queries
### 4.1 Analyzing Trends Over Time
```
-- Use window functions to analyze trends
SELECT
  date_column,
  value,
  AVG(value) OVER (ORDER BY date_column ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) AS moving_average
FROM your_table;
```
### 4.2 Ranking and Percentiles
```
-- Utilize window functions for ranking and percentiles
SELECT
  product_id,
  revenue,
  RANK() OVER (PARTITION BY product_id ORDER BY revenue DESC) AS sales_rank,
  PERCENTILE_CONT(0.75) WITHIN GROUP (ORDER BY revenue) OVER (PARTITION BY product_id) AS percentile_75
FROM sales_data;
```

## Conclusion:

In the era of big data, mastering SQL is crucial for data scientists. By leveraging efficient indexing, partitioning tables, utilizing parallel processing, and employing advanced techniques like window functions, data scientists can extract valuable insights from massive datasets. These tips and tricks are essential tools for enhancing query performance and navigating the complexities of SQL in the realm of big data.
🌟 #DEVImpact2023 Reflections
Tags: devimpact2023
Published: 2023-12-16 01:45:21

<!-- ✨ This template is only meant to get your ideas going, so please feel free to modify it as you’d like, or write your own title, structure, and words! ✨ -->

### Proud Moments
<!-- Share something you accomplished in the last year that made you proud. Whether it's a coding triumph, a community initiative, or personal growth, we want to hear it! -->

### DEV Contributions
<!-- How did you contribute to the DEV Community in 2023? It could be writing articles, engaging in discussions, or helping others -- your impact matters. -->

### Brilliant Fails
<!-- What are some of the most significant challenges you encountered this last year? How did you handle problems and make improvements? -->

### Celebrate the Numbers 
<!-- Relive your moments on DEV with the cool [DEVto "wrapped"-style app](https://dev.to/code42cate/devto-wrapped-2023-13o) created by our talented member @code42cate and include your "wrapped" screen shot in this post. -->

### Shoutouts
<!-- Give a shoutout to another member on DEV who inspired, helped, or collaborated with you. Spread the appreciation and let's celebrate each other! -->

### Future Goals 
<!-- What are your coding- or community-related goals for the upcoming year? Reflect on your personal growth and share your resolutions and aspirations. -->

### What Does DEV Means to You?
<!-- In a few words or a paragraph, tell us what DEV means to you. How has this community influenced your journey? -->

<!-- ✨ Use the #DEVImpact2023 tag when posting your reflections on DEV, and let's create a wave of positivity and celebration. Here's to an incredible 2023 and many more achievements to come! ✨ -->
Get update Exchange rate from NBC bank with RoR and Wombat
Published: 2023-12-16 01:41:44

I was assigned a task that do exchange currency from US dollar into Khmer riel.

The exchange rate is based on NBC ( National Bank of Cambodia). Unfortunately, the NBC website does not provide provide any Api to get the exchange rate so I am decided to do crawling.

First, I am using `sidekiq-cron` to perform the crawling every 3 hours. Then, I use `wombat` gem to perform the crawling. Once, It receives the updated exchange, the system will update and calculate it as Khmer riel.

_exchange_rate_spider.rb_
```ruby
## Crawling NBC With OpenSSL verification on(default)
# raise <SSL_connect returned=1 errno=0 state=error: certificate verify failed>

## Disable OpenSSL verfication
# https://github.com/sparklemotion/mechanize/issues/375
# server doesn't provide intermediate certificate to OpenSSL
# Wombat.crawl { mechanize.verify_mode = OpenSSL::SSL::VERIFY_NONE }

module Spider
  class ExchangeRateSpider
    include Wombat::Crawler

    base_url 'https://www.nbc-website.org.kh'
    path '/english/economic_research/exchange_rate_path.php'

    usd_to_khr xpath: '//tr[2]/td/font', &:to_f
  end
end
```

_exchange_rate_job.rb_
```ruby
class ExchangeRateJob < ApplicationJob
  queue_as :default

  def perform
    Setting.instance.update!(usd_to_khr: spider.crawl['usd_to_khr'])
  end

  private

  def spider
    return @spider unless @spider.nil?

    @spider ||= Spider::ExchangeRateSpider.new
    @spider.mechanize.verify_mode = OpenSSL::SSL::VERIFY_NONE
    @spider
  end
end
```

_schedule.yml_
```ruby
exchange_rate_job:
  cron: 'every 3 hours'
  class: 'ExchangeRateJob'
  status: enabled
  description: 'updates exchange rate from NBC'
```

Thank you for your reading!
Newsletter Repost - OpenLampTech issue #109
Tags: php, mysql, programming, webdev
Published: 2023-12-16 00:27:02

WooCommerce block product editor | Escaping output in PHP and Laravel | SQL must go | GitHub and MySQL v8. **OpenLampTech** is a media and content source for PHP, MySQL, and the LAMP stack.

**OpenLampTech** has sponsorship opportunities for your brand, product, or service in the weekly newsletter. As an independent publication, collaboration is very affordable. Inquire by email at openlamptech@substack.com for more information on reaching the **OpenLampTech** readership. Sponsorships are available for early 2024.

---

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

---
Be sure you are [subscribed to the weekly OpenLampTech](openlamptech.substack.com) newsletter for PHP, MySQL, and LAMP stack developers.
React Tutorial: Tic-Tac-Toe - Interactive Remaster!
Tags: react, tutorial, sandbox, website
Published: 2023-12-16 00:23:19


## Introduction

A few years ago, when I was creating one of my first [articles](https://dev.to/igorfilippov3/angular-universal-boilerplate-setup-239e) here, I faced the challenge that creating step-by-step guides in text format wasn't very convenient. 

Readers either just skim through such text, or they have to open an editor, create a project, install dependencies – in short, it's a bit of a hassle. 

Not everyone is willing to go through that, which leads to low engagement with detailed textual guides. 

Consequently, there aren't many lengthy and detailed articles.

## The Project

So, it occurred to me to combine the textual format for presenting technical information with an interactive editor.

I'm just starting my journey, and here's my first step. I decided to remaster the official React tutorial - Tic-Tac-Toe.

Here's the [link](https://react.dev/learn/tutorial-tic-tac-toe) to the original guide.

And [here](https://www.frontendly.dev/ihor-filippov/react-tutorial-tictactoe/1)'s what I came up with.

In the future, I plan to enable everyone to create their own step-by-step interactive guides.

P.S. Feel free to put any feedback You want 😊