teleren/devto huggingface dataset:
LUX TECH ACADEMY- Data Structure and Algorithms Week 1
Tags: javascript, luxtech, ds, algorithms
Published: 2022-06-16 16:03:22

https://www.hackerrank.com/challenges/simple-array-sum/problem?isFullScreen=true

**Solutions**
Solution 1.
```
function simpleArraySum(ar) {
    // using a forEach or a for loop
   let sum = 0;
   ar.forEach((element) => {
      sum = sum + element;
   });
  return sum;
 }
```


Solution 2.
```
function simpleArraySum(ar) {
    // Using a inbuilt function reduce.
    return ar.reduce((a, b) => a+b, 0);
}
```
Cyber-physical systems
Tags: systems, opensource, microservices, luos
Published: 2022-06-16 15:56:04

At Luos, we often talk about embedded systems and edge, but a term often resurfaces in our everyday vocabulary, Cyber-physical systems (CPS).

▶️ https://www.luos.io/blog/cyber-physical-systems

With this new blog post, let's take a look at what CPS is, some examples, how it differs from IoT and the impacts/benefits of these systems in your daily life.
Get a free domain name for your projects.
Tags: webdev, beginners, tutorial
Published: 2022-06-16 15:38:28

Okay, so here's how you can get a free ccTLD Domain name.

