teleren/devto huggingface dataset:
Digging into Unity: Prefabs
Published: 2021-01-05 15:40:08

*Hey there, I'm Marc and I'm a professional web developer since a few years. It's time for something else so I decided to learn game development with C# and Unity. I'm going to use dev.to to keep my personal notes and summaries.*

So one of the first things that I encountered in Unity are so called *Prefabs*. What's that? What does it even mean?

## What is a Prefab?
The word is short for *prefabricated*. A Prefab is a reusable asset that contains a GameObject, it's configuration, it's components and everything that's nested below it. You can see Prefabs as templates for GameObjects.

![Prefab in a Scene](https://dev-to-uploads.s3.amazonaws.com/i/vyg8zi77iawyuife8tqs.png)

A Prefab is indicated by this little blue box icon. The arrow icon on the right will bring you to the Prefab editor, where you can edit the Prefab in isolation.

## How to create a Prefab?
Just drag a GameObject from your Scene window into your Project window.

## When to use Prefabs
The general rule of thumb is that you should almost always prefab your GameObjects, as you are most likely going to reuse them at any time in future. You can even prefab your camera and lighting, which is useful when you create multiple scenes.

## What can you do with a Prefab?
### Overriding
If you could just use a Prefab as it is it would not be that useful. That's why you can override it's configuration.

![Prefab Overrides](https://dev-to-uploads.s3.amazonaws.com/i/1rrdy57gnzinmwijef9n.png)

Overrides are marked as bold. If a Prefab is overridden it will always keep these overrides, even if you change that property in your Prefab. So if you override a property you are removing the sync. You can then apply your overrides to the Prefab to apply your changes to all instances or reset all overrides to revert your changes of the current instance to the Prefab configuration. Changes made in the Prefab editor are applied immediately.

### Nesting
You can also nest Prefabs within Prefabs to combine them in various ways. Nothing else to say I guess.

### Unpacking
Unpacking is the process of unlinking a GameObject from a Prefab. That doesn't delete the Prefab nor the GameObject, it just removes the syncing between those.

-------
*That's it about Prefabs. As I am still completely new on Unity take this with a grain of salt. The provided information are based on my own experiences and research. If you have something to add or correct please comment it.*
AWS Auto Scaling Group Explained – Simplified through comics
Tags: aws, cloudskills, autoscaling
Published: 2021-01-05 15:38:18

Imagine you want to buy a gift from an e-commerce website for someone on Christmas.

And when you visit the website, it’s DOWN.

Frustrating, isn’t it?

Since it’s a Christmas festival just like you many people are visiting the website for shopping.

This downtime results in customer frustration and loss of business for companies.

Now, the SOLUTION to this problem is…

Auto Scaling Group

Yes guys, in today’s blog we will learn about Auto Scaling concept and why it is so important.

This is a comic conversation tutorial between two guys that will explain you Auto Scaling concept easily.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/9id20dljy3f7hsp9ove0.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/i9vb1gv2pjj0ffiy3ubv.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/z7rgzuw05wnz5p58w96z.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/5otzecq6mwovgrasmbpz.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0yg4sy7iyqr4gguiqgm0.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/exq0wv2i5hvh0bmjoooo.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8lxysw6m94kvohfjsaiz.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/f85k60tocjskqkgmig27.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/3zoals48g0hm15kpgbrx.png)

To view all the graphic and complete tutorial you can view this blog here http://cloudforgeeks.com/aws-auto-scaling-group-explained-simplified-through-comics/

And for more such simple tutorials on cloud technologies, you can visit my blog cloudforgeeks.com
Managing npm and git packages.
Published: 2021-01-05 15:23:40

Github has come up with their own package registry solution. https://github.com/features/packages similar to npm package the packages are hosted in github, I use git mostly so it makes sense for me to host packages there also provides mechanism for private packages.

Let's dive into the usage for github packages. We publish packages under a owner's scope. Say my github username is karkipy so the scope is @karkipy, and the package name will be the combination of your scope and the repo name itself such as  @karkipy/randomPackage.

Now to publish this package into github registry we can specify it in the package.json file about which registry it should refer to such as 

```javascript
"publishConfig": {
  "registry":"https://npm.pkg.github.com"
}
```

To publish :

```bash
npm publish
```

should do the trick, now installing packages both from npm and github can be tricky as we have to specify from which we are installing packages, if only github is mentioned then the conflict will arise as many fundamental packages may not have been hosted by github package registry or if only npm is mentioned then the package from github will not be installed. So we need to specify packages to be installed from multiple organization.

Create an .npmrc for this particular configuration, make sure it is in root. Configuration for the file should be something as :

```bash
//npm.pkg.github.com/:_authToken=GITPERSONALACCESSTOKEN

@karkipy:registry=https://npm.pkg.github.com/

//registry.npmjs.org/:_authToken=NPM_TOKEN

```

Personal access token should be granted for the private packages that you publish in github similar to that NPM_TOKEN does the same.

NPM_TOKEN: https://docs.npmjs.com/creating-and-viewing-access-tokens
GITPERSONALACCESSTOKEN: https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token
Menemukan Service Komputer Bekasi Ini Begitu Mudah Saat Ini
Published: 2021-01-05 15:19:03

Bagi pemilik komputer akan ada masanya perangkat ini akan mengalami suatu masalah. Yang mana kerusakan tidak bisa di hindari.

Di karenakan di gunakan dalam waktu lama dan terus menerus sehingga membuat bagian hardware dan software pasti akan bermasalah. Ini sebuah hal yang wajar.

Tak perlu risau bila mana mengalami hal ini karena anda sendiri tidak harus memperbaiki sendiri. Di sekitar kita pastinya ada orang - orang yang kompeten dalam memperbaiki pc komputer. Serahkan saja kepada ahlinya, anda hanya mempersiapkan baiya yang harus di bayarkan saja.

Untuk warga bekasi dan sekitarnya menemukan dimana yang menyediakan ini sangat mudah sekali. Bagaimana caranya??

1. Rekomendasi
Rekomendasi bisa di dapatkan informasi dai orang yang sudah pernah memakai jasa tersebuat baik keluarga dekat, saudara, kolegan hingga sahabat. Bila sampai memberikan pilihan pastinya sudah menggunakan jasa tersebut.

Baik buruk apa yang di sampaikan bisa jadi pertimbangan anda untuk melanjutkan pilihan memakai atau tidak.

2. Online
Zaman sudah sangat maju yang mana informasi sudah ada di tangan kita. Bagi pemilik gadget handphone, komputer, laptop tinggal koneksikan ke internet semua akan mudah di temukan.
Masuk ke browser ketikkan " service komputer bekasi ".

Akan banyak info yang bisa di dapatkan. Tugas anda kontak satu demi satu untuk mengetahui bagaimana layanan dan kualitas yang di berikan.

Ajukan beberapa pertanyaan yang kiranya masuk akal sehingga terlihat kemampuannya.

Mudah sekali bukan untuk menemukan service komputer bekasi ini bisa panggilan atau mendatangi bengkel yang di milliki.

Semoga memberikan pengetahuan bagi anda semua.

Sumber :
https://andra7208computer.com/service-laptop-depok/
Clean Archteture Iniciante
Tags: architecture, ptbr, braziliandevs
Published: 2021-01-05 15:03:20

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/rqp5qmu3augclq1bhax2.png)


