teleren/devto huggingface dataset:
📦Unity - Testing Multiplayer locally
Tags: unity3d, opensource, multiplayer
Published: 2021-02-19 09:04:37

**Would you like to build a multiplayer game in Unity and playtest it locally?** 
-> Then stay tuned and follow me for more Unity multiplayer content!

###Background

So, In my current project i' m developing a multiplayer game in Unity. Now it came to the fact that I wanted to test multiplayer functionalities quickly and without much effort. To build the project every time I wanted to test a functionality seemed way too much work. After some research and several paid options I found [ParrelSync](https://github.com/VeriorPies/ParrelSync). A free OpenSource extension for Unity.

Parrel Sync creates one or more clones of your project, which are synchronized with your main project. If you start the game in the open windows you can test all multiplayer features.

###Installation

To start the installation it is recommended to use a version control system like [Git](https://git-scm.com/) or [SVN](https://subversion.apache.org/). 
However, to install the extension it' not enough to search for it in the AssetStore. The [latest release](https://github.com/VeriorPies/ParrelSync/releases) of the extension can be found on Github. Here you have to download the .unitypackage file (ParrelSync-*version*.unitypackage
).
After that you can import the .unitypackage file into your project in the Unity Editor under "Assets => Import Package => Custom Package...". *ParrelSync* should appear at the top of the menu bar without restarting the editor.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7e0ctlfwcerptqqyqhuz.png)

###Usage
To create a clone of the current project click on "ParrelSync => Clones Manager => Create new clone". ParrelSync will now copy the entire project into a new project folder. This may take a short moment. After that you can start the clone via the Clones Manager with "Open in New Editor".
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lbgwz1yjn33eaxfe8a2a.png)
By starting both instances you can test a multiplayer game directly in Unity.

###Conclusion
I made very good experiences with ParrelSync and can highly recommend to use the tool to locally test a Unity multiplayer game.

Thank you for reading this post. If you have any questions or suggestions, feel free to comment. If you want to learn more about Unity Multiplayer be sure to follow me.
I hope this post could save you some time of searching.
How to plan articles in 3 steps
Tags: writing, blogging, contentcreation
Published: 2021-02-17 18:54:47

---
title: How to plan articles in 3 steps
published: true
description: This is how I generally try to go about writing my articles
tags: writing, blogging, contentCreation
---

I've been trying to develop a more concise way to structure my article before I write them. That is, the process I go through before I even open vscode and start typing away.

This is a high-level view of my process that I would like to share as I've found it quite productive. It isn't some revolutionary new way of doing things. I had a google, read what other people had done, and made a patchwork copy to suit my style of doing things. Maybe you'll be able to take something from it that will help you.

## Making notes before you start

This may seem obvious but it's quite essential to get your head in the right place and not have wild thoughts taking over as you write. By taking notes when you are learning "the thing" and having them available pre-writing, you're saving yourself time and headaches later. Once you have your notes you are ready to begin the process of brainstorming your article.

## The pre-writing steps

