teleren/devto huggingface dataset:
Khasiat Jeruk Purut
Tags: tutorial
Published: 2021-11-19 09:44:08

Tentu kalian mengenal jeruk yang satu ini. Jeruk purut bukanlah buah sembarangan, karena buah ini sepesial buahnya berbentuk bulat telur, kulitnya hijau berkerut, berbenjol-benjol. Rasa buah ini asam agak pahit. Selain berhasiat sebagai obat Promag jeruk purut sering digunakan dalam masakan pembuatan kue atau dibuat manisan.

Jeruk purut banyak ditanam di pekarangan rumah atau di kebun-kebun. Bunganya berbentuk Bintang, berwarna putih kemerah-merahan atau putih kekuning-kuningan.

Tahukah kalian Penyakit apa yang dapat diobati oleh buah jeruk purut? Di antara penyakit yang dapat diatasi dengan jeruk purut ialah influenza, kulit bersisik dan mengelupas. Jeruk purut juga dapat digunakan untuk mewangikan rambut dan mengatasi rasa lelah pada badan.

Untuk mengatasi influenza, potong sebuah jeruk purut yang banyak airnya, lalu peras. Seduh air perasan dengan 60 ml air panas. Minum sekaligus selagi hangat. Untuk mengatasi badan lelah setelah bekerja atau letih sehabis sakit berat, ambilah 2 genggam daun jeruk segar, masukkan dalam 3 liter air, masak sampai mendidih selama 10 menit. Tuangkan ramuan tersebut ke dalam 1 ember air hangat dan dan gunakan untuk mandi.

Untuk mengatasi kulit bersisik dan mengelupas, belah jeruk purut tua menjadi dua bagian. Gosokkan pada kulit yang bersisik kering dan mudah mengelupas, bisa di aplikasikan di kulit kepala atau bagian lain dari tubuh. Lakukan 1 kali sehari pada malam hari dan sebelum tidur.

Untuk mewangikan rambut kepala, cuci 1 buah jeruk purut masak sampai bersih, Lalu parut. Tambahkan 1 sendok makan air bersih, Lalu remas dan saring. Gunakan air saringannya untuk digosokkan pada rambut setelah keramas. Nah kalian dapat mencobanya sendiri di rumah.

Sumber : https://www.ardintoro.com/
Next.js environment variables
Tags: javascript, webdev, react, nextjs
Published: 2021-11-19 09:43:01

## A guide on how to use Next.js environment variables


### How to create an environment variable for Next.js
  
<br />

#### First, create a file with a starting in `.env`.

Depending on the run-time environment, a custom `.env` file can be created suce as the following:
- `.env.development` - when running `next dev`
- `.env.production` - when running `next start`
- `.env.local` - will override `.env`, `.env.development`, and `.env.production`
- `.env.test` - when running `jest` OR `cypress`
- host environment variables - AWS, Heroku, Vecel, etc. provide an interface to set environment variables directly

#### Next, inside the created `.env` file, add the variables to be used

```.env
VARIABLE_NAME=VALUE
```

This will be accessible via `proccess.env`

```js
console.log(process.env.VARIABLE_NAME);
```

### Two types of environment variables

1. Server-side expose variables
2. Browser exposed variables

<br />

#### 1. Server-side variables

Every variable set in an `.env*` file will be available on the server-side. *Including the second type*

```.env
DB_HOST=secret_host
DB_USERNAME=username
DB_PASSWORD=password
```

<br />

Above variables can be used in the server-side code such as `getStaticProps`, `getServerSideProps`, or in `/api`

```js
export function getStaticProps() {
  connectToDatabase({
    host: process.env.DB_HOST,
    username: process.env.DB_USERNAME,
    password: process.env.DB_PASSWORD,
  })
}
```

#### 2. Browser exposed variables

Accessing the sample variables above will yield undefine.
In order to make a variable available to the browser, it should be prepended with `NEXT_PULIC_`.

```.env
NEXT_PUBLIC_GOOGLE_ANALYTICS=abcde12345
NEXT_PUBLIC_NOT_SO_SECRET_URL=https://example.com
```

Even though there will be more keystrokes, I personally like this convention as it gives a clear distinction of what variables are available to the client side.
It is less likely that I will expose any sensitive information to the user.

<br />

