teleren/devto huggingface dataset:
An Intro to JSX
Tags: react, javascript, beginners, tutorial
Published: 2020-10-27 03:57:36

**What is JSX?**
In simple words, JSX is just syntactic sugar on the top of raw React APIs.

```js
// JSX (HTML-like Syntax)
const reactElement =  <h1>Hello World</h1>;

// compiles to raw React APIs
const reactElement = React.createElement('h1', {}, 'Hello World');
```

JSX is not actually JavaScript, so we need a compiler to compile our JSX. Babel is one such tool we gonna use to compile our JSX.

Babel is written in JavaScript we can actually run it directly in the browser to compile our code on the fly.

To use babel in our Web Application. We need to include a script tag for babel and then we need to change the type of the script from ``text/javascript`` to ``text/babel``. So that babel can identify which script tag needs to be compiled.

```html
<script src="https://unpkg.com/@babel/standalone@7.9.3/babel.js"></script>

<script type="text/babel">
  // JavaScript + React
</script>
```

Let's try to recreate **Example 1** from the previous article using JSX.

**Sample Code**
```html
<body>
  <div id="root"></div>
  
  <script src="https://unpkg.com/react@16.7.0/umd/react.development.js"></script>
  <script src="https://unpkg.com/react-dom@16.7.0/umd/react-dom.development.js"></script>
  
  <script src="https://unpkg.com/@babel/standalone@7.9.3/babel.js"></script>

  <script type="text/babel">
    // JSX
    const divElement = <div>Hello World</div>
    
    ReactDOM.render(divElement, document.getElementById('root'))
  </script>
</body>
```

> The compiled code is added to the ``head`` tag.

