teleren/devto huggingface dataset:
Ways to load env variables for your script
Tags: node, dotenv, react
Published: 2021-06-18 09:23:00


Several years ago when I decided to write an article, I got this [inject-env-variables-with-no-tears](https://guyusay.medium.com/inject-env-variables-with-no-tears-ffddd07339d1). At that time, I know nothing about makefile and shell script(almost), the only idea in my brain is just Nodejs. Years later, I got new and better solutions.

Firstly, let's talk about what env variables act in software like a project written in Nodejs. Let's say it's an app that is bootstrapped by create-react-app. By default, this app will be served on the root path of a host, like `medium.com`. If it's supposed to be served on a sub-path like `/apps/my-app`, you have to tell the build script what the exact path it is. The way it receives the path value is through the env variable, actually as `PUBLIC_URL`.
The reason why it(react-scripts) prefers the env variable not an inline argument is env variable is the most unified. Different operations may have different ways in commands, data format, etc. But they all have same basic support for the env variable. That means the great cross-platform. That's it.

Now, let talk about how to inject env variables into the project.
## Shell Script
For example, you are going to set an env variable for the app.
```bash
PUBLIC_URL=/apps/my-app
```
Let's create a file named build.sh
```bash
#!/bin/bash
export PUBLIC_URL=/apps/my-app
/node_modules/.bin/react-scripts build
```
If there are multiple stacks for deployment, just created more `build-[stack-name].sh`, tell the build manager(like Jenkins) that executes the correct shell script.
## Makefile
Makefile works like shell script plus tasks.
```makefile
PATH := ./node_modules/.bin:${PATH}
.PHONY: start build
start:
    react-scripts start
build:
    export PUBLIC_URL=/apps/my-app; \
    react-scripts build
```
The start and build are tasks (called `target` by Makefile) defined by the Makefile. In the build target, the first line is to set the PUBLIC_URL. Please be noticed it ends with a semicolon followed by a backslash. This is because each line in a target is executed in a standalone shell by default, which means the env variable set in the first line is not readable by the second line. The sign that a semicolon followed by a backslash asks Makefile that the next line executes in the current shell, which means they share the same context. In this way, the second line receives the env variable.
There is another way to declare that the lines in the target share the same shell, one-shell. It is not available in some old implementations, such as mine. So I still use the old mark. If you have a new Makefile, try yourself if one-shell works.
## Why not Nodejs
Compare to Nodejs(usually dot-env or set env manully by `process.env[name] = value`), shell script works more straightforward. And the great part is, shell script works for all unix like OS, not only Nodejs. In this point of view, it's sort of cross-platform.
تغييرات امتحان PMP وما تحتاج لمعرفته حول PMBOK® 7
Published: 2021-06-18 09:20:59

في جميع الصناعات ، تتزايد الحاجة إلى متخصصي إدارة المشاريع (PMPs). لم يتغير ذلك لفترة طويلة - ولكن التكنولوجيا تغير دور مدير المشروع. أدخل أحدث امتحان PMP ودليل PMBOK الإصدار 7.

لتصبح PMP وتنضم إلى صفوف الدعوة المتزايدة للمواهب من الدرجة الأولى ، يجب عليك أولاً اجتياز الاختبار الصارم للحصول على الشهادة. سيصدر دليل PMBOK 7 الجديد في أغسطس. يتم محاذاة Simplilearn كشريك تدريب معتمد لهذا الغرض.

كان من المتوقع في البداية أن يتم طرح تغييرات اختبار PMP الجديدة في يوليو 2020 ، ولكن تم تأجيلها بسبب عدم اليقين من جائحة COVID-19. هذا يعني أن الدراسة لامتحان PMP تتطلب نهجًا مختلفًا حيث تم تنفيذ اختلافات كبيرة في 2 يناير 2021.

الشيء الوحيد الثابت هو التغيير ، والوظيفة في إدارة المشاريع لا تختلف. لهذا السبب ، يُجري معهد إدارة المشاريع (PMI®) بحثًا شاملاً كل ثلاث إلى خمس سنوات لفهم كيفية تطور المهنة بشكل أفضل. من خلال تحليلهم المتعمق ، يحدد معهد إدارة المشاريع ما هي المعرفة التي يجب اختبارها والتي تعكس على أفضل وجه الأدوار والمسؤوليات المتغيرة باستمرار لمديري المشاريع المعتمدين.

تستند تغييرات اختبار PMP الجديدة التي دخلت حيز التنفيذ في بداية عام 2021 إلى توصيات من بحث تم إجراؤه في عام 2019. إن معرفة التغييرات القادمة وفهمها أمران ضروريان للاستعداد بشكل أفضل لامتحان PMP.
3 تغييرات مهمة يجب ملاحظتها في اختبار PMP الجديد لعام 2021
تنسيق امتحان PMP
محتوى امتحان PMP
التحضير لامتحان ATP
دعونا نلقي نظرة فاحصة على كيفية تأثير هذه التغييرات على المتعلمين الذين يتطلعون إلى الحصول على شهادة PMP في عام 2021 وما بعده!

فيما يلي الملخص الكامل للتغييرات للمساعدة في التحضير لامتحان PMP.

تنسيق امتحان PMP
قد تبدو التعديلات التي تم إجراؤها على تنسيق الاختبار غير مهمة ، ولكن فهم كيفية اختبار معرفتك وخبرتك هو مفتاح التحضير لامتحان PMP. يتكون إصدار 2015 من الاختبار من 200 سؤال متعدد الخيارات تغطي المجالات الخمسة لإدارة المشروع. كانت أسئلة اختبار PMP مبنية على الصيغة ، وظرفية ، ومعرفية

يحتوي إصدار اختبار PMP الجديد على 180 سؤالاً تغطي المجالات الثلاثة المحدثة وسيكون مزيجًا من الاختيار من متعدد ، والاستجابات المتعددة ، والمطابقة ، والنقطة الفعالة ، وملء الفراغ.

لاختبار مرونة المرشحين بدقة ، يحتوي اختبار PMP الأخير على المزيد من الأسئلة المستندة إلى السيناريو والتي تشمل الرسوم المتحركة لاختبار المرونة والمهارات اللينة للمرشحين بشكل أفضل.

أثناء الدراسة لامتحان PMP ، تأكد من مراجعة دليل الممارسة الرشيقة للتحضير للأسئلة حول كل من النهج الرشيق والهجين.

site:https://cciedump.spoto.net/arabicblog/
Sinopsis Film Carnaval
Tags: movie, movie2021
Published: 2021-06-18 09:13:01

Synopsis Carnaval (2021)-Seorang selebriti internet bernama Nina mengetahui bahwa kekasihnya Marcao berselingkuh, yang membuat citranya sangat buruk. Dia berlari ke arahnya dan memintanya untuk putus.

 Namun, hubungan mereka harus berakhir karena Nina mendapat video Malcon selingkuh dengan wanita lain.

 Padahal, Nina dan Malcon sudah berencana pergi ke Aspen untuk liburan.

 Untuk menghilangkan rasa patah hatinya, Nina mengundang teman-temannya ke Salvador, Brasil, sebagai tempat karnaval terbesar di sana. Ini adalah waktu untuk bahagia bagi mereka.

Source: https://www.dclvxitv.eu.org/
Used OLDSMOBILE Cutlass Engines
Published: 2021-06-18 09:07:00

Check the best deals on autoparts-pro.com. Here you get wonderful low prices and good mileage with warranty for Used OLDSMOBILE Cutlass engines. If your car engine is not working or engine lifetime validity is over? Then no worry, Change your car engine with new one. We have stock for all Used OLDSMOBILE Cutlass engines. We provide Used OLDSMOBILE Cutlass engines for sale in USA at lowest price that matches to your exact requirement. We have all kinds of models that are available from 1995 to 1999 engines. Each engine comes with 1 year seller warranty. We can meet your requirements easily to any location around United states. Please feel free to contact us if you need any further information. Please let me know if you have any questions.

Thanks for reaching out to us. You will quickly go through the process of how the used Oldsmobile Cutlass Engine was selected. We provided some keys to be efficient and to find the right engine for your car to still be efficient and find the most used engine with the least waste of time and effort.

ENGINE USED Abbreviations:

We use certain abbreviations in the search system for explanations of the type of engine used. These engine abbreviations to help locate the right engine for your used Oldsmobile Cutlass engine are listed below:

VIN vehicle identification number

L Liter

MT Manual Transmission type

AT Automatic Transmission type

4x2 2 wheel drive type

4x4 4 Wheel drive type
How to use Go Modules with Private Git repository
Tags: go, tutorial
Published: 2021-06-18 08:32:12

The Go module system has greatly improved the way dependencies are managed. If you are new to Go Modules.

## Public Repositories

After configuring everything correctly, it is relatively straightforward to include Go packages from public repositories. Typical starting points for me are as follows:

```bash
module github.com/Ja7ad/project

go 1.16

require (
	github.com/pkg/errors
	github.com/spf13/cobra
	github.com/spf13/viper
)
```

## Private Repositories

Go uses Git to pull the versions of the dependencies you specify. To access any private repositories, the git configuration for wherever Go is running (e.g. a Docker container or your laptop) needs to be configured with the appropriate credentials.


### GitHub

```console
git config --global url."https://${user}:${personal_access_token}@github.com".insteadOf "https://github.com"
```

### GitLab

```console
git config --global url."https://oauth2:${personal_access_token}@privategitlab.com".insteadOf "https://privategitlab.com"

# or 

git config --global url."https://${user}:${personal_access_token}@privategitlab.com".insteadOf "https://privategitlab.com"
```

### BitBucket

```console
git config --global url."https://${bitbucket_id}:${bitbucket_token}@privatebitbucket.com".insteadOf "https://privatebitbucket.com"
```

## CI/CD Pipeline

**Dockerfile** can be added via this method and add private repository to the image:

```dockerfile

# ---------------------------------------------------------------------
#  The first stage container, for building the application
# ---------------------------------------------------------------------
FROM golang:1.16-stretch as builder

COPY . /app

# Add the keys
ARG github_user
ENV github_user=$github_user
ARG github_personal_token
ENV github_personal_token=$github_personal_token

WORKDIR /app/cmd/webapp

RUN git config \
    --global \
    url."https://${github_user}:${github_personal_token}@@github.com".insteadOf \
    "https://github.com"

RUN GIT_TERMINAL_PROMPT=1 \
    GOARCH=amd64 \
    GOOS=linux \
    CGO_ENABLED=0 \
    go build -v --installsuffix cgo --ldflags="-s" -o myapp

# ---------------------------------------------------------------------
#  The second stage container, for running the application
# ---------------------------------------------------------------------
FROM alpine:3.8
COPY --from=builder /app/cmd/webapp/myapp /app/myapp

WORKDIR /app

ENTRYPOINT ["/myapp"]
```

You can use the following method for **docker-compose.yml**:

```yaml

version: '3.6'
services:
  app:
    container_name: my_go_app_container
    build:
      # context can/may/will be different per-project setup
      context: ../
      dockerfile: GitDockerfile
      args:
        - github_user=private_user
        - github_personal_token=private_token
    image: my_go_app_image
    # other configs...
```

## SSH

Another way to do this would be to use your SSH key every time you connect, and to set **.gitconfig** like the following to ensure SSH is used each time:

```console
git config --global url."git@github.com".insteadOf "https://github.com"
```
Top Courses To Learn JAVASCRIPT
Tags: javascript, webdev, react, codenewbie
Published: 2021-06-18 08:27:55

Free And Best Resource:

- https://www.youtube.com/watch?v=PkZNo7MFNFg
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uyykxwp366pimn58s57g.png)

