teleren/devto huggingface dataset:
The Queue data structure in a nutshell
Tags: computerscience, javascript, tutorial
Published: 2020-11-08 16:54:38

Let's take a look at the Queue data structure and see how it works, what FIFO means, and how you can use it in JavaScript.

{% youtube rQz_q1dOgtU %}

I hope you enjoy this little tutorial about the Queue data structure. Any feedback will be appreciated, just let me know and leave a comment. 🙏
2020'deki en iyi telefon pil ömrü: En uzun ömürlü akıllı telefonlar
Tags: telefonlar, pil
Published: 2020-11-08 16:40:33

# Bir bakışta en iyi telefon pil ömrü

Batarya testimizde, telefonların şarjı bitene kadar LTE veya 5G üzerinden internette sürekli geziniyoruz. Ortalama bir telefon yaklaşık 10 saat sürüyor, ancak burada vurguladığımız telefonlar en az 11 saat dayanıyor. 

## 2020'deki en iyi telefon pil ömrü

**En iyi taşınabilir şarj cihazı** seçimlerimizden birine daha az güvendiğiniz bir dayanıklılık . Moto G Güç selefi, devrilmesi, yeni pil şampiyon Moto G7 Gücü . Bu G Power, 5.000 mAh pil sayesinde pil testimizde 16 saatlik sınırı aşıyor. 5.000 mAh'lık bir güç paketine sahip olan G7 Power, 15,5 saatte sarkık değil. (Aslında, Motorola telefonları en iyi 15 cihazdan altısını oluşturdukları için testimizde çok iyi performans gösterme eğilimindeler ve Motorola Edge Plus en iyi telefon pil ömrü listesini yapmayı kaçırdı.)

