teleren/devto huggingface dataset:
Using MongoDB with Docker
Tags: mongodb, docker
Published: 2021-07-13 01:40:56

---
title: Using MongoDB with Docker
published: true
description: how to use MongoDB with Docker
tags: 
- mongodb
- docker
canonical_url: https://luturol.github.io/docker/mongodb/Using-MongoDB-with-Docker
//cover_image: https://direct_url_to_image.jpg
---

## Using MongoDB with Docker

What you need to have installed:

 - Docker

> With you want to learn more about Docker, you can check my blog post about it by [clicking here](https://luturol.github.io/docker/Docker-101)

## Downloading [MongoDB Image](https://hub.docker.com/_/mongo)

```docker
docker image pull mongo
```

## Run a container

```docker
docker run -e MONGO_INITDB_ROOT_USERNAME=root -e MONGO_INITDB_ROOT_PASSWORD=root -p 27017:27017 mongo
```

**Change password and username for a suitable for you**

### What this command does

It will initialize your container and show you the logs while is initializing, so you can track if some errors appear in the console log.

**-e** will add **MONGO_INITDB_ROOT_USERNAME** environment variable with the value **root**. With that, your username to connect will be root.

**-e** will add **MONGO_INITDB_ROOT_PASSWORD** environment variable with the value **root**. With that, your password to connect will be root.

**-p** will share your local port with the port of the container. 27017 is the port that mongodb use.

## Executing the same mongodb container after ended

1. You need to get the container ID from your mongodb container.

    ```docker
    docker container ps -a
    ```

1. With the container Id, now you can enter using the following command:

    ```docker
    docker start containerId
    ```
    
    It will enter inside the container with a bash terminal executing.

## Testing your connection
1. Testing your connection

    You must have some program to connect with MongoDB. You can use or [Mongo Compass](https://www.mongodb.com/pt-br/products/compass) or [Robot3](https://robomongo.org/) or the one you prefer.

    To connect you will need a connection string.

    ```
    mongodb://root:root@localhost:27017/admin
    ```

    This is the connection string to connect inside mongodb of our container.

## What does that connection string means:

1. First **root** is the username (if you changed, you must change in the connection string as well)

1. Second **root** is our password (if you changed, you must change in the connection string as well)

1. After @ is the IP you are trying to connect and the database that holds your user.

## References

- [MongoDB docker image](https://hub.docker.com/_/mongo)
- [MongoDb Docker do Balta.io](https://balta.io/blog/mongodb-docker)
- [Connection String URI Format from MongoDB Documentation](https://docs.mongodb.com/manual/reference/connection-string/)
Root Checker For Android (Issue/Bug)
Tags: android, application, app
Published: 2021-07-22 06:53:54

I create a application called root checker. Everything is good but after publishing app on play store i'm getting lot's of error. 
App is working fine but at the console dashboard notification appears that you app have error but you don't need to do right now.
What should be the next step?
Here the screenshot of error.
How to solve the issue so the notification will remove from my dashboard.
How to create an AWS Lambda layer
Tags: aws, lambda, serverless
Published: 2021-07-26 08:35:47

---
title: How to create an AWS Lambda layer
published: true
date: 2021-07-22 06:47:00 UTC
tags: aws,lambda,serverless
canonical_url: https://vuyisile.com/how-to-create-an-aws-lambda-layer/
---

AWS Lambda is a serverless compute service that lets you run code without provisioning or managing servers. Using Lambda, you can create code that will only be run in response to an event. AWS supports lambda functions in many languages including Python.

Writing a Python Lambda function is pretty straight forward if your code does not have any external dependencies such as third party libraries. In this post, I’ll show you how to add third party libraries to Lambda using Lambda layers. According to the AWS docs, a layer is ” a .zip file archive that can contain additional code or data. A layer can contain libraries, a [custom runtime](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html), data, or configuration files”.

So, if you wanted to create a Python Lambda function that depends on Flask or requests for instance, one way to deploy it would be to create a Lambda layer, install Flask and requests in it and upload that to AWS. Let’s do it:

## Prepare the layer

Create a folder for your project on your local computer:

```

$ mkdir aws_lambda_layer
$ cd aws_lambda_layer

```

Next, create the folder structure for the modules you will install:

```

$ mkdir -p flask_layer/python/lib/python3.8/site-packages

```

Once the folders are created, create a virtual environment and install the packages you need:

```

$ python3 -m venv .venv

$ source .venv/bin/activate

(.venv) $ pip install flask --target flask_layer/python/lib/python3.8/site-packages

```

Next, change directories into the `flask_layer` directory and create a zip file containing the contents of that folder:

```

$ zip -r9 flask_layer.zip .

```

## Using your layer

Once you have created the layer, you need to upload it. If it is large, upload it to an S3 bucket, if it isn’t, you can upload it directly to the AWS Lambda interface in the AWS console. Navigate to **Lambda** > **Layers** and create a layer. Give it a reasonable name and upload. If you uploaded the layer to S3, point to it here.

Once you have uploaded the layer, you can provision a new lambda function and make it use the new layer you just created.

Thanks for reading.
Twitter API
Tags: twitter, api, python, java
Published: 2021-07-22 06:42:31

Twitter Provides API for developers to use these API to create applications, send message in twitter, post content, post tweets etc. Twitter lets gives a monthly cap of 5,00,000 tweets to pull using the API.

## Libraries
1. Tweet library (python) [Docs](https://pypi.org/project/twitter/)
2. twitter4j jar (java) [Docs] (https://mvnrepository.com/artifact/org.twitter4j/twitter4j-core/4.0.7)

## Steps
1. Download tweet library (pip install tweet)
2. Create a Twitter Developer account [Create Account](https://developer.twitter.com/en/portal/dashboard)
3. Go to projects and Apps in your developer account [Projects and Apps](https://developer.twitter.com/en/portal/projects-and-apps)
4. Create an App and obtain consumer key, consumer secret, access token, access token secret
5. Find the keys and access token in your twitter apps tab under keys and tokens

## Python

{% gist https://gist.github.com/v-senthil/6cc05120dd374d8180a6be37e204e805 %}

## Java
{% gist https://gist.github.com/v-senthil/057ec2fb7050b94bbb8bca4bf22bfaaf %}
What are your thoughts on Stackbit?
Tags: discuss, jamstack, webdev, stackbit
Published: 2021-07-22 06:32:47

I just tried Stackbit and to be honest it was one of the most amazing website builder I've tried, 

Had I known about this before, I would not ever created an WordPress account.

Have you ever worked on Stackbit and what are your thoughts on WordPress vs Stackbit?

Share in the comment below.
Thank You.
Try Chatwoot, an open-source customer engagement suite to set up multilingual live chat support.
Tags: programming, productivity, chatbot, tooling
Published: 2021-07-22 06:24:44

Customer engagement and relationship building are the primary pillars to grow your business and sustain. A great product may not just be enough if customer engagement is lacking. We need a better way to talk to our customers, build a relationship, make it easier for them to reach us anytime from anywhere.

Let me introduce [Chatwoot](https://www.chatwoot.com/), an open-source platform to take care of all your customer engagement and relationship goals, all from one place. `Chatwoot` helps manage conversations, giving your customers real-time support and the ability to communicate in 25+ languages.

# Chatwoot and its features

To get started with chatwoot, you can [create an account](https://app.chatwoot.com/app/auth/signup) to get started within a minute. Alternatively, you can also host your version of chatwoot from the [source code](https://github.com/chatwoot/chatwoot). First, let us create an account and get to know the excellent features.

Browse to [https://www.chatwoot.com/](https://www.chatwoot.com/) and create an account by providing your details like name, email id, account name, and password. Once you verify your email id, you will get full access to the new chatwoot account. Please log in using the credentials to access the chatwoot dashboard. The dashboard is the single place to manage interactions for multiple customers related to one or more products/services/websites using several agents.

![a.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1626928487473/9Hb4CMjzx.png?border=1,CCCCCC&auto=compress)

You can do the follwings with Chatwoot,

- Set up your customer support team
- Connect Inbox - Your customer service channel
- Adding the Chatwoot support to your website
- Prserve Chat history
- CSAT Survey
- Add Contextual Labels
- Add Canned Response
- Generate Reports
- Integrate other Applications like DialogFlow, Slack, and many more.
- Multilingual Chat Support

Please visit this article on the [aviyel.com](https://aviyel.com) to know about these features in detail,

> [https://aviyel.com/post/399/try-chatwoot-an-open-source-customer-engagement-suite-to-set-up-multilingual-live-chat-support](https://aviyel.com/post/399/try-chatwoot-an-open-source-customer-engagement-suite-to-set-up-multilingual-live-chat-support)

For everything Open Source, follow [@aviyelHQ](https://twitter.com/AviyelHq) or sign up for early access if you are a project maintainer, contributor, or just an Open Source enthusiast.
HTML tags | article
Tags: html, tags, article
Published: 2021-07-22 06:03:22

It is used to **define an independent and self-contained element** within a document. In other words, it should make sense on its own and can be distributed or reused independently of the rest of the site.

Examples of `<article>` can be a news item from a newspaper, a blog post, a forum post, a product card, a comment sent by a user, an interactive widget...

Typically, although not required, it usually has a header (`<h1>`-`<h6>`) that identifies each `<article>` in the document.

**They can be nested**, such as each comment on a blog post would be an `<article>` related to a superior `<article>`, which would be the post.

To indicate the author of an `<article>` you can use `<address>` (although the `<article>` nested inside it would not inherit it) and to indicate the publication date we would use the `<time>` with its `datetime` attribute.

Has an **implicit ARIA role** `article`.

- Type: *block*
- Self-closing: *No*
- Semantic value: *Yes*

[Definition and example](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article) | [Support](https://caniuse.com/mdn-html_elements_article)
React Code-Splitting
Tags: react, performance, webdev, frontend
Published: 2021-07-22 05:47:02

[Code-Splitting – React](https://reactjs.org/docs/code-splitting.html#gatsby-focus-wrapper)

Bundling

- the process of following imported files and merging them into a single file
⇒ This bundle can be included on the webpage to load an entire app at once
- Create React App, Next.js, Gatsby, or a similar tool having a bundle tool setup already

Code Splitting

- App grows, bundle grows too ⇒ "splitting" bundle
- Code splitting is a feature supported by a bundler which create multiple bundles that can be loaded dynamically at runtime
- "lazy-load": just things needed currently
- Good for performance: reduce the amount of code needed during the initial load

`import()`

- When Webpack comes across this syntax, it automatically code-split your app if you are suing Create React App, also Next.js

`React.lazy`

- lets you render a dynamic import as a regular component
- Load the bundle when the lazy component is first rendered
- The lazy component should be rendered in a `Suspense` component
⇒ fallback content while loading lazy component

Error boundaries

- use it anywhere above your lazy components

Route-based code splitting

- A good place to start is with routes
A Proto Uber Eats
Tags: objectivec, ios
Published: 2021-07-21 23:08:57

---
title: A Proto Uber Eats
published: true
description: A food delivery app prototype made in 2013/2014
tags: objectivec, ios
//cover_image: https://direct_url_to_image.jpg
---

{% github ninjascl/zilogcafe %}
React source code visible 😲
Tags: react, showdev, discuss, javascript
Published: 2021-07-22 05:35:07

Do you know that when you deploy your React application which is created using 𝗰𝗿𝗲𝗮𝘁𝗲-𝗿𝗲𝗮𝗰𝘁-𝗮𝗽𝗽 or your own webpack configuration to a live website like Netlify, Vercel, Heroku etc, your entire source code is visible to everyone from the sources tab of the developer toolbar as shown in the screenshot of this post.

![React source code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n3xhm6q97ld17hmc72zg.jpg)

This is not an issue with the 𝗰𝗿𝗲𝗮𝘁𝗲-𝗿𝗲𝗮𝗰𝘁-𝗮𝗽𝗽 but all of the source code is added because of the source map

😲😲😲

But you definitely don't want everyone to see your entire source code If it's a private repository or you're working on a client project.

There is an easy way to fix it.

Create a file with the name .env in your project folder with the below code inside it

<code>GENERATE_SOURCEMAP=false</code>

so when you run 𝗻𝗽𝗺 𝗿𝘂𝗻 𝗯𝘂𝗶𝗹𝗱 or 𝘆𝗮𝗿𝗻 𝗿𝘂𝗻 𝗯𝘂𝗶𝗹𝗱 command from the terminal,


It will generate a 𝗯𝘂𝗶𝗹𝗱 folder with minified files without a source map that you can deploy to the production.

Connect with me for more tech related information [Twitter](https://twitter.com/Dhanush_Nehru)
HTML TUTORIAL FOR BEGINNERS PART 1
Tags: html, 100daysofcode, webdev
Published: 2021-07-22 05:26:46

HTML is a markup language that uses a special syntax or notation to describe the structure of a web page to the browser. HTML elements usually have opening and closing tags that surround and give meaning to content but some HTML elements don't have closings tags like 
```
<img src='image path'/>
```
This is opening tag
```
<>
```
This is closing tag
```
</>
```
And self-closing tag is
```
</>
```
HTML is the building block of a website like skeleton in our body and brick or stone in a house.
Someone says that HTML is a programming language but it's a misconception.
The meaning of programming language is to add logic into your program or software how it to work.
HTML has 6 types of heading elements from h1 to h6.
The web browser displays h1 as the biggest heading and h6 as the smallest heading.
Every HTML has special meaning as I described above.
#Examples
```
<h1>hello world heading 1</h1>
<h2>hello world heading 2</h2>
<h3>hello world heading 3</h3>
<h4>hello world heading 4</h4>
<h5>hello world heading 5</h5>
<h6>hello world heading 6</h6>
```
HTML has paragraph element as well looks like this one
```
<p>hello paragraph</p>
```
Beside these elements HTML many more elements but not useful like these ones:
```
<b></b>
<pre></pre>
<code></code>
<abbr></abbr>
...
```
Some of the screenshots I've taken from #freecodecamp website wanna to include here.
Top 4 Best Commercial Web Scraping Tools

Published: 2021-07-22 05:23:49

Diffbot uses AI to scrape data from the annoying websites where you can set up and crawl multiple websites without having to create a new crawler for each.

They also offer a ready database of the web that you can query instantly, so you don't have to wait for crawling to finish.

They also offer a commercial-grade crawler service for simply crawling 1000s of websites

https://youtu.be/ecSXOnyB7GU
Top 8 Ways Web Servers Can Tell Your Web Crawler Apart From Human
Published: 2021-07-22 05:23:14

Mostly CAPTCHAs are made to appear after the webserver has some way of counting down the number of times a particular user has accessed the service.

In our own experience with hundreds of clients at Proxies API, we have found this to be true if you impersonate multiple humans in other areas than in solving CAPTCHAs.

https://youtu.be/OjyhfWSWFG4
Check these websites if you are a web-developer.....
Tags: webdev, html, css, javascript
Published: 2021-07-22 05:21:49

 W3 Schools - 

Bible for web development, The website has tutorials for these programming languages and they are written in an easy-to-understand language. The website also provides a testing environment where you can test some of the codes that you have written and see if they run. 


 Studytonight - 

Studytonight is an online learning centre that teaches various technical subjects and programming languages.

 StackOverflow - 

StackOverflow is the biggest community of developers. The website brings together millions of programmers who come together to share different issues while at the same time teach each other. The website has all the answers to any programming issue that you have encountered.

 YouTube - 

We all know YouTube as a giant video platform that houses all types of video content. As a computer science student, you can use YouTube as your learning tool.

 Tutorialspoint - 

Tutorialspoint is an online tutorial website for aspiring computer programmers. The website provides comprehensive tutorials on various programming languages.
8 CSS Units to make site Responsive
Published: 2021-07-22 05:03:30

Today, We live in the world of gadgets. With so many gadgets there are so many screens that too of different sizes from 4" to 13" or larger. You can find a screen of almost any size.

So to provide the contents to the consumer using any type of screen is the responsibility of a developer. This is possible only by using the proper **Relative Size Units**. And therefore here we will learn about those ***8 Units***.

### 1. em

It is relative to the *font-size* of the parent.2em means 2 times the size of the current font.

![Screenshot (702).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1626696845582/FBQr8lPXW.png)

### 2. ch
It is relative to the *width of the "0"* (Zero).

![Screenshot (703).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1626696855383/WhzAbw4L5.png)

### 3. rem
It is relative to the font *size of the root element.*

![Screenshot (704).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1626696865811/pWruwo0fD.png)

### 4. vw
It is relative to 1% of the *width of the viewport.*

![Screenshot (705).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1626696876904/60mZg112g.png)

### 5. vh
It is relative to 1% of the *height of the viewport.*

![Screenshot (706).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1626696890452/fgQ9ZcqX1.png)

### 6. vmin
It is relative to 1% of the *viewport's smaller dimension.*

![Screenshot (708).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1626696903081/bO4T3iLwB.png)

### 7. vmax
It is relative to 1% of *viewport's larger dimension.*

![Screenshot (709).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1626696910947/qEACnX3q5.png)

### 8. %
It is relative to the parent element.

![Screenshot (710).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1626696919118/ADplRZ2XTz.png)

### Tip: 
- The em and rem units are practical in creating a perfectly scalable layout!
- Viewport = the browser window size. If the viewport is 50cm wide, 1vw = 0.5cm.

That's all for this blog. If you learned from this blog Do Like it and SHARE it with your friends.

We will meet in the Next Blog Until then **Keep Learning, Keep Growing**.

Reference:  [W3Schools](https://www.w3schools.com/)

<h2>Connect with me 👇 </h2>

Twitter|LinkedIn|Gmail|DEV
-------|---------|------|--------
 <a href="https://twitter.com/Vanshsh2701" target="_blank"><img src="https://img.icons8.com/clouds/60/000000/twitter.png"/></a>|<a href="https://www.linkedin.com/in/vanshsharma27/" target="_blank"><img src="https://img.icons8.com/bubbles/60/000000/linkedin.png"/></a>|<a href="mailto:vanshsharma9354@gmail.com" target="_blank"><img src="https://img.icons8.com/clouds/60/000000/gmail.png"/></a>|<a href ="https://dev.to/vanshsh" target="_blank"><img src="https://img.icons8.com/office/50/000000/blog.png"/></a>
Grouping Multiple Resources in Blazor Scheduler
Tags: blazor, webdev, csharp, dotnet
Published: 2021-07-22 04:51:52

Get a quick overview of grouping multiple resources in [Blazor Scheduler](https://www.syncfusion.com/blazor-components/blazor-scheduler "Blazor Scheduler"). 
To find out how to add a basic Blazor Scheduler to your Blazor application, watch these videos: 

Add a Blazor Scheduler to the Blazor Server App Using VS Code
https://bit.ly/3uPalCi

Bind Appointment Data to the Blazor Scheduler [Getting Started - Part 2]
https://bit.ly/3yRGXxv
 
In this video, you will learn how to group multiple resources and to define the group data source, and map it with appointments. You will also learn how to group resources under dates and group the resources hierarchically in the Blazor [Scheduler](https://www.syncfusion.com/blazor-components/blazor-scheduler "Scheduler").

Explore our tutorial videos: https://bit.ly/2UNQg25

Download example from GitHub link: https://bit.ly/2U2P9eZ

{% youtube XD3IYl9lkms %}
i need to find defferences in postgres SQL
Published: 2021-07-22 04:37:21

I have a table in Postgres DB as below:

|SOURCE    | Entity         |  DiFF|
| -------- | -------------- |----- |
| PRD      | E1,E2,E3,E4,E5 |      |
| MC       | E1,E2          |      |
| GT1      | E1,E2,E3       |      | 

I Need to insert the differences Between PRD and  MC,GT1 into the DIFF column
Multiphysics Simulation of Electro-Osmotic Microfluidic Flow
Tags: cfd, multiphysics, electroosmosis, simulation
Published: 2021-07-26 09:12:10

---
title: Multiphysics Simulation of Electro-Osmotic Microfluidic Flow
published: true
date: 2021-07-22 00:00:00 UTC
tags: cfd, multiphysics, electroosmosis, simulation
canonical_url: https://www.featool.com/model-showcase/06_Multiphysics_10_electroosmotic_flow1/
---

![Multiphysics Simulation of Electro-Osmotic Microfluidic Flow](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tvrbeuzqs9ju4swevhz0.jpg)

[The linked multiphysics example](https://www.featool.com/model-showcase/06_multiphysics_10_electroosmotic_flow1) available in FEATool Multiphysics v1.14.2, examines microfluidic flow and coupled mass transport due to electroosmosis in a channel with a T-shaped junction. With application of an electric field in a micro channel a flow effect is induced along the walls due to chemical reactions between the liquid and the wall material. This effect is called electro-osmotic flow (EOF), and can for example be used in chemical analysis to separate reactants and chemical species.

Visit https://www.featool.com for more information and toolbox download.
An Introduction To Webpack
Tags: webpack5, webpack, codenewbie, javascript
Published: 2021-07-25 23:09:44

---
title: An Introduction To Webpack
published: true
date: 2021-07-22 04:11:49 UTC
tags: webpack5,webpack,codenewbie,javascript
canonical_url: https://medium.com/codex/an-introduction-to-webpack-5b96caad3f27
---

[![](https://cdn-images-1.medium.com/max/2600/0*epzRJEs1l2yRVjYY)](https://medium.com/codex/an-introduction-to-webpack-5b96caad3f27?source=rss-be00f566a88f------2)

Part 2: Configuring Webpack for Development and Production Modes

[Continue reading on CodeX »](https://medium.com/codex/an-introduction-to-webpack-5b96caad3f27?source=rss-be00f566a88f------2)