teleren/devto huggingface dataset:
Enhancing Cloud Security: Implementing Private Endpoints in Azure
Published: 2024-01-08 18:25:00

In the realm of cloud computing, securing resources is paramount. Microsoft Azure offers a robust solution through its Private Endpoints, designed to provide secure and private connectivity to Azure services. This feature is crucial for organizations looking to minimize public internet exposure and uphold stringent security protocols.

## Key Features and Benefits of Azure Private Endpoints:

Azure Private Endpoints offer a direct connection to Azure services from a virtual network, significantly reducing public internet exposure.
This approach ensures a high level of security, making it ideal for meeting compliance demands and safeguarding against data breaches.
By routing traffic within the Azure network, these endpoints enhance both security and performance, creating a more efficient cloud environment.

## Understanding the Architecture Components:


![Private Endpoints in Azure](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rfzus2l5f1qj7tul8so4.png)

Resource Group (RG): Streamlines the management, deployment, and monitoring of cloud-based resources.
Virtual Network (VNet): Offers a secure, isolated network for deploying Azure resources.
Subnets: Divides the VNet into segments, enabling better resource organization and security management.
Private Endpoints: These network interfaces connect to Azure services securely and privately, residing within designated subnets.
Windows Web App: A web application running on Windows OS within Azure, governed by specific service plans.
Service Plans: Dictate the compute resources allocated to a web app.
Azure Key Vault: Manages keys, secrets, and certificates securely.
Storage Account: Provides a secure location for diverse data storage needs.
Linux Function App: A serverless solution for running event-triggered code without extensive infrastructure management.
Data Client Configuration: Retrieves configuration details for the service principal or Azure user in Terraform applications.

## Streamlining Deployment and Management:


![Private Endpoints in Azure deployment](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ogvddryr87hlqswol0bj.png)



Utilizing templates from Brainboard.co's catalog allows for easy cloning and customization of this architecture.
Integrated CI/CD tools within Brainboard.co enable security and cost analysis before deployment.
Clear communication with colleagues is facilitated through visual representation of the architecture, simplifying explanations for those less familiar with Terraform.


![Private Endpoints in Azure documentation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2gww0b86gfq5861zs8zl.png)



## Conclusion:

Azure Private Endpoints are an essential component for any organization prioritizing cloud security. By integrating these endpoints into their Azure architecture, businesses can ensure a secure, efficient, and compliant cloud environment. For further details and deployment options, [visit Brainboard.co.](https://app.brainboard.co)
What is a hypervisor?
Tags: hypervisor, virtualmachine
Published: 2024-01-08 18:24:42

What is a hypervisor? A hypervisor is a software that creates and runs virtual machines (VMs). It allows you to run multiple operating systems on a single physical machine and share the underlying hardware resources. It will allocate the resources (CPU, RAM, Storage, etc) to each VM. <br><br>

There are two types:

- Type 1: Bare Metal Hypervisor (Native Hypervisor)
    -  What? It directly communicates with hardware, making it efficient and secure without a middleman OS.It can allocate more resources to virtual machines than your server actually has. For instance, with 128GB of RAM and eight VMs, you can assign 24GB to each, totaling 192GB. However, VMs use only the necessary RAM for their tasks, not the full allocated amount.
    -  Who? Used by enterprises and data centers (e.g., Amazon, Google) for running multiple OS on one machine.
    -  When to Use: Large data centers or server farms for maximum performance and direct hardware access.
    - Example: VMware ESXi, Microsoft Hyper-V.


- Type 2: Hosted Hypervisor
    - What? Operates within the regular OS, less powerful but user-friendly. Type 1 hypervisors allocate resources dynamically based on VM needs, making it easier. Type 2 hypervisors use fixed allocations, so if a user assigns 8GB to a VM, it takes that amount even if not fully used. This can lead to resource issues on the host machine.
    - Who? Used by developers and individuals for running multiple OS on one machine.
    - When to Use: Simple setups or software development when top performance is not critical.
    - Example: VMware Workstation, Oracle VM VirtualBox.

Here is a diagram that explains it better than words. :smile: <br><br>
![Hypervisor](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Hyperviseur.svg/400px-Hyperviseur.svg.png)



**Resources:**
- [What is a hypervisor?](https://aws.amazon.com/what-is/hypervisor/)
- [Hypervisor Diagram](https://en.wikipedia.org/wiki/Hypervisor#/media/File:Hyperviseur.svg)
JavaScript Objects Unleashed: A Journey into Properties, Methods, and Prototypes
Published: 2024-01-08 18:24:00

Hello, enthusiastic developers today I will take a deep dive into the JavaScript object. Let's start.....

First of all, in JavaScript Object is called king. Anyone who can understand object property can understand JavaScript easily.
An object in JavaScript is a collection of key-value sometimes called name-values. Each key-value pair is called a property. A property can be a function, an array, an object itself, or any primitive data type such as an integer, or string.

```
const player = {
 firstName: "David",
 lastName: "Cameron",
 age:30,
 fullName: function(){
    return this.firstName + "  "+ this.lastName
   }
}
```

**Way of access of object property:**
There are two ways of accessing object property

**1.Dot notation 
2.Square bracket notation**

**Dot Natation**

```
player.firstName // output is David
player.fullName() //output is David Cameron
```

**Square bracket Notation**

```
player["firstName"] // output is David
player["age"] //output is 30
```

**Notes: ** Another way of accessing objects is 

```
let x= "age"
player[x]
```
**Delete object property:**
To delete a property from an object we can use the delete keyword.

delete player.firstName//return true and delete firstName property

Let's see what happens if we try yo call the fullName method which uses both firstName and lastName property of the player object but we have deleted the firstName

console.log(player.fullName()) //output is undefined Cameron

output return undefined in firstName because we trying to access a property of the player object that does not exist.

**Object Method:**
A function that is used as an object property is the call method.

```
const player = {
 firstName: "David",
 lastName: "Cameron",
 age:30,
 fullName: function(){
    return this.firstName + "  "+ this.lastName
   }
}
```
here fullName() is an object method.

To check if an object has a property using the hasOwnProperty method. When the property is available in the object it will return true otherwise return false.

```
console.log(player.hasOwnProperty('firstName')) //output is true
console.log(player.hasOwnProperty('middleName')) //output is false
```
To loop through the properties of an object use normally for...in loop.

```
const player = {
 firstName: "David",
 lastName: "Cameron",
 age:30,
 fullName: function(){
    return this.firstName + "  "+ this.lastName
   }
}


for (let x in player) {
  console.log(player[x])
} 
//output is
David
Cameron
30
[Function: fullName]
```

A constructor function is a function that is used to create new objects with the same properties and methods.

```
function player(name,age){
 this.name = name,
 this.age =age
}

let x = new player ('Messi',35)
let y = new player ('Ronaldo',37)

function player(name,age){
 this.name = name,
this.age =age
}

let x = new player ('Messi',35)
let y = new player ('Ronaldo',37)

console.log(x)
console.log(y)

//output is 
player { name: 'Messi', age: 35 }
player { name: 'Ronaldo', age: 37}
```
Day 2.2: SCPs (service control policies)
Published: 2024-01-08 18:23:01

>**What is Service Control Policies?**
> => This is another type of policy that we can apply in AWS. It allow you to control what aws services and actions are accessible for aws accounts within your organization. 
> => SCPs operate on a "deny by default" principle, where you explicitly define permissions to deny or allow. They act as an additional layer of control on top of IAM policies.
> => In simple terms, SCPs help you say who gets to use what.


|**Service Control Policies:** |
|--|
|**Service Control Policies** are associated with a service called _**<u>AWS organization</u>**_. 
|**<u>AWS organization:</u>** It is a service that enable you to combine multiple AWS accounts into an organization that you create and centrally manage. It simplifies billing and cost allocation, applies policies across your accounts, and allow you to create a hierarchical structure with organizational units(OUs).
|![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1yf7wlquwiljqz7axkjx.png)|
|**<u>Root:</u>** Root is the top-level entity in your AWS Organizations hierarchy. The purpose of root is where you initially set up your organization-wide controls, such as SCPs that apply to all accounts.
|AWS Organizations supports a hierarchical structure with the root at the top and OUs beneath it.|
|_<u>**Lets understand this with an analogy**:</u>_
|Imagine **AWS** as a large corporate building. Each floor represents a different department or team (**organizational unit or OUs**). The CEO's office on the top floor(**Root**) makes high-level decisions for the entire company. Each department floor has specific rules(**Service control policies or SCP's**) at its entrance stating what that department can or cannot access.
|So, AWS Organizations is like a well organized corporate building where the CEO's office(**Root**) sets the main rules, and each department(**OU**) has its own rules posted at the entrance, ensuring a structured and controlled environment.|
Making async requests simple
Tags: react, webdev, typescript, npm
Published: 2024-01-08 18:14:35

If you're a front-end web developer, you will inevitably run into the predicament of managing your asynchronous call workflow. You want to write clean code AND provide a seamless experience for the end-user.

A single data fetch requires several variables to capture the various states of your request...

1). The data being returned from the query.
2). The state of the data fetch.
3). Error handling.
4). Pagination?
5). Refetching of data if dependent variables change.