- https://www.youtube.com/watch?v=3PHXvlpOkf4
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w4du2eukncfm4q4zblwu.png)
 
 
- https://www.youtube.com/watch?v=Qqx_wzMmFeA
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5twy85ce7bofvorkn4s5.png)
 
- https://www.youtube.com/watch?v=W6NZfCO5SIk
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5u167n42vrk5zl0jpouy.png)

- https://www.youtube.com/watch?v=2qDywOS7VAc
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/npb8u7fhdqmsfq74ayrp.png)
 
 
- https://javascript30.com/
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mqoy0eyiwsjl55u32j4g.png)

- https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j014v09qko8b21lwtas4.png)

- https://www.codecademy.com/learn/introduction-to-javascript
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zra78krki784trm59f2k.png)

- https://eloquentjavascript.net/
 
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s4zr528hh6kdea4nurqf.png)

Udemy:

- https://www.udemy.com/course/the-complete-javascript-course/
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q0qrtzvgi9u86yt53k0k.png)
 
- https://www.udemy.com/course/javascript-the-complete-guide-2020-beginner-advanced/
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n1kdctq7r5xfnm536qxn.png)
 
- https://www.udemy.com/course/modern-javascript-from-the-beginning/
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8dlih5t64tfh4omitspi.png)

Other Blogs:

