teleren/devto huggingface dataset:
My-Alternatives: A wrapper for update-alternatives offering user-level customizations. Supports Debian, SUSE, and RedHat
Tags: showdev, github, bash, alternatives
Published: 2021-11-10 21:40:00

I'm excited to announce release v0.7.0 of `my-alternatives`

* https://github.com/TekWizely/my-alternatives 

My-Alternatives is a light-weight wrapper over update-alternatives, offering user-level customizations.

Supports Debian, SUSE, and RedHat

---

## Easy to Get Started
With my-alternatives, configuring custom alternatives is as easy as:


    # initialize my-alternatives
    # note: place this in your .profile
    $ eval "$( my-alternatives init )"

    # customize an alternative
    $ my-alternatives select <name>

See the [Project's Homepage](https://github.com/TekWizely/my-alternatives) for more information

---

## Release Notes - v0.7.0

### Re-Write

This release marks a full re-write of the my-alternatives tool, changing it into wrapper for _update-alternatives_ that manages user-level configurations and uses them when invoking update-alternatives (i.e `--admindir` &amp; `--altdir`).

This new approach makes it much easier to support **all** available commands for managing your custom alternatives.

### RedHat

This release also includes support for _RedHat_.

This is significant because RedHat maintains its own implementation of _update-alternatives_, which is slightly different than the _Debian_ version.

The RedHat version does not include the uber-useful `--query` command, making it impossible to integrate it using _just_ the public API.

As such, supporting it requires a _hack_, exploiting knowledge of the tool's private internals.

### SUSE

The SUSE implementation of _update-alternatives_ is really just a re-branded version of the Debian tool.

### Multiple Scripts

As part of introducing RedHat support, this release now includes two versions of the `my-alternatives` script, each named according to the primary OS flavor they support:

* Debian / SUSE : `my-alternatives-debian`
* RedHat / CentOS : `my-alternatives-redhat`
Customize Stimulus Attributes, Avoid Conflicts
Tags: javascript, hotwire, stimulus
Published: 2021-11-10 21:33:19


[Stimulus](https://stimulus.hotwired.dev/) is all about giving you front-end functionality with minimal JavaScript fuss and weight, but in certain cases, its data attributes can run into conflict with other libraries. I've recently made a pull request to add this to their docs, but for anyone else who's encountered this conflict, a little reconfiguration of the library's schema can keep your Stimulus implementation conflict-free.

Outside of a build system, Stimulus is initialized as documented in their [handbook](https://stimulus.hotwired.dev/handbook/installing#using-without-a-build-system):

```javascript
import { Application } from "https://unpkg.com/@hotwired/stimulus/dist/stimulus.js"
window.Stimulus = Application.start()
```

Stimulus uses HTML data attributes to target and add listeners to elements on the page. In Stimulus if you wanted a button to show a modal, you might write something like this:

```html
<button data-action="modal#show">
 Set up your profile
</button>
```

If you were to include Stimulus in a project that already had several JavaScript libraries, you may encounter what I encountered. The HTML attribute `data-action` was already being monitored by another library. Fortunately, after reading through their code I discovered there are parameters that can be passed to `Application`. The data attributes Stimulus looks for can be customized by passing a different "schema".

```javascript
import { Application, defaultSchema } from "https://unpkg.com/@hotwired/stimulus/dist/stimulus.js"
const customSchema = {
 ...defaultSchema,
 actionAttribute: 'data-stimulus-action'
}
window.Stimulus = Application.start(document.documentElement, customSchema)
```

This would allow you to create Stimulus event listeners using your custom attribute:

```html
<button data-stimulus-action="modal#show">
 Setup your profile
</button>
```

Stimulus is a great tool that gives you a lot of power on the front end for very little overhead— if you'd like to see a blog series from me to get a thorough introduction to the library, let us know!
Easy console.log() inside one liner functions
Tags: javascript, webdev, codenewbie
Published: 2021-11-10 21:24:48

Let's say we want to log `obj` inside this `.map()` function here:

```js
const arr = [
  { val: 1 },
  { val: 2 },
  { val: 3 }
];

const nums = arr.map(obj => obj.val*2);
```

Well, dang! Now we have to convert this to a multi-line function, right?

```js
const nums = arr.map(obj => {
  console.log(obj);
  return obj.val * 2;
});
```

Instead we can use the logical OR (`||`) operator with `console.log()` to short-circuit evaluate the return statement:

```js
const nums = arr.map(obj => console.log(obj) || obj.val*2);
```

This works because `console.log()` evaluates to `undefined` so our OR (`||`) opertator will evalutate the next operand which is the return portion of the function and will return the same result as the original example!

This is especially usefull with JSX where we commonly render components with implicit return statements:

```jsx
export default function App() {
  return (
    <div>
      <h2>Short-circuit Logging</h2>
      <ul>
        {nums.map((num) => console.log(num) || (
          <li key={num}>{num}</li>
        ))}
      </ul>
    </div>
  );
}
```

Huzzah! 😃

----------
<b>Yo!</b> I post byte-sized tips like these often. Follow me if you crave more! 🍿

I'm on [Twitter](https://twitter.com/JS_Bits_Bill), [TikTok](https://www.tiktok.com/@js_bits) and I have a new [debugging course](https://jsbits-yo.com/bug-bash/) dropping soon!
The 100 days of code challenge 💻
Tags: 100daysofcode, html, css, javascript
Published: 2021-11-10 21:05:00

100DaysOfCode 💻

The 100 days of code challenge 😍

Github : https://github.com/saidMounaim/100DaysOfCode

Follow me on github : https://github.com/saidMounaim/
Daily Python and Pandas Challenges
Tags: python, jupyternotebook, datascience, pandas
Published: 2021-11-23 14:02:28

---
title: Daily Python and Pandas Challenges
published: true
date: 2021-11-10 20:51:00 UTC
tags: python,jupyternotebook,datascience,pandas
canonical_url: 
---

I’m excited to announce [Dunder Data Python and Pandas Challenges](https://python.dunderdata.com/)! One Python and one Pandas challenge will be released each weekday on [python.dunderdata.com](http://python.dunderdata.com). They will vary in difficulty and cover a wide range of topics.

![](https://cdn-images-1.medium.com/max/1024/1*zm_eclpXLlo9LAZbC7K_Tg.png)
_An image of the first challenge available at python.dunderdata.com_

Video solutions for the Python Challenges will be [available here](https://www.youtube.com/playlist?list=PLVyhfExBT1XA_aaqE24zXce26QXIv4bYQ) with the Pandas Challenges [available here](https://www.youtube.com/playlist?list=PLVyhfExBT1XBIOkoEFMrh-ZEzWREd4g7B). You’ll answer the challenges within your very own Jupyter Notebooks.

### Can you solve them?

Think you have what it takes to solve the challenges? Get started at [python.dunderdata.com](http://python.dunderdata.com) now.

* * *
Track the ISS in real-time with Python [NASA Project]
Tags: tutorial, python, webdev, beginners
Published: 2021-11-10 20:40:52

Python , an interpreted high-level general-purpose programming language that was created in 1991 by Guido Van Rossum. 

Python is dynamically-typed language .. it supports multiple programming paradigms, including structured (particularly, procedural), object-oriented and functional programming. 

In this quick tutorial, you will learn how to track the International Space Station in real time using NASA API with only Python code.

This is the video tutorial :
{% youtube 5UWeOfdESZE%}

So if we're going to talk about the International Space Station (ISS) which is something most of us consider as a worthy example of what can happen when we work together .. and NASA among other agencies uses a wealth of python code on board ISS in order to help automate your teens .. so if you're considering a career in space then learning python is a must-have
skill 

In this Python project, We're going to display the number of astronauts on board .. we're going to update the station's current latitude and longitude every 5 seconds while also displaying your current latitude and longitude on the world map.




Thank you for reading (and maybe watching), and I will see you in a new Video-Tutorial post :)

Some Useful links:
NASA : https://www.nasa.gov
GitHub Code: https://github.com/BekBrace/NASA-Project-with-Python
Astronauts API : http://api.open-notify.org/astros.json
Lon/Lat API : http://api.open-notify.org/iss-now.json
Online GIF Converter: https://ezgif.com/video-to-gif
Day 5 of #100daysofcode: Some Formatting Success
Tags: 100daysofcode, react, css, beginners
Published: 2021-11-10 20:30:17

I am going to temporarily take Python out of the tags whilst my focus is still on styling and page formatting. I feel a little guilty keeping Python in the tags while my blogs focus entirely on front-end stuff. Short update today, as I am staying busy. Even though it is a short update I am progressing steadily.

## Today
I sat down today and really elbowed through getting a basic layout for my app. It is rough, imperfect and ugly, but the layout is roughly what I want. I would consider todays work to be only a little better than playing around in a sandbox. Maybe playing with legos. Here is a look at the current situation my app is in.

![Image of my very rough app](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ksy8u3fwh86cfwa6b4bg.png)

While I think the layout is undoubtedly better than it originally was, the overall look of the app is... clashing to say the least. 

I modified the background color only to give myself a decent representation of the size of the `divs` that each element is in. The layout is almost entirely ran by `grid` at the moment, though both the song display and the artist display are technically in their own `flexbox`. Admittedly, I had to fiddle around quite a bit to get the position I liked.

## Tomorrow
Tomorrow is another busy day, so I am not really sure what I will have time to do. I would like to get around to reading through some more CSS Grid and Flexbox tutorials and perhaps find a video or infographic that helps visualize each property. I really want to get to a point where each change I make in CSS feels more deliberate and less like "what is this going to do?"

## What I am Struggling on
Front-end design. At heart, I think I am a back-end developer. Moving numbers around and creating functions which accomplish things feels more my speed. When messing around with all this front-end design, I feel like a fish out of water being forced to play football. In a way, it makes this exercise of learning front-end design much more worth it. 

### Resources
[You Probably Don't Need Media Queries Anymore](https://dev.to/kathryngrayson/you-probably-dont-need-media-queries-anymore-a4j) by Kathryn Grayson Nanz (Highly recommend this article)
Included in the above article is a bunch of resources which proved very helpful today.
Finishing Phase 1 Project
Tags: javascript, beginners, css, webdev
Published: 2021-11-10 20:28:49

Just finished my first webpage and I'm so tired, this is also my first blog post so bear with me. My journey through phase 1 was a roller coaster! Started off easy with html and css being as amazing as they are but turned dark once I reached JavaScript. I never realized how amazing google is until I had to use it so often for my work. Reddit and W3school became my most visited pages so fast, with there abundance of knowledge on whatever I needed help with, I was able to get through the phase and start on my project

TI decided I would create a site to store blog post about my adventures, its called Asylum Seeker. I want to work more on this site because I saw a real need for it. I use it to post summaries of my adventures in the outdoors I take but also include ways on how you can take the same adventure or a different one and still be safe out there. I was really able to learn hands on JSON better by including it in my site using a weather API. 

Here is a link to the github if you would like to check it out!!https://github.com/lbedrosian/phase-1-project
Do you know any beautiful Next.js Starters/Templates/Boilerplates?
Tags: nextjs, react, javascript, webdev
Published: 2021-11-10 20:25:32

Hi! How you doing?

I'm building a new website where I'm going to collect Next.js templates. If you know some cool templates, then please, share them in the comments below or text me (pavel.keyzik@gmail.com).

P.S. If you want to see my website, then go to [https://nextjs-elements.com](https://nextjs-elements.com)
November 2021 Releases – Horizon 29.0.0, Meridians 2021.1.6, 2020.1.14, 2019.1.25
Tags: horizon, meridian, release
Published: 2021-11-29 19:19:07

---
title: November 2021 Releases – Horizon 29.0.0, Meridians 2021.1.6, 2020.1.14, 2019.1.25
published: true
cover_image: https://pbs.twimg.com/media/FD7bWgWXIAsjabK?format=jpg&name=4096x4096
date: 2021-11-10 20:12:27 UTC
tags: Horizon,Meridian,Release
canonical_url: https://www.opennms.com/en/blog/2021-11-10-november-2021-releases-horizon-29-0-0-meridians-2021-1-6-2020-1-14-2019-1-25/?utm_source=rss&utm_medium=rss&utm_campaign=november-2021-releases-horizon-29-0-0-meridians-2021-1-6-2020-1-14-2019-1-25
---

In November, we released updates to all OpenNMS Meridian versions under active support, and introduced a new major release of Horizon.

### Horizon 29.0.0

Release 29.0.0 is the first in the Horizon 29 series, introducing running as non-root by default, optimizations to Minion communication, time-series improvements, support for Cortex for storing flow data, and more.

For a high-level overview of what has changed in Horizon 29, see [What’s New in OpenNMS Horizon 29](https://docs.opennms.com/horizon/29.0.0/releasenotes/whatsnew.html).

The codename for Horizon 29.0.0 is [_Turkey_](https://wikipedia.org/wiki/Turkey_(bird)).

### Meridian Point Releases

Meridian 2019.1.25 included a few small features updates and a number of bug fixes, including an XSS security issue in the notifications wizard.

Meridian 2020.1.14 added a fix for handling multiple authentication params in SNMPv3.

Meridian 2021.1.6 included an additional ReST fix, plus a number of documentation updates.

For a list of changes, see the release notes:

- [2019.1.25](https://meridian.opennms.com/releasenotes/2019/latest/#releasenotes-changelog-Meridian-2019.1.25) ([_Tessellated Pavement_](https://wikipedia.org/wiki/Tessellated_pavement))
- [2020.1.14](https://meridian.opennms.com/releasenotes/2020/latest/#releasenotes-changelog-Meridian-2020.1.14) ([_Brahe_](https://wikipedia.org/wiki/55_Cancri_c))
- [2021.1.6](https://docs.opennms.com/meridian/2021.1.6/releasenotes/changelog.html#releasenotes-changelog-Meridian-2021.1.6) ([_Chang'e 2_](https://wikipedia.org/wiki/Chang'e_2))
Access to nested object properties 
Tags: javascript, webdev
Published: 2021-11-10 19:58:13

---
title: Access to nested object properties 
published: yes
description: with the help of this class it is possible to access objects easily
tags: javascript,webdev 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d553httitzpi1xm7xd9f.png
---

## An Everyday Problem

I think every developer knows the problem and often it is just annoying. An object is missing a certain property and nothing works anymore.


```javascript
let a = {}
console.log(a.b.c)
```

The script says goodbye and the browser acknowledges the error with a terse TypeError:

__Uncaught TypeError: Cannot read properties of undefined 
 reading 'c') at <anonymous>:1:5__

But the javascript gods heard us and created the [Optional chaining](https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Operators/Optional_chaining)

So it is possible to omit missing properties.

```javascript
console.log(a?.b?.c)
```

Now we don't get an error message anymore, but get an undefined. **That is already wow**

The whole thing works not only with objects, but also with arrays and functions.

```javascript
obj.val?.prop
obj.val?.[expr]
obj.arr?.[index]
obj.func?.(args)
```

Thank you javascript gods!
What is Programming?
Tags: beginners, codenewbie, programming
Published: 2021-11-10 19:57:57

## What is it? Coding, programming, developing?
Coding, programming, developing. These are all the same thing and most people use these words interchangeably. No matter what you call it, we need to know what it is before we get too far. If you don’t know what programming is, that’s okay. That’s why you’re here, right? Imagine you get to tell a computer what to do. That’s what programming is. Though, it’s not quite as easy as just saying it out loud. Instead, we have to learn how to speak the computer’s language, then it will do what we say. Programming is using code to perform a task. That task could be solving a problem, making a decision, building something cool, or even making awesome art.

### What can I do with code?
I’m so glad you asked. You can do so many things. You can build websites, virtual reality games, calculators, launch spaceships, name generators, street lights, or even an automatic cat snack dispenser. You may not think about it but programming is used in so many things we use and see in our daily lives. Everything from your microwave to traffic lights, your watch to parking meters all have some code running their processes.

Let’s look at how we could code a watch, that portable clock some people wear on their wrists. It has a few main functions: count seconds, update the display. That's not too many steps, right? Let’s break it down into even smaller steps.

1. Every 1 second up to 59, add 1 to the seconds on the screen then
2. Add 1 to the minutes on the screen up to 59 then
3. Add 1 to the hours on the screen up to 12 then
4. Repeat steps 1-3 forever and ever until the end of time or the battery dies

### What makes real-life things like programming?

Code has a few basic parts that are used to make some complex pieces. I promise, in this case, “complex” definitely doesn’t mean hard, a complex piece just means it’s a bigger piece made out of smaller basic parts. Tons of things in real life are like this, too. You have to learn what some new terms mean and how to make the basic parts. Each basic part has a purpose. Next, you’ll use the basic parts to build bigger complex pieces.

|  | **Knitting and Crocheting** | **Electrical Work** | **Music** | **Language** | 
| --- | --- | --- | --- | --- |
| **Basic Parts** | Types of stitches | Switches, wire, power | notes in a treble or bass clef | Nouns, verbs, punctuation | 
| **Complex Pieces** | Rows | Circuits | Measures | Sentences | 
| **Possible End Product** | A sweater, hat, or blanket | A radio, keyboard, or robot | A verse, a song, or album | A paragraph, essay, or book | 
| **Documentation (instructions)** | A pattern | Diagrams | Fingering chart, reference book | Grammar reference book, Dictionary | 
| **Debugging (figuring out why it’s wrong)** | Counting stitches and pulling some out if needed | Testing each part to verify it works | Checking your fingering and trying again | Spell check, autocorrect, re-reading your work |
VSCode Reordenando Classes
Tags: vscode, css, class, tailwindcss
Published: 2021-11-10 19:57:19

Fala pessoal,![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b2wvoit76kfmq96qbst0.png)
 
Estava com alguma extensão que está reordenando o nome das classes no meu VS Code.
Sofri, pesquisei no Google e nada.
Daí me veio a ideia de olhar nos shortcuts do teclado e encontrei o tal de headwind (para tailwind)
Eu desativei, mas olhando a fundo identifiquei que isso pode ser útil quando usado intencionalmente, o problema  é que em um código que não queremos reordenar classes pode gerar muito 'diff' e isso é chato quando o projeto não é nosso.
Bom, mantive desativado mas fica a dica caso alguém esteja com o mesmo problema.
State vs props
Published: 2021-11-10 19:51:35

I was reading the official React document and found a link https://github.com/uberVU/react-guide/blob/master/props-vs-state.md there about "state vs props" there is a table "Changing props and state", in its last entry it is mentioning that "Props Can change in child Components?", my question is how this is true because we can't change props of a component inside it otherwise, React will throw TypeError. So, how can a child component mutate its props.
Patrón modelo vista controlador
Tags: php, programming
Published: 2021-11-10 19:22:27

Para implementar este modelo vamos utilizar librerías en tareas como el renderizado de vistas o el sistema de rutas con el fin de que la tarea sea mas practica 

[Repositorio de la platilla en GitHub](https://github.com/marcodeev/MVC)

#Sistema de carpetas 

![sistema básico de MVC](https://i.ibb.co/27PdL48/estructuradecarpetas.png")

###app
Contiene la mayor parte de la lógica de nuestro sistema (modelos y controladores)
 
###controllers
Contiene los controladores de nuestra aplicación

###models
Contiene los modelos de nuestra aplicación, desde acá manipulamos los datos alojados en nuestra base de datos   

###public
Esta carpeta poseen los archivos que tendrán un alcance publico. Esta carpeta tiene el índex que esta cumpliendo el patrón de Front Controller (muy importante para un sistema robusto ya que solo permite una sola entrada a los archivos de nuestra solución).

###Vendor
Carpeta creada y gestionada por composer, acá se alojan las librerías implementadas a través de la terminal de composer.

###view 
Contiene las vistas de nuestra solución 

#Modelo Vista Controlador

El siguiente esquema muestra el funcionamiento de un sistema funcionando con el patrón de diseño modelo vista controlador 
![Esquema MVC](https://i.ibb.co/Vgm5Gxj/mvc.png")
How to create a Pull Request on GitHub using VS Code ?
Tags: github, git, opensource, vscode
Published: 2021-11-10 19:21:05

# Hey there!
### Redirection alert...

 I have written this article on the Medium Publication ["Level Up Coding"](https://levelup.gitconnected.com/)!

 [Go to the article 👉](https://levelup.gitconnected.com/how-to-create-a-pull-request-on-github-using-vs-code-f03db28308c4)

![github](https://raw.githubusercontent.com/gist/ManulMax/2d20af60d709805c55fd784ca7cba4b9/raw/bcfeac7604f674ace63623106eb8bb8471d844a6/github.gif)

P.S. Let's make that Pull Request.🎉