teleren/devto huggingface dataset:
twoSum function JS
Tags: javascript
Published: 2020-10-16 08:07:45

returns an array of position pairs where the elements sum to the target parameter

```
// Array Method to return array of indecies that their values sum is the target.
Array.prototype.twoSum = function (target) {
    // store this value in a normal variable to be captured 
    // by closure
    let self = this;
    // array to store the indices pair.
    let result_two_pairs = [];
    // iterate over each element and sum it with all the next 
    // elements to add the eight indices pair in the result 
    // array
    self.forEach((element) => {
        let start_index = self.indexOf(element);
        this.slice(start_index,).forEach((sec_ele) => {
            if ((element + sec_ele) === target) {
                if (!(result_two_pairs.includes(`(${self.indexOf(element)}, ${self.indexOf(sec_ele)})`))) {
                    result_two_pairs.push(`(${self.indexOf(element)}, ${self.indexOf(sec_ele)})`);
                };
            };
        });
    });
    // return an array containing the indices pair
    return result_two_pairs;
}
```
Formulas for Finding Largest Value Smaller than a Specified Number!!
Tags: excelformula, excelformulas
Published: 2020-10-16 11:57:08

---
title: Formulas for Finding Largest Value Smaller than a Specified Number!!
published: true
date: 2020-10-16 08:02:42 UTC
tags: ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/formulas-for-finding-largest-value-smaller-than-a-specified-number/
---

## Excel Formulas for Finding the Largest Value Smaller than a Specified Number:

In this article, we will explain the details of the Excel Formulas for Finding the Largest Value Smaller than a Specified Number. Get an official version of **MS Excel** from the following link: [https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)


## Formula Syntax:

To find the largest value smaller than a specified number in Excel Office 365, use the below formula.