As per the variables above, it can be used anywhere in React land. For example, setting the Google analytics key.

```jsx
// _document.tsx
<Head>
 <script
  async
  src={`https://www.googletagmanager.com/gtag/js?id=${process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS}`}
 />
</Head>
```

<br />

Another usage is for something publicly accessible but should not be committed to the repo.

```jsx
useEffect(() => {
  fetch(`${process.env.NEXT_PUBLIC_NOT_SO_SECRET_URL}`)
  // ...
})
```

> Although you can still access a browser exposed variable in your server-side code, it will not make sense to do it.

> Make sure any sensitive information should not be committed in the repo.


## Conclusion

Next.js provides an easy way to set environment variables in any run-time environment. It also provides a good convention to separate variables that can be used on the client-side.
Working with Github Actions CI Workflow - Swift Programming
Tags: swift, opensource, programming, tutorial
Published: 2021-11-19 09:27:33

## Introduction

To set up Github Actions CI Workflow for swift. You will be required to visit your repository on GitHub. 
1. On GitHub.com, navigate to the main page of the repository.
2. Under your repository name, click Actions.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f9z84otyr340ea48f1yo.png)
3. If you already have a workflow in your repository, click New workflow.
4. Find the template that you want to use, then click Set up this workflow.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5tbfdiwjrq10whllnubz.png)

```swift
name: Swift
	 
	on:
	 push:
	 branches: [ main ]
	 pull_request:
	 branches: [ main ]
	 
	jobs:
	 build:
	 
	 runs-on: macos-latest
	 
	 steps:
	 - uses: actions/checkout@v2
	 - name: Build
	 run: swift build -v
	 - name: Run tests
	 run: swift test -v
```

## Working on other repo
Successful GitHub action workflow on pull request. 
[Workflow #](https://github.com/sirinoks/SSGNode/runs/4270683586?check_suite_focus=true)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pc65aw7trdkfxzokibpr.png)
I worked on CI for testing on javascript using jest. This testing function would allow to check if css stylesheet is passed.

```code
test("should be able to pass specified style", () => {
        expect(
            checkGenPageArgsWithCSS(
                data,
                data.texts,
                data.title,
                data.stylesheet,
            ),
        ).argv_s = `<link rel="stylesheet" type="text/css" href="please_add_your_css_path" />`;
    });
```
[GITHUB PR](https://github.com/sirinoks/SSGNode/pull/34)

## Conclusion
All in all, CI enables Organizations to scale their engineering teams, codebases, and infrastructure. It enables each team member to take ownership of a new code change from conception to completion. This will help you to be the rightful owner for the code to be tested before release.
WHAT IS VIRTUAL REALITY?
Published: 2021-11-19 09:25:21

Virtual Reality (VR) is a computer-generated environment with scenes and objects that appear to be real, making the user feel they are doused in their surroundings. This context is formed inside a machine known as a Virtual Reality headset. VR allows us to involve ourselves in video games or movies as if we were one of the characters. We feel like we are doing the job and are realistic af. We can play any sport we like, we can perform surgeries, make food and do much other stuff to maximize performance.
Although this may seem remarkably ahead of its time, its roots are not as recent as we may feel. The very first virtual reality device was considered to be Sensorama. It was a machine that had built-in seat and it played 3D movies, gave of smells, and generated vibrations to make the experience as vivid as possible. This device was brought into existence back as far as the mid-1950s. Following technological and software advancements over the coming years brought with them a continuous evolution both in projects and in interface design.


That's enough about the theory that is propelling us into the future. Which sectors is Virtual Reality actually being used in today? Medicine, culture, education, and architecture are some of the areas that have already taken hold of this technology. 

In near future, Imagine going into virtual reality when deciding what furniture to buy for your residence. You will be able to walk around in a virtual living room, bedroom, kitchen, etc, and know what kind of furniture would fit in your house. In those simulations, you will be able to try out different items of furniture. So virtual reality would make many things possible.
Did you forget to wait something async in your test?
Published: 2021-11-19 19:51:54

---
title: Did you forget to wait something async in your test?
published: true
date: 19/11/2021
tags: 
canonical_url: https://blog.koenvangilst.nl/did-you-forget-to-wait-something-async/
---

Attempted to log “TypeError: Cannot read properties of null (reading ‘URL’)

It’s one of those dreaded, time consuming flaky errors that everyone working with Jest has had to deal with.

The first part of the error is quite clear. Apparently there was still something going on after my test has finished. But what? Problem with this particular error was that it didn’t happen every time (so timing issue?) and it was generally logged **after** all my tests had run. So, no clue which test was causing it.

The full stacktrace was:

```
    Attempted to log "TypeError: Cannot read properties of null (reading 'URL')
        at Object.exports.setup (src/node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequest.js:62:12)
        at new XMLHttpRequest (src/node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequest.js:101:22)
        at dispatchXhrRequest (src/node_modules/axios/lib/adapters/xhr.js:44:19)
        at new Promise (<anonymous>)
        at xhrAdapter (src/node_modules/axios/lib/adapters/xhr.js:24:10)
        at dispatchRequest (src/node_modules/axios/lib/core/dispatchRequest.js:46:10)
        at Object.defaultQueryFn [as queryFn] (src/src/providers/queryClient.ts:19:7)".