Olá devs, sou o Léo e vou falar um pouco sobre os passos para iniciar no entendimento da arquitetura limpa, lembro que são dicas para iniciantes, ok?

Indo direto ao ponto, a primeira dica para quem está iniciando o aprendizado da arquitetura é simplesmente **"NÃO TENHA MEDO"**.
Já me deparei com muitos colegas de profissão dizendo que não entendem ou que não veem vantagem em montar e utilizar uma boa arquitetura para seus softwares. No meu entendimento isso se dá pela falta de clareza de ideias de quão produtivo seu código se torna.

O segundo conselho é para que **"ENTENDA ORIENTAÇÃO A OBJETOS"**. Após passar anos sem compreender corretamente esse paradigma, precisei focar melhor em aprendê-lo para conseguir dar sentido ao meu estudo de arquitetura. Elas estão amplamente ligadas aos modelos arquiteturais encontrados e suas bases são pilares para montagem de qualquer outra arquitetura.

O próximo conselho é para que **"PRATIQUE E ENTENDA O SOLID"**. Isso será útil em qualquer parte da carreira, por melhorar a qualidade do seu trabalho. Ele também é um pilar da arquitetura. Então não deixe de aprender e aplicá-lo. Não precisa ser mestre, basta saber como utilizar.

E por último, **"APRENDA O CONCEITO DO CLEAN ARCHTETURE"**. Dentre os modelos de arquitetura que vemos por aí, esse é um dos mais vantajosos em se estudar. Suas bases estão no livro "Clean Archteture" do Uncle Bob, ele é um dos papas da programação. Não estou defendendo que é a melhor ou única maneira de fazer o certo, muito pelo contrário, é apenas a porta de entrada desse mundo da arquitetura. Porta essa que, pela experiência que tive, me deu de fato a clareza para compreender diversos outros modelos.

