teleren/devto huggingface dataset:
Micropython for Smart Badges
Tags: micropython, badges
Published: 2022-03-18 19:41:07

I highly recommend either or both of these badges from Adafruit and Pimoroni.

[https://github.com/tspannhw/FLiP-Py-SmartBadges](https://github.com/tspannhw/FLiP-Py-SmartBadges)

# FLiP-Py-SmartBadges
Yes, in fact, we do need these stinkin badges


## Working on Some Badgers for Conferences

![Badger2040](https://raw.githubusercontent.com/tspannhw/FLiP-Py-SmartBadges/main/timbadge.png)


## Code

* https://github.com/tspannhw/FLiP-badger-2040


## References

* https://www.adafruit.com/product/4400
* https://github.com/pimoroni/QR-Code-Generator
* https://learn.adafruit.com/pybadge-conference-badge-multi-language-unicode-fonts
* https://learn.adafruit.com/adafruit-pybadge


![Badger2040](https://github.com/tspannhw/FLiP-Py-SmartBadges/blob/main/IMG-7544.jpg?raw=true)

![Device](https://github.com/tspannhw/FLiP-Py-SmartBadges/blob/main/IMG-7543.jpg?raw=true)
All About Git & GitHub—Beginner to Advance ️
Tags: git, github, githubeducation, githunt
Published: 2022-03-18 19:41:01

- [Understanding Version Control System](https://dev.to/adilshehzad786/understanding-version-control-system-3o1i)

- [Understanding Git](https://dev.to/adilshehzad786/understanding-git-2gg)

- [Understanding Advance Git](https://dev.to/adilshehzad786/understanding-advance-git-1lh2)

- [Understanding Git Remote](https://dev.to/adilshehzad786/understanding-git-remote-jjh)

- [Signing Up For GitHub](https://dev.to/adilshehzad786/signing-up-for-github-11i0)

- [Exploring GitHub](https://dev.to/adilshehzad786/exploring-github-3hdj)

- [Introducing Git & GitHub](https://dev.to/adilshehzad786/introducing-git-github-ida)

- [Understanding GitHub WorkFlow](https://dev.to/adilshehzad786/understanding-github-workflow-348i)  

- [Git Cheat sheet for Beginners](https://dev.to/adilshehzad786/git-cheat-sheet-for-beginners-46b4)

_Please follow to get more blogs on such technical topics_. 
## Connect with Me 👋

Let me know if you have any question or suggestion. You can connect with me on [LinkedIn](https://www.linkedin.com/in/adilshehzad7/), Also Feel free to get a [Mentorship](https://linktr.ee/adilshehzad786) Session if you have any query related to DevOps.
What happens to the variable value set during the transaction, if its rollback?
Published: 2022-04-09 15:31:20

---
title: What happens to the variable value set during the transaction, if its rollback?
published: true
date: 2022-03-18 19:12:59 UTC
tags: 
canonical_url: https://blog.rajanand.org/what-happens-to-the-variable-value-set-during-the-transaction-if-its-rollback
series: SQL Interview Questions and Answers
---


```
DECLARE @my_age INT = 20;

BEGIN TRAN
SET @my_age += 30;
ROLLBACK;

SELECT @my_age;

```

## Answer:

Even though the transaction is rolled back, the value set to the variable remains same.

![1117_20220406_003230.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1649185831120/2u9WEhnbc.png)

> Changes to variables aren't affected by the rollback of a transaction.

Reference:  
[Microsoft docs](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/variables-transact-sql)  
[Brent Ozar](https://twitter.com/BrentO/status/1296117565823934464)

If you like this SQL interview question, you may also like the below interview question and answers.

- [How to do reciprocal in SQL?](https://blog.rajanand.org/how-to-calculate-total-travel-hours-between-city-x-and-y-and-vice-versa)
- [How to generate permutations in SQL?](https://blog.rajanand.org/how-to-generate-permutations-in-sql)
- [How to find account balance (running total) in SQL?](https://blog.rajanand.org/how-to-find-an-account-balance-in-sql)
- [What happens to the records inserted into a table variable, if the transaction rollback?](https://blog.rajanand.org/what-happens-to-the-records-inserted-into-a-table-variable-if-the-transaction-rollback)
Sharing context across Microfrontends
Tags: context, mfe, state, props
Published: 2022-03-18 19:04:09

TLDR; How to pass Context to Microfrontends?
The application is divided into multiple Microfrontends or react apps. Each of this is running in a different port. 
Container is hosting other Micrfrontends. 
Each one is a separate react app and it is a runtime integration. 

Currently passing some parameters via URL to other Microfrontends. 

Need to pass the data across these react apps (MFEs) using React Context.

Defined ReactContext Provider in Container (ReactApp1) and stored value (say color=black).

To access this color inside the lower level Microfrontend (ReactApp2) we need the context to be available. How to make it available?

<Container>
     <LowerLevelMFE/>
</Container>
New Things Added - Laravel 9.5 Released
Tags: php, laravel, webdev, programming
Published: 2022-03-18 19:00:40

Let's get started quickly I found new things in Laravel 9.5 Released I wanted to share with you.

- New Wrap String Helper
https://github.com/laravel/framework/pull/41455

```php
Str:wrap('value')->wrap('"');
Str::of('value')->wrap('"');
str('value')->wrap('"');
// Outputs: "value"
 
Str:wrap('is', 'This ', ' me!');
Str::of('is')->wrap('This ', ' me!');
str('is')->wrap('This ', ' me!');
// Outputs: This is me!
```

- Allow Callables in Http::beforeSending()
https://github.com/laravel/framework/pull/41489

accepting callables in the Http::beforeSending() method instead of only invokable classes. Now, the following example will work instead of getting a "Call to member function __invoke() on array"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cndss1syd40d6dmbo780.png)
```php
Http::baseUrl('https://api.example.org')
    ->beforeSending([ $this, 'prepareRequest' ])
    ->asJson()
    ->withoutVerifying();
```

- callback support on implode Collection method
https://github.com/laravel/framework/pull/41405

```php
Before:
<span>{{ $user->cities->map(fn ($city) => $city->name.' ('.$city->state->name.')')->implode(', ') }}</span>

After:
<span>{{ $user->cities->implode(fn ($city) => $city->name.' ('.$city->state->name.')', ', ') }}</span>
```

- Redesign php artisan schedule:list Command
https://github.com/laravel/framework/pull/41445
```php
php artisan schedule:list
```

I hope you enjoyed with me and to learn more about this release visit the sources and search more. I adore you who search for everything new.
Source :- https://laravel-news.com/laravel-9-5-0
Source :- https://www.youtube.com/watch?v=IybDVyRkNRw
Interface et type quand les utiliser ?
Tags: typescript, tutorial, french
Published: 2022-03-18 18:43:46

La différence entre `interface` et `type` dans TypeScript est assez difficile à cerner et c'est normal ! Ils sont tellement similaires, qu'il est possible de les interchanger sans que ça ne soit problématique.

---

### Alors quand utiliser l'un et quand utiliser l'autre ?

Cela dépend de vous, il n'y a pas de règle bien définie.

Le seul conseil valable serait de bien définir les conventions d'usage que vous souhaitez mettre en place dans vos projets et de les respecter.

---

🤜 _Une petite note en passant, on parle de `type` mais ça n'est pas tout à fait correcte, ce que nous créons est un *alias de type*._

_Un exemple simple qui permettrait de mieux comprendre serait de définir un alias de type qui correspondrait à un type primitif (string, boolean, number, ...)_

``` typescript
type MonAliasDeType = string;

type MonAutreAliasDeType = {
   maPropriete: MonAliasDeType,
   ...
}
```


_Nous faisons référence à un type._

---

### Mon point de vue

Personnellement j'ai beaucoup utilisé les interfaces, tellement, qu'il était très rare que j'en vienne à utiliser les types.

Mais après avoir feuilleté la [documentation TypeScript](https://www.typescriptlang.org/), lu quelques articles et révisé mes cours, j'ai maintenant une idée plus claire des subtilités de chacun d’eux.

*les types ne sont pas ouverts*, c'est à dire qu'ils ne peuvent pas être modifiés après avoir été définis.

Contrairement aux interfaces qui, quant à elles, *permettent la fusion*, c'est à dire que si l'on déclare deux fois, ou plus, une interface avec le même nom, ça ne sera pas considéré comme une erreur et aura pour effet de fusionner les interfaces. 


``` typescript
interface MonInterface {
  a: string;
}

interface MonInterface {
  b: string;
}

let maVariable: MonInterface;

maVariable.a
maVariable.b
```


A utiliser les interfaces on prendrait donc le risque de fusionner celles qui ont le même nom. Même si ça ne semble pas être un problème courant, il serait possible de fusionner des interfaces sans s'en rendre compte.

`type`, quant à lui, retournera une erreur.

`type` a aussi l'avantage de proposer plus possibilités pour décrire le format des données, voir les *Discriminated Types (|)* et les *Intersection types (&)*.

### Comment choisir ?

J'utilise `type` par défaut et les interfaces dans les cas suivants :

- Pour ajouter des propriétés à une interface globale, comme celle de Window
- Dans les librairies pour qu'elles puissent être surchargées


---

Sur ce, bon dev ;-)
Pablo Fonseca Interview - Streamlit AG Grid Component
Tags: misc
Published: 2022-04-01 15:11:08

---
title: Pablo Fonseca Interview - Streamlit AG Grid Component
published: true
date: 2022-03-18 15:18:48 UTC
tags: Misc
canonical_url: https://blog.ag-grid.com/pablo-fonseca-streamlit/
---

 ![Pablo Fonseca Interview - Streamlit AG Grid Component](https://blog.ag-grid.com/content/images/2022/03/pablo-fonseca-streamlit.jpeg)

[Pablo Fonseca](https://www.linkedin.com/in/pablocfonseca/) has created a [Streamlit](https://streamlit.io/) Component to make it easy to add [AG Grid to Python Streamlit applications](https://streamlit-aggrid.readthedocs.io/en/docs/).

[Alan Richardson](https://blog.ag-grid.com/author/alan/) from AG Grid's marketing team was able to chat online with Pablo about his project.

Pablo's component wraps AG Grid with a configuration interface as close to AG Grid's as possible to allow the AG Grid Documentation to act as a reference, this is helped by Python dictionaries being very similar to JSON objects.

Streamlit has a built in Table and Grid but doesn't support sorting, filtering and pagination as easily.

The component makes it easy to load [Pandas](https://pandas.pydata.org/) data frames and render them in a grid for manipulation.

In the interview Pablo explains what led to the component's creation and provides a demo of the component and examples code. Pablo also explains that this is his first React project and how the Streamlit documentation helped him get started and replace his use of Jupyter.

## Watch The Interview With Pablo

<iframe loading="lazy" width="560" height="315" src="https://www.youtube.com/embed/RHTJCwYfxSk" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

[Watch On YouTube](https://www.youtube.com/watch?v=RHTJCwYfxSk)

## Related Links

Streamlit Component:

- Python Package
  - [https://pypi.org/project/streamlit-aggrid/](https://pypi.org/project/streamlit-aggrid/)
- Discussion forum on Streamlit
  - [https://discuss.streamlit.io/t/ag-grid-component-with-input-support/8108](https://discuss.streamlit.io/t/ag-grid-component-with-input-support/8108)
- Documentation
  - [https://streamlit-aggrid.readthedocs.io/en/docs/](https://streamlit-aggrid.readthedocs.io/en/docs/)
- Live examples
  - [https://share.streamlit.io/pablocfonseca/streamlit-aggrid/main/examples/example.py](https://share.streamlit.io/pablocfonseca/streamlit-aggrid/main/examples/example.py)
- Streamlit Component Code on Github
  - [https://github.com/PablocFonseca/streamlit-aggrid](https://github.com/PablocFonseca/streamlit-aggrid)

Pablo Fonseca:

- Pablo Fonseca's Github
  - [https://github.com/PablocFonseca](https://github.com/PablocFonseca)
- Buy Pablo a Beer
  - [https://www.paypal.com/donate/?hosted\_button\_id=8HGLA4JZBYFPQ](https://www.paypal.com/donate/?hosted_button_id=8HGLA4JZBYFPQ)
- Contact Pablog
  - [https://www.linkedin.com/in/pablocfonseca/](https://www.linkedin.com/in/pablocfonseca/)
<!--kg-card-end: markdown-->
Don t worry about the brand. Just build a great product
Published: 2022-03-18 18:16:13

Hey there, beautiful people ❤️

Quando profissionais de #produto estão atuando na construção de uma solução, muitas vezes lidam com complexidades, onde começam com uma 1° primeira visão de onde é necessário chegar e muitas vezes esta visão não é assertiva, possuem um monte de informações sobre o mercado, concorrentes e uma certa ideia das necessidades dos clientes e usuários, isso sem falar no orçamento e o tempo limitado para entrega. E com tudo isso, ainda possuem a missão de entregar soluções com o máximo de valor para seus clientes e usuários.

Por este motivo as #Skills de produto precisam estar afiadas e “afinadas” rsrs. Além do que está nesta apresentação podemos citar outras:

- Atuação com engenharia e design;
- Visão e estratégia de produto;
- Habilidades na construção de roteiros;
- Habilidade em vendas e marketing; (acredite, é importante).
- Conseguir descobrir o mvp;
- Planejamento de projetos;
- Alinhamento com clientes e partes interessadas;;
- Análise de dados e métricas;
- Habilidade em negociar com usuários.

Para adquirir uma visão assertiva para construção de qualquer solução é necessário explorar o mercado de tecnologia dentro e fora do nosso País, isso não significa sair de onde está e procurar experiências em outras áreas, mas sim ser curioso para saber como as soluções tecnológicas que utilizamos no dia a dia foram pensadas e construídas; Netiflix; Adobe; Apple; DropBox etc; Health Tech.

Minha sugestão aqui é: Busque se atualizar diariamente na sua área; crie metas e objetivos profissionais; junte-se à Work Groups para troca de experiências e aprendizados; faça cursos na área de produtos, tecnologias e programação (mesmo que não queira ser um desenvolvedor); Se relacione com profissionais de outros Países, aprenda Inglês e converse; converse e seja curioso.

[](https://www.linkedin.com/posts/flavio-n-432537218_dont-worry-about-the-brand-just-build-a-activity-6910592387085975552-XjCT?utm_source=linkedin_share&utm_medium=member_desktop_web)
Temporal Trek Podcast
Published: 2022-03-19 21:02:01

---
title: Temporal Trek Podcast
published: true
date: 2022-03-18 18:00:45 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2022/temporal-trek-podcast/
---

Earlier this year I was a guest on the Temporal Trek Podcast.

{% twitter 1504830089002897414 %}

Here is the episode I recorded:[Temporal Trek Podcast Season 3 episode 30 Dead Stop](https://podcasts.apple.com/gb/podcast/the-temporal-trek-podcast-season-3-episode-30-dead/id1499160640?i=1000554428633)

This week “Dan Dan” are joined by long time friend of the show, formerly from The Ten Forward Podcast, Simon Foster.

We discuss whether this is

- A part two of a two-parter, last of a four parter or a previosuly unseen part 5 to the Tessek Prime Quintology?
- Rogue full-AI or just a really super advanced computer?
- Station seen again in Voyager?

Oh and by the way has anyone seen the guy who flies the ship, you know the one, tall bloke, loves a good prank, Space Boomer, answers to ‘Travis’?

![Temporal Trek Podcast](https://www.funkysi1701.com/images/podcast.jpg)

It was great fun to record and I hope you enjoy giving it a listen.
10 General Backend Interview Questions With Answers
Tags: javascript, webdev, programming
Published: 2022-03-18 17:47:28

## What is a Backend?
A Backend is a server that stores, processes and delivers data to a frontend or client-side application. A backend can be written in any programming language, but most commonly it is written in PHP, Ruby on Rails, Node.js, or Java, Python⛷.

## What is a Backend Developer?
A Backend Developer is responsible for the server-side of an application. They are responsible for ensuring that the data stored on the Backend is organized and accessible, as well as being able to process requests from the Frontend and deliver the correct data.

## What are some common Backend tasks?
Some common Backend tasks include:

Storing and retrieving data from a database
Processing data and performing calculations
Generating HTML pages or other content that is then delivered to the Frontend

## What is a Database?
A database is a way of storing data in an organized way. Backends often use databases to store data such as user information, blog posts, images, etc. The most common type of database used by Backends is a relational database, such as MySQL.

## What is a Relational Database?
A relational database is a type of database where data is stored in tables. Tables are like folders that contain data, and each table has its own columns and rows. Backends often use relational databases to store data because they are easy to use and understand.

## What is a Database Connection?
A Database Connection is a way of connecting to a database from your Backend code. You need to create a Database Connection in order to be able to query the database and access its data.

## How do I Create a Database Connection?
To create a Database Connection, you will need the following information:

The name of the database you want to connect to
The username and password for the database user account
The hostname or IP address of the server where the database is located
How do I Query a Database?
To query a database, you need to use a language called SQL. SQL stands for Structured Query Language, and it is the standard language for interacting with databases.

## What is an ORM?
ORM stands for Object Relational Mapper. An ORM is a tool that allows you to interact with a database using objects instead of SQL queries. This can make your code easier to read and write, and it can also make it easier to reuse code.

## What are some common Backend frameworks?
Some common Backend frameworks include:

Ruby on Rails
Node.js
Express
Laravel
Django
Flask
Best Websites for inspiration
Tags: webdev, design, resources
Published: 2022-03-18 17:39:42

Hello everyone,
I found some great websites to find inspiration for your next ui design

1. [Dribbble](dribbble.com)
![Dribbble](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e545of4lhdz7cag37gb8.png)

2. [Behance](behance.net)
![Behance](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sj0spdi6lto31ilbc4oe.png)

3. [UiJar](uijar.com)
![UiJar](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9k4mjp1snm65v545qp5i.png)

4. [Page Collection](pagecollective.com)
![Page Collective](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ezqhu4lqtr9d0y99v218.png)

5. [Design Vault](designvault.io)
![Design Vault](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c4mh53iiwb6xd31on46k.png)

6. [Dark Mode Design](darkmodedesign.com)
![Dark Mode Design](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/39k2ob1ttlfv3xeeh10d.png)

7. [Minimal Gallery](minimal.gallery)
![Minimal Gallery](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o5r32lzi9bt7712jb21k.png)

8. [OGimagegallery](ogimage.gallery)
![OGimagegallery](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9i4r64qp9gs9fwgpo06n.png)

9. [PFolios](pfolios.net)
![Pfolios](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/22cdxkfg8g8t8h397s5h.png)

10. [Lapa](lapa.ninja)
![Lapa](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8e39p3mocakfwepkozlg.png)
Docker maintenance commands
Tags: docker
Published: 2022-03-18 17:34:14

Hello there!
Here are few Docker maintenance commands.

**image commands**
`docker image ls` - lists docker images.
`docker images -aq -f 'dangling=true' | xargs docker rmi` - removes all unused images.
`docker rmi imageId` - remove an image.
`docker rmi -f imageId` - force remove an image
`docker rmi -f $(docker images -q)` - deletes all images forcefully.


**instance commands**
`docker ps` - lists running docker instances.
`docker ps -a` - lists docker instances (including stopped).
`docker stop containerId` - stops the container (proper shutdown).
`docker kill containerId` - stops the container (not gracefully shutdown).
`docker rm containerId` - remove a stopped container.
`docker rm $(docker ps -a -q)` - removes all stopped containers. 

**execution commands**
`docker exec -it containerName /bin/bash` - Use this to interact with already running container.
`docker run -it --entrypoint=/bin/bash containerName` - Starts the docker and lands user in shell.
`docker logs -t containerName` - shows logs even for container with exited status.

Image by <a href="https://pixabay.com/users/planet_fox-4691618/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=6271649">Alexander Fox | PlaNet Fox</a> from <a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=6271649">Pixabay</a>
How to create interfaces in TypeScript
Tags: typescript, javascript, beginners, codenewbie
Published: 2022-03-18 17:33:31

Interfaces and Classes are used to create custom types in TypeScript. These are similar but also have significant differences which I want to mention below.

##Difference between Interfaces and Classes
| Interfaces  | Classes |
| ---: | :---  |
| Define a new type      | Define a new type       |
| Properties (signatures)   | Properties (with implementation) |
| Methods (signatures)   | Methods (with implementation) |
| Cannot be instantiated    | Can be instantiated  |

##Create an Interface
`interface` keyword is used to create an interface following the name of the interface.
```javascript
interface Employee {
  name: string;
  title: string;
}
```
Here `Employee` represents the interface name with 2 string properties 'name' and 'title'.
Let's look into a complex example
```javascript
interface Manager extends Employee {
  department: string;
  numOfEmployees: number;
  scheduleMeeting: (topic: string) => void;
}
```
Now this `Manager` interface inherits all the properties of `Employee` interface. So in other words `Manager` interface has 4 properties i.e., name, title, department, and numOfEmployees.
As I mentioned above, interfaces don't have method implementations. So any object that inherits `Manager` interface will define the `scheduleMeeting` method according to it.

##Implement an Interface
Any object that implements above mentioned `Employee` interface must have 2 properties with string types.
```javascript
  let newEmployee1: Employee = {
    name: 'Sarah',
    title: 'Software Engineer',
  }
```
Let's see another example
```javascript
  let newEmployee2: Employee = {
    name: 'James',
    title: 'Team Lead',
    teamName: 'Alpha squad'
  }
```
Now `newEmployee2` have one additional property `teamName` but it still inherits the `Employee` interface because as long as an object has all the required properties of an interface can inherit/extends an interface.
This is also called a **Structural Type System**.

##An optional member of the interface
We can also declare optional members of the interface just like we did in optional params in a function.
```javascript
interface Person {
  firstName: string;
  lastName: string;
  midName?: string;
}
```
While implementing an interface, we can skip optional members of an interface, and the compiler won't give any error.

Feel free to connect on [Twitter](https://twitter.com/Aneeqa_Khan25)