```

As often with these errors the cause was pretty simple and the solution even simpler.

I’m using `React-Query` for my api requests, which is a fantastic tool that offers so many functionalities out of the box. One of its features is the prefetching data you know a user is gonna need.

And that’s what I recently added. After the page had fully loaded the frontend starts prefetching some of the other options in a dropdown, so that when the user selects one of the other options the results are there instantly!

Problem was that in some tests these prefetching calls where still running after the test has finished.

In my `setupTests.ts` file I have the following call to start with a new React Query slate for every test:

```
afterEach(() => {
  queryClient.clear()
})
```

Which is great if you want test isolation, but in this case it was causing errors, because the prefetching calls where still running when the query client got cleared.

The solution to this problem is simple and effective:

```
afterEach(async () => {
	await queryClient.cancelQueries();	queryClient.clear();
});
```

After every test this will first cancel any queries that are still running and then clear the queryClient.

Problem solved!
Milk Company In Chennai
Tags: milkshop, cowmilk
Published: 2021-11-19 09:05:36

If you are looking for <a href="https://www.annammilk.com/">Milk Company In Chennai</a> then get the best A2 milk which has high nutrients and proteins. They deliver the milk to your doorstep. Milk is the first drink every person has in the morning. This A2 milk from the <a href="https://www.annammilk.com/">Hygienic Milk in Chennai</a> gives more energy. Their cows are fed with organic food and green grasses which helps the cow to provide healthy milk and this milk is delivered to all over Chennai in Tamilnadu.
Starting With Tailwind CSS
Tags: css, tailwindcss, beginners, webdev
Published: 2021-11-19 08:58:57

__What is Tailwind CSS?__

- CSS framework made up of utility classes
- Much lower-level than Bootstrap, Materialize etc

__Using Tailwind CSS__

- Install Tailwind CSS using npm (node package manager)
- You'll need node.js installed in your computer

_To check if node is already installed or not, open up your terminal and write below command_ :
```
node -v
```
_if you get some sort of number like that <strong>v14.1.0</strong> you are good to go otherwise you can just download <strong>Node</strong> from here_ : [Install Node.JS](https://nodejs.org/en/download/)

__How Tailwind Works__

![How Tailwind Works](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l6u5le0ournfgo7kjfco.jpg)

_When we use tailwind we create a src file where we import all tailwind core styles or functionality and also we can write our own CSS styles then we use Tailwind to process it and output into Vanilla CSS file, and can link it to our <strong>index.html</strong>_

__Now let's start with Tailwind CSS :__ 

__1. Install Tailwind via npm__
_open up your terminal and run below commands_
```
npm install tailwindcss
```
__2. Add Tailwind to your CSS__
_Create a CSS file if you don’t already have one, and use the @tailwind directive to inject Tailwind’s base, components, and utilities styles_
```
@tailwind base;
@tailwind components;
@tailwind utilities;
```


_That's all for the initial setup now you can use tailwindcss classes in your index.html to style it, before that you had to run this command in terminal_
```
tailwindcss build src/style.css -o public/style.css
```
_Or you can add a script for this and also for production in package.json_

![build and production scripts](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fabqp7jn83ba6a55v6x0.jpg)

_If you have any sorts of problem with the process you can checkout official documentation_ [Tailwind Docs](https://tailwindcss.com/docs/),
_Or you can comment down below I'll try my best to resolve it._
Day 63 - 65/100 Project: A Programming Language
Tags: 100daysofcode, programming, challenge, motivation
Published: 2021-11-19 08:04:52

"The evaluator, which determines the meaning of expressions in a programming language, is just another program."

– Hal Abelson and Gerald Sussman, Structure and Interpretation of Computer Programs

![egg](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/87ka6gar0uy7k5pl9ot3.png)
Advantage of oil Circuit Breakar
Published: 2021-11-19 08:04:47

The oil plan is a type of [oil circuit breakers](https://electricalgang.com/oil-circuit-breaker/)  is a type of oil used as oil or it is used as an infinite depth. The kitchen is differently separated. When a mistake can deteriorate systems, open oil and arc oil in oil and arc oils, goals. 

Adah's circle, it is distributed in most types, more or inconsistent, of the original, electric, drop, dosiness, it is an existing transport in the earth's thoughts and heels, and the container is full of fuel.  Oil is a process for ending things and independent areas between country. The width of the wind is full on a canel that the oil is full of oil in oil gas in oil gas. 

Jampers are safe for natural conversations due to quick attack. Gas stores in the oil plan equipped in the container coating to remove gas. The principle of resting - comfortable operating operation during normal operation and the end of the oil serves and performs power.  When a mistake in separate communication systems is different, and eco attacks between contacts. 

Due to the arch, the heat and the heat and oil around oil around the oil continue. Gas, thus sheets, and it raises strong oil surroundings. ARX is exit while the distance between continuous contacts and the distance between certain values and restorations. Oil transplant - is reliable in religious operation, and it is very cheap.  

The most important feature of the oil program that the special instruments are not used to replace the modification. The oil rit, petroleum zalk, petroleum zalk, petroleum rings, petroleum rise and benefits and benefits. Used in violation of circuit breaker in a hydrogen is created in a container and has a good mortal property. Oil losses, which are not easy to break oilseeds used in oil tire causing fire risk. 

 Danger to produce ammunition with air. Carbon particles, carbon and contaminated oil, and, as a result of oil power. After the oil chain after a chain after a small destiny, can ever burn their relationships. In addition, coal carissarches were carried out with their important emplots, it was lost. This result will reduce your resolution.  Therefore, as deputy to support sources and contact for support for icons.
HTML tags | bdo
Tags: html, tags, bdo
Published: 2021-11-19 07:22:52

The `<bdo>` element (_Bi-Directional Override_) **overrides the current directionality of text**, so that the text within is rendered in a different direction.

The text's characters are drawn from the starting point in the given direction; the individual characters' orientation is not affected (so characters don't get drawn backward, for example).

It has a `dir` attribute to specify the direction in which text should be rendered in this element's contents. Possible values are:

* `ltr`: Indicates that the text should go in a left-to-right direction.
* `rtl`: Indicates that the text should go in a right-to-left direction.

Most browsers will display the `<bdo>` element with the following default CSS value:

```
bdo {
  unicode-bidi: bidi-override;
}
```

- Type: *inline*
- Self-closing: *No*
- Semantic value: *No*

[Definition and example](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo) | [Support](https://caniuse.com/mdn-html_elements_bdo)
Git Tip: Keeping an eye on the source repository
Tags: git, beginners, bash, codenewbie
Published: 2021-11-19 07:20:52

### Why do I need to check out a source repository alongside my forked repository?
- It helps you to compare the source code of the forked repository with the source code of the source repository.
- It also helps you to see the changes made in the source repository.

### Checking out the source repository
**Step 1**: 
Open a Git Bash terminal.

**Step 2**: 
Change directory to the directory where you have cloned the repository.

**Step 3**: 
Check out the source branch.
Command syntax:
```bash
git remote add repo_name url_of_source_repository
```
Runnning the command will add a remote repository named "repo_name" to the local repository.

**Step 4**: 
Fetch the source branch.
Command syntax:
```bash
git fetch repo_name master 
```
Runnning the command will fetch the master branch from the remote repository.

#### Comparing the two repositories
To compare the two repositories, you can use the following command:
```bash
git diff --stat origin/master repo_name/master
```
The option `--stat` shows the number of added, deleted, and modified lines and not the actual content of the files. Don't use `--stat` if you want to see the actual content of the files.

#### Checking latest commits in the source repository
To see the latest commits in the source repository, you can use the following command:
```bash
git log [--oneline] [--graph] [--after=date] [--before=date] [--author=author] repo_name/master
```
The option `--oneline` shows the commit message.
The option `--graph` is used to show the commit graph.
The option `--after=date` shows the commits after the date.
The option `--before=date` shows the commits before the date.
The option `--author=author` shows the commits made by the author.

There can be many more options to filter the commits. Check the [Git log documentation](https://git-scm.com/docs/git-log) for more information.

---

Thank you for reading! If you want to connect with me, you can find me on Twitter [@abh1navv](https://twitter.com/abh1navv)
Hating windows won't make you cool
Tags: programming, beginners, linux, windows
Published: 2021-11-19 07:02:10

It's five years of introducing myself as a Debian user in the OS world. But I have full respect for Windows as well. Well, my dad uses Windows, but that's not the reason you should hate Windows OS.

Microsoft Windows is with us from the start of OS development, from 1985. But this is also not the reason you shouldn't hate Windows.

### Reasons to not hate Windows
The only reason I am stuck on Linux/Debian OS is that it is good enough to fulfil my requirements. Similarly, many people are stuck in Windows because it is good enough to fulfil their requirements. 

Well, one of my college friends tried Linux, he search for a piece of software to do some writing stuff, he got LibreOffice, and tried it. FOR HIM, LibreOffice wasn't good enough. I told him to use Google Docs as well, but at the end of the day, it didn't match with him.

Also, he was a Valorant player friend. He search **how to install Valorant in Linux?** And guess what, he got disappointed, `Valorant isn't playable in Linux, aka: BANNED`

