teleren/devto huggingface dataset:
Create a SharePoint list item with a people lookup field using Microsoft Graph SDK
Tags: microsoft, graph, sharepoint
Published: 2021-05-28 09:55:41

---
title: Create a SharePoint list item with a people lookup field using Microsoft Graph SDK
published: true
description: 
tags: microsoft, graph, sharepoint
//cover_image: https://direct_url_to_image.jpg
---

## Starting point
Assume we have a simple SharePoint list with the following columns to manage expenses:

|Column Name |Column Type|
--- | ---
|Title|Single line of text|
|Amount|Currency|
|Employee|Person or Group|

Now we'd like to create expense list items from our C# application. Thankfully, Microsoft Graph provides an [endpoint][1] to do that:
``` http
POST https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items
```
So we don't have to fiddle around with some SharePoint APIs and leverage the Microsoft Graph SDK.

## The Problem
Let's take a look at the JSON representation of an expense list item:
``` json
{
  "id": "2",
  "fields": {
    "Title": "Flight to Zurich",
    "Amount": 125.6,
    "EmployeeLookupId": 13
    }
}
```
The employee field isn't a user principal name nor an Azure AD object id. That's how we usually work with users inside Graph. Instead, SharePoint uses a hidden lookup list to store a user reference, which **differs from site to site**.

So how do we get the actual lookup id for a user?

## The Solution
There's a way with Microsoft Graph. A bit quirky, to be honest, but at least we don't have to use a SharePoint API and stay inside our Graph bubble.

First, we have to fetch the id of the hidden user lookup list:
``` csharp
var hiddenUserListId = (await _graph
    .Sites["<siteid>"]
    .Lists
    .Request()
    .Filter("displayName eq 'User Information List'")
    .GetAsync())[0].Id;
```

Next we have to get the user principal name if we don't have it yet:
``` csharp
var userName = (await _graph
    .Users[userId]
    .Request()
    .Select("userPrincipalName")
    .GetAsync()).UserPrincipalName;
```

With the user principal name in hand, we now can query the lookup id:
``` csharp
var userLookupId = (await _graph
    .Sites["<siteid>"]
    .Lists[hiddenUserListId]
    .Items
    .Request()
    .Header("Prefer", "HonorNonIndexedQueriesWarningMayFailRandomly")
    .Filter($"fields/UserName eq '{userName}'")
    .GetAsync())[0].Id;
```

The `prefer` header with `HonorNonIndexedQueriesWarningMayFailRandomly` is required to query non-indexed columns.

And finally, we can create a new expense list item:
``` csharp
var expenseItem = new ListItem
{
    Fields = new FieldValueSet
    {
        AdditionalData = new Dictionary<string, object>
        {
            {"Title", "Train to Zurich"},
            {"Amount", 23.2},
            {"EmployeeLookupId", userLookupId}
        }
    }
};

await _graph
    .Sites["<siteid>"]
    .Lists["Expenses"]
    .Items
    .Request()
    .AddAsync(expenseItem);
```

If there's another option to save a user reference in a people column or a more clean way to get the lookup id, let me know in the comments!

[1]: https://docs.microsoft.com/en-us/graph/api/listitem-create?view=graph-rest-1.0&tabs=http
What is a Document in MongoDB?
Tags: mongodb, database, javascript, node
Published: 2021-05-28 09:54:05

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

Let's take a closer look at what documents are and how they're used to store data in a structured way.

A document is a way to organize and store data as a set of field-value pairs.

Just like the below object, where the field is a unique identifier for some data point, and the value is data related to a given identifier.

```JavaScript
{
 <field> : <value>,
 <field> : <value>,
 "name"  : "Raju",
 "title" : "Team Leader",
 "age"   : "26"
}
```

In this example, there is a field name, and the value is Raju.

We will look closer at documents and their structures once we get our hands on an actual data set.

But for now, this is a simple example of a document.

A collection would contain many documents similar to this one.

And a database would contain multiple collections.

In this post, I defined what document and collection mean in MongoDB.

In the next post, I will start querying collections for documents and interact with the database in general.
What you should know about? Madhuri Day Satta matka 
Tags: madhurisatta
Published: 2021-05-28 09:42:13

