teleren/devto huggingface dataset:
All Resources to Learn AR Foundation Unity
Tags: ar, unity3d, arcore, arkit
Published: 2020-06-07 18:21:59

AR Foundation makes it possible to use Unity to create ARCore and ARKit apps.

---

[AR Foundation & Unity 01: Setup for Android](https://youtu.be/0mpsiO2lCx0)

1. Change platform from `build settings` to android.
2. Go to `PLayer Settings`
3. Uncheck multithread rendering + remove Vulkan from Graphics APIs + Minimum API level to 26
4. Install Packages: `AR Foundation` , `ARKit XR Plugin`, and `ARCore XR Plugin`
5. AR Session Origin game object
6. Remove the main camera
7. AR Session game object
8. Create some object to the scene that is rendered in AR
9. `Build Settings` and choose your phone connected with USB from `Run Device`
10. Build and Run

[AR Foundation & Unity 02: Setup for iOS](https://youtu.be/eu_eG0eTFlA)

1. Change to iOS

3. Check `Requires ARKit support` + Architecture from Universal to ARM64 + Target minimum iOS version to 11.0.

9. Don't do this on iOS

10. Build and create a folder where the app will be built for Xcode

11. Open the new files on Xcode by opening `Unity-iPhone.xcodeproj` file

12. Select team

13. Play to run the program

---

[AR Foundation & Unity 03: Image Tracking](https://youtu.be/o_z_Eb8Yh2g)

Learn how to place game object to a marker.

[Unity AR Foundation Tutorial - Plane Detection](https://youtu.be/uWWiYfPTUtU)

Detecting a plane.

[Unity AR Foundation Tutorial - Tap to Place Objects in AR](https://youtu.be/xguiSueY1Lw)

Adding game object to the detected plane.

`AR Session Origin` contains a camera that can be tagged as `MainCamera` and then the default camera can be deleted. `AR Session` need to be created too.

---

This is the point where you probably want to start doing something because **all the videos below talk about these same things** Dinesh explained well above.

---

[Getting Started With ARFoundation in Unity (ARKit, ARCore)](https://youtu.be/Ml2UakwRxjk)

- It's okay to use empty game object for just code placeholder
- There is auto signin option in Unity that should remove the need to do it in Xcode
- Run and build should work automatically after the first setup with iOS
- Unity physics work better with bigger objects and smaller objects might have some weird behaviour.

---

[ARFoundation Unity Tutorial | Third Aurora Augmented Reality Tech Company](https://youtu.be/Xhz3cmnluNo)

Most of the projects contains three things to start with:

1. Place objects to the ground
2. Click events
3. Toggle on and off AR planes and point clouds

The packages and Unity is constantly changing and different versions might affect how the things work.

In the video he creates a simple app where is UI button and then it uses point clouds (the things listed above). This is great video to watch to see how UI elements work with AR content.

[COMPLETE COURSE - Learn Unity's AR Foundation](https://youtu.be/FGh7f-PaGQc)

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

This video didn't explain anything new but talked about the same things as previous videos.
SIMS BATCH 2012 Memories (5 years of Journey together)❤️🥰Batch-mates & Friends like a family in one😍🤗
Tags: career, motivation, linux
Published: 2020-06-07 18:14:37

Recalling some memories from such a nice program by <a href="https://en.wikipedia.org/wiki/Wipro">Wipro Limited</a> & <a href="https://en.wikipedia.org/wiki/Birla_Institute_of_Technology_and_Science,_Pilani"> Birla Institute of Technology and Science, Pilani</a></b>
<br>

<b><i>It was such a wonderful opportunity and a great experience :)</b></i>

<b><a href="https://www.youtube.com/watch?v=DxWAjWS34XY">Watch Out This - SIMS BATCH 2012 MEMORIES(5 years of Journey together)❤️🥰Batch-mates & Friends like a family in one😍🤗</a></b>

[![SIMS BATCH 2012 MEMORIES 5 years of Journey together❤️🥰Batch-mates & Friends like a family in one😍🤗](http://img.youtube.com/vi/DxWAjWS34XY/0.jpg)](https://www.youtube.com/watch?v=DxWAjWS34XY)



<h3><b>When we Started</b></h3>

![When we Started](https://dev-to-uploads.s3.amazonaws.com/i/nmfark2b8e9u3yxpa954.jpg)

<br>

<h3><b>When we accomplished</b></h3>

![When we accomplished](https://dev-to-uploads.s3.amazonaws.com/i/5y9k1uxskxa0cu750t0e.jpg)




#Wipro #WiproStudentProgram #SIMS #SIMS2012 #BITS #BitsPilani #Batch2012 #WILP #Pilani #LearnandEarn #Learn #StartYourCareer #careersatwipro #India #AzimPremji  #Memories #graduationday #ceremony #5years
Technical Stupidity I Overcame Learning Redux
Tags: codenewbie, react, redux
Published: 2020-06-07 18:00:38

Learning React and Redux has been a quite the experience so far. For about 3 weeks I muddled my way through the docs that were as clear as sin, but I just didn't understand. The first of which was the concept of dispatch. To me simply writing the code out "dispatching" the action was the way things worked, not realizing that connect was a the major component that I had forgotten all about. You may be asking yourself, "There are nice and clear docs that explain everything in detail, didn't you read them?". Short answer is yes, but my perception was to just emulate the examples and not necessarily read to understand. That is clearly a mistake that cost me a lot time and headache that thankfully learned from. The next mistake was not learning what it means to dispatch and action. Dispatching on a very simplistic level is calling a predefined action that returns an object that, at minimum, returns an action type. However, when dispatching you chain action together and pull data from different sources and pass the data to the action. After, the action data is parsed it is based to the reducer. Reducers are are pure functions that take the stores previous state and an action to gives the next state. A pure function is a function that non-destructive function that, if given the same parameters, give the exact same results every time. The way I overcame my ignorance and learned the path in which it functions was the use of debuggers and signal traced. Every where I could think to use a debugger I place it to follow every piece of data to first see that I was receiving data, then see how to manipulate the data for usage.
Quick and Easy TypeScript Project Setup
Tags: typescript
Published: 2020-06-07 17:25:13

One of the fastest and easiest ways to set up and run a TypeScript project in the browser is with the help of the web bundler Parcel. This command-line tool is fantastic, it offers built-in TypeScript support, development server, hot module replacement to track changes and reload, and it requires zero configuration. So it is a perfect tool to start a TypeScript project.

First, let's start by creating a project folder, setting up an npm package and install `parcel-bundler` locally:

```js
mkdir myapp
cd myapp
npm init -y
npm install --save-dev parcel-bundler
```

The starting project structure will look like this:
```
myapp
│   index.html
│   package.js
│
└───src
    │   index.ts
```

We will feed an `index.html` as an entry file and make a reference to `src/index.ts` in the `script` tag:

```html
<html>
<body>
    <script src="./src/index.ts"></script>
</body>
</html>
```

As soon as Parcel sees the TypeScript file in the script tag, it will parse it, compile to JavaScript file, replace script tag with a new compiled `index.js` file and run in the browser.

To run the app we need to call a `parcel` command with a path to an entry file, which is `index.html`. As we installed Parcel locally, we cannot just call `parcel index.html` within the project directory in a terminal. For that, we will use an npm script. In the `package.js` add following script commands for starting the development server (`start`) and building for production (`build`):

```js
{
  "name": "myapp",
  ...
  "scripts": {
    "start": "parcel index.html",
    "build": "parcel build index.html"
  },
  ...
  "devDependencies": {
    "parcel-bundler": "^1.12.4",
    "typescript": "^3.9.5"
  }
}
```

Both commands can be initiated from a terminal within the project directory with `npm run start` or `npm run build`. When you start a project with the `start` command, a local server will be built for you with the hot module reloading feature. Whenever you save changes, Parcel will recompile your code and reload the browser with the newest changes.

To test it up, add a simple `console.log` command to `index.ts` file and run the app. In the browser console, you should see your printed message.

Parcel is a magical tool. So easy and quick way to start your next project in minutes, and not only for TypeScript. Have fun and happy coding.
Journey to Machine Learning (Day 002)
Tags: python, machinelearning, datascience, linearalgebra
Published: 2020-06-07 17:06:54

Hey guys! So this is my day 2 of journey to machine learning. You can find day 001 [here](https://dev.to/aliakberaakash/journey-to-machine-learning-day-001-14n4)

Today I learned a bit more about numPy. I learned to slice 1D and 2D vetors and played around with them a little. 

I solved [Single Number](https://leetcode.com/problems/single-number/) and [Find All missing numbers](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/) from leetcode with python. 

I was browsing youtube and found a [Machine learning course](https://www.youtube.com/watch?v=jGwO_UgTS7I&list=PLoROMvodv4rMiGQp3WXShtMGgzqpfVfbU) from Stanford. I thought I'd give it a try but I realized it requires some mathematics which I have done before but now completely forgotten them. So I started another course which is kind of a refreshment course of [linear algebra](https://www.youtube.com/watch?v=SPj8ARqpFEU&list=PL2jykFOD1AWazz20_QRfESiJ2rthDF9-Z). I plan to complete it alongside the Datacamp course.

Tbh the Datacamp course seems to be very easy and I could finish it in one day, but I don't wanna forget everything the next day so, I'm taking things a bit slowly. Hopefully It'll be done by 10th June. 

So yeah that's pretty much it for today. Thanks for reading. Hope to write another one tomorrow! <3
Edge Delivers Broadside to Chrome
Published: 2020-06-07 17:04:02

An unusual W10 update came bowling in today in the form of a singular Edge update which, without further a do, syncronised EVERYTHING from Chrome including passwords, favourites icon bar and extensions, then pinned itself to the taskbar and asked if I wanted to make my default browser thereby providing a level of accessibility hitherto unseen from MS apps.
The new Edge even offers some features Chrome doesn’t. For example, Edge has a built-in tracking prevention feature and a potentially unwanted program (PUP) blocker. 
By all accounts MS has also done some work on making its version of dev tools viable.
So, who's it for? MS fans, those who want it all in one place, as it were, and those who haven't completely embraced the Google phenomenon.
Either way, it's a serious contender aimed deliberately at winning market share from Google Chrome.
Will you jump?
Sql Joins
Tags: sql, database, mysql, joins
Published: 2020-06-07 16:56:09

Today I want to speak about Sql Joins and look at the diffrent kinds of joins

#### INNER JOIN
gets all records that are common between both tables based on the supplied ON clause.

```sql
SELECT table1.column1, table2.column2...
 FROM table1
 INNER JOIN table2
    ON table1.common_field = table2.common_field;
```

#### LEFT JOIN
gets all records from the LEFT linked and the related record from the right table ,but if you have selected some columns from the RIGHT table, if there is no related records, these columns will contain NULL.

```sql
SELECT table1.column1, table2.column2...
  FROM table1
  LEFT JOIN table2
    ON table1.common_field = table2.common_field;
```

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/h276z2ywhkioq72hfy9c.png)
#### RIGHT JOIN
is like the above but gets all records in the RIGHT table.

```sql
SELECT table1.column1, table2.column2...
 FROM table1
 RIGHT JOIN table2
    ON table1.common_field = table2.common_field;
```

#### FULL JOIN
gets all records from both tables and puts NULL in the columns where related records do not exist in the opposite table.

```sql
SELECT table1.column1, table2.column2...
  FROM table1
  FULL JOIN table2
    ON table1.common_field = table2.common_field;
```

Done :)
Feel free to ask any questions
Cohort 6 Recap
Tags: collablab, juniordevelopers, earlycareerdevelopers, webdev
Published: 2020-06-07 16:43:19

Collab Lab’s 6th cohort wrapped up last week! What an incredible group of people—you should hire them if you’re looking to add some _amazing_ to your team.

All of the goodness they created was a salve to the troubling times we’ve witnessed over the last few months. We are proud of this group for knocking it out of the park given everything that’s been happening.

This [group](https://the-collab-lab.codes/about-us/#cohort-6) consisted of the lovely [Elise Spain](https://github.com/espain16), [Sara Krum](https://github.com/SaraSweetie), [Myles Azehko](https://github.com/erostribe), and [Scott Bergler](https://github.com/skillitzimberg). They truly nailed the collab part of what we do. The [mentors](https://the-collab-lab.codes/about-us/#mentors) this time around were Jayson Phillips and Steve Gardner. Lauren Beatty stepped in with a few weeks to go to lead the cohort.
![](https://cdn.zappy.app/ffaf33372f8d0f1453859bbeb4b02deb.png) 

Each week our colabbies impressed us mentors with their eagerness, persistence, and ability to tackle any challenge as a team. Some of the things that stood out:
- Communication was stellar the whole way through. 
- Lots of questions in Slack meant they quickly got unblocked.
- PRs had thorough context and comments that lead to great solutions. 
- Often times the mentors would come in to Slack and see a problem start a thread. By the end, it was resolved when everyone jumped on a Zoom call to put their heads together.

The end result is one of the most [adorable apps](https://tcl-6-smart-shopping-list.netlify.app/) you’ll see.
![](https://cdn.zappy.app/2b88efe4f4f2acc46484a426087a9654.png)

Our 8 weeks flew by in a blink. These are the kinds of people you want to work with every day. All of their contact info is on our [About](https://the-collab-lab.codes/about-us/#cohort-6) page. You should hire them!
Why I cannot assert that the job has been dispatched?
Tags: help, php, laravel
Published: 2020-06-07 16:39:02

In my tests I need to assert that a specific job has been dispatched but without actually dispatching the job.

I used `Bus::fake` but as I ask bellow I have some troubles to assert that the job has been dispatched.
{% stackoverflow 60759367 %}

A silorar problem of mine is the following as well:

https://laracasts.com/discuss/channels/testing/why-i-am-unable-to-assert-that-a-job-has-not-been-dispatched
Implementing the Brainfuck compiler front end in C#
Tags: csharp, compiler, brainfuck, parser
Published: 2020-06-07 16:30:57

In the previous [article](https://dev.to/tingwei628/write-a-simple-brainfuck-interpreter-in-c-137i), I wrote a Brainfuck interpreter.
This time I'm trying to build a Brainfuck compiler which targets Common Intermediate Language (CIL). I did not use any parser generator and write a recursive descent parser by hand.

[Code: Compiler front end](https://github.com/tingwei628/bfcs/blob/master/Compiler/bfc.cs)
Dica rápida: POST para JSON:API
Tags: api, json, python, django
Published: 2020-06-07 16:22:07

_If you arrived here and do not speak/read/write in native Portuguese/Brazilian Portuguese or do not prefer to read in this language, this same article is written in English [here](https://dev.to/matheuscas/quick-tip-posting-to-json-apis-2ngk)_. 

Esta é uma dica rápida para iniciantes em [JSON: APIs] (https://jsonapi.org). Se você acha que é apenas JSON, pense novamente. É JSON e "mais algumas" definições. Aqui estão algumas coisas que eu não sabia, subestimando as especificações, e quebrei minha cabeça.

Primeiro, o `Content-Type` não é `application/json`. O tipo correto é [application/vnd.api+json](https://jsonapi.org/#mime-types). Caso contrário, o servidor responderá com `415 Unsupported Media Type`.

Segundo, seu _payload_ **para fazer um POST deve ** conter `data` (conhecido como "dados primários") e ** deve ** ter pelo menos o seguinte formato:

```python
{
  "data": {
    "type": "meu 'segredo' estava aqui",
    "attributes": <payload>
  }
}
```

Se você esquecer de colocar `data`, receberá o seguinte erro:

```python
{
   "errors":[
      {
         "detail":"Received document does not contain primary data",
         "source":{
            "pointer":"/data"
         },
         "status":"400"
      }
   ]
}
```

Você só precisa adicionar `data` e colocar seu _payload_ em` atributos`. Depois disso, se você esquecer o `type` ou defini-lo como `None`, porque estamos fazendo um **POST**, você receberá o seguinte erro (ou algo semelhante):

```python
{
   "errors":[
      {
         "detail":"The resource object's type (None) is not the type that constitute the collection represented by the endpoint (<O_NOME_DO_ENDPOINT>).",
         "source":{
            "pointer":"/data"
         },
         "status":"409"
      }
   ]
}
```

E o erro acima foi o que tomou minha energia e me fez escrever esse post. Demorei um pouco para descobrir, apesar da mensagem, qual foi o erro, mas pode ser diferente em outra situação/framework/estrutura, eu acho. Eis aqui a minha situação, usando Django + DRF + JSON:API: 

```python
from rest_framework.decorators import api_view

@api_view(["POST"])
def my_api_post_endoint(request):
    ...
```

A partir do endpoint acima, usando `@api_view` (e estou sendo bastante específico, porque não testei com ViewSets ou outros endpoints baseados em classe), apenas tive que definir o `type` do _payload_ como o mesmo nome do endpoint. Como abaixo:

```python
{
   "data":{
      "type":"my_api_post_endoint",
      "attributes":"payload"
   }
}
```

E foi isso! O POST estava passando e eu pude seguir em frente com o meu trabalho.

Moral da história? Leia a p**** das especificações antes. 😅
Quick tip: posting to JSON:APIs
Tags: api, json, python, django
Published: 2020-06-07 16:21:41

_Se você chegou aqui e não fala/ler/escreve nativamente inglês ou não prefere ler neste idioma, esse mesmo artigo está escrito em português do Brasil [aqui](https://dev.to/matheuscas/dica-rapida-post-para-json-api-25ni)_. 

This is a quick tip to newcomers to [JSON:APIs](https://jsonapi.org). If you think it's just JSON, think again. It's JSON and "some more" definitions. Here's some stuff that I didn't know, underestimating the specs, and cracked my head. 

First, the `Content-Type` ain't `application/json.`. The correct type is [application/vnd.api+json](https://jsonapi.org/#mime-types). Otherwise, the server will respond with `415 Unsupported Media Type`. 

Second, your payload **to POST must** contain `data` (called "primary data") and **must** have at least the following format:

```python
{
  "data": {
    "type": "my final 'secret' was here",
    "attributes": <your_payload>
  }
}
```

If you miss `data` you'll get the following error:

```python
{
   "errors":[
      {
         "detail":"Received document does not contain primary data",
         "source":{
            "pointer":"/data"
         },
         "status":"400"
      }
   ]
}
```

You just need to add `data` and put your payload into `attributes`. After that if you miss `type` or setting as `None`, because we're **POSTING**, you will get the following error (or something similar):

```python
{
   "errors":[
      {
         "detail":"The resource object's type (None) is not the type that constitute the collection represented by the endpoint (<ENDPOINT_NAME>).",
         "source":{
            "pointer":"/data"
         },
         "status":"409"
      }
   ]
}
```

And the above error was the one that took my energy and made me write down this post. It took me a while to figure out, despite of message, what was the error, however it can be different in other situation/framework/structure, I think. Here was my situation, using Django + DRF + JSON:API:   

```python
from rest_framework.decorators import api_view

@api_view(["POST"])
def my_api_post_endoint(request):
    ...
```

Giving the above endpoint, using `@api_view` (and I'm being pretty specific cuz I didn't tested with ViewSets or other class based endpoints) I just had to set the whole payload's `type` as the same name of my endpoint. Like bellow:

```python
{
   "data":{
      "type":"my_api_post_endoint",
      "attributes":"payload"
   }
}
```

And..Done! The POST was passing and I could move on with my work. 

History's moral? Read the damn specs before. 😅
Spread Operator
Tags: javascript, webdev, node, react
Published: 2020-06-07 16:18:21

### Spread Destructuring

The spread operator `...` can be used to destructure arrays, other iterables and objects. It is used to catch remaining properties not already picked off by the destructuring pattern.

```js
const array = [1, 2, 3, 4];
const [first, ...theRest] = array;
console.log(first, theRest); // 1 [2,3,4]
```

```js
const object = {a: 1, b: 2, c:3};
const {a, ...theRest} = object;
console.log(a, theRest); // 1 {b: 2, c: 3}
```

### Spread Parameters

In addition to spread destructuring, the spread operator `...` can be used to unpack an array into its elements in order to be passed into a function as individual arguments.

```js
function f (a,b,c) {
  console.log(a,b,c);
};

var values = [1,2,3];
f(...values); // 1 2 3
```

Spread parameters can also be mixed and matched with normal function parameters.

```js
function f (a,b,c,d) {
  console.log(a,b,c,d);
};

var values = [2,3];
f(1,...values,4); // 1 2 3 4
```

### Rest Spread Parameters

Rest spread parameters are used to capture all remaining parameters passed to a function and expose them as an array. No other named arguments may follow the rest parameters in the function signature.

```js
function f (first,second,...numbers) {
  console.log(first,second,numbers);
}

f(1,2,3,4,5); // 1 2 [3,4,5]
```

### Spread Property Initialisers

Spread properties in object initializers copies the enumerable properties from a provided object onto the newly created object.

```js
const foo = {a: 2, b: 3};
const bar = {a: 1, ...foo};
bar; // {a: 2, b: 3}
```

Happy Coding 😀