teleren/devto huggingface dataset:
Goodbye Paint.net
Published: 2022-04-01 12:39:24

Paint.net is great. I love it. For years it was like an obscure gem somehow sitting out in the open within reach of every Windows user. I reached out and started using it long ago, probably since it was made available by some college professor out West somewhere.

But now I have a Mac and needed to switch. Reluctantly I dove into Gimp. 

I've tried Gimp before, waded in to try some simple things over the years. **Every time left screaming wondering why is this so hard and why am I so dumb?** Always ended up back at Paint.net.

Need does something to us. I needed to make some text borders and layer some icons on a logo recently and I really wanted to use my shiny new Mac for a change. So I googled and followed some simple steps. **Took too long. But now I know how to do this.**

Did the same thing again recently and did not need the tutorial. And it took very little time. And the results were better than what I would have gotten from Paint.net.

Guess I prefer Gimp for graphics editing now. And I'm okay with that.
Guia: Trabalhando com pdfs na AWS através do Node.js
Tags: aws, node, javascript
Published: 2022-04-01 12:33:26

Depois de apanhar bastante tentando realizar tarefas que envolviam pdf na AWS, deixo esse guia para quem precisar realizar esse tipo de demanda.

No meu caso, eu precisava fazer em node, então todas as bibliotecas e features que usei, são em javascript.

## 1) Primeira pergunta a se fazer, o serviço é um AWS Lambda/Batch ou ECS?


