teleren/devto huggingface dataset:
Turning my Kitchen Table into an Office Suite using Virtual Reality
Tags: firstpost, virtualreality, workstations
Published: 2020-11-24 19:27:26

Across the entire workforce and across all of the world we are adjusting to new lifestyles. Before this year working from home was a rarity. We all expected to be in the office for almost a full week every week and could rely on our homes as an escape for relaxation from a long week of commuting to work, but the pandemic changed all this and its been a struggle to work in the few places that can be quiet and peaceful in a one bedroom apartment or a even house full of family. This was a problem for me in particular because I have a one bedroom apartment which has no space for an "office" so i'm working at my kitchen table.

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

Working from home was becoming overbearing for me. My "office" felt cramped, but i was making the best of it. I bought an iPad and set that up as a second screen using sidecar as an initial solution and while this helped with productivity by increasing my screen space, it did nothing for the hustle and bustle going on in my house. I could still see my dog begging me for treats and attention, I could still see the TV just across the room on the wall, and I could still see my girlfriend walking back and forth to the kitchen, bathroom, front door etc... this was when I had a thought ... Could I use my Oculus Go to make this better?

 
That’s when I started down the VR road. I found an app that works for most all Oculus headsets. (Im sure others as well i've only tested oculus headsets thought) It also works with Mac, Windows, and Linux machines so I gave it a shot with my Oculus Go from over 2-3 years ago. I downloaded Immersed on both my Mac and Go and started it up, after a few minutes I was in a full on virtual environment with up to 4 HUGE virtual displays. Now not only did I have my additional monitors but I was also working in an environment of my choice completely away from all the distractions in my room.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/qs24mu3ww2wtw5ghpeil.png)
This is an example and not my actual workspace but all this is available in immersed 

Now I have a huge office in the small space of just my desk. After working for about a week with the a Go I decided to purchase the new Quest 2 which has a hand tracking feature which the Immersed team has used to track your keyboard into your virtual environment! There are a ton of features that make quality of life while working better like: private rooms for screen sharing/white boarding/collaboration, virtual webcam so you can join zoom meetings with your Oculus characters, up to 4 additional VIRTUAL displays (without the need for physical displays), and they are continuously adding much more.

 

Here are some blog post from the immersed team!:

https://blog.immersed.team/working-in-vr-8-hrs-day-e8308b6791f0

https://uploadvr.com/immersed-real-keyboard-support/

Here is also a link to the Immersed website as well:
https://immersedvr.com/
How to avoid reset Javascript variables when refeshing page?
Tags: javascript, html
Published: 2020-11-24 19:14:32

Everytime we refresh the page, the variables go back to zero (null) instead of the value we provided or it is stored by calculating the equation we wrote in the program. But we want our code to store those values as long as we want to keep it.
This article will be discussing the method to avoid this problem. We’ll discuss the code and other things.
#Cause
Everytime we refresh the page, the variables go back to zero because everytime we refresh our code reinitializes.
 
##Solution

In order to avoid the reinitialization, we need to store the data somewhere else. We can store it either in a cookie or localstorage.


[Read more](https://kodlogs.com/blog/2132/how-to-avoid-reset-javascript-variables-when-refeshing-page)
Snippet by JS Mates: Find common items from two arrays
Tags: javascript, codenewbie, 100daysofcode, tutorial
Published: 2020-11-24 19:14:14

![Find common items from two arrays](https://dev-to-uploads.s3.amazonaws.com/i/a5isgiiy7ptu2xfb69cb.png)

For accessibility of the snippet, check out the URL
https://jsmates.com/blog/find-common-items-from-two-array-in-javascript
What does slice do with no arguments?
Tags: javascript, html
Published: 2020-11-24 19:09:30

The slice() function method returns a copy of a section of an array or string into a new array or string object selected from start to end. The terms start and end represents the index value of the items in that array or string. Although the original array or the string will not be modified. slice() function simply copies the items into the new returned array or the string.

The syntax of using slice() in an array is arr.slice(start, end)
By looking at the syntax of the slice() function, we can understand that we have to provide the starting and ending index of the elements to select the portion. 
The first element has index 0 and if we want to start selecting from the end then we can use negative numbers. But the main question of this article was what if we use slice() function with no arguments in it?
#What does slice do with no arguments?
[Read more](https://kodlogs.com/blog/2138/what-does-slice-do-with-no-arguments)
My #100DOC - Day 90
Tags: 100daysofcode, challenge
Published: 2020-11-24 19:07:56

### Day 90: November 24, 2020

#### **Today's Progress**: 
1. **[PSP, studying the Threads](https://github.com/pablohs1986/dam_psp2021)** (2h):<br>I played with the basic methods of the threads, doing various exercises.
    
#### **What I learned**: 
* Use of the different methods of the threads.

#### **Total time**:
2h.
My #100DOC - Day 89
Tags: 100daysofcode, challenge
Published: 2020-11-24 19:07:30

### Day 89: November 23, 2020

#### **Today's Progress**: 
1. **[DI exercises](https://github.com/pablohs1986/dam_di2021)** (1h 30min):<br>I started doing basic exercises, learning how to pass information from one screen to another.
    
#### **What I learned**: 
* How to pass information from one screen to another.

#### **Total time**:
1h 30min.
How to set a jinja variable to Javascript?
Tags: html, javascript
Published: 2020-11-24 19:07:29

This article will answer the question “how to set a jinja variable to javascript?”. Before answering this question, the important question is that **if it is possible to set a jinja variable to javascript.** 

Python is the server language and jinja is a templating engine for python. Jinja makes it easy to generate HTML without writing it directly. Javascript is our browser’s scripting language, so it will be running on the client's browser once the HTML has been generated and served.

And **it is not possible to use javascript to set jinja variables.** And it is not possible because there are no jinja variables in the rendered HTML sent to the client.

Now the question **is that is there a way so we can set a jinja variable to javascript.**

Yes! There is a way.
[Read more](https://kodlogs.com/blog/2139/how-to-set-a-jinja-variable-to-javascript)
My #100DOC - Day 88
Tags: 100daysofcode, challenge
Published: 2020-11-24 19:07:04

### Day 88: November 22, 2020

#### **Today's Progress**: 
1. **[PSP, studying the Threads](https://github.com/pablohs1986/dam_psp2021)** (2h):<br>I started studying the threads, taking a look at the theory and starting with the exercises.
2. **[Continued with Confección y Publicación de Páginas Web Course](https://github.com/pablohs1986/confecci-nYpublicaci-nDeP-ginasWeb_SEPE)** (2h):<br>I did some JavaScript exercises.
    
#### **What I learned**: 
* How to create threads in various ways.
* Review of JavaScript sintax.

#### **Total time**:
3h 30min.
My #100DOC - Day 87
Tags: 100daysofcode, challenge
Published: 2020-11-24 19:06:41

### Day 87: November 21, 2020

#### **Today's Progress**: 
1. **[File Java Class](https://github.com/pablohs1986/dam_ad2021)** (1h 30min):<br>Today I learned how to make a method that detects a word or phrase in a text file and replaces it with another.
2. **[Continued with Confección y Publicación de Páginas Web Course](https://github.com/pablohs1986/confecci-nYpublicaci-nDeP-ginasWeb_SEPE)** (2h):<br>I did some JavaScript exercises.
    
#### **What I learned**: 
* How to use the Split method correctly.
* Review of JavaScript sintax.

#### **Total time**:
3h 30min.
My #100DOC - Day 86
Tags: 100daysofcode, challenge
Published: 2020-11-24 19:06:21

### Day 86: November 20, 2020

#### **Today's Progress**: 
1. **[File Java Class](https://github.com/pablohs1986/dam_ad2021)** (2h):<br>I keep going through the File class, doing exercises with FileReader and BufferedReader. I read a CSV file with weather information and calculated the day of the year with the highest maximum temperature.
    
#### **What I learned**: 
* How to access a CSV file and extract information.

#### **Total time**:
2h.
My #100DOC - Day 85
Tags: 100daysofcode, challenge
Published: 2020-11-24 19:06:01

### Day 85: November 19, 2020

#### **Today's Progress**: 
1. **[PMDM, preparing the environment](https://github.com/pablohs1986/dam_pmdm)** (1h 30min):<br>I installed Android Studio and made the necessary configuration to start working with it.
    
#### **What I learned**: 
* How to install Android Studio and configure it.

#### **Total time**:
1h 30min.
How to remove newline characters from the string in Javascript?
Published: 2020-11-24 18:46:58

To keep long concatenation output readable, javascript provides newline characters. The newline character creates line breaks within the output of a string.
This article discusses how to remove newline characters from the string in javascript.
#Methods
There are two methods to remove all line breaks from a string using javascript

   * Using loop
   * Using regular expression

##Using loop
In this method, we run a loop and visit every character of the string and slice them so that it removes the newline character.
Here, the for loop just copies all the characters which are not newline. After that we just return the variable in which we copied the characters.
```
var newstr = ""; 
for( var i = 0; i < str.length; i++ )  
    if( !(str[i] == '\n' || str[i] == '\r') ) 
        newstr += str[i]; 
```

[Read more](https://kodlogs.com/blog/2148/how-to-remove-newline-characters-from-the-string-javascript)
Typescript & reducer actions
Tags: typescript, react, webdev
Published: 2020-11-24 18:41:55

I'm still learning Typescript. I like it, but sometimes it can feel like it's getting in the way.  With React state reducers it seems all too easy to duplicate action types.

The following example tidies up the use of dispatch actions by taking an array of action names, creating a Union type from that array, and then creating an Action and Record type from that Union.

```typescript
const actionsTypes = [
  'COMPONENT_STATE_VALID',
  'COMPONENT_STATE_LOADING',
  'COMPONENT_STATE_COMPLETE',
  ...
];

type ActionTypeUnion = typeof actionsTypes[number];
type Action = { type: ActionTypeUnion };
type Actions = Record<ActionTypeUnion, Action>;

const actions: Actions = actionsTypes.reduce(
  (acc, type) => ({ ...acc, [type]: { type } }),
  {},
);
```

This is pretty concise and gives us great type support when implementing an action e.g. `dispatch(actions.COMPONENT_STATE_VALID)`
How to add another field to a JSON object?
Tags: html, javascript, json
Published: 2020-11-24 18:41:49

In this article we will see how to add another field to a json object. I know if you are looking for the answer to this question then you already know much. But we’ll take a look at some things.

JSON is a lightweight data-interchange format. JSON is easy for us to read and write.
#How to add another field to a JSON object?
You can ask this question in another way which is “How do I add a new attribute or element to a JSON object using Javascript?”
As we know JSON is JavaScript Object Notation. Actually a string is a JSON object that has to be converted into the object it represents.


[Read more](https://kodlogs.com/blog/2158/how-to-add-another-field-to-a-json-object)
Can you have a while loop inside if condition?
Tags: html, javascript
Published: 2020-11-24 18:39:27

The question we will discuss in this article is “can you have a while loop inside if condition?” 
**Yes!!!** We can have a while loop inside a if condition. The if statement only is condition if that happens then do this otherwise follow the other statement and the while loop is the repetition statement. We can use while loop inside an if statement as a conditional statement.
#If statement
Programs use selection statements to choose among other paths of actions. For example: If a student's grade is greater than or equal to 60 then print “passed”. The if statement is a single-entry/exit statement. 
 
##While loop
A repetition/loop statement specifies that a program should repeat an action while some condition remains true. 

[Read more](https://kodlogs.com/blog/2169/can-you-have-a-while-loop-inside-if-condition)
How to change buttons content in Javascript?
Tags: html, javascript
Published: 2020-11-24 18:31:10

When we create a button in HTML we give the button a name for example “click here”,”next” etc. Whatever we do to our page the text in the button remains the same but in this article we will change button text onclick. 
Changing button text onclick means when we click on button the text on the button should change. For example: assume our button has “start” as text but after we click on button the text of the button should change to “stop”.
#Approach

We will create a function to do that and assign it to the button. Here’s how

*    Create a new variable.
*    Get it by element id.
*    Check if the text is okay or you want to change it.
*    If you want to change it then assign the new text to it.
*    After that assign that function to the button. ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/p9p5up8jqnpd7kc5y3ad.png)

I have added code image but if you want to read more, [check this](https://kodlogs.com/blog/2171/how-to-change-buttons-content-in-javascript)

Hope this will help.
S2E5 Learn JMeter Series - Regular Expression Extractor
Tags: performance, webperf, testing, tutorial
Published: 2020-11-24 18:29:08

Welcome to Learn JMeter Series!

In this season two, episode five, you will learn following:

🔹 Regular Expression Extractor in JMeter

{% youtube ngguEWtjM9o %}

☑ Buy me a tea 🍵 : https://www.buymeacoffee.com/qainsights
☑ [My Blog](https://qainsights.com)
☑ [My Udemy Course](https://www.udemy.com/course/performance-testing-using-truweb)
Can an html button have two onclick function?
Tags: html, javascript
Published: 2020-11-24 18:23:40

The question we will discuss in this article is “Can an html button have two onclick functions?”
Answer to the above question is YES!!! We can have two onclick functions in a single HTML button. Onclick just calls or invokes the functions we add to it. So, we can use two functions in a single HTML button.
#How?
It is possible to use two functions in a single button because in the button tag we are invoking functions by clicking that particular button. Understand the working by assuming the onclick property as a function. As we know we can add one or more functions in a function. In the same way we can use one or more than one functions inside onclick property. 
Although it is not recommended to use more than one function inside a button because it will look nasty. We should keep our code as clean as possible. This will help us and other programmers to work on that later.

**I have answered the question above, this is it**
But there is an alternative way, if you want to read that, [check this link](https://kodlogs.com/blog/2184/can-an-html-button-have-two-onclick-function)
TECHNICAL CO-FOUNDER NEEDED
Tags: discuss
Published: 2020-11-24 18:22:31

Hi, there my name is Khalid Ismail am a front-end engineer, so I have an idea I have been working on.

It's a fintech solution that let you bank, pay bills, transportation, and a lot more packed in a single app, this also let users bank with their social media platform like Messenger, Whatsapp without having to open an app or stop their chatting.

so am looking for a technical founder who is dedicated to making this product come to life, if you feel like you are the one you can reply to this post in the comment section or email me at kabcoder@gmail.com so that we can talk further about features and how we would build this app.
Leetcode Problem 260: Single Number III
Tags: leetcode, python, algorithms
Published: 2020-11-24 18:20:20

Hi! Welcome to today's post which is a solution to Leetcode Problem 260. This question is a Medium level difficulty question. Here's the solution on GitHub https://github.com/ashwins-code/leetcode-solutions/blob/main/medium/problem260-single-number-iii.py



#### The Question



Given an integer array nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once. You can return the answer in any order.


```
Example 1:

Input: nums = [1,2,1,3,2,5]

Output: [3,5]

Explanation:  [5, 3] is also a valid answer.


Example 2:

Input: nums = [-1,0]

Output: [-1,0]


Example 3:

Input: nums = [0,1]

Output: [1,0]
```


#### Solution

We can start off with an empty list (*ans*) and go through the *nums* list. For each element in the *nums* list, we append this to *ans* if we haven't encountered this element before (we know this by checking if the element is already in *ans*). If we have encountered it, remove this element from *ans*. After we have finished iterating through nums, *ans* should only contain the numbers which appeared once. Here's an example

```
nums = [1,2,1,3,2,5]

ans = []

Go through nums

1 => add this to ans as we have never seen this before (ans = [1])

2  => add this to ans as we have never seen this before (ans = [1, 2])

1 => remove this from ans as we have seen this before (ans = [2])

3 => add this to ans as we have never seen this before (ans = [2, 3])

2 => remove this from ans as we have seen this before (ans = [3])

5 => add this to ans as we have never seen this before (ans = [3, 5])


Ans now has the correct answer
```




#### The Code

```python
class Solution:
    def singleNumber(self, nums: List[int]) -> List[int]:
        ans = []

        for i in nums:
            if i not in ans:
                ans.append(i)
            else:
                ans.remove(i)
        
        return ans
```
Methods to create an html executable file
Tags: html, application, exe, windows
Published: 2020-11-24 18:15:15

This article focuses on the approach of creating an executable file using html, css and JavaScript. First and foremost, it is possible to create an executable file using HTML in case you are wondering. 
What is an executable file?
Executable file performs numerous functions or operations on a computer. But it can’t be read since the executable file is produced after the process of compilation. Depending on the operating system there are different extensions of executable files. Some file extensions of executable files are .EXE, .BAT, BIN, .DMG and many more.

#Methods
* Microsoft Visual Studio Express.
* Npm package also known as Electron.
* Cordova by Apache foundation.
* Proton Native.

These are the tools you can use to create a executable file using HTML. If you want to create an application and needed steps to create. [Check out this link](https://kodlogs.com/blog/2188/how-do-i-create-an-html-executable-file)
How To Learn A Programming Language 
Tags: codenewbie, beginners
Published: 2020-11-24 18:02:24

[Note: This post does not include any affiliates link, just a free course link at the bottom]
For a new Software Engineer, they need to learn a lot of things and for sure they need to take a look at a certain programming language and learn how to use it effectively and correctly.

Some people learn by seeing a YouTube tutorial, others may be going to a conference or reading a book. There is nothing wrong with any of these but you want to be able to take advantage of all the language features which can make your life easier and write better software.

So, how we learn a Programming Language?

##Poke through the documentation
This is the best way to see what the language has. I know the documentation is boring sometimes and not that exciting. But, it is the best place to know all the language functions and capabilities. 
There is no better place than this no matter how the documentation looks like.

##Practice by project
I recommend this after reading the entire documentation. For sure it will be hard at the start, but later on, you will pick up the pace and become much better at it.

##Read book
I know, you are wondering where is the YouTube and Udemy courses in the list. Well, we want you to be professional in this language as you might use it for several years. Books in my opinion are the best source, it takes the documentation and applies it to real-world cases.

##Talk to fellow developers
I used to think that I have to do everything myself. You don't need to, just go to LinkedIn and look for fellow developers who have been using the same language and ask them what resources they used and if they can help you. I guarantee you almost everyone you contact will help you as simple as that.

##Online Courses and YouTube
Not because they are bad I list them at the end. But, they usually touch the surface of language capabilities. They can give you a good start, but it will not go deep as the other sources. Many times you might have questions and you will not find someone to answer them. Still, not a bad way to learn.

We hope you enjoyed this post, please Heart it and follow us.

If you a new software developer, join our free course to help you get started
https://landing.advancedsoftware.io/software-developer-guide

Other Related Articles
{% link https://dev.to/advancedsoftwareofficial/5-tips-for-new-software-developers-2ki1 %}
How to deploy our web application to Netlify :
Tags: webdev, netlify, deployment
Published: 2020-11-24 17:48:40

# __What is Netlify :__
* Netlify is a platform through which we can host our web applications and the best part that it is free .
* We can integrate our application with git for continuous deployment .
* Once we make some changes to our source code and push it to our github repo then site automatically changes without a downtime .

## __Add your Site :__
![new site](https://cdn.netlify.com/cecd5004623205e93de7a840c2b47f1c5674e792/f667f/img/blog/add-new-project.png)

## __Link to GitHub :__
![Link to github](https://cdn.netlify.com/0a36819500c2254f84301d10e6ecbd1e0f20f143/c7374/img/blog/create-new-site.png)

## __Authorize netlify :__
![Authorize](https://cdn.netlify.com/0acaae3eeca45e37481187030ffc0c981ec2172e/e4fb0/img/blog/authorize-github.png)

## __Select your repo :__
![select your repo](https://cdn.netlify.com/b429c96d703c49639ef0d78a789af4a656bb06dc/97b2e/img/blog/choose-repo.png) 

## __Configure the setting :__
You can add your branch which branch you are currently working on . 
![configure](https://cdn.netlify.com/47f0bbb70a0dcafb0340f296296df43d21d68366/dd351/img/blog/config-your-repo.png)

## __Deploy setting :__
![settings](https://cdn.netlify.com/3b0f4ebe3a738e26695408e2ad541cf45d3d2a0a/75a0f/img/blog/done-1.png)

## __ALL DONE :__
Enter your Domain name and ready to go you can then see a live URL and to check if it is working make some change in the source code .
Git-less development
Tags: webdev, tools, dx
Published: 2020-11-24 17:33:08

---
title: Git-less development
published: true
description: Too much of the DX (developer experience) is negatively impacted by a dependency on build tools and deployment pipelines.
tags: webdev, tools, dx
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/owso4m3crz31a8om0e2b.jpg
---

Too much of the DX (developer experience) is negatively impacted by a dependency on build tools and deployment pipelines.
 
GLD (git less development) solves this by allowing you to work directly on the production server.
 
No build, no deployment, no testing!
 
Your code is solid gold anyway, so why the heck not?!