teleren/devto huggingface dataset:
100 Bytes Of Wisdom: Day 33
Tags: career, journey, advice
Published: 2021-03-24 22:17:31

---
title: 100 Bytes Of Wisdom: Day 33
published: true
description: Bytes of Wisdom is a new project by Sam Jarman that brings together snippets of advice for software engineers
tags: career, journey, advice
//cover_image: https://direct_url_to_image.jpg
---

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

The thing with finding mentors is you probably shouldn't ask someone formally to be your mentor. From my experience on the other side, it actually sounds really taxing. It sounds like work and it sounds like commitment - something a lot of busy people don't feel like they have time for. But a one-off email or coffee every now and then isn't taxing, if anything it is quite pleasurable. So reach out to them now, on social media, over email, LinkedIn, whatever… just keep it casual and say something like “Hey there X, I was wondering if we could grab a coffee this week or next. I see you've been doing Y and I'm keen to chat about your experience doing it - as I think I'm in a similar situation now.” Short, to the point and a clear ask. It’s important people know what you want from them and why it can't be anyone else.

Heads up: As with any terse bit of advice, there will be exceptions of course, and subtleties and nuance that can't possibly be captured in a Byte of Wisdom. This has been what I've experienced, I'd love to hear yours in the comments too!

You can catch up with all the other bytes at http://bytesofwisdom.com/
لعبة المارد الازرق
Tags: akinator
Published: 2021-03-25 04:54:25

ما ذلت الي الان في حيرة من امري بسبب لعبة المارد الازرق الذي يعرف الاسرار لقد سبق وقمت تحميل اللعبة عبر الرابط التالي https://loloapps.co/akinator/ وبالفعل قمت بتجربتها ولكن الحيرة تقلقني حول كيف يعمل هذا المارد السحري في فهم تفكيري 

هل جرب احدكم هذه اللعبة لكي يخبرني ماذا شعر او ماذا كان رد فعله اتجاه تلك اللعبة
Day 11 of 100 days of swift ui
Published: 2021-03-25 04:52:46

I just finished day 11 of hacking with swift ui. Today I learnt about Protocols and extension methods in Swift. 

Protocols in Swift are a way of defining properties and methods a class or struct should have. The are created with the keyword `protocol`

Extension methods are a pretty cool feature in Swift that allows us to add methods to existing structs or class without modifying the struct or class
```
extension Int {
    func squared() -> Int {
        return self * self
    }
}
let number = 8
number.squared()
```

The code above creates an extension method that squares an `Int`
Python MicroNotes in Notion
Published: 2021-03-25 04:30:19

Get **Python MicroNotes in Notion**.
Here ->
https://gumroad.com/l/pythonnotion

They are concise and contain lots of examples for different concepts in Python.
Learn new and different methods you've never heard of with crystal-clear examples and explanations.
Examples are clearly shown by using Code Blocks feature in Notion which let's you copy them in ONE CLICK.
Grab these notes, duplicate them into your Notion Database and read them at your leisurely time. You can learn Python thumbing through Notion while eating or commuting! This product is truly one of its kind.
Entire content is precisely divided into 19 sections. The table of contents are
1. Introduction
2. Data Types, List and Tuples
3. Functions
4. Conditionals
5. Dictionaries
6. Loops
7. 2D Lists
8. Error Handling
9. Reading Files
10. Modules and PIP
11. Classes and Objects
12. Debugging
13. Important Libraries / Modules.
14. Some Advanced Stuff
15. Regular Expressions
16. Files and Folders
17. Web-Scraping
18. Beautiful Soup Web Scraping
19. CSV Files.

As a bonus, these notes also contain embedded resources, YouTube videos and tweets which are the best maintained resources for learning python for FREE.
This product is a steal. For such a low price, you are getting a well-curated resource for learning Python.
Checkout Product page for more details!
My Personal Tips to Become an Automation Tester in 2021
Published: 2021-03-25 04:30:11

Let’s discuss the Roles and Responsibilities of Automation Test Engineers.

{% youtube c4lqiddVpAA %}

🔥 Who is Automation Tester?
Automation Test Engineers are none other than developers who work on the designing, programming, simulation, and testing of new or existing software. Automation Testing.

❤️ Download Notes : https://sdet.live/notes
❤️ Become Better QA : https://sdet.live/30days

