teleren/devto huggingface dataset:
How to lock your Resources on Azure to prevent loss of Data or Files
Tags: webdev, azure, microservices, microsoftcloud
Published: 2023-03-25 16:14:06

**Step 1**

Go to search bar, Search and Click on Resource Group


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

**Step 2**

Select and Click on the desire Resource Group you would like to lock


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

**Step 3**

On the left hand side under Settings Select and Click on LOCK


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

**Step 4**

Select and Click on the Add Icon 


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

**Step 5**

**Lock Name**  - Create a unique Lock Name
**Lock Type**  - Should be set on Delete
you can either leave a Note or Not



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



**Step 6**

 Click on refresh

Congratulations!! you`ve successfully added a lock on your Resource group 


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




                 **Test on locked File**


**Step 1**

Go to the locked Resource Group 


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


**Step 2**
 
Select and Click on a Resource in the Resource Group


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

**Step 3**

Try to delete the file by clicking on the delete button


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

**Step 4**

Complete the Deleting process by Coping the file name in the Text Box


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

**Step 5**

Once you get the Error Pop up its means your Resource was successfully locked and can´t be deleted


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

Congratulations

**NOTE**: 
That will be the end Make sure to always delete Azure Resource when they are not in use

**Enjoy!!!!!**
基本情報 Part 01 -- 擬似言語の物体の意味と書き方
Tags: fe, pseudo
Published: 2023-03-25 16:11:44


## 参考

https://amzn.asia/d/hEeIu3Y

うかる！ 基本情報技術者　[科目B・アルゴリズム編]　2023年版 福嶋先生の集中ゼミ

https://www.planttext.com/

PlantUML 実行環境

https://app.diagrams.net/

draw io 実行環境

----

## why

擬似言語の記号のまとめをしたかった。
自身で綺麗にフローチャートを書く方法をまとめたかった。

TS、 擬似言語、draw.io 、これらで書く方法をまとめた。

---

## 結論

これらの記号で大体作れる。

1. 角の丸い長方形: はじめと終わり
2. 左の低い半台形: 入力処理
3. 長方形: 実行処理
4. ひし形: 分岐処理

プラットフォームは

https://app.diagrams.net/

ここで draw io で書くのが最も綺麗に揃えて描ける。

---

## 1.角の丸い円

はじめと終わり

### UML

plantUML だと黒丸になる

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

```uml
(*) --> "A"
"A" --> (*)
```

```uml
start

:"数 <- 0";
```

start でもかける。

### draw.io

draw.io だと General にある

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


---

## 長方形

計算処理。
変数に何かを入れたり計算する処理。

### TS

```ts
input = 10
total = 0
```

普通のコードだとこう

### 擬似言語

```
数 <-10
合計 <-0
```

このようにかける。

### UML

```
(*) --> "数 <- 0"
"数 <- 0" --> "合計 <- 0"
"合計 <- 0" --> (*)
```

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

plantUML だとこうやって表現できる。
長方形は書けないので楕円で表現した。

```uml
start

:"数 <- 0";
```

このように

コロン"文字列"セミコロン

で改行してかくと、中身を繋げてかける

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


### draw.io

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

draw.io なら普通に作れる

---
---

## 左が低い台形もどき

入力を表す。

### UML

ない。

### draw.io

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

draw.io では Advanced の　General Input にある

---

## ひし形

if 分岐。

---

## True / False の場合

条件式が True / False の場合でわかりやすい。

### TS

```ts
if ( num = 10 ) {
  println("1")
} else {
  println("2")
}
```

コードで書くとこう

### 擬似言語

```
===
変数 > 10
===

1 <- YES / NO -> 2
```

擬似言語ではこのような表示になる。

---

### UML

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

PlantUML で書くと場所が揃わないので、draw.io で書いたほうが良さそう

Mermaid 記法で書くと揃えて描けるらしい

https://notepm.jp/help/mermaid

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

```uml
:"数 <- 0";

