teleren/devto huggingface dataset:
Program Control Statements 2
Tags: java, motivation, beginners, goal
Published: 2021-05-27 18:19:32

So today, is **day nine** of my learning Java journey and today I will discuss the another part of Program control statements in Java as said yesterday. So, let's get rolling.

# Switch statements - 
  + it can be said as a more enhanced as well as efficient version of if else condition as when there are multiple situations and pertaining to each of them there is a statement.
  + it works like as soon as a match to the condition is found then the statement related to it is executed and rest are discarded and if none then a default statement is executed.
  + also with each statement of by-conditions pertaining to an input **break** has to be used if **break** is not used then all statements will be executed.
  + **Syntax - **
  ```
   switch(expression){
       case constantOne:
       statement sequence
       break;
       case constantTwo:
       statementSequenceTwo
       break;
       .
       .
       .
       .
       default:
        statementSequenceDefault
}
```

+ here duplicate values are not allowed.
+ also the nesting can be implemented of switch case statements in Java just like the nesting of if-statements.
+ **example -**
 
```
public class usingSwitchCase {
    /*
     *here we enter a day number and by using switch case statement we return the corresponding day name.
     */
    public static void main(String[] args) {
        int dayNumber = 5;
        System.out.println("For day number "+ dayNumber +" from week the day name is: ");
        scanner.close();
        String dayName;
        switch (dayNumber) {
            case 1:
                dayName = "Sunday";
                break;
            case 2:
                dayName = "Monday";
                break;
            case 3:
                dayName = "Tuesday";
                break;
            case 4:
                dayName = "Wednesday";
                break;
            case 5:
                dayName = "Thursday";
                break;
            case 6:
                dayName = "Friday";
                break;
            case 7:
                dayName = "Saturday";
                break;
            default:
                dayName = "Invalid day number input.";
        }
        System.out.println("The day is " + dayName);
    }

}
```
Let's halt it here for the day today and will continue tomorrow from the next topic in program control structure that is loops.
Till then keep learning, keep growing. and feel free to point or add anything related to the topic that I may have missed.
Day 94
Tags: 100daysofcode, programming
Published: 2021-05-27 18:18:18

Day 94/200 of #200DaysOfCode #100DaysOfCode


- Solved three problems on Codewars.


1 - Age in days (7 kyu)

2 - Fizz Buzz Cuckoo Clock (7 kyu)

3 - Milk and Cookies for Santa (7 kyu)
How to Automate MFA  using selenium with java?
Published: 2021-05-27 18:16:18

Hi Everyone,
I am new here and I am seeking help for how to automate MFA using selenium with java?
This I tried but it does not worked for me?
String otpKeyStr = "xxx"; // <- this 2FA secret key.
        Totp totp = new Totp(otpKeyStr);
		String twoFactorCode = totp.now(); // <- got 2FA coed at this time!

Any help will be appreciated.
Thank you.
Saucelab@localhost
Tags: saucelab, testing
Published: 2021-05-27 18:14:45

Connecting Saucelab to your local machine is easy.

Create an outbound rule to expose the port for Saucelab to access your localhost.

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