### Moto G Gücü 
**[Şarjı en iyi telefonlar listesi](https://eniyiveucuz.com/sarji-en-uzun-giden-telefon/)** ve tacı değiştirdiği telefondan alan Moto G Power. Geçen yılki Moto G7 Power gibi, Motorola'nın ekonomik telefonunun bu yeni sürümü de 5.000 mAh bataryaya sahip. Ve Moto G Power, batarya testimizde 16 saatten fazla dayanarak en iyi şekilde yararlanıyor. Moto G7 Power'ın yaptığından yarım saat daha iyi. Bu telefondan hızlı şarj beklemeyin. Bitmiş bir pili 30 dakika şarj ettikten sonra, Moto G Power'ın pil göstergesi yalnızca% 21'lik bir okuma gösterdi. Sonra tekrar, 5.000 mAh, doldurulması gereken muazzam bir güç paketi ve bu telefonu sık sık şarj etmeniz gerekmeyecek. Moto G Power, G7 Power'ın bir başka çekici özelliğini daha koruyor - 249 $ fiyatı. Karşılığında bütün gün dayanabilecek bir telefon aldığınızda bu bir pazarlıktır.

### Moto G7 Gücü 

En iyi telefon pil ömrüne sahip cihaz olarak zirvede geçen bir yılın ardından Moto G7 Power ikinci sıraya geriledi. Yine de, son iki yılda test ettiğimiz üç telefondan birinin 15 saatten fazla pil ömrü olduğunu ve bunlardan ikisinin Motorola'dan geldiğini düşünürsek, bu oldukça yüksek bir pozisyon. Moto G Power'ın daha yeni özelliklere ve birden fazla kameraya sahip olduğu düşünüldüğünde, eski telefonu 249 $ 'lık orijinal fiyatından önemli bir indirimle bulamazsanız, geçen yılki Moto G7 Power hakkında bu kadar heyecanlanmak zor. T-Mobile , bu yazı itibariyle telefonu 200 dolara düşürdü ve G7 Power'ı Verizon'a ait Visible'da 200 dolardan daha az bir fiyata alabilirsiniz .

### Asus ZenFone 6 

Geçen yılki Asus ZenFone 6'daki kamera tüm dikkatleri üzerine çekiyor - aynı lensler hem ön hem de arka kameralar gibi çift görevli olacak şekilde dönüyor - ama bizim için bu telefonun dayanıklılığı gerçek hikaye. ZenFone, batarya testimizde 15 saatten fazla dayanarak en iyi telefon batarya ömrü listemizi oluşturdu - ZenFone 6'nın içindeki etli 5.000 mAh güç paketi göz önüne alındığında bu bir sürpriz değil. Hızlı şarj ve verimli bir Snapdragon 855 işlemci atın ve bu çok fazla 500 doların altında başlayan bir telefon için güç.
Error and warning of my wordpress theme
Published: 2020-11-08 16:10:03

Hi guys , 
is w3validator a good resource to check the errors of website ?
anyone here can analyze my websize and send me the reports ?
I really need to SEO my website and any help even little can help improve my business .
Thank you
My Website is :  [دانلود آهنگ](https://top1music.ir)
backdrop-filter in CSS
Tags: beginners, discuss, webdev, css
Published: 2020-11-08 16:08:59

### This article is about **backdrop-filter** property in CSS. This will be a short article. 
# Let's start
The CSS **backdrop-filter** property is used to apply effects on the area behind an element. In simple words its effect can be seen on the element in the background of the element where this property is applied.

This let's you apply graphical effects. This is unlike the **filter** property where it applies the effect to the whole element.

While using this the overlaying element must be at least partially transparent so that you can see the effect.(*The pro tip:- don't give that div any color*)
The overlaying element will get a new sticky context.

## Let's break it more to make it even simple, 
Let's suppose there is a div name it div-1, which have an image, now there is another div name it div-2, inside div-1 and which is overlaying the div-1. Now apply the filters on the div-2 using **backdrop-filter** property, so the effect of filters will be on the div-1.

```HTML
<div id="container">
  <div id="div-1">
    <div id="div-2"></div>
      <img src="https://images.pexels.com/photos/1295959/pexels-photo-1295959.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940">
    </div>
</div>
```

```CSS
#div-1 {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
#div-2 {
  width: 60vw;
  height: 40vh;
  position: absolute;
  backdrop-filter: blur(15px); 
}
```
In this example I have applied **blur()** filter. It's effect you can see clearly in the pen below.
{% codepen https://codepen.io/ritvikbunny/pen/bGeQeqe %}

There are number of filters which you can apply using **backdrop-filter** property. They are as follows:-
* backdrop-filter: none;
* backdrop-filter: blur();
* backdrop-filter: brightness();
* backdrop-filter: contrast();
* backdrop-filter: drop-shadow();
* backdrop-filter: grayscale();
* backdrop-filter: hue-rotate();
* backdrop-filter: invert();
* backdrop-filter: opacity();
* backdrop-filter: sepia();
* backdrop-filter: saturate();

#### To read more about filters [Click here](https://developer.mozilla.org/en-US/docs/Web/CSS/filter)
## In the example below I have applied some of these filters
{% codepen https://codepen.io/ritvikbunny/pen/YzWJPVQ %}

## **NOTE:-** 
*This doesn't works on* ***Firefox*** *or* ***Internet Explorer***.


***Cover:- [Rajat Gour](https://twitter.com/rajatgour20)***

#### *Thank you for reading.*
#### *Please feel free to share your views about it.*
#### *I hope you liked it and found it helpful.*
#### *Connect with me on [Twitter](https://twitter.com/ritvikdubey27?s=09) or [LinkedIn](https://www.linkedin.com/in/ritvik-dubey-3bbb22169)*
#### *My personal blog [blog.ritvikdubey.com](https://blog.ritvikdubey.com/)*
End to End test automation for web apps
Tags: react, testing, javascript, codequality
Published: 2020-11-08 15:58:27

Manual testing is by far one of the most painful things in the software development lifecycle, as your products evolve and more functionality is added codebases tend to grow, if your product is being successful the team may grow as well and with it the risk of introducing a regression is even higher.


## What makes a test framework good?
In a few words, it must be simple for:
- Setting up tests
- Writing tests
- Running tests
- Debugging

## Strategies for testing

There are many strategies for test automation out there, the main ones usually being:

#### 1. Stub Requests
Pros
- Fast / Easy / Flexible
- No Server / DB

Cons
- Not True E2E
- Require Fixtures

#### 2. Static User
Pros
- Real Session E2E

Cons
- Requires Server
- Seed the DB
- Shares Test State

#### 3. Dynamic User
Pros
- No State mutation
- Flexible / Powerful

Cons
- DB Setup / Teardown
- Slow / Complex

## The Cypress solution for it

In 2019 I gave a talk for the React Berlin community in which under 25 minutes we discussed common problems, solutions and how Cypress can allow you implementing test automation for web apps in a fast, easy and maintainable way.

[![End to End automation testing with Cypress – Vitor Reis](https://dev-to-uploads.s3.amazonaws.com/i/d93jxzscdz92374sse47.png)](https://www.youtube.com/watch?v=vSFTpcxmAYQ)
Video: [Test automation with cypress, React Berlin November, 2019]((https://www.youtube.com/watch?v=vSFTpcxmAYQ))

## References
- Cypress - [Test a React Todo App](https://docs.cypress.io/examples/examples/tutorials.html#Test-a-React-Todo-App)
- Brian Mann – [I see your point, but…  - AssertJS 2018](https://www.youtube.com/watch?v=5XQOK0v_YRE)
Coding Music & Radios List
Tags: coding, music, collection, links
Published: 2020-11-08 15:53:56

Since I like listening to music, sometimes, I find radios or streams of music, that claims it's "for development". I like listening to those, too, so I keep a collecion.

[FreeCodeCamp Radio](https://www.youtube.com/watch?v=vAKtNV8KcWg) — an endless Youtube stream of "jazzy beats" for coding.

[CodingRadio](https://codingradio.xyz) — Playlists for coding, named like "Focus on Deadline", "Debugging Battles", etc.

[musicForProgramming](https://musicforprogramming.net) — One to two hour long sets of tracks for programming. List is being updated. Cool design.

[Anjunadeep](https://soundcloud.com/anjunadeep) — cool electronic music. Not specifically named to be "programming radio", but sounds really good. This blog is partially done while listening to this.

[Zavtratunes](https://zavtracast.ru/tunes) — sets of cool electronic music. This one also does not name itself "music for programming", but I think it fits.

[Brain.fm](https://brain.fm) — Paid music service: "We use our patented AI music engine and scientific research to create music to help you improve the activities you already do in 15 minutes or less."

[Listen to the Cloud](http://listentothe.cloud) — Ambient music mixed with flight radio.

[Poolside FM](https://poolside.fm) — Poolside FM was conceived one awfully rainy summer in the Highlands of Scotland - a virtual vacation, if you will. The audio and video streams are curated to inject a healthy dose of serotonin into your brain.

[Endel](https://play.endel.io) — Endel is a technology that creates personalized soundscapes to reduce stress, increase focus, and improve sleep. It is supported by neuroscience. Completely aligned with the circadian rhythm, the sounds are generated in real-time basing on various inputs such as your location, time zone, weather, and heart rate.

[Coding / Hacking / Felling like a 80's sci-fi superhero](https://open.spotify.com/user/dewanderer/playlist/601WLbJ3Vj91XIugGUJNUe?si=nGWvm759SGCIVir6vY5Kug) — Spotify playlist with retro-wave / lo-fi sounds collection. If you like Kavinsky — Nightcall, you will like this, too!

**PR Request**: Want to add your link or to turn this page into a working radio? [Feel free to send a PR](https://github.com/Rulikkk/Rulikkk.github.io/blob/master/content/2018-12-17%20Coding%20Music%20Radios%20List/index.md).

<i>Cover Photo by <a href="https://unsplash.com/@lazycreekimages?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Michael Dziedzic</a> on <a href="https://unsplash.com/s/photos/coding-music?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></i>

_List in progress: I am adding items from time to time._
Secure JSON Web Token with Unique Browser IDs
Tags: javascript, react, jwt, authentication
Published: 2020-11-08 15:48:41

JSON web token (JWT) are a really good opportunity to create secure login workflows without storing tons of access tokens in your database. But as good as it might sound in the first moment they have a huge problem. After giving them to a user, you can't really control, if someone will copy them to another machine.

This makes it easy for everyone to just copy a JSON web token out of the Local Storage and place it somewhere else.

One of the first ideas you may have, if you want to solve this problem is to bind them to the clients ip so nobody from outside can use the token, but since we are speaking of IP scarcity and things like DS-Lite, this isn't a really good solution.
# The Idea
The only really good solution for this would be to give each browser a unique ID, which only can be manipulated hardly like the MAC address.

Sadly nowadays browsers doesn't provide built in endpoint for this, so we have to built something around the existing APIs.

When you search around the internet for a while you will  soon find some projects like [AmIUnique](https://amiunique.org/), which are using parameters like your computers User Agent or the way of rendering text to distinguish between devices and browsers. When you use some of these indetifiers you can create a unique id for any device and browser as long as there aren't any updates to your system. But because in our case JWTs only need to be valid for some hours or days this should work fine.

# Unique ID in React App
To show you how to implement this into your apps I will create a sample react app and use the [uniquebrowserid](https://www.npmjs.com/package/uniquebrowserid) package for creating the unique IDs.

After you [initialize your app](https://create-react-app.dev/), you can install the package with `npm install uniquebrowserid`, open the `App.js` file and add the following code:
{% gist https://gist.github.com/alexanderschau/4cdbedc9f9283061e2f36f28a1d239d9 file=App.js %}
After saving the file and running `npm run start` you should see your unique browser ID in the app.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/sxzbtf3de3n0fcse77iq.png)
To bind this into your JSON Web Tokens, you just need to send the result of the `new UID().completeID()` function to your backend.

If you want to learn more about the implementation of unique browser IDs into your app, you can visit the packages website at: [https://www.npmjs.com/package/uniquebrowserid](https://www.npmjs.com/package/uniquebrowserid). There you also find, how to create one time unique IDs.
Hot Reload Typescript with ts-node-dev
Tags: typescript, livereload
Published: 2020-11-08 14:58:56

---
title: Hot Reload Typescript with ts-node-dev
published: true
description: This way solved my issue on learning Typscript
tags: typescript, livereload
//cover_image: https://direct_url_to_image.jpg
---

Hi, folks!

To learn essenstial Typescript i should see the result of my code. And, cause i don't want to running command repeatdly, i use this single tool [ts-node-dev](https://github.com/whitecolor/ts-node-dev) by [Alex](https://github.com/whitecolor).

This tool is faster ⚡⚡ than any other, like `nodemon`.

First, install your `ts-node-dev`

`sudo npm i ts-node-dev -g`

`-g` or `--global` flag for install it globally, if you're going to want it you should add `sudo` command for user invoke access root.

You have got it 😤

In your `package.json` on section below `"script":` add hot reload command, like this:

```json
"scripts": {
    ...
    "dev": "ts-node-dev --respawn src/index.ts"
}
```

On the `dev` section you just set your main file `scr/index.ts` and `--respawn` flag itself for restarts the node target.

And, look at my result of `ts-node-dev` 😎😎

[![https://imgur.com/ytYpBYu.png](https://imgur.com/ytYpBYu.png)](https://imgur.com/ytYpBYu.png)

Oh, I forgot. This solution from here

[https://stackoverflow.com/questions/37979489/how-to-watch-and-reload-ts-node-when-typescript-files-change](https://stackoverflow.com/questions/37979489/how-to-watch-and-reload-ts-node-when-typescript-files-change)
Being in the flow and knowing when to stop
Published: 2020-11-08 15:32:08

---
title: Being in the flow and knowing when to stop
published: true
description: 
tags: 
---

The perfect mental state to be in, being in "the flow", you're writing code, and it's flowing out.

I've been working on a project that has me very motivated, hence I've had days and hours of being in the flow, there's one caveat that I started noticing, and that is that I don't know where to stop.

If you're coding from point A to B, it's all going fine, and suddenly you're at point D, but it wasn't planned for, **I feel like it has become a dangerous trap, the only things stopping me is a difficult feature, or getting stuck in a hurried state**, both of which leave me with an unsatisfied feeling, while at the same time I did more then I could have imagined.

Have you been in a situation like that? Glad to hear your stories!
Change Default Browser when Starting React Project
Tags: react, browser
Published: 2020-11-08 15:24:57

Starting project of React as soon as opening `localhost:3000` on the default browser.

You may wonder "How to change default browser when start react project?"

Don't worry, `.env` on it.

Just create `.env` file on your react project. And add 

```
BROWSER=chromium
```

Choose freely of your browser for dev.
Como fazer uma mascara (filtro) em um campo com VueJs
Tags: vue, javascript
Published: 2020-11-08 15:12:14

Recentemente passei por um problema aonde eu tinha que fazer uma mascara em um campo para melhorar a exibição de um salário, porque R$: 10,00 é muito melhor do que apenas RS: 10.
Pesquisei uma lib, mas tive alguns problemas ao utiliza-lá, então pesquisando um pouco mais descobri um modo de fazer um filtro puro com JavaScript!

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

Aqui temos uma estrutura VueJs, com a variável CPF declarada, e exibida na tela...

primeiro de tudo dentro de script vamos criar um method próprio do VueJs chamado filters, e criar uma função, como no meu exemplo estou usando um CPF, vou criar a função maskCpf(valor). Nesta função vou criar um arr recebendo todas casas da minha variável, aonde cada valor ocupará uma posição no meu array => 
 MaskCpf(valor){ const arr = valor.split("")}

Agora meu array está assim =>
 'arr = [ '1','0','0','2','0','0','3','0','0','4','0' ]'

Em seguida eu vou fazer =>
 arr.splice(3,0,'.') para ele contar 3 posições do array, e inserir um ' . ', sendo assim vai ficar =>
' arr = [ '1', '0', '0', '.', '2', '0', '0', '3', '0', '0', '4', '0' ]'

OBS:NOTA QUE AGORA MEU ARRAY TEM UMA POSIÇÃO A MAIS ENTÃO NAS OUTRAS CONTAS PARA INSERIR OS PROXIMOS ".", VOU PRECISAR ACRESCENTAR 1 CASA A MAIS

Agora faço =>
 'arr.splice(7,0, '.') '
para acrescentar o segundo ponto então meu array ficaria assim=>
 '[ '1', '0', '0', '.', '2', '0', '0', '.', '3', '0', '0', '4', '0' ]'

E por ultimo
 arr.splice(11, 0, '-')
para acrescentar o "-" para terminamos a nossa mascara para o CPF meu array ficaria assim =>
'[ '1', '0', '0', '.', '2', '0', '0', '.', '3', '0', '0', '-', '4', '0' ]'

Agora com a mascara criada, temos que retornar isso tudo em uma única variável então para isso vamos utilizar o .join =>
' return arr.join("")'


Bom Até aqui nossa mascara está criada porém não está sendo exibida ainda, como visto no nosso código no nosso <h1></h1> temos interpolada a variável cpf, nosso código está assim até o momento {% raw %} <h1>"{{ cpf }}</h1> {% endraw %}para nossa mascara surtir efeito temos que invocar nossa função. para isso utilizaremos o pipe " | ". Então nosso ficará assim nosso código
{% raw %} <h1>{{ cpf | maskCpf }}</h1>{% endraw %}. Com o pipe e em sequencia nossa função, o vue já entende que o valor da função é o cpf,
pois na nossa função declaramos que ele receberia um parametro.

E bom, feito isso tudo você deve ter o seguinte resultado

100.200.300-40

nosso código ficou assim !
					
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4asd57monpl1c3qbp68a.png)
My first Experience With Hacktober
Tags: hacktoberfest
Published: 2020-11-08 15:09:50

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title, structure, and words! ✨ -->


Yeah This is Piyush Here from B college In India.I am entirely new to Git and Github regarding the pull requests.
i practise at Codechef Platform with 4star in it and i am practising to have a grip over the topics.my friend suggested me to participate in Hacktober fest and get some exciting goodies with it .so i started off and mostly i did question on DSA and i was really happy doing all of it .Learnt a lot through this platform.
i am at a stage where i can contribute more to open source and will try to continue the same not just in october but as much as i can.
I did projects of android and julia because i have been learning that since a few weeks.
i did contribute to DSA thats what i am good it.
i will participate for the upcoming few years for sure and would love to contribute more and more to open source
Use My Notes 
Tags: programming, java, security
Published: 2020-11-08 14:53:03

<a href="https://usemynotes.com/">Use My Notes</a> is an Education Website for providing all technical course material. Use My Notes is free of cost-based website no charges it's fully freely.


You can read any subject relative to the Polytechnic, B.tech, M.tech, IIT, ITI, etc syllabus in this and then you can also see and read old question papers, according to the notes, and old question papers are available according to the syllabus of the whole branch in this Use My Notes website, you can read it easily. Every person who has any smartphone, iPhone, laptop can use this website and run it on any of your browsers. This website is available only English languages.
What file structure makes the most sense to you?
Tags: discuss, react, programming
Published: 2020-11-08 14:38:43

File structuring seems to be one of those overly debated topics, to the point where even the React documentation advises [not to stress out over it](https://reactjs.org/docs/faq-structure.html#dont-overthink-it).

That being said, for any project it does help a mighty amount to have a file structure that makes it easier for you to navigate.

I primarily use React, so I'll share a peak into the source of my React projects with some example files. For the components folder, organizing it according to [Brad Frost's Atomic Design](https://bradfrost.com/blog/post/atomic-web-design/) enables me to think like an architect as I build out UIs.

```
src/
  components/
    atoms/
      Label/
        tests/
          Label.test.tsx
        Label.tsx
        Label.scss
        Label.stories.tsx
    molecules/
      TextInput/
        tests/
          TextInput.test.tsx
        TextInput.tsx
        TextInput.scss
        TextInput.stories.tsx
    organisms/
      Form/
        tests/
          Form.test.tsx
        Form.tsx
        Form.scss
    pages/
      ContactUs/
        ContactUs.tsx
    templates/
      SignedIn/
        SignedIn.tsx
      SignedOut/
        SignedOut.tsx
  images/
    logo.svg
  redux/
    actions/
    reducers/
      store.js
  styles/
    main.scss
    variables.scss
  App.tsx
  App.scss
  index.tsx
```

### What ways of file structuring help (or hinder) you the most?
Touch Typing
Tags: productivity, programming, computerscience
Published: 2020-11-08 14:34:58

It is a fun experience 🎯 when I started out *touch typing*. It only took me _7.5 months of practice_ to increase my speed from *20wpm to 75-90 wpm*💪.

While coding you may feel slow, and you want to increase your speed. What to do about it? Simple! Type more and more 🏋🏻‍♀️.

There are a ton of websites that provide daily practice sessions.
My personal favorite is *[keybr](https://www.keybr.com/)* and *[Typing Bolt](https://www.typingbolt.com/)*. 🏆 I practiced about _15 minutes_ each day and it increased my overall productivity, work, and especially googling 😎.

If you are just starting out touch typing, do it now!💯, Also I only write a few words here and there, nobody likes to read two pages of the paragraph about touch typing. So yeah!😄