teleren/devto huggingface dataset:
Microsoft Build Event 2020
Published: 2020-07-07 09:29:32

Its a bit late - but I was trying to get my blog up and running, share the post and see what people think.

Have a look here:
https://mikeminton.uk/microsoft-build-event-2020/

Ideas and feedback gratefully received.

#sams #mikemintonshrewsbury #mikemintonuk #sitc #shropshireitc
Select all nodes in a DOM except the nth query
Tags: javascript, html, dom, webdev
Published: 2020-07-07 09:15:27

---
title: Select all nodes in a DOM except the nth query
published: true
description: Select all the node elements in a DOM query except the nth.
tags: JavaScript, HTML, DOM, webdev
//cover_image: https://direct_url_to_image.jpg
---

Say you have a HTML structure like this one:

```
<body>
    <div>
        <span style="font-weight:bold;">More Lorem Ipsum text: </span>
        <span>And More Lorem Ipsum text</span>
        <span>Some More Lorem Ipsum text</span>
        <span>Get Some More Lorem Ipsum text</span>
        <span>Finally Some More Lorem Ipsum text</span> In conclusion.
    </div>
</body>
```

I would like to apply some styling to the first `span` and then I change the remaining spans into text nodes.

The challenge I had was figuring out how to get the rest of the spans after the first. Turns out, it's quite simple:

```
const spans = document.querySelectorAll("span:not(:nth-child(1))")
spans.forEach(span => {
    const spanTxt = span?.textContent;
    if (spanTxt) span.replaceWith(spanTxt.trim())
})
```

That JavaScript (TypeScript) code will result to:

```
<body>
    <div>
        <span style="font-weight:bold;">More Lorem Ipsum text:</span> And More Lorem Ipsum text Some More Lorem Ipsum text Get Some More Lorem Ipsum text Finally Some More Lorem Ipsum text In conclusion.
    </div>
</body>
```
Creating a Responsive Portfolio Website Using Pure HTML, CSS and JavaScript [PART 1]
Tags: html, css, javascript, webdev
Published: 2020-07-07 08:59:04

Creating  a portfolio website is one of the best step a developer can make especially when they want to become successful freelancers. It's a simple yet effective way of showcasing your skills and projects you have worked on before.

My previous post was about my portfolio website. I shared a link to it and most of you loved it 💙. You also suggested that I should make a tutorial on how I went about it.

So, I spent some time and prepared a *part 1* of the tutorial where we will be creating the **landing page** and the **animated side nav-bar**. I tried to make the tutorial a beginner level and I hope everyone will be able to follow along. I have pinned the tutorial video below.

Let me know if this tutorial is helpful and whether I should create a *part 2* at the discussion section below. Also, tell me what I should Improve on when creating the next tutorial.

Here is the link to my portfolio if you haven't seen it yet: https://chaoocharles.netlify.app/

