teleren/devto huggingface dataset:
How to enable versioning in Amazon S3

Tags: aws, s3, versioning, tutorial
Published: 2021-10-08 09:03:28

# Introduction
### What is Versioning?

- Versioning is a means for keeping multiple variants of the same object in the bucket.

- Versioning is used to preserve, retrieve, and restore every version of every object stored in an S3 bucket.

- Versioning is done at the S3 Bucket level.

- Versioning can be enabled from the AWS Console / SDKs / API.

- Versioning, once enabled, cannot be completely disabled.

- The alternative to disabling versioning is placing the bucket in a "versioning-suspended" state.

- A drawback of having multiple versions of an object is you are billed multiple times (since the objects are getting stored in S3 each time).

- In order to avoid having multiple versions of the same object, S3 has a feature called Lifecycle  Management. This allows us to decide on what to do when multiple versions of an object are piling up.

- One advantage of versioning is, we can provide permissions on versioned objects i.e., we can define which version of an object is public and which one is private.

### Example Diagram

![aws-s3-versioning-diagram.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1632069807412/VTz_IGEWD.png)


### Enable Versioning on the S3 bucket

- Create new Bucket
![aws-s3-versioning-new-bucket.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1632069979509/iZYpJcNg-.png)

- Enable versioning
![aws-s3-versioning-check-enabled.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1632070082846/u20_zE3pe.png)

- To test it, upload new object, we have used the orc avatar for the initial version:

![aws-s3-versioning-s3-upload.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1632070006114/Dkz4lUJkX.png)

- Make the bucket public with a Bucket Policy, use the Policy generator and grant public access to getObject in s3: 

![aws-s3-versioning-policy-gen-click.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1632070202715/VgYaPAsXK.png)

![aws-s3-versioning-policygen.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1632070355939/BxM0ZJNGz.png)

![aws-s3-versioning-policy-json.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1632070222199/uJQCFe6uf.png)

![aws-s3-versioning-policy-paste.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1632070264014/o_768rX0b.png)

- Now we upload the same object but with different color balance to differenciate clearly the versions:


![aws-s3-versioning-show.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1632070252392/3B9J62rH9.png)


![aws-s3-versioning-select-version.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1632070323865/-EI3OithM.png)
Front - End websites for practice
Tags: webdev, css, javascript
Published: 2021-10-08 09:01:52

So hi again!!

I am here with some websites to practice front-end!!

So no descs or unnecessary talks. Just names

1) Netflix
2) Amazon
3) Bootstrap
4) Myntra
5) Unacademy

Some other famous ones can also be done..

Now the Bye time. Follow, heart, comment, unicorn.. Don't Wait!!
Popular Resources to Learn TypeScript!
Published: 2021-10-08 08:44:25

