teleren/devto huggingface dataset:
Expert: Doctor Consult using RxAndroid and MVVM with ML Kit (Product Visual Search API) in Android App
Published: 2022-03-31 12:08:11

**Overview**
In this article, I will create a Doctor Consult Demo App along with the integration of ML Product Visual Search Api. Which provides an easy interface to consult with doctor. Users can scan their prescriptions using Product Visual Search Api.

## 
**HMS Core Map Service Introduction**
ML Kit allows your apps to easily leverage Huawei's long-term proven expertise in machine learning to support diverse artificial intelligence (AI) applications 

`implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.huawei.hms:ml-computer-vision-cloud:2.0.1.300'
implementation 'com.huawei.hms:ml-computer-vision-object-detection-model:2.0.1.300'
`

```
package com.hms.doctorconsultdemo.ml;

import android.content.Context;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AppCompatActivity;

```


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/19nwj5i2g30c0nrekooy.png)
Why Ivy in angular?
Tags: angular, ivy, typescript, programming
Published: 2022-03-31 11:54:03

Ivy is the Angular’s **rendering engine**. By using Ivy we can compile components more independently of each other.

Ivy promises smaller bundle sizes, easy and better debugging, mainly for boost in overall performance. 

Ivy introduced in angular version of 8, but now in angular version 13 it's 100% Ivy and No More Support for View Engine

There are two main concept of Ivy.
1. Tree Shaking
2. Locality

**1. Tree shaking:**

Tree shaking is used to removing unused code during the bundling process. we can do this by using tools like Rollup and Uglify. 

At the time of build process, tree shaking tools use static analysis and eliminate the unused and unreferenced code. 

However, but tree shaking tools also have limitations when the conditional code exists as static analysis depends on references.

**2.Locality:**

The locality is used to compiling each component independently with its own local information that rebuilds faster by compiling partial changes and not the entire project files because of this increase the process of build.


**Conclusion:**

Ivy compiler is a most important feature of the Angular development services.

 Ivy improves the loading performance and development speed of your application development.
100 Days of Code
Tags: html, css, javascript, freestyling
Published: 2022-03-31 11:48:07

---
title: 100 Days of Code
published: true
description: Simple code is nice code
tags: HTML, CSS, JavaScript, freestyling 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/24g7g9q32yoxr0zfo5q8.png
---

Please join me on my journey of writing code for 100 days.

As this is to motivate me or someone out there, I will try my best to write simple code.

These are not tutorials, it just my comeback in writing code and showing off :joy: :joy: :joy: .

> Simplicity is the ultimate sophistication. ― Leonardo da Vinci