Skills Required for an Automation Test Engineer
What is expected from you?
Automation should be:
👉 Focused
👉 Informative
👉Adding value
👉Trustworthy
👉Repeatable
Automating the Scenario from Backlog
Maintaining Test cases (Failed) / Flaky Test
Estimating of the Automation Test cases
Attend the Scrum and Update team
Gather Requirements from scenarios
Clarity To Automate, or Not to Automate?
👉 https://sdet.live/3MR-
Don't Reject Something
Tags: php, programming, showdev, discuss
Published: 2021-03-25 04:07:38

Hi there,

In line with the title (I don't want to say it again). I warn you again not to waste a minute of your time reading this article, because it is useless.

## Sanitize database inputs

When inserting data in your database, you have to be really careful about SQL injections and other attempts to insert malicious data into the db. The function below is probably the most complete and efficient way to sanitize a string before using it with your database.

```php
<?php

function cleanInput($input) {

  $search = array(
    '@<script[^>]*?>.*?</script>@si',   // Strip out javascript
    '@<[\/\!]*?[^<>]*?>@si',            // Strip out HTML tags
    '@<style[^>]*?>.*?</style>@siU',    // Strip style tags properly
    '@<![\s\S]*?--[ \t\n\r]*>@'         // Strip multi-line comments
  );

    $output = preg_replace($search, '', $input);
    return $output;
}

function sanitize($input) {
    if (is_array($input)) {
        foreach($input as $var=>$val) {
            $output[$var] = sanitize($val);
        }
    }
    else {
        if (get_magic_quotes_gpc()) {
            $input = stripslashes($input);
        }
        $input  = cleanInput($input);
        $output = mysql_real_escape_string($input);
    }
    return $output;
}
?>
```

Here’s some examples of use:

```php
<?php
  $bad_string = "Hi! <script src='http://www.evilsite.com/bad_script.js'></script> It's a good day!";
  $good_string = sanitize($bad_string);
  // $good_string returns "Hi! It\'s a good day!"

  // Also use for getting POST/GET variables
  $_POST = sanitize($_POST);
  $_GET  = sanitize($_GET);
?>
```

In my opinion, this is a very tedious and addictive step in the code for the application you are currently developing. There are too many functions and techniques that make your job as a php developer difficult.

So, it's better not to write a line of the above code in the code you are working on. Even when there is an injection into your database or your client's, it will add a surprising new variation and get your adrenaline pumping as a programmer to get anger from clients or warning letters from project managers.

Thank you for reading this useless article, because what I say is true and may or may not be true. There is absolutely no benefit.

Source Code From:
https://css-tricks.com/snippets/php/sanitize-database-inputs/
How to Rank Higher on Google A complete Guide (2021)
Tags: seo
Published: 2021-03-25 03:56:41

You did all the necessary things to your website but still not able to Rank your website on top in the google search result, don’t worry here are some tactics to do that. For Rank your website Top in google you need a process- a strategic one, consisting of multiple tactics and techniques that can work. For ranking a website on google many elements are paying their roles like SEO, Keyword panning, link building, and also many more. use suggested tactics and rank your website top in Google. let’s start 

Step #1: Do Keyword Research For Site SEO
Banner
Keyword Research is identified as the practice of identifying the phrases that are mostly used by individuals for meeting their information needs based on the posting of queries on the search engines.

Keyword research played a significant role in the SEO technique it is basically used for putting the right keywords in articles or blogs. It encompasses the findings associated with the search volume and the competitiveness of the different terms. Keyword research will help to rank your website top in Google.

<a href= "https://www.clubinfonline.com/2020/04/10/rank-website-on-top-in-google/"> Click here </a> to read the complete Article:)
PHP Pocket Book
Tags: php, programming, discuss, showdev
Published: 2021-03-25 03:48:20

Hi there,

This article will be an article that is less interesting for you, because in this series of articles that will be written every time I have free time, this article will contain stupid snippets that are not at all interesting.

So don't waste a lot of your time reading this article. The title of this series can be deceptive. But I can't guarantee its correctness. Therefore don't follow and don't waste 1 or 3 minutes reading this article series.

I am Imam Ali Mustofa, a stupid writer from Indonesia who is proud of himself, even though I don't want to be called selfish and attention seeking. But I want to be called narcissistic, that's all.

Thank you for wasting reading this article to the end, which means you've wasted time.
React routing in production
Tags: react, help, reactrouting
Published: 2021-03-25 02:52:45

I am new to React and I've been developing a simple react web app. Now when I have shipped my code to the server I have issues with React Routing, in my case loading different components for different url path returns 404.

To remedy this I have adjusted the server apache conf file to redirect any ErrorDocument 404 to index.html. This is a temporary fix and I would really like to understand and solve this issue moving forward.

