teleren/devto huggingface dataset:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module:
Tags: node, react, express, mongodbatlas
Published: 2021-04-13 08:49:44

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module:



Hello, I am New here, And also in development, I just made my first Website, using the MERN stack, Now want to deploy it on the digital ocean, the frontend part is working ok, my Nginx configuration is ok, but I have a problem with backend, my server.js file, is not working, it is causing this error ' Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: ' 

I am using the import and export ES module, and also have "type": "module" in my package.json,  

The app is working ok on a local server,


Can anyone help? :)) 

here is my server.js file 

========================

import path from 'path'
import express from 'express'
import dotenv from 'dotenv'
import colors from 'colors'
import { notFound, errorHandler } from './middleware/errorMiddlleware.js'
import connectDB from './config/db.js'
import eventRouter from './routes/eventsRoute.js'
import blogRouter from './routes/blogRoute.js'
import userRouter from './routes/userRoutes.js'
import uploadRouter from './routes/uploadRoutes.js'

dotenv.config()
connectDB()
const app = express()
app.use(express.json())


app.use('/api/events', eventRouter)
app.use('/api/blogs', blogRouter)
app.use('/api/users', userRouter)
app.use('/api/uploads', uploadRouter)


const __dirname = path.resolve()
app.use('/uploads', express.static(path.join(__dirname, '/uploads')))

if(process.env.NODE_ENV === 'production'){
    
  app.use(express.static(path.join(__dirname, '/frontend/build')))  

  app.get('*', (req, res) => {
      res.sendFile(path.resolve(__dirname, 'frontend', 'build', 'index.html'))
  })
} else {
   app.get('/', (req, res) => {
     res.send('App Is Running...')
   })
}


app.use(notFound)
app.use(errorHandler)

const PORT = process.env.PORT || 5000

app.use((req, res, next) => {
  res.header("Access-Control-Allow-Origin", "*");
  res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
  next();
});

app.listen(5000, () => {
    console.log(`Server Is Running In ${process.env.NODE_ENV} Mode  On Port ${PORT}`.yellow.bold)
})

==========================
The Consulter 
Published: 2021-02-14 19:36:26

The problem The Consulter solves

It helps novice investors determine which companies, based on products they use & how successful the company is, are a possible investment. Most people are scared or unaware of investing in the stock market and this app helps by determining if it is good by looking at the company data. Experts like Warren Buffet recommend that you invest into companies you know as they are most likely successful companies and you know their business model. Some data includes eps, p/e ratio, growth revenue, increase in percentage of stock price, price-book, and other generic questions based on the company's performance. We also factor in personal questions to cater the experience especially for the users. It then tells them whether we recommend it or not based on personal factors and metrics. We add a disclaimer that it is not guaranteed advice and they should do their own research to be safe. This simplifies the process for newbies in such that they can see the companies that they use and how successful they are on the market rather than doing it by themselves. Please use Apple to test the code.

Challenges we ran into

Some of the problems were that it was incredibly time-consuming to collect the stock data and incorporate it into the project, but we managed to find a solution by using our online tools. It was very difficult to store the csv values into a variable for the 2021 and 2020 data and Yahoo and Google Finance charged us for the EPS data. It was hard to coordinate with each other when assigning roles for this project but we eventually stepped up our game and were able to get things done faster and more efficiently. Parsing the JSON file was also very stressful and it made us want to quit the project and give up, but we were able to build up our morale and persevere. Lastly, we also had a challenge of making the UI look good to optimize user experience.

Technologies we used

Xcode 
Swift 
GitHub 
Apple Numbers 
Yahoo Finance
Google Finance

Link to our project:
https://youtu.be/2eazIdV-l80

GitHub Link:
https://github.com/sprothia/ECONHACKS-CONSULTER
The New Startup: No Code, No Problem
Tags: startup, python, javascript, programming
Published: 2021-04-13 08:37:16

DANI BELL WAS a British copywriter who hankered for her own marketing startup. Like many founders today, though, she faced a roadblock. She couldn't code.

Normally, an entrepreneur in that situation would need to spend money, and maybe even raise it, to hire developers. But Bell did something different: She bolted together software from various online services.