Top course to learn REACT:
- https://dev.to/amritanshu/top-courses-to-learn-react-56d2
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4q8fejcezshtvlgn6y3r.png)
 
Top course to learn MERN:
- https://dev.to/amritanshu/top-courses-to-learn-mern-2i2g
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6oukfz9xa8h9suubhaac.png)
 
Twitter:
- https://twitter.com/NewGenDeveloper

If you know some other best one out there 👇 Comment :)
Why You Should Use Whitespaces In UI Design?

Tags: ui, design
Published: 2021-06-18 08:12:20

Visual and graphical design has evolved over the years and is now known as UI design. But one crucial aspect of UI or visual designing that has remained unchanged over all these years is the importance of whitespace. Generally whitespaces are ignored by users and website owners, but they can have a big impact on the effectiveness of the design. Here you can know the reasons of using whitespaces in UI design. Before digging to the reasons, let’s see What is Whitespaces?

#What Is Whitespace?
Whenever designers talk about whitespaces, they mean negative space. In other words, space between screen elements. Mostly it is in white colour. This space can be a colour or texture background image, or pattern, as it refers to the design’s background. On a webpage it is between buttons, images, links and text. Some of the clients consider it a waste of space but it is necessary. Here comes the question, Why is it so important? Let’s see the reasons to use Whitespace in UI design.