<h1>Popular Resources to Learn TypeScript!</h1><img src="https://uploads-ssl.webflow.com/60d5a97381523a05b73c87c6/6128bcef7668e0b82b53343c_15.png"/><p><em>TypeScript</em> is a language that aims at easing the development of large-scale applications written in JavaScript. TypeScript adds common concepts such as classes, modules, interfaces, generics, and (optional) static typing to JavaScript. It is a superset of JavaScript: all JavaScript code is valid TypeScript code, which You can add seamlessly to any project. The TypeScript compiler emits JavaScript.</p><p>The 5 free resources to learn TypeScript are as follows:</p><p>‍<a href="https://blog.teamtreehouse.com/getting-started-typescript"><strong>‍</strong></a></p><h4><strong>1. Getting started with TypeScript</strong></h4><p>Getting started with TypeScript is a beginner's guide to TypeScript. It covers all the essential factors like TypeScript origin, syntax, interfaces, classes, etc. Readers will get a brief idea of what TypeScript is and how it works.<em>‍</em></p><p><em>Created by Andrew Chalkley.</em></p><div></div><h4>‍<a href="https://basarat.gitbook.io/typescript/getting-started"><strong>‍</strong></a><strong>2. TypeScript Deep Dive</strong></h4><p>An eBook that serves as a deep dive into what TypeScript is and how it works. In this eBook, you can not only learn but also understand every aspect of typescript. How it came to be and where you should use it. It is an impressive Gitbook for both beginners and advanced developers. It also serves as a reference and will help users for tests and interviews.</p><p><em>Created by Basarat.</em></p><div></div><h4>‍<strong>3. TypeScript Quick Start</strong></h4><p>Official TypeScript documentation that contains everything about TypeScript. It is a fantastic guide for everything TypeScript-related. It is also well written and updated.</p><p><em>Created by TypeScript Devs.</em></p><div></div><h4>‍<strong>4. Learn X in Y minutes where X=TypeScript</strong>‍</h4><p>This website conveys the idea of TypeScript in a very engaging and exciting manner. The users are presented with blocks of code. The comments of the code are the actual lessons. Reading through the comments will make us understand what each piece of code does.</p><p>‍<em>Created by Philippe Vierick.</em></p><div></div><h4>‍<strong>5. Clean code concepts of TypeScript</strong></h4><p>An article that educates readers about the rules they should follow to generate clean code in TypeScript. The article has over 4.6K GitHub stars. Clean coding is a necessary factor in programming and should be followed by all the development team members. This article helps beginners in TypeScript to generate clean and readable code.</p><p><em>Created by mheob. </em></p><div></div><p>‍</p>
6 Ways to Look After your Mental Health as a Developer
Tags: news, programming, career, discuss
Published: 2021-10-08 08:20:39

**Working in tech is awesome, especially as a software developer.** 
The opportunity to build amazing products, being paid to learn and working with very smart colleagues are just some of the reasons why this profession is so rewarding.

However, software engineering isn’t always a walk in the park. Tight deadlines, adjusting to remote work, fixing major outages and generally, the velocity of the tech industry are some factors that can cause you stress as a developer. Therefore, it’s important to look after yourself and create simple, daily rituals that support a healthy working routine.

