teleren/devto huggingface dataset:
📌 GitHub CLI 2.15.0 is out : let's pin 🎫
Tags: github, tutorial, productivity, news
Published: 2022-09-19 22:21:19

## ❔ About

[`GH CLI`](https://cli.github.com/) [`v2.15.0`](https://github.com/cli/cli/releases/tag/v2.15.0) is out and embeds some cool issue feature : 

{% github https://github.com/cli/cli/issues/5585 %}

The process is quite simple : 

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

Let's find out how it looks IRL 🤗

## 🍿 Demo time

{% youtube AA42epxVY-I %}

## 🔖 Resources

- [GitHub CLI 2.15.0 ReleaseNote](https://github.com/cli/cli/releases/tag/v2.15.0)
- Issue pinning feature [`#5585`](https://github.com/cli/cli/issues/5585)
- Pull Request fixing the issue : [`#5597`](https://github.com/cli/cli/pull/5597)
PHP 8.2 Liberación Nov. 2022
Tags: php, laravel, webdev, programming
Published: 2022-09-19 22:07:38

Para noviembre 24, se libera la nueva versión de PHP 8.2, la cual traerá nuevas características que mejoran mucho el lenguaje y lo harán mas robusto. 

> Puedes ver el estatus de este release en este link: https://wiki.php.net/todo/php82

> También puedes revisar el timelapse de las versiones de PHP en este link: https://www.php.net/supported-versions.php

A continuación, se describen algunas de las características mas importantes de la versión.

## Readonly classes

Esta característica introducida en la versión 8.1, hace que las propiedades de nuestra clase sean de solo lectura, evitando la sobreescritura de los valores asignados a nuestras propiedades, eso se usa con bastante frecuencia en las clases DTO.

Esta característica en la versión 8.1 se define de la siguiente manera:

```
class User
{
    public function __construct(
        public readonly string $name, 
        public readonly string $email,
    ) {}
}
```
En la versión 8.2 se refactoriza de la siguiente manera:

```
readonly class User
{
    public function __construct(
        public string $name, 
        public string $email,
    ) {}
}
```
 
## Propiedades dinámicas de las clases deprecadas

Otra característica importante de la versión 8.2, es que ya no podríamos crear propiedades dinámicas, al menos te generaría un "Warning Deprecated".

En versiones futuras este "Warning Deprecated", se convertiría en error. Hasta el momento podemos realizar lo siguiente: 

```
class User 
{
   public string $name;
}


$user = new User();
$user->last_name = 'Jhon Snow';
```

Con la versión 8.2, si hacemos lo anterior arrojaría un warning, salvo que en nuestra clase usemos los "Magic Methods" "__get" y "__set", ejemplo;

```
class User
{
    private array $properties = [];
    
    public function __set(string $name, mixed $value): void
    {
        $this->properties[$name] = $value;
    }
}

// …

$user->last_name = 'Bruce Wayne';
```

## Probando la versión 8.2 en Docker

Si quieres probar las características de la nueva versión, el contenedor de PHP 8.2 se encuentra ya disponible en el Docker Hub, con esto ya no tendrás que instalar esta versión en tu equipo para hacer pruebas, puedes consultarlo en el siguiente link:

> https://hub.docker.com/_/php/tags

Probamos nuestros ejemplos de esta publicación en el contenedor de Docker y este fue el resultado:


![Read Only Classes](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/igzxfi73q11s01v8k0nz.png)


![Deprecated Dynamic Properties 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9adbdy34iaz6c3oqlaey.png)


![Deprecated Dynamic Properties 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2w5geard8eeso150k2am.png)

**¿Y tu proyecto ya esta preparado para este cambio?**
Noob here - how to let users point their custom domain to my application?
Published: 2022-09-19 21:52:02

Sorry if this question is too broad or vague.
How do we just like shopify, let our users **connect** their **own custom domains** and **point** it to their **store** made on our **app**.

Right now, it opens under our own **domain as a subpage**, but I want it to be completely accessible through their **custom domain**, (even when being opened through the subpage url - it should redirect to their connected custom domain).

- Should auto issue SSL certificates to their domains.
- Need to do it without using any paid third-party service
- Should be very cheap or virtually free.

**- I've heard it's a feature offered only by AWS but are there ways to do the same on other hosts too like vulr, DO, linode**

Bonus Question - How do big dogs like shopify, blogger and all these services that let users connect their own domain to their page do it?
It's works efficiently, they only ask to add some (a records/c names) and there's a refresh button to check whether changes have been made.

I want to know the entire flow, right from start from to how it analyzes domain's dns and connects the page to that domain and so now it looks just like a separate website.

We are using heroku
Firebase realtime
Express,
React js,
Node js

Also, I'm still learning, so please excuse if I used some wrong terms.
My C# and ASP.NET Core full course videos on SECourses
Tags: programming, csharp, dotnet, tutorial
Published: 2022-09-19 21:48:05

Hello everyone. My name is Furkan Gözükara. I am a Ph.D. computer engineer from Turkey.


I have a software engineering dedicated Youtube channel named: **SECourses** : [https://www.youtube.com/SECourses](https://www.youtube.com/SECourses)

I want to share a few of my lecture playlists. The playlists contain the full course for free.

Most of the videos have manually corrected English subtitles. Hopefully, I will make the subtitles perfect in time.


[1] Introduction to Programming Full Course with C# playlist : https://www.youtube.com/playlist?list=PL_pbwdIyffskoSXySh0MdiayPJsBZ7m2o

[2] Advanced #Programming with C# Full Course Playlist : https://www.youtube.com/playlist?list=PL_pbwdIyffslHaBdS3RUW26RKzSjkl8m4

[3] Object Oriented Programming Full Course with C# playlist : https://www.youtube.com/playlist?list=PL_pbwdIyffsnH3XJb66FDIHh1yHwWC26I

[4] Asp.NET Core V5 - MVC Pattern - Bootstrap V5 - Responsive Web #Programming with C# Full Course Playlist : https://www.youtube.com/playlist?list=PL_pbwdIyffsnAWtgk4ja3HN3xgMKF7BOE

[5] Artificial Intelligence (AI) and Machine Learning (ML) Full Course with C# Examples playlist: https://www.youtube.com/playlist?list=PL_pbwdIyffskVschrADCL6KEnL_nqDtgD
Replace the curtains
Tags: development
Published: 2022-09-19 21:42:50

---
title: Replace the curtains
published: true
date: 2022-09-19 20:41:00 UTC
tags: development
canonical_url: https://rachsmith.com/replace-the-curtains/
---

The main bedroom of our house has large glass doors and windows that open onto a small balcony. When we moved in there were large curtains to cover the glass, but some of the tracks were broken. It was hard to open and shut them.

I love having natural light fill the bedroom, so I would fight with these curtains to get them open every morning. I would swear at them as I tugged and struggled to get them to move. Sometimes I would give up and leave the bedroom mostly in the dark.

I did this for over a year. I knew I should replace the curtains, but I would make excuses not to. My husband and I are not at all handy, so there was no way we were going to DIY massive floor-to-ceiling curtains. I would have to pay to get them installed, and that was going to be expensive. And I would have to call the curtain company. As a typical millennial, I hate calling people.

Finally, I bit the bullet and had some professionals measure and install beautiful new curtains. They glide open and shut like an absolute dream and can fully black out the room at night - the best way to sleep. Every day when I got up and opened these curtains, I would feel a sigh of relief and appreciation. It was the best purchase I made all year.

Sometimes, in an ageing codebase you can end up with parts that are just like the broken curtains. You fight with it every day. It is super annoying to work around it and you regularly get frustrated. But, to change it would take a bunch of development time, be expensive, complicated and maybe even cause a regression or two. So you leave it.

At CodePen we've been replacing our old, broken curtains. Every time I've doubted whether it is the right thing to do until I experience the sweet relief of being able to slide the new ones. I know I can do a better job of taking care of the rest of the house now.

Does your codebase have any old curtains that you should fix?
Tweets from heads of governments and states
Tags: datascience, twitterbot, nlp, kaggle
Published: 2022-09-19 20:27:28

---
title: Tweets from heads of governments and states
published: true
description: Tweets from heads of governments and states
tags: #datascience #twitterbot #nlp #kaggle 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kgyv95mpfr3n32eubs46.jpg
# Use a ratio of 100:42 for best results.
---
Since October 2018, I have been maintaining a bot written in Python and running on a Raspberry Pi 3B+ that collects tweets from heads of governments and offices (worldwide) followed by https://twitter.com/headoffice. It was an excellent exercise learning Python, Twitter API, SQLite database, and using a Raspberry Pi for hobby projects. I have now released the data on Kaggle at https://doi.org/10.34740/KAGGLE/DSV/4208877 for the community to use. 

The dataset contains an Excel workbook per year with data points on the rows and features on the columns. Features include the timestamp (UTC), language in which the tweet is written, user id, user name, tweet id, and tweet text. The first version includes the data from October 2018 until September 15, 2022. After that, future releases will be quarterly. It is a textual dataset and is primarily useful for analyses related to natural language processing.

In the Kaggle submission, I have also included a notebook (https://www.kaggle.com/code/rohitfarmer/dont-run-tweet-collection-and-preprocessing) with the Python code that collected the tweets and the additional code that I used to pre-process the data before submission. After releasing the first data set, I updated the code and moved the bot from Python to R using the `rtweet` library instead of `tweepy`. I found `rtweet` to perform better, especially in filtering out duplicated tweets. 

In the current setup (https://github.com/rohitfarmer/government-tweets) that is still running on my Raspberry Pi 3B+, the main bot script runs every fifteen minutes via `crontab` and fetches data that is more recent than the latest tweet collected in the previous run. The data is stored in an SQLite database which is backed up to MEGA cloud storage via Rclone once every midnight ET.

I enjoyed the process of creating the bot and being able to run it for a couple of years, and I hope I will soon find some time to look into the data and fetch some exciting insights. But, until then, the data is available to the data science community to utilize as they please. So, please open a discussion on the Kaggle page for questions, comments, or collaborations. 

Day 13 of #100DaysToOffLoad
Reduct Storage v0.9.0 has been released
Tags: news, cpp, database, reductstorage
Published: 2022-09-19 20:16:38

Hey, everyone! 
I'm happy to announce that we have released Reduct Storage [v0.9.0](https://github.com/reduct-storage/reduct-storage/releases/tag/v0.9.0).

This version is the last version of the experimental engine `v0.x.y`, and we're starting working on the `v1.x.y` version. Check our [roadmap](https://reduct-storage.dev/roadmap).

## MacOs Support

Now you can build the storage engine on your shiny MacBooks with GCC 11. We've already described it [here](https://dev.to/reduct-storage/how-to-build-reduct-storage-on-macos-2f6d)

## Windows Support

We also don't forget Windows users. You can build the project with `MVSC >= 19.29`. I'll document it soon, but you may use our GitHub actions as an example.

## Binary Distribution

You don't need to build the storage engine from sources if you want to avoid using it from Docker. We provide pre-built `x86_64` executables for Linux, macOS, and Windows. Check the [download page](https://reduct-storage.dev/download).
How to start App Development with .NET
Tags: webdev, dotnet, learning, csharp
Published: 2022-09-19 20:15:50

I am a long-time C# developer. But I don't have so much experience in app development unfortunately. 

I would love to develop an app with e.g. .NET MAUI or Blazor but I am wondering how to develop an ASP.NET API which I can then use in multiple constalations like in an app (MAUI/Blazor/iOS etc.) or in a web application like ASP.NET Razor Pages.

And then wonder why there is no ASP.NET template where ASP.NET Razor Pages uses an ASP.NET Web API. Especially it would be helpful if this also includes authentication and authentication and authorization.

Are there too good templates or tutorials here?
I would not like to use an Identity Server. I would prefer to use ASP.NET Identity but I also need to be able to develop an app that supports e.g. Apple Login which in turn uses the ASP.NET Web API securely.

Does anyone have a good starting point for these topics?
Day 2 of 100DAYSOFCODE
Tags: 100daysofcode, react, beginners, webdev
Published: 2022-09-19 19:58:29

Spent my day drawing up plans on how I was going to showcase my github repository on my site. Played a lot with Material UI components. I'm intrigued by the prospect of using Card components and having them transition onto screen when the user scrolls onto that section. I also read up on the ReactJS documentation.
Enable Okta SSO and MFA for Oracle JD Edwards (JDE)
Tags: jde, oracle, sso, mfa
Published: 2022-09-19 19:58:13

https://www.youtube.com/watch?v=_NkQIIOzm4U


This demo shows Datawiza enabling Okta SSO and MFA for Oracle JD Edwards (JDE). Datawiza works as a reverse proxy to enable SSO and MFA for Oracle JDE by using header-based authentication. Learn more: https://www.datawiza.com/enable-sso-mfa-for-oracle-jd-edwards/

The solution works with any identity provider and MFA (2FA) service, like Microsoft 365 (O365; Azure AD), Cisco Duo, Okta, AWS, Google, Auth0, Ping, ForgeRock, OneLogin, ADFS.

Datawiza secures any web apps including:
- Business apps, like Oracle JD Edwards (JDE), PeopleSoft, E-Business Suite (EBS), Siebel, SAP and more. 
- Homegrown apps written in any language, like JAVA, PHP, .Net, Python, Go and more.
- Critical tools like Wordpress, Kibana, Kubernetes, Jenkins, Grafana, SuperSet, AirFlow and more. 

___________________________________________
Learn with Datawiza

The Datawiza blog - https://www.datawiza.com/blog
___________________________________________
Follow Us on Social

Join our Discord Community - https://discord.com/invite/Sn3nbc83Up
Follow us on Twitter - https://twitter.com/datawiza_com
Follow us on LinkedIn -  https://www.linkedin.com/company/datawiza/
GitHub Lessons Learned
Published: 2022-09-19 19:39:35

Understanding branches
Commands
Variable naming and task delineation
[Git Hub Commands](https://education.github.com/git-cheat-sheet-education.pdf)

open a repository and change github.com to github.dev

strategy: open a new branch for each feature. Git add frequently, and git commit after each success. 'git push origin branch-name'. Assign someone in the group to be the merge master. Overcommunicate about what you are working on. Proactively share component/variable names to prepare for interaction.
Ruby
Published: 2022-09-19 19:38:58

Gems
Rack - wraps HTTP requests to simplify the Application Programming Interface for servers, frameworks, and software
-Sinatra - Domain Specific Language for creating Ruby web applications, built on top of Rack
-CORS
-Rake
--Seeding
--Migration
-Foreman
 gem install foreman
Foreman works with a special kind of file known as a Procfile, which lists different processes to run for our application. Some hosting services, such as Heroku, use a Procfile to run applications, so by using a Procfile in development as well, we'll simplify the deploying process later.

In the root directory, create a file Procfile.dev and add this code:

web: PORT=4000 npm start --prefix client
api: PORT=3000 rails s
Then, run it with Foreman:

 foreman start -f Procfile.dev
This will start both React and Rails on separate ports, just like before; but now we can run both with one command!

There is one big caveat to this approach: by running our client and server in the same terminal, it can be more challenging to read through the server logs and debug our code. Furthermore, byebug will not work. If you're doing a lot of debugging in the terminal, you should run the client and server separately to get a cleaner terminal output and allow terminal-based debugging with byebug.

You can run each application separately by opening two terminal windows and running each of these commands in a separate window:

 npm start --prefix client
 rails s

Active Record
-Associations: One to Many vs Many to Many
--timestamps and the schema
The has_many association reference also lets you provide additional optionsLinks to an external site. to customize its behavior. In our case (and in many cases involving a one-to-many relationship), we can use the dependent: :destroyLinks to an external site. option. This will tell Active Record to delete all the associated records when the parent record is deleted

```
# foreign_key: true establishes a relationship between a review and a dog house
t.belongs_to :dog_house, null: false, foreign_key: true
has_many :reviews, dependent: :destroy
```

SQL
Database interaction

Self
"Require" - require relative, require all
"pry" - debugging
"colorize" 
Symbols
Classes
Instances
Object Oriented Programming
Benefits and Purposes as a Language
-alternatives
attr_accessor
Class::Class-Constant
Object Inheritance
super
Metaprogramming

t.timestamps => created_at, updated_at

```
class User
  def initialize(attributes)
    attributes.each do |key, value|
      # create a getter and setter by calling the attr_accessor method
      self.class.attr_accessor(key)
      self.send("#{key}=", value)
    end
  end
end
```

Methods
.order
.pluck
.includes?
.any?
.uniq
.send
.gsub
.detect
.tally
.to_f
.to_i
.split
.strip
.compact
.push
.pop
.shift
.unshift
.each
.sort
.map/.collect
.select
.filter
.filter_by
.max_by
<<
>>
<=>
Golang divisions
Tags: go, math, todayilearned
Published: 2022-09-19 19:27:07

---
title: Golang divisions
published: true
description: Golang does divisions, can you do divisions with Golang?
tags: golang, math, til
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/16942nlfvgclqhfcv2yq.jpg
canonical_url: https://endorama.dev/2022/golang-divisions/
---

<em>Photo by <a href="https://unsplash.com/@chrisliverani?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Chris Liverani</a> on <a href="https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a></em>
  

At work today I read a piece of code in Golang that got me curious:

```go
maxQuerySize := 500
// metricDataQueries is user provided
sliceLength := len(metricDataQueries)/maxQuerySize + 1
// what's the value of sliceLength?
for i := 0; i < sliceLength; i++ { 
    whatever
}
```

This is a simple integer division, but the result is then used as a parameter to the for loop.
Integer division has a drawback, that can create a bug in this case: the remainder, as `float` in for loop declarations are supported only if no truncation happens when converting to `int` (i.e. `10.0` works, `10.1` don't).

How does Go handle this? The answer is as simple as it gets: remainder is ignore and the result is the quotient. The reason why this happens is explained in Go specs, under [Constant expressions](https://go.dev/ref/spec#Constant_expressions):
> Any other operation on untyped constants results in an untyped constant of the same kind; that is, a boolean, integer, floating-point, complex, or string constant. If the untyped operands of a binary operation (other than a shift) are of different kinds, the result is of the operand's kind that appears later in this list: integer, rune, floating-point, complex.

Which means that to have "true" division you need to convert _at least one argument_ to `float`:

```go
a := 10.0 / 2
b := 10 / 2.0
c := 10.0 / 2.0
d := 10 / 2
fmt.Println(reflect.TypeOf(a)) // float
fmt.Println(reflect.TypeOf(b)) // float
fmt.Println(reflect.TypeOf(c)) // float
fmt.Println(reflect.TypeOf(d)) // int
```
[go.dev/play](https://go.dev/play/p/UfjOH9rGIAi)

Doing integer division effectively "floors" the result of the operation. What if we want the ceil of it?

Go `math` package has [`Ceil(x float64) float64`](https://pkg.go.dev/math#Ceil) for this, which implies doing a "true" division and applying `Ceil` on the result.

All of this was not really surprising, but it's cool to see this being implemented in a very ergonomic way. 

Just a note: if you want to get a float value you must convert to `float` division arguments **before** the division.

Do this: `float64(2) / float64(10) // 0.2` and **not** this: `a := float64(2 / 10) // 0`.
Rounding the bootcamp corner ...
Published: 2022-09-19 16:58:56

Feelings Friday turned into a feelings weekend...

Suddenly bootcamp graduation is around the corner. I'd say that I'm super excited to finish, but anxiety of the end is starting to grow.

I had a few persisting thoughts through the weekend:

1. After every phase, I would recharge and reload over the weekend and prep myself for content week 1. But as phase 4 ended, the lingering thought of getting a job looms the largest.

It's hard to focus on anything else at the moment. After all, the whole point of this bootcamp was to bridge the gap for me, into the tech world. To help someone like me with zero experience get their foot in the door and become a software engineer. I'm starting to think about it before I go to bed at night.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uvoybosftpbw6bpi50l7.jpeg)

I write all these negative things to flushes them out of my thought process. I am continually reminding myself to compartmentalize and focus on one thing at a time.

So here is my 26th attempt to refocus on phase 5, and creating a fun and dynamic capstone project!

2. I can't believe I am about to graduate?! I vividly remember day 1 and meeting my few cohort mates in the blue room. Now we are on our phase 5 zoom meeting call, prepping for our capstone.

When I am not all doom and gloom, I usually find myself feeling extremely grateful. Grateful for my GF and family who have supported me along this short but difficult journey. Grateful to my cohort for being fun and encouraging in the low points of the bootcamp.

It is a constant back and forth between these two thoughts. All negative or all positive. Feels a bit like a devil and angel riding shotgun on my shoulders.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nnbu7csujonpz4v307nk.jpeg)

Ultimately, it really is about taking it one step at a time. Focusing on one specific step or aspect of life, and doing it to the best of your ability. 

For anyone out there, about to embark on a new journey into uncharted territory, I have a few pieces of advice. I wouldn't say to blindly follow your dreams, because I feel that a decision like that can lead you to some rough places in life. I would instead encourage you to do your research. Make sure you have a support system of some kind in place, for the dark days or weeks. Lastly, believe that you can do it. Put your head down and start working!
Google indexing: Does the Newsarticle schema improve indexing?
Tags: seo, beginners, algorithms, tutorial
Published: 2022-09-19 18:36:31

![Google indexing](https://blog.rankfasta.com/uploads/1662977847.png)
So many claims have been made that some schema markups improve [Google indexing](https://www.impactplus.com/blog/what-is-schema-markup-and-how-to-implement-it).

Is any of them true?

So, I decided to do my own testing using the Newsarticle schema markup.

And it came out positive in a series of 6 carefully tested pages on different domains, schema markups can improve indexing.