teleren/devto huggingface dataset:
How to install Virtual Box in ChromeOS
Published: 2020-06-29 05:28:14

In this guide, I assume you are familiar with @sebanc  [brunch](https://github.com/sebanc/brunch), [Crouton](https://github.com/dnschneid/crouton), [Chroot](https://www.youtube.com/watch?v=2wSJREC7RV8) and obviously [Virtualbox](https://www.virtualbox.org/). If you are not familiar with anyone of these first go through the following links and get a brief idea for conceptual clearance in your head. 

These are the steps we cover in this Guide.
- [x] Install ChromeOS in your PC

- [x] Installing a Chroot based Ubuntu Instance

- [x] **Setting up the Environment in Ubuntu**

- [x] Installing Virtual Box

### Installing ChromeOS in your PC
I guess you are familiar with the Brunch of this master branch, with which you can use Install the ChromeOS in any PC - provided your PC meets the [hardware requirements](https://github.com/sebanc/brunch#hardware-support-and-added-features). 

> Any quires in this section, you are free to browse through the existing issues or to open a new issue.

### Installing a Chroot based Ubuntu Instance

Follow these instructions, in case of any errors stop it - do some research or comment it below.

1. Download crouton
2. Open a shell (Ctrl+Alt+T, type `shell`, and hit enter)
3. Copy the installer to an executable location by running `sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton`
4. Now that it's executable, run the installer itself: `sudo crouton -r xenial -t xfce`
5. Wait patiently and answer the prompts like a good person. At the end of the installation you need to provide username and password for ubuntu installation.
6. Done! You can jump straight to your Xfce session by running `sudo enter-chroot startxfce4` or, as a special shortcut, `sudo startxfce4`
7. Cycle through Chromium OS and your running graphical chroots using **Ctrl+Alt+Shift+Back(F1)** and **Ctrl+Alt+Shift+Forward(F2)**.
8. Exit the chroot by logging out of Xfce.

Step 6,7,8 are optional steps, which will provide you an idea about the usage of [crouton](https://github.com/dnschneid/crouton)

### Setting up the Environment in Ubuntu
After successful completion of Step 5, you can launch the Ubuntu using Xfce using Step 6 or you can use this command: `sudo enter-chroot` to access the Ubuntu terminal. It's up to you how you want to access the Ubuntu terminal.

In **ubuntu terminal**, use this command before installing anything. `sudo mount -o remount,rw /lib/modules/* `

### Installing Virtual Box
The above step, which focuses on setting up of environment is a must. The command: `sudo mount -o remount,rw /lib/modules/* ` should be executed without any error. **If you have no error proceed further**.

> **crostini** needs to be disabled in ChromeOS settings

1. `sudo apt install virtualbox` to install VirtualBox
2. Before using VirtualBox, run `sudo modprobe vboxdrv`


We are all set, now you have a working VirtualBox in ChromeOS, If you have any suggestion or issue feel free to comment.

---
for new updates visit: https://blog.leewardslope.com/how-to-install-virtualbox-in-chromeos/
My current situation
Tags: coding
Published: 2020-06-29 06:24:39

So I have been learning for a while now. I am having the feeling that I don't have a clear path. I feel I'm just learning stuffs randomly. It sounds disturbing. Analysing what I've learnt for the past few weeks, I remember I learnt about Github and user workflow, learnt bootstrap to some reasonable extent. I also learn how to make some nice scrolling effect on a page using scrollreveal.js library. I'm feeling it's not enough. I really want to learn more JavaScript. It's all I want to be doing now. I'm feeling some imposter syndrome. Everyone seems better than me. Everyone around is doing something and showcasing it. And here  I am, just coding stuffs for 'coding purpose'.  I don't know what to do. I want to learn JavaScript!  And I don't know what to do. This is why I'm writing this. I want to discover and solve my problem. 

Additionally,I have an udemy course I'm also taking. Just watching the videos and coding along. It's helping I'm learning.


So I wish I finish it too. So my problems now are:

1. I want to learn JavaScript.

2. I want to finish the udemy course on advanced CSS.


3. Additionally,I love to stay in the internship. Hng internship.


4. I want to learn about blade templating.

So how do I go about all these?


Let's keep that for the other time. At Least, my head is clear now!



Happy coding 🤗🤗
Vanilla JavaScript History API
Tags: javascript
Published: 2020-06-29 06:21:36

Yesterday we had a brief introduction to the History API, by using the [`pushState`](https://daily-dev-tips.com/posts/vanilla-javascript-update-url-without-refresh/) method.

Today we'll be diving more into the History API and see what other elements we can use.

## JavaScript Browser API Back and Forward

So instead of refreshing the current `URL` sometimes, we want to navigate true the history programmatically. The History API has three methods of doing so:

- `back()` Same as clicking the back button in the browser
- `forward()` Same as clicking the forward button
- `go()` We can go to a specific index forward (`1`) or backward (`-1`)

In action the `back()` method looks like this:

```js
window.history.back();
```

The `forward()` in turn looks like this:

```js
window.history.forward();
```

And the `go()` we can use like this:

```js
window.history.go(-1); // back
window.history.go(1); // forward
window.history.go(0); // refresh
window.history.go(); // refresh
```

You can determine how many pages are in the history by using the following command:

```js
var numberInHistory = window.history.length;
```

## JavaScript History API replaceState

As we saw we can use [`pushState`](https://daily-dev-tips.com/posts/vanilla-javascript-update-url-without-refresh/) to change the current state, we can also use `replaceState` for this:

```js
history.replaceState({page: 'unicorn'}, 'Unicorn', '/Unicorn');
```

## Browser Support

![History support](https://caniuse.bitsofco.de/static/v1/mdn-api__History-1593269956388.png)

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
I am getting error while trying for mochawesome-merge(merging the .json file) in cypres on window 10 os
Published: 2020-06-29 06:14:59

I am getting below error while trying for mochawesome-merge(merging the .json file).

SyntaxError: cypress/reports/output.json: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at C:\Mayank\Cypress_Code\node_modules\jsonfile\index.js:33:18
    at C:\Mayank\Cypress_Code\node_modules\graceful-fs\graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)

Please find below package.json file


{
  "name": "cypress_practice",
  "version": "1.0.0",
  "description": "This is for cypress practice",
  "main": "index.js",
  "scripts": {
    "cypress:open": "cypress open",
    "merge":"mochawesome-merge cypress/reports/*.json > cypress/reports/output.json",
    "generate_mochawesome_report":"mochawesome-report-generator  cypress/reports/output.json --reportDir ./ --inline",
    "final_report": "npm run merge && npm run generate_mochawesome_report"
  },
  "author": "Mayank Jain",
  "license": "ISC",
  "devDependencies": {
    "cypress": "^4.8.0",
    "cypress-file-upload": "^4.0.7",
    "mochawesome": "^6.1.1",
    "mochawesome-merge": "^4.1.0",
    "mochawesome-report-generator": "^4.1.0"
  }
}


Please find below cypress.json file

{
    "chromeWebSecurity": false,
    "defaultCommandTimeout": 10000,
    "execTimeout": 60000,
    "pageLoadTimeout": 60000,
    "requestTimeout": 15000,
    "responseTimeout": 15000,

    "reporter": "mochawesome",
    "reporterOptions": {
      "reportDir": "cypress/reports",
      "reportFilename": "report",
      "overwrite": false,
      "html": true,
      "json": true,
      "charts": true
    },
    "video": false

Please help me on above issue.
Chrome OS auf dem MacBook oder Notebook installieren
Tags: technik, chrome, chromeos, chromium
Published: 2020-08-19 14:37:47

---
title: Chrome OS auf dem MacBook oder Notebook installieren
published: true
date: 2020-06-29 06:09:00 UTC
tags: Technik,chrome,chromeos,chromium
canonical_url: https://j0e.org/chrome-os-auf-dem-macbook-oder-notebook-installieren/
---

![Chrome OS auf Macbook installieren](https://j0e.org/wp-content/uploads/2016/09/Chrome-OS-Macbook.png)

Chrome OS bzw. Chromium OS ist ein schnelles Betriebssystem von Google, welches sehr geringe Hardwarevoraussetzungen …

Der Beitrag [Chrome OS auf dem MacBook oder Notebook installieren](https://j0e.org/chrome-os-auf-dem-macbook-oder-notebook-installieren/) erschien zuerst auf [WordPress und Marketing](https://j0e.org).
Medium.com used local storage to check limited access ?
Tags: discuss
Published: 2020-06-29 06:04:47

When you read a post on medium.com you may be reach to limited access and a popup required an upgrade plan appeared

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/95smyfvpf73uzrzwd39y.png)

But when I open that post in incognito windows or clear local storage of browser then I login again, I can access that post easily.
I think medium.com should save reading count in database and handle response from server.
What do you think about this problem ?
How to enable T.L.S 1.2 in R-Serve
Tags: security, devops, rserve, linux
Published: 2020-06-29 05:24:21

About one year back when i first took up the task of enabling TLS 1.2 in some of the components in our technology stack. it felt like a very tough job because of two major reasons listed below.

1. I belong to the fraternity of Front End Developers who are majorly known for their lack of in depth knowledge of devops and backend. 
2. There was a lack of proper documentation and i had to do a lot of googling around,because most of the famous tech platform cover very little about these less known topics or otherwise blame it to poor SEO measures taken by those bloggers who cover topics like this. 

we can't blame them because SEO is something that has more to do with front end development than backend or devops.

I will be noting down a lists of basic tasks to perform in order to enable TLS in Rserve. also i will be adding more posts to give you insight of some sub-topics i.e. (how to generate private/public key, or how to test if tls1.2 is enabled etc.).

P.S : Please note that these steps are for Rserve on Linux.
P.P.S : this is my very first blog post.

Here we go.....

Step 1: Generate a *private key* and self-signed certificate (i will be covering this in another post soon).

Step 2: install *libssl-dev* first in your linux machine and then install Rserve, So Rserve is compiled with TLS support.

Step 3: Edit/Add */etc/Rserv.conf* file, and following parameters.
```      
      remote enable
      plaintext disable
      encoding utf8
      qap.tls.port <port for SSL/TLS channel> // 6311 by default
      tls.key <private key KEY file>
      tls.cert <server certificate CERT file>
      gid 1001
      uid 1001
      qap disable
      maxinbuf 4194304
```
Step 4: Start Rserve. With this action, a server is created to listen to the TLS port.

Step 5: Run following openssl command to test

```
      openssl s_client -connect localhost:6311 -tls1_2
```

This should help you successfully enable TLS 1.2 in your rserve application. feel free to write to me or comment below in case you are facing any issues.
5 Projects that I built to get started with ReactJS
Tags: javascript, react, html, webdev
Published: 2020-06-29 05:21:07

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/rji7adsfoax0q8eg634a.png)
Hello fellow Community members,

Below are the 5 projects I made using <b>ReactJS</b> for practice and the <a>freecodecamp.org</a>'s Front-End-Libraries Certification.

> ReactJS Calculator

https://codepen.io/aditya_pandey/full/ExPmJKQ

> Drum Machine

https://codepen.io/aditya_pandey/full/LYGReWZ

> Markdown Previewer

https://codepen.io/aditya_pandey/full/jOWVwjZ

> Pomodoro Clock

https://codepen.io/aditya_pandey/full/KKVvPxe

> Random Quote Machine

https://codepen.io/aditya_pandey/full/NWxbvxX

Your thoughts on these will be highly appreciated. 🙏🏼

Resources I used to learn React (still learning :)):
* [Freecodecamp](https://www.freecodecamp.com)
* [Uiodotv YouTube Channel's React BootCamp](https://www.youtube.com/channel/UCbAn7pVK2VIyo-UysfWGdZQ)
* [Bob Ziroll's course on Scrimba](https://scrimba.com/course/glearnreact)

and a lot of google searches.


Also, If anyone of you is starting out in web development and is from the non-tech background and need any kind of advice, feel free to reach out to me through Twitter or LinkedIn. I will try to help you with some pointers from my journey.

Happy Coding !!
So You Think You Know Kpop (Android App)
Tags: android, java
Published: 2020-06-29 05:20:37

# Summary
Built a celebrity guessing app as part of clip #84 of *The Complete Android 8.0 Oreo Developer Course by Rob Percival and Nick Walter*. 

The goal of this exercise was to practice downloading things from the internet using AyncTask (which is actually deprecated...). 

Deviated somewhat from the task at hand as the website used in the course is no longer available. So I drew inspiration from Kpop. 

# Code
{% github kuanp/SoYouThinkYouKnowKpop %}

# Screenshot

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8coqnlasuu1mv94j1i83.png)

## Main Challenge
The biggest challenge for this assignment is finding a website that has nice looking HTML to parse. I sourced content from https://kingchoice.me; this website contains a lot of "celebrity lists" with nice HTML.  
For example: https://kingchoice.me/topic-hot-100-kpop-idols-rankings-2019-close-dec-31-1225.html

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

I also found it to be overly tedious to try to create a regex to search through HTML. After all, it's semi-structured information, so instead I used [Jsoup](https://jsoup.org/) to parse the HTML and get the elements I needed. Others may want to do the same. Tutorials: [link](https://medium.com/@princessdharmy/getting-started-with-jsoup-in-android-594e89dc891f)

## Additional interesting things of note
* Used Java8; the stream / lambda paradigm is very powerful
* Used Lombok; its EqualsAndHashCode capability is great for deduping objects. 
* Always fun to try to break the logic into many classes
* Was too lazy to properly handle exceptions. Oh well...
* Wonder how to use Futures or other concurrency features; pretty sure I locked UI thread while loading stuff for this one.
YouTube Video | Understanding React Context API -1
Tags: react, javascript, youtube, showdev
Published: 2020-06-29 05:16:45

I had recently started my YouTube channel — The Web Dev. I had decided to start putting all my blogs into the YouTube channel.

Here, we will create a small translation app using the new Context API in ReactJS.

In the first part we will see the two ways to use Context API in a class based system.

{% youtube n9xnD6Umgnc %}

Please do like it and [Subscribe](https://www.youtube.com/channel/UCRf7mazcufqZxd2pR3oQJuQ?sub_confirmation=1) to my channel for more videos.

You can also read the complete blog here -

https://thewebdev.tech/react-context
Why do all README.md  basically look the same?
Tags: webdev, opensource, beginners, github
Published: 2020-06-29 05:08:37

***Note- This is my first ever public post. Please feel free to give me constructive criticism.***

Modern day web development is full of powerful, fun, and important software technologies.They come in many different configurations that can include things such as programming languages used, underlying dependencies, system architecture, licenses  etc. 

When a newbie developer such as myself lands on a popular web framework on Github. I am usually very overwhelmed by seeing so many folders, many files with different file formats,lockfiles et cetera. These things are different for different projects but one thing they all have in common is the README file. 

I have seen README from many different projects and they all basically had the same structure. Interestingly, README is part of the [GNU Coding Standards(a systematic way of writing programs)](https://www.gnu.org/prep/standards/standards.html#index-README-file), most Open Source projects are written in loose accordance with the standards. I always thought only .md or Markdown files formats  work as README. But on the contrary even .txt , .me and other file formats generated by build systems can be utilized. 

According to the GNU standards the release software README should have the following:-
     - Package Name
     - Package Version number
     - General Description of package 
     - Installation guide 
     - Brief explanation of directory structure
     - Copying condition(basically the license)
  
Most popular open source projects use this structure to tell the users about the project. Projects that use GNU build tools which follows the GNU coding standards automatically generate README with the following structure listed below. One thing to keep in mind is that this is not a strict requirement or specification. Some projects do not follow this structure but most professional ones do. Lets see if React has all of the categories covered. Click on the links it will take you to the corresponding page on React repository. 

  [README](https://github.com/facebook/react#react) - Yes, has a short description, version number. 
  [Authors](https://github.com/facebook/react/blob/master/AUTHORS) - Yes, facebook and thousands of individual contributors
  [Acknowledgements](https://react-cn.github.io/react/acknowledgements.html)  - Yes, basically thanking lot of contributers
  [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md) - Yes, all the new changes in each release version
  [News](https://github.com/facebook/react/releases)-Yes, New releases for users is here
  [Install](https://github.com/facebook/react#installation)- Yes, u can also  use [Create a New React App](https://reactjs.org/docs/create-a-new-react-app.html)(JS toolchain)
  [License](https://github.com/facebook/react/blob/master/LICENSE)- Yes, MIT license
  [Bugs](https://github.com/facebook/react/issues)- Yes, not listed as Bugs but issues sections usually talks about the bugs
  [Contributing](https://reactjs.org/docs/how-to-contribute.html)- Yes
Debug Mobile Websites with Chrome & Android Chrome
Tags: html, javascript, webdev, debugging
Published: 2020-06-29 05:06:51

Do you already know this cool Google Chrome feature?
![Remote devices tools](https://dev-to-uploads.s3.amazonaws.com/i/pf2nhf330alxsfv08n2h.png)

This allows you to debug your websites directly on your Android device. All you need to do is:
1. Enable USB Debugging on your device
2. Connect it to your computer
3. Open Chrome on your mobile device
4. Open the Chrome dev tools on the computer
5. Click on the 3 dots menu > More tools > Remote devices
6. Select the device and allow USB-Debugging on your mobile device.
7. Click the "Inspect" button for the site you want to debug: ![Inspect button](https://dev-to-uploads.s3.amazonaws.com/i/uhw2y4oc4tci7k1tqy09.png)
8. DEBUG! ![Remote debug](https://dev-to-uploads.s3.amazonaws.com/i/9xodi8zhvues8pw6ax28.png)
In bootcamp, I saw fire
Published: 2020-06-29 04:58:14

I join a bootcamp in November.
I luckily finish the first 5 weeks.
We go for break.
I don't come back(because I had no fee for next level).
6 months later,I luckily got back.
I see stars. _(Who pass me out?)_😂
Two months later, I regain consciousness.
Should I go back or do some warm-up?
Chapter 15 and Chapter 16 and chapter 17
Tags: functional, programming, kotlin
Published: 2020-06-29 04:23:32

Pure functions are memoizable

Memoization is an optimization technique used primarily to speed up computer programs by storing the results of expensive function calls and returning the cached result when the same inputs occur again.

Benefits of pure functions:
-They're easier to reason about
-They're easier to combine
-They're easier to test
-They're easier to debug.
-They're easier to parallelize

Other benefits:
-They're idempotent
-They offer referential transparency
-They are memoizable
-They can be lazy.

"The IO monad does not make a function pure. It just makes it obvious that it's impure".

Pure function signatures tell all.
When a function is pure its signature lets you make very strong guresses at what it does -even when you can't see the function name.
Your github repositories: chaos or order?
Tags: javascript, webdev, discuss, watercooler
Published: 2020-06-29 04:22:45

---
title: Your github repositories: chaos or order?
published: true
description: Are there any organizational tips you would recommend to keep one's GitHub account clean and attractive?
tags: javascript, webdev, discuss, watercooler
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/yzp5cxxlafgfolgu81w7.jpg
---

Do you keep your GitHub repo list in order by cleaning it regularly and keeping the apps up to date? Or you prefer storing a pile of experiments there to avoid losing some important one (or for any other reason)?

Are there people ho have several GitHub accounts (for work and personal needs)? How do you deal with that at all? 

_(the cover image by [Jordan Beltran](https://unsplash.com/@jorenriqe) kinda illustrates my own situation now, so I'm seeking for a way outta here)_ 😁
Counting Valleys Code Challenge Solved
Tags: javascript, webdev, beginners, hackerrank
Published: 2020-06-29 04:09:55



A valley is a sequence of consecutive steps below sea level, starting with a step down from sea level and ending with a step up to sea level.

Given Gary's sequence of up and down steps during his last hike, find and print the number of valleys he walked through.

For example, if Gary's path is s=[DDUUUUDD], he first enters a valley 2 units deep. Then he climbs out and up into a mountain 2 units high. Finally, he returns to sea level and ends the hike.
Gary is an avid hiker. He tracks his hikes meticulously, paying close attention to small details like topography. During his last hike he took exactly n steps.

For every step he took, he noted if it was an uphill, U, or a downhill, D step. Gary's hikes start and end at sea level and each step up or down represents a 1 unit change in altitude.



#On Hackerrank change this function :JavaScript
#function countingValleys(n, s) {
    let e= 0;
    let travel = 0;
    for (let i = 0; i < n; i++) {
        if (s[i] === "D") {
            --e;
        } else if (s[i] === "U") {
            if (++e === 0) travel++;
        }
    }
    return travel;
}
##

[Here Link]( https://www.hackerrank.com/challenges/counting-valleys/problem?h_l=interview&playlist_slugs%5B%5D=interview-preparation-kit&playlist_slugs%5B%5D=warmup)
full details here: https://www.hackerrank.com/challenges/counting-valleys/problem?h_l=interview&playlist_slugs%5B%5D=interview-preparation-kit&playlist_slugs%5B%5D=warmup