teleren/devto huggingface dataset:
QR Lens - QR code scanner app build with Flutter
Tags: flutter, mobile, learning, qrscanner
Published: 2022-01-04 12:38:47

QR Lens - Community
This project is inspired by the [offline-qr-code](https://github.com/rugk/offline-qr-code) Addon for Firefox. Learning flutter was an extremely rewarding experience and I used this learning experience to build something for the community.

Available at [github](https://github.com/omerdotdev/qrlens-community) and Google [Playstore](https://play.google.com/store/apps/details?id=com.omerdotdev.qrlenscmnty).

Please do write your feedback. Would love to hear it.

Thanks for your support. cheers!
PT Trim Reviews (Scam or Legit) - Does PT Trim Really Work?
Published: 2022-01-04 12:31:51

[PT Trim](https://pttrim.wixsite.com/pttrim) bizarre purple tea ceremonial was found by the maker of PT Trim in the Nandi Hills of Kenya. There are numerous catechins and epigallocatechin gallates in purple tea extricate, making it remarkable among tea separates. According to the authority site, the "biochemical examples" that have diminished your digestion can be turned around by PT Trim involving purple tea in the PF Trim Fat Burn supplement. Accordingly, you can lose from fifteen to fifty pounds and more within a brief period without slimming down or joining a rec center.

https://pttrim.wixsite.com/pttrim
https://pttrim.jimdosite.com/
https://pttrim.godaddysites.com/
https://promosimple.com/giveaways/pt-trim-reviews-scam-or-legit-does-pt-trim-really-work/
https://promosimple.com/ps/1a25c/pt-trim
https://sites.google.com/view/pt-trim/home
https://sites.google.com/view/pttrimus/home
https://fetchbinarydog.com/pt-trim/
https://www.provenexpert.com/pt-trim/
https://www.tickaroo.com/ticker/61d434da8f5e396f66adba6e
https://pt-trim.footeo.com/actualite/2022/01/04/pt-trim-reviews-scam-or-legit-does-pt-trim-really-work.html
https://pttrim.clubeo.com/news/2022/01/04/pt-trim-reviews-scam-or-legit-does-pt-trim-really-work
https://caramellaapp.com/pttrim/QYxib1RDq/pt-trim-reviews-scam-or-legit-does-pt-trim-really-work
https://caramel.la/pttrim/QYxib1RDq/pt-trim-reviews-scam-or-legit-does-pt-trim-really-work
 https://mymediads.com/articles/93328
https://telescope.ac/pttrim
https://en.gravatar.com/pttrim
https://www.beatstars.com/pttrim/about
https://linktr.ee/pttrimpill
https://www.quora.com/What-is-PT-Trim/answer/PT-Trim
https://educatorpages.com/site/pttrim/
https://create.arduino.cc/projecthub/pttrim/pt-trim-913780
https://gocrowdera.com/pttrim
https://paper.li/EsmFyVxvA9UlvU5QxSXjA
https://www.wantedly.com/users/157464485/post_articles/370085
Should we transit towards SWIFT?
Published: 2022-01-04 12:12:53

Like any new development language, Swift has its own set of challenges and gaps but at the same time has its own set of advantages too. Still, Swift is being accepted widely and rapidly. This is shown by some surveys that are conducted by independent bodies.

Definitely, it will have its own rise and falls on various parameters like performance, popularity, and usage, etc but the bottom line is that SWIFT is from Apple and Apple is determined to back it up and take it to the level where it is recognized and accepted as a mature, reliable and stable platform for the new generation applications.

Inventing a new programming language is something very few companies can do and we believe it will have a profound effect on our ecosystem.

Tim Cook

Appleinsider.com mentions “Apple's new Swift programming language has only been available for a few months, but iOS and OS X developers from American Airlines, Getty Images, LinkedIn and Duolingo are reporting favorable impressions--ranging from increased productivity to fewer bugs in their shipping apps--as interest in the new language rapidly accelerates.”

Apple's new Swift programming language takes flight with Getty Images, American Airlines, LinkedIn, and Duolingo.

Appleinsider.com

Apart from the developer community, Swift has been radically accepted as part of its learning programs by many international universities and technical schools. Some of these include Germany's the Technical University of Munich to Tecnológico de Monterrey in Mexico, Ingésup in France, Aberystwyth University and Plymouth University in Great Britain, and RMIT University in Australia.

A variety of international universities and technical schools are already incorporating Swift into their courses.

Tim Cook
Activate Setup
Published: 2022-01-04 11:33:55

Installing a regular canon ij printer driver requires its installer pack in the CD setup and [https://ij.start.cannon](https://istartsetup.com/https-ij-start-cannon/) .Once your PC or laptop has the installation ij setup, follow the instructions. [http://ij.start.cannon](https://istartsetup.com/https-ij-start-cannon/) | [https //ij.start.cannon](https://istartsetup.com/https-ij-start-cannon/)
 
Now, open your system web browser and go to [ij.start.canon](https://www.ijstartca-none.org/) website through a web address. Its offered by Canon support officials to guide the user. [ij.start canon](https://www.ijstartca-none.org/)
 
The [Canon IJ Print Utility](https://istartsetup.com/canon-ij-printer-utility/) enables you to perform test printing in order to check whether the printer is printing correctly or not.
Create dynamic nested menu items in Angular 
Tags: angular, recursion, ngtemplate, webdev
Published: 2022-01-04 11:31:18

I was looking for ways to create a dynamic menu where we get list of menu items from the api and I came across this [stackoverflow question](https://stackoverflow.com/questions/61271254/how-to-create-a-submenu-in-a-dynamic-dropdown-list-with-typescript-and-angular) 

This explains how to use `ngTemplateOutlet` to call your own custom template to populate the menu item by referencing the same template again. 

if you have an array of `menuItems` like this:
```typescript
menuItems: MenuItem[] = [
 {
    label: 'Home',
    href: '/home',
 },
 {
    label: 'Articles',
    href: '/articles',
    children: [
	{
	  label: 'News',
	  href: '/articles/news',
	},
	{
	  label: 'Entertainment',
	  href: '/articles/entertain',
	},
     ],
 },
 {
    label: 'About',
    href: '/about',
 },
];

```
I have used hardcoded value for `menuItems` but this can be populated by getting the value from the api.

So, on the HTML (view of the component) we only have to do is:
```html
<nav>
 <ul class="navigation-list">
  <ng-template #menuItemTemplate let-items>
   <li *ngFor="let item of items">
    <a href="{{item.href}}">{{item.label}}</a>
     <ng-container *ngIf="item.children">
      <ul class="sub-menu">
	  <ng-container *ngTemplateOutlet="menuItemTemplate; 
          context: { $implicit: item.children }">
        </ng-container>
      </ul>
     </ng-container>
    </li>
  </ng-template>
	... more code will go here	
  </ul>
</nav>
```
Above, we have created our custom template using `<ng-template>` that creates a reference `menuItemTemplate`. The `let-items` inside the ng-template tag creates a variable that will be replaced by the `$implicit` value that we define inside the `context` of `ngTemplateOutlet`. Now, whenever a menu item has it's children then it will create the template by passing in the `item.children` array.

But how do we actually use the `menuItems` that we created on the component? We just have to call the template again by simply replacing `... more code will go here` with
`<ng-container *ngTemplateOutlet="menuItemTemplate; context: { $implicit: menuItems }"></ng-container>` by using the actual value of `menuItems`.

And that's it. You will have your nested menu items, no matter how many children the `menuItems` will hold. 

Would love to know more ways that you could create dynamic menus! please drop in on the comments

P.S: the menu is not styled so feel free to use your imagination :p
How to Quickly Set up SonarQube in minutes using Tin
Published: 2022-01-04 10:58:01

Tin is a product of TeamCode that can generate executable applications instantly without manual environment configuration. Users can click to run project directly in the cloud. 

**Login to Tin and clone the SonarQube app**
1. Click the Tin URL of SonarQube.
https://www.teamcode.com/tin/clone?applicationId=270968602867703808
Users who have not logged in should sign up first.
2. Log in to Tin with your email, Github account, or phone number.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vd8129b8d8fc0q3mnk9a.png)

3. (Optional) After logging in, you can change the “Application Name” or “Tag”。
4. Click "Clone" button to clone the Tin app to your workspace.
Note: Tin will give new users a free trial for a certain length of time, which is determined by the instance size. After the free trial time, the Tin app will automatically stop working. You will not be charged for the whole process. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c0y05jnkcsia84o39bux.png)

5. Click "RUN NOW" to initiate the application.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gx9pvf1fkgq114rt1pvc.png)

6. Click the "Endpoint List" button to go to the Endpoint list, with the entry points for all apps displayed. Click the URL of entry point.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lr7ta6n4oxlifuvoiaby.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4x0pm5ivpnd0xbae2r9m.png)

**Now you can log in to SonarQube to use it.**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iz17f130ffftopskd3l8.png)

You can also use the Tin to quickly set up other excellent open source projects, see the guide: https://www.teamcode.com/docs/en-US/tin/create-tin
Customize React AutoComplete Using Templates
Published: 2022-01-04 11:28:28

Learn how to customize the Syncfusion [React AutoComplete](https://www.syncfusion.com/react-ui-components/react-autocomplete) popup list items, header, and footer using templates. 

Download an example from GitHub: https://github.com/SyncfusionExamples... 

Refer to the following template documentation for the Syncfusion React AutoComplete component: https://ej2.syncfusion.com/react/docu... 

Check out this online example of the React AutoComplete template: https://ej2.syncfusion.com/react/demo... 

{% youtube ZAVhnVvM2Dw %}
Overriding JSON serializer in Giraffe
Tags: fsharp, dotnet
Published: 2022-01-04 11:24:00

---
title: Overriding JSON serializer in Giraffe
published: true
description: In some cases, a built-in Giraffe JSON serializer might be insufficient. In this short tip, we show how to override it.
tags: fsharp, dotnet
canonical_url: https://wkalmar.github.io/post/overriding-json-serializer-in-giraffe/
---
I use my side-project [KyivStationWalk](https://github.com/Wkalmar/stationwalk.server) as a set of my opinionated takes on software architecture. [No wonder]((https://wkalmar.github.io/post/querying-last-fm-web-api-with-fsharp/)) I use F# here. One of the types I use in this project to describe my domain is the subway station branch. There are 3 branches in Kyiv named by their traditional colors.
```ocaml
type Branch =
    | Red
    | Blue
    | Green
```
By default [Giraffe](https://github.com/giraffe-fsharp/Giraffe), the framework which I use as a web server, uses Newtonsoft.Json to serialize results to JSON. However, for discriminated union, it generates quite a lot of JSON so I've switched to System.Text.Json which is built into newer versions of .Net Core. In combination with FSharp.SystemTextJson package allows serializing discriminated unions more gracefully. All we need is to decorate `Branch` type with `JsonFSharpConverter(JsonUnionEncoding.BareFieldlessTags)` attribute.

Here's an example of a serialized subway station. Pay attention to how neat looks `branch` property.
```
{
    "id": "5c2e1d0c867a6335386700d9",
    "name": {
        "en": "Svyatoshyn",
        "ua": "Святошин"
    },
    "branch": "Red",
    "location": {
        "lattitude": 50.457903,
        "longitude": 30.390614
    }
}
```
But there is a downside. Since the default serializer is Newtonsoft.Json you have to bake in serialization into your request handlers. (please note that logging and error handling is omitted for brevity)
```ocaml
let getApproved =
    fun next httpContext ->
    task {
        let! routes = DbAdapter.getApprovedRoutes |> Async.StartAsTask
        let domainRoutes = DbMappers.dbRoutesToRoutes routes
        let result = RouteModels.toShortRoutes domainRoutes
        let serialized = JsonSerializer.Serialize(result, Common.serializerOptions)
        return! text serialized next httpContext
    }
```
Luckily enough Giraffe allows overriding serializer in order to use native `json` instead of `text`. In order to achieve this, you have to register the serializer of your choice in ASP.NET Core services registration section
```ocaml
let configureServices (services : IServiceCollection) =
    services.AddGiraffe() |> ignore
    services.AddSingleton<Json.ISerializer>(SystemTextJson.Serializer(Common.serializerOptions)) |> ignore
```
With this done we are now able to ditch serialization logic resulting in a cleaner handler
```ocaml
let getApproved =
    fun next httpContext ->
    task {
        let! routes = DbAdapter.getApprovedRoutes |> Async.StartAsTask
        let domainRoutes = DbMappers.dbRoutesToRoutes routes
        let result = RouteModels.toShortRoutes domainRoutes
        return! json result next httpContext
    }
```
Striver's SDE Sheet Journey - #11 Repeat and Missing Number
Tags: beginners, programming, java, computerscience
Published: 2022-01-04 11:23:32

> **<u>Problem Statement</u> :-**
_You are given a read-only array of N integers with values also in the range [1,N] both inclusive. Each integer appears exactly once except A which appears twice and B which is missing. The task is to find the repeating and missing numbers A and B where A repeats twice and B is missing._

**Input** :  `array[] = {3,1,2,5,3}`

**Result** : `[3,4]`

_Explanation_: A = 3 , B = 4 
Since 3 is appearing twice and 4 is missing

##  <u>Solution 1</u>
_using sorting,we can easily solve this problem._

**step-1** sort the array.

**step-2** traverse the array,while traversing check if `A[i] == A[i+1]` is true, that should be our repeating number.

**step-3** again traverse the array,and check if `A[i] != i+1` is true, that should be our missing number.

**step-4** end.

> Java

```java
public class Solution {
  
    public int[] repeatedNumber(final int[] A) {
      int[] ans = new int[2];
      Arrays.sort(A);

    // look for repeating number
      for(int i=0;i<A.length-1;i++){

        if(A[i] == A[i+1]) ans[0] = A[i];

      }

    // look for missing number
      for(int i=0;i<A.length-1;i++){

        if(A[i] != i+1){
          ans[1] = i+1;
          break;
        }
      }

      return ans;
    }
}

```
**Time Complexity :** **O(n)** + **O(n)**

**Space Complexity :** **O(1)**

##  <u>Solution 2</u>
_since we know the array numbers range is 1 to N, so we can use the array indices for storing the array elements._

**step-1** initialize an array `ans` for storing the missing & repeating numbers.

**step-2** run a loop from `i=0` to `n`, then 
 > **1.** get the absolute ith value from the array.
 `index = A[i]`

 > **2.** marked as visited, multiply by -1.
 `A[index] *= -1`

 > **3.** check, it is already marked negative, then save it in `ans` array & again mark it.
 ` ans[0] = abs(A[i]) `
 ` A[index] *= -1 `

**step-3** again traverse the array and check which number is positive, that is our missing number

**step-4** end.

> Java

```java
public class Solution {

    public int[] repeatedNumber(final int[] A) {
        int[] ans = new int[2];

        for(int i=0; i<A.length;i++){
            int index = Math.abs(A[i]) - 1;
            
          // mark as visited
            A[index] *= -1;

            if(A[index] > 0){
                ans[0] = Math.abs(A[i]);
                A[index] *= -1;
            }
        }

         for(int i=0; i<A.length;i++){

            if(A[i] > 0){
                ans[1] = i+1;
            }
        }

        return ans;
    }
}

```

**Time Complexity :** **O(n)** + **O(n)**

**Space Complexity :** **O(1)**

_thank you for reading this article, if you find any mistakes, let me know in the comment section_
Day 70 of 100 Days of Code & Scrum: Polishing My Company Website
Tags: 100daysofcode, beginners, javascript, productivity
Published: 2022-01-04 11:16:32

Greetings, everyone!

Just like every Tuesday, I had to go out for my physical therapy session, so I couldn't work as much today. However, I still managed to get a decent amount of work done on my [company webpage](https://www.rammina.com) such as adding alternative contact methods in case the message form doesn't work and adding a hover overlay on the portfolio project images that says "View Project."

![Rammina Contact Alternatives](https://cdn.hashnode.com/res/hashnode/image/upload/v1641293734859/AtD9-4GIQ.png)

![Rammina Project Hover Overlay](https://cdn.hashnode.com/res/hashnode/image/upload/v1641294067719/Ggb99q9Gj.png)

Anyway, let's move on to my daily report!

## Yesterday

I passed my Professional Scrum Master I (PSM I) certification exam and got certified. Also, I planned out the work I'll be doing for this week, mostly regarding the business page.

## Today

### Company Website

- I added call-to-action for alternative contact methods, specifically email and phone number, if ever the contact form doesn't work.
- I placed a hover overlay on top of the portfolio project images.

### Scrum

- read some articles about Scrum, particularly about the role expectations in an organization, as well as other people's experiences of being a Developer and Scrum Master at the same time.

Thank you for reading! Have a good day!

![Rammina Thank You Banner](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x9ayfxxxaz2g2hfcqbsk.png)

## Resources/Recommended Readings

- [How do you manage being a Scrum Master and Developer at the same time?](https://www.reddit.com/r/agile/comments/bh9n5r/how_do_you_manage_being_a_scrum_master_and_a_dev/)
- [What can I expect my Scrum Master to do?](https://www.reddit.com/r/agile/comments/rawhza/what_can_i_reasonably_expect_my_scrum_master_to_do/)

## DISCLAIMER

**This is not a guide**, it is just me sharing my experiences and learnings. This post only expresses my thoughts and opinions (based on my limited knowledge) and is in no way a substitute for actual references. If I ever make a mistake or if you disagree, I would appreciate corrections in the comments!
[BTY] Day 9: Don't use Alpine for Python images
Published: 2022-01-04 08:27:42

During my research, I had a chance to read this article: https://pythonspeed.com/articles/alpine-docker-python/. 

When you’re choosing a base image for your Docker image, Alpine Linux is often recommended because you're told that it will make your images smaller and speed up your builds.

But not with Python!

_View the article above for more details._

**TL;DR:**
Standard PyPI wheels don’t work on Alpine. Most Linux distributions use the GNU version (glibc) of the standard C library that is required by pretty much every C program, including Python. But Alpine Linux uses musl, those binary wheels are compiled against glibc, and therefore Alpine disabled Linux wheel support.

Most Python packages these days include binary wheels on PyPI, significantly speeding install time. But if you’re using Alpine Linux you need to compile all the C code in every Python package that you use.

It can cause unexpected runtime bugs or extra research in order to install packages.

Lacking specific constraints, The author would probably choose the official Docker Python image (python:3.9-slim-bullseye) just to ensure the latest bugfixes are always available.
How to create a filter for image 
Tags: webdev, beginners, css, showdev
Published: 2022-01-04 10:56:05

Hello , Today I will explain the filter how it works and how we can use it 

Well the “filter” have many syntax like these 

> filter: blur(5px);
filter: brightness(0.4);
filter: contrast(200%);
filter: drop-shadow(16px 16px 20px blue);
filter: grayscale(50%);
filter: hue-rotate(90deg);
filter: invert(75%);
filter: opacity(25%);
filter: saturate(30%);
filter: sepia(60%);
filter: none;

Are many syntax’s 

I will leave a link with all syntax’s https://developer.mozilla.org/en-US/docs/Web/CSS/filter


How can we use it ? Well, we can use only for css , scss and everything based on css I made a example code `img {
filter:blur(5px);
}`

Just paste your code on image and done!
Portfolio with sensibility-friendly option
Tags: portfolio, beginners, react, css
Published: 2022-01-04 10:53:41

Hi everyone,

I create my first portfolio with a possibility to change the layout to become sensibility-friendly.

What does it mean? 
It is the same content but with less animations, a new structure and different colors.

To do it, I used the same principle that for a dark/light theme, with a "context", and after I worked on the css with 2 different ways (one classic and one more inclusive).

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

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

You can see my it here - [JR Portfolio](https://nextjs-demo-eight-rust.vercel.app/)

Don't hesitate to let me know what you thought of it, it is in work in progress.

Have a nice day. 😘
Listening to Random Available Port in Go
Tags: go, network, beginners
Published: 2022-01-04 11:00:08

---
title: Listening to Random Available Port in Go
published: true
date: 2022-01-04 10:09:11 UTC
tags: golang,network,beginners
canonical_url: https://clavinjune.dev/en/blogs/listening-to-random-available-port-in-go/
---

![Photo by @mbaumi on Unsplash](https://images.unsplash.com/photo-1529078155058-5d716f45d604?q=50&w=1920 "Photo by @mbaumi on Unsplash")

To use a random available port in Golang, you can use `:0`. I believe the port `0` would works for another language as well as I tried in python.

```bash
$ python -m SimpleHTTPServer 0
Serving HTTP on 0.0.0.0 port 43481 ...
```

According to [lifewire](https://www.lifewire.com/port-0-in-tcp-and-udp-818145), port `0` is a `non-ephemeral port` that works as a wildcard that tells the system **to find any available ports particularly in the Unix OS**.

## The Go Code

```go
package main

import (
    "log"
    "net"
    "net/http"
)

func createListener() (l net.Listener, close func()) {
    l, err := net.Listen("tcp", ":0")
    if err != nil {
        panic(err)
    }

    return l, func() {
        _ = l.Close()
    }
}

func main() {
    l, close := createListener()
    defer close()

    http.Handle("/", http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
        // handle like normal
    }))

    log.Println("listening at", l.Addr().(*net.TCPAddr).Port)
    http.Serve(l, nil)
}

```

Execute it:

```bash
$ go run main.go 
2022/01/04 17:40:16 listening at 33845
```

Thank you for reading!
The Wholesome App - Upload your Cute and Wholesome Images
Tags: atlashackathon, mongodb, webdev, cloud
Published: 2022-01-04 10:44:44

### Overview
Image uploader that automatically generate cards of your uploaded Cute and Wholesome Images ❤️.

### Submission Category: 
Choose Your Own Adventure

### Link to Code
[Github Repository](https://github.com/Seek4samurai/The-Wholesome-App)


### Additional Resources / Info

> _Please go through the README file in repository to know how to use._


![Main page of the App](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4v7zrztpjje1jy5fb55q.png)

The Wholesome App. A project that allows you to upload images directly to MongoDB Atlas into your collection, a faster cloud database. To upload your cute and wholesome images.

_Thanks everyone, MongoDB and Dev.to for this._