teleren/devto huggingface dataset:
Native Internationalization (Intl) in Angular
Tags: angular, discuss, productivity, opensource
Published: 2023-01-17 09:05:06

[The Internationalization (Intl)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl) is a built-in JavaScript library that provides a number of useful internationalisation (i18n) and localisation (l10n) features for web applications.

Some of the features provided by the Intl API include support for formatting and parsing numbers, dates, and currencies according to the conventions of different locales, as well as support for collation and case-insensitive sorting of strings.

[The Intl is supported by all modern web browsers](https://caniuse.com/?search=Intl), and it is widely used in web applications to ensure that they can be easily localised and adapted to different languages and cultures.

Initially, I did not pay much attention to the Intl API as browser support was not as strong, but now (in my opinion) we should take advantage of it as the support has improved.

As I work only in Angular, I decided to build a small library, that wraps some [Intl APIs to Angular Pipes](https://github.com/wanoo21/ngx-intl-helper/tree/main/helpers).

There's nothing magic in there, simple pipes with custom configurations:

```ts
async transform(value: Iterable<string>, locale?: string | string[]): Promise<string> {
    try {
      return new Intl.ListFormat(locale || this.locale, this.defaultOptions).format(Array.from(value));
    } catch (e) {
      return Array.from(value).join(', ');
    }
}
```

That's not a library to replace the standard Angular `currency`, `date`, `number` pipes, is just a way to play around with the new Intl features within Angular applications.

It can be used in production as well, if lazy loading poly fills will be implemented.

Here's the link to GitHub repo:
{% embed https://github.com/wanoo21/ngx-intl-helper %}

Feel free to contribute or ask questions.
My Journey in Open Source - conditional-fn
Tags: javascript, typescript, opensource, github
Published: 2023-01-17 09:00:00

[Link to the repo](https://github.com/Cadienvan/conditional-fn)

## What is this?

A higher-order function to provide a Feature Flag mechanism with multiple weights.

## How do I install it?

```bash
npm install conditional-fn
```

## How can I use it?

### Use-case #1 - Simple Feature Flag (Boolean)

```javascript
import { conditional } from 'conditional-fn';

const shouldICallFnA = true;

const fnToCall = conditional(
  () => console.log('fnA'),
  () => console.log('fnB'),
  shouldICallFnA
)

fnToCall(); // logs 'fnA'
```

### Use-case #2 - Simple Feature Flag (Function)

```javascript
import { conditional } from 'conditional-fn';

const shouldICallFnA = () => false;

const fnToCall = conditional(
  () => console.log('fnA'),
  () => console.log('fnB'),
  shouldICallFnA
)

fnToCall(); // logs 'fnB'
```
## API

The `conditional` function accepts three arguments: two functions and a boolean or a function that returns a boolean. The function will return one of the provided functions based on the boolean or the function that returns a boolean.

## Tests

You can run the tests by using the following command:

```bash
npm test
```
Daftar Agen Judi Bola Resmi dan Terpercaya
Tags: agenbola, agenbolasbob, agenbolaterperca
Published: 2023-01-17 08:49:50


agen resmi SBOBET
[AGENBOLA](https://agenbola2005.xyz/) SBOBET
MERUPAKAN AGEN RESMI SBOBET TERPERCAYA
Menang berapapun pasti dibayar. Agenbola Berdiri sejak tahun 2005 dengan lisensi resmi dari SBOBET sebagai agen judi bola terpercaya di indonesia. Kami menerima pendaftaran akun sbobet melalui contact whatsapp yang siap melayani kamu dengan ramah selama 24 jam penuh. .



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

agen SBOBET indonesia
AGENBOLA SBOBET
MEMBERIKAN LAYANAN CS 24 JAM NONSTOP
Tersedia layanan pelanggan / CS yang aktif 24 jam melayani segala keperluan Anda. Proses deposit dan tarik dana / withdraw maksimal 3 menit. CS Ramah, Depo Cepat, WD Mudah, Data Aman. Penarikan dana dalam jumlah besar maupun kecil pasti di proses tanpa tunggu.

promo agen bola SBOBET
PROMO TERBAIK & TANPA BATAS DI
[AGENBOLA SBOBET](https://agenbola2005.xyz/)
Banyak promo yang agen bola tawarkan sebagai bentuk apresiasi kami kepada pecinta bola di Indonesia. Kami memberikan Jersey Original secara gratis untuk semua member Promo bonus deposit bagi Anda yang pertama kali registrasi. Kami juga menyediakan promo mingguan tanpa batas maksimum.

daftar agen bola SBOBET
1 AKUN
AGENBOLA SBOBET
UNTUK SEMUA PERMAINAN
Hanya dengan 1 ID saja Anda sudah dapat menikmati berbagai macam permainan seperti sports / olahraga, slots, games, Arcade, live casino dan E-sports. Ingat hanya dengan 1 Akun saja, mainkan keseruan game game online kesayangan kamu dan dapatkan peluang jackpotnya bersama Agen Bola.
Getting errors on running react native android
Tags: reactnative, gradle
Published: 2023-01-17 08:45:28

HI, App was running fine before 1 month, Now i am trying to run my application and getting the compileDebugJavaWithJavac for npms installed one by one, Ios is working fine, what would be the issue.
React native version is:**"react-native": "0.63.2"**,
If i increase the react native version i am getting other npm errors,
Blockchain scalability and security
Published: 2023-01-17 08:38:52

Blockchain scalability refers to the ability of a blockchain network to handle a large number of transactions per second (TPS) and a large number of users. As of now, most public blockchain networks, such as Bitcoin and Ethereum, can handle only a limited number of TPS due to their design. This can lead to slow transaction processing times and high transaction fees.

Security is an important aspect of blockchain technology, as it ensures that the data stored on the blockchain is tamper-proof and cannot be modified without the consensus of the network. However, blockchain security is also challenged by various attacks, such as 51% attack, double-spending attack, and Sybil attack.

To overcome these issues, various solutions have been proposed such as sharding, off-chain transactions, and layer 2 solutions. These solutions aim to increase the scalability of blockchain networks without compromising on security.

Research and development in the field of blockchain scalability and security is an ongoing process, with new solutions and technologies being proposed and tested regularly.

It is important to note that, scaling and security are both critical for blockchain to be adopted for mainstream use cases. Achieving a balance between scalability and security is crucial for the blockchain to be able to handle a large number of transactions and users without compromising on the security of the network.
Steel Grit
Tags: steelgritsupplier
Published: 2023-01-17 08:28:32

It is angular in shape. it is employed to get rid of old paint, rust, and other hard contaminants from the surface of the substrate. Mostly **[steel grit](https://www.shotblastingmachines.in/steel-grit)** is employed for removing mill scale and different degrees of coatings from the surface. As steel grits are angular in shape in order that they remove old paint easily but if the component material is soft then there'll be chances of injury. therefore the selection of steel grit is depended upon the component material and also the aim of the blasting process to be done.
final keyword in java explained in 2 mins
Tags: java
Published: 2023-01-17 08:16:11

In Java, `final` is an access modifier. It could be used to modify: 

## final for class
`class`: this means the class cannot be inherited by subclasses. 
```java
public final class Dog extends Animal
{
    // code
}
```

## final for method
`method`: this means the method cannot be overwritten by subclasses. Use this if you want this method to be non-modifiable by subclasses. 
```java
public class Aminal 
{
    // other code
    public final eat() {
        // code
    }
}
```

## final for variable 
`variable`: this means the variable can only be assigned once. Use this when you want a constant variable. Typical usage is like
```java
final double PI = 3.14159;
```
Also, we remark that `Math.PI` is a built-in constant variable declared using final. `Math` is a build-in `final` class that cannot be inherited. 

A peek to the Math class: 

```java
public final class Math {

    /**
     * Don't let anyone instantiate this class.
     */
    private Math() {}

    /**
     * The {@code double} value that is closer than any other to
     * <i>e</i>, the base of the natural logarithms.
     */
    public static final double E = 2.7182818284590452354;

    /**
     * The {@code double} value that is closer than any other to
     * <i>pi</i>, the ratio of the circumference of a circle to its
     * diameter.
     */
    public static final double PI = 3.14159265358979323846;
// ... other code ... 
```

## reference 

[code with John](https://www.youtube.com/watch?v=r9CMJZ4T__8)
Magento 2.4.6 is on the horizon! - Adobe 2.4.6
Tags: update, magento, magento246, ecommerce
Published: 2023-01-17 08:10:26

Adobe Commerce 2.4.6 and Magento Open Source 2.4.6 will be available for download on March 14, 2023.

Each new version of Magento brings exciting new features, security enhancements, and performance improvements. The Beta Release Notes for [Adobe Commerce 2.4.6](https://magecomp.com/blog/magento-2-4-6-release-coming-soon/) and Magento Open Source 2.4.6 have been released, and we can't wait to see what's in store.

**What's New in Magento 2.4.6?**
Adobe Commerce 2.4.6 introduces support for PHP 8.2, while still supporting PHP 8.1 and discontinuing support for PHP 7.4. Core Composer dependencies and third-party libraries will also be updated to be compatible with PHP 8.2.

The latest Magento 2.4.6 will include 300 quality fixes and enhancements, as well as major performance and scalability improvements.

**Some of the highlights of the Beta Release Notes for Adobe Commerce 2.4.6 include:**

- Security enhancements, including 8 security fixes
- Support for PHP 8.2 and deprecated support for PHP 8.1
- Support for Composer 2.2.x
- Support for OpenSearch 2.x on both Cloud and on-premises
- Support for Redis 7.0.x and ElasticSearch 8.x
- Support for MariaDB 10.6
- Updated JavaScript libraries and removed outdated dependencies
- Performance and scalability improvements, including improved order processing and customer segment operations
- Accessibility updates for the storefront experience on Venia (PWA)
- Braintree enhancements, including Pay Later button and banners for Italy and Spain, and fraud protection, ACH, and Local Payment Methods web hooks
- GraphQL improvements, including faster category querying and bulk cart operations
- Page Builder v.1.7.3 and PWA Studio v.13.0.x support

In addition to these highlights, hundreds of other issues have been resolved in the latest Adobe Commerce 2.4.6 and Magento Open Source 2.4.6.

The official Beta Release Notes for Adobe Commerce 2.4.6 can be found here.

Don't wait until the last minute to [upgrade your store to Magento 2.4.6.](https://magecomp.com/magento-2-upgrade-service.html) Book your upgrade now to be ready when it's released on March 14, 2023. And keep an eye out for the pre-release on February 28, 2023.

Happy reading and stay updated with the latest Magento news!
Arguments vs Parameters 🚀
Tags: javascript, tutorial, webdev, programming
Published: 2023-01-17 08:03:03

Arguments vs Parameters is quite a confusing topic not only for beginners but experienced dev also. Even though they use this on daily basis but couldn't explain theoretically.
Today we gonna discus about it.

**One thing you must know before reading further**

**Parameter --> variable**
**Arguments --> Data**

One of the fundamental building blocks in JavaScript programming is a function. It's a block of code designed to perform a particular task.

Functions are reusable code which you can use anywhere in your program. They eliminate the need to repeat the same code all the time.

To use functions in a powerful way, you can pass values in a function to use them.

Here is an example of a function:

```js
function add(){
return 2+3;
}

add()
```

This is a _**function declaration**_, the name of the function is **add**, and it was called after the function with add() . The result of the function will be 5.

## How to use parameter and arguments in a function
**Take a look at the function down below**

```js
function add(x,y){
return x+y;
}

add(2,3);
```

We have introduced x and y here and changed the location of the 2 and 3. x and y are the parameters while 2 and 3 are the arguments here.

A **parameter** is one of the **variables** in a function. And when a method is called, the **arguments** are the **data** you pass into the method's parameters.


When the function is called with add(2, 3) the arguments 2 and 3 are assigned to x and y, respectively. This means that in the function, x will be replaced with 2 and y will be replaced with 3.

If the function is called with a different argument, the same applies. **Parameters** are like **placeholders** for function arguments.

## The Power of Arguments
We can use arguments more efficiently when we want to make functions more re-useable, or when we want to make calling functions inside another functions more powerful.

Here is an example:

```js
function add(x, y){
	return x + y
}

function multiply(a, b, c){ // a = 1, b = 2, c = 3
	const num1 = add(a, b) // num1 = add(1, 2) = 3
	const num2 = add(b, c) // num2 = add(2, 3) = 5
    
	return num1 * num2 // 15
}

multiply(1, 2, 3)
// returns 15

```

The first function add() has two parameters, x and y. The function returns the addition of the two parameters.

The second function multiply() has three parameters: inside the function, two variables are declared in it, num1 and num2. num1 will store the value of the result of add(a, b), and num2 will store the value of the result of add(b, c). At the end the multiply function will return the value of num1 multiplied by num2.

multiply is called with three arguments which are 1, 2 and 3. add(a, b) will be add(1, 2) which will return 3. add(b, c) will be add(2, 3) which will return 5.

num1 will have the value of 3 while num2 will be 5. num1 * num2 will return 15.

Arguments are passed in the multiply function which are also used as arguments for the add function.
Haunting of Your Code
Tags: career, beginners, productivity, programming
Published: 2023-01-17 08:02:17

[facebook.com/Trinwhocode](https://facebook.com/Trinwhocode)

Ah, technical debt. The bane of every software developer’s existence. You may think that technical debt is just a few extra lines of code, but it’s so much more than that. It’s the unseen factors that can cause your project to go off the rails, and it can creep up on you when you least expect it. 

Technical debt can take many forms, from the simple (extra lines of code) to the complex (inadequate testing). It’s like a ticking time bomb that can go off at any moment, and it can cause serious problems if not managed properly.

But that’s not all. There are other unseen factors that can contribute to technical debt. For example, relying on outdated technology can lead to compatibility issues, which can create more technical debt. Neglecting to refactor code can also create technical debt over time. And poor coding practices can lead to a whole host of problems down the road.

So how do you manage technical debt? The best way is to be proactive and address any potential problems as soon as they arise. Refactoring code regularly, using modern technologies, and following good coding practices can go a long way in preventing technical debt.

And if you do find yourself in a situation where technical debt has already accumulated, don’t panic! There are ways to manage it, such as dedicating time to refactoring and investing in modern technologies.

So the next time you’re coding, remember that technical debt isn’t just a few extra lines of code. It’s the unseen factors that can cause big problems down the road if they’re not managed properly. So take the time to prevent technical debt from creeping up on you, and you’ll be able to enjoy the fruits of your labor for years to come.

[linkedin.com/in/trinmar](https://www.linkedin.com/in/trinmar)
Today's Daily Dose of Programming Humor
Tags: jokes, dailydeveloperjokes
Published: 2023-01-17 08:00:29

---
title: "Today's Daily Dose of Programming Humor"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1259ab8700f.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q___: Why was nobody given food at the developer conference?

___A___: It was a serverless function!
 -->
Introduction to Amazon SNS
Tags: sns, aws
Published: 2023-01-17 07:59:33

Written by: Rajat Goel

Amazon Simple Notification Service (SNS) is a fully managed, messaging service provided by Amazon Web Services (AWS). It allows users to send and receive messages between different applications and services, making it a powerful tool for building event-driven architectures.

One of the key features of Amazon SNS is its ability to handle a large number of messages. SNS can automatically scale to handle millions of messages per second, making it a great solution for businesses that need to send high volumes of messages, such as those in the gaming and finance industries.

Another important feature of SNS is its support for various messaging protocols. SNS supports the use of HTTP, HTTPS, email, and SMS as transport protocols, making it easy to send messages to a wide range of endpoints. This allows you to reach a broad audience and integrate with a variety of systems and services.

One of the benefits of using Amazon SNS is its ability to fan-out messages. SNS allows you to send messages to multiple subscribers, allowing you to build a publish-subscribe pattern in your architecture. This allows different parts of your system to subscribe to specific messages, allowing you to build a highly decoupled and flexible architecture.

Another advantage of using Amazon SNS is its support for message filtering. SNS allows you to filter messages based on specific attributes, such as message content or sender. This allows you to selectively route messages to specific subscribers, making it easy to build a more targeted messaging system.

In conclusion, Amazon SNS is a highly scalable and flexible messaging service that can help organizations to build event-driven architectures. It allows you to send and receive messages between different applications and services, and supports a wide range of messaging protocols. Its ability to fan-out messages and support message filtering makes it a powerful tool for building decoupled and targeted messaging systems. Additionally, its support for a wide range of protocols makes it easy to reach a broad audience, making it a great solution for organizations looking to build event-driven architectures in the AWS cloud.
Introduction to Amazon Virtual Private Cloud (VPC)
Published: 2023-01-17 07:56:08

Written by: Rajat Goel

Amazon Virtual Private Cloud (VPC) is a fully managed, virtual private network service provided by Amazon Web Services (AWS). It allows users to create their own virtual network in the AWS cloud, giving them complete control over their network environment.

One of the key features of Amazon VPC is its ability to provide a high level of security for your resources. With VPC, you can create a virtual network that is isolated from the public internet, ensuring that your resources are protected from unauthorized access. Additionally, you have the ability to control access to resources within your VPC using security groups and network ACLs, which act as virtual firewalls.

Another important feature of Amazon VPC is its flexibility. VPC allows you to create a custom network topology that meets the specific needs of your organization. For example, you can create multiple subnets within a VPC, each with its own security settings and IP address range. This allows you to segment your network and control access to resources based on different security requirements.

One of the benefits of using Amazon VPC is the ability to connect your VPC to your existing IT infrastructure. This allows you to extend your on-premises network into the AWS cloud, allowing you to use the same security and management tools you use today. Additionally, you can use VPC to connect to other AWS services such as Amazon S3, Amazon RDS, and Amazon Elastic Compute Cloud (EC2), which can provide additional benefits such as increased scalability and high availability.

Another advantage of using Amazon VPC is the ability to use it with other AWS services such as Amazon Elastic Block Store (EBS) and Amazon Elastic IP (EIP). These services provide additional storage and network options for your resources, allowing you to create a highly available and fault-tolerant environment. Additionally, VPC supports VPN connections which allow you to establish a secure connection between your on-premises data center and your VPC, allowing you to access resources in your VPC as if they were on your local network.

In conclusion, Amazon VPC is a highly secure, flexible, and scalable service that can help organizations to create a virtual network in the AWS cloud. It allows you to control access to resources, and also provides the ability to connect to other AWS services, making it a powerful tool for building a highly available and fault-tolerant environment. Additionally, its support for VPN connections allows for a seamless integration with your existing on-premises infrastructure, making it easy to extend your network into the cloud. 

Amazon VPC is a great solution for organizations looking to take advantage of the benefits of the AWS cloud while maintaining control over their network environment.