So, we need to keep in mind that if something fulfils our requirement why one should change he/her workflow.

In a nutshell, we all want our tasks to be accomplished as soon as possible. If something we currently own and does the task we want without any issue, we're good to go with it.

`#peace` `#linux` `#amen`
What's the programming language to learn first?
Tags: webdev, codenewbie, beginners, discuss
Published: 2021-11-19 07:01:37

First of all, there is no BEST programming language to learn first. It always depend on what you want to do with that language, still, whether you want to choose programming as a hobby, as a career you have to first choose which programming language you have to learn.

In this blog I will give you some options, so you can decide which programming language you could learn as your first programming language.

Following me on twitter helps me a lot [Follow Now](https://twitter.com/vikstack)

#### JavaScript

Being one of the most popular language out there. It is used in a variety of websites including Gmail, Spotify, Facebook, and Instagram and many more. It can communicate with HTML and CSS. It is a must have when adding interactivity to websites.

##### Why choose JavaScript?

If you want to try out frontend development, or even backend, you can choose JavaScript.

#### Python

This is also incredibly famous. Python reads like English and is easy to understand for someone who is just starting to code. Python is ideal to do web development, graphic user interfaces (GUIs), and software development. Python is often thought of as a slow language that requires more testing and is not as practical for developing mobile apps as other languages.

##### Why choose Python?

If you’re looking for something easy, python can be a choice for you.


#### C#

While C is one of the more difficult languages to learn, it’s still an excellent first language pick up because almost all programming languages are implemented in it. This means that once you learn C, it’ll be simple to learn more languages like C++ and C#.

##### Why choose c#? 

If you want a solid foundation to make you a master developer, C is a solid choice for you.


Here was 3 of the most famous and preferred language to use. While Python and JavaScript are for beginners and C is kinda hard to learn. 

Thanks for reading till here. Cheers
Install and Config Golang on Windows10
Tags: go, windows
Published: 2021-11-19 06:42:29

### Download Page: https://golang.org.dl

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

`.msi` is **Windows**'s new install package file just double click it to install.


### Environment Variable Config

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

Variable **GO111MODULE**'s value should be set to "on" to enable module control tools(`go mod` tools).

Variable **GOBIN**'s value should be set to "$go/bin" where the "$go" is the directory where you installed **Golang**.
So that the **Windows** system can find the `go` tools in "$go/bin" when you perform them in **cmd**.

Variable **GOPATH**'s value should be a path, which will be used to save the modules installed from the remote repository.