Ahead of [World Mental Health Day] (https://www.who.int/campaigns/world-mental-health-day/2021) on October the 10th, we asked our software engineers on how they take care of their mental wellbeing. 

Here’s what they said:


**1. Fresh air** 🍃
Our interim VP of Engineering swears by fresh air and regular doses of sunshine; living in Hamburg means that biking to work or going for a lunchtime stroll around the Alster is easy to integrate into your daily routine. 

**2. Meditation** 🧘‍♀️ 🧘‍♂️
Some of us have trouble not thinking about things, so meditation can help you put things into perspective and arrive in the current moment rather than being swept away by thought. 

**3.The Pomodoro Technique** 🍅
[This] (https://francescocirillo.com/pages/pomodoro-technique) technique focuses on working in 25 minute sessions throughout the day.
This can be helpful for focussing efficiently and it encourages you to take regular breaks so that you avoid sitting for hours and hours without moving, drinking water or looking away from your computer screen.


**4. Connect with colleagues** 🙋‍♀️ 🙋‍♂️
At Taxdoo, we encourage everyone to set up or attend ‘Donuts’ (informal online meetings), regardless of department.
Catching up with a colleague over a random Donut or setting up a Developer Donut is a great way to get to know your colleagues and helps you to feel connected and part of a team.

**5. Take a break** 🌳🚶🚶‍♀️🌳
Coding is awesome and the feeling of completing a task is great, however rest is also important. Why not use your lunch break to talk a walk around the block? You might be surprised at how refreshed you feel.

**6. Find a job you love** 💙
We all spend a lot of time at work, so it is important to feel comfortable and motivated by your tasks, colleagues and environment. 

*If you’re wondering what it’s like to work at Taxdoo, we can confirm that we’re hiring! For more details, check our [jobs] (https://boards.greenhouse.io/taxdoo) page or follow us on [Twitter] (https://twitter.com/TaxdooEng) for more updates.*

**How do you look after your mental health as a developer?**
Neovim LSP only show line error on CursorHold
Published: 2021-10-08 08:05:04

I've been using [lunarvim](https://www.lunarvim.org) for just a bit now, and It is pretty well setup.  I recommend trying it out.

Here is a fun little trick to show only the line error for the given line the cursor is on.

There are somethings it doesn't do and that is change the line color base on the error type (Error, Warn, etc..).  It is setup to just use highlight for `Comment`

Open `~/.config/lvim/config.lua` and add the following:

```
lvim.lsp.diagnostics.virtual_text = false


function PrintDiagnostics(opts, bufnr, line_nr, client_id)
  opts = opts or {}

  bufnr = bufnr or 0
  line_nr = line_nr or (vim.api.nvim_win_get_cursor(0)[1] - 1)

  local line_diagnostics = vim.lsp.diagnostic.get_line_diagnostics(bufnr, line_nr, opts, client_id)
  if vim.tbl_isempty(line_diagnostics) then return end

  local diagnostic_message = ""
  for i, diagnostic in ipairs(line_diagnostics) do
    diagnostic_message = diagnostic_message .. string.format("%s ", diagnostic.message or "")
  end
  -- print(diagnostic_message) -- on comment to print to MsgArea
  vim.api.nvim_buf_set_virtual_text(bufnr, 1, line_nr , {{diagnostic_message, "Comment"}}, {})
end

function Clear(_, bufnr, _, _)
-- print("    ") -- on comment to print to MsgArea
  vim.api.nvim_buf_clear_namespace(bufnr, 1, 0, -1)
end

vim.cmd [[ autocmd CursorHold * lua PrintDiagnostics() ]]
vim.cmd [[ autocmd CursorMoved * lua Clear() ]]
```
How to create an immediately-invoked function expression - IIFE in Javascript
Tags: javascript, webdev, beginners, tutorial
Published: 2021-10-08 07:18:44

An Immediately-invoked Function Expression is a way to execute a function immediately, as soon as it is created. IIFE is an example of function invocation: the first pair of parenthesis (function(name) {...}) is an expression that evaluates to a function object, followed by the pair of parenthesis with parameters if any.

Let say we have a function to calculate a total from an array:

The simplest way is to create a function with a for..in loop to loop into each values of the array. Example:
```
function calculateTotal(arr) {
   var total = 0;
   for (var i in arr) {
     total += arr[i];
   }
   return total;
}

calculateTotal([1,2,3,4,5,6]); // invoke the Javascript function for execution
```
How to construct the immediately-invoked function expression - IIFE?

1. First wrap the whole function declaration into parenthesis
2. Secondly add 1 more parenthesis at the end of the function.
3. If there is any parameters to pass, pass them in the last parenthesis from step 2
4. If there is any Javascript invocation like calculateTotal([1,2,3,4,5]);, please remove it.

1. ```
(function calculateTotal(arr) {
var total = 0;
for (var i in arr) {
  total += arr[i];
}
return total;
}) // wrap the whole function into parenthesis
```
2. ```
(function calculateTotal(arr) {
var total = 0;
for (var i in arr) {
  total += arr[i];
}
return total;
})() // add 1 more parenthesis here
```
3. ```
(function calculateTotal(arr) {
var total = 0;
for (var i in arr) {
  total += arr[i];
}
return total;
})([1,2,3,4,5,6]) // pass parameters here
```
THE INCOMPLETE LIST OF PROGRAMMING LANGUAGES
Tags: programming, webdev, computerscience, showdev
Published: 2021-10-08 07:05:35

Programming languages that I have been added here are either popular, or have influences on other languages, or just you might heard/hear of it sometime.  

**Machine Language**
- 0s and 1s (Actually two states of transistors)

**Lowest Level**
- Assembly Language

**Compiled**
- C
- C++
- Rust
- Pascal (Object Pascal / Delphi)

**Compiled - Garbage Collected (GC)**
- Swift / Objective-C
- Go
- Dart
- Crystal
- D
- Nim

**Virtual Machines (VM)**
- Java / Kotlin / Scala / Groovy
- C# / VB .NET
- Erlang / Elixir
- Smalltalk / Squeak

**Interpreted**
- Python
- JavaScript / TypeScript
- PHP
- Ruby
- Perl
- Lua

**Functional**
- Haskell
- Lisp (Scheme / Common Lisp / Racket / Clojure)
- ML (Standard ML / OCaml / F#)

**DSL - Markup - Other - Uncategorized**
- HTML/CSS
- SQL
- Bash / PowerShell
- VBA
- R / Matlab / Julia
- COBOL
- APL
- Fortran
- Ada
- Scratch
- Prolog
- Brainf*ck
Performance issues? Find your bottleneck with console.time()
Tags: javascript, performance, angular, codequality
Published: 2021-10-08 06:59:27

My, [since a little while beautiful](https://dev.to/timetc/itch-scratch-and-share-1cnf), app called [What?!](https://whatwhat.app/) was a little slow when opening files. A lot slower since the version before the big redesign. When you changed a lot it is hard to find a starting point. What you can do about this? You already read the title so you know the answer. Tldr; [just try it](https://developer.mozilla.org/en-US/docs/Web/API/Console/time).

The `console.log()` function is something most JS developers know, you can output anything to the console (for Node as well as the browser). I think a lot of developers do not know about `console.time()` though. Probably something you will use a lot less, but can be very useful.

Okay, so let’s find that slow little bastard of a function. What you need to know:
- **console.time(‘example’)** will start a timer, where you also give it a name. You can start multiple timers (simultaneously), if choose different names. It will not console anything though.
- **console.timeLog(‘example’)** gives you the amount of elapsed milliseconds in the console. Make sure to start a timer first and same name. Tip: you can call it multiple times to see where the biggest time jumps in your process are made.
- **console.timeEnd(‘example’)** will stop the timer and console log the amount of elapsed milliseconds.

Put the `console.time()` at the start of your slow process and drop a few timeLog’s through the process. In places where different things are done, or maybe expect performance issues. Do not forget to stop the timer at the end.

Do you have simultaneous tasks or a lot of steps? You can start multiple timers, measure the overal process and start separate timers for certain tasks/steps to get a better picture. Do whatever you need to see what piece of your code is taking too much time, just start and try.

Hopefully you did find the son of a gun. Now you may have some ideas to implement it differently, maybe >1 options. Let’s implement them! Now you can try out things, make a duplicate function with a different implementation. Keep `console.time()` in your code to measure the before/after.
When you do have multiple solutions, check all of them out (or some of them) and see which one is the fastest. You already have the test bench set up, now is the time!

Next up: pick your solution, remove your console functions because you don’t want them in production code, go to the store, buy confetti and celebrate! Your application got faster, congratulations :)

Of course there are a lot more options for debugging performance, and a lot more tools to work with. I like this one because it is easy and accessible for everybody who is in need.

It helped me to get my app [What?!]() to be a lot faster. Especially on the larger translation files. Be careful with deep cloning large objects, lesson learned.
power plant maintenance companies
Tags: maintenance
Published: 2021-10-08 06:46:33

SKV Energy Services Power Plant Consultants In India is a Team of Power Plant Professionals having good experience in Design, Erections, Commissioning, Operation & Maintenance, Trouble Shooting, Shutdown maintenance, Capacity Enhancement, Relocation, Energy Audit, and various other activities related to Power Plants. we are also Power Plant Spares Suppliers In India products like Boiler spare parts, ash handling spares, fuel handling spares, and other general hardware items
power plant maintenance companies
<p><a href="https://www.skvenergyservices.com/operation-and-maintenance-of-power-plant/">power plant maintenance companies</a></p>
The Complete Web Component Guide: Part 2 — Attributes and Properties
Tags: javascript, webdev, tutorial, programming
Published: 2021-10-08 06:38:14

[![](https://cdn-images-1.medium.com/max/2000/1*KE5bZMF41HQnn2bupDozcQ.png)](https://medium.com/front-end-weekly/the-complete-web-component-guide-part-1-custom-elements-a627af805df8?source=rss-f6e6b5239e7f------2)

Become an expert in the future of Web Development

{% medium https://medium.com/@mariusbongarts11/the-complete-web-component-guide-attributes-and-properties-9b74d19bc043 %}
Best 10 Android Apps to Evolve Your Programming Skills.📌
Tags: beginners, android, programming, webdev
Published: 2021-10-08 06:07:26

#I'll tell you the 10 Best android Application to learn and grow your web Development Programming Skills.
1.[Master Coding](https://www.google.com/search?q=master+coding&oq=master+coding&aqs=chrome..69i57.4889j0j9&client=ms-android-vivo&sourceid=chrome-mobile&ie=UTF-8) - Learn Coding from Zero to Hero

2.[Grasshopper](https://www.google.com/search?q=grasshopper+coding&oq=grass&aqs=chrome.1.69i57j0l3.2973j0j9&client=ms-android-vivo&sourceid=chrome-mobile&ie=UTF-8) Learn to Code

3.[Programming Hub](https://www.google.com/search?q=programming+hub&oq=programing+hub&aqs=chrome.1.69i57j0l3.9818j0j9&client=ms-android-vivo&sourceid=chrome-mobile&ie=UTF-8) Learn to code

4.[DataCamp](https://www.google.com/search?q=datacamp&oq=datacamp&aqs=chrome..69i57.3605j0j9&client=ms-android-vivo&sourceid=chrome-mobile&ie=UTF-8) Learn Python, SQL & R coding.

5.[Mimo](https://www.google.com/search?q=mimo&oq=mimo&aqs=chrome..69i57.1714j0j9&client=ms-android-vivo&sourceid=chrome-mobile&ie=UTF-8) Learn coding in HTML, JavaScript, Python.

6.[NM](https://www.nmtechworks.com/learn-coding.html) Learn to Code for Free

7.[900 Programming Books](https://steprimo.com/android/us/app/com.codinghomies.programming.books.learn.to.code/900-Programming-Books-Free-Coding-Books-at-Once/) - Free Coding Books at Once.

8.[Learn DS & Algo](https://www.google.com/search?q=learn+ds+and+algo&oq=learn+ds+and+algo+&aqs=chrome..69i57j0l3.6081j0j4&client=ms-android-vivo&sourceid=chrome-mobile&ie=UTF-8)Programming Interview Preparation

9.[W3School](https://www.google.com/search?q=w3schools+app+download+for+android&oq=w3school+app&aqs=chrome.2.69i57j0l3.9704j0j9&client=ms-android-vivo&sourceid=chrome-mobile&ie=UTF-8)Learn Free coding

10.[Udemy](https://www.google.com/search?q=udemy+app&oq=udemy+app+&aqs=chrome..69i57j0l3.3499j0j9&client=ms-android-vivo&sourceid=chrome-mobile&ie=UTF-8) Application code and programing code.

#####I Hope this is help you to learn the coding from the application in mobile or phone concept.
I have started Learning WebDev Few Months Ago, Here is my website
Tags: webdev, html, css
Published: 2021-10-08 05:51:39

Hello Everyone
Here is my new website

Url - 
https://ourcontent.ml

Github Repo -
https://github.com/ProHarshit/OurContent

Thank you W3C And W3 Schools
Pls tell how did you like it
Happy Hacktoberfest! 🎃 - Part 1
Tags: opensource, hacktoberfest, git
Published: 2021-10-08 05:35:23

## Introduction

This week in my open-source course, I began release 0.2 by working on the ongoing Hacktoberfest. After hours scrolling through hundreds of projects on GitHub without any luck, I decided to ask my professor if I could contribute to one of his under-development projects. Luckily, he was able to assign me an [issue](https://github.com/Seneca-CDOT/telescope/issues/2141).

## The issue

After adding a temporary fix to an RSS bug, my professor wanted to remove it now that someone had recently resolved the issue. The task was to undo his work by running a Git command to revert the project to its earlier version.

## Working process

With the task at hand, I began by forking a version of the project to my GitHub, then cloning it to my local machine and created a new `issue-2141` branch so I could take a look at it:

```
git clone https://github.com/mqnguyen5/telescope.git
git checkout -b issue-2141
```

While it was easy dealing with the issue as I only had to run a single `git revert` command, I wanted to know more about how it works, so I decided to rely on the Internet for more information.

![Illustration of Git revert](https://www.golinuxcloud.com/wp-content/uploads/git-revert-2.png)
> Photo from [GoLinuxCloud](https://www.golinuxcloud.com/wp-content/uploads/git-revert-2.png)

To my understanding, running `git revert` is like pressing `Ctrl + Z` (or undo). However, I found out that instead of removing/deleting the latest commit, Git creates a brand new commit with the content of the commit before the latest, as demonstrated by the image above.

## Getting my PR accepted

After finishing the research and ensuring that the revert went on successfully, I committed the changes and followed it with a [pull request](https://github.com/Seneca-CDOT/telescope/pull/2323). 

Compared to writing pull requests during the labs, the experience was a bit different, as the project I was contributing to required me to be very specific in what I did. From what type of changes I worked on (maybe adding a feature, fixing a bug, etc.) to the issue that I was addressing, everything had to be written out in detail so many people could take a look at it later in case they need to change anything. I had to edit my pull request a bit because I had a typo, but in the end, my pull request was accepted and merged into the project.

## Conclusion

Overall, I would say that this was a good start, as I could further familiarize myself with the open-source workflow. Additionally, I also learned a new Git command that I will definitely be using in the future. As October is still on its way, I'm looking forward to next which project I will be working on next.

Happy Coding! 👻
10 FREE Udemy courses for you to learn Node.js
Tags: javascript, beginners, webdev, programming
Published: 2021-10-08 05:29:55

_If you found value in this thread you will most likely enjoy my tweets too so make sure you follow me on [Twitter](https://twitter.com/VladPasca5)  for more information about web development and how to improve as a developer. This article was first published on my [Blog](https://vladpasca.hashnode.dev/)_

A Beginner's Guide to Node.js

https://www.udemy.com/course/a-beginners-guide-to-nodejs/

GraphQL in React.js and Node.js

https://www.udemy.com/course/graph-ql/

Portfolio Website with Node JS & Express

https://www.udemy.com/course/portfolio-website-with-node-js-express/

Learn Modern Javascript by Coding a Snake Game

https://www.udemy.com/course/learn-modern-javascript-by-coding-a-snake-game/

Intro to Node JS & Express

https://www.udemy.com/course/intro-to-node-js-express/

Node JS API Development for Beginners

https://www.udemy.com/course/node-js-api-tutorial/

Create Telegram bot with NodeJS and Firebase Cloud Functions

https://www.udemy.com/course/telegram-firebase-bot/

Build a Pet Hotel web app with React using ScaffoldHub

https://www.udemy.com/course/react-pet-hotel/

Create a Node JS backend app and host it on AWS

https://www.udemy.com/course/free-create-a-node-js-backend-app-and-host-it-on-aws/

CRUDapp using NodeJs and MongoDB(MERN Project)

https://www.udemy.com/course/crudapp-using-nodejs-and-mongodbmern-project/

Now, don't just bookmark this article

Go over each of these courses and do some research

Then choose the one that is perfect for you and start learning

Take action

_I hope found this useful and if you did please let me know. If you have any questions feel free to DM me on  [Twitter](https://twitter.com/VladPasca5)._