teleren/devto huggingface dataset:
Find Multiple Elements | Selenium Python Tutorial
Tags: python, testing, webdev, tutorial
Published: 2021-01-27 12:56:34

During browser automation, you’ll often run into scenarios where you will need to work with multiple elements such as when dealing with menu links lists, dropdown lists, etc… In this tutorial, we will cover how to find multiple elements in Selenium Python using the SeleniumBase framework.

### **Test Scenario**
Get the text of all the menu link items below and assert the value.

![test_scanario](https://automationbro.com/wp-content/uploads/2021/01/image-1.png)


### **Test Solution**
Since we are working with multiple menu links, we will need to loop through all the list items. However, before that, we need to get access to all the elements first and we can do that using the `find_elements` method.

![Code1](https://dev-to-uploads.s3.amazonaws.com/i/gic197znldf9lfs80g72.png)

Once, we have access to all the elements, we can do a regular for loop and assert the value of the elements.

![Code2](https://dev-to-uploads.s3.amazonaws.com/i/xotx6x8wf4lqvs7v8li6.png)

---

### **Check out the video below to learn how to work with multiple elements in Selenium Python –**
{% youtube Yvt28OCzWhI %}

---

📧 Subscribe to my [mailing list](https://automationbro.com/mailing-list) to get access to more content like this

👍 Follow [automationbro](https://twitter.com/automationbro) on Twitter for the latest updates

...

I love coffees! And, if this post helped you out and you would like to support my work, you can do that by clicking on the button below and buying me a cup of coffee -

<a href="https://www.buymeacoffee.com/automationbro">![Buy me a coffee](https://dev-to-uploads.s3.amazonaws.com/i/4aw2ub3f4qkyjk0ivwt4.png)</a>

You can also support me by liking and sharing this content.

Thanks for reading!
UberEats Clone - Best food delivery app in 2021
Tags: ubereatsclone, ubereatsclonescript, ubereatscloneapps
Published: 2021-01-27 12:32:44

Our JustEat clone script from Uberdoo is the gateway for developing cool and advanced food delivery mobile app solutions in no time.

Website:- https://www.uberdoo.com/ubereats-clone-script.html
Is there a JS tracking library that tracks my events on any web page?
Tags: javascript, node, npm
Published: 2021-01-27 12:24:50

I'm looking for a JS tracking library that would track my events on websites and then log the actions I did. I'm not talking about mouseclicks etc, I want to log button clicks, forms filling, etc.. I need to log my activity so I can create a JSON spec file to use in my Python project.
Get your Startup Discovered Now.
Published: 2021-01-27 12:20:35

Heyo! I am Nav, Founder & CEO of StartupConvo. Last time I made a startup post, I had recently released a web app for schools. Unfortunately because of high cost of maintenance and low visitors, I had to shut down the business.

![StartupConvo Logo](https://dev-to-uploads.s3.amazonaws.com/i/pxo1osvl5mttr21ymgzf.png)

This time I'm back with another startup. StartupConvo is a Startup Discovery Platform, The platform comes built in with a Startup Leaderboard and an unbiased algorithm giving a fair chance to every single startup ever registered on this platform. 


Here is the Development Story:

The idea of StartupConvo initially started when I was about to shut down SchoolConvers, I was struggling with ideas, I finally settled on this one. Previously, I have used many Startup Discovery Platform, some of them had rigged algorithms, they would only promote Startups who had paid them. Some of them had a really horrible UI and some of them were just never updated or maintained. I decided to change this forever and came up with an idea of an iOS app that takes Startup Discovery to Next Level with a Leaderboard. This makes the startup race a lot more fun and it's just a really nice feature to have to be honest.

After 6-8 Weeks of Developing the Project Single Handedly and Six Rejections, this morning I finally released my startup on the iOS App Store. 4 Days before my school commences. Instead of spending my holidays relaxing from a stressful year, I burnt out myself even more by programming a Native iOS App. No Regrets. 

Thanks for taking your time to read my development story. Thanks for all the support you guys gave me with my last startup.

[iOS](https://apps.apple.com/us/app/startupconvo/id1549181697)
[ProductHunt](https://www.producthunt.com/posts/startupconvo)
[Facebook](https://www.facebook.com/StartupConvo)
[Twitter](https://www.twitter.com/NavTheNugget)
[Instagram](https://www.instagram.com/NavTheNugget)


Thanks,
Nav :)
Strategy Pattern with Javascript
Tags: javascript, strategy, pattern, designpattern
Published: 2021-01-27 12:20:27

Hello Devs!

Today I want to talk to you about the awesome **Strategy Pattern**.

First of all, what is this? 🤔
Well, the strategy pattern, aka *policy pattern*, is a behavioral design pattern that enables selecting an algorithm at runtime. This means that you can define a family of algorithms and make them **interchangeable** depending on a context.

When you can apply this pattern? 🔧
- When you need to have variations of several algorithms so they can be interchangeable at runtime.
- When there are a lot of conditional statements around several related algorithms.
- When you have classes with related behaviors.

Now, the fun part, a JavaScript example 👨‍💻👩‍💻

In the following example we have the classical problem, where you need to select an specific algorithm in runtime, and normally we use a `switch` statement or a lot of `if/else` statements.

```javascript
//Example without strategy pattern

gameDifficulty(difficulty) {
  switch(difficulty){
    case 'easy':
      easyGameMode();
      break;
    case 'difficult'
      difficultMode();
      break;
  }
}
```

At first sight you could say that there is nothing wrong with this, and you are correct, but, the problem this pattern wants to tackle is when you have a lot of `switch` or `if/else` statements. If you later want to add more cases, you are not complying with the **SOLID principle of Open Closed**.

The best way to handle this problem is using classes or simply a object of functions.

In this case, we are using an object of functions:

```javascript

//This can also be a class
const strategies = {
  easy: easyGameMode(),
  difficult: difficultGameMode(),
  //More strategies
  __default__: normalGameMode()
}

const easyGameMode = (game) => {
  game.difficulty(1);
  //Do easy game mode stuff in here
  return game;
}

const normalGameMode= (game) => {
  game.difficulty(2);
  //Do normal game mode stuff in here
  return game;
}

const difficultGameMode = (game) => {
  game.difficulty(3);
  //Do difficult game mode stuff in here
  return game;
}

const startGame = (game, difficulty) => {
  const gameModifier = strategies[difficulty] ?? strategies.__default__;
  return gameModifier(game, difficulty);
}
```

Advantages of strategy pattern 🏆
- `if/else` and `switch` statements are **not easily testable**. Each new branch adds another execution path and increases the complexity.
- You have **Extensibility** when a user or another dev wants to inject a new behavior.
- Improves **readability** because, `if/else` statements are "nameless" blocks, while a class which implements a particular strategy, typically should have a descriptive name.


I hope this can help you in your future projects or to refactor your current code.
For the **React** devs in here, in a future post I will show you how you could use the Strategy Pattern in the redux. ⚛️

As always, please feel free to leave your comments, feedback and love. ❤️
Random password generator using JavaScript
Tags: html, css, javascript, webdev
Published: 2021-01-27 12:19:39

The random password generator is made with HTML, CSS, and JavaScript. It is very useful to generate strong passwords directly from the site.
you can check the strength of the password <a rel="nofollow" href="https://codewithbishal.com/example/password-strength-meter-using-html-css-javascript">here</a>

<a rel="nofollow" href="https://codewithbishal.com/example/password-generator-with-javascript">View it on our website</a>
View More :
<ul>
<li><a rel="nofollow" href="https://codewithbishal.com/example/how-to-create-an-accordion-with-html-css-and-javascript">How to create Accordion using JavaScript</a></li>
<li><a rel="nofollow" href="https://codewithbishal.com/example/css-button-glow-effect">Glowing Buttons on hover</a></li>
</ul>
At first, on our webpage, there is a preview of our accordion, then there are a few QNA and an overview of the blog. There is a button to copy and Download the codes (HTML, CSS, and JavaScript). You can also try it on our website.

You can view and copy and download the source code files through the link given below. <a rel="nofollow" href="https://codewithbishal.com/example/password-generator-with-javascript">View and Download Source Code</a>
4 Reasons to build your own Portfolio
Tags: codenewbie, github, career, programming
Published: 2021-01-27 12:04:08

######originally posted on [blog.accolades.dev](https://blog.accolades.dev/2021/01/24/4-reasons-to-build-your-own-portfolio/)

Hey, long time no see. It’s been almost three weeks since I haven’t wrote, so it’s good to be back.

As usual, I don’t make long introductions, so here we go.

##1. You get exposure!
creating your portfolio you get to be known. Whether is for job hunting, connecting with other developers, or practice, people will get to know what you do and what you are passionate about. A portfolio can help you also to bring new customers if you plan to freelance, in fact, a portfolio nowadays stands almost like a Resume, and it’s a must if you ask me.

##2. Is a method of self-discovery and confidence building 
A portfolio can also help you in the future see the you develop your skills. You can look back and see what skills you knew, for instance, a year ago and add the skill you learn meanwhile. Having a portfolio you can ask for feedback from other devs and they can give you advice so that you’ll improve it.

##3. It keeps you organized
For many of us, self – taught or students, time is important when it comes to programming. A portfolio can help you organize your accomplishments, can help you set goals and categorize your aspirations and it shows who you are and your personality.

##4. It helps you implement what you are learning.
Building your portfolio helps you practice what you are learning and gives the feeling like in real life. It also helps you find a new way of working and you discover new things while you carry out the work.

These 4 reasons I discovered them by myself while I was building my Portfolio. It took me around 10 hours and I’ve created it during 10 days. It was a small personal challenge that I wanted to accomplish. You can see the work I’ve done [here](https://luc-constantin.github.io/myPortfolio/) and the source code [here](https://github.com/luc-constantin/myPortfolio).

If you’d like to know the methods and the way I created it let me know and I will write a full tutorial about it.

Until next time, keep building great things.

######you can find me on [LinkedIn](https://www.linkedin.com/in/luc-constantin/) and here on [Twitter](https://twitter.com/accolades_dev)
Hacktoberfest invalid tracking id after a few days of tracking.
Tags: hacktoberfest
Published: 2021-01-27 11:52:33

Hi, I recieved the order confirmation mail on 23rd October. I recieved tracking mail on 23rd December. It's last status was "En route". It was stuck there for about 12 days. I kept contacting DHL, and they said that it's on its way. But since 7th Jan,on checking the tracking, it shows "invalid tracking number, contact merchant..." So I contacted DHL, kotis designs, hacktoberfest team several times through mail. But DHL says to contact Merchant. And Kotis and hacktoberfest team always give an FAQs mail. What now? Really unsatisfied by the customer services.
Memo : Get hostname from IPv4 and IPv6 At C++
Tags: cpp
Published: 2021-01-27 11:45:09

This is just just a note for me...
for my bittorrent client tools
 

For IP v4

```
// 
// copy from https://stackoverflow.com/questions/28566424/linux-networking-gethostbyaddr 
//
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>

int main()
{
    struct sockaddr_in sa;    /* input */
    socklen_t len;         /* input */
    char hbuf[NI_MAXHOST];

    memset(&sa, 0, sizeof(struct sockaddr_in));

    /* For IPv4*/
    sa.sin_family = AF_INET;
    sa.sin_addr.s_addr = inet_addr("8.8.8.8");
    len = sizeof(struct sockaddr_in);

    if (getnameinfo((struct sockaddr *) &sa, len, hbuf, sizeof(hbuf), 
        NULL, 0, NI_NAMEREQD)) {
        printf("could not resolve hostname\n");
    }
    else {
        printf("host=%s\n", hbuf);
    }

    return 0;                                                  
}

```

For IP v6
```
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>

int main()
{
    struct sockaddr_in6 sa6;    
    char hbuf[NI_MAXHOST];
    memset(&sa6, 0, sizeof(struct sockaddr_in6));

    sa6.sin6_family = AF_INET6;
    in6_addr addr6;
    int s = inet_pton(AF_INET6, "::1",&addr6);
    sa6.sin6_addr = addr6;

    int len = sizeof(struct sockaddr_in6);
    if (getnameinfo((struct sockaddr *) &sa6, len, hbuf, sizeof(hbuf), 
        NULL, 0, NI_NAMEREQD)) {
        printf("could not resolve hostname\n");
    }
    else {
        printf("host=%s\n", hbuf);
    }

    return 0;                                                  
}
```

# CODE

https://github.com/kyorohiro/hello_libtorren
app/main_get_host_from_ipv6.cpp
Backup Your DEV.to Posts Using Python
Tags: python, tutorial, meta, showdev
Published: 2021-01-27 10:29:18

I treat my posts on DEV.to as notes. Backing up my notes to prevent any unexpected incident is a must, even though I believe DEV.to will protect my posts unless it's us that makes the accident. So, why don't we back up them by ourselves?

Of course, we don't back up the posts by copying and pasting the markdown bodies manually into a file one by one. Let's automate them by using DEV.to API and Python.

## The Goal

By requesting to [https://dev.to/api/articles?username={username}](https://dev.to/api/articles?username=dendihandian), we can get the article list of the given username. We will parse the response and make the markdown files for each article. It's that simple.

## The Packages We Need

For consuming the DEV.to API, we need the infamous `requests` package. So, add the package to the machine using `pip` or `pipenv` or anything that you use. We also need the built-in `os` and `sys` modules for working with directories and paths. Let's import them to our python file:

```py
import requests
import os
import sys
```

## The Parameters for the Request

By looking at the URL for request, we only need the `username` parameter. So, let's create a `dict` with that param:

```py
params = {
    'username': 'dendihandian' # change it to your username
}
```

## Perform the request
Let's request and get the articles with this script:
```py
result = requests.get('https://dev.to/api/articles', params=params)
articles = result.json()
```

Apparently, the articles here don't have the `body_markdown` and we will get the attribute by requesting the full resources of each article later.

## Making the directories for saving the markdown files

We will save the markdown files under this path `./dev.to/{username}/posts` and we use both `os` and `sys` modules to make the directories first:

```py
username = params['username']
posts_path = os.path.join(sys.path[0], 'dev.to', username, 'posts')
if not os.path.exists(posts_path):
    os.makedirs(posts_path)
```

We have to create the directories first because we can't directly set the full path to the file within the `open()` function if the directories not exist.

## Parse the Articles and Make The Markdown Files
We loop the articles objects and request to get the `body_markdown` of each article and write them into a markdown file:

```py
for article in articles:
    slug = article['slug']
    article_id = article['id']
    filename = f'{slug}.md'
    
    article_result = requests.get(f'https://dev.to/api/articles/{article_id}')
    article = article_result.json()
    
    f = open(os.path.join(posts_path, filename), "w+", encoding="utf-8")
    f.write(article['body_markdown'])
    f.close()
```

And that's it. Execute the python file and see if your posts are saved into markdown files.
__________________
How to Save an Excel File to OneDrive? A Complete Tutorial!!
Tags: excelpreface, excelbasics, exceltutorials, savefileinonedrive
Published: 2021-01-27 11:40:07

---
title: How to Save an Excel File to OneDrive? A Complete Tutorial!!
published: true
date: 2021-01-27 11:24:02 UTC
tags: ExcelPreface,ExcelBasics,ExcelTutorials,SavefileinOneDrive
canonical_url: https://geekexcel.com/save-an-excel-file-to-onedrive-in-excel/
---

After finishing your work, you can share with others through OneDrive if you already have an account. In this tutorial, we will show **how to save an Excel File to OneDrive**. Let’s see them below!! 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)

## Steps to save a file in OneDrive:

Now we are going to see how to save a file in OneDrive.

- First, open the Excel and Click on the **“File”** tab from the **“Ribbon”**.

![File tab](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/01/File-tab.png)<figcaption id="caption-attachment-21406">File tab</figcaption>

- Here, you need to click the **“Save As”** section from the left navigation sidebar, under that, you need to select the **“OneDrive”** option.

![Select OneDrive option](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/01/Select-OneDrive-option.png)<figcaption id="caption-attachment-21497">Select OneDrive option</figcaption>

- Find a place to save the file, then click the **“Save”** button. Now, the Excel File will be saved in OneDrive.

![Save the file](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/01/Save-the-file.png)<figcaption id="caption-attachment-21498">Save the file</figcaption>

## Verdict:

In this short tutorial, we have described **how to save an Excel file to OneDrive** with clear-cut images. If you have any doubts regarding this article, don’t forget to share it with us. We will assist you. To learn more, check out **[Geek Excel](https://geekexcel.com/)**

### Read Also:

- **[How to Save the Current Workbook in 97-2003 Format in Excel!!](https://geekexcel.com/save-current-workbook-97-2003-format/)**
- **[Export or Save a Range as CSV, HTML, PDF or Workbook in Excel 365!!](https://geekexcel.com/export-or-save-a-range-as-csv-html-pdf-or-workbook-in-excel-365/)**
- **[How to Create an Array of Numbers in Excel Office 365?](https://geekexcel.com/how-to-create-an-array-of-numbers-in-excel-office-365/)**
- **[Excel File is not opening in my Windows 10!! How to fix this issue?](https://geekexcel.com/topic/excel-file-is-not-opening-in-my-windows-10-how-to-fix-this-issue/)**
Benefits of Using Ruby on Rails for Your Startup
Tags: fintech, industry, rails, technology
Published: 2021-01-27 18:16:54

---
title: Benefits of Using Ruby on Rails for Your Startup
published: true
date: 2021-01-27 10:25:13 UTC
tags: FinTech,Industry,RubyonRails,Technology
canonical_url: https://www.botreetechnologies.com/blog/fintech-startups-using-ruby-on-rails/
---

![Benefits of Using Ruby on Rails for Your Startup](https://www.botreetechnologies.com/blog/wp-content/uploads/2021/01/fintech-startups-using-ruby-on-rails.jpg)
Automation and digitization of finances led to the creation of the Fintech industry. Companies built digital financial products that could ease money management. [RoR development](https://www.botreetechnologies.com/blog/why-is-ror-development-the-right-backend-technology-for-your-application) became a primary technology because of its simplicity in development and dynamic functionality. It is one of the most efficient and productive platforms for [FinTech product development](https://www.botreetechnologies.com/fintech-app-development).

The FinTech industry faces stiff competition. It is crucial to choose the right technology stack. And what better than Ruby development? The language is popular for its readability, flexibility, and scalability. On top of that, it offers the dynamic [Ruby on Rails web development](https://www.botreetechnologies.com/ruby-on-rails-development) framework that smoothens the entire FinTech product development process.

###Read more: [FinTech App Development’s Five Notable Aspects For Startups](https://www.botreetechnologies.com/blog/considering-fintech-app-development/)

###Companies using Ruby on Rails in the Backend

Rails development is not new to the FinTech startups world. The FinTech companies identified its capabilities to scale and develop secure and stable products. Apart from startups, some of the popular FinTech platforms built using RoR development include the following – 

**1. Fundera – Platform for B2B lending**

Small businesses often struggle to get a loan and funding from investors and banks. Fundera is a platform for these businesses that can’t get easy financing. It is not a financial service offering loans. Fundera is a B2B lending marketplace that connects small businesses with people who want to invest in startups.

The entire platform was built with RoR development. When the users register, they are asked a few questions. Using this analysis, Fundera connects them with the right investors. The platform provides a personal advisor who then helps companies connect and communicate with investors.

The post [Why Popular FinTech Startups Use Ruby on Rails for Backend](https://www.botreetechnologies.com/blog/fintech-startups-using-ruby-on-rails/) appeared first on [BoTree Technologies](https://www.botreetechnologies.com/blog).
My accomplishments on 2020
Tags: python, wordpress, html, css
Published: 2021-01-27 11:15:43

We are here to prove that 2020 is not the one that shapes our destinies, as there are achievements for me this year, especially on the skills and .. more...
https://husseinouda.me/en/my-achievements-2020/

I am pleased with your comments and suggestions

[HUSSEIN OUDA](https://husseinouda.me/en/)