teleren/devto huggingface dataset:
Container Solutions: Kubernetes vs. Docker
Published: 2022-08-31 05:56:26

Containerization has existed for decades but has seen increasing adoption in recent years for application development and modernization. We will discuss two specific container solutions and their uses: Docker vs. Kubernetes. First, we will discuss exactly what containerization is and then we will dive into the benefits of each solution.

**What is Containerization?**
Containerization is a form of virtualization at the application level. It aims to package an application with all its dependencies, runtimes, libraries, and configuration files in an isolated executable package called a container. The operating system (OS) is not included in the container, which makes it different from virtual machines (VMs), which are virtualized at the hardware level and include the OS. 

While the concept behind virtualization is the sharing of physical resources between several virtual machines, containers share the kernel of one OS between several containers. Unlike virtual machines, containers are lightweight precisely because they don’t contain the OS. This is why containers take seconds to boot. In addition, containers can easily be deployed on different operating systems (Windows, Linux, macOS) and in different environments (cloud, VM, physical server) without requiring any changes.

In 2013, Docker Inc. introduced Docker in an attempt to standardize containers to be used widely and on different platforms. A year later, Google introduced Kubernetes as a solution to manage a cluster of container hosts. The definitions of the two solutions will highlight their differences.

**Container Solution: Docker**
Docker is an open-source platform for packaging and running applications in standard containers that can run across different platforms in the same behavior. With Docker, containerized applications are isolated from the host, which offers the flexibility of delivering applications to any platform running any OS. Furthermore, the Docker engine manages containers and allows them to run simultaneously on the same host.

Due to the client-server architecture, Docker consists of client- and server-side components (Docker client and Docker daemon). The client and the daemon (Dockerd) can run on the same system, or you can connect the client to a remote daemon. The daemon processes the API requests sent by the client in addition to managing the other Docker objects (containers, networks, volumes, images, etc.).

Docker Desktop is the installer of Docker client and daemon and includes other components like Docker Compose, Docker CLI (Command Line Interface), and more. It can be installed on different platforms: Windows, Linux, and macOS.

Developers can design an application to run on multiple containers on the same host, creating the need to manage multiple containers simultaneously. For this reason, Docker Inc. introduced Docker Compose. Docker vs. Docker Compose can be summarized as follows: Docker can manage a container, while Compose can manage multiple containers on one host.

Source: [https://www.iotforall.com/kubernetes-vs-docker](https://www.iotforall.com/kubernetes-vs-docker)
HIGH JS QUALITY CODE
Published: 2022-08-31 05:54:23

**DEBUGGING IN THE BROWSER**JAVASCRIPT
Before writing more complex code, let’s talk about debugging.

Debugging is the process of finding and fixing errors within a script. All modern browsers and most other environments support debugging tools – a special UI in developer tools that makes debugging much easier. It also allows to trace the code step by step to see what exactly is going on.

We’ll be using Chrome here, because it has enough features, most other browsers have a similar process.
**

## The “Sources” panel
**
Your Chrome version may look a little bit different, but it still should be obvious what’s there.

Open the example page in Chrome.
Turn on developer tools with F12 (Mac: Cmd+Opt+I).
Select the Sources panel.
Bootstrap 5 Testimonial Slider
Tags: bootstrap, html, css, webdev
Published: 2022-08-31 05:18:10

The text submitted by your customers can be seen in a testimonials slider. The testimonials section is a powerful tool for establishing trust and encouraging potential buyers to take action because it shows how others have benefited from your product. When your visitor read your testimonial slider they are judging from the customer's point of view. They see themselves using the product you are selling. Nowadays people don't want to stay on a website for more than 2 to 3 minutes. Long testimonials can be boring to read so it's best to keep testimonial content as short and simple as possible. Today we will share with you the source code of another testimonial slider example. It is designed with Bootstrap 5, the latest version of the Bootstrap framework. If you want to use testimonials in your projects, this is a good example. [DOWNLOAD CODE](https://www.divinectorweb.com/2022/08/bootstrap-5-testimonial-slider.html)
Converting HTML Ecommerce Project into Angular 14
Tags: angular14, bootstrap5
Published: 2022-08-31 05:15:09

---
title: Converting HTML Ecommerce Project into Angular 14
published: true
description: Converting HTML Ecommerce Project into Angular 14
tags: angular14, bootstrap5
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---
Converting HTML Ecommerce Template into Angular 14 Project Part 2 - Add Assets and set Header Footer
https://www.youtube.com/watch?v=xdEGviF6Lps
Today I got August Badge🥳🥳🥳
Tags: badge, achievement
Published: 2022-08-31 05:05:22


#leetcode
#achievement
#badge
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/79b8du7n8v49x6n0zy67.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/offzcpr99tx2e0im0xgw.gif)