**=[SUMPRODUCT](https://geekexcel.com/how-to-use-excel-sumproduct-function-in-office-365/)([MAX](https://geekexcel.com/how-to-use-excel-max-function-in-office-365-with-examples/)((A1:C5<F1)\*A1:C5))**

### Example:

-  In the below screenshot, we entered the input values in **Column A** , **Column B** , and **Column C**.
- Then, enter the formula as shown below.
- After applying the formula, it displays the output in the selected column.

![](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/07/op31.png)

## Syntax Explanations:

- **SUMPRODUCT** – In Excel, the [**SUMPRODUCT Function**](https://geekexcel.com/how-to-use-excel-sumproduct-function-in-office-365/) is used to multiply the corresponding arrays or ranges. It can also return the sum of the product.
- **MAX** – The main purpose of this function is to return the largest numeric value from the range of input values. This function will ignore empty cells, text values, and logical values. Read more on [**MAX Function**](https://geekexcel.com/how-to-use-excel-max-function-in-office-365-with-examples/).

## Verdict:

From this article, we guided you to know the formulas for finding the largest value smaller than a specified number in Excel Office 365. If you have any doubts/queries, leave it in the below comment section. Thank you for visiting **[Geek Excel](https://geekexcel.com/)!! **

### Read Ahead:

- [**Formulas to Index a Value by Matching Multiple Column in Excel 365!!**](https://geekexcel.com/formulas-to-index-a-value-by-matching-multiple-column-in-excel-365/)
- [**Formulas for Extracting Substring Between Two Texts in Excel 365!!**](https://geekexcel.com/formulas-for-extracting-substring-between-two-texts-in-excel-365/)
- [**Excel Formula to Convert Seconds to HH:MM:SS Time Format!!**](https://geekexcel.com/excel-formula-to-convert-seconds-to-hhmmss-time-format/)
My Awesome Hacktoberfest Experience
Tags: hacktoberfest
Published: 2020-10-16 08:01:52

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

## What I Learned From Hacktoberfest

* Their is a very huge scope for Opensource Communities to grow and build better software together with all its contributors and die hard maintainers

* Community builds are the best.

* Boosted my own Developer Skills

* Helped many other who were first-timers to get started
First look at OKD 4 and the new OpenShift Installer
Tags: aws, kubernetes, openshift, okd
Published: 2020-10-16 07:52:23

---
title: First look at OKD 4 and the new OpenShift Installer
published: true
description: Production OpenShift Cluster in 35 Minutes, Part I
tags: aws, kubernetes, openshift, okd
cover_image: https://assets.mkdev.me/posts/covers/000/000/012/original/mkdev_article.png
---
OpenShift is one of the most popular Kubernetes distributions in the world. In 2019, OpenShift jumped further into the bright container future with the release of version 4. In 2020, the open source version of it, OKD 4 was released. 

This is the good moment for us to start a series of videos about OpenShift 4 and some of the amazing new container technologies and approaches it brings into the picture.

In this video, Kirill Shirinkin will show you how to install the new production-ready OKD 4 cluster on AWS and demonstrate the benefits of the new openshift-installer:

{% youtube UMq4krHRcLk %}

***

Production OpenShift Cluster in 35 Minutes:

* Part I, [First look at OKD 4](https://dev.to/mkdev/first-look-at-okd-4-and-the-new-openshift-installer-2if5)
* Part II, [3 Core Features of OpenShift 4 Cluster Management](https://dev.to/mkdev/3-core-features-of-openshift-4-cluster-management-fedora-coreos-cri-o-and-machineset-api-3i1o)
* Part III, [How to Configure OpenShift 4 Cluster Nodes](https://dev.to/mkdev/how-to-configure-openshift-4-cluster-nodes-machineconfig-operator-and-coreos-4g9b)
* Part IV, [OpenShift 4 Troubleshooting](https://dev.to/mkdev/openshift-4-troubleshooting-your-cluster-is-broken-what-s-next-2lg7)

*You can always hire [our mentors](https://mkdev.me/en/specializations) and learn directly from them!*
Add search to your Jamstack app in a few clicks
Tags: news, productivity, webperf, github
Published: 2020-10-16 07:39:15

Hello there,

Searching on Netlify has just become much easier with the Algolia for Netlify plugin. It automatically indexes your website to Algolia when deploying your project to Netlify with the Algolia Crawler. 

We’re super happy to launch this plugin in a joint effort with Netlify. Find the project here: www.algolia.com/netlify

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

This enable users to index their Netlify website, using our custom crawler, as soon as the user deploy. Algolia search excellency in combinaison with the amazing hosting by Netlify in just a few clicks.

How Algolia for Netlify Works:

- Once a user installs the plugin on their Netlify site, the Algolia Crawler extracts structured data from every page any time a change occurs and indexes the content into Algolia to power the website’s search bar.
- Algolia hosts and maintains the index in the cloud, allowing developers to build highly-tailored front-end experiences using one of several pre-built UI libraries.
- The Algolia Crawler plugin can be used for a wide variety of industries —from media to technology— for various use cases, including site search with federated search, filtering, and faceting; documentation search; and customer self-service and support.

We’d love to hear your thoughts, comments and feedback. This plugin is currently in Public Beta and we’re eager to improve, thanks :)
Converting Helm Charts to K8S SDK Templates
Published: 2020-10-16 07:37:55

If you are working on a helm chart, however, you need to make customizations or debug in a more native way. An alternative is to convert it to kubernetes SDK templates. 

*Requirements*
 - *Kubernetes(1.16+)*
 - *helm (3+)*
 - *kubectl(1.16+)*

The process is simple:
(mongodb example)

1 Install desired chart generic release
``` 
- $ kubectl create ns mgodb-ns
- $ helm install mongodb --namespace mgodb-ns stable/mongodb
```
2 Extract default generated chart values from the release
```
- $ helm get values mongodb -a --output yaml > values.yaml 
```
3 Convert the chart to template
```
- $ helm template --values ./values.yaml --output-dir \
./manifests stable/mongodb

OUTPUT: 
wrote ./manifests/mongodb/templates/secrets.yaml
wrote ./manifests/mongodb/templates/pvc-standalone.yaml
wrote ./manifests/mongodb/templates/svc-standalone.yaml
wrote ./manifests/mongodb/templates/deployment-standalone.yaml
``` 
Now you can work on native SDK k8s yamls at the directory manifests/mongodb/templates/

4 Don't forget to delete the generic release
```
- $ helm uninstall mongodb
- $ kubectl delete ns mgodb-ns
```
Talking bot "You have got a Ticket"
Tags: python, supportengineer
Published: 2020-10-16 07:37:09

I being a Support Engineer, one of the tough jobs is to regularly monitor the Case or Ticket tool for new case or Ticket.

What if you have a bot saying **"Hey Man you have got a new ticket"**.

How exciting and relaxing will be! I am really excited about that. This saves me a lot of time from the boring and irritating job of Queue Monitor for the Ticket.

Today I will take you the Journey how I got this done. Though I won't share any code here, Company Policy. But I will share what I have used to build this bot.

I have implemented this bot on the *Service Now Ticket Management Tool*. I have built this using the Python Language easiest programming language for a Support Engineer. 

I have used two Python Packages for this.
1. **Selenium**: One of the Most used Automation package available in Different Languages.
2. **Pyttsx3**: Text to Speech Package for your bot to Talk.

Selenium being an Automation Tool, it can also be used to scrap a website. Basically, I have scrapped the Service Now WebPage using the Selenium to read tables which have new Ticket Details.
I have used chrome driver to open a web page in chrome browser. Others Driver is also available for different browser. One of the other common is for Firefox "GeckoDriver"

So if you are a support engineer go and try this. Make your life easier and your Manager happy.
Because many think *"Support Engineers are not meant for Coding"*
Speeding up rolling pandas
Tags: python, pandas
Published: 2020-10-16 07:36:25

Pandas is an exceedingly useful package for data analysis in python and is in general very performant. However there are some cases where improving performance can be of importance.
Below we look at using numpy to create a faster version of rolling windows.

Consider the following snippet:
```python
import pandas as pd
import numpy as np
s = pd.Series(range(10**6))
s.rolling(window=2).mean()
```
The rolling call will create windows of size 2 and then we calculate the mean of each:

```
0 NaN
1 0.5
2 1.5
 …
999998 999997.5
999999 999998.5
Length: 1000000, dtype: float64
```

However using stride_tricks in numpy we can create a function which iterates the values faster:

```python
def rolling_window(a, window):
    shape = a.shape[:-1] + (a.shape[-1] - window + 1, window)
    strides = a.strides + (a.strides[-1],)
    return np.lib.stride_tricks.as_strided(a, shape=shape, strides=strides)
```

(*Note*: There is a version of this function in scikit-image:
`from skimage.util.shape import view_as_windows`)

We can use our new rolling_window function as follows:
`np.mean(rolling_window(s,2), axis=1)`

This will return the same data as we calculated using the rolling() method from pandas, but without the leading nan value.

### Measuring Performance
Using the %timeit tool (conveniently built into Ipython and therefore jupyter as well) we measure the performance of the two versions:
```python
s = pd.Series(np.random.randint(10, size=10**6))
%timeit s.rolling(window=2).mean()
%timeit np.mean(rolling_window(s, 2), axis=1)
```
which outputs:
```
58.6 ms ± 1.42 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
25.1 ms ± 1.24 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
```

The numpy version is approximately twice as fast. For other sizes of arrays the performance will vary between 2–5x faster.
Let’s check again, but with a different calculation:

```
s = pd.Series(np.random.randint(10, size=10**6))
%timeit s.rolling(window=2).sum()
%timeit np.sum(rolling_window(s, 2), axis=1)
```
which outputs:
```
52.5 ms ± 1.73 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
14.9 ms ± 129 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
```
That’s it. We sacrifice a bit of readability for a significant speed up.

**Note**
There are numerous ways to calculate means faster than the version above. If you are really looking into performance see the notebook in this gist: [rolling.ipynb](https://gist.github.com/johnsloper/e6783949bb4bc789a03a32e435593182)
Finally Completed My First Hacktoberfest Open Source Contribution, 2020!!
Tags: hacktoberfest
Published: 2020-10-16 07:34:49

## What I Learned From Hacktoberfest2020
1. Had First time experienced to open Source Community And Learned To contribute to open source projects, learned basic git commands.
2. I Basically loved CP so i contributed to the repo which focused about CP and so ON.
3. While contributing, i also learned many new algorithms, their best practice, also got advice from mentors and maintainers to make code more efficient and readable.
4. Got Exposed to CSS,HTML,javascript this time and learned many new concepts and got the actual understanding of "learn by doing approach ".

PS: I know its not much but keeping in mind that learning is important and to the best way possible by doing it, i believe it was a great event!! I thank hacktoberfest Team for organizing such a massive event for all. Kudos to all teams and participants reading this!!
Whatsapp Plus APK - Baixar gratis
Tags: baixarwhatsappplus
Published: 2020-10-16 07:29:13

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

[Whatsapp plus](https://otherwhatsapp.com/whatsapp-plus/) versão como GBwhatsapp APK, e é amplamente utilizado entre milhões de usuários de Android em todo o mundo. O APK do WhatsApp Plus para Android tem vários recursos fáceis de usar, incluindo Anti-Ban, Hide Read Tick, status online e muitos mais.

 De acordo com o Tech News, a versão mais recente vem com muitas correções com recursos anti-banimento funcionais, o que o torna mais confortável de usar e sem riscos. Outros recursos desta versão mais recente incluem videochamada em grupo e mais opções de privacidade.

 O Whatsapp Plus v8.25 também permite que os usuários usem várias contas, possibilitando o uso de dois contatos do WhatsApp em um aplicativo.
Com novas opções de privacidade, o WhatsApp Plus é incrível. Esses recursos não estão disponíveis no WA oficial. Podemos ativar o modo DND para receber notificações indesejadas. Podemos habilitar a opção anti revogar para saber qual mensagem foi deletada pela outra pessoa, de acordo com a empresa.
Há muitos recursos de ocultação disponíveis, como ocultar visualização de status, ocultar status de gravação, ocultar status online, o que é simplesmente incrível.

 Os pacotes de adesivos podem ser facilmente baixados e usados. Nova coleção de emojis também está disponível, bem como novos presentes no APK do WhatsApp Plus.

 Digno de nota, o WhatsApp introduziu um novo recurso de catálogos para o aplicativo Business que permitirá que as empresas apresentem e compartilhem seus produtos e serviços para clientes em potencial.

 Os catálogos são particularmente atraentes para o cliente do WhatsApp baseado em mercados emergentes, onde grande parte da atividade online dos usuários ocorre dentro de aplicativos em vez de na.
Design Patterns Used In PHP Applications
Tags: php, webdev, design, ecommerce
Published: 2020-10-16 07:22:05

In this article, we will teach about how to use a [design pattern in PHP application[(https://www.discussdesk.com/top-5-design-patterns-used-in-php-applications.htm)
Many organizations are keen on hiring PHP developers who can help them build some great applications. When almost 8/10 websites you visit are using PHP in some way or another, it is a great idea to know about the design patterns used to make PHP applications.
Do you know, PHP is used by 78.9% of websites with a server-side language.
Let’s take a look at the 5 most commonly used designed patterns in the PHP world these days.
**Factory**
The factory pattern is ideal when you want to build an object. When making a new object you need to create it and then initialize it. Usually, one needs to perform several steps to apply a certain logic. With all the steps involved, it makes sense to have all the steps in one place and re-use whenever you need to build a new object in the same way. This is how a factory pattern works.
**Let us understand it with a code example.**

<?php
interface FriendFactoryInterface {

public function create() : Friend

}
?>


Here you can read the full article on design patterns used to make PHP applications
Git Push:hacktoberfest
Tags: hacktoberfest
Published: 2020-10-16 07:01:57

In the last year of being in an Engineering college in an IT branch, instead of understanding what open-source and GitHub is, I developed a fear of these two terms. All I knew about Git and GitHub was how to commit and push changes in a repo. I was way too far from the term Open Source. But during this lockdown due to the global COVID-19 pandemic, I finally decided to understand more of it. Here, I share my experience of working on an open-source project and making my identity in the open-source world.
Open Source is the best way to learn new things, develop skills, collaborate with amazing developers, contribute, and gain experience. GitHub is the home for open-source; one of the finest platforms to collaborate and contribute to open-source projects. And on 30 September I heard about hacktoberfest than the day comes all My pull-request are accepted. Thank You Digital ocean 
My Github Profile:https://github.com/ayushsrivastav0811 
My Linkedin: https://www.linkedin.com/in/ayushsrivastav0811/
#hacktoberfest #digitalocean.

Read more · 7 min read
Hacktoberfest Experience
Tags: hacktoberfest
Published: 2020-10-16 07:19:25

## What I Learned From Hacktoberfest

This was my first time participating in Hacktoberfest. It was really a learning experience where I learned by contributing Data structures like trees and various algorithms.

My pull requests:
- https://github.com/OpenGenus/cosmos/pull/5912
- https://github.com/OpenGenus/cosmos/pull/5913
- https://github.com/Anishukla/Hacktoberfest-2020-Data-Structures-and-Algorithms/pull/8
- https://github.com/Amit00790/Linux-commands/pull/9
Hacktoberfest-2020
Tags: hacktoberfest, opensource, github, git
Published: 2020-10-16 07:12:08

Hello everyone,
Today I woke up with a mail which said - "Congratulations,You have completed the hacktoberfest 2020."
For me as a newbie in this computer science world, to be more precise- new in the open source it was nothing less than an achievement. I jumped out of my bed screaming as if I had hacked NASA using HTML(pun intended😅...P.S. Don't arrest me😋).It was a good feeling like I had done something. Overall this hacktoberfest was a great opportunity for me to try my hands on open source projects.
Enjoyed this journey😌
My Hacktoberfest 2020 Experience
Tags: hacktoberfest
Published: 2020-10-16 07:09:44

## What I Learned From Hacktoberfest

Hacktoberfest has allowed me to become more confident as every years events go by when it comes to pull requests.

I often have a fear that what I've worked hard at, will just end up being closed and pushed away.

By being able to search for repos with hacktoberfest enabled, it provided me a better baseline on who was willing to dive into other peoples code changes.

My GitHub: https://github.com/chazza
Hactoberfest 2020 challenge completed!!
Tags: hacktoberfest, hacktoberfest2020, digitalocean
Published: 2020-10-16 07:08:48

It was my fisrt time I participated in Hacktoberfest.
I had very great learning experience. I loved and enjoyed the contributing in the open source projects.
It was full of learning and exploring the things in this Hacktoberfest 2020.
Hacktoberfest complete| My first hacktoberfest Experience
Tags: hacktoberfest
Published: 2020-10-16 07:05:17

## Here is the my first write up about What I Learned From Hacktoberfest.

Hacktoberfest is a event organized by digitalOcean, dev community and Intel for supporting open source software. It is start from October 1st and end at October last of every year.

This was my first year experience in hacktoberfest event. And the event helped me to learn about open source ethics and github.

It was very fruitful for me. Some of my learning experiences are following:

1) Small contributor from our expertise (field)  can be helpful for others.
2) we don't have to more focus on quantity; better to focus on quality.
3)Contributing towards project is not all about Contributing only, its all about helping each other to make better world 🌍.
4) Helping anything we have into community always appreciated. Don't be afraid of judgmental.
5) Patience is most important thing.

6) We don't have focus on many things same time ; only focus on one thing gives better results.

7) Helping, teaching other is also best learning experience for us.

#StaySafe #HappyHacking #Open-source




<!-- What did you learn that can help others contribute to the project you worked on? What did you learn that can help the users of that project?! -->
What's your experience of using Reddit?
Tags: discuss, social, media, reddit
Published: 2020-10-16 07:00:21

---
title: What's your experience of using Reddit?
published: true
description: 
tags: discuss, social, media, reddit
cover_image: https://www.trecebits.com/wp-content/uploads/2018/04/Reddit-icono.jpg
---
I have an [account](https://www.reddit.com/user/madza911) there for around a year or so, tho I had been inactive there for all that time. So no karma points or anything. Recently I made a decision to get involved a bit and find out whether I like it. 

As of my research, some great dev related /r's include:
[r/dailyprogrammer](https://www.reddit.com/r/dailyprogrammer/), [r/learnwebdev](https://www.reddit.com/r/learnwebdev/), [r/webdev](https://www.reddit.com/r/webdev/), [r/badcode](https://www.reddit.com/r/badcode/), [r/browsers](https://www.reddit.com/r/browsers/), [r/coding](https://www.reddit.com/r/coding/), [r/css](https://www.reddit.com/r/css/), [r/design](https://www.reddit.com/r/Design/), [r/developers](https://www.reddit.com/r/developers/), [r/devlist](https://www.reddit.com/r/devlist/), [r/devops](https://www.reddit.com/r/devops/), [r/frontend](https://www.reddit.com/r/Frontend/), [r/hacking](https://www.reddit.com/r/hacking/), [r/hosting](https://www.reddit.com/r/Hosting/), [r/javascript](https://www.reddit.com/r/javascript/), [r/learnjavascript](https://www.reddit.com/r/learnjavascript/), [r/learnprogramming](https://www.reddit.com/r/learnprogramming/), [r/learnwebdev](https://www.reddit.com/r/learnwebdev/), [r/node](https://www.reddit.com/r/node/), [r/opensource](https://www.reddit.com/r/opensource/), [r/programmerhomor](https://www.reddit.com/r/ProgrammerHumor/), [r/programming](https://www.reddit.com/r/programming/), [r/reactjs](https://www.reddit.com/r/reactjs/), [r/seo](https://www.reddit.com/r/SEO/), [r/servers](https://www.reddit.com/r/servers/), [r/softwaredevelopment](https://www.reddit.com/r/softwaredevelopment/), [r/web_design](https://www.reddit.com/r/web_design/), [r/web_programming](https://www.reddit.com/r/web_programming/), [r/webhosting](https://www.reddit.com/r/webhosting/), [r/websecurity](https://www.reddit.com/r/websecurity/). 

What's your experience of using Reddit? Is it worth to invest the time of gettting involved with the community there?

Maybe any other good dev related sub-reddits to follow?