teleren/devto huggingface dataset:
Google I/O 2022: What's New in Flutter
Tags: flutter, dart, news, mobile
Published: 2022-05-13 10:47:44

> Full article in [Codemagic blog](https://blog.codemagic.io/google-io-2022/)

Let's kick the discussion off with talking about our favorite framework, Flutter! Tim Sneath introduced how the developers worldwide have used Flutter to **create over 500,000 apps** with beautiful UIs across multiple platforms.


![Sketch by Codemagic and Katerina Balakina](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i4onvy2dd4nd82vtdpt0.jpg)


### Flutter 3

In the developer keynote, Google announced **Flutter 3**! With the stable release for **macOS and Linux**, you can now take advantage of the framework to create apps for *six* platforms --- Android, iOS, macOS, Windows, Linux, Web ---  from a single codebase.

You can explore the list of new features and improvements in Tim's post on [introducing Flutter 3](https://medium.com/flutter/introducing-flutter-3-5eb69151622f).

![](https://cdn-images-1.medium.com/max/1600/0*Cw2wZ87sJVgP_5Rd.png)

> *By the way,* ***Flutter 3 is already available on* **[***Codemagic***](https://flutterci.com/)***!***

### Stable macOS and Linux Release

Canonical has worked on supporting Flutter and bringing the Flutter SDK to **Linux**, which is now a stable release. For the **stable macOS** release, you can create Universal Binary for your macOS app to support both Intel and Apple Silicon machines. Also, Flutter is now fully native on Apple silicon for development.

> *And when we talk about*** *Apple silicon****, we can't help but mention that your favorite CI/CD provider* [*Codemagic has released the first M1 Mac mini build machines*](https://codemagic.io/m1-mac-mini/) *to the public! Take advantage of the blazing fast speeds for your Flutter builds! For* [*details*](https://docs.codemagic.io/specs/versions-macos-m1-xcode-13-3/)*, please refer to the docs.*

### Casual Games Toolkit

The Flutter team also announced a new toolkit for speeding up the development of casual games on mobile. You can find all the information about it in their [documentation](https://docs.flutter.dev/resources/games-toolkit), including a fully-featured game template app.

### Flutter and Crashlytics

Do you know that **62% of Flutter developers use Firebase** in their apps? Incredible numbers, right? Flutter now has fully-supported integration with Firebase.

In particular, the highlight of the integration was Flutter support for Crashlytics, where you could easily look into errors and solve them before it impacts your users. All you have to do is add the [Flutter plugin](https://pub.dev/packages/firebase_crashlytics) to use the Firebase Crashlytics API.

See the full article with all mayor [Google I/O 2022 announcements here](https://blog.codemagic.io/google-io-2022/).
SQL vs. NoSQL
Tags: database, sql, beginners, webdev
Published: 2022-05-13 10:12:48

In my previous article about [what CRUD is](https://blog.thepatik.com/what-is-crud), I also discussed that a part of any application is a database.

Today, a database is almost necessary for every application, because it allows us to store different data.

Databases can be relational or non-relational, they can be accessed via the Internet and the Internet, or they can be local on a local device.

Today, I will walk between relational and non-relational databases.

## Relational Databases (SQL)

Relational databases are the most used databases. Data in these databases are stored in tables and rows.

The relational database is like Excel worksheets.

Relational databases have better readable data than non-relational databases because they have very structured data.

For creating queries in those databases is used an existing language called SQL is.

Advantages of relational database:
- Great choice for structured data
- Great choice for demanding queries

The biggest drawback of a non-relational database is the inability to dynamically change the schema. After all, if we want to add a new attribute to a relational database, this will affect the entire database.

At the same time, compared to non-relational databases, they need more time to execute and search for data.

Some relational databases:
- [MySQL](https://www.mysql.com),
- [MariaDB](https://mariadb.org),
- [PostgreSQL](https://www.postgresql.org)
- [Microsoft SQL-Server](https://www.microsoft.com/en-us/sql-server/sql-server-2019)
- [SQLite](https://www.sqlite.org/index.html)


![Server](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/970iv1p7iamlva1e8oe7.png)


## Non-relational databases (NoSQL)

Non-relational databases contain unstructured, structured or structured data, usually in a key-value pair.

The big advantage of those databases is the option of being very flexible. This allows you to quickly add new attributes which do not impact the full database. 

The advantage of such a database is that we can store a lot of data in one table.

The non-relational database is faster than the relational sub-database.

The disadvantage of such a database is that each has its own method of making queries for managing data in the database.

Some non-relational databases:
- [MongoDB](https://www.mongodb.com)
- [Redis](https://redis.io)
- [Couchbase](https://www.couchbase.com)

## Conclusion

I can figure out that relational databases are the best option in an application that had structured data and we want to have them portable and an option for use in different infrastructures. But, a lot of companies still use relational databases.

But non-relational databases get the most out when we start creating a project and want to have a lot of flexibility. Also, the non-relation database is great if we store a huge amount of data. 

---

If you like reading what I write, you can donate me a cup of coffee or start following me on Twitter([@Patik123_](https://twitter.com/Patik123_)).
This Week in Python
Tags: python, news, discuss
Published: 2022-05-13 10:11:35


**Fri, May 13, 2022**

**👻 Friday the 13th – Spooky Edition 👻**

This Week in Python is a concise reading list about what happened in the past week in the Python universe. 

## Python Articles

- [An overview of structural pattern matching](https://lwn.net/Articles/893193/) – Python's match statement was introduced in Python 3.10. Learn the history of the feature, how it is used, and how it works.
- [Converting a Python library to Rust](https://alantrick.ca/writings/programming/python_to_rust) – Alan describes his experience porting his Python library August to Rust
- [Python 3.11: possessive quantifiers and atomic grouping added to re module](https://learnbyexample.github.io/python-regex-possessive-quantifier/) – 
- [Faster, more memory-efficient Python JSON parsing with msgspec](https://pythonspeed.com/articles/faster-python-json-parsing/)
- [Django filter - filter(A).filter(B) vs filter(A, B)](https://www.hacksoft.io/blog/django-filter-chaining) – `SomeModels.objects.filter(a=A).filter(b=B)` – we get duplicate objects in our queryset. In this article, we’ll explore & explain why

<!-- - [Use python in shell, as if it were awk](https://blog.blockingqueue.com/use-python-in-shell-as-if-it-were-awk) -->


## Projects

- [madbg](https://github.com/kmaork/madbg) – A fully-featured remote debugger for python
- [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR) – OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system)
- [scapy](https://github.com/secdev/scapy) – the Python-based interactive network packet manipulation program & library
- [img2cmap](https://github.com/arvkevi/img2cmap) – Create colormaps from images for matplotlib
- [ScoutSuite](https://github.com/nccgroup/ScoutSuite) – Multi-Cloud Security Auditing Tool


## Shameless plug

- [Build a Todo App With PyScript](https://bas.codes/posts/pyscript-todo) – My short walkthrough of the PyScript Todo example
- {% embed https://dev.to/bascodes/advanced-orm-in-django-12lj %}
The story of how I learned English with programing.
Tags: motivation, codenewbie
Published: 2022-05-13 10:07:16

Hey guys.
First of all let me introduce myself. I'm Iman and i live in iran.
I'm very happy and excited about this blog post that I'm writing because this is the first time I'm trying to write an English blog post. After this, I'm going to write more because I like to share my knowledge with others and practice more English.

before everything I have to mention that I'm not very fluent in English and if you see any mistakes I'm sorry about it.
When I was 18 I started to learn programing and after some time I realized there aren't any useful resources in my native language (Farsi).

So I decided to read and watch programming-related books and videos without any knowledge of knowing English and that was very tough but I'm very happy because I made it.

At first i start learning python on [programiz](https://www.programiz.com/) and [tutorialspoint](https://www.tutorialspoint.com/index.htm) and at the same time I was watching lots of video about programing on youtube.
And i have to this mention because I spent much time at [dev.to](https://dev.to) and read lots of your posts and I'm very thankful because you helped me to achieve my goals.

these helped me to improve my listting and reading skills at English but I couldn't speak and write in English because I've never tried to practice these skills.

Then after several months of practicing speaking and writing, I'm here and this is my first blog post and i hope you help me to learn more about english as you helped me before without knowing any things about it.

So I'm going to write blog posts about programing stuff that I learn and share my knowledge because I enjoy doing it and I can practice more and make new friends.

Thank you for giving your time to me. good luck.
Introducing Klay - An end-to-end encrypted chat application
Tags: appwritehack, appwrite, webdev, javascript
Published: 2022-05-13 10:04:12

---
title: Introducing Klay - An end-to-end encrypted chat application
published: true
description: Klay is an end-to-end encrypted chat application powered by Appwrite
tags: appwritehack, appwrite, webdev, javascript
---

### Overview of My Submission

Klay is an end-to-end encrypted chat application.

It is built with the Vue-powered framework called [Quasar](https://quasar.dev), which allows you to create applications for the web, desktop and mobile all under one codebase.

The encryption is done using the WebCrypto APIs, so your private keys are never generated from the server.

The public key is stored unencrypted in Appwrite to allow other users to chat with you.

Appwrite Realtime is responsible for making the chat application function in real time.

You can encrypt all your messages with a PIN and restore them on another device using that PIN.

Get the Android app: https://appwrite.arnu515.tk/v1/storage/buckets/files/files/klay.apk/download?project=klay
Use the web version: https://klay-arnu515.vercel.app

(You may get a Play Protect error while installing the app. You can ignore that error. It happens because the certificate is self signed).

You can also compile the application from source. The instructions on how to do that are in the [Github repo](https://github.com/arnu515/klay)

### Submission Category: 

Mobile Moguls

### Link to Code

{% embed https://github.com/arnu515/klay %}


### Additional Resources / Info

This application was actually a pretty hard thing to make. Mostly because this was my first time using Quasar, first time developing for Android, and first time using cryptography techniques straight in the browser.

Appwrite made it a breeze by allowing me to focus on only the important stuff and leaving the other stuff like authentication to itself.

The hosted version may be a bit slow because the python backend is hosted on a free tier.

**Screenshots:**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bzjj3f0ysqmd7tdippnw.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aerzl2bvc97orepim8wr.png)
  
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8h1vf0u056lx6kq22lqu.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iqem8ng3l9eogunqsqrc.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lhlinmzts6pljtt3s3xf.png)
Find The Average Pair
Tags: javascript, programming, algorithms
Published: 2022-05-13 09:48:26

## Multi-Pointers QUestion 2

Given a sorted array and a target average value, write a function `AveragePair` to determine if a **pair** of numbers adds up to the target average value.

Thoughts:
- One pointer at the start of the array
- One pointer at the end of the array
- Since the array is sorted,
    - if calculated average pair bigger than the expected value
        - we move left pointer by 1 position to the right
    - if calculated average pair smaller than the expected value
        - we move right pointer by 1 position to the left
- Practice both iterative and recursive methods

```js
// Recursive method
function averagePair(sortedArr, avgNum){
    const arrLength = sortedArr.length;
    if (arrLength < 1) return false;
  
    function recurs(sortedArr, left, right) {
        if (left === right) return false;

        const avg = (sortedArr[left] + sortedArr[right]) / 2;
        if (avg === avgNum) return true;
        return (avg < avgNum) 
            ? recurs(sortedArr, left+=1, right)
            : recurs(sortedArr, left, right-=1);
    }

    return recurs(sortedArr, 0, arrLength - 1);
}

// Iterative method
function AveragePair(sortedArr, avgNum){
    const arrLength = sortedArr.length;
    if (arrLength < 1) return false;

    let left = 0;
    let right = arrLength - 1;
    while(right > left) {
        const avg = (sortedArr[left] + sortedArr[right]) / 2;
        if (avg === avgNum) return true;
        if (avg < avgNum) {
            left++;
        } else {
            right--;
        }
    }
    return false;
}
```
Share a Useful Python Online Editor
Tags: python, tooling, beginners, programming
Published: 2022-05-13 09:31:10

Original: <https://lwebapp.com/en/python-online>

## Introduction

Some friends may have heard of PyScript, and know that Python can be packaged into wasm and run on the browser side. To do some functions that require Python to do, can be done directly in the browser without interacting with the server. Open the developer imagination.

What we want to recommend here is an online tool that also supports the execution of Python code, an online Python code editor

![Python Online Editor](https://cdn.jsdelivr.net/gh/openHacking/static-files@main/uPic/WX20220513-155601.png)

> Python online editor address: <https://lwebapp.com/en/python-playground>

## How to use Python Playground tool?

1. Copy the Python code from other places, paste it into the editing area on the left side of the `Python Playground` tool, or directly enter your Python code
2. Click the `Run` button at the top to execute the code
3. The right area will immediately display the running results of the Python code, click the `Clear` button to clear the running results
4. You can copy or download your Python code

## What is Python?

Python was designed in the early 1990s by Guido van Rossum of the Netherlands Society for Mathematics and Computer Science as an alternative to a language called ABC. Python provides efficient high-level data structures, as well as simple and efficient object-oriented programming. Python syntax and dynamic typing, as well as the nature of an interpreted language, make it a programming language for scripting and rapid application development on most platforms. development of the project.

## Why learn Python?

1. Python syntax is simple and easy to learn
2. Python lets you build more functionality with less code
3. Python is cross-platform and open source
4. Python can do web backend, web crawler, office automation, data analysis, artificial intelligence, automated testing, desktop applications, etc.
5. Rich third-party libraries to meet almost all your development needs
6. Active development community, detailed development documents, guides, tutorials

## Why use Python Playground?

1. Open the browser to write Python code, just use it and leave without installing a local Python environment
2. Run Python code on the browser side, no need to interact with the server, and the response is fast
3. Help beginners learn Python syntax quickly
4. Support Python 3.10
5. Support to quickly copy or download your code

## Conclusion

The above is the my introduction to the Python online editor launched by the [lwebapp.com](https://lwebapp.com/) website. This tool is still under iteration, and your valuable comments are welcome.

## Reference

- [lwebapp.com](https://lwebapp.com)
- [Python Online Editor](https://lwebapp.com/en/python-playground)
- [Share a Useful Python Online Editor](https://lwebapp.com/zh/python-online)
How to install pimcore community edition in ubuntu?
Tags: pimcore, installation, ubuntu, php
Published: 2022-05-13 09:29:00

**How to install PIMCORE in Ubuntu 20.04**

I will try to keep the process as minimal as possible. So, I will avoid some configuration that is not mandatory but recommended to use Pimcore for production environment.

**_Check for requirements_**
Make sure you have the following extensions installed.
(mysql, iconv, dom, xml, gd, exif, mbstring, zlib, zip, intl, opcache, curl)
```
sudo apt update
sudo apt install php-mysql php-iconv php-dom php-xml php-gd php-exif php-mbstring php-zlib php-zip php-intl php-opcache php-curl -y
```

 (You can check for the all the installed extension using following command.
```php -m```
2. Make sure you have database installed on your system.
```
sudo apt install mariadb-server
```
3. Change the directory where you want your pimcore installation to be located. For example:

```
cd /your/project
```
4. Make sure you have composer installed and available from your path.

```
wget -O composer-setup.php https://getcomposer.org/installer && sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
```
5. Creating our first pimcore project using composer.
```
COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo your_project_name_here
```
6. Setting up database(MySQL)

- Creating database and a new user credentials
```
sudo chown mysql:mysql -R /var/lib/mysql
```
(This command changes the ownership of /var/lib/mysql directory recursively to mysql.
)

```
sudo systemctl restart mysql
sudo mysql -u root -p
mysql> CREATE DATABASE yourdbname CHARSET=utf8mb4;
mysql> CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL ON yourdbname.* TO 'username'@'localhost';
```
Installation of pimcore:
(Make sure you are inside the project's directory)
Run the following command:
You should try one of the two (interactive or non-interactive) based on your preferences.
```
@Interactive
./vendor/bin/pimcore-install
(An interactive prompt will be generated where you need to provide credentials used by pimcore)
```
```
@NonInteractive
./vendor/bin/pimcore-install --admin-username adminuser --admin-password adminpass --mysql-username username --mysql-password password --mysql-database yourdbname --no-interaction
```
```
_Check whether pimcore is working_
Change the directory to project's root.
```
symfony serve:start
symfony open:local
```
**ALTERNATIVE**

For those who have not installed symfony cli.
1. `php -S localhost:8000`
2. Open _localhost:8000_ in your favorite browser. 

**-----END-----**
If everything goes right, you will see a webpage being displayed.

To access dashboard, login to _localhost:8000/admin_ with  admin credentials created during pimcore-install.
Duplicate Arguments
Tags: javascript, programming, algorithms
Published: 2022-05-13 09:16:34

Given N number of arguments, write a function `CheckArgsDuplicates` to determine if its arguments have any duplicate.

Thoughts:
- One-liner in JavaScript does exist for such question
- Since it is not needed to count the number of duplicates, once it exist in the hash we return true

```js
// Time complexity - O(n)
// Space complexity - O(n)
function CheckArgsDuplicates(...args) {
    const argumentz = [...args];
    const argsLength = argumentz.length;

    let argCounter = {};
    for (let i=0; i<argsLength; i++) {
        if (argCounter[argumentz[i]]) return true;
        argCounter[argumentz[i]] = 1;
    }
    
    return false;
}

// one-liner solution which should only be used as naive solution
function CheckArgsDuplicates(...args) {
    return Array.from(new Set(args)).length !== args.length;
}
```
Bunzz Monitoring Feature launched!
Tags: webdev, web3, beginners
Published: 2022-05-13 09:04:09

Bunzz is proud of over-delivering instead of promising.

As expected in our roadmap we are pleased to announce our MONITORING feature is already available in your dashboard, providing analytics system for your Dapp’s.

> After publishing your Dapp to final users, our SDK will track users activity and store information, which will be available and shown on Bunzz Dashboard section.

Monitoring feature includes:

- Statistics about the count of initializations
- How many times each function was called by day
- Summary count of all functions calls by day

**Note**: Make sure that your Frontend application uses bunzz-sdk version 1.1.1 or higher for getting analytics.

Sign in to your Bunzz dashboard to check it out here:

https://app.bunzz.dev/
Can I use next-seo in my angular project ?
Tags: angular, nextjs, seo, javascript
Published: 2022-05-13 09:03:58

I just want to know that Can I use [next-seo](https://www.npmjs.com/package/next-seo) in my angular app ?
If I can use it.. how can I add it in my any page ?

Or any other tool suggestion which will help me for better seo in angular...

Thanks
How to place footer at the bottom of page or content which is lower.
Tags: html, css, webdev, beginners
Published: 2022-05-13 08:59:52


First create a container which contains all the elements or components. Then create header, main-content, and footer.
```
HTML
<div class="container">
         <div class="header">This is navbar/header</div>
         <div class="main-content"></div>
         <div class="footer">This is footer</div>
      </div>
```

Add some styling to the main container as it will contain all our data, so we are using flex and flex direction column. We also giving min-height: 100vh so that the container will have the full height of the viewport.

```
.container{
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
```


Now, we will add some styling to the footer we have to give bottom:0; so that it will stick to the bottom of container and we also have to give margin-top : auto; so it will push the footer to bottom as mush as possible. 

```
.header{
    width: 100%;
    background-color: bisque;
    height: 8vh;
    text-align: center;
}
.main-content{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: azure;
}
.footer{
    bottom: 0;
    margin-top: auto;
    text-align: center;
    background-color: rgb(154, 178, 178);
    width: 100%;
    height: 8vh;
}
```