Also, [Help me reach 5k subscribers on my YouTube Channel] (https://www.youtube.com/channel/UCe8uN9zoKksCb1hfw61myRw?sub_confirmation=10)

Happy Coding and Always Stay Awesome 💙

{% youtube LMM91VuS9Xg %}
How to decide which architecture pattern is best suitable for which app.
Tags: android, androidappdevelopment, architecture, architecturepattern
Published: 2020-07-07 08:40:57

AppDev how would you decide which architecture pattern is best suitable for which app.
How to decide which one is better.


As we all know there are many architecture patterns to implement a mobile app, and we can use anyone to develop any app. but every pattern has some if and but.

Every architecture pattern has some use case, when and why?
We have to decide very carefully architecture for our app.

first of all, we all have to understand that architecture is not decided on the basis of any single thing, 
There are many architecture pattern like MVC, MVP, MVVM, MVI etc.
How to decide which one will suit your app.
Which architecture is best suitable for our app is decided on the basis of, User Interface, test case, business logic, app's user scale, etc.
https://www.javaoneworld.com/2020/05/best-suitable-architecture-pattern-for-app-development.html
Road to Genius: advanced #42
Tags: javascript, beginners, codenewbie, computerscience
Published: 2020-07-07 08:30:26

Each day I solve several coding challenges and puzzles from Codr's ranked mode. The goal is to reach genius rank, along the way I explain how I solve them. You do not need any programming background to get started, and you will learn a ton of new and interesting things as you go.

```JS
function DFS(board, row, col, rows, cols, word, cur) {
  if (row >= rows || row < 0)
    return false;
  if (col >= cols || col < 0)
    return false;
  const item = board[row][col];
  if (item !== word[cur])
    return false;
  if (cur + 1 === word.length)
    return true;
  board[row][col] = null;
  const res = DFS(board, row + 1, col, rows, 💧, word, cur + 1) || DFS(board, row - 1, col, rows, cols, word, cur + 1) || DFS(board, row, col - 1, rows, cols, word, cur + 1) || DFS(board, row, col + 1, rows, ☃️, word, cur + 1);
  board[row][col] = item;
  return res;
}
function exist(board, word) {
  if (word.length === 0)
    return true;
  if (board.length === 0)
    return false;
  const rows = board.length;
  const cols = board[0].length;
  for (let i = 0; i < rows; i++) {
    for (let j = 0; j < cols; j++) {
      const hit = DFS(board, i, j, 🐼, cols, word, 0);
      if (hit)
        return true;
    }
  }
  return false;
}
let board = [['3', '6', '7', '7'], ['1', '2', '9', '5'], ['8', '2', '3', '7'], ['1', '7', '7', '3']];
let A = exist(board, '84');

// ☃️ = ? (identifier)
// 💧 = ? (identifier)
// 🐼 = ? (identifier)
// such that A = false (boolean)
```

In today's challenge we are given quite a lot of code and I have no clue what it does. Fortunately we only have to fix 3 bugs, so let's get started.

The first two bugs appear on the same line:
```JS
const res = DFS(board, row + 1, col, rows, 💧, word, cur + 1)
         || DFS(board, row - 1, col, rows, cols, word, cur + 1)
         || DFS(board, row, col - 1, rows, cols, word, cur + 1)
         || DFS(board, row, col + 1, rows, ☃️, word, cur + 1);
```
Both bugs 💧 and ☃️ are very likely going to be `cols` because I the two inner lines use `cols` in the same argument position as well.

The final bug 🐼 is on the line:
```JS
const hit = DFS(board, i, j, 🐼, cols, word, 0);
```

In this case 🐼 is likely going to be `rows`. Throughout the code the function calls to `DFS` don't seem to alter the arguments for `rows` and `cols`. Let's test this assumption:

![coding challenge answer](https://dev-to-uploads.s3.amazonaws.com/i/y213773sqvlze4t6znfd.png)

Great! And since there's quite a lot of code which I have no clue what it's doing, I'm going to skip a detailed analysis; we are likely to encounter this code again at higher ranks.

By solving these challenges you train yourself to be a better programmer. You'll learn newer and better ways of analyzing, debugging and improving code. As a result you'll be more productive and valuable in business. Get started and become a certified Codr today at https://nevolin.be/codr/
Three ways the lockdown improved our agile culture
Published: 2020-07-07 08:22:30

---
title: Three ways the lockdown improved our agile culture
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
---
_This article was written by **Paul Boylan**. Paul is a Scrum Master at GPI, establishing a supportive environment where the development team can work at its best._

At the end of our Coleridge sprint on the Horizon project, we had our first major demo for the leadership team. Hardly settled into our new offices, we were a little in denial we would soon be working out of our homes. Before the end of our Duxford sprint we were all in lockdown, and we faced the challenge of sprints Ely through Hauxton as individuals.

### 1. Self-organisation
This was a new team, who hadn’t been working together for long. Normally a challenging time. Still in the polite stage, differences in working styles were showing as a theme in retrospectives. Sending everybody home would likely exacerbate this. In fact, with change now inevitable for everyone, I now saw the team finding ways to work. Practice, the ‘how’, emerged from the team.

### 2. Stand-up engagement
I have three stand up meetings each morning. I am not in the same room as any of the teams. They might be split across a couple of locations, but they are in a group. This changed with lockdown. The purpose of the stand-up meeting is for the developer to tell their own story to themselves, but also to the team. It is easy to slip into the habit of making each update sound like it is to the Scrum Master, especially when the Scrum Master is the most remote. It is an update to the person who wasn’t here yesterday and won’t be here today. Unexpectedly, with everyone working from home, a more complete circle was formed, increasing participation and collaboration.

### 3. Story selection
Another area refreshed by the lockdown has been story selection. Over time, the cadence of sprints begins to work against value. We want to deliver the highest value possible each sprint, but we know there is a next sprint coming. In lockdown, I have noticed a new importance in having something great to show. We began to visualize the product, one sprint on, either with or without a feature. It is easy to imagine a craving for interaction and a need for purpose as driving this, but another idea is that we are living with more ‘cannot do’ now and this has sharpened our focus on the ‘can do’: what if the user can do this… or this?

If agile thrives in environments of adversity, unpredictability, and change, then it follows that there is a risk that it loses ground where these are absent. The challenge, I think, is to keep with us the spirit of these times.

_How has lockdown affected your agile practice? Let me know in the comments below._
How to become Project Manager from Front-end Dev
Tags: career, frontend, projectmanager
Published: 2020-07-07 08:22:23

Like a title my goal is become a Project Manager. But I heard, a PM don't need to be good in coding. So I am confused how to become PM without be a Fullstack Dev. Please help me and can I take some advice. I'm a Junior Frontend with 2 years exp. 

Thank you to read!
Need Advice With My New Project
Tags: javascript
Published: 2020-07-07 08:16:45

Hello everyone,,

I am looking for project ideas to learn how to really apply what I’m learning. I am following theodinproject right now at home and having something separate to work on at work in my free time would help me cement a bit of my learning.

My idea is to create an ikea catalogue type of assembly procedure. A home screen that tells about what I am constructed in. A navbar that has say 8 sections each opening in a new tab or completely changing the page I am on and each page having a image larger than the rest of what is being assembled and beside it hardware parts and steps etc. https://gimp.cc

Maybe small boxes and lines showing what goes where or possibly room for sketches. Also I don’t know how to go about showing friends, posting online somehow using a flash drive etc. I don’t have to actually put words just filler text and photos are fine with me.https://blender.onl

Is this something doable for a beginner? Will this require more than I would even use for full stack? Would this be a huge waste of time or potentially help me learn? https://audacity.vip
Average salary of software developers in 2020 in top IT companies
Tags: averagesalary, softwaredevelopers, itcompanies
Published: 2020-07-07 08:14:54

Ever  wondered how high would your salary be if you'd work in any Other MNC  company, especially the big Indian MNC of your dream as a [software  developer / programmer](https://www.guidesure.in/2020/03/average-salary-of-software-developers-in-2020.html)?


In  order to find out [what is the average salary paid to a professional](https://www.guidesure.in/2020/03/average-salary-of-software-developers-in-2020.html) who  work as a programmer in Indian top IT companies through the rating and  review portal of Job Buzz, we investigated. Surprisingly, with the same  profile each organization has specific compensation standards. Here is  the list: Of The following MNC'S



#### Tata Consultancy Service

Annual salary ranging from Rs 2.83,856 to Rs 8,72,128 offers to Tata  Consultancy Services Ltd (TCS) its programmers. The TCS software  developer's average salary is Rs. 5,08,304 / yr.



#### HCL

A  popular software developer's Company, HCL Technologies Ltd. is also  Offers their employees a Rs. 4,83,296 / yr average, where the minimum  and maximum wages are Rs. 2,45,184 and 8,65,197.



#### Wipro Technologies

On the other side, Wipro Technologies Ltd. offers its software engineers an  average yearly wage of Rs. 4.66,667. Wage is between Rs. 2.42.292 and  Rs. 4.62.690.



#### Mahindra Tech

As a  software developer, you can earn Rs. 2.57.469 to Rs. 8.47.407 for the  annual salary. The average wage paid annually is Rs. 4,50,703



#### Infosys

Infosys is the leading Indian IT Major by providing their software engineers /  developers the highest minimum wage of Rs. 3,13,602. The average annual  wage is Rs. 7,66,754, which is an amount of Rs. 4,74,384.
Your Invite to the Ethereum Summer Camp 2020
Tags: ethereum, blockchain, eth2
Published: 2020-07-07 07:57:00

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/r0yc1bbdwtjmnrxdavol.png)
On the day we decided to postpone [EDCON](https://2019.edcon.io/) — the annual global Ethereum Community Development Conference, a little over 4 months ago, we were hoping that we could resume the event sometime soon in the spring. But the COVID-19 crisis erupted globally and everything changed. It feels true strange to think about all the speakers we’ve already invited and the talks they were going to give, all the people, friends, and partners we were supposed to meet in person, and the [dance](https://www.youtube.com/watch?v=j7MeJionPMA&feature=youtu.be) — oh, we just miss dancing with you and Vitalik while we all “hang out on Zoom”.

_Why not turn it virtually? How about a summer-long camping festival and everyone’s invited?_

Today, we’re very excited to invite you from all over the world to join us for 8 weeks, 53 days and hundreds of hours of virtual Ethereum Summer Camp, featuring developers building Ethereum together, announcements from the community, updates from the builders and entrepreneurs, artists and DJs, workshops, and much more!

<H2>What Is Ethereum Summer Camp?</H2>
This year, starting on July 9, the first-ever summer-long <B>[Ethereum Summer Camp 2020](https://www.ethplanet.org/ethereum-summer-camp-2020/)</B> will be hosted virtually and free to attend for everyone. The best part? You will be able to attend a series of live-streamed ESC 2020 events, including EDCON, ETAC (powered by one of the largest software developers network in China — [CSDN](http://www.csdn.net/), Chinese Software Developer Network) event, workshops, ETHPlanet Hack, meetups from your home (or your couch), and we will share Ethereum-related resources to bring technology and inspiration to the learners in your life.

Also, we will set up a stage dedicated to elevating and empowering women in Ethereum — we’re here to support diversity in the industry.

<H2>The First Week of #ESC 2020 — Deep Dive into Eth 2.0</H2>
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/iclo8xzra1l9rswutkzt.png)
To kick off the #ESC2020, join us for FREE for a fun morning (or evening, if you’re in the APEC region like us) of insightful talks with Ethereum founder [Vitalik Buterin](https://twitter.com/VitalikButerin), Ethereum core researchers [Danny Ryan](https://twitter.com/dannyryan) and [Karl Floersch](https://twitter.com/karl_dot_tech), followed by Q&A with speakers!

[Deep dive into Eth 2.0 with Vitalik and Ethereum Core Devs](https://hopin.to/events/deep-dive-into-eth-2)

Sign up to reserve your spot now >> [HERE](https://hopin.to/events/deep-dive-into-eth-2)

---
If you’re interested in exploring the potential of Ethereum blockchain and open source technology, ETHPlanet is a place of inspiration, tools, information, and the community you can trust.

► Visit our website here: 🌍 [ETHPlanet.org](https://www.ethplanet.org/) 🌍
Get top 50 web traffic sites with Python
Tags: python
Published: 2020-07-07 07:46:48

We can get the top 50 web traffic sties with these two site traffic monitor services:

- Alexa: https://www.alexa.com/
- SimilarWeb: https://www.similarweb.com/

and the top 50 web traffic sites are:

- Alexa: https://www.alexa.com/topsites
- SimilarWeb: https://www.similarweb.com/top-websites/

With python requests and BeautifulSoup modules, we can automate list the top 50 web sites from these two monitor services.

First we create a dict that store these two monitor service urls and selectors (for BeautifulSoup select):

```python
webRankSites = {
  "Alexa": {
    "url": "https://www.alexa.com/topsites/",
    "selector": "div.DescriptionCell"
  },
  "SimilarWeb":{
    "url": "https://www.similarweb.com/top-websites/",
    "selector": "td.topRankingGrid-cell.topWebsitesGrid-cellWebsite.showInMobile"
  }
}
```
How to define the selector? We need to check these two services url content with the site list:

1. Alexa:
![Alexa selector](https://dev-to-uploads.s3.amazonaws.com/i/lq7s00g0hv8jqo18djy2.png)
As the developer tools show, the web site is in the element div with class DescriptionCell, the selector is "div.DescriptionCell".

2. SimilarWeb:
![SimilarWeb selector](https://dev-to-uploads.s3.amazonaws.com/i/bnb6ssktxfgr31pjzjrb.png)
The web site is in the element td with 3 classes topRankingGrid-cell, topWebsitesGrid-cellWebsite, showInMobile. The selector is "td.topRankingGrid-cell.topWebsitesGrid-cellWebsite.showInMobile".

Second we start to get the url content with requests.get and with BeautifulSoup selector patterns to get the web site list (myheaders is used for similarWeb service, since no user-agent will result response status code 403):

```python

myheaders = {"user-agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0(HTTP_USER_AGENT)"}

for site in webRankSites:
  print("site: " + site)
  resp = requests.get(webRankSites[site]["url"], headers = myheaders)
  soup = BeautifulSoup(resp.text, 'html.parser')
  items = soup.select(webRankSites[site]["selector"])
  i = 1
  for item in items:
    print(str(i) + ". " + item.text.strip())
    i+=1
```

Then we can get the result:

```
site: Alexa
1. Google.com
2. Youtube.com
3. Tmall.com
...
site: SimilarWeb
1. google.com
2. youtube.com
3. facebook.com
...
```

Wow, the result can be automate to get and it looks great. Wanna try? Check this demo: 

https://repl.it/@timhuangt/GlobalTopSite

And enjoy it! Happy coding!!
setTimeout() - any drawback?
Tags: javascript, todayilearned, beginners
Published: 2020-07-07 07:46:39

Recently, I had come across a bug that needed auto-refresh after a certain point of time. And `setTimeout()` had been used to count down to the time and reload the page. Little did I know that `setTimeout()` came with a price. 


As quoted on MDN Web Docs at the very _bottom_, **"Browsers including Internet Explorer, Chrome, Safari, and Firefox store the delay as a 32-bit signed integer internally. This causes an integer overflow when using delays larger than 2,147,483,647 ms (about 24.8 days), resulting in the timeout being executed immediately."**


Now, you'll understand what kept happening to the page! (The page kept reloading...)


It is very much true that there is hardly any process that would require this big a delay. You have other options, like reseting timer after certain duration or using `setInterval()`. 

I would prefer `setInterval()`, when there are simple operations in the callback function and when you know what is the maximum time that function is going to take to execute. If you aren't aware of the maximum time, the event queue will keep piling up forever as your code's activity lags behind the actual system time. 

Choose wise! Don't forget to clear the timers when your job is done!
New Video! What is Throughput in Azure Cosmos DB?
Tags: azure, dotnet, database, tutorial
Published: 2020-07-08 00:53:48

---
title: New Video! What is Throughput in Azure Cosmos DB?
published: true
date: 2020-07-07 07:30:22 UTC
tags: azure,dotnet,database,tutorial
canonical_url: 
---

#### In Azure Cosmos DB, we need to provision enough throughput to meet the demands placed on our applications, but what exactly is throughput?

![](https://cdn-images-1.medium.com/max/560/0*bL-yfGc_rd90S43a.png)

In Azure Cosmos DB, we are charged for the throughput and storage that we provision on our Azure Cosmos DB databases and collections, but just what is Throughput? And why have I got a massive bill for provisioning it?!

{% youtube wp0bMeMyi-0 %}

In this video,

- I’ll show you what **throughput** is and what it means in Azure Cosmos DB.
- What **Request Units**  are.
- **What factors affect the amount of Request Units** we are charged.
- How you can apply Request Units at both the Database and Container level (and why you would choose one path over the other).
- I’ll also talk about the different ways you can provision Throughput in Cosmos DB and show you a **quick demo** on how to provision throughput.

By the end of this video, you’ll know what Throughput is in Azure Cosmos DB, what affects the amount of Throughput we consume and how to provision enough Throughput to ensure that your applications can handle any level of workload placed on it.

If you have any questions, please feel free to ask in the comment section either here or on YouTube.

_N.B, if you prefer to read an article, rather than watching a video. I have previously written on Throughput in Azure Cosmos DB here:_ [https://medium.com/@willvelida/understanding-and-optimizing-throughput-in-azure-cosmos-db-7dd71593c8d3](https://dev.to/willvelida/understanding-and-optimizing-throughput-in-azure-cosmos-db-5apb)
SƠ LƯỢC VỀ NGÔN NGỮ LẬP TRÌNH JAVASCRIPT – JAVA VÀ JAVASCRIPT CÓ KHÁC NHAU KHÔNG?
Published: 2020-07-07 07:26:48

JavaScript được tạo ra lần đầu tiên bởi Brendan Eich tại công ty Netscape vào năm 1995 – được đặt tên là Mocha cuối cùng được đặt tên là JavaScript. Những số liệu thống kê từ trước năm 2017 đến giờ thì đây là ngôn ngữ được giới lập trình viên sử dụng nhiều nhất. Vậy Javascript có gì mà nó lại đứng top như vậy, mức độ phổ biến của nó biểu hiện như nào và nó có khác với Java không, chúng ta sẽ tìm hiểu trong bài viết này.
http://24htechtrend.com/index.php/javascript-la-gi/