Bell used a point-and-click tool called Webflow to build her site and a client-management tool to let customers order services. Airtable, an online spreadsheet, let her store details about each job. And she glued many of these pieces together by cleverly using Zapier, a service that uses if-then logic to let one online app trigger another. (Whenever Bell creates a new task for one of her contractors, for example, Zapier automatically generates a Google doc for it, then pings her on Slack when the work is done.) Nineteen months later, her company—Scribly.io—had around 23 clients and was doing $25,000 a month in recurring business.
Tuesday's live 1:1 support for devs
Tags: beginners, devops, codenewbie
Published: 2021-04-13 08:35:41

I'm giving away one hour of my afternoon to anyone that needs help.

# Tech stuff I know and could help you with

- Git
- Docker, docker-compose, docker swarm, docker-machine
- Create an MVP with 0 budget (services to use, design strategies, landings, tools, etc)
- Python
- Define an API
- Define microservices
- Convert a monolithic into a microservices architecture
- Cloud architectures
- Deployment strategies (CI/CD)
- Define tech stack for your app
- Django framework
- Getting started with web development
- Solve Bugs
- Code reviews

# When and Where?
Every Tuesday at https://meet.jit.si/FreeDevHelpGDI from 7 pm to 8 pm (UTC+02:00, Madrid Time)

# Languages
I speak Spanish and English

# Who am I?

Since 2013 I was part of a startup where I was involved in several projects with different roles: developer, DevOps, team leader and product manager.

Since then I have been working in cloud environment, mostly AWS, and becoming a cloud architect and achieving different cloud certifications.

https://www.linkedin.com/in/adrianogalello

I'm also the guy behind https://getadvice.github.io/

# What is this exactly?
Think of this as asking for help from a teammate. You can enter the meeting and ask me to give you a hand with something that you're working on, studying, or stuck with. If I don't know the answer I will search for it.

# Why are you doing this?
The reasons are the same that I've already wrote down on [GetAdvice](https://getadvice.github.io/)

