teleren/devto huggingface dataset:
Hello,I need help
Tags: beginners, javascript, tutorial
Published: 2021-09-07 06:59:53

Hello, Good morning my name is Taofeeq Olatigbe am from Ondo state nigeria ,I want to be a programmer, but I have beengoing about it for some time now but I can't seem to get it all .I need  someone to put me through and recommendations of how to go about things.
Hello,I need help
Tags: beginners, javascript, tutorial
Published: 2021-09-07 06:58:58

Hello, Good morning my name is Taofeeq Olatigbe am from Ondo state nigeria ,I want to be a programmer, but I have beengoing about it for some time now but I can't seem to get it all .I need  someone to put me through and recommendations of how to go about things. Thanks
Removing Whitespace From Strings in JavaScript
Tags: javascript
Published: 2021-09-07 06:51:10

With a bit of help from JavaScript's [built-in RegEx features](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), this one-liner will remove *all* the whitespace from a given string:

```js
const string = `This is an example string.`;

string.replace(/\s/g, ``);
```

## Removing just the space character

If you just want to remove the space *character* and not all whitespace, this snippet will do the trick:

```js
const string = `This is an example string.`;

string.replace(/ /g, ``);
```

Keep in mind, it won't remove consecutive spaces or tabs.

For example, `"Example string"` will become `"Examplestring"`.

However, `"Example  string"` (with two spaces) will become `"Example string"` (with one space).

## Trimming trailing whitespace

If you just want to remove the trailing whitespace at the beginning and end of a string (if any), the `trim()` function is what you're looking for:

```js
const string = ` Test `;

const trimmedString = string.trim();
```

In this example, `" Test "` will become `"Test"`.

## Conclusion

There's even more ways you can go about doing this, but I personally prefer the RegEx-based solutions.

Thanks for reading, and I hope this helped you!
Rails active support instrumentation
Published: 2021-09-07 06:32:09

Today I am gonna have a brief introduction about active support instrumentation. We will start from what it really is and how to use it.

Instrumentation provide __a HOOK__ when certain events happen inside rails. Moreover, You can publish your own custom event if you want :)

## How it works

It's really easy. All you need to do it listen to event that rails publish.

Below is the activity logs feature that I implement in my current project

1. I subscribe to `process_action.action_controller` (rails specific event)

2. I capture some information and pass to sidekiq's worker to perform some task

```ruby
# config/initializers/my_event.rb

ActiveSupport::Notifications.subscribe "process_action.action_controller" do |name, started, finished, unique_id, data|
  args = data.slice(:controller, :action, :format, :method, :path, :status)
  args[:payload] = data[:params].except(:action, :controller)
  ActivityLogsWorker.perform_async args
end
```
Notice that
**data** is a hash with the following keys
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lihtwi17wbp6nlyuhqg3.png)
 
