teleren/devto huggingface dataset:
A KeyDB Operator for Kubernetes
Tags: kubernetes, keydb, redis, krestomatio
Published: 2022-01-23 05:53:46

[KeyDB](https://keydb.dev/) is a multithreading, drop-in alternative to Redis. The [Keydb-operator](https://github.com/krestomatio/keydb-operator) can easily create either a standalone instance (1 replica) or a multimaster setup (3 replicas) of the [KeyDB in-memory database](https://github.com/EQ-Alpha/KeyDB). When KeyDB is in [multimaster mode](https://docs.keydb.dev/docs/multi-master/), it is possible to have more than one master, allowing for read/write operations across all of them. This capability enhances high availability and fault tolerance.

>This operator is part of the Kubernetes operators and tools developed by [Krestomatio, a managed service for Moodle™ instances](https://krestomatio.com)

## Install

> The Kubernetes Operator in this project is in **Alpha** version. **Use at your own risk**

Check out the [sample CR](config/samples/keydb_v1alpha1_keydb.yaml). Follow the next steps to first install the KeyDB Operatorn and then a KeyDB instance:
```bash
# install the operator
make deploy

# create KeyDB instance from sample
kubectl apply -f config/samples/keydb_v1alpha1_keydb.yaml

# follow/check KeyDB operator logs
kubectl -n keydb-operator-system logs -l control-plane=controller-manager -c manager  -f

# follow sample CR status
kubectl get keydb keydb-sample -o yaml -w
```

## Uninstall
Follow the next steps to uninstall it.
```bash
# delete the KeyDB object
# CAUTION with data loss
kubectl delete -f config/samples/keydb_v1alpha1_keydb.yaml

# uninstall the operator
make undeploy
```

### Advanced Options
For different or advanced configuration via the CR spec, take a look at the [variables available](https://github.com/krestomatio/ansible-collection-k8s/blob/master/roles/v1alpha1/database/keydb/defaults/main/keydb.yml)

## Want to contribute?
* Use github issues to report bugs, send enhancement, new feature requests and questions

## [About Krestomatio](https://krestomatio.com/about)
[Krestomatio is a managed service for Moodle™ e-learning platforms](https://krestomatio.com/). It allows you to have open-source instances managed by a service optimized for Moodle™, complete with an additional plugin pack and customization options.
Vue is awesome but...
Published: 2022-01-23 05:13:23

To start of on a positive note, I really like what I've learned about Vue in version 2.x of the docs. Vue seems very powerful and useful, which is good because I'm trying to develop a website locally using Laravel, Vue, and MySql. However, I have found the installation and setup of Vue to actually be the hardest part. I'm trying to use Webpack, and for the life of me I can't seem to get Vue to actually work on the blade.php file. I was thinking that version 2.x of the docs did a much better and thorough job of explaining the installation of Vue. If I can't figure it out soon, I'll be forced to use the CDN method. I took a technical communication class at my university years ago and it taught me to always consider my audience. All that being said, Vue is great. I just wish I could get a better view.
Rearrange a string
Tags: cpp
Published: 2022-01-23 05:12:42

## Solution

```
 #include<bits/stdc++.h>
using namespace std;
int main()
{
    string str="ACCBA10D2EW30";
    int sum=0;
     vector<int>f(26,0);
    for(int i=0;i<str.size();i++)
    {
        if(str[i]>='0'&&str[i]<='9')
        sum+=str[i]-'0';
        else
        f[str[i]-'A']++;

    }
    //cout<<str[3]-'A';
   string ans;
   
    for(int i=0;i<26;i++)
    {
             while(f[i]>0)
             {
                 ans+=i+'A';
                 f[i]--;
             }
    }
    ans+=to_string(sum);
    cout<<ans;
    return 0;
}
```
Simple JavaScript + HTML Calculator
Tags: javascript, beginners, html, simple
Published: 2022-01-23 04:56:12

Hi ,this calculator project is a basic and simple project. In this project we are focusing more on javascript and html. In this project we will use the "eval()" function, which make it easy to do the problems. So let's jump to the tutorial.

BUY ME A COFFEE - https://bit.ly/3FN8thW

## REQUIREMENTS:

- Any, text editor(which is capable of saving a file with **.html** extenstion).

## STEPS:
- Open the text editor.

- Follow the below codes

```
<html>
<head>

   <title>My Calculator</title>
	
   <!--i haven't focused on css , you can improve it-->
   <style>
      input .ans
      {
      height:"90";
      width:"400";
      }
   </style>
</head>
    
   <body>
	   <!--buttons-->
      <h1 style="font-family:Verdana">My Calculator</h1>
      <input type='text'  id="ans">
      <br>
      <br>
      <input type='button' value='1'style="width:75px;" onclick='dis(1)'> 
      <input type='button' value='2'style="width:75px;"onclick='dis(2)'>
      <input type='button' value='3'style="width:75px;"onclick='dis(3)'>
      <input type='button' value='/'style="width:75px;"onclick='dis("/")'>
      <br>
      <br>
      <input type='button' value='4'style="width:75px;"onclick='dis(4)'>
      <input type='button' value='5'style="width:75px;"onclick='dis(5)'>
      <input type='button' value='6'style="width:75px;"onclick='dis(6)'>
      <input type='button' value='*'style="width:75px;"onclick='dis("*")'>
      <br>
      <br>
      <input type='button' value='7'style="width:75px;"onclick='dis(7)'>
      <input type='button' value='8'style="width:75px;"onclick='dis(8)'>
      <input type='button' value='9'style="width:75px;"onclick='dis(9)'>
      <input type='button' value='-'style="width:75px;"onclick='dis("-")'>
      <br>
      <br>
      <input type='button' value='0'style="width:75px;"onclick='dis(0)'>
      <input type='button' value='+'style="width:75px;"onclick='dis("+")'>
      <input type='button' value='='style="width:155px;"onclick='solve()'>
      <br>
      <br>
      <input type='button' value='CLEAR'style="width:310px;"onclick='clr()'>
		
		<!--Javascript-->
	<script>
      function dis(val)
      {
      document.getElementById("ans").value+=val
      }
      function solve()
      {
      let x =  document.getElementById("ans").value
      let y = eval(x)
      document.getElementById("ans").value =y
      }
      function clr()
      {
      document.getElementById("ans").value =""
      }
   </script>
</body>
</html>
```
Ajouter une licence à son projet GitHub 🇫🇷
Tags: githunt, french, licence, opensource
Published: 2022-01-23 04:44:16

Dans cette vidéo, nous allons voir comment ajouter facilement une licence à son projet open-source sur GitHub 🎉

⚖️ Bon visionnage sur l'ajout d'une licence pour un projet open-source avec GitHub ! 🤗

{% youtube fAHtYCBNgSU %}


---

🏁 Mon cours Udemy sur la création d'une application en PHP 8.1 depuis zéro. On fait tout cela sans framework pour bien maîtriser les bases du langage PHP 👉  https://www.udemy.com/course/create-real-world-php-webapp-from-scratch/
Creating your own snippet in VS Code within 1 minute
Tags: vscode, tutorial, cpp
Published: 2022-01-23 04:25:29

You write the same basic boiler plate code every-time you create a new file and wish if I could use some snippet to write those. So in this short article, I'll tell you how you can create your own snippet in VS Code within 1 minute, which will save your lot of time and effort. For the purpose of demo I'll show how you can create code snippet for `C++`.

## Step 1: Open your VS Code and click on the settings button in the bottom-left corner.

![Arrow pointing towards setting icon in vs code](https://cdn.hashnode.com/res/hashnode/image/upload/v1642703084597/voHr6wZvG.png)

## Step 2: Now click on `User Snippets`.

![Click on User Snippets option](https://cdn.hashnode.com/res/hashnode/image/upload/v1642703344330/owbJxQBaz.png)

## Step 3: You’ll now see a dropdown at the top for a list of various files in JSON format. Now search for `C++` or you can create of your own,

![Screenshot (52).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1642703430063/SKumt758T.png)

## Step 4: Delete everything for the file and write the following:
```
"cpp snippet": {
		"prefix": "cpp",
		"body": [
			"#include<iostream>",
            "using namespace std;",
            "int main(){",
			"    $0", //$0 for where you want your cursor to be
            "    return 0;",
            "}"
		],
		"description": "to produce the short snippet for cpp"
	}
```
Your final code should look like this:

![final code snippet should look like this](https://cdn.hashnode.com/res/hashnode/image/upload/v1642703673191/BeHJessgW.png)

Now save this file. 
Create a new C++ file and write `cpp`, you will have like this on your screen and press enter:

![Example of using code snippet](https://cdn.hashnode.com/res/hashnode/image/upload/v1642703831184/-4phTiOd7.png)

Here,
- `prefix` defines how you want to call your code snippet.
- `body` defines what should be the content of code.
- `description` gives a short bio about the snippet

Kudos, you have finally created your own code snippet.

_If you have come this far, hope you like my article._
_You can connect with me on [My LinkedIn Account](https://www.linkedin.com/in/ashutoshdash1999/) or follow me on [Twitter](https://twitter.com/ashutoshdash99) or send me mail on [dashashutosh1999@gmail.com](mailto:dashashutosh1999@gmail.com)._
Hutang teman dan Rekening Bersama melalui transaksi antar bank dan antar dompet digital
Tags: magangkomatiksrd
Published: 2022-01-23 04:22:56

Akhir-akhir ini kemajuan uang digital begitu pesat yang ditandai dengan meningkatnya pengguna dompet digital dan mobile banking. Hal ini disebabkan banyaknya aplikasi/penggunaan dari dompet digital maupun mobile banking itu sendiri seperti pembayaran secara online maupun semi-offline seperti QRIS. Akan tetapi, kita sering kali mengalami masalah ketika melakukan pembayaran, terkadang kita harus menunda pembayaran karena saldo kita tidak mencukupi. Salah satu langkah yang sering kita lakukan adalah menghubungi teman atau kerabat terdekat kita untuk mengirimkan sejumlah uang.

Namun, kita juga sering menemukan kondisi ketika dompet digital kita berbeda dengan orang lain sehingga kita harus melakukan konversi dari satu dompet ke dompet lain melewati sistem perbankan. Apabila jumlah uang yang kita kirimkan hanya dibawah 5000 rupiah, tentu saja hal ini sangat dilematis karena biaya transfernya tidak sebanding dengan uang yang kita kirimkan. Selain itu, apabila kita meminjam orang lain tentu saja orang tersebut belum tentu memberikan kepercayaan kepada kita.

Selain itu, kita juga sering mengalami masalah ketika melakukan transaksi online dengan orang lain seperti ketika membeli akun game, jasa ketik, dan sebagainya. Kita tidak bisa langsung saja untuk mengirimkan uang ke orang lain. Kita harus mengecek barangnya terlebih dahulu/ menerima terlebih dahulu baru mengirimkan. Kita membutuhkan aplikasi yang bisa memberikan kita rasa aman dan kenyamanan dalam bertransaksi secara digital.
Difference between HTML and React event handling
Tags: html, react, beginners, programming
Published: 2022-01-23 04:20:37

In terms of syntax and standards, HTML and React handle events differently because React is built on the notion of a virtual DOM, whereas HTML always has access to the Real DOM.

### The following are the significant distinctions we will discuss:

* In HTML, event names are written in lowercase, however in React, they are written in camelCase.


* In HTML, we may avoid default behavior by returning `false`, but in React, we must call `preventDefault()` explicitly


* In HTML, the function is called by inserting "()" to the function name. If we don't want to utilize this way, we may use addEventLisener to provide events and listeners, however in React, we require the method name without the "()" appended.

##### 1) In HTML, event names are written in lowercase,
Let us take a example where we would like to invoke click event on the button:


`<button onclick='handleEvent()'>
`

##### however in React, they are written in camelCase.
 
`<button onClick={handleEvent}>
`

#### 2) In HTML, we may avoid default behavior by returning `false`, but in React, we must call `preventDefault()` explicitly

Let's start by making a simple form and giving the input text a name. After submitting the form, we must call the 'onsubmit' event, and the form must not be refreshed.

##### HTML Example
```
<form onsubmit="console.log('You clicked submit.'); return false">
   <input  type="text" name="name" />
   <button type="submit">Submit</button>
</form>

```

##### React Example

```
function Form() {
  function handleSubmit(e) {
    e.preventDefault();
    console.log('You clicked submit.');
  }
 return (
   <form onsubmit="{handleSubmit}">
    <input  type="text" name="name" />
    <button type="submit">Submit</button>
   </form>
  );
}
```

#### 3) In HTML, the function is called by inserting "()" to the function name. If we don't want to utilize this way, we may use addEventLisener to provide events and listeners, however in React, we require the method name without the "()" appended

##### HTML Example

```
 <button onclick='activateLasers()'>
```


##### React Example

```
<button onClick={activateLasers}>
```
Fix Unexpected Signal During Runtime Execution Go 1.17
Tags: go, tutorial
Published: 2022-01-23 04:20:11

Recently, when I ran Go code with version 1.17 on macOS Big Sur 11.6, I got this fatal error response 🥴

```go
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff204acc9e]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff204acc9e
stack: frame={sp:0x7ffeefbff578, fp:0x7ffeefbff5c8} stack=[0x7ffeefb80618,0x7ffeefbff680)
0x00007ffeefbff478:  0x01007ffeefbff498  0x0000000000000004
0x00007ffeefbff488:  0x000000000000001f  0x00007fff204acc9e
0x00007ffeefbff498:  0x0b01dfacedebac1e  0x0000000000000001
0x00007ffeefbff4a8:  0x00000000040362f1 <runtime.throw+0x0000000000000071>  0x00007ffeefbff548
0x00007ffeefbff4b8:  0x00000000049112ab  0x00007ffeefbff500
0x00007ffeefbff4c8:  0x00000000040365a8 <runtime.fatalthrow.func1+0x0000000000000048>  0x0000000004f41400
........
exit status 2
// https://gist.github.com/milhamh95/ff194322cecd6ba56573b2eddaecf13a
```

When I searched through the stack trace, I completely didn’t understand what is the error and the solution 😐. 

Luckily, I found the same issue at Go Github issues.

{% github https://github.com/golang/go/issues/46763 %}

{% github https://github.com/golang/go/issues/45702#issuecomment-834687019 %}

Based on those Github issues, to fix `unexpected signal during runtime execution` I need to update Go Sys package to the latest version in every my Go repo project.

```go
go get golang.org/x/sys@master
```

![Go Sys Package](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qih09dns95ead30xxqro.png)

After updating Golang Sys package, I can ran my code without any issues 👍.
5 Best Python Libraries to Build Applications in 2022
Published: 2022-01-23 04:14:27


Hello everyone here in this article we are going to rank the 5 best Python libraries for creating Desktop applications.

The ranking will be based on the library's popularity as well as its community at large, so let's get started.


## 5 - Kivy
Kivy is an open-source, cross-platform Python library designed for rapid development of applications with complex user interfaces such as multi-touch applications. Kivy runs on Linux, Windows, OS X, Android, iOS, and Raspberry Pi, and you can run the same code on all these platforms.

**Advantages
**
Open Source
MIT License Built-in
Widgets
Cross-platform 
Limitations

Not pre-installed with Python
Unstable
Hard to understand
weak community

## 4 - PySimpleGUI

PySimpleGUI was createHello everyone here in this article we are going to rank the 5 best Python libraries for creating Desktop applications.

The ranking will be based on the library's popularity as well as its community at large, so let's get started.


you can see the full tutorial here:
[5 Best Python Libraries to Build Applications in 2022](https://www.usingpy.com/2022/01/5-best-python-libraries-to-build.html)
90-Day Plan For A New CTO
Tags: leadership, career
Published: 2022-01-23 00:45:34

---
title: 90-Day Plan For A New CTO
published: true
date: 23/01/2022 00:45:34 UTC
tags: leadership, career
canonical_url: https://eisabainyo.net/weblog/2022/01/24/90-day-plan-for-a-new-cto/
---


### Failing to plan is planning to fail, especially when starting a senior tech leadership role in a remote environment

Starting a senior tech leadership role in a remote environment comes with a new set of challenges, one of them is showing visibility and progress of your contribution.

However, you won't get much done in the first few days apart from introductions and getting to know people. At the same time, you don't want to be in a situation where casual chats and intros take up all your time and before you know it, a quarter or 3 months had passed and there was nothing to show for it. So let me share with you what a new [CTO](https://gum.co/ctotoolkit) should aim to accomplish in the first quarter (ie: 3 months, 90 days).

#### Day 1 - Day 15
* Get to know your peers, direct reports, and leadership
* Listen more than talk
* Use the company's product and play around with its features

#### Day 15 - Day 30
* Learn more about current projects and follow updates
* Learn about the technical architecture and tech stacks
* Understand how the current projects contribute to the organisation's success
* Observe current systems, processes, ways of working, and people and identify strengths and opportunities for improvement

#### Day 30 - Day 60
* Form your own opinion around how things work
* Monitor progress of engineering excellence* via essential metrics such as uptime, response time, error vs success rate, number of incidents, etc
* Put together a 6 month and a year plan, starting with outcomes
* Talk to customers and end-users

### Day 60 - Day 90
* Share your plan with leadership and key individuals in the organisation
* Make small changes^ that are aligned with the future direction, eg: introducing code review process, implementing structured hiring approach
* (^You may check out [CTO Toolkit](https://gum.co/ctotoolkit) for sample dashboards, best practices, and templates.)
* Do the first of many quarterly reviews with your direct reports and share your observation about them

Lastly, remember when you're starting a new role that it's not a marathon but a sprint. You want to make sustainable changes that will enable your engineering organisation to scale effectively.

You can download this free checklist that contains the above information in a Google Sheet where you can customise with your own start date and tick interactive checkboxes to keep track of your own progress, [The 90-Day Plan For A New CTO](https://docs.google.com/spreadsheets/d/1ZRm03qtYxCSZpKfXCqEMf86b3tVGJugcRrhEEXSsiW4/edit).

[![90-Day CTO Checklist](https://eisabainyo.net/weblog/wp-content/uploads/2022/01/90dayctochecklist.png)](https://docs.google.com/spreadsheets/d/1ZRm03qtYxCSZpKfXCqEMf86b3tVGJugcRrhEEXSsiW4/edit)
_The 90-Day Plan For A New CTO_
Tic-Tac-Toe Terminal
Tags: beginners, python, programming, codenewbie
Published: 2022-01-23 03:22:06



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9rumuyt641qmnz35vsu4.png)

This project was part of the Codecademy computer science program and was the final project for the first course within the program. Previously I had developed terminal games for Coin Flipping, Dice Guessing, and Battleship and those experiences helped in deciding the way the game would flow as well as what classes and objects I would need to build each piece of the game. For those interested, the code for the game can be found on my repository on GitHub at https://github.com/Dwayne-Lacey/Python-Projects
Uma breve visão geral sobre Qualidade de Software.

Tags: discuss
Published: 2022-01-23 00:06:29

Olá caro viajante, 

a qualidade pode receber diversas definições dependendo do âmbito em qual ela é submetida. Sendo assim, desta maneira podemos adquirir diferentes esclarecimentos. Podemos observar a qualidade de um software durante todo processo de produção do software, avaliando a qualidade de cada subproduto que compõem a totalidade do software, pois estas "sub qualidades" podem afetar a qualidade do próximo subproduto e até a qualidade total do software. Desta maneira temos que 

Quando observamos a literatura, temos alguns autores, como Peters, que diz que a  qualidade de software é avaliada em termos de atributos de alto nível chamados fatores, que são medidos em relação a atributos de baixo nível chamados de critérios.
Enquanto Pressman, diz que qualidade de software é a conformidade a requisitos funcionais e de desempenho que foram explicitamente declarados, a padrões de desenvolvimento claramente documentados, e a características implícitas que são esperadas de todo software desenvolvido por profissionais.

Apesar de possuirmos várias definições, podemos observar aspectos que se tornam enfáticos. Primeiramente, os requisitos de software são a base, a falta de conformidade de pode ser considerada a falta de qualidade. Segundo, padrões bem especificados definem um conjunto de critérios de desenvolvimento pelo que o software passa pelo trabalho de engenharia. E por fim, sempre irão existir requisitos que não são explícitos, como por exemplo a integrada ao acessar o sistema.  Com este padrões tentamos manter a garantia e o controle da qualidade.
I Make a Dashboard for Our Game Studio Load Faster than a Portfolio Website
Tags: story, javascript, beginners, programming
Published: 2022-01-23 02:56:18

Yes. This is real. I have compare our users' dashboard with a [portfolio website](https://github.com/mmgolden/express-portfolio) and our website is 40% faster. Here's a small lighthouse test that I perform: 

![Portfolio website by Melinda Golden](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fdz8uv76cssi6ipd8n5k.png)

![Our users dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bm2by33ttivvs38fa6by.png)

> Small note: Both tests are run in localhost.
  
So, let me share how we do this.

## 1. Using fewer resources.
Of course, we all know this. To load faster, you need to use fewer resources. But, this is not easy as said, especially if you using some library or framework that embeds you a lot of unused CSS or Javascript.

To make this UI, I'm using modified [Pasta CSS](https://github.com/manushifva/pasta-css)*, Bootstrap-like lightweight library. 

I also use customized icons from [fontello.com](https://fontello.com). So, I can pick what icons I would use, without embedding a whole of them.

Don't forget about Javascript. We using a minified version of JQuery. JQuery makes my code slimmer. It's also helped me code faster, since it has the build-in function for some tasks, like toggling something, finding the nearest element, etc.

## 2. Using pre-rendered content.
Rather than render the page content after loading the page, I'm using this pre-rendered content. 

![Pre-rendered area](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/odh0pgdfag61080pw6jc.png)

At first, I render the main Html file. Then, I render the pre-rendered content. I'm also using [Swup.js](swup.js.org) for swapping pages smoothly. Swup also helps us render fewer things.

## 3. Using Koa.
Koa.js is one of the most popular Node.js server libraries. Koa was developed by developers who develop Express. Koa is faster than Express, since it developed to be more modular rather than embedding. 

## 4. Using fewer images and using lazy load.
These are the final tips. Images are hard and slow to load, especially the larger ones. Using lazy load can help the web render faster, because the lazy load pending the load process of images, and load it after the whole page is successfully loaded. 

That's it. Hopefully, this can help you with speeding up your website too ⚡.

Disclaimer:
* Pasta CSS was made by me.