teleren/devto huggingface dataset:
What is use of Recycle Bin in AWS EBS Snapshots ?.
Tags: aws, restore, ebs, snapshots
Published: 2022-06-19 07:52:04

You can restore accidentally deleted Amazon EBS snapshots with the `Recycle Bin` feature. If your resources are deleted, they are retained in the Recycle Bin for a time period that you specify before being permanently deleted.

You can restore a resource from the recycle bin at any time. If you restore a resource from the Recycle Bin, it will be removed from the Recycle Bin and you can use it the same way you use any other resource in your account. The resource is deleted from the recycle bin if the retention period is not renewed.

Using Recycle Bin helps to make sure `business continuity` via defending your business-critical facts in opposition to unintentional deletion.


## Working of Recycle Bin

In order to use Recycle Bin, you have to create `retention rules` in the regions where you want to protect your resources. Retention rules can be found here.

1. You want to protect the resource type. 
2. When resources are deleted, you want to keep them in the recycle bin.
3. Resources can be retained in the recycle bin before they are deleted.

There are `two types` of retention rules with Recycle Bin.

## Tag-level retention rules

`Resource tags` are used to identify resources that will be retained in the recycle bin. You specify one or more tag key and value pairs for each retention rule. Resources of the specified type that are tagged with at least one of the tag key and value pairs are automatically retained in the recycle bin. If you want to protect specific resources in your account, use this type of retention rule.

## Region-level retention rules

Resource tags are not specified in a Region-level retention rule. Even if the resources are not tagged, it applies to all of them. If you want to protect resources in a specific region, use this type of retention rule.

The resource remains in the Recycle Bin till one of the following happens:

- You restore it manually. When you restore a resource from the Recycle Bin, it is immediately available for use. You can use restored resources the same way as other resources in your account.
- The retention period is over. The resource can no longer be viewed or restored if the retention period is over.

Resource types supported by Recycle Bin are 

- Amazon EBS snapshots
- Amazon EBS-backed Amazon Machine Images (AMIs)

## Pricing

The Recycle Bin has resources billed at their standard rates. There are no charges for using recycle bin and retention rules.



Gratitude for perusing my article till end.I hope you realized something unique today. If you enjoyed this article then please share to your buddies and if you have suggestions or thoughts to share with me then please write in the comment box.


Above blog is submitted as part of 'Devtron Blogathon 2022' - https://devtron.ai/
Check out Devtron's GitHub repo - https://github.com/devtron-labs/devtron/ and give a ⭐ to show your love & support.
Follow Devtron on LinkedIn - https://www.linkedin.com/company/devtron-labs/ and Twitter - https://twitter.com/DevtronL/, to keep yourself updated on this Open Source project.
Protect your AWS Account with specified IPs
Tags: iam, aws, security, cloud
Published: 2022-06-19 07:46:37



Security is always important and the first thing before doing something in the cloud. I’m using the IP restriction policy for more than 5 years and I want to share this trick with you. There are two different ways to do it.

You should get a Static IP from your ISP and/or also you can also want to use your VPN IP address.
What is the IP Policy benefit?

The answer is simple. Nobody can access your resources in the cloud if they are not using the specified IPs.

Here is the example if the user logged in without a specific IP address in the IAM Policy. The user can able login but can not see anything about resources and/or information.

![User access restricted](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wmcq92d9yzkptemszhob.png)

This is the example if the user logged in with a specific IP address. Yes, everything looks like okay and the user can see information about resources and other things.


![User can see the resources](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zyo9yj8xxct60g1ggn4y.png)

## Allow Access if your IPs Match

Here is the IAM IP Policy if you want to give permission to access to your resources.

`{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "AllowAccessIfIPsMatch",
            "Effect": "Allow",
            "Action": "*",
            "Resource": "*",
            "Condition": {
                "ForAnyValue:IpAddress": {
                    "aws:SourceIp": [
                        "1.2.3.4/32",
                        "5.6.7.8/32"
                    ]
                }
            }
        }
    ]
}`

## Deny Access if your IPs Don’t Match

