teleren/devto huggingface dataset:
Creating, testing and Deleting Policies
Tags: azure, policy, cloud, cloudcomputing
Published: 2023-09-23 09:35:56

1. Search for 'policy' in the search menu bar on azure portal.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p4nahxni53qxqj7tli12.png)

2. Select the 'assignments' blade.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lzjo4j92jhtc2ut5uq7c.png)

3. Select Assign Policy.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/imk08aku8nzs9f2zqyw0.png)

4. Define the Policy then add. For this tutorial we'll be creating a policy that requires resources to have a Tag.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/afbtxx6phkrs970y4gtq.png)

5. You can optionally add exclusions and create a description for the policy.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pwbcotiwujd1m7grd3cw.png)

6. Set Tag name and Value in parameters.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n7ud5lcooxctiitkbupt.png)

7. Create the Policy.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s5nvln01dmdce9n8m8as.png)

8. It should look similar to the image below if successful.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/80hze9b9qm6ntcuhb76y.png)

9. Let us test the Policy created by creating a storage account.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dnag8nmydaeqa1zrebnu.png)

10. I will purposefully omit the assigning of tag in the storage account to test if the Policy will work.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t6dw135bcy4jju1sxv4l.png)

11. As shown below, the Policy prevents the storage account from being deployed because it does not have the specified tag.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5j07fu0be261fn0woxws.png)

12. Now I will try to create the storage account again but this time I will include the Tag.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ujli537pr4v50k6gvmd8.png)

13. As shown below, the deployment of the storage account was successful.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/80gavgmda4k7wnsc8kts.png)

14. To delete the Policy, simply go back to the policy created in the 'assignments' blade and click delete assignment from the drop down.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wf25ovh01ur0jxaoqu4q.png)
HTMLrev free templates gallery for web developers
Tags: webdev, html, css, frontend
Published: 2023-09-23 09:27:09

Greetings Dev.to community 👋

I created a gallery of high quality free templates for fellow web developers. It was a lot of work because I wanted to cover as many categories as possible. If it's useful to someone then it was worth it.

Currently you will find free templates for: HTML vanilla CSS, Bootstrap, Tailwind vanilla JS, Bulma, Vue, Nuxt, React, Next and Gatbsy. More are on the way like Alpine, Laravel, Astro, Jekyll, Hugo, etc.

Almost all new free template get pushed to the back of Google search results. Nobody gets a chance to see and use them. Search results pages are full of old resources and garbage SEO/affiliated roundup articles.

That's the reason I created this project. To expose new stuff that doesn't stand a chance through regular channels. It's just a basic HTML website but I'll soon turn it into a dynamic one with filters and everything.

Traits that make the gallery unique: all templates are free for both personal and commercial projects, they're based on updated tech, have live previews on the details page. All credit goes to their generous makes.