All the code will be available on [github](https://github.com/brixmavu/100-Days-of-Code)

## Countdown

1. [Day 1: Login and Registration interface](https://dev.to/brixmavu/day-1-4ij6)
2. [Day 2: Make interface change](https://dev.to/brixmavu/day-2-2621)
3. Day 3: expressjs intro
Parallel promise execution: Beyound Promise.all()
Tags: javascript, typescript, react, node
Published: 2022-03-31 11:42:59

---
title: Parallel promise execution: Beyound Promise.all()

published: true
description: 
tags: [javascript, typescript, react, nodejs]
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b2o4rc4vdy9nl4upirov.png

---

In this post, I will talk about running promises in parallel and optimizing for the lowest waiting time possible.

When you have a bunch of promises that need to execute sequentially, you
just run them in a sequence usein `.then()` or `awaits`:

```javascript
getUser()
    .then((user) => getPosts(user.id))
    .then((posts) => use(posts));

// Or

let user = await getUser();
let posts = await getPosts(user.id);
use(posts);
```

But when they don't depend on each other like the `posts` that need the user `id`,
you can run them in parallel using `Promise.all()`.

```javascript
let [value1, value2, valueN] = await Promise.all([promise1, promise2, promiseN]);
```

Which accepts an array of an arbitrary number of promises and returns a promise with all the valuse
once each of them is resolved.

If one of them fails, the whole things `rejects` with the first error that occured.

One possible solution to prevent the whole thing from failing would be to chain the `promiseN` in
the array with a `.catch()` which will make it always resolve no matter. The problem that arrises
is how to detect if the `valueN` we get on the other side is from its resolution or rejection.

A possible solution would be to always return a tuple or an object from these promises.

Example:

```javascript
const wrap = (promise) => promise.then((value) => ({ error: null, value })).catch((error) => ({ error }));
```

With this utility in hand, we can inspect the `valueN` on the other side to see if it was a success or not,
and there's still room for sophisticaiton to return more metadata for retrying purposes.

```javascript
const wrappedPromises = [promise1, promise2, promiseN].map((promise) => wrap(promise));
let values = await Promise.all(wrappedPromises);
```

What about when the array of promises is huge (by whatever definition makes sense for your application),
maybe you're running some resource intensive processes and don't want to exceed 10 at a time?

The answer is chunking, you could use something like `lodash.chunk` or roll your own.

```javascript
let chunks = _.chunk(arrayOfPromises, 10);

for (let chunk of chunks) {
    let chunkValues = await Promise.all(chunk.map(wrap));
    use(chunkValues);
}
```

This was part of a recent optimization job I did for a client, I hope you found it as helpful as I did.

If you enjoyed this post, don't forget like and follow for more.

:wq
Build a Messenger Clone with MERN Stack (MongoDB, Express, React, Node JS) + Socket.io (Day 9)
Tags: javascript, react, webdev, tutorial
Published: 2022-03-31 11:38:08

In this Facebook Messenger   Clone  Tutorial series, we will learn to build an Awesome Full Stack  Facebook Messenger Project with realtime messaging functionality with socket.io . We have one on one chat as well as group chatting functionality in this app.

In this video, we will Getting Started with React


{% youtube oFpcPlLR0Vo %}
DeGoogle
Tags: google, software, opensource, productivity
Published: 2022-03-31 11:31:27

Here's a very short post with credible alternatives and useful resources.

## Practical examples

* Google Search : Qwant, Startpage
* Google Chrome : Vivaldi, Tor
* Google Store : F-droid
* Google Drive : NextCloud
* Google Tasks : Trello, Kanban board
* Google Maps : Herewego
* Google Meets : Whereby, Jitsi
* Google Fonts : Font Squirrel, Dafont
* Google Smart Lock : 1P, Dashlane, LastPass, Freepass, Bitwarden
* Google Analytics : Matomo
* Youtube : New Pipe, Peertube
* Google Photos : Piwigo
* Google Translate : Linguee
* Android OS : LineageOS, PureOS/Librem, GrapheneOS

## Useful links

* [switching.software](https://switching.software)
* [Cutting Google out of your life](https://degoogle.jmoore.dev)
Create a Mock Server on Postman Without Host your Backend
Published: 2022-03-31 11:27:20

Skip this part if you want to directly know about "How to make Mock Server in Postman".
> Postman is a regular use in developer life & as we moving toward we need fast and quick solutions, After update postman here is a useful cool feature they give. You can create a Mock server of your backend API's with dummy response which can be useful for frontend developer to integrate API's and set the frontend according to dummy response while your backend is under development. by this Frontend & Backend can easily work in parallel. Here are step which required to create Mock Server in Postman.


#### Steps
* Open the Postman & go to your collections, if no collection is available you need to create one, then go to this 3 dots & select Mock collection.
![Step 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mm9ew7v3kvqx23u2wp6m.png)
* Then fill the field and create a mock server for specific collection.
![Step 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kfmd5be426m2pvtnuppn.png)
* Go to the mock server option on left sidebar and copy the URL of your Mock Server.
![Step 3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3gyswdaf68emgwpys3yk.png)
* Go to the API and replace your localhost path with Mock Server base URL which you copy earlier, Then go to 3 dots of that particular API and select "Add Example".
![Step 4](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1sdbsk01sxbeh21c8fol.png)
* Now add the response format with dummy data you want to give to frontend, also with status code. add multiple examples for same request with different params if you want to.
![Step 5](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0gkiioju1skyn2tt5wzg.png)
Important: You we now no need to host your Backend on any hosting tool while your backend is under development. hope it give you some knowledge.

#### You can get video tutorial at my YouTube channel 
[How to create a Mock Server in Postman](https://youtu.be/ReA4h5i36eI)
use env variables
Published: 2022-03-31 11:19:14

<img src="https://raw.githubusercontent.com/aru31/test-blog-publish/master/media/google.png" alt="another tag" />entirely since you will need to delete files/folders from your system. But it is generally a good idea to move the files/folders you want to delete to a recycle bin and then delete them after some time. I will also share the script and modification I used to adopt this setup.
<img src="https://raw.githubusercontent.com/aru31/test-blog-publish/master/media/subfolder/download.png" alt="another tag" />entirely since you will need to delete files/folders from your system. But it is generally a good idea to move the files/folders you want to delete to a recycle bin and then delete them after some time. I will also share the script and modification I used to adopt this setup.
subfolders in blogs and in images
Published: 2022-03-31 11:08:04

<img src="https://raw.githubusercontent.com/aru31/test-blog-publish/master/media/google.png" alt="another tag" />entirely since you will need to delete files/folders from your system. But it is generally a good idea to move the files/folders you want to delete to a recycle bin and then delete them after some time. I will also share the script and modification I used to adopt this setup.
<img src="https://raw.githubusercontent.com/aru31/test-blog-publish/master/media/subfolder/download.png" alt="another tag" />entirely since you will need to delete files/folders from your system. But it is generally a good idea to move the files/folders you want to delete to a recycle bin and then delete them after some time. I will also share the script and modification I used to adopt this setup.
Intermediate & Advanced Python Projects
Tags: python, programming, computerscience
Published: 2022-03-31 11:04:48

## Table of Contents
1. [Intermediate Level Projects](#intermediate-projects)
2. [Advance Level Projects](#advance-projects)
3. [Helpful resources](#helpful-resources)

Before starting to build your projects, remember to choose the platform necessary so that people who lack certain technical skills are able to utilize it. The web, desktop, and command-line are three major platforms you'll want to consider building for.

### Intermediate Projects
1. [Random Password Generator](https://medium.com/analytics-vidhya/create-a-random-password-generator-using-python-2fea485e9da9)
2. [Message Encoder and Decoder](https://data-flair.training/blogs/python-message-encode-decode/)
3. [Instagram bot](https://realpython.com/instagram-bot-python-instapy/)
4. [Extract Text from Image](https://hinty.io/vserhiyev/how-to-extract-text-from-image-in-python/)
5. [URL Shortener](https://www.thepythoncode.com/article/make-url-shortener-in-python)
6. [Tetris Game](https://levelup.gitconnected.com/writing-tetris-in-python-2a16bddb5318)
7. [Automate personal habits](https://www.monterail.com/blog/python-task-automation-examples)
8. [Directory Tree Generator](https://realpython.com/directory-tree-generator-python/)
9. [Automat LinkedIn Connection](https://www.geeksforgeeks.org/automate-linkedin-connections-using-python/)
10. [QR Code Generator](https://thecleverprogrammer.com/2021/01/09/qr-codes-with-python/)

### Advance Projects
1. [Chatbot](https://www.analyticsvidhya.com/blog/2021/07/build-a-simple-chatbot-using-python-and-nltk/)
2. [Speed Typing Test](https://data-flair.training/blogs/python-typing-test/)
3. [Plagiarism checker](https://betterprogramming.pub/build-your-own-plagiarism-checker-with-python-and-machine-learning-7e81877fd970)
4. [Create an interactive map](https://plotly.com/python/maps/)
5. [Web Crawler](https://scrapy.org/)
6. [Spell Corrector GUI](https://www.geeksforgeeks.org/python-spell-corrector-gui-using-tkinter/)
7. [Weather app](https://www.geeksforgeeks.org/weather-app-using-django-python/)
8. [Voice assistant](https://www.geeksforgeeks.org/voice-assistant-using-python/)
9. [Extract text from videos](https://thecleverprogrammer.com/2020/12/25/extract-text-from-videos-using-python/)
10. [Create an audiobook](https://thecleverprogrammer.com/2020/10/22/create-an-audiobook-with-python/)

### Helpful Resources
- [Learn Python the Hard Way](https://www.amazon.com/Learn-Python-Hard-Way-Introduction/dp/0321884914)
- [A Byte of Python](https://python.swaroopch.com/)
- [Python for Everybody](https://www.py4e.com/lessons)
- [The Python Guru](https://thepythonguru.com/)
- [RealPython](https://realpython.com/start-here/)
- [PythonSpot](https://pythonspot.com/)
- [After Hours Programming](https://www.afterhoursprogramming.com/tutorial/)
- [HackingLoops](https://www.hackingloops.com/)
- [Clean Architectures in Python](https://www.thedigitalcatbooks.com/pycabook-introduction/)

### Conclusion
What are your favorite projects in Python? Will you try any new ones in the future? I would love to hear from you in the comments below.

Happy coding!
Say HELLO to Nodejs and Expressjs
Tags: webdev, beginners, javascript, node
Published: 2022-03-31 10:58:53

HEY Everyone! 
Getting more patriotic today :P

This is my first project tutorial, where we will be dipping toes into the water of Nodejs and Expressjs

So lets begin this awesome work, hope you are as thrilled as I am.

Prerequisites - 

- I am using VS Code as my IDE, hope you use atom or VS code
- You should know basics of Javascript
- You should know what are the extensions of JS and html files 
- You should be familiar with command line or git commands (Okay, its optional) 



## So what is this nodejs?

Nodejs is a JS framework.
It is used to work on backend with JS 
It is superfast and allows to create scalable web applications.
Netflix, Twitter, Uber etc use Nodejs in backend

Oh come on!! Lets not drill into its theory, lets see what we can do with Nodejs

# Step 1 - Working with Nodejs (Everything in command line, I am using git bash)

- Download nodeJS and install it

- Check NodeJS version

`node --version`

-  pwd - to know path of current directory

`pwd`

- Make new directory

`mkdir Nodedemo`

- Go into this directory

`cd Nodedemo`

- Create files from command line (Not related to this project)

`touch index.js`

- Just NODE things

When we install node we also install REPL

Type '`node`' in command line and hit enter

Now write your code here, an arrow appears in the next line
Write your JS code here

To exit, type '`.exit`'

## Lets start making , create a file 'server.js'

- In the command line type 

```
npm install express
```

- On the top of server.js, write

```
//jshint esversion6
```
- Below it, type

```
const express = require("express");
```

A const variable named express now requires "express", variable name need not to be express always

- Type

```
const app = express();
```
This function represents the express module

- Now choose a port here, from where it listens request

```
app.listen(3000);
```

3000 is my choice, you can use 5000, 8000 any number you want

- In command line type
```
node server.js
```

and make sure you are in the same folder where this server.js exists, in the command line

Press Ctrl+C to exit the server in command line

- Now as you cant see anything in cmd, make listen function to listen requests your server gets

Type this

```
app.listen(3000,function(){
console.log("Server started at post 3000");
});

```

Now check in browser, type 


`localhost:3000` in URL box and press ENTER

- You will se 'CANNOT GET/' in the browser

- Its time to handle request and response now
Your server is listening on port 3000 but can not get any requests and cant respond

- Add app.get method

```
app.get("/",function(request,response){
response.send("hello world");

});
```

Now the server works
Remember everytime you add something new, refresh the server

Now you will see "hello world" in the browser

Thanks for reading
Tools for Your Mobile App Development in 2022
Tags: flutter, xamarin, react, ionic
Published: 2022-03-31 10:19:02

As a new business owner, you frequently find yourself in situations where you must demonstrate your worth. Either to keep ahead of the curve or to win over customers by delivering on time. Such circumstances need use of off-the-shelf solutions that can save a significant amount of time, effort, and money. This is where mobile application development tools can come to your rescue.

Today's market is flooded with a surprising number of cross-platform mobile app development tools, making it tough to choose the best option. 

Regardless, a small bit of study might help development process in a big way. In this article, we'll provide a fully prepared list of most popular mobile application development tools, as well as an overview of mobile app development can be easier. Let's explore the 7 Popular **[Tools for Mobile App Development in 2022](https://www.clariontech.com/blog/7-most-popular-tools-for-your-mobile-app-development-in-2018)**
[Vue 2 Snippets] Add title attribute only if needed
Tags: javascript, vue, todayilearned
Published: 2022-03-31 09:50:06

Today we'll create a directive which adds a title attribute if the text is truncated. like so:

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

We write a basic directive:
```js
function inserted(el) {
  function setTitleIfNecessary() {
// this is the magic function which checks if Ellipsis is Active
    if (isEllipsisActive(this)) { 
      this.setAttribute('title', this.innerText);
    }
  }

  el.addEventListener('mouseenter', setTitleIfNecessary, false);
  el.__title = setTitleIfNecessary;
}

// function unbind(el: HTMLElement) {
function unbind(el) {
  if (!el.__title) {
    return;
  }

  window.removeEventListener('mouseenter', el.__title);
  delete el.__title;
}

export const Title = {
  inserted,
  unbind,
};

export default Title;
```

And here is the `isEllipsisActive` function:
```js
function isEllipsisActive(e) {
  const c = e.cloneNode(true);
  c.style.display = 'inline-block';
  c.style.width = 'auto';
  c.style.visibility = 'hidden';
  document.body.appendChild(c);
  const truncated = c.clientWidth >= e.clientWidth;
  c.remove();
  return truncated;
}
```

Now this is not 100% foolproof. But for me it does the job!
Advantages Of Python
Tags: python, programming, webdev, github
Published: 2022-03-31 09:46:01

Python is a high-level, interpreted, general-purpose dynamic programming language with a strong emphasis on code readability. When compared to Java and C, it has fewer steps. Guido Van Rossum, a developer, started it in 1991. Python is one of the most widely used and fastest-growing programming languages on the planet. Python is a strong, flexible, and user-friendly programming language.  In this blog , we will talk about the [advantages Of Python](https://www.calltutors.com/blog/advantages-of-python/).
Furthermore, the local community is quite active. It's widely used since it supports a variety of programming paradigms. It also handles memory management on its own.
 

## Advantages : 

Presence of third-party modules 
Extensive support libraries(NumPy for numerical calculations, Pandas for data analytics etc) 
Open source and community development 
Versatile, Easy to read, learn and write
User-friendly data structures 
High-level language 
Dynamically typed language(No need to mention data type based on the value assigned, it takes data type) 
Object-oriented language 
Portable and Interactive
Ideal for prototypes – provide more functionality with less coding
Highly Efficient(Python’s clean object-oriented design provides enhanced process control, and the language is equipped with excellent text processing and integration capabilities, as well as its own unit testing framework, which makes it more efficient.)
(IoT)Internet of Things Opportunities
Interpreted Language
Portable across Operating systems 

## Applications : 

GUI based desktop applications
Graphic design, image processing applications, Games, and Scientific/ computational Applications
Web frameworks and applications 
 Enterprise and Business applications 
 Operating Systems 
Education
Database Access
Language Development 
 Prototyping 
Software Development
 

## Organizations using Python : 

Google(Components of Google spider and Search Engine) 
Yahoo(Maps) 
YouTube 
Mozilla 
Dropbox 
Microsoft 
Cisco 
Spotify 
Quora 

## Conclusion (Advantages Of Python)

To sum up, the Python advantages and disadvantages, while there are some speed, security, and runtime difficulties, Python is an excellent language to learn.

Its appeal is self-evident. The fact that it is free, simple, interpreted, object-oriented, extensible, embeddable, portable, and readable contributes to its appeal. and also if you need [python programming help](https://www.calltutors.com/Articles/python-programming-help), then contact our professional experts.
Any performant solution to link to a thumbnail instead of an image
Tags: help, webdev
Published: 2022-03-31 09:19:46

Hello friends,

I'm happy to be back and I hope you are doing well!


I have a question today. Is there in the web of today, a technology, library, API, standard or any solution to be able to have a thumbnail from an image living publicly on the internet on the fly ?


The reason is obvious, caring about UX so that in users browsers they have a thumbnail instead of the big picture (on the fly hopeful).

I think of a serverless function on AWS or other provider, to do the compression and resize on the fly ? what do you think ? any other 
easier solution ?

Take care!
Meteor Impact 2022 dates announced!
Tags: meteor, javascript, events
Published: 2022-03-31 09:19:44

It is my pleasure to announce Meteor Impact 2022 dates. This year, the conference will be one week earlier from previous years (reasons for that and the delay in the announcement of the dates are subject to another announcement that I will be making, most likely in May).

So save the dates for Meteor Impact 2022:

# October 13th and 14th

And watch out for more announcements!

--------
If you like my work, please support me on [GitHub Sponsors ❤️](https://github.com/sponsors/StorytellerCZ).