https://leetcode.com/Chiki1601/
1-1 WebRTC call with mobile devices
Tags: webrtc, call, mobile
Published: 2022-08-31 04:50:53

---
title: 1-1 WebRTC call with mobile devices
published: true
description: Although there are many examples related to WebRTC based audio/video calls, there is not a good guide for mobile devices 
tags: webrtc, call, mobile
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---

Although there are many examples related to WebRTC based audio/video calls, specially browser based ones floating in the world wide net, but it is not always easy to conceptualize and implement the concepts when it comes to mobile devices.
Here is a step by step guide (mainly consisting the important steps) to follow through for a stable peer to peer call connecting mechanism for mobiles. This is a very high level diagram, and whoever following it has to have a basic idea of how WebRTC calls work and the basic terms like SDP offer and answer.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cifgxuv4kz5w96v943my.jpg)
What are the best way get seo Projects?
Tags: seo, php, html, wordpress
Published: 2022-08-31 04:42:38

What are the best way to Approach **_[Web Designing](
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/41ohy5pav9q5cyo7f6m6.png)
)_** & Development company for SEO Projects if you are startups Freelancer or company?
Summer Break
Tags: beginners, webdev, theodinproject, ruby
Published: 2022-08-31 04:35:47

Hello! I've had a bit of a break from programming for the summer as having three highly active girls in their teens/pre-teens can be very time-consuming when they aren't engaged in school. I had a plan for the summer and unfortunately that plan had to be nixed for a new plan due to unforeseen circumstances that required me to have a more active role as Mr. Mom while my wife worked this summer.

Sure, I could have done SOMETHING, but honestly, it wouldn't have been very productive for me since I couldn't devote hours on end to my studies. I have to have large amounts of uninterrupted time set aside to focus on this stuff for it to make sense and allow me to make sense of it when it doesn't. There is nothing worse than constant interruptions when you're deep in thought processing the flow of an algorithm, or perhaps researching a new method. 

The long and short of it is, I needed a break anyway, and because of my schedule change over the summer, it worked out to just take a couple months off and focus on my family. After retiring from the military, that was the one thing I wanted more than anything, the ability to devote my time and attention to my family since so many years were lost to them during deployments. 