Se deseja ser um grande desenvolvedor, procure um caminho sólido e sem atalhos. Encontre o seu ritmo e desenvolva suas qualidades. Cada pessoa leva um tempo distinto até estar preparada para o próximo passo. O importante é manter o foco e praticar, quanto mais prática mais fácil será a absorção do conhecimento.

No mais, bora codar!
Clean up old node_modules in Windows 10
Tags: windows, tips, node
Published: 2021-09-08 21:22:08

---
title: Clean up old node_modules in Windows 10
published: true
date: 2021-01-05 15:00:00 UTC
tags: windows, tips, node
canonical_url: https://katiekodes.com/delete-node-modules-windows-10/
---

Deleting old `node_modules` folders is the new defragging.

My computer was running slowly and I realized it was down to 8GB of disk space. I spent a lot of 2020 playing with Node.js-based [static site generators](https://dev.to/katiekodes/what-is-a-static-site-generator-350o). Each sample web site I created ended up with its own `node_js` subfolder containing lots and lots of code from the internet.

To get rid of it all, in Windows Explorer, I opened up `C:\example\all_my_projects\` and typed `name:node_modules type:(file folder)` into the search box in the upper right corner and pressed Enter.

![Screenshot of Windows Explorer search results](https://katiekodes.com/images/screenshot-find-node-modules.png)

I then selected them all and deleted them all. I can rebuild them by running a command-line command of `npm install` within the folders where they used to live.

Sometimes, I’d get an `Item Not Found` error saying `This is no longer located in C:\example\all_my_projects\project1\ Verify the item's location and try again.`

In that case, I’d click the “Do this for all current items” box and click Skip.

To verify that they were all gone when Windows finally finished deleting them (over 5 minutes!), since the search results window still showed them in place, I hit Alt+(back arrow) and Alt+(forward arrow) a few times, trying to get the search results to refresh. _(They also seemed to eventually refresh live without doing this.)_

Windows indexes files for faster searching, so I belive it took Windows a little while to realize that the folders were gone and should no longer be in the search results.

I now have 9.5GB of disk space. No magic bullet, so I’ll need to look for other deletable things, but every GB counts on a small drive.
Comparison Operators in python
Tags: python, programming, beginners, tutorial
Published: 2021-01-05 14:58:00

So, basically, comparison operators are used to comparing two values that are numbers.

If we level up to be geeky, comparison operators can also be used to compare other data types.

Now, let's start with equality checks and I hope you like spider-man movies.

## `==` Equal comparison operator
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/guzfmp3q00om6stqm5n2.png)
Output:
```
False
True
```

## `!=` Not Equal comparison operator
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/h38d9uugwlg7xkhuin00.png)
Output:
```
True
False
```

Alright, I'm sure that you are aware of how to use other operators to compare two number values, right?
OK, now's the time to level up to be geeky.

For the rest of the operators let us compare the letters from the Alphabet.
Wait, what?!
You heard me right!

Let me explain it at the end of this post.


## `>` Greater than comparison operator
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0u7bnt0362wi8jbzljbb.png)
Output:
```
False
True
False
```

## `<` Less than comparison operator
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/eqeovwuhquvs5haea3t9.png)
Output:
```
True
True
False
```

## `>=` Greater than or equal to comparison operator
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/dgq5vzzy34xfsrkp1ese.png)
Output:
```
False
True
True
```

## `<=` Less than or equal to comparison operator
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/tdfv1egzgn8jh9peawv7.png)
Output:
```
False
True
True
```

Here's the answer for the above craziness.