I tried to install node on my server (Digital Ocean droplet) but in order to do so I need more resources to allocate which I don't want to do if I don't have to.

Can somebody explain to me what can I do here to resolve the issue I am having.

This project is simple but I want to continue using React and expand to a bigger projects and web app.

Here part of the code that does Routing

```javascript
import React from 'react';
import Header from './components/Header/Header';
import About from './components/Pages/About/About';
import Home from './components/Pages/Home/Home';
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';

// import Bootstrap from 'react-bootstrap';
import './bootstrap.min.css';
// Default overwrite 
import './app.scss';
// Roboto Font


export default function App() {
  return (
    <>
    <Header />
      <Router>
        <Switch> 
          <Route path="/" exact component={Home}/>
          <Route path="/about" component={About}/>
          <Route path="/#contact" />
        </Switch>
      </Router>
    </>
  )
}
```

Here my component About is returning 404.


Any help appreciated.
My Flatiron Mod 1 Project
Tags: flatironschool
Published: 2021-03-25 02:47:28

For my solo Mod 1 Project at Flatiron School, I needed build a CLI app to give a user full CRUD ability, allowing a user to do at least one of each of the CRUD actions. We needed to have a minimum of 3 models, including one join model. 

I decided to create a Ski Ticketer app and have my models be User, Ticket, and SkiResort. 

My app allows a user to do the following CRUD actions. 

Create- Purchase a ski ticket to a ski resort.
Read- View a list of top ski resorts in the world (ski resort names created via Faker).
Update- Edit their name as a user. 
Delete- Cancel a ski ticket they've purchased.

Here are a few things I learned from this project: 

-Drawing out what the user would see when physically navigating your app can be very helpful for creating the structure of it. 

-It's helpful to think of the next step every time you are working on a new method in a CLI app. For example, every time you ask a user a question you have to put a gets.chomp in which will collect the user's input and then you have to do some procedure or routine with that input that represents the feature the user wants. In a CLI app, you have to ask for user input a lot. 

-I got better at deleting the db & schema and then remigrating & reseeding when the database got corrupted, as this was something I had to do quite frequently. After doing this, everything will be good and then you'll have data you can test again. 

-The SQL logger is a helpful thing to turn on because it shows you what SQL is being run as you write Active Record queries. 

-I also learned how to allow a user to exit from the CLI program. This was as simple as setting an elsif statement in a given menu method for the case that the user's selection is a specific number, and then below the if statement you simply type `exit!` 

To install and run this program: 

-Fork and clone the repository at this link: https://github.com/kkirby16/mod-1-project

-Open up the terminal in this program and run bundle install in it.

-Next, run rake db:migrate and rake db:seed to create and populate the database.

-Then, run ruby bin/run.rb in the terminal to begin the program.
TIL Ink Variable Text
Tags: todayilearned, gamedev, ink, variation
Published: 2021-03-24 22:05:46

2021-03-24

Further exploring Ink and Fungus, I discovered they both support dynamic text via Variable Text and Text Variation systems, respectively.

The syntax is nearly identical.
In Ink
```
I entered a phase of {denial|anger|bargaining|depression|acceptance}.
```
In Fungus
```
I entered a phase of [denial|anger|bargaining|depression|acceptance].
```
What happens here is all possible variations are captured between braces/brackets and separated by the pipe characters into elements. When the text is revisited, we move to the next element until we reach the final one which is always displayed. This is the default behavior for both.
Alternate behaviors are supported.
* Cycles (prefixed by &) allow looping of the elements as ordered
* Once-only (prefixed by !) where elements are displayed once and the final element is empty i.e. blank
* Shuffles (prefixed by ~) randomly picks an element

Demonstration in Ink
```
Today is {&Sun|Mon|Tue|Wed|Thu|Fri|Sat}.
I checked the calendar. {!It's payday!|It's the day after payday.}
The sky is {~bright|cloudy}.
```
From the above, a week of random weather can be simulated and payday only happens once ever. What a sad tale!
[pt-BR] {Re-começar && Re-adaptar}
Tags: programming, abap, javascript, python
Published: 2021-03-25 02:37:19

Eae *Dev's*, tudo beleza?!

Quero compartilhar com vocês um pouco sobre mudança de tecnologia, uma coisa muito comum na vida de qualquer **Dev**.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qiks6esu79w6hgp6ayq1.jpg)

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

Por exemplo, eu passei um tempo trabalhando com **ABAP**, uma linguagem de programação destinada a comunidade *SAP*, um pouco parecida com **Cobol**.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3r7505ub4041jokqo8kw.jpg)