So what now you might ask? I'm currently watching a refresher video on Ruby programming, and I'll skim through the Ruby Basics course on [The Odin Project](https://www.theodinproject.com/paths/full-stack-ruby-on-rails/courses/ruby#basic-ruby). I'm enjoying learning Ruby, and can't wait to get deeper into it. I have a stock picking exercise, and a bubble sorting exercise to finish up which is all I need to accomplish to wrap up Basic Ruby.

From there I will move on to the Object-Oriented Programming Basics section which has a **TON** of reading and will take some time to finish. That is where I'm at and look forward to continuing my journey! Until next time...<u>be good!</u>

###Cover Photo Credit:
Photo by <a href="https://unsplash.com/@puregeorgia?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Alfred Schrock</a> on <a href="https://unsplash.com/s/photos/summer-break?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
417. Leetcode Solution in Java
Tags: java
Published: 2022-08-31 04:21:42

```
class Solution {
    static void dfs(int i, int j, int w, int h, int[][] M, byte[] dp, List<List<Integer>> ans) {
        int ij = i * M[0].length + j;
        if ((dp[ij] & w) > 0 || M[i][j] < h) return;
        dp[ij] += w;
        h = M[i][j];
        if (dp[ij] == 3) ans.add(Arrays.asList(i,j));
        if (i + 1 < M.length) dfs(i+1, j, w, h, M, dp, ans);
        if (i > 0) dfs(i-1, j, w, h, M, dp, ans);
        if (j + 1 < M[0].length) dfs(i, j+1, w, h, M, dp, ans);
        if (j > 0) dfs(i, j-1, w, h, M, dp, ans);
    }
    public List<List<Integer>> pacificAtlantic(int[][] M) {
        List<List<Integer>> ans = new ArrayList<>();
        if (M.length == 0) return ans;
        int y = M.length, x = M[0].length;
        byte[] dp = new byte[x * y];
        for (int i = 0; i < x; i++) {
            dfs(0, i, 1, M[0][i], M, dp, ans);
            dfs(y-1, i, 2, M[y-1][i], M, dp, ans);
        }   
        for (int i = 0; i < y; i++) {
            dfs(i, 0, 1, M[i][0], M, dp, ans);
            dfs(i, x-1, 2, M[i][x-1], M, dp, ans);
        }
        return ans;
    }
}
```
#leetcode 
#challenge
Here is the link for the Problem:
https://leetcode.com/problems/pacific-atlantic-water-flow/
MindMiner - Your ideas are the currency
Tags: blockchain, innovation, patents, competition
Published: 2022-08-31 04:16:57

MindMiner crowdsources solutions to the world's most pressing problems, autogenerates patent applications, and links newly created inventions to Idea NFTs. The solution creators are rewarded with IdeaCoins, a token that distributes royalties on the sales of Idea NFTs.

Put your mind to good use with MindMiner.

[https://www.mindminer.io](https://www.mindminer.io)
Meta Hacker Cup - Questions A, B1, C1
Tags: competitiveprogramming, algorithms, riddles
Published: 2022-08-31 03:40:38

Since the explanations on the official website are sufficiently clear, I will post only the code solutions without any conceptual origination.

## A: Second Hands

```
import sys

sys.stdin = open('second_hands_input.txt', 'r')
 
C = int(sys.stdin.readline())
res =[]
for i in range(C):
    arr = [int(x) for x in sys.stdin.readline().split()]
    N, T = arr[0], arr[1]
    S = [int(x) for x in sys.stdin.readline().split()]
    if N > (T*2):
        res.append(False)
        continue
    more_than_twice = False
    hist = {}
    for el in S:
       if el in hist:
           hist[el] += 1
       else:
           hist[el] = 1
       if hist[el] > 2:
           more_than_twice = True
           break
    res.append(not(more_than_twice))
    print(res)
sys.stdout = open('output.txt', 'w')
for i in range(C):
    if res[i]:
        sys.stdout.write(f'Case #{i+1}: YES')
        if i<C-1:
            sys.stdout.write('\n')
    else:
        sys.stdout.write(f'Case #{i+1}: NO')
        if i<C-1:
            sys.stdout.write('\n')
```

## B1: Second Friend

```
import sys
sys.stdin = open('second_friend_input.txt', 'r')
sys.stdout = open('output.txt', 'w')
N = int(sys.stdin.readline())
for n in range(N):
    sudo = [int(x) for x in sys .stdin.readline().split()]
    R, C = sudo[0], sudo[1]
    tree_present = False
    for r in range(R):
        arr = list(sys.stdin.readline())
        for c in range(C):
            if arr[c] == '^':
                tree_present = True
                break
    if tree_present:
        if (R<2) or (C<2):
            sys.stdout.write(f'Case #{n+1}: Impossible')
            sys.stdout.write('\n')
        else:
            sys.stdout.write(f'Case #{n+1}: Possible')
            for i in range(R):
                sys.stdout.write('\n')
                for i in range(C):
                    sys.stdout.write('^')
            sys.stdout.write('\n')
    
    else:
        sys.stdout.write(f'Case #{n+1}: Possible')
        for i in range(R):
                sys.stdout.write('\n')
                for i in range(C):
                    sys.stdout.write('.')
        sys.stdout.write('\n')
```

## C1: Second Meaning

```
import sys
sys.stdin = open('second_meaning_input.txt', 'r')
sys.stdout = open('output_final.txt', 'w')
T = int(sys.stdin.readline())
for t in range(T):
    res = []
    N = int(sys.stdin.readline())
    c = sys.stdin.readline()
    sys.stdout.write(f'Case #{t+1}:')
    sys.stdout.write('\n')
    first_code = c[0]
    if first_code == '.':
        for n in range(N-1):
            c = '-' + c
            sys.stdout.write(f'{c}')
    else:
        for n in range(N-1):
            c = '.' + c
            sys.stdout.write(f'{c}')
    
            
```

## Remarks
These were the questions I did for the qualification rounds. Will try to upload the other question solutions before the next round commences for practice sake.
How to Make Image Slider In React
Tags: react, javascript, beginners, webdev
Published: 2022-08-31 03:24:57

In this article, we will make an Image slider in react application. We will have some images here and also, we will add two buttons for next image and other for previous image. This is going to be a very easy and beginner-friendly project. We will also add some sort of animation using CSS as well here. So let’s make this step by step.
[Read more](https://reactjsguru.com/how-to-make-image-slider-in-react/)
Running Terraform via AWS Developer Tools — Complete CI/CD Guide
Tags: beginners, devops, terraform, aws
Published: 2022-08-31 03:05:48

I always try to learn multiple different tools & technologies so that I can connect them together to ideate something or to solve some challenges. I have been working on DevOps & Cloud for past 2 years & from my experience I can confidently say that most of the companies uses this kind of integration on daily basis. 🙌

What you will learn from this demonstration:
- Basic understanding of AWS Developer Tools.
- How to manage Terraform State file centrally.
- Working with AWS CodeCommit, CodeBuild & CodePipeline.
- More skills on Identity & Access Management.

Sounds interesting, then go ahead & bookmark this blog for future references because believe me, once you start your journey in DevOps & Cloud, these learnings will be the foundation. 😇

### Blog Link: https://link.medium.com/IVTczJGRUsb
About me
Published: 2022-08-31 02:55:19

Hello, I'm Aya. Let me share with you my journey to becoming a passionate web developer.

### **Discovering My Drive**
I've always been someone who sought genuine passion in what I do. For a long time, I drifted without a true calling, feeling moments of anxiety about the direction of my life. But when I stumbled upon programming, it felt like I'd finally found my place. It was a moment of realization – "This is it."

### **My First Brush with Coding**
While working as an office assistant in Japan, I was introduced to VBA for automating Excel tasks. The joy of streamlining processes and making tasks more efficient was palpable. What started as personal projects to automate my tasks ended up getting recognized at the highest levels, leading to a promotion and even an award for our department.

### **Diving Deeper into Web Development**
Despite my accomplishments with VBA, I knew there was more to explore. My love for logic-driven tasks, reminiscent of my fondness for mathematics, made programming a natural fit. As technology advanced, I was drawn to web development, envisioning the thrill of crafting my own websites and desiring to attain business-level English proficiency to expand my horizons.

### **Embracing Change: Moving to Canada**
Originally planning to study in Australia, the COVID-19 pandemic shifted my trajectory to Canada, where the co-op system offered the enticing blend of study and real-world internships. Recognizing the importance of experience in the IT sector, I saw this as an invaluable opportunity.

### **Building My Foundation**
Navigating the world of web development as a newcomer isn't without its challenges. While job postings often seek prior experience, I took the initiative. By offering to build a website for my friends' business, I am converting theoretical knowledge into practical skills, laying the groundwork for my career.

### **My Vision for the Future**
My goal is clear: to be a self-sufficient web developer, crafting complete websites from scratch. With just a laptop, internet, and a burst of creativity, I envision myself working from anywhere in the world. It might be a challenging journey, but with my passion and dedication, I am confident in my path.
Brick-Breaker Video Game
Tags: codepen, showdev, beginners, github
Published: 2022-08-31 02:36:42

<p>Brick Breaker Game. A classic high-paced game of brick-smashing action. Can you set the high score?!</p>

You can read all about the code on Github [right here](https://github.com/rembertdesigns/Brick-Breaker-Game).

{% codepen https://codepen.io/rembertdesigns/pen/GRxVogV %}

If you liked this latest CodePen post, follow me on [Twitter](https://twitter.com/RembertDesigns) where I post daily about Tech related things!

### 🌎 Let's Connect

- [Portfolio](https://www.rembertdesigns.co/)

- [Twitter](https://twitter.com/RembertDesigns)

- [LinkedIn](https://www.linkedin.com/in/rrembert/)

- [Hashnode](https://rembertdesigns.hashnode.dev/)

- [Devto](https://dev.to/rembertdesigns)

- [Medium](https://medium.com/@rembertdesigns)

- [Github](https://github.com/rembertdesigns)

- [Codepen](https://codepen.io/rembertdesigns)
Logical XOR Operators (^) for C#
Tags: csharp
Published: 2022-08-31 02:12:48

這篇想記錄一下關於 XOR 位元運算子

為什麼想紀錄呢？
有次在刷題時看到一個神奇的解法，非常優雅又快速，反觀自己的解法真的是基本到不行，從來沒想過可以利用 XOR，今天就給它一個版面好好的認識！

位元運算子有四種，分別為 `&`、`|`、`^`、`~`，其定義如下

| 運算子 | 定義 | 描述 |
|-|-|-|
| & | AND(且) | 當兩者為 true 時，結果為 true |
| &#x7c; | OR(或) | 當兩者其一為 true 時，結果為 true |
| ^ | XOR(互斥OR) | 當兩者皆為 true 或 false 時，結果為 true |
| ~ | NOT(非) | 反轉位元 |

上表在使用前會先轉換成位元（即二進位制）再進行運算

那麼 XOR 的特性是什麼呢？
當條件一與條件二成立時，會回傳 `false`

|條件 A| 條件 B|result|
|:-:|:-:|:-:|
|1|1|0|
|1|0|1|
|0|1|1|
|0|0|0|

不習慣看 0 1 的朋友，可以參考下表

|條件 A| 條件 B|result|
|:-:|:-:|:-:|
|true|true|false|
|true|false|true|
|false|true|true|
|false|false|false|

使用方式

```csharp
Console.WriteLine(1 ^ 1);    // output: False
Console.WriteLine(1 ^ 0);   // output: True
Console.WriteLine(0 ^ 1);   // output: True
Console.WriteLine(0 ^ 0);  // output: False

Console.WriteLine(true ^ true);    // output: False
Console.WriteLine(true ^ false);   // output: True
Console.WriteLine(false ^ true);   // output: True
Console.WriteLine(false ^ false);  // output: False
```

了解基本概念後，小試身手一下，假設有兩數分別為 2 和 3，使用 XOR 運算子會得到的結果是什麼？

一開始先將十進制的數字轉換成二進制
2 → 010
3 → 011

接著對相同位數進行運算

個位 → 0 ^ 1 = 1
十位 → 1 ^ 1 = 0
百位 → 0 ^ 0 = 0

最後得到 001 也就是十進位的 1，神奇吧！

總結從 XOR 看到的東西
- A ^ 0 永遠是 A
- A ^ A 永遠是 A

所以當一數字 XOR 自己，絕對是 0，當一堆數字進行 XOR 運算，得到的結果會是落單的數字，例如: A ^ B ^ C ^ A ^ B，結果會是落單 C，收工！

### Reference
[Boolean logical operators (C# reference)](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/boolean-logical-operators#logical-exclusive-or-operator-)

---

Thanks for reading the article :tulip: :sunflower: :blossom:

If you like it, please don't hesitate to click heart button :heart:
or follow my [GitHub](https://github.com/FakeStandard) :star:
or buy me a coffee :arrow_down: I'd appreciate it.

[![Buy-me-a-coffee][1]][2]

[1]: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h077sxd0vx1hix4t7lw8.png
[2]: https://www.buymeacoffee.com/FakeStandard
Rubio-Radio Currently Playing Song & Full-Text Search
Tags: ruby, desktop, gui, libui
Published: 2022-08-31 01:33:30

Another GitHub Pull Request for [Rubio-Radio](https://github.com/kojix2/rubio-radio) (open-source Internet radio app built with Ruby) got accepted and merged, which focused on displaying the currently playing song/program, loading all available radio stations (instead of a pre-defined limit), and enhanced full-text-search support including column-specific queries. The changes have been released in [rubio-radio gem version 0.0.6](https://rubygems.org/gems/rubio-radio/versions/0.0.6). In fact, the enhanced full-text-search support is included in the latest version of [Glimmer DSL for LibUI](https://github.com/AndyObtiva/glimmer-dsl-libui) (Ruby Desktop Development GUI Library used to build [Rubio-Radio](https://github.com/kojix2/rubio-radio)) as part of the [`refined_table` custom control](https://github.com/AndyObtiva/glimmer-dsl-libui#refined-table) for use in any projects, so software engineers get that feature for free now.

## Rubio-Radio Screenshot showing currently playing song.

![mac screenshot](https://raw.githubusercontent.com/kojix2/rubio-radio/main/screenshots/rubio-radio-mac.png)

Ruby Gem:

```ruby
gem install rubio-radio
```

## Usage

Run with this command:

```
rubio
```

All Radio Browser stations are displayed by default. But, you can customize the count with --count COUNT (note that currently, there are only about 33,000 Radio Browser stations total). Setting the count to -1 will fetch all stations.

## Filtering

The filter field does AND-based filtering when you enter multiple words separated by spaces:

`jazz smooth`

Also, the filter field supports exact term filtering if you enter multiple words surrounded by double-quotes.

`"bossa nova"`

Last but not least, the filter field supports column-specific queries by including a full column name or the first few letters, followed by colon (:), followed by a single word or double-quoted multiple words for exact term matching against the column:

`name:talk language:eng`

or just:

`n:talk l:eng`

![advanced filtering mac screenshot](https://raw.githubusercontent.com/kojix2/rubio-radio/main/screenshots/rubio-radio-mac-example-advanced-filtering.png)

This advanced example matches the word FM against the name column, and language bahasa indonesia against the language column.

`n:FM l:"bahasa indonesia"`

Finally, you can mix different types of filters:

`brasil "bossa jazz" l:brazilian l:portuguese`

That's all folks!