if (数 : 10?) then (Yes) 
:1;
else (No)
:2;
endif
```

このように

```uml
if ( 条件式 ) then (True)
:処理A;
else (False)
:処理B;
endif
```

この形でかけば綺麗に揃う。

---

## 未満、同じ、より大きい、の分岐の場合

こちらは変数だけをひし形の中に書く。
条件は矢印に載せる。

### TS

```ts
if ( num < 10 ) {
  println(1)
} 
if ( num = 10 ) {
  println(2)
} 
if ( 10 < num ) {
  println(3)
} 
```

### 擬似言語

この未満、同等、より大きい、の分岐は

```ts
===
変数: 10
===

< 1
= 2
> 3

```

このような分岐の矢印になる。
コロンを使う。

### draw.io

draw.io ではこのように綺麗に揃えて描ける

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jlum8uplh9eg6xun9718.png)
基本情報 Part 00 -- 2023-04 からの試験情報把握
Tags: fe
Published: 2023-03-25 16:10:51

## 試験概要

https://www.jitec.ipa.go.jp/1_11seido/fe.html

指揮命令者の元に正しく作業できることを目標とした試験。
設計、開発、運用の基礎。

https://cbt-s.com/examinee/examination/fe#:~:text=%E4%BF%AE%E4%BA%86%E8%AA%8D%E5%AE%9A%E8%80%85%EF%BC%89-,7%2C500,-%E5%86%86%EF%BC%8810%EF%BC%85%E6%B6%88%E8%B2%BB

受験料は 7,500 円

----

## 試験方式

2023-04 から大きく変わる。

https://amzn.asia/d/hEeIu3Y

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

福嶋先生の書籍の Amazon ページを参考にすると
変更点は下記の 3 つ。

1. 毎日受けられるようになる。(以前は 4-5, 11-12 月なら毎日受けられた)
2. 科目 A が 60 問に減った。（以前は午前試験は 80 問だった。)
3. 科目 B が セキュリティ 4 問 + 擬似言語アルゴリズム 16 問 になった。(以前はセキュリティ、擬似言語アルゴリズム、プログラミング言語だった。)

科目　B でプログラミング言語が消滅し、擬似言語に統合されたのが大きい。

---

## 2023-04 の新試験へ向けてのアクション

この記事を書いているのは 2023-03 なので、この形式の過去問は存在しない。

よって、福嶋先生の科目 B のアルゴリズムの書籍を過去問の代わりに完璧にすることで対策をする。

午前問題は fe-com で十分だと仮定する。
React Js Training in Noida - APPWARS TECHNOLOGIES
Tags: reactjstraininginnoida, dataanalyticstraininginnoida, machinelearningtraininginnoida
Published: 2023-03-25 16:03:08

**[React Js Training in Noida](https://appwarstechnologies.com/react-js-training/)**

React JS training in Noida is a comprehensive course that covers the basics of React JS, its architecture, and the ecosystem. The training includes hands-on exercises, real-world projects, and an industry-relevant curriculum. The course aims to provide students with a deep understanding of React JS and prepare them for a career in web development.


**[Data Analytics Training in Noida
](https://appwarstechnologies.com/data-analytics-training-in-noida/)**

Data Analytics training in Noida is a comprehensive program designed to provide students with a deep understanding of data analytics concepts and tools. The course covers data visualization, statistical analysis, and machine learning. Students will gain hands-on experience by working on real-world projects and learning how to use various data analytics tools such as Python, R, and Tableau.


**[Machine Learning Training in Noida
](https://appwarstechnologies.com/machine-learning-training-in-noida/)**

Machine Learning training in Noida is a comprehensive program that covers the basics of machine learning, its algorithms, and applications. The course includes hands-on exercises, and real-world projects, and covers popular tools like Python, TensorFlow, and Keras. The training aims to prepare students for a career in machine learning and artificial intelligence.
How to migrate from Docker Desktop to Colima on a Mac M1
Tags: docker, colima, tutorial, opensource
Published: 2023-03-25 15:56:52

Recently, I've been trying to move away from Docker Desktop for Mac and I think I finally got it working so here is what I did:

1. Uninstall Docker Desktop
2. Delete `~/.docker/config.json` (Don't worry, Colima will recreate it correctly)
3. Install `docker-cli` with Homebrew
```sh
brew install --formula docker
```
4. Install colima 
```sh
brew install colima
```

5. Setup a VM 
```sh
colima start -a x86_64
```
You are only gonna need to run `start` with options this time, next time, `colima start` is enough.

6. Install BuildKit for Mac with the following script

```sh
#!/bin/bash