I like to use [Notion](https://www.notion.so) to configure my plan before I begin writing. The flow goes something like this:

### Step 1:

- Collect knowledge through doing the thing
- List out all the headers as high-level topics - unordered (Notion allows you to drag and reorder everything because it's all built on blocks 😎)

### Step 2:

- The article should begin by answering the question: `What is this article for?` Not literally, but posing a question around the article's main topic and giving a short, concise answer draws the reader in while giving them a brief overview of what to expect.
- Pick a title that is clear and descriptive
- The first paragraph of every section should support the title and add context
- Organize the headers so that they are in order and they flow. It could mean deleting any that no longer make sense.

### Step 3:

- Go through each step and add content. The content should support the heading and add context so that the reader can follow along.

Once I have my headers in order and have written a short paragraph for each one, I switch over to vscode and begin laying out the article. I find this method of planning enables me to focus on what I need to convey to the reader for them to get the most from what I'm writing.
Microsoft Automate / Flows: Remove Duplicates From an Array Variable.

Tags: dynamics365, powerautomate, array, duplicate
Published: 2021-02-19 08:39:32

Use of Joins and Union () in flow.

In my Scenario, I'm a getting a large number of contact GUIDs which are duplicate, and I have to send them an email once, so I had to filter the array which I received.


In The Above Image: We have an array variable named as Product Leader, to remove duplicates we used the Union function in the last step.




I hope you enjoyed reading this article and learned something new!!!
If you have any questions or comments about this topic, please let me know in the comments section below. 

my original blog post [Link](https://www.dynamics365crm.org/post/microsoft-automate---flows-remove-duplicates-from-an-array-variable)


Rishi
กำหนด limit CPU/Memory ให้กับ Docker ที่รันบน WSL 2
Published: 2021-02-19 08:32:58

##ขั้นตอนการกำหนดค่า limit CPU/Memory

- สร้างไฟล์ `.wslconfig` ที่ `C:\Users\<yourUserName>` โดยการเปิด Windows Terminal/CMD/PowerShell แล้วรันคำสั่งด้านล่างนี้

```bash
notepad "$env:USERPROFILE/.wslconfig"
```

- แก้ไขไฟล์ `.wslconfig` ดังนี้

```config
[wsl2]
memory=4GB # Limits VM memory in WSL 2 up to 4GB
processors=2 # Makes the WSL 2 VM to use 2 virtual processors
```

- Shutdown WSL 2 VM โดยการเปิด Windows Terminal/CMD/PowerShell แล้วรันคำสั่งด้านล่างนี้

```bash
wsl --shutdown
```

> หรือรันคำสั่ง `Restart-Service LxssManager` กับ PowersShell แบบ Administrator

- Restart Docker Desktop เพื่อให้การตั้งค่าใหม่ทำงาน

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

> โดยตัว WSL 2 นั้นยังมีการตั้งค่าอื่นๆ อีก สามารถดูได้จาก[ที่นี่](https://docs.microsoft.com/en-us/windows/wsl/wsl-config#wsl-2-settings)
Why is it important to create a default constructor explicitly when we create a parametrized constructor explicitly??
Tags: java, devops, debugging
Published: 2021-02-19 08:28:32

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

java implicitly creates a default constructor for us in a class, but only if we have not created any parametrized constructor in that particular class, however it is not important to declare a default  constructor if there is no use of it in the implementation i.e, if we are providing parameters for each object created for example: the following program does not call default constructor
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0xf8bgfgpm96omujc4zz.jpg)
OUTPUT:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/48uhybv759hdhe4rjh7o.png)

but when we inherit a super class to create some sub class we should keep in mind that every subclass calls super class constructor first, therefore we need to define a default constructor in super class, but if we explicitly call parametrized constructor of super class in the subclass then also there is no need for creating default constructor in super class

here is another example :
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lttajrep4m9h228qfozc.png)

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

[Sources](https://stackoverflow.com/questions/7187799/why-default-constructor-is-required-in-a-parent-class-if-it-has-an-argument-ed-c)
Stay healthy and drink chiya 🍵
Tags: health, alternativetocoffee, office, productivity
Published: 2021-02-19 08:23:14

One thing, that you see in offices in Nepal 🇳🇵 at least once a day, is that someone makes chiya (milk tea) and brings it around to every desk.
That is a really good customs, because chiya keeps your brain working [Citation needed].

Still at [JankariTech](https://dev.to/jankaritech/) we introduced the policy that it's not permitted to deliver the drink to the desk. The reason for that policy is: we are sitting too much, and that makes us sick. To get up and to get the chiya from the kitchen gives you a good reason to move, to stretch your muscles and to activate the cardio vascular system

Even though all staff of [JankariTech](https://www.jankaritech.com) are still in home-offices at the moment, that policy still applies! So don't let anyone deliver you the chiya to the desk, and if anyone still does:
1. ⬆️ get up
2. 🚶‍♀️🖥 follow that person back to the kitchen
3. 🤗 give the person a hug or at least say something nice
4. 🖥🚶‍♀️ walk back to your desk
5. 🍵 enjoy the chiya
6. 👩‍💻 keep on coding

STAY HEALTHY AND DRINK CHIYA

P.S. For those who are so unfortunate not to to live in Nepal and don't know how to make chiya here a [recipe](https://namaste.truman.edu/chiya-milk-tea/)
How I added figure caption element <figcaption> ?
Tags: html, firstpost, beginners
Published: 2021-02-19 07:57:41

<strong>Introduction</strong>
In this post I going to show you how you can exactly use figure caption element in your projects.
Figure caption tag will help users to understand easily about your images in html documents.
Below 👇 i added codepen project that will give insights about figure caption element.

After that if you want to add css in figure caption as i added.
So see How I added css and it looks very well.
I also run a <a href="https://www.howto2.in/"style="color:brown;text-decoration-line:none;"> how to </a> website and figure caption element is help me to make my figure pretty or good looking 🤔 
Below 👇 figcaption look pretty
 
{% codepen https://codepen.io/DeepAI20/pen/wvoeNLv %}

If you want make good looking your figure and image in your documents you can use this figure caption element. 

Hoping you like this 🙏
Imposter's Syndrome?
Tags: career, productivity, codequality, awareness
Published: 2021-02-19 07:47:45

And here I go again with yet another moan at me being incapable to grow as a professional.

Now, I am indeed quite newbie in IT industry, having complete a CS degree, and so far working as a developer for 3 years... But!

Most of my colleagues don't come from academic environment, hence I end up giving myself plenty of frustrations when it comes to arguing my point.

In my current company we used to have one-to-one meetings with a line manager, where we can discuss whatever we feel we want to discuss. So this is where my gears are starting to grind.

On the first one-to-one I had, I jotted down a list of things to suggest to the line manager, where one point was about implementing some new of the standard 'Software Engineering' processes into place, i.e. workflow charts, class diagrams, etc. That, in my opinion can improve a lot of issues even before the work has been committed. As an answer to this I got this: 'I don't think this will do any good for us! This is an ancient approach to agile methodology, in fact, it's a waterfall kind of process.'

What? Seriously?

Now how can one say that, having the knowledge/experience with 'Software Engineering'? - Easily: they just don't have that knowledge.

Now for those who think software engineers and software developers are of the same kind, please do a thorough revision.

Anyhow, lately it's been going in direction of redress. All of a sudden I see that my suggestions are creeping into to our workflow... But!

It appears that none of them are actually my suggestions. Our all mighty manager is pulling the dev team with those brilliant ideas. Holy Life Betterer!

So what everybody else think of this in the dev team? - Well, seems that I am not capable of being a part of this whole thing.

I get the human factor obstacles, but how does one suppose to achieve something, when it just comes to point where I need to shut up while a senior colleague is talking out of his... But*

Conclusion:

Imposters syndrome has place to be, but not always on it's own. Maybe it's just me, yet I feel it's being fabricated by the all mighty experienced lot.

Bla, bla, bla... Moan, moan, moan...
JavaScript Interview Question #15: Getter function
Tags: beginners, javascript, codenewbie, webdev
Published: 2021-02-19 07:46:28

![js-test-15](https://learn.coderslang.com/js-test-15.png)

Can we use an arrow function as a getter in JavaScript? What’s going on and what will be logged to the console?

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

So, we have an object with a single field `id` equal to `1` and two functions `getIdArrow` and `getIdFunction` which supposedly do the same thing, return the value of `id`.

Unfortunately, that’s not the case. In JavaScript, arrow functions are different from the regular ones. There’s no binding between `this` inside of the arrow function and the object `obj`. Thus `this.id` will be evaluated to `undefined`.

In case of the `getIdFunction`, `this` is bound to the `obj` and `this.id` is the same as `obj.id`, which is `1`.

---

**ANSWER**: the first `console.log` will print the number `1` to the console. The second one will print `false`.

[Learn Full Stack JavaScript](https://js.coderslang.com)
Why Laravel Framework is best for your Business?
Tags: laravelframework, laravelforbusiness, laraveladvantages, laravelbenefits
Published: 2021-02-19 07:34:34

Laravel framework pays focus to advances in custom applications that are carried out using the PHP platform. It has the best tools for creating secure and efficiently managed websites and mobile apps. 
Read the full blog here: [Laravel for busieness](https://laravellions29.wixsite.com/my-site/post/why-laravel-framework-is-best-for-your-business)
React checkbox, only select the first item when I click on the label no matter which label I click.

Tags: react
Published: 2021-02-19 07:26:05

I'm using React.js for my frontend and I'm doing category filters, but for that I used checkbox to mark the category I want and label to show the name of the category, I look like the figure below.Now I made a change and passed the input id to label. What is happening is the following whenever I click for whatever label it just selects a first item to be shown. No matter what label I click on, it only selects the first option.

```javascript
const [checked, setChecked] = useState([])

    const handleToggle = c => () => {
        //return thr first index or -1
        const currentCategoryId = checked.indexOf(c)
        const newCheckedCategoryId = [...checked]
        // if currently not currently in verified state> push
// otherwise pull / take off
        if(currentCategoryId === -1){
            newCheckedCategoryId.push(c)
        } else{
            newCheckedCategoryId.splice(currentCategoryId, 1)
        }


        setChecked(newCheckedCategoryId);
        setChecked(newCheckedCategoryId);
        handleFilters(newCheckedCategoryId)
    }

    return categories.map((c, i) => (
        <li key={i} className="list-group-item d-flex justify-content-between lh-condensed list-unstyled">
            <input 
                type="checkbox"
                className="form-check-input"
                onChange={handleToggle(c._id)}
                value={checked.indexOf(c._id === -1)}
                id="checkbox"
            />
            <label htmlFor="checkbox" className="form-check-label">{c.name}</label>
        </li>
        ));
```
Rotate a PDF page using Java
Tags: java, pdf, free
Published: 2021-02-19 07:25:49

When viewing a PDF document, if you find the page orientation is wrong, then you'll need to adjust the page to the right orientation for better viewing. Today, this article will introduce how to rotate a PDF page with Free Spire.PDF for Java.

**Import jar dependency** (2 Methods)
● Download the [Free Spire.PDF for Java](https://www.e-iceblue.com/Download/pdf-for-java-free.html) and unzip it.Then add the Spire.Pdf.jar file to your project as dependency.

● You can also add the jar dependency to maven project by adding the following configurations to the pom.xml.
```xml
<repositories>
        <repository>
            <id>com.e-iceblue</id>
            <name>e-iceblue</name>
            <url>http://repo.e-iceblue.com/nexus/content/groups/public/</url>
        </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>e-iceblue</groupId>
        <artifactId>spire.pdf.free</artifactId>
        <version>3.9.0</version>
    </dependency>
</dependencies>
```

**Below is the screenshot of the input.pdf file:**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nq24fsygl10lbs878whg.jpg)

**Java Code**
```java
import com.spire.pdf.PdfDocument;
import com.spire.pdf.PdfPageBase;
import com.spire.pdf.PdfPageRotateAngle;

import java.io.IOException;

public class RotatePDFPage {
    public static void main(String[] args) throws IOException {
        //Load the PDF document
        PdfDocument pdf = new PdfDocument();
        pdf.loadFromFile("input.pdf");

        //Get the first page
        PdfPageBase page = pdf.getPages().get(0);

        //Get the original rotation angle of the page
        int rotateAngle = page.getRotation().getValue();

        //Rotate the PDF page 90 degrees clockwise based on the original rotation angle
        rotateAngle += PdfPageRotateAngle.Rotate_Angle_90.getValue();
        page.setRotation((PdfPageRotateAngle.fromValue(rotateAngle)));

        //Save the PDF document
        pdf.saveToFile("Rotated.pdf");
    }
}
```
**The screenshot of the generated pdf file:**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l3petes8xygpm4ubyb47.jpg)
How to add __typename automatically to your GraphQL document
Tags: graphql
Published: 2021-02-19 07:22:36

[Apollo Client](https://www.apollographql.com/docs/react/) offers the option to automatically adds `__typename` fields to all outgoing queries.

If you use a minimal GraphQL client like [graphql-request](https://github.com/prisma-labs/graphql-request), then it is necessary to manually adds `__typename` fields to all outgoing queries. 

After going through the documentation and code of Apollo Client, I became aware of the helper function `addTypenameToDocument`. This function is responsible to manipulate the GraphQL document by adding `__typename` automatically. You can use this function with any GraphQL client!

In my case, I wrote a little helper function for graphql-request:

```js
import { addTypenameToDocument } from '@apollo/client/utilities'
import { parse } from 'graphql'
import { GraphQLClient } from 'graphql-request'

const client = new GraphQLClient(endpoint)

export const request = (query, variables, requestHeaders) => {
  // Adds "__typename" to the query
  const document = addTypenameToDocument(
    typeof query === 'string' ? parse(query) : query
  )

  return client.request(document, variables, requestHeaders)
}
```

---

If you have any kind of feedback, suggestions or ideas - feel free to comment this post!
Typescript - Tips & Tricks - keyof
Tags: typescript, webdev
Published: 2021-02-19 07:15:37

Welcome back!
Today I'll talk about the **keyof** operator.

This operator helps us to extract the object's properties such as [Literal-types](https://dev.to/puppo/typescript-tips-tricks-literal-types-10md)
```ts
type Person = {
  firstName: string;
  surName: string;
  age: number;
  location: string;
};

type PersonKeys = keyof Person; // "firstName" | "surName" | "age" | "location"
```
This operator can help us to create new methods that should depend of other types; e.g.
```ts
function get<T, K extends keyof T>(obj: T, prop: K): T[K] {
  return obj[prop];
}

function set<T, K extends keyof T>(obj: T, prop: K, value: T[K]): void {
  obj[prop] = value;
}
```
but also to create new types from other types e.g
```ts
type ReadOnly<T> = {
  readonly [K in keyof T]: T[K];
};

type ReadOnlyPerson = ReadOnly<Person>
/*
type ReadOnlyPerson = {
    readonly firstName: string;
    readonly surName: string;
    readonly age: number;
    readonly location: string;
}
*/
```

How we can see this operator is more powerful and it can help us to create new strict type or new strict methods.

That's all for today.
See you soon guys!
How to pass dynamic image url in nuxt project . Ultimate Guide .
Published: 2021-02-19 06:44:33

###As the src properties will replaced by Webpack, you could do require function like this

```
<templae>
  <div>
    <img :src="imageUrl">
  </div>
</template>

<script>
export default {
  props: {
    imageUrl: {
      type: String,
      default: ''
    }
  }
}
</script>
```

##*ParentComponent.vue

```
<template>
  <ChildComponentExample :image-url="require('~/assets/myimage.png')" />
</template>
```
[This blog post explains how this works .:) Happy Code :)](https://blog.lichter.io/posts/dynamic-images-vue-nuxt/)
Ruby: IRB tab-autocomplete
Tags: ruby
Published: 2021-02-19 06:34:46

Ruby's IRB is a pretty good environment to quickly test a snippet of code. And when you want to test a snippet of code, you do not necessarily know all of the methods and properties for the objects you are working with. If only there were a tab code-complete feature in IRB.

...which has been available in IRB since too-long-ago-to-remember.

What you neeed to do is run this one-line require and then you get autocomplete:
```
require 'irb/completion'
```

For instance, type
```
'red'.cap
```

and then press Tab. Auto-complete! :-)
Renewing the Website of World’s oldest studio
Tags: softwaretestingcompany, softwaretestingservices
Published: 2021-02-19 06:27:51

About the project:
It was really great to work on a project of the world’s oldest media studio and a leading entertainment company focused on the production and global distribution of film and TV content across all platforms.
The project started at the usual time but ended up in lockdown, entirely different circumstances. Clients were aware of the situation and still, we had not let the project know about the challenges we faced. We as a team made no difference in our efficiency, the timing of the work, efforts during the project and before the launch, all kept steady. As a result, all the launches were made on time and we got appreciation from our clients just like those good old pandemic-free days with no difference at all.

Key Responsibilities:
Creating Test Cases
Conducting weekly releases
Managing Hotfixes
Performing regression & smoke testing as per requirements.
Performing Cross-Browser and cross-platform testing.
 

Challenges in the Project:
Every project has its own challenges and we always welcome every challenge as it helps us in building our strength and make us better. Here are a few challenges that we dealt with:

It was an American project so releases are used to schedule as per American standard timing, before the launch we have to be available late in the night.
Sometimes we had to attend the calls/meetings in very unusual times.
 

Fun in the project:
We as a team dealt with a hard time of pandemic during the project with hard work. Good sense of humour among the project-mates was very helpful in putting a smile on the face and keeping the mind calm.

Tools and Technology used:
Jira/Excel sheet: For Bug Tracking & Test case creation
Lightshot: Used for Taking screenshots and Highlighting the bug and affected area.
TinyTake: Used for recording screen, making a video of the bug and taking screenshots.
CSS: It is a web extension used for mapping dimension and other CSS elements on the web pages.