Download the [Sauce Connect Proxy](https://wiki.saucelabs.com/display/DOCS/Downloading+Sauce+Connect+Proxy).

Open the folder in windows terminal/ cmd `C:\Users\Downloads\sc-<version>-win32\sc-<version>-win32`.

Now go to [tunnels page](https://app.saucelabs.com/tunnels) on your Saucelab dashboard

Copy the run command looks something lik this `bin/sc -u <name> -k <guid> -i tunnel_id`

Go to [Live web testing](https://app.saucelabs.com/live/web-testing) and start session with your Sauce connect proxy selected from the dropdown.
You should be able to access your localhost sites for the port your exposed to Saucelab.
Need Urgent IBM - Broker • IBM - API Connect • IBM - B2B Sterling
Published: 2021-05-27 17:56:27

Olá como está?

Estou buscando uma pessoa com evidências de certificação ou que já tenha trabalhado com IBM - Broker • IBM - API Connect • IBM - B2B Sterling (pode ser serviços prestados ou profissionais certificados). Se você se interessar ou puder indicar alguém para conversar um pouco temos uma oportunidade bem legal aqui na Foursys  bem legal. Me envie menagem de texto aqui no whatsapp +55 1199915-4168 ou envie um email para patrick.chaves@foursys.com.br
Preciso desse profissional para conversar hoje

Hi how are you?

I am looking for a person with evidence of certification or who has already worked with IBM - Broker • IBM - API Connect • IBM - B2B Sterling (can be services rendered or certified professionals). If you are interested or can refer someone to chat for a while we have a really cool opportunity here at Foursys. Send me a text message here on whatsapp +55 1199915-4168 or send an email to patrick.chaves@foursys.com.br
I need this professional to talk today
What do you know about distributed SQL, and what would you like to learn?
Tags: discuss, sql, postgres, yugabytedb
Published: 2021-05-27 17:52:14

I just started working at Yugabyte this week. We make open source [YugabyteDB](https://github.com/yugabyte/yugabyte-db) – the leading high-performance distributed SQL database – and are launching our DBaaS, Yugabyte Cloud, soon (join the beta [here](https://www.yugabyte.com/cloud/)).

I'm going to be writing about distributed SQL databases and how to use them for building applications, self-hosting, etc., and I'd like to write things you would find useful.

What do you know about distributed SQL databases, and what would you like to learn?

Cover photo by [NASA](https://unsplash.com/@nasa?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/world?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText).
Vim Tips and Tricks
Tags: vim, linux
Published: 2021-05-27 17:47:37

The following are my favorite tips and tricks for working with [Vim](https://en.wikipedia.org/wiki/Vim_(text_editor)). I use Vim as my primary editor, and try to avoid the use of other IDEs and editors.

If you're new to vim, or looking to learn more about the features already available, here's a sample of my tips and tricks.

Vim is often used by [Linux](https://bsdnerds.org/what-is-linux-shell/) but it works on every system. It's included by default on Mac OS X.

## Searching for Words

If you type `/` then a search term, Vim will start searching forwards from the current cursor location for that word. 

To search for the next occurrence of that search term, press n (for next); to search backwards press N . After pressing n or N , Vim will highlight all matching words, which you can then press on to select.

![search](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8o4z6nlbjm8q0rr3uth1.gif)

## ex commands

One of the most powerful features of Vim is its ability to use ex commands. First, in order to run ex commands, you must be in insert mode: that is to say, not at the beginning of a line. 

It’s important to note that in order to enter insert mode, you must first exit normal mode. To do this, press “i” or “a” – these keys will start you off in insert mode at the beginning of a new line or at the end of your current line.

Now that you’re in insert mode, you can type “:” and then an ex command.

Some things you can do are:

`:5p` print the fifth line
`:100p` print line 100
`:%s/hello/world/` search and replace
`:!bash` return to bash, type exit to open vim

## repeat action

This saves you quit a few keystrokes. Press the number of times you want to repeat, then press the key. To move 100 lines down, press `100j`. To move up 50 lines, press `50k`. To delete 5 lines press `5dd` etc.
 
![awesome](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/co3b6splg3lh6l1f3onc.gif)

## macros

Vim supports keyboard macros. They let you record and replay your keystrokes. This is really great if you have some tedious typing to do.

To start recording press `q` followed by `a`. To stop recording press the `ESC` key. Then press `@` followed by `a` to replay the keystrokes.

If you are new to vim, I recommend [this course](https://vim.is)
Create Your Own HTML5 Canvas Toolkit With Vanilla JavaScript
Tags: html, javascript, webdev, programming
Published: 2021-05-27 17:27:50

Happy Thursday, everyone - wanted to reach out with a quick <a href="https://betterprogramming.pub/create-your-own-html5-canvas-toolkit-with-vanilla-javascript-1d2ad1047219?sk=d381699afd03f1a953acbebd17503b86">tutorial</a> on how to build a flexible and easily readable HTML5 Canvas toolkit using Vanilla JavaScript. 

A little background: when I started at EDC over 12 years ago, I came in as a Flash developer. Once Flash lost prominence, I learned more programming, dove headfirst into the web and app development space, and moved to developing interactives with JavaScript. Given the untimely demise of Flash, it was a good move.

The advent of HTML5 brought with it the <code>canvas</code> element, which could be controlled with JS. One of the challenges I found fairly early with the canvas API was that it was very low level - so I started trying HTML5 canvas frameworks like EaselJS and KineticJS. The former was awesome but felt overly complex for what I needed. And the latter lost support shortly after I tried using it. Because the framework landscape is ever-changing and does not always have the options I have in mind, I have found it empowering to create canvas utility methods that do exactly what I want and can be called easily.

In this article, I go over how to add methods for creating a circle and a polygon. That said, I'd be happy to write tutorials on other methods - such as text, animations, and images - if people are interested. Thanks, and have a great day.
[Dicas do VIM] Inserindo texto e escrevendo no VIM
Tags: braziliandevs, vim, insert, neovim
Published: 2021-05-27 17:25:22

Para começar a escrever no VIM, pressione a **tecla i** e o modo de inserção de texto será iniciado no local onde está o cursor.

```
i
```

Pressionando a **tecla I** (i maiúsculo) o modo inserção inicia no começo da linha onde está a localização atual do cursor.

```
I
```

Pressionando a **tecla a** o modo inserção inicia um caractere a frente da localização atual do cursor.

```
a
```

Pressionando a **tecla A** o modo inserção inicia no final da linha onde está a localização atual do cursor.

```
A
```

Pressionando a **tecla o** (o minúsculo) o modo inserção inicia na linha seguinte de onde está a localização atual do cursor.

```
o
```

Pressionando a **tecla O**  (o maiúsculo) o modo inserção inicia na linha acima de onde está a localização atual do cursor.

```
O
```

Para voltar aos comando do VIM, basta pressionar o **Esc**.
Freenode’s Mass Resignations, NVIDIA’s Less Crypto-Friendly Cards, & more on DevNews!
Tags: news, podcast
Published: 2021-05-27 17:03:32

---
title: Freenode’s Mass Resignations, NVIDIA’s Less Crypto-Friendly Cards, & more on DevNews!
published: true
description: Listen to S4E7 of the DevNews pod!
tags: news, podcast
series: DevNews Season 4
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/zoxvbu0494gq3sxtjp4v.png
---

A new episode of the DevNews podcast is here! 

{% podcast https://dev.to/devnews/s4-e7-freenode-s-mass-resignations-nvidia-s-less-crypto-friendly-chips-twitter-s-crop-algorithm-investigation-and-remote-employers-excluding-colorado %}


### **In this episode, @saronyitbarek and I covered...**
- Companies excluding the state of Colorado from remote opportunities due to the Equal Pay For Equal Work Act
- NVIDIA making their graphics cards less desirable for cryptocurrency miners
- Twitter’s report on its investigation into its cropping algorithm, which many people criticized as having a racial and gender bias.


Then, we chatted with **James Eaton-Lee**, former Staff Developer at Freenode, and current Chair of Libera Chat. James explained how Libera Chat was created in response to entrepreneur and Korea's Crown Prince, Andrew Lee, taking control of Freenode, which led to a mass resignation of many of its developers. Fascinating stuff!

Enjoy S4E7! Can you believe that next week's episode is our season finale? 😱 


_You can [follow DevNews](dev.to/devnews) to get episode notifications and listen right in your feed_ — or subscribe on your platform of choice! Plus, if you leave us a review, we'll send you a free pack of thank-you stickers. Details [here](https://airtable.com/shr8oKAIMZgdYnBxx). 

## **Quick Listening Links**
- [Apple Podcasts](https://podcasts.apple.com/us/podcast/s4-e6-babels-money-challenges-what-its-like-to-work/id1525581923?i=1000522461260)
- [Spotify](https://open.spotify.com/episode/7JlOAnVWuZwIHdVYAQkL27)
- [Google](https://podcasts.google.com/feed/aHR0cDovL2ZlZWRzLmNvZGVuZXdiaWUub3JnL2Rldm5ld3NfcG9kY2FzdC54bWw/episode/aHR0cHM6Ly9kZXZwb2RzLmRldi9wb2RjYXN0cy9kZXZuZXdzLzMw?sa=X&ved=0CAQQkfYCahcKEwjgnqHF7NjwAhUAAAAAHQAAAAAQCA)
- [Stitcher](https://www.stitcher.com/show/devnews/episode/s4-e6-babels-money-challenges-what-its-like-to-work-on-rails-and-coinbases-end-to-salary-negotiations-84092032)
- [Listen Notes](https://www.listennotes.com/podcasts/devnews-dev-fH8hvsClkWp/)
- [TuneIn](https://tunein.com/podcasts/Technology-Podcasts/DevNews-p1352512/?topicId=163183906)
- [RSS Feed](http://feeds.codenewbie.org/devnews_podcast.xml)
- [Transcript](https://devpods.herokuapp.com/podcasts/devnews/episodes/164)

_Acknowledgements_ 
- _@levisharpe for producing & mixing the show_
- Our season four sponsors, [Scout APM](https://scoutapm.com/devnews) and [Rudderstack](https://rudderstack.com/) ❤️ 

![Sound on](https://media.giphy.com/media/SXTTVIwYA36XpgfqJW/giphy.gif)
Why to choose VS Code?
Tags: vscode, programming, productivity, codenewbie
Published: 2021-05-27 16:44:01

### In this post we will be taking up the most important question which generally pops up in the minds of most of the beginners who want to ace in programming or development. So mates, VS Code can be your pal in this journey.
***

###Table Of Contents
####1. What is Visual Studio Code?
####2. What are the features of VS Code?
####3. What are the advantages of using VS Code?

***

##What is Visual Studio Code?

Visual Studio Code is a freeware source-code editor made by Microsoft for Windows, Linux and macOS and is written in TypeScript, JavaScript, HTML, and CSS .Visual Studio Code was first announced on April 29, 2015, by Microsoft at the 2015 Build conference and in 2019 VS Code was ranked as the most popular developer environment tool by the Stack Overflow 2019 Developer Survey.
***
##What are the features of VS Code?
There are various features of VS Code - support for debugging, syntax highlighting, intelligent code completion(IntelliSense), snippets, code refactoring, and embedded Git.

* Debugging is a core feature of Visual Studio Code. There are several debugger extensions in the VS Code Marketplace which all the users can use.

* Syntax highlighting is a feature of text editors that are used for programming, scripting, or markup languages, such as HTML. The feature displays text, especially source code, in different colors and fonts according to the category of terms.

* Intelligent Code Completion (IntelliSense)- This feature helps in writing a user-friendly code by completing the code automatically, which speeds up the user's work.

* Code snippets are templates that make it easier to enter repeating code patterns, such as loops or conditional-statements.

* Code refactoring is a process used in the DevOps software development approach that involves editing and cleaning up previously written software code without changing the function of the code at all, also provided by VS Code.

***
##What are the advantages of using VS Code?
####1. The first and the foremost advantage of VS Code is that it is the most user friendly code editor so far.
####2. Cross-platform support : Visual Studio Code can work on all the three operating systems - Windows, Linux and Mac.
####3. Light-weight

####4. Robust Architecture

####5. Intelli-Sense

####6.  Freeware: Free of Cost- probably the best feature of all for all the programmers out there, even more for the organizations.

####7. Many users will use it or might have used it for desktop applications only, but it also provides great tool support for Web Technologies like; HTML, CSS, JSON.
        
### These were the key reasons of why to choose VS Code.
How I Made Covid-19 Vaccine Search Portal in ReactJS
Tags: react, webdev, beginners, codenewbie
Published: 2021-05-27 16:43:54

THIS WEBSITE WILL NOTIFY YOU IN REALTIME WHEN THE VACCINE IS AVAILABLE GOOGLE ASSISTANCE ENABLED.


Hello Everyone,

I just wanted to share one of my recent work which is a vaccine search/ tracker portal with GOOGLE VOICE ENABLED to update the status of vaccine availability. In this Web App you can search for vaccine availability by entering your PIN CODE or by entering your STATE & DISTRICT. It refreshed every after every 40 mins and a fresh data is being shown in the page and if the vaccine gets available in the selected location, the VOICE ASSISTENT will notify about that.

If the vaccine is available you will GREEN color list and if vaccine is not available you will see red colored list, you can click on these list to directly navigate to the govt portal to book your vaccination slots.

[Link for the portal :](https://searchvaccine.netlify.app/#/)

This webapp is completely based on ReactJS, API used is COWIN API provided by the Indian Govt., AXIOS for fetching the data, and Material UI for designing.

You can also contribute to this just by forking the code from my github link and giving me a star there.

[https://github.com/rahulnag/vaccine_tracker](https://github.com/rahulnag/vaccine_tracker)

[Follow me on INSTAGRAM](https://www.instagram.com/capscode)

If you have any Queries or Suggestions, feel free to reach out to me in the Comment Section below.

## I hope you have liked it
## Thanks for reading !
## Feedbacks and comments are welcome !
## Thank You, CapsCode

Resources:
1. https://www.apisetu.gov.in/public/api/cowin
2. https://www.npmjs.com/package/axios
3. https://www.material-ui.com
HTML : Applying styles to entire columns of table
Tags: html, webdev, codenewbie, tutorial
Published: 2021-05-27 16:41:05

```html
<table width="100%">
    <colgroup>
        <col style="width:40%;" />
        <col style="width:60%;" />
    </colgroup>
    <thead>
        <tr>
            <td>
               Column 1
               <!--This column will have 40% width-->
            </td>
            <td>
               Column 2
               <!--This column will have 60% width-->
            </td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Cell 1</td>
            <td>Cell 2</td>
        </tr>
    </tbody>
</table>
```
> Note: The `<colgroup>` tag must be a child of a `<table>` element, after any `<caption>` elements and before any `<thead>`,` <tbody>`, `<tfoot>`, and `<tr>` elements.

Here you can see we have used `<colgroup>` tag which specifies a group of one or more columns in a table for formatting purpose. The `<colgroup>` tag is useful for applying styles to entire columns, instead of repeating the styles for each cell, for each row.


<a href="https://www.buymeacoffee.com/rkycom" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>

With all that being said, I highly recommend you keep learning!

Thank you for reading this article. Please feel free to connect with me on [LinkedIn](https://www.linkedin.com/in/www-rajeshkumaryadav-com/) and [Twitter](https://twitter.com/rky_com).
Provide AWS access across services using roles
Tags: aws, cloud, cloudskills, beginners
Published: 2021-05-27 16:33:19

Some AWS services require access across services because they need to perform an action on that service. Whenever that happen our AWS web services are treated like a user and need to given permission to other services. Roles provide you this functionality and allow users of other accounts to use our services.

The most common use of this is to provide the EC2 service access to other services. We will learn more about EC2 service later on. Let's start 

- Go to AWS IAM console same as in the [user creation article](https://dev.to/this-is-learning/aws-identity-and-access-management-4jc2)

- After that click on roles from the left menu bar
![Roles Menu](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q7x40yekk726soncwmya.png)

- Click on create role
![Create role button](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gdwyd6z0rls0syhwd1ei.png)

- Once you click on create role there will be four options available 
  - AWS Service 
  - Another AWS Account
  - Web Identity
  - SAML 2.0 federation
   for a basic understanding of the service let us ignore the last three for now and focus on the first one. Once you select the first one you will see a list of services that can be provided access. Let us select EC2 it is most common use case for creating roles. Click on next:permissions.
![Role options](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fp88q8g5k9e1phhhprp7.png)

- Now we select policies(permission) as we selected while creating user. For this tutorial let's give S3 readonly access to our EC2 service. With the policy AmazonS3ReadOnlyAccess(We will study more about the S3 service later on) and click on Next:Tags.
![Role Policies](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vae2e4i2k6w2aa7j9tpu.png)

- Now we can add tags to our role to better identify roles via these tags
![Role Tags](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8lndyleug1v5vcsk7tt3.png)

- Finally in review screen we can review everything and add a role name. Click on create role after reviewing everything. A role is created now for our EC2 instance has S3 read access.
![Role Review](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jwkmmym10dmcz13cdym8.png)
Reflections Of A CodeCollab Fellow
Tags: womenintech, testing, devjournal
Published: 2021-05-27 16:26:44


#It’s Demo Day!🎉
*Generally*, I’m grateful to be a fellow in CodeCollab Cycle 2.
We had two weeks of Testing the App before Demo week and it was such a learning experience for me. It gave me a deeper understanding of its importance and how it can make you a better dev. 

*In Our case*, we did the testing after building the app so we had to test the methods we already had in place. Writing Tests helped us to see the faults in the App and minimize the breaking changes in the app(as that’s what they are for, isn’t it?😁). One of the major things, writing tests helped me understand is that the final goal isn’t to make the test pass but to make sure the test is testing what you’re meant to test. 

*I also appreciate how writing tests is very encapsulated*, in the sense that writing tests for one controller(e.g shifts), doesn’t affect another controller(e.g workers). Testing is definitely something I look forward to doing more. 
I also learned how it’s beneficial to communicate Coding Fatigue effectively when you are experiencing it. Coding Fatigue allows you to miss out on your little mistakes and hence, makes you stuck. It’s real and a normal thing that happens to devs but it becomes a problem when it’s not properly communicated with your team members. 

>It’s okay to be tired. It doesn’t mean you’ve lost your competence. ~Arit

**Overall**, I’m glad at how much my teammates and I have grown in our professional team communication,  collaboration, and technical skills in the past 12 weeks. This Cycle is gonna be a wrap at Demo Day and it’s one that gives me mixed feelings. 😅
Thank you for the honor of reading and staying through on the CodeCollab Cycle 2 journey with this blog!❤️