When we compare two letters (or characters), it gets converted into [ASCII code](https://www.ascii-code.com/). You can check the link where the table contains 'DEC' (Decimal values) for the characters from Alphabet.

Now that the characters are converted into ASCII code, which is nothing but numbers and we are back to square one.
That is, we can compare the values as numbers and return True or false.

### Best Resources

- [Python Blog Series](https://dev.to/aswin2001barath/series/10416) : A Blog series where I will be learning and sharing my knowledge on each of the above topics.

- [Learn Python for Free, Get Hired, and (maybe) Change the World!](https://academy.zerotomastery.io/a/aff_tz1t0tpx/external?affcode=441520_dcwk-s8s) : A detailed roadmap blog by Jayson Lennon (a Senior Software Engineer) with links to free resources.

- **Zero To Mastery Course** - [Complete Python Developer](https://academy.zerotomastery.io/a/aff_9khypm7v/external?affcode=441520_dcwk-s8s) : A comprehensive course by Andrei Neagoie (a Senior Developer) that covers all of the above topics.

**Who Am I?**

I’m Aswin Barath, a Software Engineering Nerd who loves building Web Applications, now sharing my knowledge through [Blogging](https://medium.com/techsoftware) during the busy time of my freelancing work life. Here’s the link to all of my socials categorized by platforms under one place: https://linktr.ee/AswinBarath

**Thank you** so much for reading my blog🙂.
Attracting users toward a project.
Tags: help
Published: 2021-01-05 14:53:42

So, I made some of the projects(one of 'em is cool enough) with the help of a friend cum contributor, but, the question rises here is, how can I get a Community with at least 20-25 users, becuase feedback is what that is important when developing an open-source(or any) project, so, how can I get a good community of users? Because when I see other projects(like VSCode) they are way too popular, so what can be the solution for this?
Day 12 of 100DaysOfCode: Python Program to make Non Perfect Number Perfect
Tags: 100daysofcode, codenewbie, python, beginners
Published: 2021-01-05 14:36:35

This is my 12th day of #100daysodcode. Today I worked more about CSS properties on freecodecamp. Did some assignments. And tried to write python program to make non perfect number perfect. Below is mine code of the day.

# Program to make Non Perfect Number Perfect
In this code at first users give integer type number. After that I define the root if square of root is given number then our given number is already perfect. If there is no this possibility we go further. Initialize before after and curr-number as given. We have no idea how long our loop going so I took while loop.

 I defined croot below. If given number less than current number at that case we take before number is equals to current number. If given number greater than current number at that time our after number is equal to current number. 
```python
n = int(input("enter an integer"))
root = int(n**0.5)

if root**2 == n:
    print(f'your number {n} is already perfect.')
else:
    
    # find the perfect numer before and after the  number.
    before = 0
    after = 1
    curr_num = 1
    
    while True:
        
        croot = int(curr_num**0.5)

        if croot**2 == curr_num:
            if curr_num < n:
                before = curr_num
            else:
                after = curr_num
        #print(curr_num,before,after)

        if after != 1:
            if n-before < after-n:
                print(f'perfect numbers around {n} are {before} and {after}.')
                print(f'your nearest perfect number of {n} is {before}')
                print(f'we have to subtract {n-before} to make {n} perfect number.')
                break
            else:
                print(f'perfect numbers around {n} are {before} and {after}.')
                print(f'your nearest perfect number of {n} is {after}')
                print(f'we have to add {after-n} to make {n} perfect number.')
                break
        curr_num += 1

```
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">12 Day of <a href="https://twitter.com/hashtag/100daysofcode?src=hash&amp;ref_src=twsrc%5Etfw">#100daysofcode</a> and python<br>* More about CSS properties<br>* Tried to write python program to make non perfect number perfect.<a href="https://twitter.com/hashtag/100daysofcode?src=hash&amp;ref_src=twsrc%5Etfw">#100daysofcode</a>, <a href="https://twitter.com/hashtag/codenewbie?src=hash&amp;ref_src=twsrc%5Etfw">#codenewbie</a>, <a href="https://twitter.com/hashtag/beginner?src=hash&amp;ref_src=twsrc%5Etfw">#beginner</a> ,<a href="https://twitter.com/hashtag/Python?src=hash&amp;ref_src=twsrc%5Etfw">#Python</a> <a href="https://t.co/9ButCsWhZ7">pic.twitter.com/9ButCsWhZ7</a></p>&mdash; Durga Pokharel (@mathdurga) <a href="https://twitter.com/mathdurga/status/1346458673678151681?ref_src=twsrc%5Etfw">January 5, 2021</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Fixing `Deprecated: React.Ref.setCurrent`
Tags: reason, rescript, bucklescript
Published: 2021-01-05 13:35:23

---
title: Fixing `Deprecated: React.Ref.setCurrent`
published: true
description: How to fix `Deprecated: React.Ref.setCurrent` error in Bucklescript
tags: reasonml, rescript, bucklescript
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/7ll17fmxwzg57x5k96yp.png

---

I keep finding myself having looking this up so I'm writing this note to myself.

### Bad Code

This code throws a warning:

```
let useIsMounted = () => {
  let ref = React.useRef(false);

  React.useEffect0(() => {
    ref->React.Ref.setCurrent(true);
    Some(() => ref->React.Ref.setCurrent(false));
  });
  ref;
};
```

### Warning

```
Warning 3: deprecated: React.Ref.setCurrent
Please directly assign to ref.current insteadocamllsp
```

### The Fix

In [ReasonML/Reason-React](https://reasonml.github.io/reason-react/)
```
let useIsMounted = () => {
  let ref = React.useRef(false);

  React.useEffect0(() => {
    ref.current = true;
    Some(() => ref.current = false);
  });
  ref;
};
```

In [Rescript](https://rescript-lang.org/)

```
let useIsMounted = () => {
  let ref = React.useRef(false)

  React.useEffect0(() => {
    ref.current = true
    Some(() => ref.current = false)
  })
  ref
}

```

Yes, they are the same except for the commas which the compiler will remove for you anyway.
Day 5 Challenge
Tags: webdev, javascript, challenge, 365daysofcoding
Published: 2021-01-05 14:26:48

Day 5 of 365 days of coding!

Today we are borrowing a challenge from [Codewars](https://www.codewars.com/kata/521c2db8ddc89b9b7a0000c1/javascript)! 

##The Problem
Create a function that accepts and array. Given an n x n array, return the array elements arranged from outermost elements to the middle element, traveling clockwise.

Examples: 
```javascript
        snail( [[1,2,3], [4,5,6],[7,8,9]]) // [1,2,3,6,9,8,7,4,5] 
        snail([[1,2,3], [8,9,4], [7,6,5]]) // [1,2,3,4,5,6,7,8,9]
        snail([[1,2,3,1], [4,5,6,4], [7,8,9,7], [7,8,9,7]]) // [1,2,3,1,4,7,7,9,8,7,7,4,5,6,8,9]
```
The image below may help. You can also go to the [Codewars](https://www.codewars.com/kata/521c2db8ddc89b9b7a0000c1/javascript) page for more information and to test out your solution

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/7exps9pjlvghf834wk57.png)
The < progress > HTML Tag
Tags: html, webdev, programming
Published: 2021-01-05 14:23:27

Welcome to the first article in the  [Uncommon HTML Tags](https://hashnode.com/series/uncommon-html-tags-ckjiqctar042xzgs1bei2e9a3)  series! 
With each article in this series, I will introduce a widely unknown HTML tag, discuss compatibility across browsers and cover some real-world use cases with the element. 

My hope is that each article broadens your understanding of HTML and helps you discover new tags.

### The < progress > Tag

The `<progress></progress>` tag will create a progress bar and allow you to visualize the completion of a task. This could be handy for showing the progress completion of a multi-page feedback survey, for example! 

Let's take a look at how it's used!

```
<label for="progress">Article Progress:</label>

<progress id="progress" max="100" value="50"> 50% </progress>

```

![Screen Shot 2021-01-04 at 9.55.45 AM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1609775753781/mburlbLBM.png)


As seen in the example above, there are two attributes you can use on the element. 

1. `max` - this attribute, if used, is a floating point number and must have a value greater than `0`. 
2. `value` - this optional attribute is used to determine the completion of a task and must be a floating point number between `0` and the number set in the `max` attribute. If the `value` attribute is omitted, the progress bar is set to an indeterminate state. 

Here is an example of an indeterminate progress bar:

```
<label for="progress">Article Progress:</label>

<progress id="progress" max="100"></progress>

```

![Indeterminate Progress Bar](https://media.giphy.com/media/AtInr1byEBtnARfLmT/giphy.gif)


If you want to play around with the tag, feel free to fork the pen below!

{% codepen https://codepen.io/braydoncoyer/pen/mdrLdRZ %}


### Compatibility

The `<progress></progress>` tag is part of the HTML5 Standard and is supported on all major web browsers. No need to worry about compatibility issues! 


![Screen Shot 2021-01-04 at 9.53.29 AM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1609775615556/lW9E7cNN3.png)

### Conclusion

Thanks for reading! Have you ever used the `<progress></progress>` tag in a project? Let me know in the comments below!

If you liked this article and want more content like this, read some of my [other articles](https://blog.braydoncoyer.dev/) , subscribe to my newsletter and make sure to follow me on [Twitter](https://twitter.com/BraydonCoyer)!