Madhuri day is a noon market that displays results during noontime. Though the market has some kind of popularity, it is nothing compared to some of the top satta matka markets. Yet the market makes it through the popularity it has received among the players who get the guessing or give out the guessing for the game. The simplest way to win the game would be to predict the result through the satta matka result charts. The two main charts are known as the panel chart and the jodi chart has the entire result data that the market has displayed to date. https://www.sattaresults.co/web/game-chart/madhuri-day
Video call app with chat functionality built using React.js, Web RTC and Socket.io
Tags: react, webdev, webrtc, socketio
Published: 2021-05-28 09:23:19

This is a video calling application where users can call other user and will also have the capabiltiy to mute their mic and audio. Their is also real time chat functionality.
It's also a modern PWA so users can install it on their devices like other native apps.

**Project Link** - ***https://video-chat-mihir.vercel.app/***

**Github repo** - ***https://github.com/mihir0699/Video-Chat***

**Demo Video** - ***https://youtu.be/zsyEx2sVi6c***

## Features and Functionalities 😃

- Video Call with others
- Mute audio/video
- Instantly join a video call with a code
- Chat in real-time
- Chat Notifications
- Install it as a PWA (Progressive Web App) on your device
- Unlimited duration calls
- Share code instantly on social media platforms
- Simple and intuitive UI

## Screenshots 📸

### Home Page

