teleren/devto huggingface dataset:
Discuss on Github Branch Merge
Tags: python, opensource, github, beginners
Published: 2021-10-04 13:52:17

I'm gonna talk about Github branch merging today. 

When working on a project through Github, one necessary step is to know how to create multiple branches to work on new features and work on multiple code changes in parallel on separate topic branches. 

I have picked two small feature changes to my repository. First of all, I created two issues to my [repo](https://github.com/Qiwen-Yu/TextHTMLPress). And I created two new topic branches to these two issues, which you can find in [issue-06](https://github.com/Qiwen-Yu/TextHTMLPress/issues/6) and [issue-07](https://github.com/Qiwen-Yu/TextHTMLPress/issues/7). Then the next step is to implement the features I picked in order to fix the issues.

The first feature I decided to change is to add an optional -l, --lang, and/or \l flag, which indicates the language to use when generating the lang attribute on the root element. For example, --lang fr would mean that the HTML documents are in French, and would include , while -l pt-BR would mean the text is using Brazilian Portuguese: .
By default, use en-CA for Canadian English.

The second feature is an improvement to the project. If there are no errors, exit with 0. Otherwise, exit with a non-zero exit code (e.g., -1). 

After all the code is done, it is the time to merge the features to the branch. Starting by switching to the default branch and merge the first feature branch. In my case, is to merge the issue-06 to main branch. The first merge is a "fas- forward" merge using `git merge issue-06` command.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2sc0qvmzl5d4l4mss5s8.png)
The second merge will also use the same command, but in Git, the second command is doing a "three-way recursive merge"
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w1p8mgauw1rpqlvqguv6.png)

When all the features are implemented, it's time to push them as usual, and then close the issues.

After this whole process of dealing with git merge, I had a better understanding with how to collaborating your code to open source projects, where there are always multiple contributors to work on the project.
What is Currying in JavaScript 
Published: 2021-10-04 18:37:16

hascale curry brough this code pattern. That is not new concenpt , Its just a code pattern which is brough hascale curry.This defination is converting a function which has multiple perameter and converted to a single perameter.
Example : -
```javascript 
function curryFunc(x){
  return function(y){
    return function(z){
      return x+y+z;
    }
  }
}
console.log(curryFunc(1)(2)(3))
```

Its based one things , we want to decrease function perameter.
When this function call by first time or first function call with paremeter. This function call partial function.
Example: -
```javascript 
function curryFunc(price){
  return function(disc ){
      return price+disc;
  }
}
const user1 = curryFunc(3) // that is called partial function
const result = user1(35)
console.log(result)
```
HIRING! Several USA based roles - React, Node.js, Python, etc
Tags: career, hiring, softwareengineer, jobs
Published: 2021-10-04 18:35:35

[Hiring] [Remote] [USA BASED] [Full Time]

Hi Community!

I am looking for several software engineers, must be in the USA - all are full-time roles with benefits.

Please share! - https://sites.google.com/view/segreraassociates/home

All inquiries to rrabines@segrera.com

Have a great week!

Ruben Rabines
robotics as a life savior in a real life scenario
Published: 2021-10-04 18:31:56