Porém a minha primeira linguagem, foi o **Python**, mesmo tendo pouco tempo de programação, eu como desenvolvedor me vi *obrigado* a desenrolar e estudar a sintaxe das novas tecnologias para poder me inserir no mercado e começar um trabalho para pôr em prática conhecimentos teóricos vistos na academia e online.

Passei por algumas empresas e enfrentei diversos desafios, o que me fez construir minha carreira até agora, e também me deu uma certa experiência e maturidade em algumas situações técnicas.

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

Isso foi mudando, e hoje minha linguagem principal é o **Javascript**. Muito embora eu tenha mudado de tecnologia, minha experiência em resolver problemas de negócios ou até mesmo de raciocínio lógico está sendo reaproveitada e *readaptada*, o que faz com que a linguagem que eu escolhi seja apenas o que **realmente deveria ser**, uma **ferramenta** de trabalho.

### Mas como e por que essa escolha???

Já que poderia ter acesso a qualquer outra tecnologia e/ou linguagem, pensei que, nas últimas experiências passei por vários projetos de diferentes tamanhos, então queria que tivesse algum novo desafio, alguma coisa que me fizesse sair da zona de conforto, mas não apenas isso, eu queria ter acesso a projetos ainda maiores, foi aí então que veio a ideia do *JavaScript*.

Pelo fato de hoje em dia estar em constante evolução, principalmente pela quantidade de material e diversidade de bibliotecas e frameworks. E o mais divertido é o fato de sair da teoria e pôr tudo em prática.

### Conclusão

Hoje me encontro no processo de familiarização da nova tecnologia, tendo novas inspirações, novas maneiras de pensar e novas ferramentas, ainda existe muito o que aprender e se atualizar, principalmente quanto aos métodos e funções disponíveis, a comunidade é bem engajada. E principalmente, tendo novos colegas para trocar conhecimento a respeito disso.
Binancio - Binance P2P Bot
Tags: node, showdev, productivity
Published: 2021-03-25 02:37:08

---
title: Binancio - Binance P2P Bot
published: true
description: Making of a bot that calculates median price of any crypto-asset in fiat currency on Binance's p2p exchange, without leaving your console.
Topics: #node #bot #showdev #productivity #node #bot #binance #crypto
Resources:

tags: #node #showdev #productivity
cover_image: https://i.imgur.com/wRLKZ7n.png
---