![enter image description here](https://user-images.githubusercontent.com/48746544/115701626-9b838e00-a385-11eb-8a07-214ca0b9f327.png)

### Incoming Call

![enter image description here](https://user-images.githubusercontent.com/48746544/115701844-d8e81b80-a385-11eb-91cf-014b23e24ae4.png)

### In Call

![enter image description here](https://user-images.githubusercontent.com/48746544/115702841-07b2c180-a387-11eb-897e-f19abefafef5.png)

### Chat

![enter image description here](https://user-images.githubusercontent.com/48746544/115702929-24e79000-a387-11eb-906c-704608263da4.png)

![enter image description here](https://user-images.githubusercontent.com/48746544/115703177-709a3980-a387-11eb-8d9d-15ddf3b66a25.png)

## Tech Stack 💻

- [React.js](https://reactjs.org/)
- [Netlify + Heroku (Hosting)](https://www.netlify.com/)
- [Web RTC](https://github.com/webrtc)
- [Socket.io](https://socket.io/)
- [Node.js](https://nodejs.org/en/)
- [Ant Design](https://ant.design/)
What is MongoDB?
Tags: mongodb, database, nosql, node
Published: 2021-05-28 09:19:05

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/viffqd7wq77kb11mni2o.png)
So what is the MongoDB Database.

A database, meaning a structured way to store and access data. More specifically, it is a NoSQL database.

NoSQL is a very generic term used to describe any data store that doesn't use legacy approach of related tables of data.

This means that you're storing your data in an organized way, but not in rows and columns An example of NoSQL databases can be anything from a library card catalog, to a more sophisticated data store like MongoDB.

Since the range of what NoSQL means is so wide, we must narrow our definition further.

MongoDB is a NoSQL document database.

This means that data in MongoDB is stored as documents. I will cover what a document is in the next post.

These documents are in turn stored in what MongoDB call collections of documents.

That's why MongoDB is categorized as a NoSQL document database.

In conclusion, the MongoDB database is a NoSQL document database.
Weekly Update #93 - Round up from MS Build
Tags: msbuild, azure, news
Published: 2021-05-28 09:05:37

This week we saw Microsoft Build happen which has generated a lot of news.  In my quick summary video this week I round up on 9 bits of news, I though were really interesting.  So grab your favourite drink and join me... 

{% youtube OEv0us_aUCY %}
How to install both Tailwind and Bootstrap 5 in  a Laravel project
Tags: laravel, tailwindcss, bootstrap
Published: 2021-05-28 09:04:33

Often I have encountered problems in installing Bootstrap and Tailwind so Today I will write about how easy it actually is but if you try to dind out things on your own it might take a lot of time. 
**First install Laravel**
`laravel new bootstrap-tailwind`
**Cd onto project directory then in CLI **
``npm install``
**Next step install bootstrap 5**
`npm install bootstrap@next`
 **Install PopperJs**
`npm install @popperjs/core`
In resources folder we have to create a scss folder inside app.scss
In `app.scss`
`@import "~bootstrap/scss/bootstrap";`
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nyzlrt5cpmm9u9w84dnc.png)
`In Webpack.mixin.js`
`mix.js("resources/js/app.js", "public/js")
    .sass('resources/scss/bootstrap.scss', 'public/css')
     .sourceMaps();`
Then run `npm run dev`
**Install Tailwind**
`npm install -D tailwindcss@latest postcss@latest autoprefixer@latest`
`npx tailwindcss init`
**In resorce folder  inside css folder create tailwind.css file**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hz7yu7as4vfxplbxkkcu.png)
In that file we need to copy paste 
`@tailwind base;
@tailwind components;
@tailwind utilities;`

**In webpack.mixin.js**
`mix.js("resources/js/app.js", "public/js")
    
    .postCss("resources/css/tailwind.css", "public/css", [
     require("tailwindcss")
     
    ])
    .sass('resources/scss/bootstrap.scss', 'public/css')
     .sourceMaps();`
Finally `npm run dev`
If you try this you can install both bootsrap 5 and Tailwind in same project. AT first time you may need to run npm run dev twice
Survey on Bachelor Thesis
Tags: modules, javascript, frameworks, vue
Published: 2021-05-28 08:57:31

---
title: Survey on Bachelor Thesis
published: true
description: 
tags: Modules, Javascript, Frameworks, Vue  
//cover_image: https://direct_url_to_image.jpg
---
![ask for help](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3m90roj17v7udg84ut5l.jpg)
# A survey on the modularisation of single-page applications
My colleague is currently working on his bachelor thesis. The topic is the modularisation of single-page applications. He has started a survey on this. If you are familiar with the topic, please help him with some answers or pass the link on to someone who is familiar with it. Thank you.
The survey: 
[https://forms.gle/FBfRLUfxWS35GUU17](https://forms.gle/FBfRLUfxWS35GUU17)
Here is a german version also:
[https://forms.gle/mGAzuZr7oyFqh7tP7](https://forms.gle/mGAzuZr7oyFqh7tP7)

Image Source: https://unsplash.com/photos/erLrY4aKztg
TELEMEDICINE APP DEVELOPMENT: TRENDS, PREDICTIONS, PITFALLS
Tags: app, medicine, computervision
Published: 2021-05-28 08:52:28

Telemedicine app development — how promising is the niche? What are the top related technologies and how much does it cost? Learn all about the telemedicine market.

TELEMEDICINE APP DEVELOPMENT EVERYTHING YOU NEED TO KNOW
Telemedicine app development is transforming the healthcare industry’s landscape. But why is it worth taking into account the trends in the field of telemedicine? On top of that, how much does the development cost? And what nuances can slow down the underlying work and affect the level of success in the implementation of the related technologies? Let’s figure out all of that.

This is an extract. For more information read the article: https://requestum.com/telemedicine-app
Why to use useState in react?
Tags: react, womenintech, webdev, frontend
Published: 2021-05-28 08:50:00

What will happen if we don't use the useState hook in react?
Let's take an example, suppose we want to create a counter button that increments itself by one.

**Without useState**

In the below code if one tries to increment the counter by clicking on the *button* the count will not change because the react rendered the component only once and since there is no state change it won't get re-rendered, the count will remain at 0 on-screen.
By console.log one can see that the count is incrementing on click.
``` javascript
import React from "react";

export default function MyComponent() {
  let count = 0;
  const setCount = () => {
  count++;
  console.log(count);
   }
  return (
    <div>
      <label>{count}</label>
      <hr/>
      <label>Counter</label>
      <button onClick = {setCount}>{count}</button>
    </div>
  );
}

```
**With useState**

In the below code if one tries to increment the counter by clicking on the *button* the count will change because the react rendered the component once when it got mounted and since there is state change it will get re-rendered, the count will get incremented on-screen.

``` javascript
import React, { useState } from "react";

export default function MyComponent() {
const[count, setCount] = useState(0);

return (
    <div>
      <label>{count}</label>
      <hr/>
      <label>Counter</label>
      <button onClick = {() => {
        setCount(count + 1);
      }}>{count}</button>
    </div>
  );
}

```
One can always directly manipulate the *DOM* and increment the counter on-screen as well, but then there is no point in using *react*.
The Linux Command Line
Tags: linux, codenewbie
Published: 2021-05-28 08:38:26

If you're a [Linux](https://en.wikipedia.org/wiki/Linux) user, or you know someone who is, you've probably heard of the "command line". But what is it? Is it hard to learn? Will it turn you into a geek? 

The command line is something that anybody can learn and enjoy using. It's a special way of interacting with your computer, by typing short commands instead of clicking around in menus. 

Although it's easy to use, the command line does take a little getting used to, because it's very different from what most people are used to. 

On top of that, there are many different commands. It can take a long time to become an expert without training. You can use [this site](https://practicelinux.com/) to boost your Linux skills.

## Why command line?

I'll start with a simple statement of fact: the command line is here to stay. It's a powerful, flexible interface that allows the user to control the computer directly, without reference to a [GUI](https://en.wikipedia.org/wiki/Graphical_user_interface).

The Linux command line is a powerful environment for a computer programmer. But it takes time and practice to become proficient at it.

To understand what the command line is, you should first know what it’s not. It’s not a graphical user interface. 

![linux command line](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0tyv8qykozi41k0eqhhg.jpeg)

The command line sits between your computer and programs. Anything run from the terminal is called a “command” or a “shell”. 

You execute a command by typing it into the terminal and pressing return or enter, depending on your shell. 

Essentially, it’s everything you type at a prompt or run standalone, like scripts and programs.

## Linux command line

The [commands](https://bsdnerds.org/what-is-linux-shell/) are not only useful on Linux but also on Mac OS X. As both use the bash shell. But even with different shells like on [OpenBSD](https://www.openbsd.org/), the commands are largely the same.

**start programs**

You can start a program by typing the name of the program like this: 

```bash
./name
```

**navigate directories**

You don't need a file manager, browsing your file systems is one of the things you can do with the command line.

```bash
# list files in directory
ls

# enter directory
cd dir

# go up one directory
cd ..

# go to root
cd /

# go to home directory
cd ~
```

**view files**

To view files, you can use these commands

```bash
# show file
cat filename

# show first lines of file
head filename

# show last lines of file
tail filename
```

**edit text**

Text editing is great on the command line. Especially for config files but also for development. 

```bash
# vim editor (ZQ to exit)
vim filename

# nano editor (beginners)
nano filename
```

Moving from [soydev](https://www.urbandictionary.com/define.php?term=Soydev) to unix hacker really boosts your skills. It makes you so much more proficient at development. 

These days you can even use a Linux terminal inside windows, the command line is included on Mac OS X and almost every web server in the world uses the command line.
10 job interview questions every software developer should know
Tags: productivity, javascript, webdev, devops
Published: 2021-05-28 08:17:06

So you’re looking to become a software developer and join the ranks of highly skilled professionals If you’re in the midst of your job search and need some quick tips to get better prepared for the interview, we can help with that.

######JOIN THEVIKCODE NEWLETTER ( GET DAILY WHICH WILL NOT BE AVAIBLE HERE ) - https://thevikcode.substack.com/

For some, interviews are nerve-racking and difficult. But as long as you prepare with mock interviews, you’ll be ready for anything your future employer might throw your way  – not to mention stand out from other job seekers. If you want to ace the interview and land the job, below are ten questions that every software developer should know how to answer. We’ll follow those with some tips for your interview prep, so you have every chance to edge out the competition.

####10 Questions to Expect in Your Interview:
1. What is responsive design? Explain the difference between fixed and fluid layouts.

2. Describe a time where you had to convince a teammate to change their code for a project.

3. What is an example of a sandbox? What’s the purpose of one?

4. How do you communicate your progress to your team?

5. What tools do you like to use to design, develop and debug applications?

6. What is the best way to collaborate on a coding project?

7. Describe a time you got something wrong while coding. What did you do about it?

8. Have you ever worked with someone who didn’t give as much effort as other team members? How did you handle it?

9. Give an example of a well designed website or product with good user experience. Why do you like it?

10. Have you ever had a bug in your code that was already in production? How did you communicate/fix the issue?

####Tips for Nailing Your Software Developer Interview

Getting the job relies on so many factors: your experience, culture fit with the company, and even just dumb luck. But you can give yourself every competitive advantage by going into the interview prepared. Here are some reminders to keep in mind if you’re in the running for your dream developer gig.

-If you don’t know the answer, just be honest. Developer interviews can get very technical, very fast. If you don’t know the answer to a question, be transparent and tell them that – but remind them that you’re excited to learn. You could even describe another skill that you learned on the last job (or taught yourself) to demonstrate your initiative.

-Ask questions of your own. Great developers are in high demand. You might get more interview requests, or even competing job offers. So get all of the information you need to decide if the company is a good fit for you, too.

-Be ready to show off your portfolio. You should have a few of your best projects in one place, like Github. Even if you’ve never had a true developer job, there are other ways to build a portfolio

These were some general interview questions every programmer should know...
Why should we study algorithms?
Tags: algorithms, beginners, programming
Published: 2021-05-28 08:15:56

**First, we need to understand what is the algorithm?**
An algorithm is just a procedure that takes some set of values as input and produces some set of values as output. In short, the procedure of solving a problem is an algorithm. We can say an algorithm is correct if it halts with the correct output for all inputs. 


**Now, What is the need for studying algorithms?**
We know that our computers are not infinitely fast and do not have infinite storage. So we have to make our algorithms fast that uses less storage to efficiently use. Then maybe you have a question like, **how we evaluate an algorithm?** The answer is, we evaluate the efficiency of the algorithm by analyzing the bound of the time taken to execute its statements and produce output for all the given inputs, known as time complexity. We describe time complexity as the frequency of the statements that need to be executed. We can have multiple algorithms for the same problem, to choose an efficient one we need to study algorithms.
Basically, we write programs in any High-level Language like Python, C, C++, etc to solve problems. But do not care about their efficiency, an inefficient algorithm does not show any effect on less number of input but in million of inputs shows dramatic effects. I will show this by comparing two algorithms of sorting: Merge Sort and Insertion Sort.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/er6b869et4n79lpxkkry.jpg)
This Shows us, Machine A is faster still takes more time as compared to machine B because merge sort is efficient as compare to Insertion sort for large inputs. That is the effect of an efficient algorithm. The system performance depends on the hardware as well as the algorithm we choose.
Solving `module 'platform' has no attribute 'linux_distribution'` for ceph-deploy with Python 3.8
Tags: python, ceph, kubernetes, storage
Published: 2021-05-28 08:08:36

---
title: Solving `module 'platform' has no attribute 'linux_distribution'` for ceph-deploy with Python 3.8
published: true
description: 
tags: python, ceph, kubernetes, storage
//cover_image: https://direct_url_to_image.jpg
---

When running `ceph-deploy` on Python 3.8, you may encounter the following error:

```bash
[ceph_deploy][ERROR ] RuntimeError: AttributeError: module 'platform' has no attribute 'linux_distribution'
```

This is because of the [deprecated platform.linux_distribution function](https://github.com/ceph/ceph-deploy/pull/496) in Python3.8.

To correct this issue, if your `pip3` instance does not install the latest release of `ceph-deploy`, you can install it directly from Git:

```bash
pip3 install git+https://github.com/ceph/ceph-deploy.git
```
and then proceed to run your configuration:

```bash
ceph-deploy --username ceph install node00 node01 ... node06
```

to complete the process.
Laravel 8 Ajax CRUD Example Using Yajra Datatable
Tags: laravel, php, programming, tutorial
Published: 2021-05-28 08:03:50


Hi Dev,

In this post, i will expound you step by step ajax crud operations in laravel 8 with modal & pagination. we will engender jquery ajax crud with modals utilizing datatables js in laravel 8. we will simply inscribe jquery ajax request for crud with yajra datatable laravel 8.

We will utilize bootstrap modal for engender incipient records and update incipient records. we will utilize resource routes to engender crud (engender read update efface) application in laravel 8.We will utilize yajra datatable to list a records with pagination, sorting and filter.

I will provide you step by step guide to engender ajax crud example with laravel 8. you just need to follow few step to get c.r.u.d with modals and ajax. you can facilely use with your laravel 8 project and facile to customize it.

more..

https://codingtracker.blogspot.com/2021/05/hi-dev-in-this-post-i-will-expound-you.html