`{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "DenyAccessIfIPsDontMatch",
            "Effect": "Deny",
            "Action": "*",
            "Resource": "*",
            "Condition": {
                "NotIpAddress": {
                    "aws:SourceIp": [
                        "1.2.3.4/32",
                        "5.6.7.8/32"
                    ]
                }
            }
        }
    ]
}`

This IAM policy also affected aws-cli requests and all AWS API calls. The Allow or Deny policy is the same (vice versa!) and you do not have to use both at the same time. I just want to inform you there is more than one way to protect your AWS account.

**NOTE:** This IAM Policy is just telling you about the IP restriction logic. Please think twice to use this IAM policy on your account and on the production because it allows giving an AdministratorAccess to all of AWS Resources!

Maybe you want to check out my previous blog post about “How to secure your Amazon Web Services account” before applying the IAM IP Policy.

Thank you for reading!
Restore deleted files on the Mac from Snapshots in Disk Utility
Tags: macos, tooling, tutorial, productivity
Published: 2022-06-19 07:19:04

Snapshots are usually invisible. But you can view and manage them in Disk Utility. From there you can easily mount any previous snapshot in Finder and simply browse your disk as if it were yesterday.

![Mount snapshot from Disk Utility](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e146ku9bbyzovm6mph3i.jpg)