### AWS Lambda/Batch
Recomendo usar a biblioteca [puppeteer](https://www.npmjs.com/package/puppeteer) na `versão 8 do node`, pois as versões mais atualizadas são mais pesadas e a AWS limita o tamanho do lambda em `250mbs`. Outra opção seria criar um layer na AWS Layer.

O puppetter utiliza o chromium para realizar as impressões e é bem fácil utilizar. 

{% embed https://gist.github.com/xxdannilinxx/fe3d282c4ab2ad1bbe0186f26b93cc22 %}

Dá pra imprimir páginas da web e templates em html montado através do [handlebars](https://www.npmjs.com/package/handlebars).

{% embed https://gist.github.com/xxdannilinxx/21a5bab75f41faeecd86b17f5883a421 %}

### ECS
Já no ECS, recomendo a utilização do [html-pdf](https://www.npmjs.com/package/html-pdf?activeTab=readme) na 
 `versão ^8.0.0 do node`, por ser mais leve e funcionar bem. Ele utiliza o phantomjs, que não funciona no AWS Lambda e Batch;

{% embed https://gist.github.com/xxdannilinxx/b4778550b1e85964cdc7923be4937691 %}

## 2) Precisa encryptar, colocar senha no pdf?

Sem dúvidas, a melhor opção pra encryptar os pdfs, atribuir senhas de user e owner é o [hummus-recipe](https://www.npmjs.com/package/hummus-recipe), ele precisa rodar na `versão >=14.0.0` do node para funcionar.

{% embed https://gist.github.com/xxdannilinxx/c0eabbecd050ac88a5a6a7ca51af2b94 %}

Ele funciona muito bem em qualquer serviço da AWS. 

Mas se por algum acaso não conseguir utilizar o hummus-recipe para encrypt, devido a versão do node ser inferior a `14.0.0`,  outro bom pacote é o [qpdf](https://www.npmjs.com/package/node-qpdf). Será preciso copiar os [arquivos binários do qpdf](https://github.com/qpdf/qpdf/releases) para o container através do Dockerfile para executar o qpdf.

Agora é só subir o pdf pro S3 e ser feliz!
Learn web designing course with A2n academy
Tags: webdesigningcourse, webdevelopmentcourse
Published: 2022-04-01 12:18:14

A2N Academy, one of the top-tier IT Skill Development Institutes in Bangalore, offers the best Web Designing course. Our skilled trainers recruited by the academy offer quality-based **[Web Designing Courses](https://www.a2nacademy.com/course/web-design-course)**. Steadily, we guide our students to get placed in prominent web design companies through our online web designing course.

With a determined goal to nurture students for their skills and placement, we focus on developing web designing skills in students through our web designing course with a learning-by-doing approach and creating responsive websites from scratch for all platforms of computers, mobiles, and tablets.
Variables | C++ Boshlang'ich
Tags: uzbek, variables, beginners, dasturlash
Published: 2022-04-01 12:09:30

 - `declaration` - bu o'zgaruvchilar e'lon qilish

```cpp
int son;
```


 - `assignment` - bu o'zgaruvchiga qiymat o'zlashtirish.

```cpp
son = 25;
```

 - `initalization` - o'zgaruvchini e'lon qilish vaqtida birdaniga qiymat berish.

```cpp
int boshqaSon = 24;
```

### O'zgaruvchiga nom berish
O'zgaruvchilarga nom berishda ma'lum qoidalar mavjud:

- o'zgaruvchi nomi *harflar*, *raqamlar* va *underscore*(`_` belgisi)dan iborat bo'lishi mumkin.
- `_` belgisidan boshqa har qanday belgi ishlatish mumkin emas
- o'zgaruvchi nomi *raqam* bilan **boshlanmaydi**
- o'zgaruvchi nomi sifatida *kalit so'zlar*dan foydalanish mumkin emas.
> Masalan: `int, for, char, float, double, ...` kalit so'zlarga misollar

```cpp
int new year;   // xato, nomda bo'sh katak ishlatish mumkin emas

int 2022year;   // xato, raqam bilan boshlash mumkin emas

int new-year;   // xato, maxsus belgilar ishlatish mumkin emas

int for;   // xato, kalit so'z 'for' ishlatish mumkin emas
```

### O'zlashtirish/`Assignment`

 - o'zlashtirish operatori `=` o'zidan o'ng tomondagi qiymatni o'zidan chap tomondagi o'zgaruvchiga o'zlashtiradi, ya'ni qiymatni ko'chirib o'tkazadi.

- `=` operatorining chap tomonida doimo o'zgaruvchi turishi shart.
- `=` operatorining o'ng tomonida *o'zgaruvchi*, *o'zgarmas son* yoki ifoda bo'lishi mumkin
```cpp
int a = 5;   // operator o'ng tomonida o'zgarmas qiymat

int b = a;   // operator o'ng tomonida o'zgaruvchi

int c = a + b; // operator o'ng tomonida ifoda

7 = a;  // xato, operator chap tomonida o'zgaruvchi turishi shart
```

### Zanjir ifoda

- bir vaqtning o'zida bir nechta o'zlashtirish amallarini zanjir qilib yozish mumkin
- har bir operator chap tarafida o'zgaruvchi turishini ta'minlash shart
- o'zlashtirish o'ngdan chapga qarab amalga oshiriladi

```cpp
int a = 10;  // a ning qiymati 10 ga teng
int b = a + 10;   // b ning qiymati 20 ga teng
int c = a + b;   // c ning qiymati 30 ga teng
int d = a + b + c;  // d ning qiymati 60 ga teng

cout << a << " " << b << " " << c << " " << d << endl;

// 10 20 30 60

a = b = c = d;
cout << a << " " << b << " " << c << " " << d << endl;
// 60 60 60 60
```

Yuqoridagi `a = b = c = d` ifodasining ma'nosi 1. `c = d` -> 2. `b = c` -> 3. `a = b` ga teng.
Eloquent Subquery Enhancements - Laravel
Tags: php, laravel, webdev, programming
Published: 2022-04-01 11:38:36

I found this great old article https://laravel-news.com/eloquent-subquery-enhancements from 2019 and it contains some very important Eloquent Subquery that helps you in dealing with databases and makes you more flexible with your future ideas.

- “Select” subqueries

Using the new subquery select functionality in Laravel 6.0, we can select all of the destinations and the name of the flight that most recently arrived at that destination using a single query
```php
return Destination::addSelect(['last_flight' => Flight::select('name')
    ->whereColumn('destination_id', 'destinations.id')
    ->orderBy('arrived_at', 'desc')
    ->limit(1)
])->get();
```

Notice how we’re using Eloquent to generate the subquery here. This makes for a nice, expressive syntax. That said, you can also do this using the query builde
```php
return Destination::addSelect(['last_flight' => function ($query) {
    $query->select('name')
        ->from('flights')
        ->whereColumn('destination_id', 'destinations.id')
        ->orderBy('arrived_at', 'desc')
        ->limit(1);
}])->get();
```

- “Order by” subqueries

use subqueries in the query builder’s orderBy() method. Continuing our example above, we can use this to sort the destinations based on when the last flight arrived at that destination
```php
return Destination::orderByDesc(
    Flight::select('arrived_at')
        ->whereColumn('destination_id', 'destinations.id')
        ->orderBy('arrived_at', 'desc')
        ->limit(1)
)->get();
```

As with selects, you can also use the query builder directly to create the subquery. For example, maybe you want to order users based on their last login date
```php
return User::orderBy(function ($query) {
    $query->select('created_at')
        ->from('logins')
        ->whereColumn('user_id', 'users.id')
        ->latest()
        ->limit(1);
})->get();
```

- “From” subqueries

For example, maybe you want to calculate the average total donations made by users in your application. However, in SQL it’s not possible to nest aggregate functions `` AVG(SUM(amount)) ``
Instead, we can use a from subquery to calculate this
```php
return DB::table(function ($query) {
    $query->selectRaw('sum(amount) as total')
        ->from('donations')
        ->groupBy('user_id');
}, 'donations')->avg('total');
```

I tried to present some basic points, but to go deeper, visit the source.
I hope you enjoyed with me and I adore you who search for everything new.
How if-else Logic works in Svelte
Tags: svelte, javascript, webdev, tutorial
Published: 2022-04-01 11:30:23

Like other modern frameworks such as Vue and React, Svelte allows for logic within components itself. In this article, we'll look at how if and else statement logic works in Svelte outside of Javascript. If you're brand new to Svelte, start with my guide on creating your first Svelte application.

## Using if-else Statements in Svelte
Let's create a new component. Make a new file in your Svelte project in ./src/components called Component.svelte.Inside that component, add the following code:
```html
<script>
    // we write export let to say that this is a property
    // that means we can change it later!
    export let x = 0;
    const addToCounter = function() {
        ++x;
    }
</script>

<button id="counter" on:click="{addToCounter}">{x}</button>

<style>
    button {
        background: #ffb334;
        border-radius: 8px;
        border: none;
        font-weight: bold;
        cursor: pointer;
        padding: 0.5rem 2rem;
        color: white;
        font-size: 1.5rem;
    }
</style>
```

This simple component creates a counter which adds 1 to its value every time you click it. Let's look at how we'd use inline logic in this example.

## If Statement Logic in Svelte
Logic in Svelte goes inside {} curly brackets. Suppose we want a message to display based on the value of x from our component above. Our logic should be:

- if the value is more than 5 and less than 10, show "more than 5 clicks!"
- if the value is more than 10, show "wow that's a lot of a clicks!"
- otherwise show "keep clicking!"

In Svelte, the syntax for that looks like this:

```html
<script>
    export let x = 0;
    const addToCounter = function() {
        ++x;
    }
</script>

{#if x <= 10 && x > 5}
    <h2>more than 5 clicks!</h2>
{:else if x > 10}
    <h2>wow that's a lot of clicks!</h2>
{:else} 
    <h2>keep clicking!</h2>
{/if}

<button id="counter" on:click="{addToCounter}">{x}</button>
```

This means we don't have to rely on Javascript functions to write out which title we want to display - instead we can write it straight into our Svelte components.

## if-else statements in Svelte
Similar to before, if you only wanted to have an if and an else, you can do that too:

```
{#if x <= 10 && x > 5}
    <h2>more than 5 clicks!</h2>
{:else} 
    <h2>keep clicking!</h2>
{/if}
```

And finally, an if statement alone also works - perfect for hiding or displaying DOM elements based on Javascript values:

```
{#if x <= 10 && x > 5}
    <h2>more than 5 clicks!</h2>
{/if}
```

### Structure of if-else statements in Svelte
- The first part of the if statement always starts with `{#if STATEMENT}` where `STATEMENT` is any logical Javascript statement we want to test out.
- If we continue with else if or else, it's written as `{:else if STATEMENT}` and `{:else}` - using : instead of `#`.
- We finish all logical statements with `{/if}`.
Simple Hello world progrom in flask | Mega flask tutorial
Tags: python, webdev, beginners, flask
Published: 2022-04-01 11:28:36

## Introduction 
Creating hello world program is very easy in Flask as compared to other web frameworks like Django, web2py, bottle etc. 


![Simple Hello world progrom in flask | Mega flask tutorial](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k8symwr0a0n0my2jor3q.png)

To understand flask hello world example, here are some important terms that you should know.

- **WSGI** or web server gateway interface is used in python for the development of web application. For the universal interface, It is considered as the specification between the web application and web server.
- **Jinja2** is a web template engine which combines a template with a certain data source to render the dynamic web pages.
- **Werkzeug** is a library can be used to create WSGI compatible web applications in Python.

## Installation
Firstly, if you haven't install the flask ,then install it by running the following command.
```
$ pip install Flask
```
## Hello world
After completing the the installation, let'ssee the code of the flask hello world program example.
```
from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello_world():
    return "Hello world!"

if __name__=="__main__":
    app.run(host="0.0.0.0", port="5000")
```
After running this code, you will get the output like this.


![Hello world in flask mega flask tutorial techwithpie](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/twhhz5c3wwhgth1w3ti0.jpg)

After that go to the url http://127.0.0.1:5000/ on your web browser to see the result.


![Running hello world program in flask](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/woe9oq0chjtm1ztbwlk3.png)

Let's understand the code

Firstly, we import the Flask constructor from flask module.
```
from flask import Flask
```
This flask object is our WSGI application.

After that, we create a app variable which stores Flask constructor. 
```
app = Flask (__name__)
```
After that, you need a route for calling a python function in flask. A route tells the application which function is associated with a specific url.
```
@app.route("/")
def hello_world():
    return "Hello world!"
```
Note that the function should return something to the browser.

Now, we need to run the server at host 0.0.0.0 and at port 5000.
```
app.run(host="0.0.0.0", port="5000")
```
Congratulations, you have created your first flask web application.

Read the full article :- [Hello world in flask](https://techwithpie.blogspot.com/2022/03/simple-hello-world-progrom-in-flask.html)
Watch Youtube, Vimeo and Local Videos With Immediate Audio Transcription
Tags: hackwithdg, vue, webdev, tooling
Published: 2022-04-01 11:20:23

### Overview of My Submission

I previously introduced [Wordleit](https://dev.to/moose_said/write-articles-with-ai-speech-recognition-and-live-preview-508k) which is a platform I'm building with tools that would get the best use out of Deepgram's speech recognition services. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ejr7d77zv0jhg3epbfxv.png)
  
**Wordleit Streamer** is a free online video streamer for Youtube, Vimeo and local mp4 videos supported with Deepgram AI Speech To Text. It's allowing the user to play the video and using a microphone, the user can record the audio coming out from external speakers and then Deepgram is going to live transcribe the audio.

Wordleit Streamer is useful for people who are Deaf, have hard of hearing, or have difficulty processing auditory information.

| Table of Content                                 |
| ------------------------------------------------ |
| [Built with](#chapter-1) |
| [Submission Category](#chapter-2)                 |
| [Link to Code on GitHub](#chapter-3)                     |
| [Link to the tool live demo](#chapter-4)                     |
| [Additional Resources and Tutorial](#chapter-5)                     |

#### Built with:<a name="chapter-1"></a>
- [Laravel 9](https://laravel.com/)
- [VueJS 3](https://github.com/vuejs/vue)
- [Tailwind 3](https://github.com/tailwindlabs/tailwindcss)
- [Deepgram](https://deepgram.com/)
- [Plyr](https://plyr.io/)
- [Vue Plyr](https://github.com/redxtech/vue-plyr)
- Deployed on [Heroku](https://dashboard.heroku.com/)

### Future improvements:

- Adding translation.
- More formats and sources for videos.
- Allowing the user to stream with Webcams and get immediate live transcription.

### Submission Category:<a name="chapter-2"></a>

- Accessibility Advocates.

### Link to Code on GitHub::<a name="chapter-3"></a>

{% github https://github.com/MooseSaeed/wordleup %}

### Link to the tool live demo:<a name="chapter-4"></a>

https://wordleit.herokuapp.com/streamer

### Additional Resources / Info:<a name="chapter-5"></a>

Small demo to show you how it works:

{% vimeo 694845742 %}

Thanks for checking this out and stay tuned for my next updates on this 😍 Please let me know what you think below :)
Backend Projects you can try
Tags: programming
Published: 2022-04-01 11:15:26

## Discord bot. 
You can learn to interact with APIs and create something useful to your server.

## To-do app.
You can play around with it and add more functionalities.

## Travel planner.
Create an app that would choose everything you need for a trip e.g. transport, hotel, entertainment etc.

## Real Distance API.
You can create an API that returns time of transportation between two points, considering speed limits, road quality.

## Time reservation.
It would be great to give someone your calendar so they can reserve your free hours.

See you soon.
Homage to coding
Tags: beginners, programming, react, javascript
Published: 2022-04-01 11:10:41

This feeling when the last  centimeter of your head is surrounded by cold water when diving in the deep and the sound of the outer world is just switching of… this feeling of endlessness and mystery combined with curiosity and the focus of just a certain area around you - this is what coding brought into my life. From the very first flow I was experiencing during coding it was like diving - every challenge a jump into the cold, every topic a new meter I was swimming into the depth, the never ending possibilities of deciding what direction to go and what to learn next… This unbelievable feeling of being able to discover yourself in a new surrounding of knowledge made me an addict of this beauty of endless opportunities. 

Coming from the service oriented business world where business politics and showing off is ruling everything this new world of facts and simplicity is like an everyday holiday to my brain and pulse… No rooms for discussions, zero or one, true or false - what you see is what you get - I love it! 

Thanks to the crazy years of Corona I had to find a new way for myself and in the end I just found a missing pice of my personality covered in code ❤️

Being paid for learning and growing every single day - so much support in this field, so many smart and future oriented people, helping each other, giving chances to each other, being mentors - I just love it! 
So thankful being part of all this and contributing to the digital world, which was always so far away, so in the dark, so unknown to me… Now it’s just a glory of personal growth, endless possibilities and colorful code, thanks to vs code extensions ;) 

Support your kids learning to code, it’s an amazing way to learn that mistakes are needed to understand, that mistakes ending in growth and that every problem can have different solutions but for sure, there is always at least one! 

Never stop learning - everything is possible - my contract is the proof, calling me a Software Developer from now on 🤸🏼‍♀️☀️🥰 one bootcamp, 100 online courses and 1000 tutorials later - If you really want it, you can make it! 

Big thanks to this outstanding community 💋
Why Most of You don't need GraphQL?
Tags: webdev, database, productivity, programming
Published: 2022-04-01 11:00:45

GraphQL is another monster released by big company.

It is not that GraphQL is useless, but you don't need it.

Reasons:
1. Your web site is not that big
2. Your investment is not enough
3. Your api requests are so limited.
4. Your programmers cann't handle it properly.


GraphQL is not for you, please don't waste your time.
Progress Animations in Jetpack Compose with examples
Tags: android, animation, jetpackcompose, androiddev
Published: 2022-04-01 10:51:18

Animations are essential in a modern mobile applications to have a smooth user experience.

Jetpack Compose provides powerful and extensible APIs that make it easy to implement various animations in our app’s UI.

Here's an articles on an implementation of super cool progress animations using Jetpack compose in Android

You can read full article here [https://blog.canopas.com/progress-animations-in-jetpack-compose-with-examples-eb76cc28fbb6](https://blog.canopas.com/progress-animations-in-jetpack-compose-with-examples-eb76cc28fbb6)
Monthly Amazon Location Service Updates - 2022.03
Tags: amazonlocationservice, amplifygeo, amplify, amazonlocationserviceupdates
Published: 2022-04-01 10:44:58

![img](https://day-journal.com/memo/images/logo/aws/location-service.png)

### Monthly Amazon Location Service Updates - 2022.03

<br>

This is a summary of the March updates for Amazon Location Service.

<br>

## 2022.03 Updates

[Announcing two new HERE map styles for Amazon Location Service](https://aws.amazon.com/about-aws/whats-new/2022/03/amazon-location-service-two-here-map-styles/)
Two map styles are now available: "HERE Explore," a sophisticated design map style, and "HERE Explore Truck," adding truck restrictions and attributes. The "HERE Explore" style is the first style in the Amazon Location Service that also applies Japanese localization. The new map styles are selectable in the Amazon Location Service itself but are not yet reflected in Amplify Geo.

![img](https://day-journal.com/memo/images/monthly-amazon-location-service-updates-003_01.gif)

[Maplibre GL JS Amplify - Add custom icons to drawPoints](https://github.com/aws-amplify/maplibre-gl-js-amplify/releases/tag/v1.3.0-geo.1)
Custom icons can now be set in "drawPoints" in "Maplibre GL JS Amplify." However, you must select the "1.3.0-geo.1" version, not the official release.

<br>

## Other Info

[Amazon Location Service Developer Guide](https://docs.aws.amazon.com/location/latest/developerguide)
Official Amazon Location Service Documentation.

[Amplify Geo Docs](https://docs.amplify.aws/lib/geo/getting-started/q/platform/js)
Official Amplify Geo Docs.

[Amazon Location Service Samples](https://github.com/aws-samples/amazon-location-samples)
Official Amazon Location Service samples.

[amazon-location-service-starter](https://github.com/dayjournal/amazon-location-service-starter)
Build environment to get started with Amazon Location Service.

[A Summary of How to Build Amplify Geo and Amazon Location Service](https://dev.to/aws-builders/a-summary-of-how-to-build-amplify-geo-and-amazon-location-service-5hal)
Summary of Amazon Location Service and Amplify Geo. (as of December 2021)  

[dev.to](https://dev.to/dayjournal)
Articles on Amazon Location Service.

[tags - Amazon Location Service](https://day-journal.com/memo/tags/Amazon-Location-Service)
[tags - Try](https://day-journal.com/memo/tags/Try)
Notes on Amazon Location Service. (Japanese)

<br>

## Related Articles

{% link https://dev.to/aws-builders/monthly-amazon-location-service-updates-202202-1ge6 %}