teleren/devto huggingface dataset:
password hash in express, mongoose using bcrypt
Published: 2023-12-12 08:58:13

Implement mongoose middleware part

```js
npm i bcrypt
npm i -D @types/bcrypt
```

```js
BCRYPT_SALT_ROUND=12 //.env file
 bycrypt_salt_rounds: process.env.BCRYPT_SALT_ROUND, //.config file

```



```js
//Encrypt & pre save middleware/hook: will work on create on save function
studentSchema.pre('save', async function (next) {
  // console.log('pre hook: we save our data', this);

  //hashing password and save into DB
  // eslint-disable-next-line @typescript-eslint/no-this-alias
  const user = this; // documents
  user.password = await bcrypt.hash(
    user.password,
    Number(config.bycrypt_salt_rounds),
  );
  next();
});

```

```js
//post save middleware 
studentSchema.post('save', function (doc, next) {
  doc.password = '';
  // console.log('post hook: we save our data', this);
  next();
});
```
Seamless E-Commerce Evolution with Magento Migration Services
Tags: magento, migration, magentomigration, development
Published: 2023-12-12 08:54:52

Embark on a transformative journey with VT Netzwelt, your trusted partner for Magento Migration Services. Our expert team specializes in seamless and efficient transitions, ensuring a smooth evolution of your e-commerce store to the latest Magento version. From meticulous data migration to preserving design integrity, VT Netzwelt handles every aspect of the migration process with precision. Elevate your online business with our comprehensive **_[Magento Migration Services](https://www.vtnetzwelt.com/services/magento-migration/)_**—where every byte finds its new home effortlessly, and your digital storefront evolves to meet the demands of the dynamic e-commerce landscape.
karachipackersmovers
Published: 2023-12-12 08:44:53

_[_The best packers and movers in Karach](https://karachipackersmovers.com.pk/)i specialize in office and house shifting, luggage moving, and home relocation from Karachi to all of Pakistan, including Lahore. Islamabad, Rawalpindi, Multan, and Karachi Towns: Jamshed Town, Gulberg Town, Clifton, Cantt Bin Qasim Town, Baldia Town.Moving and packing at the best pricing with professional movers and packers in karachi.
Problem On Cash Register
Published: 2023-12-12 08:27:34

checkCashRegister["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]]) should return {status: "OPEN", change: [["TWENTY", 60], ["TEN", 20], ["FIVE", 15], ["ONE", 1], ["QUARTER", 0.5], ["DIME", 0.2], ["PENNY", 0.04]]}.
AND HERE IS  MY CODE            const currencyUnit = {
  "PENNY": 1,
  "NICKEL": 5,
  "DIME": 10,
  "QUARTER": 25,
  "ONE": 100,
  "FIVE ": 500,
  "TEN": 1000,
  "TWENTY": 2000,
  "ONE HUNDRED": 10000
}


function checkCashRegister(price, cash, cid) {
  let changeSum = cash * 100 - price * 100;
  let changeSumCheck = changeSum;
  let change = [];
  let status = '';

let cidSum = 0;
let filteredCid = cid.filter(elem => elem[1] !== 0).reverse();

filteredCid.forEach(elem => {
 let curr = elem[0];
 let currSum = elem[1] * 100;
 cidSum += currSum;
 let amount = 0;
 while (changeSum >= currencyUnit[curr] && currSum >  0) {
   amount += currencyUnit[curr];
   changeSum -= currencyUnit[curr];
   currSum -= currencyUnit[curr];
 }
 if (amount !== 0) {
    change.push([curr, amount / 100]);
   }
});
if (changeSum > 0) {
  status = 'INSUFFICIENT_FUNDS';
  change = [];
   } else if ( changeSum == 0 && changeSumCheck == cidSum) {
  status = 'CLOSED';
  change = cid;
}else {
  status = 'OPEN';
}

  return { 'status': status, 'change': change };
}


console.log(checkCashRegister(19.5, 20, [["PENNY", 0.5], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]]));




AND THEY ARE STILL COMPLAINING ABOUT THIS
checkCashRegister(3.26, 100, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]]) should return {status: "OPEN", change: [["TWENTY", 60], ["TEN", 20], ["FIVE", 15], ["ONE", 1], ["QUARTER", 0.5], ["DIME", 0.2], ["PENNY", 0.04]]}.
解決 gem install mysql2 時遇到 'zstd' not found 錯誤的問題
Tags: ruby, rails, gem, bundle
Published: 2023-12-12 08:19:17