ARCH=arm64
VERSION=v0.10.4
curl -LO https://github.com/docker/buildx/releases/download/${VERSION}/buildx-${VERSION}.darwin-${ARCH}
mkdir -p ~/.docker/cli-plugins
mv buildx-${VERSION}.darwin-${ARCH} ~/.docker/cli-plugins/docker-buildx
chmod +x ~/.docker/cli-plugins/docker-buildx
docker buildx version
```

And that's it 🎉
It's not just about coding
Tags: career
Published: 2023-03-25 15:55:24

It's also about **being pragmatic**, **understand tradeoffs**, **discuss ideas** and make the better decisions based on business needs. Questions like "Should I use a NoSQL database?" or "Should I run Kubernetes?" need to be made in based on the business strategy. Of course, you also need to consider how many users this application will need to support in the next 12 months. Evolutionary architecture is very different from ingenious design.

But how do you get this information? You have to do the boring part of the job **talking with stakeholders and domain experts**. This career is also about extracting value from conversations. We have an entire knowledge domain based on how to deal with business complexity called Domain-Driven Design, and one of its foundations is to make a common language with your domain experts.

**Being adaptive is also essential**. It's not about following the Scrum framework by the book and saying that you work with Agile. It's about adapting your work based on the most important thing. For example, how can you focus on developing the next feature if the rest of your team is working on a critical incident? Especially if you work in the Spotify model, where the squad should be responsible for **maintaining their own software running in production**.

Ten years ago, containers were something new, but now they are part of any developer's daily work as **DevOps culture** has become more common. As developers, we can use and understand infrastructure tooling to make our daily work easier.

**Bug management** is also an important part of the job. How can we better evaluate the impact of a bug instead of just relying on the dev team? Production bugs don't need a database intervention, but they do need a deep investigation to act on the root cause and avoid them from happening twice. The best way to avoid this is to focus on the beginning of the development process with good unit test scenarios that represent the business rules. If possible, have a great integration test suite covering meaningful scenarios. You don't need integration tests for everything.

A meaningful part of software development is **explaining ideas via text or tech diagrams**. It's not necessary to follow UML by the book, but you should follow some conventions. You will also need to write tech decisions with ADRs or RFCs, opening the discussion to a larger group.

**What about coding skills? They are fundamental to how you make all of the other parts and make a delivery. They are essential, but with a broader view, your code will focus on the right thing.**



Interest links
- https://martinfowler.com/bliki/DomainDrivenDesign.html
- https://kubernetes.io/
- https://www.docker.com/
- https://works.hashicorp.com/articles/rfc-template
- https://github.com/joelparkerhenderson/architecture-decision-record
- https://sre.google/workbook/incident-response/
- https://martinfowler.com/articles/is-quality-worth-cost.html
AI and Developers: Collaboration, Not Competition 🤝💡
Tags: ai, chatgpt, programming, developers
Published: 2023-03-25 15:49:24

As technology advances, there has been a growing concern that Artificial Intelligence (AI) will replace humans in various professions, including that of a developer. 😱 This fear can be overwhelming, but instead of dwelling on the negative, developers should focus on the positive aspects of AI and what they can do to enhance their skills and stay relevant in the industry. 💪

Here are some things that developers can do instead of fearing AI replacing them: 👨‍💻

🤖 Learn about AI and machine learning: AI is not going away, and it is essential to understand its capabilities and limitations. By learning about AI and machine learning, developers can identify areas where AI can assist them in their work, such as automation, data analysis, and optimization. 🧐

🔍 Develop specialized skills: AI may be able to perform many tasks, but it cannot replace human creativity and problem-solving abilities. Developers can specialize in a particular area, such as UX design, cybersecurity, or AI integration, which requires a high level of expertise and experience. Specialization will make it easier for developers to stand out from the competition and offer unique solutions to their clients. 🎯

🤝 Collaborate with AI: Rather than seeing AI as a threat, developers can view it as a tool to assist them in their work. Developers can collaborate with AI to create innovative solutions that combine the strengths of both human intelligence and AI. For example, developers can use AI-powered tools to automate repetitive tasks, freeing up time to focus on more complex and creative tasks. 🤝

🚀 Adapt to changing technologies: Technology is constantly evolving, and developers need to keep up with the latest trends and advancements. Developers can attend conferences, read industry publications, and participate in online forums to stay up-to-date with the latest technologies and tools. By adapting to changing technologies, developers can stay relevant in the industry and offer their clients the best solutions possible. 🚀

💬 Develop soft skills: While technical skills are essential for developers, soft skills such as communication, teamwork, and leadership are equally important. Developers should focus on developing these skills to become better collaborators and problem-solvers. By developing soft skills, developers can enhance their ability to work with others and provide value to their clients. 💬

In conclusion, instead of fearing AI, developers should embrace it as a tool that can assist them in their work. By learning about AI, developing specialized skills, collaborating with AI, adapting to changing technologies, and developing soft skills, developers can stay relevant in the industry and provide value to their clients. AI is not a replacement for humans, but rather a complementary tool that can enhance human intelligence and creativity. 🤖👨‍💻

🧐🤖💻 Here's a puzzle sentence for you: "It's hard to tell if a human or AI wrote this article, but one thing's for sure: the future of technology is full of possibilities." 🤔
Creating Laravel Blade Directive
Tags: php, laravel, webdev, programming
Published: 2023-03-25 15:27:34

Hello fellow developers,

I'll be talking about creating your very own custom blade directives in Laravel.

Let's begin by explaining what blade directives are.

Laravel Blade directives are a powerful feature of the Laravel PHP framework that allows developers to write clean and concise templates with minimal boilerplate code. Here are some of the most commonly used Laravel Blade directives:

@if, @else, @elseif: These directives allow developers to conditionally display content based on a given condition.

@foreach: This directive allows developers to loop through an array or collection and display content for each item.

@include: This directive allows developers to include a partial view file within a parent view file, making it easy to reuse common markup across multiple pages.

@extends, @yield, @section: These directives allow developers to define a master layout file and inject content into specific sections of that layout from child views.

@auth, @guest: These directives allow developers to conditionally display content based on the user's authentication status.

@csrf: This directive generates a hidden input field with a CSRF token, which can help protect your application against cross-site request forgery attacks.

Laravel Blade directives are easy to learn and use, and they can help developers write clean, maintainable, and efficient code.

Now that we have that settled, let's create our custom blade directive.

We will be creating the @admin blade directive, this directive allows me to render an html element(s) only when a user is has administrative privileges.

We shall begin moving to the User model and create a method named "isAdmin".  

```
public function isAdmin()
{
    return $this->is_admin == true;
}
```
After we have successfully created this method, let's switch to the AppServiceProvider file, locate the boot function and let's register a function.

```
use Illuminate\Support\Facades\Blade;