As we all know how much our life has been changed since the Artificial Intelligence has been introduced to us. But still some people think that one day it is going to take over the whole humanity (DUMBOS). So here I am giving you some examples about how robotics has become a life saviour in real life scenario. So I would like to start with a robot that saved human lives in sea, The Savior Aerial robot is designed in a way that it can quickly move towards drowning people by user guidance and activates its savior system. This system releases life tubes for the drowning ones. By hearing news about drowning’s at the Caspian Sea (north of Iran) they thought of finding a solution of saving human lives at the sea. For solving the problem, at the first step, they developed a surface rescue robot at RTS Lab as shown in the figure 1, the robot can be drove both manually and by radio control by the lifeguard to move towards the incident. If the victim was conscious he could catch the barriers and comes back and if not the lifeguard had to first find the victim from beneath water then throw him on the device and then return to the coast. After manufacturing and testing it successfully, they thought of building a robot with higher capabilities that could act quicker and more accurate in rescue missions and they came up with the Pars Aerial rescue robot idea. 
IF you guys still think that this story wasn't enough to change your mind I'm coming with another one (HAHA I'll not finish until I change your mind about robotics as a savior).
SAVIOUR is a rescue robot system from Pakistan. SAVIOUR is an acronym for "Semi Autonomous Vehicle for Inspection, Observation and Ultimate Rescue". The robot is the first rescue robot to be produced in Pakistan[citation needed] and was designed and built by the Ghulam Ishaq Khan Institute of Engineering Sciences and Technology (GIKI) in Topi, Pakistan.
The SAVIOUR robotics team will now participate in the RoboCup Iran Open 2011 to be held in Tehran and the RoboCup Internationals 2011 to be held in Turkey. This time the team is led by Farrukh Sohail and members are Azzam Ahmed, Fatima Javed Zaidi, Slaman Khan and Amaid Zia.
The SAVIOUR Robotics team participated in the RoboCup Iran Open 2010 held in Tehran. The team consisted of Muhammad Fahd Waseem, Muhammad Muneeb Saleem, Muhammad Waqar Chughtai, Farrukh Sohail and Arsalan Khalid.
The SAVIOUR Robotics team participated in the RoboCup Internationals at Graz, Austria, in 2009. The team consisted of Wardah Inam, Muneeb Zia and Muhammad Fahd Waseem.
So by this example you guys must be shocked and surprised (I hope this had changed your mind about robotics,still you have doubt then..... God bless you Lol)
ROBOTICS AS A LIFE SAVIOUR IN A REAL-LIFE SCENARIO
Published: 2021-10-04 18:24:58

Robotics is an interdisciplinary field that integrates computer science and engineering.Robotics involves design, construction, operation, and use of robots. The goal of robotics is to design machines that can help and assist humans. Robotics integrates fields of mechanical engineering, electrical engineering, information engineering, mechatronics, electronics, bioengineering, computer engineering, control engineering, software engineering, mathematics, among others.
Robots are being used to arm and disarm bombs which were an extremely life killing jobs for a human. In nuclear plants, a lot of nuke wastes are being produced every day. The wastes produce nuclear radiation which is harmful to So, now robots are being used as nuke cleaner. Robots are now working as a firefighter.
Robots are getting more personalized, interactive, and engaging than ever. With the growth of this industry, virtual reality will enter our homes in the near future. We'll be able to interact with our home entertainment systems through conversations, and they will respond to our attempts to communicate.
Robots are being used extensively in medical fields to save lives and will be much more advanced in future to assist humans better.
Ruby Regular Expressions
Published: 2021-10-04 18:18:47

##What is Ruby regular expressions (ruby regex)?

Regular expressions appear in many programming languages, with minor differences.

Their purpose is to specify character patterns that subsequently are determined to match or not match. 
Pattern matching, in turn, serves as the basis for operations like parsing log files, testing keyboard input for validity, etc.

Regular expressions have a reputation of being incredibly powerful.

Regular expressions are instances of the Regexp class.
and it's literal constructor is a pair of forward slashes:
//

```
//.class
=> Regexp 
```
Between the slashes we add the specifics of the regexp.
Now Any pattern-matching operation has two ends: a regexp and a string.
and the simplest way to do that with the `match` method.
we can do this either way since regular-expression
objects and string objects both respond to `match`.
Ruby also provides pattern-matching operator,
`=~`(equal sign and tilde).
```
p "Match!" if /ruby/.match("ruby is wonderful")
=> "Match!"

p "Match!" if "ruby is wonderful"=~(/ruby/)
=> "Match!" 
```
##Building regular expression pattern

When we write a regexp, we put the definition of the pattern between the forward slashes //.
and what we are putting simply a set of predictions that we want to look for in a string.

###regex components
Literal characters,`/r/` “match this character”.
The dot wildcard character (.), “match any character”.
Character classes, [aeiou] matches any vowel.

So far, we’ve looked at basic match operations which are true/false tests.
```
regex.match(string)
string.match(regex)
```

Till now we got the basics of regexp, and for everyone 
I definitely recommend trying out [Rubular](https://rubular.com/) to build your own regexp taking advantage of it's quick reference, which is awesome for practice, and it is very interactive.

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

I hope you enjoyed reading the topic as much as i enjoyed writing it. 🙂
Masterclass in sarcasm
Tags: podcast, jokes, cloud, aws
Published: 2021-10-04 17:27:49

[Corey Quinn](https://twitter.com/quinnypig), Chief Cloud Economist @ The Duckbill Group, shows you what super-sayan sarcasm looks like.

Check out our episode that dropped today!

{% spotify spotify:episode:0ug78L1mTxIvYkZLAMeqej%}
Beginner’s guide to Tailwind CSS: the new way of styling
Tags: tailwindcss, css, webdev
Published: 2021-10-04 17:21:54

## Intro
Tailwindcss is a utility-first CSS framework which can be assumed as an API for your design system.

> Utility classes help you work within the constraints of a system instead of littering your stylesheets with arbitrary values. They make it easy to be consistent with color choices, spacing, typography, shadows, and everything else that makes up a well-engineered design system.

In this article I'm going to share some experiences I've achieved during work with this incredible CSS framework lately.

## Learning
Although it is a must-do to read thoroughly each and every framework's documentation, it is rare to find a nice one.
Tailwindcss documentation is one of the best out there. Easy to navigate, well-balanced descriptions and beautiful.  
Definitely you should check it out and learn everything you need to know. ([+](https://tailwindcss.com/docs))


## An unbiased review
Moreover learning, you might need to know how Tailwind CSS introduce itself to the community. Which one is better? Bootstrap or Tailwind? Is it right time to switch?🤔
Kyle has a short and informative video about it. ([+](https://youtu.be/hdGsFpZ0J2E))

## Cheatsheet
In fact, we shouldn't memorize things that can be available in a blink of an eye. 😎
Cheatsheets can play huge role in our daily life and we all love it. 
You can check out an amazing cheatsheet for Tailwind CSS here. ([+](https://umeshmk.github.io/Tailwindcss-cheatsheet/))


## Playground
Many developers are "Learn by doing" people. Tailwind Play is an interactive environment that you can right jump into practicing and learning Tailwind. ([+](https://play.tailwindcss.com/))
Additionally, it's worth to play [this game](https://knightsoftheflexboxtable.com/), too. Apply Tailwind knowledge and Flex to navigate the knight through the dungeon. 😉


## My Todo project
Last but not least, review a sample project give you great insight. Check out my simple Todo App built with React, Typescript and Tailwind CSS.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uhpwu4inpbs86jiw2tp1.png)
 

{% github reza899/todo-app no-readme %}


## Conclusion
From my point of view, learning Tailwind is one the things every web developer should go with it. I believe it is like a revolution in styling world.
By using Tailwind build rapidly and much easier styling. Also you're not going to write vanilla CSS anymore.

If you have any other recommendations, let everyone know in the comments.
(Unit/Integration) Testing React.js Forms with React Testing Library
Tags: react, formik, javascript, typescript
Published: 2021-10-04 16:44:30

In this video we will learn how to test React Forms using React Testing Library. Our React forms can be implemented using formik or react hook form and our tests will work for both libraries.

The tests will take no assumption on the "library" used, so independently of you using react hook form or formik, those tests will work in both libraries.

{% youtube MhFSuOjU624 %}

GitHub repository: https://github.com/bmvantunes/youtube-react-testing-video8-forms-react-testing-library
All the videos in this series (React.js Testing Tutorial): https://www.youtube.com/playlist?list=PLYSZyzpwBEWTBdbfStjqJSGaulqcHoNkT
AWS Communism – Part 1: How we cut our Load Balancing cost by more than 96%
Tags: aws, devops, webdev, productivity
Published: 2021-10-05 09:36:49

---
title: AWS Communism – Part 1: How we cut our Load Balancing cost by more than 96%
published: true
date: 2021-10-04 16:36:47 UTC
tags: aws, devops, webdev, productivity
canonical_url: https://www.setops.co/blog/aws-communism-part-1-how-we-cut-our-load-balancing-cost
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ipndelispsz10pqtau9.png
---

In this series of posts, we provide you with fresh ideas on better utilizing your AWS resources and saving money. Much effort went into finding a cloud-native architecture, and we want to share our insights with you.

Read the full article here: [www.setops.co/blog](https://seto.ps/aws-communism-784f6b)
The yellow wallpaper -Mobile version
Tags: codepen
Published: 2021-10-04 16:34:55

{% codepen https://codepen.io/mischievous-loner/pen/dyREaVG %}
![The Yellow Wallpaper](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/faq0h9b7pksf551w3vgp.jpg)
Unit Testing Best Practices: 6 tips for better names
Tags: beginners, csharp, testing, codequality
Published: 2021-10-04 16:30:24

Today I'm not posting a 1000-word, SEO-rich article. I'm reposting a LinkedIn post with 6 quick tips to write better test names.

Often, we don't put too much care into our unit tests, maybe with the excuse that "we don't ship tests to our customers" or "writing tests will take more time, and we don't have time". But, unit tests are our safety-net, our seat belt. They're there to give us confidence to change things.

Here you have 6 quick tips/ideas to write better names for your unit tests.

✔️ Choose a naming convention for your test names and stick to it.

✔️ Every test name should tell the scenario under test and the expected result. Don't worry about long test names. But, don't name your tests: `Test1`, `Test2` and so on.

✔️ Describe in your test names what your testing in a language easy to understand even for non-programmers.

❌ Don't prefix your test names with "Test". If you're using a testing framework that doesn't need keywords in your test names, don't do that. In C# with MSTest, we have attributes like `[TestClass]` and `[TestMethod]` to mark classes and methods as tests. Other testing frameworks have similar attributes. 

❌ Don't use filler words like "Success" or "IsCorrect" in test names. Instead, tell what "success" and "correct" means for that test. Is it a successful test because it doesn't throw exceptions? because it returns a value? Make your test names easy to understand.

❌ Don't use assertion messages. Write better test names.

Voilà! Six tips as promised. If you want to dig deeper into unit testing, I wrote a post on [naming conventions for our unit tests](https://canro91.github.io/2021/04/12/UnitTestNamingConventions/) and other [unit testing best practices](https://canro91.github.io/2021/07/05/UnitTestingBestPractices/). You will find more tips on names, organization and mocks.

_Upgrade your unit testing skills with my course: [Mastering C# Unit Testing with Real-world Examples](https://www.udemy.com/course/mastering-csharp-unit-testing-with-real-world-examples/?referralCode=8456B1B78E2EDE923174) on Udemy. Practice with hands-on exercises and learn best practices by refactoring real-world unit tests._

_Happy testing!_
Character Count In Textarea
Tags: javascript, tutorial, webdev, php
Published: 2021-10-04 16:16:11

In this tutorial I will explain to you character count in textarea or how to count characters from text area in PHP. many time client's have requirements like they have to add some number of character in specific field and after that user can not add any data in this field at that time we can display count of character. So, user can manage his/her content in text area.

here, we will add some piece of HTML code with text area for count character length in PHP and in the bottom we will add jQuery code in script tag that's it. Using jQuery character count on keypress. So, we will see character count in text area with remaining character count in text area in PHP.

> **_[Read Also : How To Generate QRcode In Laravel](https://techsolutionstuff.com/post/how-to-generate-qrcode-in-laravel)_**

```
<!DOCTYPE html>
<html>
<head>
    <title>Count Characters In Textarea Example - techsolutionstuff.com</title>
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
</head>
<body>
<div class="container">
    <h3 class="text-center" style="margin-bottom: 20px;">Count Characters In Textarea Example - techsolutionstuff.com</h3>
     <div class="col-md-8 col-md-offset-2">
        <textarea name="textarea" id="textarea" maxlength="300" rows="5" style="width: 100%" placeholder="Eneter Text Here..." autofocus></textarea>
        <div id="count">
            <span id="current_count">0</span>
            <span id="maximum_count">/ 300</span>
        </div>
    </div>
</div>
</body>
</html>
<script type="text/javascript">
$('textarea').keyup(function() {    
    var characterCount = $(this).val().length,
        current_count = $('#current_count'),
        maximum_count = $('#maximum_count'),
        count = $('#count');    
        current_count.text(characterCount);        
});
</script>
``` 

And after that you will get output like below screenshot.

![Character Count In Textarea](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kocy8fkl6pmz2f4txr26.png)

---

> **_[Read Also : How To Add Ckeditor In Laravel](https://techsolutionstuff.com/post/how-to-install-ckeditor-in-laravel)_**
IAM best docs
Tags: cloudskills, security, aws, cloud
Published: 2021-10-04 16:15:19

Sites: 

https://start.jcolemorrison.com/aws-iam-policies-in-a-nutshell/

https://forrestbrazeal.com/2019/02/18/cloud-irregular-iam-is-the-real-cloud-lock-in/

Codes:
https://github.com/iann0036/iamlive

developing post....
Merge my new feature branches
Published: 2021-10-04 16:13:27

This week I updated my SSG, adding two new features in different branches. Then, I successfully merged them into my master branch using git commands.

## New Features

**The first feature** I updated is the optional command for generating the [lang](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) attribute on the root `<html>` element. I simply added one more option for command line function as below example.
```javascript
	.option('l', {
            alias: 'lang',
            describe: 'lang attribute for html',
            type: 'string',
            required: false
        })
```

**The second feature** I updated is a [horizontal rule](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr) in Markdown. So, `---` in the markdown file should be converted to `<hr>` tag. I added a if-statement for `---` inside of the if-statement when file type is markdown. The code block looks like this.
```javascript
	 else if(e === '---')  
         html += `<hr>${deli}`;    
```

I know these new features are considerably easy, but  I ran into some issues when splitting the sentences. The problem was new line comes out differently depending on what system you use, like window32, ubuntu, etc. So, I changed few lines for the delimiters, something like this.
```javascript
	 const deli = process.platform === 'win32' ? '\r\n' : '\n'; 
```

Instead of using      
```javascript
	 let resArr = res.split(/n/n);
```
I use
```javascript
	 let resArr = res.split(deli);
```

As a result, all the extra `<p>` tags are gone, and the output looks good!

## Git merge and branch

I have experience with this git feature. In one of my other classes, we submitted our assignments through git. My professor briefly explained how the git works and encouraged us to use a branch to avoid unrestorable updates and changes.

Making branches and working in that specific branches was the same process as I have been doing. The command is,
```bash
$ git checkout -b [branch name]
```
And it means making a branch that's named [branch name] and going into that branch.

However, I made an extra commit, but I wanted to remove it. Because it could give me confusion about which commit is new or what I want, and I only need one. How I solved this problem was the reset command.

If you enter:
```bash
$ git log
```
It shows you a history of everything that happened to the repository. You can see there are hash codes for your commit. So, I copied that and entered:
```bash
$ git reset [hash code]
```

Then, I could finally add my new files again, go to the master branch, and merge my branches. The command is :
```bash
$ git merge [branch name]
```

Even though I edited the same file, index.js, the parts that I touched in each branch were different. So, I didn't get any errors, but it can give you an error message if it is overlapped. So, be aware of that!

I am glad that I am understanding and learning about git. I know there must be more good features about git, and I can't wait to learn and use them!
Ex-FB engineer offering guidance on programming interview prep
Tags: faang, programminginterviews, mentorship
Published: 2021-10-04 15:44:10

Hey everyone,

I'm a self-taught programmer who used to work at FB for 4 years. Happy to provide free programming interview guidance to anyone that needs help, either in the comments of this post or in a discord that I put together. I'm not offering to solve specific programming questions, I'm offering to provide guidance on what to study and how to prepare!

[Discord Invite](https://discord.com/invite/M8944Xz26m)

(dan#9955)

## My Story

After 3 consecutive years of Google/FB interviews, I finally received offers from Google, FB & others.

When I was at FB I conducted a lot of interviews and I even taught a class around programming interviews to my friends! Those friends are now at Google, Amazon, WeWork + smaller tech companies.

I want to help others avoid the mistakes I made and that I constantly see others making.
04 AKS - Azure Container Registry (ACR) Handshake
Tags: azure, techtalks, kubernetes, devops
Published: 2021-10-04 15:39:40

How can we associate the AKS and ACR together so that use the docker images privately in Kubernetes.

https://youtu.be/hFcSQ2KYEfw

{% youtube hFcSQ2KYEfw %}