teleren/devto huggingface dataset:
EPR Authorisation (Plastic Waste)
Published: 2021-02-27 09:32:55

Introduction
Plastic has many uses, and due to its physical and chemical properties leads to huge commercial use and success. The indiscriminate disposal of plastic has, however, become a major environmental threat. In particular, plastic carrying bags are the main contributors to littered waste and, every year, millions of plastic bags end up in the atmosphere vis-à-vis the soil, water bodies, rivers, etc it takes an average of one thousand years to decompose completely. Therefore, the Plastic Waste (Management and Handling) Regulations, 2011 were notified in 2011, which included plastic waste management, to tackle the problem of scientific plastic waste management. In violation of the earlier Plastic Waste (Management and Handling) Regulations, 2011 the government notified the Plastic Waste Management Regulations, 2016

Objective of Extended Producer Responsibility
 ➲ Increase the minimum thickness of plastic carry bags from 40 to 50 microns and specify a minimum thickness of 50 microns for plastic sheets also to encourage the collection and recycling of plastic waste

➲ Extend the applicability jurisdiction from municipal to rural areas, since plastic has also reached rural areas

➲ Introduction of system collecting back of plastic waste by producers/brand owners, as per extended producer responsibility.

➲ Promoting the use of plastic waste for road construction according to the guidelines of the Indian Road Congress or energy recovery, or waste to oil, etc. for the profit-making use of waste and also addressing the issue of waste disposal; entrusting further responsibility to waste generators, namely payment of user fees as prescribed by local authorities, collection and transfer of waste by the institutional generator, event organizer  ,  https://www.corpzo.com/epr-authorisation-plastic-waste
Marketing & Social Media jobs in Hamburg - 2021
Tags: hiring, career, beginners, marketing
Published: 2021-02-27 08:55:49

Hamburg is becoming a favorable spot for startups and is pretty close to the German capital Berlin. Following are some of the companies that have open job positions for SEO, Content Marketing, Social Media, Online Marketing - with full time, part time and student internships as well.

**FREE NOW**

FREE NOW is a mobility as a service provider headquartered in Hamburg, Germany. FREE NOW was formed in February 2019 from a joint venture between BMW and Daimler Mobility.

Jobs 👉 https://arbeitnow.com/companies/free-now

**achtung! GmbH**

achtung! is the communications agency for the hyperconnected reality: We create impulses that set things in motion - via paid, owned, earned media. With around 160 specialists and generalists in Hamburg, Munich and Düsseldorf for PR, social media, advertising, digital marketing, direct and content marketing.

Jobs 👉 https://arbeitnow.com/companies/achtung-gmbh

**celebrate company**

With our brands kartenmacherei, faireparterie, Couture, celebrate Apps and better print production we turn our customers' meaningful moments into lasting memories: with beautiful stationary and photo products as well as innovative digital services.

Jobs 👉 https://arbeitnow.com/companies/celebrate-company

**Pulse Advertising | HIVE Management**

Creating the right stories, for the right people, in the right place. Creative strategy, content and data are our tools for engineering the advertising world of tomorrow.

Jobs 👉 https://arbeitnow.com/companies/pulse-advertising-hive-management

**TrainingsManufaktur Dreiklang GmbH & Co. KG**

We work for the vision of a world in which meaningful change in organizations, companies or even entire states no longer takes decades. We advocate for a world that is not defined by industry officials and overburdened managers making decisions that often go against the customer and their own employees.

Jobs 👉 https://arbeitnow.com/companies/trainingsmanufaktur-dreiklang-gmbh-co-kg

_Company blurbs have been borrowed either from Google search results or their own websites_
Full Tutorial #9: Creating a GraphQL Mutation | Microservices Chat App Using React, Node.js, TypeScript and GraphQL

Tags: react, node, webdev, javascript
Published: 2021-02-27 08:41:52