( Warning : Only use these domains for your personal use, don't build a business website or something that gets lots of traffic or attention. Read the comments for more info)

First go to - [freenom.com](https://freenom.com/). There on the search bar search for the domain name you want, with the free domain extension you want.

You can get **.tk** (Tokelau), **.ml** (Mali), **.ga**(Gabon), **.cf**(Central African Republic), **.gq**(Equatorial Guinea) domains for free.

So just enter your domain name like for example - mydomian.tk, see if its available, if it is then proceed to check out.

Create a freenom account using your real email id and complete the order.

If you are getting any sort of error then you are probably not from the united states, so just download a free VPN, connect to USA.

Clear Freenom.com cache and cookies and try the steps again. That's it.

Now if you still need any help then follow this [guide](https://xcattx.com/free-domain-name/).
Count Number of Rectangles Containing Each Point
Tags: leetcode, dsa, theabbie
Published: 2022-06-16 15:30:33

You are given a 2D integer array `rectangles` where `rectangles[i] = [li, hi]` indicates that `ith` rectangle has a length of `li` and a height of `hi`. You are also given a 2D integer array `points` where `points[j] = [xj, yj]` is a point with coordinates `(xj, yj)`.

The `ith` rectangle has its **bottom-left corner** point at the coordinates `(0, 0)` and its **top-right corner** point at `(li, hi)`.

Return _an integer array_ `count` _of length_ `points.length` _where_ `count[j]` _is the number of rectangles that **contain** the_ `jth` _point._

The `ith` rectangle **contains** the `jth` point if `0 <= xj <= li` and `0 <= yj <= hi`. Note that points that lie on the **edges** of a rectangle are also considered to be contained by that rectangle.

**Example 1:**

![](https://assets.leetcode.com/uploads/2022/03/02/example1.png)

**Input:** rectangles = \[\[1,2\],\[2,3\],\[2,5\]\], points = \[\[2,1\],\[1,4\]\]
**Output:** \[2,1\]
**Explanation:** 
The first rectangle contains no points.
The second rectangle contains only the point (2, 1).
The third rectangle contains the points (2, 1) and (1, 4).
The number of rectangles that contain the point (2, 1) is 2.
The number of rectangles that contain the point (1, 4) is 1.
Therefore, we return \[2, 1\].

**Example 2:**

![](https://assets.leetcode.com/uploads/2022/03/02/example2.png)

**Input:** rectangles = \[\[1,1\],\[2,2\],\[3,3\]\], points = \[\[1,3\],\[1,1\]\]
**Output:** \[1,3\]
**Explanation:**
The first rectangle contains only the point (1, 1).
The second rectangle contains only the point (1, 1).
The third rectangle contains the points (1, 3) and (1, 1).
The number of rectangles that contain the point (1, 3) is 1.
The number of rectangles that contain the point (1, 1) is 3.
Therefore, we return \[1, 3\].

**Constraints:**

*   `1 <= rectangles.length, points.length <= 5 * 104`
*   `rectangles[i].length == points[j].length == 2`
*   `1 <= li, xj <= 109`
*   `1 <= hi, yj <= 100`
*   All the `rectangles` are **unique**.
*   All the `points` are **unique**.

**SOLUTION:**

    from collections import defaultdict
    import bisect
    
    class Solution:
        def countRectangles(self, rectangles: List[List[int]], points: List[List[int]]) -> List[int]:
            n = len(rectangles)
            heights = defaultdict(list)
            for l, h in rectangles:
                bisect.insort(heights[h], l)
            count = []
            for x, y in points:
                ctr = 0
                for h in range(y, 101):
                    ctr += len(heights[h]) - bisect.bisect_left(heights[h], x)
                count.append(ctr)
            return count
Conheça o Guia de TI 🦉
Published: 2022-06-16 15:26:41

🚀🚀 Pega essa dica! 🚀🚀

Que tal aproveitar o feriadão e aprender uma nova tecnologia?
O Guia de TI 🦉 está cada vez mais completo! Aproveite para conhecer.

São centenas de cursos gratuitos e programas gratuitos com certificado.

No Guia de TI 🦉 você vai encontrar:

● Cursos Gratuitos
● Cursos Pagos
● Blogs e Podcasts
● Canais do Youtube
● Eventos e Comunidades
● Empregos e Freelancers
● Certificações Profissionais
● Sites de Tecnologia e Guias
● Livros e Documentos
● Repositórios Github
● Ferramentas e Softwares

Compartilhe com seus amigos para todo mundo ficar sabendo!

Acesse agora! https://guiadeti.com.br/
Free Peer-to-Peer Mock Interviews
Tags: career, programming, webdev, tutorial
Published: 2022-06-16 15:04:06

If you are currently studying for programming interviews and looking to improve skills outside of textbooks & leetcode, check out Hackpacks peer-to-peer mock interviews. 

Free to signup and you will get matched with someone within 24 hours. 

Check it out here: [https://www.hackpack.io/mock-interviews](https://www.hackpack.io/mock-interviews)

### Benefits

Mock interviews get you used to the social pressure of figuring out a challenging coding problem in front of another human. They are a chance for you to develop your communication skills and practice explaining your thought process as you code. It is also an opportunity to practice working through a problem when you get stuck. 

### Connection

Since Hackpack is a community of engineers studying for programming interviews, it is important for us to match you with someone who is at your same level of preparation. If the interview goes well, feel free to set up a reoccurring mock interviews. It is a great way to hold yourself accountable to feedback.

### Join the Community

Looking for a study partner? [Hackpack](https://www.hackpack.io/) is the most active community. of engineers studying for programming interviews. We hold each other accountable, provide support, and fight burnout to study more efficiently and get the job faster.

You can apply on the site.

[Big Tech Interview Tips Newsletter](https://fangprep.substack.com/)

[Other Mock Interview Resources](https://www.hackpack.io/blog/mock-interviews)

[Programming Interview Prep Events](http://[https://discord.gg/VQkMr234zk?event=970275330294153257](https://discord.gg/VQkMr234zk?event=970275330294153257))
Get Highly Comfortable Dedicated Hosting Solutions
Published: 2022-06-16 15:03:17

You need to have a Dedicated Hosting server setup for delivering seamless services through online. We at Dedicatedhosting4u make this happen by providing you with high-performance dedicated hosting server solutions that are affordable and highly functional at the same time. We have all sorts of server hardware that would suit your needs. For small and medium businesses – we have the single core solution and if you are running an enterprise, get the quad core optimum performance hardware for you.

Our [Reliable dedicated hosting](https://www.dedicatedhosting4u.com/) are highly flexible and it can meet all your needs. If you were planning to build a platform on a distributed architecture, we have the right hosting resources. We can provide you with cloud hosting solutions that can seamlessly grow your business. We provide features like real-time cloning and backup that is completely image-based.
Whenever you come across queries regarding our dedicated hosting solutions, you can immediately connect with our team of experts to clarify the same. One of the best features of our solutions is real time deployment. We never make you wait for a long time for the process of deployment. We provide great opportunities for integrating dedicated servers and cloud servers, all at one place. You can leverage the high-speed network for maximum output. Our objective is quite simple; it helps you out in dealing with all hosting requirements.

Highly Secured Dedicated Hosting
We deliver dedicated hosting services without any hidden costs, you can be sure of it. Our server management system is one of the best in class, it provides you great tools for remote management of the servers. We have built a reliable architecture that will provide you access on all circumstances while keeping all the threats away from you. We have great tools that will help you out in making the most out of your servers.
We provide dedicated hosting solution that are equipped with great security features. Now you don’t have to worry about any threats that will take your site down. We have integrated strategies that provide great security without compromising on the overall server performance or utilisation. We provide support in 24*7 , you can get instant assistance for any queries regarding our services. Our experts will provide instant support to you.

Let’s Discuss Choosing A Right  Data Center For Your Business
With the increase in demand of Data centers, companies invest huge in establishing data centers. But is it so easy to establish your own data center? How much money will it cost along with time? Why to choose our data center for your business? If you want answers to all these questions, you will get all the answers in this article. Keep reading till the end.

Data Center Strategy

Today, businesses prefer data centers for better data management. Investing in a reputable data center boosts the business sales. There are numerous components for good business performance that are storage management, servers, routers, telecommunication equipment to store, send, and receive data .
hackerrank algorithns solutions
Tags: python
Published: 2022-06-16 15:03:13

Given an array of integers, find the sum of its elements.

For example, if the array ,ar[1, 2, 3] ,(1+2+3) so return = 6
here`s is my sample code
#
# Complete the 'simpleArraySum' function below.
#
# The function is expected to return an INTEGER.
# The function accepts INTEGER_ARRAY ar as parameter.
#

import math
import os
import random
import re
import sys




def simpleArraySum(ar):
    # Write your code here
    x=0
    for i in range(0,ar_count):
        x += ar[i]
    return x

if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    ar_count = int(input().strip())

    ar = list(map(int, input().rstrip().split()))

    result = simpleArraySum(ar)

    fptr.write(str(result) + '\n')

    fptr.close()
Angular Nation's AG Grid Music Video
Tags: aggrid, javascript, react
Published: 2022-06-17 10:03:37

---
title: Angular Nation's AG Grid Music Video
published: true
date: 2022-06-16 15:02:35 UTC
tags: aggrid, javascript, reactjs
canonical_url: https://blog.ag-grid.com/angular-nations-ag-grid-music-video/
cover_image: https://blog.ag-grid.com/content/images/2022/06/angular-nation-music-video_tiny.png
---

 ![Angular Nation's AG Grid Music Video](https://blog.ag-grid.com/content/images/2022/06/angular-nation-music-video_tiny.png)

Back in May of 2022, [Bonnie](https://twitter.com/bonnster75) and [Samantha](https://twitter.com/thelittlestdev) from [Angular Nation](https://www.angularnation.net/) made a trip over to London to visit the AG Grid offices where they shot the footage for an Angular Nation AG Grid Music video.

Samantha had previously demonstrated her musical and dance talents in her Nullish Coalescing video which spread wildly on Twitter.

- [Watch Nullish Coalescing Music Video on YouTube](https://www.youtube.com/watch?v=aNcGKBB8WGs)

So when Samantha volunteered to create a song and video for us we eagerly said yes.

The caveat was that we were going to have to appear in the video.

Appearing in the video was easy to agree to.

Having gained initial agreement Samantha upped the stakes to include dancing and singing in the video.

We haggled a bit and managed to knock the stakes down to just dancing. Samantha was going to take on the pressure of doing all the music, lyrics, and singing.

[Niall Crosby](https://twitter.com/niallcrosby), AG Grid's CEO agreed to take on the challenge of dancing and miming to the lyrics... we think he did actually sing during the recording at some points, but we don't have all the outtakes and rushes to prove this.

The final video contains footage shot in the office and from nearby in the Hays Galleria shopping centre.

Many of the AG Grid team joined in and took part in a group dance session. The initial plan was to have a more complicated set of, apparently "very basic", dance moves, but during the group rehearsal we discovered we needed to simplify the "very basic" dance moves even further to avoid us crashing into each other like an out of control frenzy of bumper cars on legs.

Samantha and Bonnie left the office with a lot of footage and managed to edit it all down into a fun concise 2 minute music video, which you can view below.

<iframe width="560" height="315" src="https://www.youtube.com/embed/OhScHn9fOVw" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

[Angular Nation](https://www.angularnation.net/) is a free community to create a safe learning environment for people to discuss and explore Angular and Typescript. By joining the community you will gain access to free webinars, courses and AMA sessions with core members of the Angular team and surrounding eco-system tools.

<!--kg-card-end: markdown-->
Maximum Distance Between a Pair of Values
Tags: leetcode, dsa, theabbie
Published: 2022-06-16 15:00:41

You are given two **non-increasing 0-indexed** integer arrays `nums1`​​​​​​ and `nums2`​​​​​​.

A pair of indices `(i, j)`, where `0 <= i < nums1.length` and `0 <= j < nums2.length`, is **valid** if both `i <= j` and `nums1[i] <= nums2[j]`. The **distance** of the pair is `j - i`​​​​.

Return _the **maximum distance** of any **valid** pair_ `(i, j)`_. If there are no valid pairs, return_ `0`.

An array `arr` is **non-increasing** if `arr[i-1] >= arr[i]` for every `1 <= i < arr.length`.

**Example 1:**

**Input:** nums1 = \[55,30,5,4,2\], nums2 = \[100,20,10,10,5\]
**Output:** 2
**Explanation:** The valid pairs are (0,0), (2,2), (2,3), (2,4), (3,3), (3,4), and (4,4).
The maximum distance is 2 with pair (2,4).

**Example 2:**

**Input:** nums1 = \[2,2,2\], nums2 = \[10,10,1\]
**Output:** 1
**Explanation:** The valid pairs are (0,0), (0,1), and (1,1).
The maximum distance is 1 with pair (0,1).

**Example 3:**

**Input:** nums1 = \[30,29,19,5\], nums2 = \[25,25,25,25,25\]
**Output:** 2
**Explanation:** The valid pairs are (2,2), (2,3), (2,4), (3,3), and (3,4).
The maximum distance is 2 with pair (2,4).

**Constraints:**

*   `1 <= nums1.length, nums2.length <= 105`
*   `1 <= nums1[i], nums2[j] <= 105`
*   Both `nums1` and `nums2` are **non-increasing**.

**SOLUTION:**

    # class Solution:
    #     def maxDistance(self, nums1: List[int], nums2: List[int]) -> int:
    #         mdiff = 0
    #         m = len(nums1)
    #         n = len(nums2)
    #         nums1min = [0] * m
    #         nums2max = [0] * n
    #         curr = 0
    #         for i in range(m):
    #             if nums1[i] < nums1[curr]:
    #                 curr = i
    #             nums1min[i] = curr
    #         curr = n - 1
    #         for i in range(n - 1, -1, -1):
    #             if nums2[i] > nums2[curr]:
    #                 curr = i
    #             nums2max[i] = curr
    #         print()
    #         k = min(m, n)
    #         for i in range(k):
    #             mdiff = max(mdiff, nums2max[i] - nums1min[i])
    #         return mdiff
    
    import bisect
    
    class Solution:
        def maxDistance(self, nums1: List[int], nums2: List[int]) -> int:
            mdiff = 0
            m = len(nums1)
            n = len(nums2)
            nums2.reverse()
            for i in range(m):
                j = n - bisect.bisect_left(nums2, nums1[i]) - 1
                mdiff = max(mdiff, j - i)
            return mdiff
what is true and what is not..
Tags: beginners, programming, devjournal
Published: 2022-06-16 14:57:30

When it comes to the world of development everything related, there is always a line of thought that you should follow. - Most of the time, You pick up exactly what the code means and what it is you need to implement, while learning something new, but sometimes it comes to learning from live lessons.
This means that you will be learning SOMEONE's way of working a code, and, I have talked about this in a earlier post, this usually means you have to know how the person teaching thinks while coding. Most of the time it's as simple as learning yourself from a book, but sometimes you need to translate from that person's teaching "language".
Request and Response in nodejs
Published: 2022-06-16 14:57:04

Hey !! this is Irusha and in this post you are gonna to learn about the request and response in nodejs and lets jump into code directly.

you got to create a views folder in which you will be creating about.html, home.html and 404.html and outside the folder you got to create server.js. And we will run the following code .Its simple and easy !! you gottta....

server.js
```
const http = require("http");
const fs = require("fs");

const server = http.createServer((req, res) => {
  console.log(req.url, req.method);

  res.setHeader("Content-Type", "text/html");
  let path = "./views/";
  switch (req.url) {
    case "/":
      path += "index.html";
      break;
    case "/about":
      path += "about.html";
      break;
    default:
      path += "404.html";
      break;
  }
  fs.readFile(path, (err, data) => {
    if (err) {
      console.log(err);
      res.end();
    } else {
      //res.write(data);
      res.end(data);
    }
  });
});

server.listen(3000, "localhost", () => {
  console.log("listening to the 3000 local host");
});

```
After that run above code as node server and hit enter then you will see output. And tried out going to localhost:3000 you will get result .
Test out CodeSec for yourself with our evaluator guide!
Tags: programming, java, cloud, tutorial
Published: 2022-06-16 14:54:51

**CodeSec by Contrast** brings the fastest and most accurate scanner in the market right to your development workflow **for free**! 

Make code and serverless security simple and efficient with quick scan times, market-leading accuracy, actionable results and seamless integration. Up and running in less than 5 minutes.

We here at Contrast, have created this guide to not only show developers what CodeSec can offer, but also give them the tools to test it and see for themselves just how fast, accurate and seamless CodeSec can be! 

See For Yourself: https://www.contrastsecurity.com/security-influencers/codesec-by-contrast-security-evaluator-guide
Java array: find the contact number of a person
Tags: java, development, android, app
Published: 2022-06-16 14:43:11



```
package com.java_android.android;

import java.util.Scanner;

public class Android {
    public static void main(String[] args) {

        String[] name = {"amir", "salman", "shahrukh", "saif", "kamal"};
        int[] number = {1576544, 2355778, 378467, 4556776, 584669};

        for (int i = 0; i < name.length; i++) {
            System.out.println(name[i]);
        }
        System.out.println("enter your name");
        Scanner scanner = new Scanner(System.in);
        String inputName = scanner.next();
        for (int j = 0; j < name.length; j++) {
            if (inputName.equals(name[j])) {
                System.out.println(number[j]);
            }
        }
    }
}

```
I built a tool that analyses your code and configures AWS to run it
Tags: aws, terraform, javascript, webdev
Published: 2022-06-16 14:35:03

Here it is: [flywheel.sh](https://flywheel.sh)

Almost 2 years ago my cofounder and I started building Digger. It took us a year, and last summer we have finally shown it to the world. We launched Digger quite successfully on ProductHunt as well as and on HackerNews. But it wasn’t instant product-market fit we hoped for. More like, different people were using Digger for different reasons.

Then we launched a few follow-up products with more focused value propositions like UI (Lemon), or multi-cloud (Alicorn), or databases (Hippobase). We learned a lot from the early adopters (thank you!!). The biggest learning was that we were trying to solve too many problems at once, and that confused our users a great deal.

So we went back to the drawing board. We have radically simplified the UI, especially onboarding. We asked ourselves - what is the one thing our users care about most? And we started launching what we thought were features as separate products. Some of them flopped (remember Serverful?) - and so we killed the feature. Others succeeded, like one-click sample app setup (AWS Bootstrap) and most recently Terragen that automatically generates infrastructure-as-code.

And then we wondered: is there something in common with the products that were received warmly? Turns out, there is - speed. In hindsight it is obvious that speed matters a great deal. Because it is not uncommon to spend more time on setting up AWS infrastructure for your app than building the app itself.

Then we thought, what would the fastest developer experience with AWS infrastructure look like? Making each step as fast as possible seemed like a good start:

- the fastest way to get the code

- the fastest way to determine what infrastructure is needed

- the fastest way to provision that infrastructure on AWS

.#1 can be solved by one-click Github repository connection, like in Vercel. It doesn’t get much faster than that

.#3 can be solved by generating and running Terraform (this is what Terragen does)

.#2 presents the biggest challenge. How do we know what kind of infrastructure is needed?

After a great deal of not making much progress we realised something: all the information is already in the code! Because if you show your app to a DevOps engineer they wouldn’t need to ask many questions, they would just see the code and instantly know whether it’s a front-end (then it would require an S3 bucket and a CDN) or a back-end or a lambda function.

We can easily detect the language and the framework, Dockerfile, lambda handler, read package.json, things like that. Then we can feed it into the Terraform generator, then run terraform apply on our servers against user’s AWS account. This makes the entire flow completely seamless: connect your github repo → connect your AWS account → click “Deploy”. As simple as that.

And this is [Flywheel](https://flywheel.sh). Give it a try!