> Making of a bot that calculates median price of any crypto-asset in fiat currency on Binance's p2p exchange, without leaving your console.
![Binancio Terminal](https://i.imgur.com/jlkb0KS.gif)

----

## ◼️ Challenge
Calculate the median price of any cryptocurrency in the Binance p2p market, and make it open source off course.

#### ⚫️ Primary Objetives
- Provide the minimum, median and maximum prices
- It cannot be intrusive or distracting
- Quick and easy to use and to discard

---------

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4f46wpfebtangl935une.png)
[Binance P2P Market](https://p2p.binance.com/en)

---------

## ◼️ Solution
A very simple command line interface, focused on a simple and intuitive UX, providing a quick response on assets price.

## :zap: Usage

##### Interactive mode

```sh
npx binancio
```

##### Using custom options

```sh
npx binancio --ticker ETH --fiat USD --operation BUY
```

##### Overall options

```sh
npx binancio --help
```

```sh
Options
  -t, --ticker      <type> Crypto ticker (choices: "USDT", "BTC", "BNB", "BUSD", "ETH", "DAI")
  -f, --fiat        <type> Fiat currency (choices: "ARS", "EUR", "USD", "AED", "AUD", "BDT", ...)
  -o, --operation   <type> Operation type (choices: "BUY", "SELL")
  -p, --pay-types   <type> Payment method (choices: "*", "AirTM", "Bank Transfer" ...) [Depends on localization]
  -h, --help display help for command
```

## :cloud: Installation

```sh
# Using npm
npm install -g binancio

# Using yarn
yarn global add binancio
```

#### ⚫️ Dependencies
- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
- [inquirer](https://github.com/SBoudrias/Inquirer.js) - Common interactive command line user interfaces

#### ⚫️ Repository
[https://github.com/sanchezmarcos/binancio](https://github.com/sanchezmarcos/binancio)

---------

![Alt Text](https://i.imgur.com/EvaP4Ye.png)

Any feedback on the article and code is welcome.
🖤 Thank you very much for your time and attention!

[Follow me on Twitter](https://twitter.com/sanchezmarcosme)



In case you want to support Binancio development 🤖💛

Gumroad link:
https://sanchezmarcosme.gumroad.com/l/binancio

Bitcoin, Crypto, Ethereum.
Desmitificando o React: Componentes, propriedades e estados. Seria essa a mágica?
Tags: javascript, react, typescript, webdev
Published: 2021-03-25 02:19:56

Fala, devs! Já bebeu seu café hoje? Então pega o seu "cup of coffee" e vem desmitificar o ReactJs. 🤓 ☕


Não é de hoje que muito se fala do ReactJs e sua onda crescente de utilização em diversas aplicações no mundo todo. Mas o que é React? De onde veio e por que? É só mais uma onda do momento? Eis questão!

O ReactJs é uma biblioteca - não um framework- Javascript que foi idealizada lá em 2013 pelo Facebook. Isso mesmo, o poderoso Facebook. Segundo o Google Trends, o React vem liderando em interesse de devs na comunidade nos últimos anos estando a frente de frameworks como o AngularJs e VueJs.

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


Seu objetivo é a criação de interfaces de usuário de forma eficiente por meio de seus próprios componentes, reutilizáveis componentes que apresentam dados que mudam com o tempo. E é aqui que a mágica começa. 🌝 

Componentes são formas de organizar determinada aplicação, que ao se dividir em pequenas camadas podem se conectar e torna-se algo maior, ou seja, um App ou qualquer outra coisa que você queira. No React, componentes são como as tags no html sendo formas de encapsular certa quantidade de código em um único elemento, dando a esse elemento o poder de ter sua própria estrutura e estilização.

Na prática: uma função que devolve um html "mágico" (JSX).

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ev2k7sjolyah6zqfggz.png)

Já as propriedades no React funcionam como atributos funcionam no html, ou seja, são informações que podem ser passadas para que os componentes funcionem de forma diferente.

Na prática: "atributos" fornecidos no JSX são os que são chamados props.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0nne1gs2t4fsipsr6ptb.png)

Como o componente FirstComponent seria usado:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0wyk8corb7fj7ilhc6na.png)

Notem que ao passar o componente como uma tag as propriedades são atribuídas como "n1 ={2}" e "n2={3}". Ao ser renderizado, esse componente daria como resposta: 2+3 = 5.

E, por fim, mas não menos importante, os estados de um componente é um objeto que contém informações que podem mudar ao longo do tempo na vida de um componente, ou seja, com os estados seria possível mudar os valores de "n1" e "n2" com o passar do tempo. Atualmente, os estados no React são controlados através dos Hooks que é uma feature do React que permite esse controle sem que seja necessário escrever uma classe para isso, como em versões anteriores. 


Interessante, não? Sentiu o poder do React? 💯💪

Sendo assim, esses são os principais fundamentos do React para entendermos pelo menos um pouco do que é e como funciona  essa biblioteca que com certeza veio para ficar e somar na comunidade. 


Mas e aí, "vamo codar"? 👩‍💻👨‍💻🚀


Referências:

https://reactjs.org/blog/2013/06/05/why-react.html
https://pt-br.reactjs.org/tutorial/tutorial.html
https://trends.google.com.br/trends/?geo=BR
Challenges in Building Multi-Cloud-Provider Platform With Kubernetes
Tags: kubernetes
Published: 2021-03-25 02:17:58

Building a cloud-agnostic platform used to be a challenging task as one had to deal with a large number of different cloud APIs and service offerings. Today, there are many managed Kubernetes solution (e.g., Openshift, GKE, AKS, or EKS), it seems like developers could simply build a platform based on Kubernetes and be cloud-agnostic. While this assumption is mostly correct, there are still a number of differences and pitfalls when deploying across those managed Kubernetes solutions.

This talk discusses the experiences made while building the ArangoDB Managed Service offering across different Kubernetes distributions.

{% youtube hfuvWeR21H4 %}

**Further reading:**
☞ [Everything You Need to Know About Kubernetes Networking](https://morioh.com/p/ecb38c8342ba "Everything You Need to Know About Kubernetes Networking")

☞ [Zero to Kubernetes: Learn Kubernetes from Beginner to Advanced](https://morioh.com/p/28e310111760 "Zero to Kubernetes: Learn Kubernetes from Beginner to Advanced")

☞ [Build Microservice Architecture With Kubernetes, Spring Boot , and Docker](https://morioh.com/p/f1bba3df88e8 "Build Microservice Architecture With Kubernetes, Spring Boot , and Docker")