teleren/devto huggingface dataset:
The role of java to improve your programming skills
Tags: programming, java, programminghomeworkhelp, javahomeworkhelp
Published: 2022-08-17 09:11:16


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6iyz1fhbxhn2kfda38zn.png)
Learning java is a great way to expand your skills as a programmer. The consideration required is much more conscientious than in anything else, and so you begin to understand how this approach could be useful in the real world. Java programming is one of the most challenging tasks for both high school and college students. It is also an extended branch of programming. Our professionals provide [java homework help](https://www.programminghomeworkhelp.com/java-assignment/) to learners all over the world. [Programming homework help](https://www.programminghomeworkhelp.com/) involves the process of collecting and analyzing data and then restating the data into a numerical form. It applies in wide areas such as Java, Python, C, and C++.
[Ruby][Sorbet] What to do when you can't write types in Ruby files (when meta-programming)
Tags: ruby, rails, sorbet
Published: 2022-08-20 16:51:35

---
title: [Ruby][Sorbet] What to do when you can't write types in Ruby files (when meta-programming)
published: true
date: 2022-08-17 08:37:43 UTC
tags: ["Ruby", "Rails", "Sorbet"]
canonical_url: https://note.hiko1129.com/posts/1660725463/
---

<a href="https://note-hiko1129-com.translate.goog/posts/1660725463/?_x_tr_sl=ja&_x_tr_tl=en&_x_tr_hl=ja&_x_tr_pto=wapp" target="_blank" rel=”noopener noreferrer”>Translate ja to en</a>

メタプログラミングしている(define_methodとか使っている)ときは.rb上では型を付与できない。

ex: hoge.rb
```
class Hoge
  define_method :hoge do
    puts 'hogehoge'
  end
end

Hoge.new.hoge
```

この場合には、RBIファイルに型を書く対応をする（or [型生成するコードを書く](https://github.com/Shopify/tapioca#writing-custom-dsl-compilers)）

ex: hoge.rbi
```
# typed: strict

class Hoge
  sig { void }
  def hoge; end
end
```

`bin/tapioca gems`などを実行して型が足りないときも同様に`sorbet/rbi/shims`以下に型を書く（必要な部分のみで問題ない。）

```
# typed: strict

class ActiveRecord::Base
  sig { void }
  def hoge; end # <- こんな感じで必要な差分のみ追記で問題ない
end
```
Catalyst by Zoho presents a Serverless Masterclass on AI as a serverless service
Tags: serverless, ai
Published: 2022-08-17 08:36:00

**AI as a serverless service**

Date: August 24, 2022, 8:30 a.m. PST | 9 p.m. IST
Duration: 1 hour

Learn how to leverage the power of Zoho's R&D in AI through Catalyst's Zia suite. Offered on Zoho's reliable infrastructure that supports over 80 million users globally, these scalable microservices can act as a powerful tool in reducing the development time and resources required for software projects.

[Register Now](https://meet.zoho.com/A7aqQNcoRD)
[Rails][Sorbet] How to add kaminari type definitions in sorbet-rails
Tags: ruby, rails, sorbet
Published: 2022-08-21 04:03:14

---
title: [Rails][Sorbet] How to add kaminari type definitions in sorbet-rails
published: true
date: 2022-08-17 08:32:23 UTC
tags: ["Ruby", "Rails", "Sorbet"]
canonical_url: https://note.hiko1129.com/posts/1660725143/
---

<a href="https://note-hiko1129-com.translate.goog/posts/1660725143/?_x_tr_sl=ja&_x_tr_tl=en&_x_tr_hl=ja&_x_tr_pto=wapp" target="_blank" rel=”noopener noreferrer”>Translate ja to en</a>


kaminariに限った話ではないが一部のgemに関してはsorbet-railsのinitializerを追加することで型生成対象に含めることができる。  
kaminariのgemを入れているから勝手に生成されるとかではなくあくまで自分で設定する必要がある模様。

```ruby
# -- config/initializers/sorbet_rails.rb
SorbetRails.configure do |config|
  config.enabled_gem_plugins = [
    :kaminari
  ]
end
```

## 参考
* https://github.com/chanzuckerberg/sorbet-rails#enabling-built-in-plugins
Wednesday Links - Edition 2022-08-17
Tags: java, jvm, architecture, opensource
Published: 2022-08-17 08:32:16

JEP 429: Extent-Local Variables - moved to candidate (15 min)🛖
https://openjdk.org/jeps/429

MongoDB: the most popular NoSQL database (4 min)🍃
https://nurkiewicz.com/82

Kubernetes Removals and Major Changes In 1.25 (3 min)🎈
https://kubernetes.io/blog/2022/08/04/upcoming-changes-in-kubernetes-1-25/

GraalVM 22.2 Adds Library Configuration Repository (2 min)🏛️
https://www.infoq.com/news/2022/08/graalvm-22-2

A standardized error format for HTTP responses (3 min)💥
https://www.mscharhag.com/api-design/rest-error-format

Observations on finding good first issues (11 min)👁️
https://blog.scottlogic.com/2022/08/16/observations-on-finding-good-first-issues.html

Event Driven Architecture — 5 Pitfalls to Avoid (10 min)🕳️
https://natansil.medium.com/event-driven-architecture-5-pitfalls-to-avoid-b3ebf885bdb1

Don’t call it a comeback: Why Java is still champ (14 min)🥊
https://github.com/readme/featured/java-programming-language
What is Paxos?
Tags: algorithms, distributedsystems, paxos
Published: 2022-08-17 08:29:00

## Introduction
Paxos is a consensus algorithm in distributed systems. The consensus algorithm is an algorithm that determines (agrees on) a single value within a network of multiple nodes.

## Paxos wants to do
In a phrase, **Paxos wants to determine a single value that will not be overturned**. Specifically, computers that are independent of each other (do not share memory) and exchange information only through the network participate in the consensus, and if a majority of them choose the same value, them all learn that value and it cannot be overturned.

## Why is it difficult to get Consensus?
Paxos is desigined to work well even if communication massages are lost or computers fail. Therefore, if a communication parther does not reply to a message, it is impossible to determine whether the communication is slow, the parthner is malfunctioning, or the message has been lost. This is called the asyncronous communication model in distributed systems.

## Paxos algorithm
The algorithm is difficult to understand. That's why we deal with specific examples. Look at the following images Captuer of [Youtube Video](https://www.youtube.com/watch?v=d7nAGI_NZPk).
![Captuer of Youtube Video](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pin8e9lekcahcntsuxzc.png)

### Phase1 -a
When the value proposer wants to decide on a value, a Propose message is sent to everyone.This is assigned a monotonically increasing proposal number.

### Phase1 -b
The acceptor checks the current received proposal number and the maximum proposal number it has received in the past. If the current received proposal number is larger, the acceptor takes one of the following actions

**①** If there is no previously accepted value, the proposer replies prepare message.

**②** If there is already another accepted value, reply with a received message including that value.

### Phase2 -a
**①** If a prepare message is received from an acceptor, the proposer sends an acceptance request of any value to that acceptor.

**②** If a received message is received, check the previously received values contained in that message. It then overwrites the value the proposer wishes to propose with that value and sends a request for acceptance of that value.

### Phase2 -b
The acceptor learns the values sent by the proposer.

## Comment
As we have described, the Paxos algorithm can be used to determine a single uncovered value among distributed nodes connected by an asynchronous channel. This underlying algorithm is the basis for such algorithms as Multi-Paxos, which determines the order of execution of state machine replications (SMRs).

Thanks for reading all the way to the end!
The bot for BNG bank
Tags: telegram, aws, typescript, showdev
Published: 2022-08-17 07:58:08

## Introduction

Hi folks. My name is Roman Pedchenko and I am a full-stack developer. I always thought that my profession as a developer is just to write code but I had mistaken. I've realized that not only do I can create applications but also I can make some people's life easier. I bet everyone knows the situation in the world. In addition to that, there are lots of Ukrainian people who have come across some new challenges every day since February. Unfortunately, I could not solve all their problems but I've tried to solve one of them.

## Problem

The people who have moved to Netherland and registered there have received some help and money from the government. But the problem is that they received a [card from BNG bank](https://www.bngbank.nl/Online-bankieren/betalingsverkeer/BNG-Prepaid-pinkaart) and the plane operation such as checking their current balance becomes challenging.

## Solution

I've created the telegram bot that after two steps of registration has just one button check your balance and when you click it it will send you the current balance. There are two options. The first one is just click to on the [link](https://t.me/prepaid_saldo_bot) and go through some steps of registration. The second is to set up the project on your own `aws profile`. If you choose this way please just open the [repository](https://github.com/pedchenkoroman/presaldo-telegram-bot) and follow the steps.

## Stack

It seems to me that if you are a developer you want to know what I use. First and foremost I use `aws cdk` to define resources. If you do not know what is it please open this [one](https://docs.aws.amazon.com/cdk/v2/guide/home.html). Even though it is a really small bot and it can only parse the site and send the message with the current balance it uses at least four resources such as [Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html), [DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html), [API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html) and [EventBridge](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html). The first lambda is responsible for registering and handling the check balance event. The second lambda uses the puppeteer layer and receives the current balance and stores it. And last but not least lambda is invoked when the record with the new balance is changed and sent to the new balance. In addition to that, I have one more lambda and the main idea of this one is as a guard. It checks one specific header.


## Architecture diagram

![Architecture diagram](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gwwieb3g6uo6mk60vcpq.png)

## Conclusion

So, I published the bot to some telegram channels and I was wondered that more than 50 people are using it. Frankly speaking, I am happy that my knowledge and experience help someone. Thank you and take care.
[Ruby][Sorbet][tapioca] What to do when gem type definition conflicts cannot be resolved
Tags: sorbet, ruby, rails
Published: 2022-08-21 04:07:38

---
title: [Ruby][Sorbet][tapioca] What to do when gem type definition conflicts cannot be resolved
published: true
date: 2022-08-17 08:22:16 UTC
tags: ["Sorbet", "Ruby", "Rails"]
canonical_url: https://note.hiko1129.com/posts/1660724536/
---

<a href="https://note-hiko1129-com.translate.goog/posts/1660724536/?_x_tr_sl=ja&_x_tr_tl=en&_x_tr_hl=ja&_x_tr_pto=wapp" target="_blank" rel=”noopener noreferrer”>Translate ja to en</a>

## 前提
* tapiocaを使っている
* sorbet-typed(などのコミュニティの型定義)とコンフリクトしている
* `bundle exec srb rbi suggest-typed`で解消されない

## 対応
下記のようにtapiocaのconfigのexcludeに対象gemを追加。

sorbet/tapioca/config.yml
```
gem:
  exclude:
    - gemA
```

試してはいないがおそらくtyped_overridesでfalseにするなどでも解消できるはず（気が向いたら試す）。
```
gem:
  typed_overrides:
    gemA: "false"
```

## 参考
* https://github.com/Shopify/tapioca#excluding-a-gem-from-rbi-generation
How to retain form values after reloading your browser
Tags: sessionstorage, form, input, reload
Published: 2022-08-17 08:06:00

I was working on my phase 3 project for Flatiron School where I had to build a `<form>` element on the front-end side. As you already know, form usually contains `<input>` elements with `value` attribute. 

One thing I realized as I was testing on submitting my `<form>`, my form values would not be retained when the browser reloads. 

Maybe it is trivial if the form has very few `<input>` but what if you need to build a form that creates a person's profile by using their information such as past employment history or a personal background information where it requires to have at least 100-200 words? I assume in that case most of users do not want to re-type over again.

Regardless of how many inputs a form should have, a form retaining its value(s) under unexpected circumstances is more ideal than not able to retain its value(s) in my opinion.

To prevent this incident, I spent some times searching for a solution to the problem and as always.. **MDN Web Docs** already had the answer.

A <u>short scrollbar length</u> article about [sessionStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage).

---

> A page session lasts as long as the tab or the browser is open, and survives over page reloads and restores.

According to the article, one of the sessionStorage features does exactly what I was looking for. I tested it on my `Developer Tools`. 

![setting a sample value in the browser tab sessionStorage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dh5f4zjjq7lzaib5wwh5.png)

`sessionStorage.setItem("thisIsKeyName", "this is value stored in sessionStorage")` takes two arguments. First argument is the key name for your value, second argument is the value you want to store in the sessionStorage. 

---

![The value is stored in the browser tab sessionStorage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/smxpf57h1oneqhewkl74.png) Go to `Developer Tools`, click on `Application` tab and on the left side, you can check your stored value in the `Session Storage` (a `keyName` and `value`...it's an `object`!)

To obtain your session stored value, simply assign it to a variable. 

![getting your stored value](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w8eoi3mc8vcw7v23k2cc.png)

Whatever the value may be, once it is in the sessionStorage, your browser will not lose it, also you can use the value later on just like you get it out from your "storage" when you need it.

---

**Resources:**
1. Cover image: https://depositphotos.com/stock-photos/storage.html

2. MDN Web Docs: https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage
😱 Anakin veut envoyer de (très) gros SMS depuis son terminal ⌨️
Tags: news, showdev, ux, motivation
Published: 2022-08-17 08:00:09

## 🪝 Pitch

Anakin a entendu qu'il existait un `cli` nommé `OPT-SMS` qui permet d'envoyer des textos de taille supérieure à 160 caractères depuis le terminal... et il le veut sans attendre ‼️

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


## 👴 Histoire de la limite

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/paqejpt00doo9wv9vwvd.png)](https://www.twilio.com/docs/glossary/what-sms-character-limit)

## 🍿 Showtime

{% youtube oqrSA4ueUIo %}

🙋 La prochaine étape sera la démo de cette feature ✨

## 🔖 Ressources

- [SMS Character Limit](https://www.twilio.com/docs/glossary/what-sms-character-limit)
- [SMS (stands for Short Message Service)](https://www.twilio.com/docs/glossary/what-is-an-sms-short-message-service)
- [`GSM-7` encoding](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding)
- [Maximum Message Length with Twilio Programmable Messaging](https://support.twilio.com/hc/en-us/articles/360033806753-Maximum-Message-Length-with-Twilio-Programmable-Messaging)
Using dotenv (.env) in Python
Published: 2022-08-17 07:47:00

**dotEnv** is a lightweight package that automatically loads environment variables from a **.env** file into the process. To use dotenv in your project, first run this command on terminal:

`pip install python-dotenv`

To use it in your project, follow these insturactions:

Create **.env** file in your project
Open it and sign variables to it
``` py
# .env file
TOKEN = "This is a token"
PREFIX = "prefix is !"
```
Open the file where you want to use **.env** variables
```py
import os
from dotenv import load_dotenv

load_dotenv()

# those are example functions
print(os.get_env("TOKEN")) # This is a token
print(os.get_env("PREFIX")) # prefix is !
```

### Important!
When using git, **don't** forget to add **.env** to **.gitignore**. If its private repositry, you don't need it.
Update Hugo with its theme
Tags: hugo, webdev, staticsite
Published: 2022-08-17 07:29:00

I used to use [hugo-cactus-theme (Cactus Theme)](https://github.com/digitalcraftsman/hugo-cactus-theme) as the Hugo theme for `https://tnir.gitlab.io` since its inception in 2017.
At that time I could not take time to choose the theme carefully and neither have I until this week.

I found the theme I chose was deprecated and have used Hugo 0.62.2 to build the site.

![Pathway to healthy build system](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2f3adfviils9i7o3hzlt.jpeg)

As some breaking changes happened in Hugo 0.93, I was not able to directly update it to the latest and I needed to update the system to the latest (Hugo 0.101.0) in this way :sob:

Choose your theme for website very carefully and create your own if you can :four_leaf_clover:
[Redis Hackathon Submission Post Placeholder Title]
Tags: redishackathon
Published: 2022-08-17 07:26:21

[Instructions]: # (To submit to the Redis Hackathon on DEV, please fill out all sections. DELETE ALL NOTES, reminders, and guidelines before publishing.)


### Overview of My Submission
[Note]: # (Share what you built, how you built it, and the inspiration behind the idea! Please make sure the project links to the appropriate GitHub repository, and includes the [MIT](https://choosealicense.com/licenses/mit/), [Apache](https://www.apache.org/licenses/), [BSD-2](https://opensource.org/licenses/BSD-2-Clause), [BSD-3](https://opensource.org/licenses/BSD-3-Clause), or [Commons Clause](https://commonsclause.com/) license and a README.)


### Submission Category: 

[Note]: # (Select between Minimalism Magicians, Microservice Mavens, MEAN/MERN Mavericks, Wacky Wildcards – Descriptions of requirements listed in the announcement post.)

### [Optional: Video Explainer of My Project]

[Note]: # (This is where you can embed the optional bonus video you created to accompany your submission. Ensure your video is published publicly to YouTube and you’ve used the embed tag here to share it with us. By opting to include a video, you will be eligible for BONUS prizes. Learn more in the announcement post.)

### Language Used
[Note]: # (Select the language you used for your project – must be one of the following: C#/ASP.NET Core, Java/Spring, JS/TS/Node.js, Python)


### Link to Code

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% embed link_to_your_repo %}` to share a GitHub repository)

BTW, your Github code’s README file should contain the details as [per this template](https://github.com/redis-developer/hackathon-docs/blob/main/README.md).

### Additional Resources / Info

[Note:] # (Be sure to link to any open source projects that are using your workflow!)

[Note:] # Screenshots/demo videos are encouraged!

### Collaborators

[Note]: # (Be sure to include the DEV usernames of your collaborators, if any. Prizes for winning projects with multiple collaborators will be sent ONLY to the person who posts this submission and they will distribute the prize evenly.)

[Note]: # (All collaborators with DEV profiles listed here will receive a badge, however, prizes including sticker packs will only be sent to the member who publishes the post, with the person expected to distribute the prizes evenly amongst their collaborators.)

[Reminder]: # (Submissions are due on August 29th, 2022 @ 11:59 PM UTC).

- - - 

[Note]: # (Please ensure  that the footer content below is part of your post when publishing. Please delete this note in parentheses but do not delete the content below.)


* _Check out [Redis OM](https://redis.io/docs/stack/get-started/clients/#high-level-client-libraries), client libraries for working with Redis as a multi-model database._
* _Use [RedisInsight](https://redis.info/redisinsight) to visualize your data in Redis._
* _Sign up for a [free Redis database](https://redis.info/try-free-dev-to)._
Can anyone help me with my statistics assignment?
Tags: statisticsassignmenthelp, education, university, domystatisticsassignment
Published: 2022-08-17 07:24:49

Can anyone help me with my statistics assignment? If this is your question, then you have arrived at your destination to solve your **[statistics assignment help](https://www.statisticsassignmentexperts.com/)**. We solve and write error-free answers using precise statistics, formulae, and equations. If you dread the deadline submission, place your order to hire our statistics assignment to help complete it on time. You can pay us to avail solutions on topics like SPSS, STATA, Excel, linear programming, probability, econometrics, R programming assignment, and more.

Statistics is a very important subject for students, but the concepts are difficult to understand and apply correctly. The student often needs a lot of practice. Statistics assignments are difficult to solve as there are many techniques that are not easy to learn. So, if you are finding it difficult to complete your statistical assignments on time, take the help of our team of statisticians. We’ll help you with everything from basic descriptive statistics to advanced regression analysis in an engaging and interactive way. Our experts follow all university guidelines while writing statistical solutions. 

Below are some topics on which our eminent writers of statistics assignment help service can guide you.

- The analysis of categorical data
- Linear regression
- Mean and variance of random variables
- Conditional probability
- Correlation
- Binomial distributions
- Multiple linear regression
- Comparison two means
- Analysis of statistical graphs
- Numerical summaries

Conclusion
If you are looking for someone to **[do my statistics assignment](https://www.statisticsassignmentexperts.com/do-my-statistics-assignment.html)**, you have one We always welcome students if they have any questions, don't hesitate and feel free to contact us for statistics support.
Yunohost 11 released
Tags: news, yunohost, cloud
Published: 2022-08-17 07:17:59

Hello a great news today yunohost released a new version. Based on debian 11. I have personally done the update on my raspberry pi3 installation and that's rock, thanks a lot to the yunohost teams.

https://twitter.com/yunohost/status/1557423099603259392?t=lvEvdqnxAw2j4mrex5FsAg&s=19

A