teleren/devto huggingface dataset:
How to unchecked a radio button using JavaScript/jQuery?
Tags: javascript, php, jquery, mysql
Published: 2022-03-23 12:45:10

Originally posted @ https://codeanddeploy.com visit and download the sample code: https://codeanddeploy.com/blog/jquery/how-to-unchecked-a-radio-button-using-javascriptjquery

[![Advanced Laravel SAAS Starter Kit with CRUD Generator](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wyjyev8tz3r8vi2w3on1.png)](https://1.envato.market/5g5QAn)

[Advanced Laravel SAAS Starter Kit with CRUD Generator - GET YOUR COPY NOW!](https://1.envato.market/5g5QAn)


In this post, I will share with you how to uncheck the checked radio button using the button click event in jquery. We are using **element.prop("checked",false)** so that the radio button checked will be unchecked.

**Before**

![how-to-unchecked-a-radio-button-using-javascriptjquery](https://ecn-storage.s3.us-west-2.amazonaws.com/articles/how-to-unchecked-a-radio-button-using-javascriptjquery-wcYkzstKshx980.webp?ctm=1629023722)

**After**

![how-to-unchecked-a-radio-button-using-javascriptjquery](https://ecn-storage.s3.us-west-2.amazonaws.com/articles/how-to-unchecked-a-radio-button-using-javascriptjquery-VweqWzAANgx980.webp?ctm=1629023788)


Here is the example code below:

```php
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>How to unchecked a radio button using JavaScript/jQuery?</title>
</head>
<body>
	<h1>How to unchecked a radio button using JavaScript/jQuery?</h1>

	<form id="form1">
		

		<p><b>Current Status</b></p>
		<input type="radio" value="1" name="status" class="status" checked> Active

		<br/><br/>

		<button type="button" id="btnSubmit">Deactivate</button>
	</form>

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

	<script type="text/javascript">
		$(document).ready(function() {
			$("#btnSubmit").on("click", function() {
				var status = $(".status");
				status.prop("checked", false);
			});
		});
	</script>
</body>
</html>
```

I hope this tutorial can help you. Kindly visit here https://codeanddeploy.com/blog/jquery/how-to-unchecked-a-radio-button-using-javascriptjquery if you want to download this code.

[![Advanced Laravel SAAS Starter Kit with CRUD Generator](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wyjyev8tz3r8vi2w3on1.png)](https://1.envato.market/5g5QAn)

[Advanced Laravel SAAS Starter Kit with CRUD Generator - GET YOUR COPY NOW!](https://1.envato.market/5g5QAn)


Happy coding :)
How To Check Radio Button Based On Selected Value in Javascript/jQuery?
Tags: javascript, jquery, php, mysql
Published: 2022-03-23 12:40:22

Originally posted @ https://codeanddeploy.com visit and download the sample code: https://codeanddeploy.com/blog/jquery/how-to-check-radio-button-based-on-selected-value-in-javascriptjquery

[![Advanced Laravel SAAS Starter Kit with CRUD Generator](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wyjyev8tz3r8vi2w3on1.png)](https://1.envato.market/5g5QAn)

[Advanced Laravel SAAS Starter Kit with CRUD Generator - GET YOUR COPY NOW!](https://1.envato.market/5g5QAn)


In this post, I will share with you an example of **how to check the radio button based on selected values using jquery.** Maybe you have a task that needs to check the radio button on a selected value using a select box or even a button. To proceed kindly check the example code below.

```php
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>How To Check Radio Button Based On Selected Value in jQuery?</title>
</head>
<body>
	<h1>How To Check Radio Button Based On Selected Value in jQuery?</h1>

	<form id="form1">
		
		
		<p><b>Membership Type</b></p>
		<select id="membership_type">
			<option value="">Select Membership Type</option>
			<option value="regular">Regular</option>
			<option value="pro">Pro</option>
			<option value="vip">VIP</option>
		</select>

		<p><b>Selected Membership</b></p>
		<input type="radio" value="regular" name="membership" class="membership" disabled="disabled"> Regular
		<input type="radio" value="pro" name="membership" class="membership" disabled="disabled"> Pro
		<input type="radio" value="vip" name="membership" class="membership" disabled="disabled"> VIP

		<br/><br/>

		<button type="button" id="btnSubmit">Submit</button>
	</form>

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

	<script type="text/javascript">
		$(document).ready(function() {

			$("#membership_type").on("change", function() {
				var membership = $(this).val();

				$(".membership[value='"+membership+"']").prop("checked", true);
			});

			// Method #1 - Getting radio selected using class
			$("#btnSubmit").on("click", function() {
				var membership = $(".membership:checked").val();

				alert(membership);
			});
		});
	</script>
</body>
</html>
```

I hope this tutorial can help you. Kindly visit here https://codeanddeploy.com/blog/jquery/how-to-check-radio-button-based-on-selected-value-in-javascriptjquery if you want to download this code.

[![Advanced Laravel SAAS Starter Kit with CRUD Generator](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wyjyev8tz3r8vi2w3on1.png)](https://1.envato.market/5g5QAn)

[Advanced Laravel SAAS Starter Kit with CRUD Generator - GET YOUR COPY NOW!](https://1.envato.market/5g5QAn)


Happy coding :)
What is Assertion in Selenium ?JavaScript Test Automation Tutorial | Part III
Published: 2022-03-23 12:35:22

In this video, learn what is Assertion in Selenium JavaScript? How and when do we use them?:[Start FREE Testing](https://accounts.lambdatest.com/register?utm_source=devto&utm_medium=organic&utm_campaign=mar_23&utm_term=sb&utm_content=tutorial_video)

It is Part III of the LambdaTest JavaScript Test Automation Tutorial series. In this video, Ryan Howard (@ryantestsstuff), an engineer, explains 'assertions, their types, and their applicability in detail showcasing practically, what if the test(s) fails while performing selenium automation testing? This video answers how one can handle major errors/issues using 'Assertions'.

Video also answers 🚩 
------------💨
What are the different methods of assert?
How to 'assert' and 'verify' in JavaScript Selenium.
How do you do Assertion in Selenium? 
How do you use assertions in Testing?
What are the different assertions in Testing?
What are the different methods of assert?
What is the use of Assertion in Selenium?
How to write and run test scripts in Selenium? JavaScript Test Automation Tutorial | Part II
Published: 2022-03-23 12:31:16

This video will explain how to write the first Selenium Test in JavaScript. Explore more:[Start FREE Testing](https://accounts.lambdatest.com/register?utm_source=devto&utm_medium=organic&utm_campaign=mar_23&utm_term=sb&utm_content=tutorial_video)

This is Part II of the JavaScript Test Automation LambdaTest Tutorial series. Ryan Howard (@ryantestsstuff), a seasoned expert in Selenium & JavaScript, explains how to create & execute the test cases on the local Selenium Grid. He also demonstrates how to use Selenium Web Locators to find the required WebElement on the page and perform actions on the same.

This video answers 🌐-: 
💠How do you write the first test case in Selenium with JavaScript?
💠Can I use Selenium for JavaScript?
💠How do I start testing with Selenium with JavaScript?
💠How do I run a test script in Selenium?
Why Should You Hire Python Developers?
Tags: hirepythondeveloper
Published: 2022-03-23 12:21:13

If you came to this blog to learn about [hiring Python developers](https://externlabs.com/hire-pythone-developer.php), you probably already know what Python is and what it can do for you. If you're looking forward to having a result that's analogous to these operations also hire python inventors who can help you be in a win-win situation. All these operations have marked their presence in the digital arena with their ease of use and strong point-set. Thanks to the language that they can always be employed as the strongest results in their assiduity.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rrwjtnphjmzk6jnjg01y.jpg)
TDD vs BDD
Tags: javascript, testing, tdd, bdd
Published: 2022-03-23 12:06:50

Since Agile development involves continuous change, testing has become invaluable to prevent these frequent changes from introducing new bugs or breaking the app. 

Most developers are familiar with testing approaches, in this short article, we will look at TDD and BDD and explore the differences: 


### TDD 
 - TDD stands for Test Driven Development
 - TDD is a software development methodology where tests are written before the actual code is implemented.
 - It is focused on testing smaller pieces of functionality in isolation.
 - The process starts by writing a test case
 - Might be a better approach for projects which involve API and third-party tools.
 - Although TDD is a development technique, it can also be used for CD

**Test Runners:** Mocha, Jasmine, Jest

**Process of TDD**

![tdd](https://www.softwaretestinghelp.com/wp-content/qa/uploads/2019/08/TDD-Flowchart.jpg)


### BDD 
 - BDD stands for Behavior Driven Development
 - It is designed to test an application's behavior from the end user's standpoint
 - BDD is an extension to TDD where instead of writing the test cases, we start by writing a behavior.
 - The process starts by writing a scenario as per the expected behavior.

**Test Runners:** Cucumber.js, Jasmine, Jest


Example : 

_> Scenario: Login check
Given I am on the login page 
When I enter "username" username
And I enter "Password" password
And I click on the "Login" button
Then I am able to log in successfully._

- Might be a better approach for projects which are driven by user actions.

**Process of BDD**

![bdd](https://media-exp1.licdn.com/dms/image/C5112AQGU_wdi8i7yCg/article-cover_image-shrink_600_2000/0/1551346923734?e=1652918400&v=beta&t=WHM_vC1AboMJjeNHQv8AkLXPc_ajOS0ciATCnRw66XM)

If there are any tips to add to this short comparison, would appreciate it.



refs:
 - [https://www.softwaretestinghelp.com/tdd-vs-bdd/](https://www.softwaretestinghelp.com/tdd-vs-bdd/)
Git Starter Pack
Tags: git, github
Published: 2022-03-23 12:00:40

We've all probably used git in our companies. Usually we're taught a few basics and then left alone to deal with the monster that is git. Soon we start to have to handle conflicts! This article will help you learn a few tips and tricks to guide you through your development process.

### I've changed a file and want it back

There are two situations here:
- I want it back to the last commit

`git checkout <filename>`

- I committed it but I want it back to master

`git reset master <filename>`

This also works for files you've deleted!

### I made a mistake while merging

`git merge --abort`

### I want to select one commit from another branch

`git cherry-pick <commit-hash>`

### I want to remove any files I've changed

`git checkout .`

### I want to remove any new files I've created

`git clean -df`

### I want to look at a certain commit

`git checkout <commit-hash>`

### I want to see the commit history

`git log`

## A couple of conventions
### How to write commit messages

- Use capitalized messages:

Add feature blabla

- Use verbs in infinitive:

~~Added~~ Add foobar

### How to name branches

- Use lower-case, url-friendly names

~~AbCd~~ abcd

~~a_b~~ a-b
Monokle 1.6.0 has improved UI/UX helm workflows and sealed secrets support
Tags: kubernetes, beginners, monokle, devops
Published: 2022-03-23 11:56:51

Hi everybody! We're happy to announce the 1.6.0 release of our open-source desktop tool Monokle - the Kubernetes manifest IDE with the following features:

- Increased stability of Monokle
- Improved UX/UI on Helm workflows
- Handling restricted cluster access

Additionally, we introduced:

- Helm preview configuration
- The capability to choose the Kubernetes Schema that suits the version of your Kubernetes cluster
- Sealed Secrets support
- Usage/error analytics

and bug fixes of course!

Check out the full list of new features at https://kubeshop.io/blog/monokle-1-6-0-release and download the latest release/installers from GitHub - https://github.com/kubeshop/monokle - Let us know how it works for you and if you would like to see something there.

Thank you!
Christian
NFTs and... Unreal Engine? The New Way To 'Play To Earn'
Tags: blockchain, unreal, gamedev
Published: 2022-03-23 11:48:30

It's no secret that the gaming industry is constantly evolving - and with huge continuing developments (and consumer interest) in NFTs, it may come as no surprise that the two inevitably combined. 'Play to Earn' is becoming a larger and larger space in the gaming industry - but not often in tandem with such popular engines as Unreal.

Taking a deep dive into the relevant technologies, such as Blockchain, NFTs, game development and more, this article takes a long, hard look at why developers should consider moving into this space.

Article: [Build 'Play to Earn' Games with UE](https://www.chetu.com/blogs/blockchain/build-nft-games-with-ue.php)
Windows - Chrome Keyboard Shortcuts to boost your productivity
Published: 2022-03-23 11:45:16

1) Moving between tabs
Ctrl + Tab (for Windows) 

2) Re-opening closed tabs
Ctrl + Shift + t (for Windows)

3) Searching through open tabs
Ctrl + Shift + a

4) Close the current tab
Ctrl + w (for Windows)

5) Open a new tab or a window
Ctrl + t (for Windows) 

I hope you have found this small article helpful and now you can be more productive while browsing the web. Please Leave us Heart...
Thermann Hot Water Systems
Tags: waterheater, hotwatersystems, thermann
Published: 2022-03-23 11:32:54

**Thermann** has more than made its mark on the Australian market and is fast becoming a household name in hot water. Thermann has the greatest distribution network in the country. They also offer a huge range of commercial hot water products including but not limited to an electric hot water system, gas hot water system, and solar boosted hot water system that could come in storage tanks and instantaneous or continuous flow options. Hot Water 2Day is a proud partner of the [Thermann Hot Water System](https://hotwatertoday.net.au/c/thermann/) brand. Thermann Hot water systems have taken the market by storm over the past few years, dominating sales across the country through unrivaled distribution channels.
How is Free Geocoding Beneficial?
Published: 2022-03-23 11:09:51

[Geocoding](https://positionstack.com/) is a lot beneficial for businesses. As businesses can use geocoding to rapidly access different types of places that are important to their operations. Users can also overturn geocode, which would be the way of transforming geographical information to physical addresses, using geocoding software. Also, there are a lot of platforms available online providing free geocoding services. You can get access to real-time geocoding and that too with the worldwide coverage and the fair pricing. You can also search online for [“free address lookup”](https://positionstack.com/) to get connected with the best geocoding for your business.
JavaScript Test Automation Tutorial 2021 | What is JavaScript? | Part I
Published: 2022-03-23 11:07:13

This video explains what JavaScript is and how to start with JavaScript Selenium testing? Explore more:[Start FREE Testing](https://accounts.lambdatest.com/register?utm_source=devto&utm_medium=organic&utm_campaign=mar_23&utm_term=sb&utm_content=tutorial_video)

This JavaScript Testing tutorial course part I of Selenium Test Automation in JavaScript is presented by Ryan Howard (@ryantestsstuff) under the Lambdatest YouTube Channel Tutorial series.

Also cover-:
💥How do I run a test script in Selenium?
💥How do I run a Selenium test in JavaScript?
💥Should I learn Java or JavaScript for Selenium?
💥How does Selenium handle JavaScript?
💥How JavaScript is used in Selenium?
Wednesday Links - Edition 2022-03-23
Tags: java, jvm, spring, microservices
Published: 2022-03-23 10:59:09

JDK 18 Release Notes (24 min)🥳
https://jdk.java.net/18/release-notes

How to communicate Java microservices? (17 min)💬
https://blog.softwaremill.com/how-to-communicate-java-microservices-b71f4e6bd9ed

Initial AOT support in Spring Framework 6.0.0-M3 (4 min)💈
https://spring.io/blog/2022/03/22/initial-aot-support-in-spring-framework-6-0-0-m3

Conditional dependencies with Gradle (2 min)🥢
https://melix.github.io/blog//2022/03/gradle-conditional-dependencies.html

Introducing the `oracle-actions/setup-java` GitHub action (1 min)🎉
https://inside.java/2022/03/11/setup-java/

Error handling across different languages (6 min)💥
https://blog.frankel.ch/error-handling/

The API should guide you (5 min)🦮
https://mikemybytes.com/2022/03/23/the-api-should-guide-you/

Cascading failures in large-scale distributed systems (14 min)🚰
https://blog.mi.hdm-stuttgart.de/index.php/2022/03/03/cascading-failures-in-large-scale-distributed-systems/

How sharding a database can make it faster (14 min)🖖
https://stackoverflow.blog/2022/03/14/how-sharding-a-database-can-make-it-faster/
14 Awesome CLI Tools for Modern Software Developers
Tags: productivity, bash, tooling
Published: 2022-03-23 10:45:56

## General Command Line Tools

### Autojump
[Autojump](https://github.com/wting/autojump) is a tool that learns your most frequented directories and allows you to switch to them by using a shortcut.

### exa
[exa](https://github.com/ogham/exa) is a modern replacement for `ls` with very nice outputs.

![exa](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xbblpxjcv15lrdef9cha.gif)

### pbcopy & pbpaste

You can use `pbcopy` and `pbpaste` to pipe the output of your commands to your clipboard and read from there

```bash
cat ~/.ssh/id_rsa.pub | pbcopy
pbpaste > file.txt
```



## Documentation and Bug Fixing

### tldr
[tldr](https://github.com/tldr-pages/tldr) is a collection of cheat sheets for console commands.

![tldr](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f0nv5xsaq34iko2opoxx.gif)

### howdoi
With [howdoi](https://github.com/gleitz/howdoi) you can browse the internet for coding snippets right from your terminal.

![howdoi](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/le37qzaity2ajrzgo97e.gif)

### rebound
[rebound](https://github.com/shobrook/rebound) is a command-line tool that instantly fetches Stack Overflow results when an exception in your Python code is thrown.





## Working with Files

### jq
[jq](https://stedolan.github.io/jq/) handles JSON on the command line.

### icdiff
[icdiff](https://www.jefftk.com/icdiff) is a visual diffing tool for your terminal.

### peco
Think of [peco](https://github.com/peco/peco) as a realtime `grep`.

### ack
[ack](https://beyondgrep.com/) is like `grep` but faster and more user friendly.
![ack](/media/cli/ackres.gif)


## Databases, HTTP

### httpie
[httpie](https://httpie.io/) is like postman in your console window.

### pgcli
[pgcli](https://github.com/dbcli/pgcli) is like DataGrip on your terminal.


## Other Tools

### tig
[tig](https://github.com/jonas/tig) is a visual git client on the console.

![tig](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z6y02nkvvy3tln4uz5f8.gif)

### ttygif
[ttygif](https://github.com/icholy/ttygif) is a tool to create animated gifs from your terminal sessions.

If you're using macOS and depending on your screen resolution, you might need to chop some pixels to remove window decorations. I did this like so.

```bash
convert tty.gif -coalesce -repage 0x0 -gravity North -chop 0x38 +repage tty.gif
```
If you're a blockchain developer, what's your vision for the future of Web3 that made you want to be a blockchain developer?
Tags: discuss, blockchain, web3, career
Published: 2022-03-23 10:41:17

I'm K, and I'm currently transitioning into Blockchain Development, from a Web Development background.

I decided to be a Blockchain Developer because I believe there are a lot of innovations to be made and it excites me.

How about you? What is your vision, that made you want to be a blockchain developer?

I'm fairly new to blockchain development, and hearing from other developers in the space will surely help me gain a wider perspective.

Thanks!
Regex that starts with letter, contains 1 uppercase/lowercase letter, one number and no special characters & min 8 characters
Published: 2022-03-23 10:38:15

You need to put the lookaheads after `^` and put `[a-zA-Z]` right after them and quantify the rest with `{8,}`:

`^(?=.*?[a-z])(?=.*?[A-Z])(?=.*?[0-9])[a-zA-Z][a-zA-Z0-9]{8,}$`

Regex that starts with letter, contains 1 uppercase/lowercase letter, one number and special characters & min 8 characters
```
^(?=.*[0-9])(?=.*[!@#$%^&*])[0-9a-zA-Z!@#$%^&*0-9]{8,}$
```
> See the regex demo.
https://regex101.com/r/fGk1AC/1

**> Pattern details:**

1. `^` - start of a string
2. `(?=.*?[a-z])` - at least 1 lowercase ASCII letter
3. `(?=.*?[A-Z])` - at least 1 uppercase ASCII letter
4. `(?=.*?[0-9])` - at least 1 ASCII digit
5.`[a-zA-Z]` - an ASCII letter
6. `[a-zA-Z0-9]{7,}` - 7 or more ASCII letters or digits (\w also allows _)
7. `$` - end of string.
Utilizing Scala Cats to improve database access code
Tags: functional, scala, database
Published: 2022-03-23 10:36:32

Let start with something familiar. If you worked with scala for some time you most likely came across `scala.concurrent.Future#sequence` and `scala.concurrent.Future#traverse`.

Here is a simplified method signature of these two methods:

```scala
def traverse[A, B](items: Seq[A])(f: A => Future[B]): Future[Seq[B]]
def sequence[A](items: Seq[Future[A]]): Future[Seq[A]]
```

`cats.Traverse` is an abstraction which embodies the operation `scala.concurrent.Future#traverse` but is more general. Since in addition to the function argument type `A` and return type `B`, the context type of both `Seq` and `Future` further generalized:

```scala
trait Traverse[F[_]] {
  def traverse[G[_], A, B](fa: F[A])(f: A => G[B]): G[F[B]]
}
```
If you're using a newer version of `slick` for database access you're most likely familiar with `DBIO`. There are often cases when you have a collection of some sort and want to execute a database action for each of the elements in the collection.
Since `DBIO` is somewhat similar to `Future` we could write:

```scala
def f[A](a:A): DBIO[B] = ???

val b: DBIO[Seq[B]] = DBIO.sequence(items.map(f))
```
or if we lack documentation awareness we could event end up writing:

```scala
items.foldLeft(DBIO.successful(Seq()) {
  (acc, next) => acc.flatMap(a => f(next).map(i => acc :+ i)
}
```
But if we utilize slickcats we can simply write:

```scala
items.traverse(f)
```

But if you try to use this approach without the proper dependencies you'll see that the compilers complains about missing implicit instances for `DBIO`.

In order to fix that you have to add following dependency:
https://github.com/RMSone/slick-cats
and add following import to your class:

```scala
import com.rms.miu.slickcats.DBIOInstances._
```
Depending on how far you are in you functional programming journey you'll know that `cats.Traverse` is a special kind of functor which requires a type constructor with a single type argument.

If the methods you want to use together with `slickcats` return `DBIOAction[+R, +S <: NoStream, -E <: Effect]` or some other related type which has more than one type parameter the compiler will complain. In these situation you'll have to help the compiler a bit by either changing the method signature to `DBIO` or you'll have to cast it to `DBIO` explicitly.

This is just an example. `slickcats` has typeclass instances which can help you to write more readable database access code.
Simple React Portfolio - Part 1
Tags: react, beginners, devjournal, typescript
Published: 2022-03-23 10:01:37

## About Page

Hello, today I started working on a simple React Portfolio page. 

I'm usually a full time back-end developer, so I don't have much experience with front end frameworks. 
I have a little bit of Angular/Vuejs but hardly any React. 

This is what I managed to accomplish in about 30 minutes. 

![About Page](https://i.ibb.co/Q6KhZYW/Screenshot-from-2022-03-23-18-53-13.png)

Very simple, but a big feat for me.. 😅

If anyone has any good resources for learning React/Next.js please share. 🙏
I'm currently using React with Typescript and Tailwind.