The list goes on and on depending on the demands of the application. Add more than a single data fetch and your code can quickly spiral out of control with multiple variables and similar naming conventions.

Enter Tanstack Query. TanStack Query is an asynchronous state management tool for various web frameworks, including popular ones such as Vue and React. Using the example of asynchronous querying, this lightweight library allows for a simple function call, passing your asynchronous request, and returning a SINGLE object. 

 `const fetchBlog = useQuery({
 queryFn: () => <async_call_to_fetch_blog>
 })
`
The fetchBlog object now contains the essential goodies for rendering your component/page, such as fetchBlog.data, fetchBlog.isLoading, fetchBlog.refetch(), fetchBlog.error, and many other useless tools. You can also destructure the assignment to look like { data, isLoading, refetch, error }. Pair this with a state management tool of your choosing and your speed, efficiency, and clarity will soar!
Weekly Roundup 034 (Jan 01): 🔥Hot Topics🔥 in #workplace, #sharepoint, and #powerplatform
Tags: roundup, powerplatform, sharepoint, workplace
Published: 2024-01-08 18:01:45

Hey fellow developers! It's @jaloplo, here to give you the latest scoop on what's been happening in the [#workplace](https://dev.to/t/workplace), [#sharepoint](https://dev.to/t/sharepoint), and [#powerplatform](https://dev.to/t/powerplatform) communities. 😎

## [#workplace](https://dev.to/t/workplace)

- [5 Ways to Build Resilience for Any Career Challenges](https://dev.to/brighty_miriam/5-ways-to-build-resilience-for-any-career-challenges-462a) by [Miriam Bright](https://dev.to/brighty_miriam)
- [6 Proven Steps for a Recovery Plan After a Career Setback](https://dev.to/brighty_miriam/6-proven-steps-for-a-recovery-plan-after-a-career-setback-m8i) by [Miriam Bright](https://dev.to/brighty_miriam)
- [Missed the Promotion Opportunity? Here's What You Can Take Away](https://dev.to/brighty_miriam/missed-the-promotion-opportunity-heres-what-you-can-take-away-3a76) by [Miriam Bright](https://dev.to/brighty_miriam)
- [10 Tips for Designing and Developing Your Career Roadmap](https://dev.to/brighty_miriam/10-tips-for-designing-and-developing-your-career-roadmap-4m08) by [Miriam Bright](https://dev.to/brighty_miriam)

## [#sharepoint](https://dev.to/t/sharepoint)

- [PnP SPFx RichText control](https://dev.to/guidozam/pnp-spfx-richtext-control-42i) by [Guido Zambarda](https://dev.to/guidozam)

> *Are you well-acquainted with SharePoint, Microsoft Teams, or OneDrive and their capacity to enhance employee value? Familiar with the intricacies of Power Apps, Power Automate, or other Power Platform services? Concerned about the Workplace experience and eager to share insightful perspectives?* 
> 
> *Let's harness your expertise to create valuable content! I'm on the lookout for collaborators to co-author insightful articles and support others. 🚀💼 Connect with me on [Twitter](https://twitter.com/jaloplo), [Mastodon](https://techhub.social/@jaimelopezlopez) or [LinkedIn](https://www.linkedin.com/in/jaimelopezlopez/). Feel free to send me a message!*


That's all for this week's roundup! Thanks for tuning in, and remember to keep the discussions lively and informative in our tags. 💬 If you have any suggestions for future topics, feel free to drop them in the comments below. See you next week! 👋
A New Beginning
Published: 2024-01-08 18:01:03

Hello everyone, welcome to a new beginning (my new beginning)! I'm a newbie developer learning to venture out into the dev world. I started learning a year ago and little by little have learned about Frontend and now starting to take a deep dive into Backend. 

Over the past year I have learned stuff building projects 🚀 and am hoping to express myself in the upcoming blog posts. It has been a week since new year but the energy to start something new on new year has given me the courage to write my first blog post.

Amidst all the interesting and informative blog posts out there this is my formal 

###"Hello World"

![Hello everyone](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qmq43bosiezz8kwuve3t.png)

to the **Dev community**.

I hope to learn more in the tech space this year. 
The goals I have set this year are:
-Learn Next js
-Learn Typescript
-Migrate to SQL database from NoSQL 

Juggling between college studies and programming 😅, I intend to use the little time I find free to share my experiences here. Excited to see how this unfolds.

-Just a Random Guy Learning to Code 😁
Mastering React's `useEffect` Hook
Tags: webdev, javascript, react, beginners
Published: 2024-01-08 18:00:35

React's `useEffect` hook is a vital feature for managing side effects in functional components, offering a clean and efficient way to handle asynchronous tasks and interactions with the outside world. In this concise guide, we'll delve into the basics, syntax, lifecycle, and best practices of using `useEffect` to enhance your React applications.

### Basics:

The `useEffect` hook allows you to perform side effects in functional components and is structured as follows:

```jsx
import React, { useEffect } from 'react';

function MyComponent() {
  useEffect(() => {
    // Side effect code
    return () => {
      // Cleanup code (optional)
    };
  }, [/* dependency array */]);

  // Component rendering logic
}
```

### Lifecycle:

1. **Mounting Phase:**
   - Runs after the initial render.
   - Executes the specified side effect.
   - Cleanup function (optional) is executed on unmount or when dependencies change.

2. **Updating Phase:**
   - Re-runs the effect if dependencies are present and have changed.

3. **Unmounting Phase:**
   - Cleanup function is executed when the component is about to unmount.

### Handling Dependencies:

The dependency array controls when the effect runs. An empty array means the effect runs only once during the mounting phase, while dependencies trigger re-execution when they change.

```jsx
useEffect(() => {
  // Side effect code
}, [dependency1, dependency2]);
```

### Common Use Cases:

1. **Data Fetching:**
   ```jsx
   useEffect(() => {
     const fetchData = async () => {
       const result = await fetch('https://api.example.com/data');
       // Process the data
     };
     fetchData();
   }, []);
   ```

2. **Subscription or Event Listeners:**
   ```jsx
   useEffect(() => {
     const subscription = someEvent.subscribe(handleEvent);
     return () => {
       // Cleanup: Unsubscribe when the component unmounts
       subscription.unsubscribe();
     };
   }, [dependency]);
   ```

### Best Practices:

1. **Avoid Memory Leaks:**
   - Always clean up resources like subscriptions to prevent memory leaks.

2. **Use Dependency Array Wisely:**
   - Include only relevant variables to ensure accurate tracking.

3. **Async Effects:**
   - Use `async/await` or return a cleanup function for asynchronous tasks.

4. **Multiple `useEffect` Calls:**
   - Separate concerns by having multiple `useEffect` hooks in a component.

5. **Conditional Effects:**
   - Use conditionals inside `useEffect` to run code based on specific conditions.

### Conclusion:

By mastering the `useEffect` hook, you can efficiently manage side effects, resulting in dynamic and responsive React applications with clean and maintainable code. Incorporating this hook into your development workflow empowers you to build robust user interfaces while adhering to best practices.
Connecting the collapse to the menu - Joomla 4+
Published: 2024-01-08 17:57:27

Maybe it will be useful to someone how to connect collapse menu in Cassiopea template.
1. Log in to the Joomla Administrator
2. Go to the System -> Manage Site Modules
3. Edit a module with the Menu type. In my case it Main Menu:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9emsw8avtkcewcifd7jp.png)
4. On the advanced options tab, you need to change the Layout value
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/07onyjkdieyg5pgfk685.png)
Select Collapsible Dropdown in Cassiopea template and save changes to the module
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rw2tmcer5w9f7dnpyhwa.png)

The module template is located in the folder
```
templates\cassiopeia\html\mod_menu\collapse-metismenu.php
```
Maybe I haven't reviewed something, please ask in comments.
Estimate to Avoid Surprises
Published: 2024-01-08 17:56:20

| 🔴 **Disclaimer**: This post is enhanced with AI assistance.|
|--------------|

> Estimate before you start. You’ll spot potential problems up front. ~ Tip #23 from the book "The Pragmatic Programmer"

---


Imagine coding, a task most grand,
But with no plan, you'll soon be in the sand!
Like the Cat in the Hat, with mischief in tow,
Your code can spiral, oh what a woe!

No deadlines met, just bugs in a swarm,
Users scream, "Fix it! It's not the new norm!"
But fear not, my friend, there's a way to be wise,
Before you code, estimate the size!

Like counting spots on a polka-dotted hat,
Break down the features, where's the time at?
Each task a dot, a story to tell,
Add them together, don't let deadlines yell!

Is it a quick sketch, a doodle so small?
Or a mountain to climb, with features that sprawl?
Knowing the size, you'll dodge the surprise,
No more late nights with tears in your eyes!

So grab your pencil, don't be a Thidwick the Big-Hearted,
Counting and planning, a coder's art started.
For estimates whisper, "Your project's on track,"
No Cat in the Hat chaos, just code with a crack!

Remember, dear friend, it's not just about lines,
But time and resources, where wisdom enshrines.
So estimate, estimate, with a wink and a grin,
And your coding adventures, a happy win-win!


---

|✍ **Powered by**: *Google Bard*|
|--------------|
Resolve memory leaks caused by Jest with Node.js 16.x and 18.x (JavaScript heap out of memory)
Published: 2024-01-08 17:37:10


We saw memory leaks when running tests using a Jest framework after migrating to an up-to-date version of Node.js in our project. ([`jest issues#11956`](https://github.com/jestjs/jest/issues/11956)

- v14.21.3 ✅ (no leaks)
- v16.20.2 ⚠️ (leaks) 
- v18.19.0 ⚠️ (leaks) 
- v20.10.0 ✅ (no leaks)

Undoubtedly a Node.js problem, it was resolved in the release [`v20.10.0`](https://github.com/nodejs/node/releases/tag/v20.10.0) 

Therefore, adding a `--no-compilation-cache` option will fix memory leaks if you plan to use versions 16 or 18.

see `package.json` example:

```diff
{
  "scripts": {
-    "test": "jest"
+    "test": "node --expose-gc --no-compilation-cache node_modules/.bin/jest"
  }
}
```
Ali Insider
Tags: webdev, javascript, beginners, programming
Published: 2024-01-08 17:29:33

Ali Insider là gì?
[Ali Insider](https://www.wsovn.net/ali-insider) Tìm các sản phẩm Dropshipping có lợi nhuận cao nhất chỉ bằng một cú nhấp chuột.! Phân tích cạnh tranh, kiểm tra độ bão hòa của bất kỳ sản phẩm nào, tìm nhà cung cấp hàng đầu và thị trường mục tiêu.
Được thành lập bởi một nhóm những người đam mê dropshipping có nền tảng khác nhau về thương mại điện tử, thiết kế wed và tiếp thị trực tuyến, Ali Insider là một công cụ nghiên cứu dropshipping chuyên nghiệp và có uy tín để tìm kiếm các sản phẩm AliExpress chiến thắng trong bất kỳ danh mục hoặc thị trường ngách nào.
Ali Insider Ưu điểm
Công cụ nghiên cứu tất cả trong một và phần mềm phân tích cạnh tranh
Tiện ích mở rộng trình duyệt Chrome mạnh mẽ và được duy trì tốt
Tra cứu ngay lập tức bất kỳ sản phẩm nào trên thị trường AliExpress
Bao gồm cơ sở dữ liệu được quản lý về các sản phẩm dropshipping chiến thắng
Mua ngay tại: [https://www.wsovn.net/ali-insider](https://www.wsovn.net/ali-insider)