**About Me:** I've been a professional web developer for just over 10 years now. I'm currently the lead web development instructor at [Better Coding Academy](https://codebetter.com.au), and as part of what I do, I post videos on our YouTube channel at [https://www.youtube.com/c/BetterCodingAcademy](https://www.youtube.com/c/BetterCodingAcademy).

_(Subscribe for awesome web development content!)_

Part 9 of the Microservices Chat App is here! In this episode, I set up the `createUser` and `createUserSession` GraphQL mutation endpoints to allow users to sign up and sign in!

{% youtube luJ0OCCmOsE %}

Happy coding!

Source code: [https://github.com/lucaschen/microservices-chat-demo](https://github.com/lucaschen/microservices-chat-demo)
The Art of Debugging & Most Common Bugs
Published: 2021-02-27 08:34:38


![bugs-in-the-code.jpg](https://cdn.hashnode.com/res/hashnode/image/upload/v1614339637470/x_rTZdPRg.jpeg)

[source](https://devcamp.com/site_blogs/top-5-programming-memes) 


*Debugging* is the process of removing bugs and errors from your code. 

- 
**Syntax errors**: Stops code from running.

- 
**Runtime errors**: Where your code has unexpected behaviour.

- 
**Logical errors**: Where your code doesn't do what you intended.




> 
In the fight against bugs, the console is your best friend.

Following are some of the common bugs we encounter every day.


###  Missing Parenthesis, strings.
```
function sum() {
 let p = 6;
 let q = 3;
 return p + q;
}

let ans = sum;
console.log(ans);
```
**Answer**
```
function sum() {
 let p = 6;
 let q = 3;
 return p + q;
}

let ans = sum();
console.log(ans);

``` 

### Arguments in the Wrong Order.
```
function raiseToPower(b, e) {
 return Math.pow(b, e);
}

let base = 2;
let exp = 3;
let power = raiseToPower(exp, base);
console.log(power);//9
```
**Answer**
```
function raiseToPower(b, e) {
  return Math.pow(b, e);
}

let base = 2;
let exp = 3;
let power = raiseToPower(base, exp);
console.log(power);//8
```

### Off By One Error.
Indexing in JS starts at zero, not one, which means the last index is always one less than the length of the item.

```
let string = "Thisirhgebuggystrig";
let length = string.length;
for (let i = 0; i <= length; i++) {
  // loops one too many times at the end
  console.log(string[i]);
}
for (let j = 1; j < length; j++) {
  // loops one too few times and misses the first character at index 0
  console.log(string[j]);
}
for (let k = 0; k < length; k++) {
  // This is just right
  console.log(string[k]);
}
```

These are just a fraction of many bugs you will face while learning to code and building projects. However, do not let any bug stop you from coding. The knowledge you gain after finding the solution is worthwhile. 

Check out this breathtaking [bug story ](https://softwareengineeringdaily.com/2016/11/19/debugging-stories-with-haseeb-qureshi/) (SE DAILY podcast).

You can find me at  [Twitter](https://twitter.com/DEVARSHI_1).

This blog is inspired by [FreeCodeCamp](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/#debugging) debugging section.
❤️ Top 21+ Good Websites for Practicing Automation Testing
Tags: testing, selenium, qa, beginners
Published: 2021-02-27 08:09:17

In this video, We are going to learn about the top 21+ good websites for practicing the automation testing. 

These are real time websites which I have used personally to learn or do automation projects.

{% youtube brLs3IOqlzk %}

I have combined the Real Time Live Projects and some  Dummy websites for Web Automation and API Testing. I hope you like it. We have divided the list in Basic, Medium and Advance level.

✅ 21+ Websites List  - https://sdet.live/practice

Comment in the Doc, If you want to add more websites.

🔥🔥IMPORTANT LINKs 🔥🔥

✅API Testing –
https://www.learnapitesting.com

✅Cypress Tutorial with LIVE Projects –
http://cypresstutorial.com

🟢30 Days of Automation Testing
https://go.scrolltest.com/automation

🟢30 Days of API Testing
https://apitesting.co/30days

🟢 30 Days of Rest Assured
https://go.scrolltest.com/30days-restassured

—————————————————–
👪 Join our Community – http://bit.ly/learntesting2019
✅ Automation Tester Community – https://thetestingacademy.com
🐦Follow us on Twitter – https://twitter.com/itstechmode
📖 Like us on Facebook – https://www.facebook.com/scrolltest
🎤 Listen to our Podcast – https://anchor.fm/thetestingacademy
——————————————————

#selenium #seleniumjobs #testing #selenium #softwaretesting #qa #learnselenium
Build a Video Meeting app using WebRTC and Socket.io
Tags: node, webrtc, socketio
Published: 2021-02-27 08:02:09

Here we will develop a video meeting application. Here meeting id will generate automatically. With whom you share your meeting id, they can join your meeting. So, let’s build this gorgeous application.

Let’s build a video meeting application. Here we will build a single page application that runs on an Express server.

You can download the full application code from our GitHub repo. To run this app, you need to install node and Express on your system.


 
If node not installed in your system. You can run the following command.

`$ sudo apt update`
`$ sudo apt install nodejs`
Or, you can install useing npm.

Also, your system should connect with a camera or webcam. You also need a second device to check the remote connection to video call.
# Our using dependencies:
- Nodejs – For backend.
- Expressjs – Nodejs server.
- Socket – To continuous connection between devices.
- WebRTC – Real-time communication between browsers.
- HTML, CSSS, vanilla etc.

Check this app on: https://bytecall.herokuapp.com/

GitHub repo: https://github.com/sunanda35/byteCall

Read full article on [Centocode.com](https://centocode.com/how-to-build-a-video-meeting-app-using-webrtc-and-socket/)
Easy dark theme with CSS only
Tags: webdev, tutorial
Published: 2021-02-27 07:56:03

Today, I'm going to show you how to add a simple dark theme do your website.

First, we have something like this, light theme by default.
![Light theme of the website](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4beyplfpnwcwzkluzfum.png)
The light theme corresponds to this in CSS:
```css
body {
    background-color: #FFF;
    color: #212121;
}
```

Now, let's make a dark theme by default!
It is fairly simple to do, just change your `background-color` and `color` to the values you need for your dark theme (don't forget links as well if you already don't have theming for those).

For instance:
```css
body {
    background-color: #212121;
    color: #FFF;
}
a {
    color: #F57C00;
}
```
Which will give this by default.
![Default dark theme](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mmxerrh3rhwr0j75tzry.png)

Sweet, but now we want people to still be able to see the light them if they selected it.
To achieve that, just add `@media screen and (prefers-color-scheme: light)` around your light theme CSS.
For instance:
```css
@media screen and (prefers-color-scheme: light) {
    body {
        background-color: #FFF;
        color: #212121;
    }
    a {
        color: #7E57C2;
    }
}
```

And voilà, you have now a website that supports light and dark themes 🎉

![Dark Theme loop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8e5z1zyljl55cl2yf3j8.gif)
Becoming A Data Analyst
Tags: beginners, analyst, sql, python
Published: 2021-02-27 07:47:14

This week I've come to the realization that I'm becoming a Data Analyst and I accept that wholeheartedly! 

Next week I'll plan out my trajectory...

Thanks to this question being asked, motivating me to write this first post.

https://dev.to/devteam/what-was-your-win-this-week-1kg5 

The plan will be comprised of the following, at least:
SQL (understand it but very new to me still) 
Python (understand it but haven't progressed far enough to be impactful) 
Power BI (love it) 
Personal website (liking this idea) 
TBC... 

Have you got any advice on how to proceed? Please leave a comment down below... 

#StayCoding #365Opportunities
How to convert a Set to an Array? – JavaScript
Tags: javascript, tradecoder
Published: 2021-02-27 07:09:48

When you remove the duplicate numbers from an array with `new Set()` method, it turns into a set instead of an array like this

```javascript
let duplicates = [1,2,3,4,5,6,2];

// remove the duplicates

let noDuplicates = new Set(duplicates);

// output Set {1,2,3,4,5,6}

```

Duplicates may happen by posting/collecting same value from one/different sources, or by `concat()` arrays. 

And you can convert that set to an array again. 

## Solution 1: 

```javascript
let duplicates = [1,2,3,4,5,6,2];

// remove the duplicates

let noDuplicates = new Set(duplicates);

// output {1,2,3,4,5,6}

let arrayWithNoDuplicates = Array.from(noDuplicates);

// output [1,2,3,4,5,6]


```


## Solution 2:

```javascript

let duplicates = [1,2,3,4,5,6,2];

// remove the duplicates

let noDuplicates = new Set(duplicates);

// output {1,2,3,4,5,6}

let arrayWithNoDuplicates = [...noDupicates];

// output [1,2,3,4,5,6]
```

## Solution 3:

```javascript
let duplicates = [1,2,3,4,5,6,2];

let noDuplicates = Array.from(new Set(duplicates))

// output [1,2,3,4,5,6]
```

## Solution 4:

```javascript
let duplicates = [1,2,3,4,5,6,2];

let noDuplicates = [... new Set(duplicates)];

// output [1,2,3,4,5,6]

```

## Apply

```javascript
let a = [1,2,3,4];
let b = [5,6,2];

let c = a.concat(b);
let d = new Set(c);
let e = Array.from(d);

// or in one line

let f = Array.from(new Set(a.concat(b)));

```

***

Source : [How to convert a Set to an Array? – JavaScript | tradecoder](https://tradecoder.com/dev/javascript/how-to-convert-a-set-to-an-array/)
Ruby — Part 0
Tags: ruby, webdev, beginners, programming
Published: 2021-02-27 06:58:22

Beberapa hari terakhir ini lagi iseng ngulik-ngulik Ruby. Belajar itu biar semakin lengket ilmunya selain dibaca dan sering dipraktekin, tambahannya ditulis ulang dengan kata-kata sendiri, dengan pemahaman sendiri. Semoga yang sama sedang belajar bahasa ini dimudahkan proses belajarnya. Aamiin.

Table of Content
* Kenalan sama Ruby
* Kelebihan Ruby
* Praktek
* Konklusi
* Referensi

**Kenalan sama Ruby**

Ruby merupakan bahasa yang powerful dan fleksibel. Ruby tergolong dalam bahasa pemrograman dinamis berbasis skrip berorientasi objek.

Kalau dari website resminya, mereka bilang gini

> Ruby adalah…
Bahasa pemrograman open source dinamis, mudah dimengerti dan produktif. Sintaks Ruby elegan, natural, mudah dibaca dan ditulis.

Sekarang Ruby sudah di versi 3.0.0-preview2.

**Kelebihan Ruby**

1. Sintaks sederhana
2. High-level
3. Interpreted
4. Berorientasi objek
5. Mudah digunakan

**Praktek** 

```
puts "Hello world"
```
Untuk outputnya akan seperti dibawah ini.

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

**Konklusi**

Jadi Ruby merupakan bahasa yang ramah terhadap kamu yang baru pertama kali tau dan pertama kali belajar. Selamat kamu sudah berhasil mencetak teks dengan bahasa Ruby. Ada satu lagi syntax yang sama-sama untuk mencetak, saran saya bermain-main ke websitenya. Nanti juga langsung ketemu syntaxnya apa dan bagaimana membuatnya.

Terima kasih yang sudah membaca tulisan ini, maaf kalau tulisan kali ini begitu singkat. Assalamu’alaikum, selamat belajar dan memperluaskan kebaikan!

Kamu juga bisa mampir ke tulisan aslinya di [sini](https://pandhuwibowo.medium.com/ruby-part-0-279ac337587)

**Referensi**

Belajar Ruby: Pengenalan dasar Pemrograman Ruby untuk Pemula
"Ruby adalah sahabat terbaik programmer" - ruby-lang.org Ruby adalah&mldr; Bahasa pemrograman open source dinamis…
www.petanikode.com

Ruby
Kami dengan senang hati mengumumkan rilis dari Ruby 3.0.0-preview2. Baca Selengkapnya... Ditulis oleh naruse tanggal…
www.ruby-lang.org

Ruby (bahasa pemrograman)
Dirancang oleh Yukihiro Matsumoto pengembang Yukihiro Matsumoto (among others) Rilis perdana 1995 Tipe Sistem dynamic…
id.wikipedia.org

[Call Friends]
Halo teman teman, untuk mendukung agar saya tetap bisa membuat tulisan-tulisan menarik lainnya. Kamu bisa support saya dengan membeli produk-produk asli produksi sendiri, homemade, dan yang pastinya brand lokal hanya di @beneteen atau ke [beneteen.com](https://beneteen.com/)

<a href="https://dev.to/pandhuwibowo">
  <img src="https://d2fltix0v2e0sb.cloudfront.net/dev-badge.svg" alt="Pandhu Wibowo's DEV Community Profile" height="30" width="30">
</a>
What would you need 64GB of RAM for?
Tags: node, cpp
Published: 2021-02-27 06:09:19

> This post is originally [published on Quora](https://www.quora.com/What-would-you-need-64GB-of-RAM-for/answer/Junxiao-Shi), with code links at the end

I used 58GB of RAM once. NodeJS refuses to use more memory and I had to rewrite the program in C++.

It's in a research project. I captured a packet trace from Network File System (NFS) server, and I want to reconstruct the complete pathnames accessed in each command. The way NFS works is that, every command only carries a component of the name (like a directory name or a filename within a directory), along with a handle that represents the directory in which the file resides. To get the complete pathname, I need a lookup table of all known handles and their corresponding pathnames. Then, for each new command that has a handle and one more name component, I can query this lookup table to find out the pathname of that handle, and append the new component to get the complete pathname. Finally, I'd insert the new pathname along with the new handle into the table.

I have 24 hours of packet trace with millions of these handles. It shouldn't take so much memory, but I somehow decided to write the program in NodeJS. NodeJS struggled to allocate more and more memory as it reads the input, until it reaches 58GB after several hours. The machine has 96GB but NodeJS won't use more memory. I can tell that it's no longer making progress, because records in `/proc/*/fdinfo` indicates that the cursor in input file isn't moving anymore.

I spent four hours rewriting this part of the program in C++. More specifically, I hosted the lookup table in a C++ program, and had the NodeJS program communicate with C++ process via Unix socket. The program completed in 15 minutes with no more than 1GB of memory.

Conclusion: if you need 64GB of memory just for data structures, you probably need a better programming language.

## source code links

https://github.com/yoursunny/nfsdump

`pathtree/fullpath.js` is the Node.js edition, for Node.js v0.6 on Ubuntu 12.04.
`pathtree/fullpath.cc` is the C++ edition implementing same functionality.

## highlighted Quora comments

**Michael Johnson-Moore**
Conclusion 2: If you need something to be fast, don't use an interpreted language.

**Alex Bujorianu**
Many more developers should heed this lesson! ... I really don’t understand why a cloud desktop client, a text editor (!) etc. need 100MB of memory per instance.

**Ubeyde Mavus**
Or you need to know your way around C++ better than your way around NodeJS.
Simply way to write PHP output in Javascript console.log
Tags: php, javascript
Published: 2021-02-27 06:05:42


You can simply combine the `printf` and `json_encode` function to make this.


```php
function console_log($data) {
    printf('<script>console.log(%s);</script>', json_encode($data));
}

console_log(['name' => 'Wallace Maxters']);
```

Output:

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3xb1uhefw25r08kcmn4w.png)
Checklist setup VPS berbasis CentOS 7
Tags: centos, linux, indonesia
Published: 2021-02-27 06:00:20

Artikel ini dimaksudkan sebagai checklist setup VPS berbasis CentOS 7 yang awalnya hanya untuk keperluan pribadi, biar tidak lupa langkah langkahnya, saat sedang melakukan setting awal untuk VPS baru. Namun akhirnya saya memutuskan untuk di-sharing saja, siapa tahu ada yang membutuhkan.

Oh ya, saya menyadari bahwa checklist setup VPS untuk tiap orang itu berbeda, karena disesuaikan dengan peruntukkan VPS yang dimaksud. Nah, di artikel ini saya hanya menuliskan checklist umum yang wajib dilakukan. 

## Ganti root login

Masuk sebagai `root`.

Ketik perintah dibawah ini, ganti `demo` dengan nama user sesuai keinginan.
```
useradd demo && passwd demo
```

Isi password untuk user `demo` saat diminta, tekan Enter untuk melanjutkan.

Selanjutnya set user `demo` kedalam grup `sudo`.
```
gpasswd -a demo wheel
```

## Pasang SSH key

Ketik perintah dibawah lalu masukkan password.
```
su - demo
```

Selanjutnya secara berurutan eksekusi perintah berikut.
```
mkdir .ssh
chmod 700 .ssh
vi .ssh/authorized_keys
```

Gunakan PuTTY Key Generator untuk generate SSH RSA key, sesudah itu salin SSH key tersebut. Catatan: Kolom passphrase biarkan kosong.

Tekan `i` untuk mengaktifkan mode edit, dan lanjutkan dengan menekan kombinasi `Shift+Insert` untuk menyalin SSH key yang di-generate pada langkah sebelumnya kedalam editor.

Tekan `Esc` untuk keluar dari mode Insert, dan ketik `:x` lalu Enter untuk menyimpan file dan keluar dari editor.

Setelah keluar, ketik perintah berikut.
```
chmod 600 .ssh/authorized_keys
exit
```

Keluar dari PuTTY dan login kembali.

## Konfigurasi SSH Daemon

Pada langkah ini akan ditunjukkan cara membatasi login remote SSH ke akun `root`.

Login sebagai `root`.

Buka file konfigurasi SSH dengan perintah,
```
vi /etc/ssh/sshd_config
```

Cari baris yang memiliki entri berikut
```
#PermitRootLogin yes
```

Tekan `i` untuk mengaktifkan mode edit, lalu hapus tanda pagar `#` dan ganti `yes` dengan `no`.
```
PermitRootLogin no
```

Tekan tombol `Esc` untuk keluar dari mode Insert.

Simpan perubahan diatas dengan menekan tombol `:x` dan tekan Enter

Restart dengan mengeksekusi perintah berikut.
```
systemctl reload sshd
```

## Update Centos

Hal ini dilakukan supaya instalasi VPS selalu dalam keadaan up-to-date, dan sebaiknya dijalankan secara berkala.
```
sudo yum -y update
```

## Konfigurasi Timezone

Eksekusi perintah dibawah ini secara berurutan.
```
sudo timedatectl set-timezone Asia/Makassar
sudo timedatectl
```

Apabila ada kesalahan atau ternyata ada langkah penting (menurut Anda) yang tidak sempat saya tulis diatas, silahkan komentar dibawah yah.

Untuk setup pada Ubuntu,
{% embed https://dev.to/erolj/checklist-setup-vps-berbasis-ubuntu-46eb %}

Semoga bermanfaat, dan nantikan update lanjutan untuk artikel ini.