[https://getadvice.github.io/join.html#why-would-i-give-my-time-for-free-time-is-money](https://getadvice.github.io/join.html#why-would-i-give-my-time-for-free-time-is-money)


**If you have any questions just write down a comment or feel free to contact me**
Top 5 Incredible Smart Contract Audit Benefits


Tags: blockchain, smartcontractaudit, technology, business
Published: 2021-04-13 08:02:00

Blockchain technology is gaining popularity as being implemented with automated smart contracts. A single bug in smart contract exposes an entire project to a hack that has resulted in significant financial losses. To prevent this, smart contract audit services are mandated in practice. Thoroughly verifying the smart contract codes can fix all the bugs and provide great results.

Benefits of Smart Contract Audit

1. Efficiency
2. Prevents vulnerabilities
3. Ensures Security 
4. Code Improvements
5. Attracts investors

This is all about smart contract audit services benefits. Now, you have gained expertise in audit services. If you are interested to perform smart contract audit services, approach the Blockchain Firm and minimize the risks in smart contracts earlier!

Read more >> https://www.blockchainfirm.io/smart-contract-audit
PHP에서 문자열을 표현할 때 ""과 ''이 항상 같을까?
Published: 2021-04-13 07:50:15

일반적으로 PHP에서 문자열을 표현할 때 인용부호(" 또는 ')를 사용합니다.
그런데 그 결과가 항상 같으면 좋은데 가끔 차이가 있습니다.

## '을 사용하면 ''안의 모든 것을 일반 텍스트로 처리합니다.

```
$age = 29;
$string = '내 나이는 $age 입니다.';
echo $string; // 결과 : 내 나이는 $age 입니다.
```

___

## "을 사용하면 ""안의 변수 보간을 하여 해당 변수를 반영하여 출력해 줍니다.

```
$age = 29;
$string = "내 나이는 $var 입니다.";
echo $string; // 결과 : 내 나이는 29 입니다.
```
I made a simple note taking application named "Blink".
Tags: javascript, webdev
Published: 2021-04-13 07:40:17

website:- https://anon4620.github.io/Blink.github.io/

Github repository:- https://github.com/ANON4620/Blink.github.io

This is a note taking application I made for fun. Feel free to suggest improvements in the code. 

Recently, I started learning web development. I don't have much experience but I love programming and want to explore more.
Whatever I learned is from the internet. I am a self-taught guy. Please let me know how to learn these stuff as I am a newbie.
Sorry, for the bad english.
Thank you.
Cheerio JS Vs. Proxies API
Published: 2021-04-13 07:14:58

The world of web scraping is varied and complex, and Proxies API sits at one of the most crucial junctions. They are allowing web scrapers/crawlers to bypass IP blocks by using a single API endpoint to access our 20 million-plus high-speed proxies on rotation.
One of the questions we get frequently is how we are different from services like OctoParse or Diffbot. Many times it is like comparing Apples and Oranges. Still, when we send this comparison table to our customer's developer team, their CXO, their marketing or SEO team, they typically get it quite easily if we are a convenient service or not.

So here is how we are different from Cheerio JS.

Cheerio JS is ideal for programmers with experience in JQuery. You can deploy Cheerio JS on the server-side to do web scraping easily using JQuery selectors.

Scraping can be as simple as
Colly Vs. Proxies API
Published: 2021-04-13 07:14:10

The world of web scraping is varied and complex, and Proxies API sits at one of the most crucial junctions. They are allowing web scrapers/crawlers to bypass IP blocks by using a single API endpoint to access our 20 million-plus high-speed proxies on rotation.
One of the questions we get frequently is how we are different from services like OctoParse or Diffbot. Many times it is like comparing Apples and Oranges. Still, when we send this comparison table to our customer's developer team, their CXO, their marketing, or SEO team, they typically get it quite easily if we are a convenient service or not.

So here is how we are different from Colly.

Colly is a super fast and scalable and extremely popular spider/scraper.

it supports web crawling, rate limiting, caching, parallel scraping, cookie, and session handling and distributed scraping

Here is an example of fetching 2 URLs in parallel.
www.webroot.com/safe
Tags: webrootsafe, downloadwebroot
Published: 2021-04-13 07:12:57

<a href="https://wehbroot.com/">webroot.com/safe</a>
 is one of the most reliable antivirus software available that gives lots of advanced features. With this, users can conveniently shield their devices from malicious viruses, block unsafe websites and downloads, malware, and more. In case you are watching for an option to safeguard, then visit the webroot website and learn how to destroy any hassles easily.
Scraping Reddit with Python and Beautiful Soup
Published: 2021-04-13 07:08:41

Today we are going to see how we can scrape Reddit posts using Python and BeautifulSoup in a simple and elegant manner.
The aim of this article is to get you started on a real-world problem solving while keeping it super simple so you get familiar and get practical results as fast as possible.

So the first thing we need is to make sure we have Python 3 installed. If not, you can just get Python 3 and get it installed before you proceed.

Then you can install beautiful soup with...
Today we are going to see how we can scrape Reddit posts using Python and BeautifulSoup in a simple and elegant manner.
The aim of this article is to get you started on a real-world problem solving while keeping it super simple so you get familiar and get practical results as fast as possible.

So the first thing we need is to make sure we have Python 3 installed. If not, you can just get Python 3 and get it installed before you proceed.

Then you can install beautiful soup with...
Once installed open an editor and type in.
Now let's go to the programming subreddit and inspect the data we can get.

This is how it looks:
Back to our code now... Let's try and get this data by pretending we are a browser like this.
Save this as reddit_bs.py.

If you run it.
You will see the whole HTML page.

Now, let's use CSS selectors to get to the data we want. To do that let's go back to Chrome and open the inspect tool. You can see that all the post title elements have a class called review-title in them.


Let's use CSS selectors to get this data like so.
This will print the title of the first post. We now need to get to all the posts. We notice that the class 'Post' (amongst others) holds all the individual data together.
To get to them individually we run through them like this and try and get to the post title from 'inside' the 'Post'
Bingo!! we got the post titles.

Now with the same process, we get the class names of all the other data like post votes, a number of comments, a link to it, etc.
That when run, should print everything we need from each post like this.


If you want to use this in production and want to scale to thousands of links then you will find that you will get IP blocked easily by Reddit. In this scenario using a rotating proxy service to rotate IPs is almost a must.

Otherwise, you tend to get IP blocked a lot by automatic location, usage, and bot detection algorithms.

Our rotating proxy server Proxies API provides a simple API that can solve all IP Blocking problems instantly.

With millions of high speed rotating proxies located all over the world,
With our automatic IP rotation
With our automatic User-Agent-String rotation (which simulates requests from different, valid web browsers and web browser versions)
With our automatic CAPTCHA solving technology,
Hundreds of our customers have successfully solved the headache of IP blocks with a simple API.

The whole thing can be accessed by a simple API like below in any programming language.
Copy of Scraping the New York Times with Python and Beautiful Soup
Published: 2021-04-13 07:04:23

Today we are going to see how we can scrape New York Times articles using Python and BeautifulSoup is a simple and elegant manner.

This article aims to get you started on a real-world problem solving while keeping it super simple, so you get familiar and get practical results as fast as possible.

So the first thing we need is to make sure we have Python 3 installed. If not, you can just get Python 3 and get it installed before you proceed.

Then you can install beautiful soup.
We will also need the library's requests, lxml, and soupsieve to fetch data, break it down to XML, and to use CSS selectors. Install them using.
Once installed, open an editor and type in.


Back to our code now. Let's try and get this data by pretending we are a browser like this.
Save this as nyt_bs.py.

If you run it
You will see the whole HTML page.

Now let's use CSS selectors to get to the data we want. To do that, let's go back to Chrome and open the inspect tool. We now need to get to all the articles. We notice that the

with the class, 'assetWrapper' holds all the individual articles together.
You will see the whole HTML page.

Now let's use CSS selectors to get to the data we want. To do that, let's go back to Chrome and open the inspect tool. We now need to get to all the articles. We notice that the

with the class, 'assetWrapper' holds all the individual articles together.
This selects all the assetWrapper article blocks and runs through them, looking for the element and printing its text.


So when you run it, you﻿ get.
Bingo!! We got the article titles.

Now with the same process, we get the class names of all the other data like article link and article summary.
That, when run, should print everything we need from each article like this.
If you want to use this in production and want to scale to thousands of links, then you will find that you will get IP blocked quickly by the New York Times. In this scenario, using a rotating proxy service to rotate IPs is almost a must.

Otherwise, you tend to get IP blocked a lot by automatic location, usage, and bot detection algorithms.

Our rotating proxy server Proxies API provides a simple API that can solve all IP Blocking problems instantly.

With millions of high speed rotating proxies located all over the world
With our automatic IP rotation
With our automatic User-Agent-String rotation (which simulates requests from different, valid web browsers and web browser versions)
With our automatic CAPTCHA solving technology
Hundreds of our customers have successfully solved the headache of IP blocks with a simple API.

A simple API can access the whole thing like below in any programming language.
Now let's go to the NYT home page and inspect the data we can get.

This is how it looks.
Free Productivity Apps for 2021
Tags: devops, ios, webdev, productivity
Published: 2021-04-13 06:58:04

The easiest and the most effective way to boost productivity is to have the right set of productivity apps and tools in your arsenal. But with literally thousands of options out there, making the right pick often seems like a next-to-impossible situation.

In this particular article, we’ll cover [5 of the best productivity apps](https://appsupports.co/best-free-apps/6007/productivity) that every freelancer, startup, small business, and enterprise should consider getting their hands on in the coming year.

**1.TeamViewer QuickSupport**
Get support for your iPhone and iPad from any computer. You can even mirror your screen to any other iPad or iPhone! TeamViewer provides easy, fast, and secure remote access and is already used on more than 1.8 billion devices worldwide.

**2.CamScanner — PDF Scanner App**
CamScanner is a free scanner app that helps users scan, edit, store, and sync contents across smartpho ones, iPads, tablets and computers. Extract texts with OCR and convert PDF to Word, Excel, etc.

**3.Smart Lens — AI Translate**
Smart Lens is the #1 Translation and Object Recognition app available in the store. Translate text in images instantly by just pointing your camera. Most advanced AI is integrated into the Smart Lens App. Snap a photo and let Smart Lens identi ify and translate the objects in the picture. Discover any celebrity, animal, and plant details with Smart Lens.

**4.Speechify — Audio Text Reader**
You can LISTEN faster than you can READ! Speechify is an intelligent text-to-speech audio-reader that turns your reading material into interactive audiobooks so that you can save time, retain more information, and stay focused. Like your own pe ersonal reading assistant, Speechify can read books, documents, and articles while you cook, work out, commute, or any other activity you can think of.

**5.Drawing Desk: Draw & Paint Art**
Fully powered by our creative engine Cortex, Drawing Desk offers a batch of powerful artistic c tools and brushes for a realistic drawing experience. Express your creativity and bring your striking ideas to life with beautiful sketches, drawings, paintings and doodles. Loved by both kids and adults alike, Drawing Desk is a family app that enables creativity in everyone!

Thank you for reading this article, I hope it was useful for you!)
Reasons to learn asp.net core in 2021
Tags: dotnet, webdev, programming, aspnetcore
Published: 2021-04-13 06:32:21

In this video, I have listed few of the reasons to learn asp.net core in 2021.

ASP.NET Core is a cross-platform, open-source framework for building modern cloud-based applications.

👉 https://dotnetcrunch.in/asp-net-core-tutorial-for-beginners/​

More Info:
✔ Blog: https://dotnetcrunch.in​
✔ Instagram: https://instagram.com/dotnetcrunch​
✔ Facebook: https://facebook.com/dotnetcrunch​
✔ Twitter: https://twitter.com/@dotnetcrunchh
Complete Responsive  Form Design From Scratch using Html & CSS 
Tags: html, css, codenewbie, codepen
Published: 2021-04-13 06:29:53

Complete Responsive  Form Design From Scratch using Html & CSS 

Demo == > https://codepen.io/Bilal1909/pen/NWdXrPx?editors=1000

Desktop View :
<img src="https://i.postimg.cc/6qFbvBmd/screenshot-codepen-io-2021-04-13-11-25-36-371.png">

Mobile View :
<img src="https://i.postimg.cc/CMbcPpX6/screenshot-codepen-io-2021-04-13-11-26-07-047.png">
Open Github Repo Directly in a VsCode Like Page
Tags: webdev, reactnative, react, node
Published: 2021-04-13 06:28:41

Ever Downloaded a Repo just to open it in a Vscode instance and refer that code? Happened Many times with me.

Recently I found a good resource with which we can open the Github Repo directly web browser looking VsCode without any kind of download/setup.

Open the Github Repo.
Example Repo URl:- `https://github.com/koolkishan/stripePayment`

Now in the URL just add 1s after github like this
`https://github1s.com/koolkishan/stripePayment`

Done. Now browse the repo as you're browsing your VsCode.

### Still have any Confusions? Watch out my YouTube Video for the demonstration. 

{%youtube 8MjRqTdJ9j4 %}
Git Scanner Framework
Tags: pentest, security, framework, github
Published: 2021-04-13 06:16:29

This tool can scan websites with open .git repositories for Bug Hunting/ [Pentesting](https://kali-linuxtr.net/?s=pentest) Purposes and can dump the content of the .git repositories from webservers that found from the scanning method. This tool works with the provided Single target or Mass Target from a file list.

[Git Scanner Framework](https://kali-linuxtr.net/git-scanner-framework)
Samsung’s follow up to the Z Fold 2 could be smaller, but maybe not in the dimension you want.

Tags: samsung, android, news
Published: 2021-04-13 06:06:04


"Smaller screen, smaller battery, and the possibility of stylus support"

Samsung’s next Galaxy Z Fold folding phone might have a slightly smaller screen than its previous models, feature a smaller battery and quite possibly launch in July alongside a new Galaxy Z Flip, The Elec reports (via XDA Developers).

The Galaxy Z Fold 3 will reportedly have a 7.5-inch main tablet screen and a 6.2-inch screen on the front cover of the phone, The Elec writes, which would be virtually the same as the Fold 2’s 7.6-inch main display and 6.2-inch cover display. The Elec says these screen sizes come with the added benefit of “zero bezels,” so even though the screens may be the same size, the third Fold could feel slightly smaller because the actual body of the phone might shrink.

Read More: https://www.theverge.com/2021/4/12/22380763/samsung-folding-phone-galaxy-z-fold-3-smaller-screen-battery