單純地使用
```
gem install mysql2
```
安裝會有**library 'zstd' not found**的 error
```
linking shared-object mysql2/mysql2.bundle
ld: library 'zstd' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mysql2.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/sung/.asdf/installs/ruby/2.5.9/lib/ruby/gems/2.5.0/gems/mysql2-0.5.5 for inspection.
Results logged to /Users/sung/.asdf/installs/ruby/2.5.9/lib/ruby/gems/2.5.0/extensions/-darwin-23/2.5.0/mysql2-0.5.5/gem_make.out
```
stackoverflow 這篇提到{% embed https://stackoverflow.com/questions/67840691/ld-library-not-found-for-lzstd-while-bundle-install-for-mysql2-gem-ruby-on-mac %} 在安裝要特地指名 **openssl** 和 **zstd**。
指令如下：
```
gem install mysql2 -v '0.5.5' -- --with-opt-dir=$(brew --prefix openssl) --with-ldflags=-L/opt/homebrew/opt/zstd/lib
```
這樣就成功啦～～～
```
gem install mysql2 -v '0.5.5' -- --with-opt-dir=$(brew --prefix openssl) --with-ldflags=-L/opt/homebrew/opt/zstd/lib
Building native extensions with: '--with-opt-dir=/opt/homebrew/opt/openssl@3 --with-ldflags=-L/opt/homebrew/opt/zstd/lib'
This could take a while...
Successfully installed mysql2-0.5.5
Parsing documentation for mysql2-0.5.5
Installing ri documentation for mysql2-0.5.5
Done installing documentation for mysql2 after 0 seconds
1 gem installed
```
Need country current date
Tags: reactnative, javascript, programming
Published: 2023-12-12 08:17:50

Hi,

I want to get IST current date time when i changed my device date time setting to any future or past date.

For example :-

1. IST date is 12-Dec-2023
2. I changed my device date to 10-Dec-2023.
3. But i want to show 12-Dec-2023 in my device.

How can i do that? I already tried moment luxon.
An Exquisite Extension for Enhancing Productivity
Tags: ai, chatgpt, ui
Published: 2023-12-12 08:15:28

HiTab is a  browser extension dedicated to providing users with an elegant homepage. Various widgets help enhance productivity - many features can be accessed directly from the homepage. Most importantly, ChatGPT and Midjourney are also available, making it an efficient and smart new tab.

And the following I would like to introduce HiTab in details.

1. Define your new homepage and open a new horizon.

HiTab possesses an extensive gallery of wallpapers, allowing for the personalization of both wallpaper and the background imagery for various widgets. Additionally, it affords you the capability to schedule periodic wallpaper changes, ensuring a fresh interface upon each commencement of the browser.

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

2. Rich and diverse widgets.

An abundance of widgets allows users to access a plethora of information directly on their homepage, such as news updates, calendar events, trending topics, stock market insights, and more, eliminating the need to navigate to additional web pages. This consolidates browsing efforts, thereby saving time and augmenting productivity. 

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

3. Dock bar, place your most frequently visited icons.

The bottom bar may be elegantly equipped with icons of your most frequented websites, thus providing immediate access regardless of which homepage you navigate to. Furthermore, you have the option to configure the bottom bar for either concealment or display.

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

4. Customise your homepage categories. 

The categorization on the homepage can also be tailored to one’s preferences. One has the liberty to add the desired categories, with both the nomenclature and icons being customizable.

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

5. Minimalist mode.

You may effortlessly activate the minimalist mode by merely clicking the button located in the upper right corner.

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

In addition, HiTab offers both ChatGPT and Midjourney, assisting you in the generation of text and images through artificial intelligence.

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

Undoubtedly, HiTab shall serve as an invaluable assistant, enhancing your browsing experience immeasurably.

Now you can install HiTab at its [official website](https://www.hitab.me/) or click [here](https://web.hitab.me/) to try HiTab.
⭐ Angular - DI with inject function⭐
Tags: programming, angular
Published: 2023-12-12 08:02:07

Example of Token Helper

👉 token.ts
➖ Create an InjectionToken with an initial value
➖ Create a Provider function

👉 Usage:
➖ Provide TOKEN in the component.
➖ Inject TOKEN into the component.

You can run it on **_[Stackblitz](https://stackblitz-starters-yot6nv.stackblitz.io)_** and fork the project to debug.

---

I hope you found it useful. Thanks for reading. 🙏
Let's get connected! You can find me on:
- **Medium:** https://medium.com/@nhannguyendevjs/
- **Dev**: https://dev.to/nhannguyendevjs/
- **Hashnode**: [https://nhannguyen.hashnode.dev](https://nhannguyen.hashnode.dev/)/
- **Linkedin:** https://www.linkedin.com/in/nhannguyendevjs/
- **X (formerly Twitter)**: https://twitter.com/nhannguyendevjs/
Beyond Memorization: Exam Dumps and Intelligent Learning
Published: 2023-12-12 07:55:02

In the competitive world of academia and professional certifications, the allure of finding shortcuts can be powerful. One such shortcut that has gained notoriety is the use of Exam Dumps. In this article, we will explore the dark side of Exam Dumps, their legal implications, why individuals are tempted to use them, and the broader consequences for academic and professional success.
Introduction
Definition of Exam Dumps
Before delving into the complexities <a href="https://dumpsboss.com/">Exam Dumps</a> surrounding Exam Dumps, let's establish a clear understanding of what they are. Exam Dumps refer to unauthorized collections of exam questions and answers that are often shared online. These materials claim to offer a shortcut to success by providing individuals with the exact content they can expect in a given exam.
Controversies Surrounding Exam Dumps
While the promise of acing an exam without extensive preparation may seem tempting, the use of Exam Dumps is fraught with controversies. Educational institutions <a href="https://dumpsboss.com/">Exam Dumps</a> and certification bodies vehemently oppose their use, citing ethical concerns, and potential damage to the credibility of assessments.


Click Here For More Details>>>>>>>: https://dumpsboss.com/
Github Authentication
Published: 2023-12-12 07:54:44

From 2021-08-13, GitHub is no longer accepting account passwords when authenticating Git operations. You need to add a PAT (Personal Access Token) instead, and you can follow the below method to add a PAT on your system.

Create Personal Access Token on GitHub
From your GitHub account, go to `Settings` → `Developer Settings` → `Personal Access Token` → `Generate New Token` (Give your password) → Fillup the form → click `Generate token` → Copy the generated Token, it will be something like ghp_sFhFsSHhTzMDreGRLjmks4Tzuzgthdvfsrta

Now follow the below method based on your machine:

For Windows OS ⤴
Go to `Credential Manager` from `Control Panel` → `Windows Credentials` → find `git:https://github.com` → `Edit` → On Password replace with with your GitHub Personal Access Token → You are Done

If you don’t find git:https://github.com → Click on Add a generic credential → Internet address will be git:https://github.com and you need to type in your username and password will be your GitHub Personal Access Token → Click Ok and you are done

For macOS ⤴
Click on the Spotlight icon (magnifying glass) on the right side of the menu bar. Type Keychain access then press the Enter key to launch the app → In Keychain Access, search for github.com → Find the internet password entry for github.com → Edit or delete the entry accordingly → You are done

For a Linux-based OS ⤴
For Linux, you need to configure the local GIT client with a username and email address,

```
$ git config --global user.name "your_github_username"
$ git config --global user.email "your_github_email"
$ git config -l
```


Once GIT is configured, we can begin using it to access GitHub. Example:

```
$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
> Cloning into `YOUR-REPOSITORY`...
Username: <type your username>
Password: <type your password or personal access token (GitHub)
```

Now cache the given record in your computer to remembers the token:


```
$ git config --global credential.helper cache
```
If needed, anytime you can delete the cache record by:

```
$ git config --global --unset credential.helper
$ git config --system --unset credential.helper
```
SA Cladding: Transformative Excellence in Cladding Solutions
Tags: construction, buildingmaterials, business, cladding
Published: 2023-12-12 07:51:16

SA Cladding stands as a distinguished leader in Adelaide's construction arena, offering unparalleled expertise in [cladding solutions](https://sacladding.com.au/adelaide-cfc-cladding). With a commitment to innovation and precision, SA Cladding has become synonymous with transformative excellence in the field.

At the heart of **SA Cladding's** success is a team of skilled professionals dedicated to elevating the aesthetics and functionality of residential, commercial, and industrial structures. From project inception to completion, SA Cladding prioritizes quality craftsmanship, ensuring each client's vision is brought to life with meticulous attention to detail.

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

The versatility of **SA Cladding** is evident in its proficiency with various cladding materials, including aluminum, composite panels, and timber. This breadth of expertise allows clients to select the ideal material that aligns with their project requirements, preferences, and budget constraints. SA Cladding ensures a seamless integration of cutting-edge technology and industry-best practices into every project, setting a new standard for cladding excellence in Adelaide.

Beyond aesthetics, [SA Cladding](https://sacladding.com.au/adelaide-cfc-cladding) places a paramount emphasis on safety and compliance with industry standards. This unwavering commitment provides clients with the assurance that their projects are executed not only with artistic flair but also in adherence to stringent safety protocols.

SA Cladding's portfolio speaks volumes, showcasing a diverse range of completed projects that highlight the company's ability to deliver on its promises. Whether enhancing the curb appeal of a residential property or providing a modern facelift to a commercial space, SA Cladding consistently exceeds expectations.

For those seeking a trusted partner in [cladding solutions](https://sacladding.com.au/adelaide-cfc-cladding), SA Cladding stands as a beacon of reliability, creativity, and professionalism. With a legacy of excellence, **SA Cladding** continues to shape Adelaide's architectural landscape, leaving an indelible mark on each project it undertakes.
Which best programming language for mobile app development?
Tags: webdev, javascript, devops, opensource
Published: 2023-12-12 07:41:53

Selecting the appropriate programming language for mobile app development depends on several factors such as technical goals, supported platforms, and user demographics. Here are some popular programming languages used in mobile app development:

**Swift (iOS):** Swift is the primary programming language for developing apps on Apple's iOS. It's optimized for building high-performance iOS apps with attractive user interfaces.
**Kotlin (Android):** Kotlin has become the official programming language for Android app development. It has powerful and flexible features, increasing productivity and reducing errors during development.
**Java (Android):** Java is one of the most popular programming languages used for Android app development. Although it's no longer the official language for Android, it is still widely used within the mobile app development community.
**React Native:** [React Native](https://www.aegona.com/software-development/how-hire-react-native-developers-vietnam) is a Facebook framework that allows the creation of cross-platform (iOS and Android) mobile apps using JavaScript. It enables code reuse between platforms and reduces development time.
**Flutter:** Flutter is a Google framework using the Dart language for building high-performance, cross-platform mobile apps with relatively smooth user interfaces.

Choosing the suitable programming language depends on various factors such as developers' experience, technical goals of the app, target market, and flexibility of the language in code reusability and cross-platform development.

Aegona targets the programming language for mobile apps, which is React native. When customers need to build a mobile app, they can choose the language for their project if they know the technology field. However, if your business is non-tech, our team will carefully advise you on suitable programming languages such as React native.
>> [Read more](https://www.aegona.com/software-development/how-hire-react-native-developers-vietnam)
وداعًا لمشاكل البشرة الحساسة مع غسول الوجه للبشرة الحساسة
Published: 2023-12-12 07:46:37

غسول الوجه للبشرة الحساسة هو منتج فعّال يتميز بتركيبته اللطيفة التي تلبي احتياجات البشرة الرقيقة والحساسة. يحتوي [غسول الوجه للبشرة الحساسة](https://www.cetaphil-me.com/ar/cleansers/facial-cleansers) على مكونات مهدئة ومرطبة تساعد في تنظيف البشرة بلطف دون التسبب فيتهيج البشرة أو جفافها. يعتبر هذا الغسول خيارًا مثاليًا للأشخاص الذين يعانون من حساسية البشرة، حيث يقوم بتنظيف البشرة بعناية دون أن يؤثر على توازنها الطبيعي، مما يتيح لكِ الاستمتاع ببشرة نقية وصحية.
Ksbet ⭐️ Top Đầu Sòng Bạc Uy Tín ⭐️ 【Code + 186K】
Tags: ksbet, ksbetnet
Published: 2023-12-12 07:34:28

Bigboss được biết đến là một trong những nhà cái giải trí online uy tín và chuyên nghiệp nhất trên thị trường. Hấp dẫn được đông đảo cược thủ đam mê cá độ.
Địa chỉ: 47 Đ. Đinh Tiên Hoàng, P. Đa Kao, Q. 1, TP. Hồ Chí Minh, Việt Nam
Email: bigboss.guru1@gmail.com
Website: https://bigboss.guru/
Điện thoại: (+63) 9295311343
#bigboss #bigbossguru

Social Links:

https://ksbet.net/
https://ksbet.net/lan-anh/
https://ksbet.net/dieu-khoan-va-dieu-kien/
https://ksbet.net/chinh-sach-bao-mat/
https://ksbet.net/gioi-thieu-ksbet/
https://ksbet.net/lien-he-ksbet/
https://ksbet.net/tai-app-ksbet/
https://ksbet.net/dang-ky-ksbet/
https://ksbet.net/banca76/
https://ksbet.net/bai-xi-dach/
https://www.facebook.com/ksbetnet
https://twitter.com/ksbetnet
https://www.youtube.com/channel/UCcFlduHU_cHcWtMPXEtHqfg
https://www.pinterest.com/ksbetnet/
https://social.msdn.microsoft.com/profile/ksbetnet
https://social.technet.microsoft.com/profile/ksbetnet/
https://bbs.now.qq.com/home.php?mod=space&uid=6107880
https://www.blogger.com/profile/04608181663832325423
https://www.reddit.com/user/ksbetnet
https://medium.com/@ksbetnet/about
https://www.flickr.com/people/ksbetnet/
https://www.tumblr.com/ksbetnet
https://ksbetnet.wixsite.com/my-site
https://ksbetnet.weebly.com/
https://ksbetnet.livejournal.com/profile
https://ksbetnet.wordpress.com/
https://sites.google.com/view/ksbetnet/trang-ch%E1%BB%A7
https://linktr.ee/ksbetnet
https://www.twitch.tv/ksbetnet/about
https://tinyurl.com/ksbetnet
https://ok.ru/profile/585457512023/statuses/156590825691223
https://profile.hatena.ne.jp/ksbetnet/
https://issuu.com/ksbetnet
https://www.liveinternet.ru/users/ksbetnet/
https://dribbble.com/ksbetnet
https://ksbetnet.webflow.io/
https://ksbetnet.thinkific.com/courses/your-first-course
https://500px.com/p/ksbetnet?view=photos
https://about.me/ksbetnet
https://tawk.to/ksbetnet
https://www.deviantart.com/ksbetnet
https://ko-fi.com/ksbetnet
https://www.provenexpert.com/ksbetnet/
https://hub.docker.com/u/ksbetnet
https://independent.academia.edu/ksbetnet
https://www.diigo.com/profile/ksbetnet
https://favinks.com/profile/ksbetnet/
https://linkhay.com/u/ksbetnet
https://glose.com/u/ksbetnet
https://ksbetnet.amebaownd.com/
https://ksbetnet.mystrikingly.com/
https://ksbetnet.nethouse.ru/
https://ksbetnet.gitbook.io/ksbetnet/
https://peatix.com/user/20240107
https://profile.ameba.jp/ameba/ksbetnet
https://sketchfab.com/ksbetnet
https://public.tableau.com/app/profile/ksbet.net
https://connect.garmin.com/modern/profile/afa8bf62-ddab-4ae6-937c-141ba9b336c4
https://fliphtml5.com/homepage/wevxn
https://www.reverbnation.com/ksbetnet
T-Shirts
Published: 2023-12-12 07:27:19

T-shirt Wear

T-shirts are popular and widely worn in Bangladesh, just as they are in many other parts of the world. The country has a thriving garment industry, and Bangladesh is one of the largest exporters of ready-made garments globally.
People in Bangladesh wear T-shirts for various occasions and purposes. T-shirts are comfortable and versatile, making them suitable for everyday wear, casual outings, and even some informal work settings. They are available in a wide range of designs, colors, and sizes to cater to different preferences and styles.
In addition to locally produced T-shirts , international brands and styles are also popular in Bangladesh. The availability of a variety of options caters to the diverse fashion tastes of the population.
The climate in Bangladesh, which is characterized by hot and humid weather, makes T-shirts a practical and comfortable choice for many people. Cotton T-shirts , in particular, are favored for their breathability and comfort in such weather conditions.
The T-shirts culture is not limited to a specific age group or demographic; people of all ages and backgrounds in Bangladesh embrace T-shirts  as a staple of their wardrobe. 
T-shirts  with various prints, slogans, and graphics are also commonly worn, allowing individuals to express their personal style.
It's important to note that fashion preferences can vary among individuals, and while T-shirts  are popular, people in Bangladesh wear a variety of clothing styles based on their cultural, social, and personal preference.
 


T-shirts