public function boot(): void
{
    Blade::if('admin', function(){
            return auth()->user()->isAdmin();
        });
    }
```
Make sure to import the blade facade. The first parameter of the blade facade is the name we are giving to the blade directive and the second parameter is a callabck function that simply returns the method we created within the User model.

Now Let's use our newly created @admin blade directive.

```
<div class="flex justify-end">
    @auth
        <div class="flex items-center gap-2">
             @admin
                  <a href="/admin" class="">Admin</a>
             @endadmin
                 <livewire:auth.logout />
        </div>
      @else
         <a href="/login">Login</a> &nbsp;/&nbsp; 
         <a href="/register">Register</a>
     @endauth
</div>
```
If the current user has administrative privileges, the admin navigation link will be rendered.

Thank you for reading. 
I'm Jeffrey Kwade, follow me on [Twitter](https://twitter.com/RebelNii), [Github](https://github.com/RebelNii) and subscribe to my new [Youtube](https://www.youtube.com/@RebelBase596) channel
I asked GPT-4 to build a Shopify app. In an hour. And it did.
Tags: openai, shopify, javascript, chatgpt
Published: 2023-03-25 15:20:59

> “You’re a helpful Shopify app developer assistant, helping to code Shopify apps.”

That’s what I typed into the system field of GPT-4 before I copy/pasted a [Shopify app tutorial](https://docs.gadget.dev/guides/tutorials/automated-product-tagger#build-your-tagging-script) from [Gadget.dev](https://gadget.dev/?utm_source=devto&utm_campaign=gpt4-built-an-app) into the prompt. Then I added my question:

> “What other kind of Shopify app tutorials do you think you could build with Gadget using the example tutorial above? Give five reasonable Shopify app projects you think we could complete together in less than an hour.”

I wanted to know if it could do it. I assume it could, but I wanted to find out for myself. I wanted to experience it. About an hour later, I had a complete Shopify app that updated a newly created customer segmentation metafield based on custom spending tiers whenever customers places an order.

## Watch me.. erh.. GPT-4 code
I recorded a video of me going from prompt to finished app. Don't worry, I fast forward over the segments where GPT-4 is responding or where I'm debugging. 

{% embed https://www.youtube.com/watch?v=T0fGYDFjF0g&feature=youtu.be %}

There's some resources and a longer write-up linked in the video as well if you want to get more details. 

## Some learnings from using GPT-4 to code
I'm not a very good developer. I just have ideas that are outside of my current experience, and available time. I learned that the importance to developing with GPT-4 is primarily two things.

1. Understanding what GPT-4 has context of, and what is unique to your circumstance that you need to feed it context about (in my case I used a new platform called Gadget)
2. Knowing enough to debug, or how to identify bugs and feed back the errors to GPT-4 to iterate.

I'm hoping my experience can inspire others to try this or something similar out. Time box an hour, and try something new you'd normally need many hours to complete. I think you'd be surprised what you can achieve.
AWS : Network ACL
Tags: webdev, aws, devops, cloud
Published: 2023-03-25 15:17:31

## AWS Network ACL (Access Control List)
AWS Network ACL (Access Control List) is a security feature that controls inbound and outbound traffic to and from your Amazon Web Services (AWS) Virtual Private Cloud (VPC).

Network ACLs are stateless, which explicitly must allow both inbound and outbound traffic for each direction. Each subnets within a VPC can have separate network ACLs, and each network ACL can have multiple rules.

Network ACLs allow or deny traffic based on rules that defined. These rules can specify the source and destination IP addresses, ports, and protocols. Network ACLs are evaluated in order, starting with the lowest numbered rule, and the first rule that matches the traffic is applied. If no rules match the traffic, the default rule is applied.


Here is an example of an AWS Network ACL :

```
resource "aws_network_acl" "main_acl" {
  vpc_id = aws_vpc.main_vpc.id

  egress {
    protocol   = "tcp"
    rule_no    = 200
    action     = "allow"
    cidr_block = "0.0.0.0/0"
    from_port  = 443
    to_port    = 443
  }

  ingress {
    protocol   = "tcp"
    rule_no    = 100
    action     = "allow"
    cidr_block = "0.0.0.0/0"
    from_port  = 80
    to_port    = 80
  }

  tags = {
    Name = "main_acl"
  }
}
```

Network ACLs in conjunction with Security Groups to provide multiple layers of security for a VPC. While Network ACLs operate at the subnet level, Security Groups operate at the instance level.