#Why You Should Use Whitespaces In UI Design?
Whitespace is an important element of design. If used properly, it can transform a design and provide lots of benefits to your website. There is a need to develop and deliver layouts that are easy on the eyes and engage people to keep reading. Here are some of the benefits of using whitespaces in UI design.

**1. Foucssing Where It Is Necessary-**
Skilled designer should be capable enough to guide the users’ attention to the content and make the message unique. Really simple to over-plan, it is necessary to stay away from unnecessary mess to achieve the objective of the product. Clarity means not a boring design, a great design will justify itself rather catching the crowd’s eye. For example, Apple branding and advertising. It uses large areas of white space for simplicity and reflect the user-friendliness of its products. 

**2. Improved Comprehension-**
Use of whitespace makes the content in design easy to scan and improves the legibility significantly. As per the research, proper use of whitespace between lines of paragraphs and its right and left margins can maximize comprehension to 20%. Small spaces between paragraphs, lines or menu items are also known as Micro Whitespaces. 

**3. Adds Emphasis-**
What if you use whitespace for separating a design component? Human brain tend to put emphasis and importance on design elements that are surrounded by whitespace. Negative space is offering visual clues about where you must be looking, giving sufficient buffer space around a component so your brain can process it rapidly. Hence, sometimes whitespace surrounds important design components like logos so that they are clearly visible. Space can separate logos from other components so viewers get attracted by branding and didn’t get confused with other images.

Know more at- [https://solaceinfotech.com/blog/why-you-should-use-whitespaces-in-ui-design/]
Prime Sieve Algorithm Cheat Sheet
Tags: algorithms, mathematics
Published: 2021-06-18 07:22:14

## Sieve of Eratosthenes

```c++
bool isPrime[MAXN];
void sieve_of_Eratosthenes(int n) {
  isPrime[0] = isPrime[1] = true;
  
  for (int i = 2; i <= n; ++i)
    if (!isPrime[i])
      for (int j = i << 1; j <= n; j += i)
        isPrime[j] = true;
}
```

## Sieve of Euler

```c++
int prime[MAXN];
bool isPrime[MAXN];
void sieve_of_Euler(int n) {
  isPrime[0] = isPrime[1] = true;

  int pNum = 0;
  int upto = n >> 1 | 1;
  for (int i = 2; i <= upto; ++i) {
    if (!isPrime[i])
      prime[++pNum] = i;
    for (int j = 1; j <= pNum && prime[j] * i <= n; ++j) {
      isPrime[prime[j] * i] = true;
      if (!(i % prime[j]))
        break;
    }
  }
}
```

## \*Sieve of Sundaram
```c++
#include <cstdio>

const int MAXN = 10000010;

bool isPrime[MAXN];

void sieve_of_Sundaram(int n) {
  isPrime[0] = true;
  for (int i = 1; i <= n; ++i) {
    int upto = (n - i) / (i << 1 | 1);
    for (int j = 1; j <= upto; ++j)
      isPrime[i + j + (i * j << 1)] = 1;
  }
}

int main() {
  int n;

  scanf("%d", &n);
  sieve_of_Sundaram(n);

  for (int i = 2; i <= n; ++i) {
    if (i & 1 && !isPrime[i >> 1])
      printf("%d ", i);
  }
}
```

Source Code: [github](https://github.com/vonhyou/basic-algorithm-cheat-sheet/tree/master/sieve)
git advanced aliases
Tags: git, commit, alias, bash
Published: 2021-06-18 07:16:55

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ul8whaxwr60cbrn9huez.jpg)

Hi! Today, I wanna show you how to configure your _**git add commit push alias**_. Scenario is like this, I was thinking is there any way to shorten famous _add commit push_ brothers. In one article, it was written that it's impossible. But, actually, it is possible. And we just need to add alias to our (in fact it's not ours, but lemme call it our) `.gitconfig` file . 
At first, let's look are there any alias? in our .gitconfig:
```git config --global -l``` command shows all alias from your .gitconfig. Probably, your user name and email had been written to there. And if you had added any alias(es), then those aliases were there too. If you don't, then there will not be even an alias word in there :) 