![Compled Code](https://dev-to-uploads.s3.amazonaws.com/i/9ab4juj05bmlhj57ruop.jpg)

**Example 1**
{% codepen https://codepen.io/bipinrajbhar/pen/BazWYqw %}

**Interpolation**
Interpolation is defined as "the insertion of something of a different nature into something else".

**Sample Code**
```html
<body>
  <div id="root"></div>
  
  <script src="https://unpkg.com/react@16.7.0/umd/react.development.js"></script>
  <script src="https://unpkg.com/react-dom@16.7.0/umd/react-dom.development.js"></script>
  
  <script src="https://unpkg.com/@babel/standalone@7.9.3/babel.js"></script>

  <script type="text/babel">
    // interpolation
    const divElement = <div>{new Date().toLocaleString()}</div>
    
    ReactDOM.render(divElement, document.getElementById('root'))
  </script>
</body>
```

**Example 2**
{% codepen https://codepen.io/bipinrajbhar/pen/MWepGae %}

I hope you learned something from this article and if you have any doubt please leave a comment. I will be very happy to answer all your questions.

My name is **Bipin Rajbhar** and I am a software engineer at [QuikieApps](https://www.quikieapps.com/) and you can follow or connect to me on [Twitter](https://twitter.com/Bipin_1598) and [Linked In](https://www.linkedin.com/in/bipinrajbhar1598/)

**Resources**
[The Beginner's Guide to React](https://egghead.io/courses/the-beginner-s-guide-to-react)
[Epic React](https://epicreact.dev/)
Hypernames
Tags: hypermedia, webdev, rest, naming
Published: 2020-10-27 03:53:58

Names usually point us to persons, places or things, so we learn, by the age of 3 or 4, maybe even younger. Later we learn that names apply to many other kinds of things: events, decisions, holes, spaces, directions, ideas, none of which technically are "persons", "places" or "things", per se. And yet, it is the purpose of a name to cover them all, to do them justice, and to lead us, presumably to them, however it is they are to be approach or engaged either spatio-temporally or intellectually.

So we have all kinds of names as well, if not more than the previous set of kinds of things, for which we then need new kinds of names for our kinds of names for our kinds of whatevers which happen to, as we might expect, carry on differentiating in their various and copious ways. Of course, there are simple names like "John" but also there are names like "Yu" or "AdapterFactoryMessageContainerFormatterSingletonFactor" or even "127.0.0.1" or "OpenPGP.v3-asdf". It's also obviously conceivable that a name can only be its true meaning if it is written in a certain color or if it is uttered only, never written. The list of criteria for a name is endless, truly. And yet the list of kinds of things also seems endless — which is bigger, the list of names or the list of kinds of things?

They certainly pick out things in the world, but why do *these* special symbols or characters do so in just the way they do, whereas non-special characters do not? What really is so different from a E and a ℇ or ∃, well, they were all introduced at different times, by different persons, probably. Something about their form and style carried along with the fact of their origination. And yet, they all mean very much different things, or can at any rate, and sometimes they can be used to say the same thing as one would as if they were all interchangeable. So the rules seem to emerge out of meaning thus and so in just the way one does, as often as one does, and apparently these symbols, often enough, are successful at reflecting the models of that fact of reality as it was then and conceivably re-portrayable in the future, given the meanings of words stick around, as it were, to how things are going on with us. The environment certainly also seems to play a role, in re-enforcing these singular multiples, but how might we determine their fit in the semiotic system-theoretic model of hypermedia communication?
Refactoring Code 
Tags: opensource
Published: 2020-10-27 03:42:51

This week, I started refactoring my code for [FireLinker](https://github.com/zg3d/fireLinker) a cli tool that finds broken links in a given document. I went into this thinking my code was pretty clean and did not need much refactoring and there are a lot of thing I have done right with the code base such as having a single class for links with multiple attributes and functions to reduce code repetition and my code is fairly DRY (Don't Repeat Yourself). But as I analyzed the code I found a code that was not clean for maintainability such as having global variables and some unused variables.

## So what did I refactor?
![](https://miro.medium.com/max/2734/1*aESReEIHCllRmBFVW_V5lQ.png)

The things I refactored in my code was I got rid 2 global variables
I created a start function that took all the global functionality of yargs and my base logic to start document processing. While, all these where small changes I also added the "use strict"; directive to make sure all future code is done in strict mode.

## What did I learn?

I learned my code is not perfect, I wanted to modularize my code in this refraction but I found there to be a larger problem with my logic of how I kept all my parsed links. which is a global variable and to get rid of the variable I need to change most of my logic. So, I kept the current code and left it for a future iteration. As, my code would have broke if I tried refactoring this. One of the rule of refactoring is making sure it works and me being unsure just left it for the time being. but the whole experience revealed that I have a big change I need to make.
Diferença entre Shell, Terminal, Console e CLI (Command Line Interface)
Tags: linux, portugues, unix, freebsd
Published: 2020-10-27 03:24:25

# TL:DR

Shell - Entrada para comunicação com o Kernel. Onde os comandos são executados.

Terminal - É o programa que roda um shell. Gnome Terminal, xTerm, iTerm2 por exemplo.

Console ou CLI (Command Line Interface) - Abstração usada para se referir a um terminal + shell ou console tty.

# Shell

![Imagem de um terminal, Gnome-Terminal, rodando o shell Bash.](https://dev-to-uploads.s3.amazonaws.com/i/dbdhi9hmxuo43wniznwe.png)

É um programa utilizado para processar comandos e trazer os resultados do mesmo. Basicamente ele serve para interagirmos com o kernel do sistema operacional de forma mais abstrata, menos low-level.

# Terminal

![Imagem de um antigo terminal LSI (terminal físico)](https://dev-to-uploads.s3.amazonaws.com/i/m2utb6960htf4lnrb45b.png)

É um programa que roda um shell. Outrora eram equipamentos com capacidade mínima de processamento onde eram realizadas conexões a um computador remoto. Para diferenciar basta se lembrar que terminal indica o ponto final de algo por exemplo, no caso onde acontecem a entrada e saída dos dados para o computador.

# Console ou CLI (Command Line)

![Foto do console de um avião com dezebas de pequenos botões](https://dev-to-uploads.s3.amazonaws.com/i/lz3b44d44avgvwpczlqg.png)

São abstrações que indicam a utilização de um terminal+shell. No Linux console pode ainda indicar terminais, 6 por padrão, implementados diretamente pelo kernel. Podemos acessá-los usando os atalhos CTRL + ALT + F/n, exemplo o /dev/tty1 pode ser acessado com CTRL + ALT + F1, enquanto o atalhos CTRL + ALT + F7 traz você de volta para o modo gráfico.

# Bônus :)

Vamos entender a diferença entre Login Shell vs Interactive Shell vs Non-Interactive Shell.

### Login Shell

É um shell usado para o login. Pode ser acessado por terminal ou ssh por exemplo. Ele executa arquivos mínimos de configuração para podermos utilizar o sistema. Outro exemplo é você acessar seu console 1 ou /dev/tty1 como nos exemplos acima.

### Interactive Shell

É o shell que você executa, por exemplo após o login, como por exemplo o bash. Daí você me pergunta: “Ah mas eu não executei nada após o login, estou em um shell de login ou interativo?”, a resposta é que você está em um shell de login/interativo. Outro exemplo é abrir um novo terminal.

### Non-Interactive Shell

É um shell que não tem interação com o usuário. É raro de encontrar e não convém ao nosso cenário no momento.

#### Por hoje é isso pessoal!

Obrigado pela visita, deixe seu like e siga para novos artigos sobre Desenvolvimento de Sistemas.

> @feiler no Twitter

# Saiba Mais

https://askubuntu.com/questions/506510/what-is-the-difference-between-terminal-console-shell-and-command-line

https://stackoverflow.com/questions/18186929/what-are-the-differences-between-a-login-shell-and-interactive-shell
UI Dev Newsletter #28
Tags: html, css, javascript, webdev
Published: 2020-10-25 14:35:43

- [Thinking Outside the Box with CSS Grid](https://bit.ly/3ooM4A3)
Alex Trost describes in detail how to create more complex designs with fewer elements than we could with Flexbox alone.


- [JavaScript ES2021 Exciting Features](https://bit.ly/3meStfc)
Taran explains the new JavaScript ES2021 features, like String.prototype.replaceAll and Promise.any.


- [Largest Contentful Paint: measure and optimize it](https://bit.ly/37MGXDI)
Aymen Loukil writes a guide that helps you understand what LCP is, how to measure it, and, how to improve its score.


- [Alternative Text for CSS Generated Content](https://bit.ly/2HxQnbF)
Adrian Roselli shares insights on how to add alternative text for content generated by CSS, like images or glyphs.


- [Creating CSS Shapes with Emoji](https://bit.ly/2TmFqvI)
Preethi Sam explains how to use the concept of CSS Shapes with emoji to create interesting text-wrapping effects.


- [10 useful HTML file upload tips for web developers](https://bit.ly/3jtgBcr)
Tapas Adhikary shows 10 features of HTML file upload support, including drag-and-drop and multiple uploads.


- [Most Common GSAP Mistakes](https://bit.ly/2HB1gt8)
GreenSock team makes a list of common mistakes and some tips on how to avoid them.


- [Squircley](https://bit.ly/2J5xSMc)
Squircley is all you need to start creating beautiful organic shapes ready to use for logos, icons and background images.

Happy coding!

[Subscribe to the newsletter here!](https://bit.ly/34155z3)
NetworkX built-in graph generators
Tags: python, network, graph, sna
Published: 2020-10-27 01:03:15

Previously, I demonstrated how to load graph data from a json file and might be useful as a reference if you have any other graph data in JSON format. But if you want to play around with any kind of graphs without bothering yourself to put them first on a JSON file, you can use the networkx generators which contain graph that cover any case you need.

The documentation for the generator can be seen [here](https://networkx.org/documentation/stable/reference/generators.html). For a starter, you may want to use the graph [Small](https://networkx.org/documentation/stable/reference/generators.html#module-networkx.generators.small) category. These small graphs are useful if you want to understand a graph from a simple example as possible. So, let's try one of those:

```py
import networkx as nx
import matplotlib.pyplot as plt

krackhardt_kite_graph = nx.generators.krackhardt_kite_graph()

nx.draw(krackhardt_kite_graph)
plt.show()
```

Even the Les Miserables graph from my previous post is there as well in [Social Network](https://networkx.org/documentation/stable/reference/generators.html#module-networkx.generators.social) category (I should have known this...)

```py
import networkx as nx
import matplotlib.pyplot as plt

les_miserables_graph = nx.generators.les_miserables_graph()

nx.draw(les_miserables_graph)
plt.show()
```

There are so many graphs in the generator and it's not possible for telling you about each graph in this post, so you may want to explore it yourself.

________
Find out how this fun physics game was made
Tags: physics, zim, zimjs, amazing
Published: 2020-10-27 02:09:51

You can play the game to keep Noodle's hair on here https://codepen.io/danzen/pen/agbbRv.  ZIM now has integrated physics to make the Box2D (angry birds) physics engine much much more manageable.

Here is the [ZIM Physics Mini-site](https://zimjs.com/physics/).

It is as easy as:

```
new Circle().center().addPhysics() 
```
and the circle will fall to the ground.

See the [DOCS on Physics](https://zimjs.com/docs.html?item=Physics) for more commands.

---

If you have not checked out the Canvas recently - you simply must!  Here is the [ZIM&nbsp;Dev&nbsp;Site](https://dev.zimjs.com) and some [In-depth&nbsp;Guides](https://drabstract.medium.com/) by Dr&nbsp;Abstract including [Your Guide to Coding Creativity on the Canvas](https://drabstract.medium.com/your-guide-to-coding-creativity-on-the-canvas-ada0996298f6).
neural network for scraping 
Tags: machinelearning, neuralnetwork, deeplearning, scraping
Published: 2020-10-27 01:13:59

---
title: neural network for scraping 
published: true
description: neural net to classify products
tags: ml , neuralnetwork, deeplearning, scraping 
---
Sometimes in ecommerce web scraping you scrape the same product but with different names like :
Msi RTX 2070 Ti
Nvidia rtx 2070ti MSI 8gb 
And more complicated examples, I wonder if there is any neural net to classify these type of products
Living a spam free email life
Tags: email, spam, gmail
Published: 2020-10-27 00:59:52

---
title: Living a spam free email life
published: true
description: 
tags: #email #spam #gmail
//cover_image: https://direct_url_to_image.jpg
---


These days almost every website asks for a sign-up and if you notice, even the fancy cafes and other shops ask for your email. We don't really know what happens with our email ids. There is a possibility that these websites or shops are forwarding them to other people without our consent. This also leads to a lot of spams, making it hard to keep our inbox clean. However, there is a hack to fix these problems.
 
One way is to use [Temp mail](https://temp-mail.org/) where signing-up for websites is mandatory and you only need to visit those websites once or twice. Temp Mail is a throw-away email service that provides temporary, free, and disposable email addresses. So you could just use it to sign in to any website and forget about the mail-id once you are done using it. This will help you keep your inbox clean and safe from these spammy websites. 

Now, what if the website requires you to verify your email, or what if you need to fill in your mail id at some random shop, restaurant, company, etc. Well, in that case, you could use a Gmail trick to tackle these issues. The next time you give your email id to any of these places, use a mutated form of your email-id instead of your usual one. Gmail lets you add a '+' symbol to your first half of the email-id. For e.g, if your mail id is "luke1977@gmail.com", then you can use something like "luke1997+starbucks@gmail.com". The best part of this that you will still get the mail to your usual mail-id and this way you practically have an infinite number of email addresses. You could use this trick for a lot of things. It helps you track who is forwarding your email id without your consent. And in case, there is a chain of a certain company like Starbucks or something location-specific then you can use full stops as well. It can be something like "luke@starbucks.indiranagar.bangalore@gmail.com". 

![And that's how you live a zen, spam-free email life!](https://memegenerator.net/img/instances/73956787/anything-is-possible-when-you-have-inner-peace.jpg "And that's how you live a zen, spam-free email life!")

You can use email filters to automatically delete these spam emails or organize your emails better. The way to do it is to search for 'deliveredto: "luke+starbucks@gmail.com"' while setting up a filter on Gmail.
Scrappy web for good newssources for your dev env val (development environment values) today
Tags: rightwaydevelopment, getinspired, mountyourtoobox, allyouneed
Published: 2020-10-27 00:53:00

Right, you are a developer or software engineer, now what?
In my personal experience for collecting good examples of code and tools that are fascinating easy to use, to search, to modify, customize and scrap, to adapt and integrate on what my mind can reach with purpose.
One of these tools is Newsflow, after installed you can follow so many sites and profiles as you want. Follow Github blog, Stackoverflow blog, ALRIGHT, Dev blog, Keyword blog, etc, etc, etc. 
Newsflow on Windows 10 brings logo(ed) sites' updates notifications that instantly remarks in your memory to use in the development of a composited code.
Other good tools are RSS search through Cronycle, also a major scrapper that is used inclusively to issue magazines, Mailbrew and so-called Tweetdeck, for many timelines of Twitter social media.
Code is just like the bees, you can pollinate here and there!

@guim_freitas
ReactJs : Any idea on how to improve this code
Tags: react, fontawsome, javascript
Published: 2020-10-27 00:46:51

Hi all ! 

I'm learning ReactJs and i'm working on a simple component for my website, I want to display icons from font-awsome, i did something like this :

```
import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import {faJs, faHtml5, faCss3Alt} from '@fortawesome/free-brands-svg-icons'

function IconTech (props) {

    return (
        <div className="square">
            {props.icon === "faJs" &&
                <FontAwesomeIcon icon={faJs} className={"icon " + props.color} size="5x" />
            }
            {props.icon === "faHtml5" &&
                <FontAwesomeIcon icon={faHtml5} className={"icon " + props.color} size="5x" />
            }
            {props.icon === "faCss3Alt" &&
                <FontAwesomeIcon icon={faCss3Alt} className={"icon " + props.color} size="5x" />
            }
            <div className={props.color}>{props.title}</div>
        </div>
    );
}


export default IconTech;
```

My first attempt was this, but it wasn't working :

```
import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import {faJs, faHtml5, faCss3Alt} from '@fortawesome/free-brands-svg-icons'

function IconTech (props) {

    return (
        <div className="square">
        <FontAwesomeIcon icon={props.icon} className={"icon " + props.color} size="5x" />
            <div className={props.color}>{props.title}</div>
        </div>
    );
}

export default IconTech;
```

Any suggestions ?

Thanks !
A Simple CSS Grid Framework
Tags: css, webdev, sass, swordcss
Published: 2020-10-27 00:19:32

# GridBlade

[GridBlade](https://github.com/swordcss/gridblade) is a CSS grid framework created with SCSS and [SwordCSS](https://github.com/swordcss/swordcss).

It gives a very simple way to create grids. GridBlade doesn't use Flexbox so you can decide the number of columns and rows instead of just the columns.

## Usage

Their are 578 CSS classes that you can use. But, of course, you only need 2 classes to create a working grid. You can create a grid with this:
```html
<div class="gb-container-<no. of columns>-<no. of rows>">

<!-- Rows here -->

</div>
```
To insert an item you just add the class `gb-item` to your element.

{% github swordcss/gridblade %}
MySQL Workbench 8.0 on Windows
Published: 2020-10-27 00:17:32

1-What is MySQL Workbench

MySQL Workbench is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, backup, and much more. MySQL Workbench is available on Windows, Linux and Mac OS X.

2-Installation Process of MySQL Workbench

Step 1

To download MySQL workbench, visit MySQL website in your web browser and download URL:
https://www.mysql.com/products/workbench/
•	Click on the Download Button. The next page asks to either log in and start the download or download it directly.

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

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6oiayh1bo2jhfvq9bo2a.PNG)

Step 2

Click on "MySQL installer for Windows". Then, navigate the downloading location and the file will be automatically downloaded.

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

Step 3

Double-click the downloaded file to launch the MySQL installer.

Step 4

Setup window will appear on the screen. Then, click on the "Next" button.

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

Step 5

Select the folder in which you want to install your MySQL Workbench and click on “Next”.

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

Choose the setup type that best suits your needs and click on “Next”.

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

Step 7

"Ready to Install" window will appear on the screen, then click on the "Next" button.

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

Step 8

MySQL Workbench installation process

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

Step 9

Click on the “Finish” button when the installation is completed

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

Step 10

"Welcome to MySQL Workbench" will appear on the screen and you are now ready to design your databases.

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