It's simple as that.
for more detail read more on [rails official website](https://guides.rubyonrails.org/active_support_instrumentation.html)
Intro To DevOps🔁
Tags: devops, sharingknowledge, basics
Published: 2021-09-07 06:15:07

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

**What is DevOps?**

➡️ DevOps [Development + Operations(IT Operations)] is the combination of practices and tools designed to increase an organization's ability to deliver applications and services faster than traditional software development processes.

**The 7 key practices of DevOps are :**
1. Configuration Management.
2. Continuous Integration.
3. Automated Testing.
4. Infrastructure as Code.
5. Continuous Delivery.
6. Continuous Deployment.
7. Continuous Monitoring.

In DevOps multiple tools are used few of them are:
1. **Git** - For Version control system
2. **React/Flask/Django or any other webframework or techsta k** - For building web app
3. **Docker** - For Containerizing , Building image, deployment.
4. **Kubernetes** - For Management of containers.
5. **GitHub/Gitlab** - For CI/CD(Continuous Integration/Continuous Deployment)


Hello everyone,
I m currently exploring DevOps more if you have resources or something to talk about tools(since there are multiple tools do to the same task) in DevOps. Feel free to express yourself in comments below.
MPPSC Notes
Published: 2021-09-07 06:11:07

https://www.sharmaacademy.com/mppsc-notes.php
Sharma Academy is Central Indias largest provider of Mppsc Notes and Mppsc Study Material. You will get updated MPPSC Notes as per the latest syllabus of state level psc exam in Hindi and English medium both. Students can read  free mppsc notes for their exam preparation they can also download notes from our website. We have Completely Organized, Well Researched, Qualitative  Mppsc Notes. We also provide Sharma Academy Book Reader App with our MPPSC Study notes package.
HTML tags | kbd
Tags: html, tags, kbd
Published: 2021-09-07 06:01:16

It is used to **represent the input of text by the user through a keyboard, by voice or using any other similar device**.

It can be used in combination with the `<samp>` tag to represent various forms of text input and output:

* Nest a `<kbd>` inside another `<kbd>`
```
<p>You can also create a new document using the keyboard shortcut <kbd><kbd>Ctrl</kbd> + <kbd>N</kbd></kbd>.</p>
```
* Nest a `<kbd>` inside a `<samp>`
```
<p>If a syntax error occurs, the tool will output the initial command you typed for your review:</p>
<blockquote>
  <samp><kbd>custom-git ad my-new-file.cpp</kbd></samp>
</blockquote>
```

* Nest a `<samp>` inside a `<kbd>`
```
<p>To create a new file, choose the menu option <kbd><kbd><samp>File</samp></kbd>⇒<kbd><samp>New Document</samp></kbd></kbd></p>
<p>Don't forget to click the <kbd><samp>OK</samp></kbd> button to confirm once you've entered the name of the new file.</p>
```

Normally browsers render them using their default monospaced font, although you can customize the style using CSS.

- Type: *inline*
- Self-closing: *No*
- Semantic value: *No*

[Definition and example](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd) | [Support](https://caniuse.com/mdn-html_elements_kbd)
Battery and CPU utilization testing for Android
Published: 2021-09-07 05:38:12

Everyday many applications are launched and everyone is using applications like shopping, games, utilities. People are using apps that are not compatible with their devices so it is important to measure the battery utilization of the application while testing it. When you get worried about more battery consumption, it’s fair to find out what is causing the drainage of the battery. So we always have to test the battery consumption when we develop the application.

CPU consumption of apps also plays a vital role in the performance of the application. If an application consumes more CPU then it degrades the performance of the phone while using the app. More the CPU consumed by the application the more the battery is consumed. CPU consumption simply tells you how much memory is used by your application.
How to be a Hacker ?
Tags: hacker, hacktivism, hacking, hackers
Published: 2021-09-07 04:47:00

You may have seen or read about them, they are in the movies, in the series, in the news. However, even today many people do not know what "hacker" means.
"Hacker" doesn't mean being someone in a dark room transferring millions of dollars in bitcoins to your wallet, stealing some passwords and taking down government websites. "Hacker" is something very different from that.
It takes a brilliant mind to become one and keep this title, if you like solving problems in front of a computer, maybe you are a hacker. They are on a constant learning curve. They can install DOOM on a calculator, create new devices and help others who are on this path. Before calling someone a hacker make sure they are not a lammer.
Bitcoin - Why You Should Buy it?
Tags: bitcoin, cryptocurrency, investment
Published: 2021-09-07 05:11:03

Bitcoin was sold for $50 - 1000 Bitcoins & no-body was ready to buy it. And what you see today is the disappointment in the hearts of millions. If you have invested $100 in bitcoin in 2007, right now you will be filthy rich. 1 Bitcoin = $50,000 USD in Sept 2021. Insane - Isn't it?
10 Free Online Resume Builders for professional career
Tags: resume, requestforpost, portfolio, career
Published: 2021-09-07 05:08:14

When it comes to building a resume, I believe less is more. Content is way more important than the template. So whenever I face rejection, I would rather spend my time and energy building new projects, researching, or finding part-time jobs to polish my skills than focus too much on resume aesthetics. Here are some resume builders you can use to build your resume in no time.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e997aptg31gzdrebrydx.png)

TL;DR:
*MS Word*
*Canva*
*Resumake.io*
*Novoresume*
*Resume-now*
*Resume Genius*
*MyPerfectResume*
*Zety (free resources only)*
*VisualCV*
*Indeed.com*
Como se tornar um Hacker?
Tags: hacker, hackers, hacktivism, hacking
Published: 2021-09-07 04:48:19

Você já deve ter visto ou lido sobre eles, eles estão nos filmes, nas séries, no noticiário. Porém, ainda nos dias atuais muitas pessoas não sabem o que "hacker" significa. 
"Hacker" não significa ser alguém em um quarto escuro transferindo milhões de dólares em bitcoins para a sua carteira, roubando algumas senhas e derrubando sites do governo. Ser hacker é algo muito diferente disso. 
É preciso ter uma mente brilhante para se tornar um e manter este título, se você gosta de resolver problemas em frente a um computador, talvez você seja um hacker. Eles estão em uma constante de aprendizado. Conseguem instalar DOOM em uma calculadora, criar novos dispositivos e ajudar outros que estão a seguir neste caminho. Antes de chamar alguém de hacker verifique se antes ele não é um lammer.
sql vs. nosql
Tags: sql, database, dbms
Published: 2021-09-07 04:20:06

two types sql and no-sql
## SQL
SQL or Structured Query Language is pronounced as “S-Q-L” or sometimes as “see-quel” is a standard language to access and manipulate Relational Databases.
Common and Popular Examples of Relational Databases which use SQL are —

* MySQL

* Oracle

* SQLite

* Postgres

* MS-SQL

## No-SQL
As the name suggests NoSQL is “not” SQL, in other words, it is a non-relational database and is unstructured. Due to its unstructured nature, it is sometimes called as UnQL

Common and Popular Examples of NoSQL Databases are —

* Mongo DB

* BigTable

* Cassandra

* Hbase

* Redis
Working with ng-content on Storybook
Tags: storybook, angular, ngcontent, template
Published: 2021-09-07 04:08:42

Very often when creating a new story for an Angular component on [Storybook](https://storybook.js.org/) you might need to insert content into components which have an `ng-content` area inside them.

To do that you need to create a `template` for your story.

Here is a simple component, which has a `div` with and an `ng-content` area inside it. The component has two inputs, `width` and `height`.

```typescript
// paper.component.ts
import { Component, Input } from '@angular/core';

@Component({
  selector: 'cx-paper',
  template: `
    <div class="paper" [ngStyle]="{ width: width, height: height }">
      <ng-content></ng-content>
    </div>
  `,
  styles: [
    `
      .paper {
        border: navy solid 2px;
        padding: 10px;
      }
    `,
  ],
})
export class PaperComponent {
  @Input()
  width: string;

  @Input()
  height: string;
}
```
### The story for this component
```typescript
// paper.stories.ts
import { Story, Meta } from '@storybook/angular';
import { PaperComponent } from './paper.component';

export default {
  title: 'Example/Paper',
  component: PaperComponent,
} as Meta;

const Template: Story<PaperComponent> = (args: PaperComponent) => ({
  props: args,
  template: `
  <cx-paper [height]="height" [width]="width">
  This is a template test.
  </cx-paper>`,
});

export const SimpleExample = Template.bind({});

SimpleExample.args = {
  height: '50px',
  width: '300px',
} as Partial<PaperComponent>;
```
Which should render like this:
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hj1by9299u7y5yud7mc2.png)
Machine Learning Models
Tags: machinelearning, ai, datascience
Published: 2021-09-07 03:57:29

## Types of Machine learning Problems
Machine learning Problems can be classified as:
   1.Supervised Machine learning
   2.Unsupervised Machine learning
   3.Reinforcement Learning.
Based on this,lets dive deep into each of them.
# Supervised
In simple terms this is a type of machine learning where ml models learns from labelled data. There are two types of supervised machine learning.namely: Regression problems and Classification problems.we shall look more into this in our next post.stay tuned.
#Unsupervised
This is a type of machine learning which learns from unlabeled data i.e no target variable.  Examples are clustering algorithms.
#Reinforcement Learning
This is where the agent learns from the environment.An example is a Robot,Self driving cars like TESLA among others.
Cheers happy learning everyone!!Keep checking for more interesting and Educative posts 😊🥳.
Oh-my-Powershell
Tags: powershell, zsh, terminal, french
Published: 2021-09-07 02:54:30

Bienvenue dans un nouvel article, cette fois dédié à Powershell.
Étant Développeur avec le system Windows, la majorité de temps quand nous travaillons avec WSL ou directement dans un environnement Linux, nous utilisons zsh pour donner de plus personnalité au terminal, cependant, quand nous retournons à notre environnement Windows, nous n'avons pas ces styles et couleurs dans notre Terminal.

Heureusement, j'ai trouvé en recherchant un solution pour windows, ainsi j'ai trouvé **[Oh-My-Posh](https://ohmyposh.dev/)** .
Ce script permet de donner un peu plus de personnalisation à la terminal Powershell, similaire au zsh.

Pour y installer, nous devons avoir installé [Powershell](https://github.com/PowerShell/powershell/releases). Si vous êtes développeur .Net, il en est possible que vous ayez une version vielle.

Puis on doit ouvrir une fenêtre de Powershell en mode Administrateur, alors on va exécuter les commandes suivantes :

```powershell
PowerShell 7.1.4
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

PS C:\Users\edens-zero> Install-Module oh-my-posh -Scope AllUsers
PS C:\Users\edens-zero> Import-Module oh-my-posh
PS C:\Users\edens-zero> Get-PoshThemes
PS C:\Users\edens-zero> Get-PoshThemes -list
```

Après que le processus d'installation termine, on doit télécharger la typographie **[Nerd Fonts](https://www.nerdfonts.com/)** puisque **Oh-My-Posh** en a besoin. Un fois télécharge dans notre ordinateur, il sera nécessaire de l'installer, car les thèmes ont besoin de celle.

Après on va créer un nouvel fichier en exécutant la ligne suivant :

```powershell
PS C:\Users\edens-zero> notepad $PROFILE.AllUsersAllHosts

# Si ça ne marche pas , vous pouvez utiliser 
PS C:\Users\edens-zero> notepad $PROFILE 
```

Ça ouvrira le notepad, alors nous ajouterons la ligne suivante pour assigner un thème :

```powershell
Set-PoshPrompt -Theme jandedobbeleer
```

Puis nous écrivons. $PROFILE et voilà !!! Powershell aura une meilleure présentation. Si vous utilisez WSL, vous devez modifier les paramètres et ajouter dans la section **`defaults`** la typographie `Nerd Font` installé. Par exemple :

```json
{
    "profiles":
    {
        "defaults":
        {
            "fontFace": "FiraCode Nerd Font"
        }
    }
}
```

Finalement, Powershell semble à ZSH. N'hésitez pas si vous avez des commentaires ou des questions ! Et si vous aimez cet article, n'oubliez pas de donner votre like et le partager, à bientôt.
La mejor fuente para nuestro IDE
Tags: fuente, spanish, developer, desarrollo
Published: 2021-09-07 01:47:42

Existen muchos tipo de fuentes en la web destinadas a múltiples propósitos y entre todos estos esta el de desarrollo. Por eso hoy quisiera compartir una de las fuentes que más me gusta de forma personal (No porque sea la mejor).

La fuente tiene el nombre de Victor mono combina la escritura cursiva con la monotipada, tiene soporte con la ligadura (Ligatures)  y lo mejor es que es gratuita. ([link](https://rubjo.github.io/victor-mono/))

Ingresaremos a la pagina del creador de la fuente [~~link~~](https://rubjo.github.io/victor-mono/)  y en esta descargaremos un zip con el source, archivos ttf con los que podremos instalar en nuestro sistema operativo, si estas en MACOS puedes utilizar los siguientes comandos de brew de una forma más sencilla.

```
brew tap homebrew/cask-fonts
```

```
brew install --cask font-victor-mono
```

Hora de configurar nuestro IDE, ingresaremos a la configuración, en mi caso VSCode y donde ingresamos la fuente colocaremos el nombre de esta de la siguiente forma:

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

como adicional te muestro las primeras líneas de mi configuración donde habilito la ligadura, el tamaño de la fuente y un tema que recomiendo para el uso de la fuente.

![Configuracion json](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ckcny1xu4ucucrbvsug5.png)

Resultado:

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

Si conoces otra fuente u otros temas compártelo en los comentarios.

Gracias por leer, nos vemos en la próxima.
Meet new Waydroid (new Anbox alternative): Running Android apps on Ubuntu
Tags: linux, devops, android, beginners
Published: 2021-09-07 02:35:41

Waydroid team has packaged and uploaded Waydroid (new Anbox alternative) and its dependencies for Ubuntu to an APT repository at https://waydroid.ubuntu-web.org

Further, you can download and enjoy it on Ubuntu and related distributions:

```
sudo apt-get install waydroid && sudo waydroid init 
```

That's it ☺️.
NGINX Reverse Proxy in Docker
Published: 2021-09-07 02:10:56

Put several web services behind a proxy to run them from a single endpoint. Download the code and run docker-compose up.


- Working example: https://reverseproxy-nginx-reverse-proxy-in-docker-bronifty.cloud.okteto.net

- Youtube tutorial: https://youtu.be/bUBBv3PkxMI

- Github repo: https://github.com/bronifty/nginx-reverse-proxy-in-docker
¿Cómo cambiar el source input a español latino en debian?
Tags: devops, linux
Published: 2021-09-07 01:17:04

El día de hoy estuve instalando Debian 11, pero tenía un problema y es que cuando intentaba configurar mi teclado y seleccionaba español no me aparecia un layout input de latam después de mucho buscar en blogs y foros puedo decir que encontre la solución, algo sencilla pero igualmente practica por si en un futuro te encuentras con este problema.

1. Abre una terminal.
2. sudo dpkg-reconfigure keyboard-configuration
    Aquí te van a saltar varios recuadros el unico que pueden llegar a cambiar es el primero, personalmente seleccione 
`Generic 105-key PC (intl.)` , el resto los deje por defecto y simplemente le di continuar.
3. Por ultimo simplemente agregamos el input source
```
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us'), ('xkb', 'latam')]"
```
不使用JavaScript内置的parseInt()函数，利用map和reduce操作实现一个string2int()函数
Published: 2021-09-07 01:10:14

```
const str2int = s=>[].slice.apply(s).map(x=>+x).reduce((x,y)=>x*10+y);
```
1.利用[].slice.apply(s)将s 拆成字符串数组
2.利用+将string转换成number，用map遍历，map(x=>+x)，
3.利用reduce把数组转化成一个数字
打印结果如下：
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c11cklk7u6d6xeu3ecv9.PNG)
补充，使用Array.from 可以节省掉map
```
const str2int = s=>Array.from(s,x=>+x).reduce((x,y)=>x*10+y)
console.log(str2int('12345'));  //12345
console.log(typeof str2int('12345')); //number
```
We just reached our first 100 members!!!!
Tags: career, programming, productivity, javascript
Published: 2021-09-07 00:50:05

I started a Facebook group a few months ago...the intention was to help people with interviews and share my knowledge and experience to help people grow in their craft.

Ya know, stuff like resources I think are important, what languages to prioritize, how to get into open source, how to get your first job as an engineer, etc etc.

Well on September 1 we hit our first 100 members!

I honestly couldnt be more excited, we have such a great group of supportive people growing and learning together.

So...if youd like to join

Its as easy as clicking on the link below.

Talk soon!

https://www.facebook.com/groups/310120400851953

Scott
Vocabulary Building Day 11
Tags: gre, day11
Published: 2021-09-07 00:08:07

1. **entrenched**(adjective): fixed firmly or securely
![alt text](http://www.storyworks.in/blog/wp-content/uploads/2015/11/Overcoming-Entrenched-Views-StoryWorks-860x721.jpg)
[Checkout Pronunciation](https://www.google.com/search?q=entrenched&oq=entrenched&aqs=chrome..69i57.8220j0j7&sourceid=chrome&ie=UTF-8)

2. **preclude**(verb) :keep from happening or arising; make impossible.
![alt text](https://ts.idictionary.co.kr/files/pd/word_sub_img/420x420/1466954260_28.jpg)
[Checkout Pronunciation](https://www.google.com/search?q=preclude&oq=preclude&aqs=chrome..69i57j0i433i512l2j0i512l7.16592j0j9&sourceid=chrome&ie=UTF-8)

3. **bucolic**(adjective): relating to the pleasant aspects of the countryside and country life.
![alt text](https://www.freegreatpicture.com/files/photo102/50844-bucolic.jpg)
[Checkout Pronunciation](https://www.google.com/search?q=bucolic&oq=bucolic&aqs=chrome..69i57j0i433i512j0i512l3j46i175i199i512j0i512l4.7797j1j9&sourceid=chrome&ie=UTF-8)

4. **didactic**(adjective): instructive(especially excessively)
![alt text](https://study.com/cimages/videopreview/videopreview-full/screen_shot_2015-11-28_at_8.18.20_pm_127105.jpg)
[Checkout Pronunciation](https://www.google.com/search?q=didactic&oq=didactic&aqs=chrome..69i57j0i433i512j0i512l3j0i433i512j0i512l4.10009j1j9&sourceid=chrome&ie=UTF-8)
5. **predilection**(noun): strong liking
![alt text](https://i.pinimg.com/originals/1d/e7/95/1de795451a0d8ea04a03dbb6dfb83f22.png)
[Checkout Pronunciation](https://www.google.com/search?q=predilection&oq=predilection&aqs=chrome..69i57j0i433i512j0i512l8.12336j0j9&sourceid=chrome&ie=UTF-8)
I hope this helps you if you are preparing for GRE exams.
Do less rework
Tags: codequality, cicd, continuousdeployment, continuousdelivery
Published: 2021-09-19 20:03:47

---
title: Do less rework
published: true
date: 2021-09-07 00:00:00 UTC
tags: quality,cicd,continuousdeployment,continuousdelivery
canonical_url: https://jhall.io/archive/2021/09/07/do-less-rework/
---

I’ve written before about [the benefits of Continuous Deployment](https://jhall.io/posts/benefits-of-cd/), but as I’m reading through [_Accelerate_](https://amzn.to/3zPwe6S), another benefit was pointed out:

> The strongest correlation was seen in the precentage of time spent on rework or unplanned work, including break/fix work, emergency software deployments and patches, responding to urgent audit documentation requests, and so forth.

So in essense, by working in smaller iterations, and seeing those iterations through to the end before picking up a new task, we don’t just re-organize our work, we actually reduce the amount of work we do.

I guess that might be intuitive at some level. But there are enough dots to be connected, that I think it’s worth pointing out explicitly, and I’m quite glad that authors Nicole Forsgren, PhD, et al, took the time to do the statistical analysis to show conslusively that this is how things work.

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._