Let's add some aliases. There are 2 ways to do it:
1. Go root file and edit .gitconfig file
2.  ``` git config --global alias.aliasName "yourCommand" ```

For example, `git config --global alias.addAll "git add ."`. After executing this command your new alias will be added to your .gitconfig  file. (at following picture you see all my aliases) 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/euj477wkdih4gc8n8yax.PNG)  

Btw, as you see, I added -c http.sslVerify=false because, I can't push my codes to my repo at work, that's why I did it. You can just, write git push too. 

We have created our simple alias which is the alias of one command. But, if we want to create alias for multiple commands we can't in this way. So, that's why article said it's impossible write multiple commands in this why, but it is possible to do it with other way. Let's call that way "function_style" way.
Step 1. Open your .gitconfig file
Step 2. Add this line  after alias. How I did in and you see that at previous picture. 
```
addcompush = "!f() { git add . ; git commit -m \"$1\" ; git  push ; }; f"
```
I called it `addcompush`, a bit crazy name, but still sounds great  // or comes to me great :) ! 

Calling this alias is like this: 
```   git addcompush "your commit message"  ```


Have fun 🌹💚!
AI vs ML vs DL vs DS
Tags: machinelearning, datascience, deeplearning, ai
Published: 2021-06-18 07:14:07

Ever felt awkward while discussing in the team,... when you say- Yes! we should put some Machine Learning into that, and someone else says ummm, I guess Deep Learning is what it needs. and you node silently?
![smirk](https://media3.giphy.com/media/jbwsLn6OvdO80/200w.webp?cid=ecf05e47rp3v9f039g8og1ruiqpuswn3iwp1vtb95enpjpzq&rid=200w.webp&ct=g)
So what is it? what is the difference among all in the simplest words? 

**first AI ie Artificial Intelligence**
It's not just a way of doing things, it is the umbrella. Remember, Venn diagram? This is the whole universe, your ultimate aim to make your app smart; ie AI enabled. Any machine that could use intelligence and make its own decision similar to our brain is AI enabled.
![aIml](https://media4.giphy.com/media/idqIceJ08pjyIS5rRP/200w.webp?cid=ecf05e47d44g3y5lfl8lq0wca77w6ctqlynlhk1eqdbismib&rid=200w.webp&ct=g)


**Machine Learning** is a subset of AI like rest of them, it's more of a tool which gives us way to deal with the data, train it through supervised and unsupervised methods. After your machine learns from this data, it can take decision. The data accuracy is the key to the best decision making in your app. for the for example, we can train our machine to spot the difference between 2 species of a bird. Next time, You'll feed a bird's image to the app, based on what it learned, it'll produce the result.
![aIml](https://user-images.githubusercontent.com/66199202/122507964-0633fd00-cfb6-11eb-96b2-8b10e35d9b90.png)

**DL ie Deep Learning** is again a subset of both and more complex. Its main aim is to mimic brain. It doesn't use labeled or data training but replicate the data processing and patterns creations like we do. It uses various multi neural network architecture.
![DL](https://user-images.githubusercontent.com/66199202/122508557-02ed4100-cfb7-11eb-9563-04b5b073bfbd.png)


So What is **Data science?**

Data Science is an approach/discipline/field of study that deals with manipulation and transforming of data. Like an equal size umbrella. whenever you are crunching, putting mathematics, trying to make a sense out of the data using probability/algebra anything, you are using data science. Its not new like AI/ML, it's been here since forever.Tada!!
![DS](https://user-images.githubusercontent.com/66199202/122508831-7bec9880-cfb7-11eb-91a1-bd981cf0223c.png)

This might not be the most accurate and technical explanation. But it'll give a little sense of permanent understanding.
![btr](https://media1.giphy.com/media/2ALDrK4ckHNLNCw45v/200w.webp?cid=ecf05e47mf1o0bvc1fi7j4dpz7u75wvi46gwupplkuzjzng3&rid=200w.webp&ct=g)