Please check it out on [htmlrev.com](https://htmlrev.com) and let me know your thoughts 🙏
The value of null (ish)
Tags: javascript, learning
Published: 2023-09-23 09:02:57

**TL; DR**: The _absence_ of a thing is not the same as the thing being _empty_.

Say we represent a wallet with an array:

```javascript
[1, 1, 2, 5, 10, 10] // 2 ⨉ £1, 1 ⨉ £2, …
```

Now we need to decide when to fetch a wallet. I sometimes see this kind of logic:

```javascript
if (!wallet?.length) {
  // fetch
}
```

The problem here is that we equate the absence of a wallet with no money, potentially causing an infinite loop.

That is not to say that you can never consider those two things equally.

For instance, it's okay to restrict access to checkout if you either don't have a wallet or no money in it:

```javascript
can_checkout = wallet?.length > 0
```

However if you need to explain _why_ a user can't check out (and you probably ought to) then those two things are very different:

```javascript
checkout_err = ( wallet == null ? ERR_WALLET_NOT_FOUND
               : !wallet.length ? ERR_WALLET_EMPTY
                                : null )
```
Unlock Google Success – Index Smarter, Rank Higher
Tags: seo
Published: 2023-09-23 08:55:06

Welcome to [SEO indexing tool ](https://boost-index.top), your gateway to unparalleled Google page indexing acceleration. In today's digital age, where speed and efficiency are paramount, we are dedicated to ensuring that your web pages are discovered by Google at lightning speed. With our cutting-edge service, we empower your website to outshine the competition by securing faster indexing.

Our indexing service is a testament to innovation and effectiveness. We employ advanced SEO strategies and state-of-the-art technology to streamline the indexing process, elevating your website's visibility and performance on search engines. Trust us to provide results that will set your website apart in the digital realm.

We stand behind our [indexing service](https://boost-index.top). To prove our commitment to your success, we offer 25 free links for testing. This gives you the opportunity to experience firsthand the transformative impact of our indexing service on your website's Google presence. Take the plunge today and witness your pages ascend in search rankings.
To play audio from one browser through your speakers and from another browser through Bluetooth headphones on Ubuntu,
Published: 2023-09-23 08:52:24

To play audio from one browser through your speakers and from another browser through Bluetooth headphones on Ubuntu, you need to use **PulseAudio**, Ubuntu's sound system. Here is a step-by-step guide:

First, make sure your Bluetooth device is paired and connected to your Ubuntu machine. You can do this by going to the system settings, finding the Bluetooth settings, and then scanning for and connecting to your device.

Install `PulseAudio` Volume Control if it is not already installed. You can do so by opening a Terminal window and using the following command:

```
sudo apt-get install pavucontrol
```

    After connecting your Bluetooth device and installing PulseAudio `Volume Control, open two different browsers or browser instances. For instance, you could open one page in Chrome and another in Firefox.

    Play the music from each browser. Open PulseAudio Volume Control. You can do this by typing pavucontrol in a Terminal window or by searching for it in the applications menu.
    Go to the 'Playback' tab. Here, you should see your two browser instances listed as audio sources.

    For each browser, you can choose an output device. Click the button on the right side of the browser source and choose your desired output - one will be your speakers, and the other the Bluetooth device.

Please note, the effectiveness of this method can depend on the exact setup and configuration of your Ubuntu system. If you face any issues, feel free to seek further assistance.
Assigning and Removing Resource Locks in Azure
Tags: azure, resourcelocks, resources
Published: 2023-09-23 08:44:02

1. We'll be using an already created resource group to create the resource locks.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4is93t0aozlyrkoh325j.png)

2. Select the 'locks' option.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pey3hj6ki5qcfzinulmw.png)

3. Click on add.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rgl2gtjgp6jygnekvx3w.png)


4. Add the necessary parameters i.e name, lock type and optionally a description note.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j71m6cqtoiezeg5x5sd8.png)

5. It should look like the image below.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s7f701y0lt94dp0pgj2y.png)

6. We can test the lock by trying to delete a resource within the resource group. I will try to delete a storage account created earlier
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jvtbvhcqw22vo0yq4zsc.png)

7. The storage account cannot be deleted because of the resource lock placed on the resource group.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xt44g10fgfxi7oc90p1v.png)

8. To remove the resource lock simply go back to the locks option in the resource group and click delete on the lock.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zls6sh45airphv6pn65c.png)
Story Points - Intent and Effectiveness
Tags: agile, scrum, storypoints, projectmanagement
Published: 2023-09-23 08:43:34

In some companies, "Story Points" have the following two purposes.

- A convoluted measure for customer billing, the customer won't really know how much effort has been put up for the said amount of story points in the bill.
- A number by which the developer has no idea on how much task he is taking

Essentially, story points are an abstract way to define the complexity of a task at hand, usually denoted in terms of the numbers in the Fibonacci Series (natural numbers are acceptable too). The higher the number, the complex the task; so, if the number is large, it implies that it will have to be broken down into smaller manageable pieces.

Story points was intended to help the developers provide an effort estimate of the tasks without committing to the number of days/hours which is usually hard or not accurate. However, it has turned out in a way that it masks a direct way to calculate the effort that was involved in Time & Material Projects.

It is also to help in building a clear and expressive burnout charts that show how big the tasks were that the team had worked on.

Sometimes, the story points are twisted so much that the stories in them are just made up and the points don't really matter. Another problem with story points is that the management would expect the team to achieve the same amount of story points or more in each sprint, under the name of "increased productivity", even if they are understaffed. On the contrary, the team inflates the story points just to level it with their previous sprints, so that they will not be questioned by the management. Hence, neither the manager nor the team would be able to tell the exact amount of work done. They will have to settle down with the figures knowing each one is cheating the other.

Some interesting dialogues we usually hear on story
points.

_"The customer won’t agree for that many story points bring it down further…"_

_"Do the story points include the testing effort?"_

_"Please move the incomplete story points to the next sprint..."_

**_Excerpt from my book - [Excel in IT][1]_**

[1]: https://notionpress.com/read/excel-in-it "Excel in IT"
Simplexity Personal & Blog multipage theme.
Tags: astro, tailwindcss, webdev, design
Published: 2023-09-23 08:30:41

Simplexity ⏤ Personal & Blog multipage theme.
Built with Astro & Tailwind css

Includes:
⏤ Pages 28
⏤ Sections 50+
⏤ Components 60+

See it live and learn more:
lexingtonthemes.com/info/simplexity/

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mc373tiq4cmu7mkesokb.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ven67itih78iq6rzjjj2.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p4vc0j4udm10cv3tp43x.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fe1zbzqc9itz70yidva6.png)
Day 01 - Two Sum Problems
Published: 2023-09-23 08:27:36


Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.

You may assume that each input would have exactly one solution, and you may not use the same element twice.

You can return the answer in any order.

 

Example 1:

Input: nums = [2,7,11,15], target = 9
Output: [0,1]
Explanation: Because nums[0] + nums[1] == 9, we return [0, 1].
Example 2:

Input: nums = [3,2,4], target = 6
Output: [1,2]
Example 3:

Input: nums = [3,3], target = 6
Output: [0,1]
**
For practice : [](https://leetcode.com/problems/two-sum/description/)
Solution: **

```
package sixtyDaysChallange;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

public class TwoSum {

    public static void main(String[] args) {
        int[] nums = {3,2,4};int  target = 6;
        int[] ints = twoSum(nums, target);
        System.out.println(Arrays.toString(ints));
    }

    public static int[] twoSum(int[] nums, int target) {

        Map<Integer,Integer> containsMap = new HashMap<>();
        for(int i=0;i<nums.length;i++){
            int complement = target-nums[i];

            if(containsMap.containsKey(complement)){
                return new int[]{containsMap.get(complement),i};
            }
            containsMap.put(nums[i],i);
        }
        return new int[] {};

    }
}
```
How to Check Memory Usage on Linux
Tags: memory, linux, swap, monitoring
Published: 2023-09-23 08:12:14

**memgauge** is a Linux console tool that can be used to monitor memory usage in real time. It is a simple and easy-to-use tool that provides a clear and concise overview of memory usage, including physical memory, swap memory, and cached memory.

## Installing memgauge
memgauge is available in sourceforge repository. To install memgauge on Ubuntu/Debian or Manjaro, you can use the following link: **[https://sourceforge.net/projects/memgauge/](https://sourceforge.net/projects/memgauge/)**

## Using memgauge
Once memgauge is installed, you can start it by running the following command:

```
memgauge
```
This will open the memgauge program, which displays a real-time memory and swap usage.


![memgauge](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nnniwogas6sr9nd79nr6.png)

**- Physical memory:** This is the total amount of physical memory installed on your system.
**- Swap memory:** This is secondary memory that is used to store data when physical memory is full.
**- Cached memory:** This is memory that is used to store frequently accessed data.
**- Free memory:** This is the amount of physical memory that is currently available.
**- Used memory:** This is the amount of physical memory that is currently in use.
**- Buffer/cache:** This is the amount of memory that is being used by the kernel to store buffers and caches.

## Conclusion
memgauge is a simple and easy-to-use tool for monitoring memory usage on Linux. It is a great tool for troubleshooting memory problems and for understanding how memory is being used on your system.
Smoothing Out Programming Conveyance: A DevOps Approach
Tags: devops, programming, softwaredevelopment, softwareengineering
Published: 2023-09-23 08:06:20

If you want to know about devops in depth, here is the link:
https://hackernoon.com/smoothing-out-programming-conveyance-with-consistent-joining-persistent-conveyance-and-foundation
If you have questions, please drop them in the comment section. Enjoy!
Latest Newsletter: Beware Of Circularity (Issue #133)
Tags: javascript, tech, webdev, discuss
Published: 2023-09-23 07:57:44

---
title: Latest Newsletter: Beware Of Circularity (Issue #133)
published: true
description: Everyone has been going on about circles and circular economies recently. I’m not so convinced. Circles can be vicious, mindblowing is the new super easy peasy. Lots of great podcasts this week.
tags: javascript, tech, webdev, discuss
---

Beware Of Circularity (Issue #133)

Everyone has been going on about circles and circular economies recently. I’m not so convinced. Circles can be vicious, mindblowing is the new super easy peasy. Lots of great podcasts this week.

https://markjgsmith.substack.com/p/mark-smiths-newsletter-23-09-2023

Would love to hear any comments and feedback you have.

[@markjgsmith](https://twitter.com/markjgsmith)
How to make command-line apps accessible?
Tags: discuss, terminal, cli, a11y
Published: 2023-09-23 07:54:18

Hi, recently I started working on a command-line tool and wanted to make it accessible. I posted a question about it on stackoverflow but didn't get any answers, so I've decided to ask you, the DEV community - how does one make their command-line app accessible?

Also general dicussion about command-line accessibility and accessibility in general.
Basic Promise in JavaScript
Tags: webdev, productivity, javascript, discuss
Published: 2023-09-23 07:32:12

**Promise in javaScript is a way to handle asynchronous operations, such as fetching data from server ,reading files or making a request from network. Promise helps you to write more readable and organized code when dealing with asynchronous tasks.**



Here is a simple example: 1. Resolving a promise


```
const promiseOne = new Promise(function(resolve, reject) {

//this is the very common way to write promise

setTimeout(() => {
resolve("async task completed");
}, 1000); 
});

NOTE: 
// .then() block is connected to the resolve part of the promise
// simulate task completed after 1 sec



promiseOne.then((message) => {
console.log(message);
})

.catch((error) => {
console.log(error)
});

```

> In this example, we create a Promise that resolves after 1 seconds, simulating a successful async task. The [.then()] block executes when the promise is resolved and in this case the [.catch] block will not be displayed as we have successfully completed the task.





2. Rejecting a Promise

```
const promiseReject = new Promise(function(resolve, reject){
    setTimeout(() => {
        reject("sorry could not complete your task");
    }, 1000);
});

promiseReject
.then((message) =>{
    console.log(message);
})
.catch((error) => {
console.log(error);
 });

```

In this code, when the promise is rejected with the message "sorry could not complete your task" the [.catch() block] will execute, and "sorry could not complete your task" will be logged to the console. The .then() block won't execute because the promise was rejected, not resolved.

**NOTE**
To summarize, the behavior of .then() and .catch() depends on whether the promise is resolved or rejected. If the promise is resolved, the .then() block executes. If the promise is rejected, the .catch() block executes.
Hello World in Java
Tags: java, webdev
Published: 2023-09-23 07:11:32

In this series, I will guide you to learn Java from basic to advanced, I will help you cover it all from beginning to end. forms the foundation for us to develop Web applications or applications using the Java language.

From the Windows search box, open the terminal and type cmd.


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

`System.out.print("Hello World");
Hello World`


In Java, newline characters will not be distinguished, but a comma will be required.


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

Typing forward slash and the word 'exit', or forward slash with the shortcut text ex, will end your JShell session, if you get stuck.
An example would be /exit or /ex.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jlgv8kh52z5pmg5ylvd9.png)
First Coding Burnout?
Tags: discuss
Published: 2023-09-23 07:00:00

_Welcome to Code Chatter, your go-to series for conversational coding insights. What makes this series of questions different from all the others? Well, truth be told, not much, but they're still thought-provoking and fun. Join us as we explore the coding world, one witty question at a time._

> Could you share the story of what led to your first experience of burnout from programming?

Follow the DEVteam for more discussions and online camaraderie!

{% embed [https://dev.to/devteam](https://dev.to/devteam) %}
Do Mechanical Keyboards Boost Coding?
Tags: codenewbie, beginners, discuss
Published: 2023-09-23 07:00:00

🎤🔊 _Hey all tech enthusiasts, it's time to rumble in the digital jungle! In one corner, we've got bold and controversial tech statements, ready to assert their dominance. And in the other corner, we've got you, the fearless challengers, set to prove 'em wrong! Get ready to rumble as we dive into debates, challenge the status quo, and wrestle with some of the biggest questions in tech!_

> Prove me wrong: Using a mechanical keyboard makes you a better coder.

Follow the [CodeNewbie Org](https://dev.to/codenewbieteam) and [#codenewbie](https://dev.to/t/codenewbie) for more discussions and online camaraderie!

*{% embed* https://dev.to/codenewbieteam *%}*
C++ Assignment operator vs _BLOCK_TYPE_IS_VALID
Tags: cpp, assignment, operator
Published: 2023-06-07 03:17:51

I have been using C++ for a long time, but I didn't pay much attention to the assignment operator and copy constructor until I encountered the "_BLOCK_TYPE_IS_VALID" error.
It took me several hours of googling to figure out the reason. 
with this code:

```cpp
class A {
    int* val;
public:
    A(int v) {
        val = new int(v);
    }
    ~A() {
        delete val;
    };
    A test() {
        A a(2);
        A b(3);
        a = b;// assignment operator
        return a;
    }
```
we got the "_BLOCK_TYPE_IS_VALID" because when the class does not contain any pointers, the default assignment provided by Compiler is sufficient even it just performs a shadow copy.
but dealing with classes that contain pointers we can get _BLOCK_TYPE_IS_VALID(pHead->nBlockUse).
This error often occurs in Visual Studio when memory corruption or invalid memory access is encountered.
Similarly, in a Linux environment, you may encounter dump values or other exceptions.

so do not forget to define our own assignment operator.

```cpp
class A{
int* val;
public:
  A(int v){
   val = new int(v);
 }
// assignment operator
 A& operator=(const A& obj){
   *val = *obj.val;
 }
~A(){ delete val;)
};
A test(){
 A a(2);
 A b(3);
 a = b;// assignment operator called
 return a; // copy constructor ??
}
```

but still we got error?. because the return a; make a copy of a before return.
so we also need our own copy constructor
and this code will work without error:

```cpp
class A{
int* val;
public:
  A(int v){
   val = new int(v);
 }
// assignment operator
 A& operator=(const A& obj){
   *val = *obj.val;
 }
//copy constructor
A(const A& obj){
 if(val) delete val;
 val = new int(*obj.val);
}
~A(){ delete val;)
};
A test(){
 A a(2);
 A b(3);
 a = b;// assignment operator called
 return a; // copy constructor ??
}
```
IVR System For Simple And Perfect Business Solution
Tags: api, php, software, developer
Published: 2023-09-23 05:56:24

Msgclub's IVR services are an efficient way to resolve customer issues. It's a deal of low investment with a surety of high returns. Our [IVR services](https://www.msgclub.net/ivr-service-provider.aspx) are cost-effective, Stable & Provide ease in client communication. 
IVR services will help your business to grow its image among customers by not keeping them engaged and will provide stability to the customer service process.Msgclub is all set to provide the best IVR services in the market.