I have written a full blog post with more details and step-by-step instructions on [how to restore lost files from snapshots on macOS](https://coding-friends.com/blog/restore-deleted-files-mac-disk-utility-snapshots/).
Best YouTube channels for web developers
Tags: webdev, discuss, beginners, tutorial
Published: 2022-06-19 07:09:18

🌍🤝**Catch me on** : [GitHub](https://github.com/deepakydv9315) || [Codepen](https://codepen.io/deepakydv9315) || [Instagram](https://www.instagram.com/syco_coders/)

1. [Web Dev Simplified](https://www.youtube.com/channel/UCFbNIlppjAuEX4znoulh0Cw)
2. [Programming With Mosh](https://www.youtube.com/user/programmingwithmosh)
3. [Code With Harry](https://www.youtube.com/c/CodeWithHarry)
4. [Dev Ed](https://www.youtube.com/c/DevEd)
5. [Traversy Media](https://www.youtube.com/user/TechGuyWeb)
6. [freeCodeCamp.org](https://www.youtube.com/c/Freecodecamp)
7. [thenewboston](https://www.youtube.com/user/thenewboston)
8. [DevTips](https://www.youtube.com/c/DevTipsForDesigners/featured)
9. [LearnCode.academy](https://www.youtube.com/user/learncodeacademy/featured)
10. [Coder Coder](https://www.youtube.com/c/TheCoderCoder)


--------------
**Yeah there are many more creators on youtube, they are best too but these are recommended  by me and I follow them personally.**

**✍️If you know any Just ping me in comment section**
SQL Server: Storing language specific data in SQL Server table field.
Tags: sql, database, productivity, programming
Published: 2022-06-19 06:46:40

---
published: true
title: 'SQL Server: Storing language specific data in SQL Server table field.'
cover_image: 'https://raw.githubusercontent.com/sandeepkumar17/td-dev.to/master/assets/blog-cover/sql-server.png'
description: 'SQL Server: Storing language specific data in SQL Server table field.'
tags: sql, database, productivity, programming
series:
canonical_url:
---

While working on multi-language support we need to insert different language data in the same field or different fields of a SQL Server table.

There are two basic rules one needs to keep in mind while storing multi-lingual or Unicode data:
- First, the column must be of Unicode data type (i.e., `nchar`, `nvarchar`, `ntext`).
- And second is that the value must be prefixed with N while insertion.

Below is the sample script with output to understand it better.

{% gist https://gist.github.com/sandeepkumar17/938d940ba0030013d42ffeb9a6b1041b %}

In the output, you can see that values in Var_Field are saved as ????, even though in script N is prefixed while inserting. This is because the field is of `VARCHAR` type.

| Id | Var_Field | NVar_Field |
| --- | --- | --- |
| 1 | ?? ?? ???? ?? | यह एक शब्द है |
| 1 | ?? ??? ???? ?? ????? ?? | ਇਹ ਇੱਕ ਸ਼ਬਦ ਦਾ ਹੁੰਦਾ ਹੈ |

#### Note:
If you are using a stored procedure to insert the Unicode data, then make sure that N is used before the string while passing the parameter to the stored procedure. Also, make sure the parameter declared in the stored procedure is of Unicode type.

---
_Originally published at [http://diary-techies.blogspot.com](https://diary-techies.blogspot.com/2016/07/sql-server-storing-language-specific.html) on 
July 19, 2016._
How To Learn Python In Just 100 Days 🤔
Tags: python, tutorial, beginners
Published: 2022-06-19 06:43:51

## **Why To Learn Python** 😒 ?

_Python is highly versatile. You can use it for both small and complex tasks, and it is used across many different industries — from its more common applications in data science and software engineering to environments like mobile app development, artificial intelligence, and machine learning._


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


## Is Their Any Scope For Job ?

##### You Can Apply For :-

1. Software Engineer.
2. Python Developer.
3. Research Analyst.
4. Data Analyst.
5. Data Scientist.
6. Software Developer.


![Python For Beginner](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m60em57ncm06uhiznqsd.jpg)


### Is Python Suitable For Beginner In Programming Language ?

Python is always recommended if you're looking for an easy and even fun programming language to learn first.



![Learn Python](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l85mf7jiadg5zrxbqp02.jpg)


### From Where Can I Learn Python ?

You Can Learn From Here -> 

Udemy - [CLICK HERE](https://www.udemy.com/courses/search/?q=python)

Recommended Course - [CLICK HERE](https://www.udemy.com/course/100-days-of-code/)

[GeeksForGeeks](https://practice.geeksforgeeks.org/courses/Python-Foundation)

[Coding Ninja](https://www.codingninjas.com/courses/python-data-structures-and-algorithms)

Note : I Am Not Promoting Any Course .



#### You Can Try Some FREE Platforms Like :-

[YouTube](https://youtube.com)

[FreeCodeCamp](https://www.freecodecamp.org/news/learn-python-free-python-courses-for-beginners/)

[W3c School](https://www.w3schools.com/python/)

And Many Other Site's .

Are You Interested In Making Telegram Bot's ? 
Checkout This YouTube Channel - [CLICK HERE](https://www.youtube.com/c/JugnuCode/)

**Credit Of Writing :-**
_Google_
#Short_note- Redirect and catch errors in fetch hook Nuxt (SSR)
Tags: nuxt, vue, javascript, frontend
Published: 2022-06-19 06:28:33

This is just a short note about how to redirect after catching error in fetch hook in server side rendering- Nuxt js application.

```js
async fetch() {

    try{
        // whatever you need 

        const route = this.$router.history.current.path;
        this.routeName = route   
       const finalTitle = route.replace(/\\|\//g, "");
       const res = await 
       this.$axios.$get(`productBySlug/${finalTitle}/`);
       this.obj = res.data;
               
   }
   catch({response}){
       // others code goes here 
       this.$nuxt.context.redirect({path:'/'})


   }
        
},
```
Pure HTML & CSS sunset scenery😍
Tags: css, html, webdev, codepen
Published: 2022-06-19 05:59:59

## I made this👇🏻 using pure HTML & CSS!
![Sunset scene](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7f2fnmn2iryxjv1pkfyr.png)

Check out the code on my [codepen](https://codepen.io/dharmik403/full/gOozJjY)

Twitter post - https://twitter.com/HinguDharmik/status/1512768506160300035
Framer 101 | Basics and How to Start with Framer Motion.
Tags: webdev, javascript, beginners, tutorial
Published: 2022-06-19 05:06:17

The web is full of beautiful websites and while browsing a few you sometimes think how cool would that be if I can make something like that, right? I am starting this Framer Weekly series where I go over some of the animations and interactions I see over the web and try to recreate them or share some of the tips and tricks of building beautiful websites with Framer motion. 
This will be the first post in the series where we will learn about the basics of animations and frame motion, how to implement them and how animation works.

I will be using the following stack
- NextJS
- Framer-motion
- TailwindCSS

if any additional thing is used I will make sure to add and explain that.

Let's start by initialising a repo and a next project

```javascript
npx create-next-app framer-weekly with-tailwindcss
```

by doing so we will have a starter nextjs project.

Let us dive into animations now.
Animating an element with framer-motion have three basic parts 


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

- **Initial**
 	This is the initial stage at which we define how the element will be positioned on the screen at the initial load.

- **Animate**
  This is the animation stage, this depicts the component mount stage, once the component has been mounted this is what the element will do

- **Exit**
  This is similar to component unmounting while unmounting the component perform these.

These are the basic 3 things you need to take care of while animating an element on the screen. all of these are passed to the framer-motion component as props.

Here is a basic animation for your reference.

{% embed https://codesandbox.io/embed/fast-breeze-pkwrgw?fontsize=14&hidenavigation=1&theme=dark %}

framer motion converts every HTML element to a framer component just by adding **motion.** infront of the element like this

```html
<motion.div></motion.div>
```

to use the above import motion component like this

```js
import { motion } from 'framer-motion'
```

without the motion part, you will not be able to add those 3 props above to the component.

The above 3 props are objects and take any CSS value you would like to change/animate.

```js
intial = {{
      opacity: 0,
      x: 10,
    }}
animate = {{
      opacity: 1,
      x: 100,
    }}
```

code above when passed to the motion component will animate the opacity and x position of the targeted element.

These were the basics of framer motion, in the next post we will learn about Variants, staggering children, and how we can go about creating this beautiful text animation.

If you like and would love to learn more about creating these, please consider following me here and on Twitter as well.
Components AI | Made with Next JS
Published: 2022-06-19 04:36:18


![Components AI | Made with Javascript | Next JS](https://res.cloudinary.com/madewithjavascript/image/upload/v1654950428/large_components_ai_made_with_next_js_22b1e3d550.png "Components AI | Made with Javascript | Next JS")


### A new way to explore generative design systems

> Generative design tools for the web
> Customize, curate, and publish designs faster than ever.
> 
> ### Explore
> Cycle through generated designs or create your own from scratch with the ease of parametric controls.
> 
> ### Augment
> Manipulate parameters until the design is just right. Lock inputs for properties or combinations of properties you like to find your visual language
> 
> ### Navigate
> Vote generated designs up or down to curate future output. Save as many iterations as you want.
> 
> ### Multi-format export
> Export designs in a growing list of formats includingL React JS, JS, JSON, JSX, SVG, PNG, HTML, CSS, CSS custom properties, and Sass
> 
> ### One-click publish
> Instantly share your designs with colleagues or clients to present or collaborate. Publish hsted web pages along with hosted assets for styles as JS, JSON, and CSS

## Check out more such amazing projects on our website

[Made with Javascript](https://madewithjavascript.club)

## Want us to feature your project

[Submit your Project to Made with Javascript](https://madewithjavascript.club/submit-project)


You can also write to us for any of your queries at:

[Email Made with Javascript](mailto:madewithjavascript@gmail.com)

## Project already shared on our social media handles.

| SocialMedia | SharedLink |
| ----------- | ---------- |
| Twitter | [Components AI on Twitter](https://twitter.com/withjavascript/status/1538378952120614914?s=20&t=DD9ny1ATotTmL-0mK2_lsQ)
 |
| Medium | [Components AI on Medium](https://medium.com/p/components-ai-made-with-next-js-a3bbfca7cf74)
 |
| Facebook | [Components AI on Facebook](https://www.facebook.com/madewithjavascript/posts/pfbid02T3LibFnet5PAayEiXg2AstR3TipQi3jDwyeNf6vxdptpeP7FXjxFFGhQV3acf3vml)
 |
| Tumblr | [Components AI on Tumblr](https://www.tumblr.com/blog/view/madewithjavascript/687460343032725505?source=share)
 |
| LinkedIn | [Components AI on LinkedIn](https://www.linkedin.com/feed/update/urn:li:activity:6944145428229611520)
 |
| Pinterest | [Components AI on Pinterest](https://pin.it/15z8Ivn)
 |

Filled Under:
 - [Made with Javascript](https://madewithjavascript.club)
 - [Made with Next JS](https://madewithjavascript.club/categories/next-js)

Make sure to give this post ❤ 50 ❤ hearts, click the 🦄 unicorns 🦄 and follow 👉 @madewithjavascript 👈 for more such awesome showcases. Show you love for the people who have worked so hard!
Airplane | Made with Next JS
Published: 2022-06-19 04:29:02


![Airplane | Made with Javascript | Next JS](https://res.cloudinary.com/madewithjavascript/image/upload/v1654949184/large_airplane_made_with_next_js_077b9e98f4.png "Airplane | Made with Javascript | Next JS")


### Turn APIs, SQL, and scripts into internal tools for the entire team.

> Code to internal apps, in minutes.
> Turn APIs, SQL queries, and scripts into apps for the entire team
> 
> ### Compose multi-step runbooks
> 
> ### Bring the entire team
> Airplane makes it easy to build tools for the entire team. Empower teammates without sacrificing security.
> 
> ### Use Cases
> 
> #### Admin operations
> Let your customer-facing teams delete accounts, change emails, issue refunds, and more.
> 
> #### Customer onboarding
> Empower your customer success team to configure accounts for new customers.
> 
> #### On-call runbooks
> Make sure you're not the only one who knows how to run that script you wrote.
> 
> #### Approval flows
> Make sure sensitive operations are approved by a manager or admin before being executed. Docs »
> 
> #### Scheduled jobs
> Run daily reports and other periodic operations without the headache of maintaining cron or Airflow. Learn more »
> 
> #### Long-running tasks
> Kick off data backfills and other long-running tasks and get notified when they’re complete.

## Check out more such amazing projects on our website

[Made with Javascript](https://madewithjavascript.club)

## Want us to feature your project

[Submit your Project to Made with Javascript](https://madewithjavascript.club/submit-project)


You can also write to us for any of your queries at:

[Email Made with Javascript](mailto:madewithjavascript@gmail.com)

## Project already shared on our social media handles.

| SocialMedia | SharedLink |
| ----------- | ---------- |
| Twitter | [Airplane on Twitter](https://twitter.com/withjavascript/status/1538376999533780992?s=20&t=9ANsNmQQodVxq97ARL_80w)
 |
| Medium | [Airplane on Medium](https://medium.com/@madewithjavascript/airplane-made-with-next-js-e0838b687ce8)
 |
| Facebook | [Airplane on Facebook](https://www.facebook.com/madewithjavascript/posts/pfbid0vAd4k7Q6QNmNqqjw7zyUPA5AttGBmoUgpfUpFaYYHNQEUuck7pim6rKeDC1quo8Gl)
 |
| Tumblr | [Airplane on Tumblr](https://www.tumblr.com/blog/view/madewithjavascript/687459775998541824?source=share)
 |
| LinkedIn | [Airplane on LinkedIn](https://www.linkedin.com/feed/update/urn:li:activity:6944142836153933824)
 |
| Pinterest | [Airplane on Pinterest](https://pin.it/5lwztsY)
 |


Filled Under:
 - [Made with Javascript](https://madewithjavascript.club)  
 - [Made with Next JS](https://madewithjavascript.club/categories/next-js)

Make sure to give this post ❤ 50 ❤ hearts, click the 🦄 unicorns 🦄 and follow 👉 @madewithjavascript 👈 for more such awesome showcases. Show you love for the people who have worked so hard!
Any suggestions for new coders?
Published: 2022-06-19 04:18:37

Hello everyone who has been coding for many years. I would like to ask for help with choosing the correct materials for coding and roadmap which is helpful and reliable. It has been a year since I started learning to code but tbh I still lagging in CSS and I am not coding frequently because lack of motivation for coding I am an alone coder so it is hard to get motivation from myself. Thanks hope I will get an answer to my question.
1268. Leetcode solution in JavaScript
Tags: javascript
Published: 2022-06-19 04:09:01

```
var suggestedProducts = function(P, S) {
    P.sort()
    let ans = [], left = 0, right = P.length - 1
    for (let i = 0; i < S.length; i++) {
        let c = S.charAt(i), res = []
        while (P[left]?.charAt(i) < c) left++
        while (P[right]?.charAt(i) > c) right--
        for (let j = 0; j < 3 && left + j <= right; j++)
            res.push(P[left+j])
        ans.push(res)
    }
    return ans
};
```