teleren/devto huggingface dataset:
DAY 12 - Count Good Numbers
Tags: programming, learning, cpp, beginners
Published: 2023-06-15 16:52:57

Hello to anyone reading this. I am still relatively new to coding and this platform as well, so please feel free to drop any corrections/advice for me.
I am trying to do the 100 Day-Challenge of consistent coding and this is Day-12.The goal is simple. I will solve one or more than one leetcode/gfg problem a day and post what I learnt. I am confident that this will help me improve my concepts and help me be more consistent in my practice. Looking forward to a positive interaction with all of you.

## DAY - 12 Problem 1: Count Good Numbers


_A digit string is good if the digits (0-indexed) at even indices are even and the digits at odd indices are prime (2, 3, 5, or 7)._

_For example, "2582" is good because the digits (2 and 8) at even positions are even and the digits (5 and 2) at odd positions are prime. However, "3245" is not good because 3 is at an even index but is not even._
_Given an integer n, return the total number of good digit strings of length n. Since the answer may be large, return it modulo 109 + 7._

_A digit string is a string consisting of digits 0 through 9 that may contain leading zeros._


**Example 1:**

> Input: n = 1
> Output: 5
> Explanation: The good numbers of length 1 are "0", "2", "4", "6", "8".

**Example 2:**

> Input: n = 4
> Output: 400


## Intuition and Approach: 
Let's observe the problem closely. If we have a string of length 1. It means it has only 0 index.
Which means only even digits can come at this place. Hence the only possible options are 0,2,4,6 or 8.
2. Let's take this same approach for 2 digit length. Now another digit length is added. Hence our options are to put a prime number in it to make it good.
3. Our only options are the numbers 2,3,5 or 7. Hence a total of 4 options for prime and 5 options for even.
4. For every length, this remains constant that at every index we will either have 5 options or 4 options depending on the index position.
5. Looking closely odd length have 5^n/2 and even length 4^(n/2 + n%2) multiplied.
Hence this will be our approach.
6. We will use a simple recursion program to find the power of the numbers and use math to find the final result.

## Code:

```
long long power(long long x, long long n){
        if(n == 0){
            return 1;
        }
        long long ans = power(x, n/2);
        ans *= ans;
        ans %= 1000000007;
        if(n%2==1){
            ans *= x;
            ans %= 1000000007;
        }
        return ans;
    }
    int countGoodNumbers(long long n) {
        long long odd, even;
        odd = n/2;
        even = n/2 + n%2;
        return (power(5,even) * power(4,odd) % 1000000007);
        }
```
**Complexity Analysis:**

> Time Complexity: O(logN)
> Space Complexity: Recurion Stack
Celebrating 2500 Followers on dev.to - A Journey of Learning and Growth!
Tags: discuss, codenewbie, news, community
Published: 2023-06-15 16:38:00

I am beyond excited to share a major milestone in my journey on dev.to - I have just reached 2500 incredible followers! 🎉

🔥 It has been an exhilarating experience connecting with the vibrant developer community on this platform. I want to express my heartfelt gratitude to each and every one of you for your continuous support, engagement, and encouragement. This achievement would not have been possible without you all!

A Journey of Learning and Collaboration:

Throughout this journey, I have had the privilege of engaging with fellow developers, tech enthusiasts, and industry experts from around the world. The collaborative spirit and knowledge-sharing on dev.to have been truly inspiring. The thought-provoking discussions, insightful comments, and valuable feedback have played a crucial role in my growth as a developer.

Exploring New Technologies and Ideas:

Being part of the dev.to community has allowed me to explore a vast range of technologies, frameworks, and programming languages. The platform's diverse content has broadened my horizons and provided me with fresh perspectives on solving complex problems. The articles, tutorials, and project showcases shared by fellow developers have been a constant source of inspiration for my own projects.

Contributing to the Developer Ecosystem:

As I celebrate this milestone, I am even more motivated to contribute back to the developer ecosystem. I am committed to sharing my experiences, insights, and knowledge through thoughtfully crafted articles, tutorials, and tips. Together, we can continue to foster a culture of learning, collaboration, and innovation.

Joining Forces for Future Growth:

If we haven't connected yet, I invite you to join me on this exciting journey. Let's connect, engage, and learn from each other. The strength of the dev.to community lies in our collective wisdom, and together we can create amazing things.

Thank you once again for being a part of this incredible journey, and here's to many more milestones and shared successes!
Craft your perfect VSCode experience.
Tags: development, dx, productivity, vscode
Published: 2023-06-15 16:28:36

The Visual Studio Code, most of us love this code editor. Didn't we but **"Love, like any flame, can grow dim with time if not tended to with care and effort."** 
Here is the following tips to make most of your code editor.

## Themes

Themes are great to get tailor experience of code editor.

Here are some of my favorite themes.

1. Dracula `dracula-theme.theme-dracula`
2. One atom `akamud.vscode-theme-onedark`
3. Monokai `monokai.theme-monokai-pro-vscode`
4. Batman Mono `IsaGoksu.batman-mono-theme`
5. Abyss `MatongoMulindi.abyss`

Just try this ones or search `@category:"themes" ` in your extension bar.

## Fonts

Font style matters most in code editor. you can use any mono type font available in your system. I recommend using [Google Fonts](https://fonts.google.com/). 

Some of my favorite fonts are - 
- Space Mono
- Ubuntu Mono
- Roboto Mono

## Icons

There are bunch of libraries, tools and frameworks we use while development. It will be great that we get there icons right in our IDE. Here's a look using icon themes in vscode.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ekl823vgjjnoa69h53a.jpg)

Some of my favorite icon themes are - 
- Atom Material Icons
- Material Icon theme

for more icon themes search `tag:icon-theme` in extension bar.

You can also change icons on the sidebar in vscode `settings > themes > product icon themes`

## Extensions

- Tailwind Fold `stivo.tailwind-fold` - want to view your markup code and stuck with multiple lines of unwanted tailwind classes use this tool. It will hide the tailwind utility classes which gives you clear idea of your markup.

- Git Graph `mhutchie.git-graph` - Most of us developers uses version control systems like git. We can see commits with a GUI using git graph right in IDE.


## Extra Tips

- if you're using git bash in windows machine you can install [`oh-my-bash`](https://github.com/ohmybash/oh-my-bash) for themes available for terminal.
- Horizontal scroll your code is always a pain. you can use word-wrap just hit `alt+z`. 

This tips and themes are slightly oriented for web developers but feel free to comment down your suggestions below.

Hope you find this blog informational. Consider to shower it with your love.

Share about this blog on socials - <a class="twitter-share-button" href="https://twitter.com/intent/tweet?text=Hey%20Folks%20%E2%9C%A8%2C%20%20read%20this%20blog%20about%20craft%20your%20perfect%20vs%20code%20experience%20by%20%40KunalPy3.%20Loved%20it%2C%20definetly%20recommend%20you%20to%20read" data-size="large">
Tweet
</a>

Let's Connect.
[LinkTree](https://linktr.ee/kunal.dev)
Deno Deploy Static Site
Published: 2023-06-15 16:26:13

[youtube video tutorial](https://youtu.be/qFJHedbTwOI)

Use deployctl and Github Actions with a deploytcl task to deploy static sites to Deno Deploy

[deploy static html site](https://deno.com/deploy/docs/static-site)
[deploy vite](https://deno.com/deploy/docs/vite)

Steps:
- Create the static site content (either html etc or run the vite and then build, move into dist dir)
- run the deployctl script using http file server
  - You'll need the access token to run the deployctl from your command line 
  - when add the repo in settings with github action in a subsequent step and 'link' the repo to your account, you won't need the access token to deploy
```bash
export DENO_DEPLOY_TOKEN=abcdefg
cd dist
deployctl deploy --project=careful-goat-90 https://deno.land/std@0.171.0/http/file_server.ts
```
- Make sure you can get a deployment with that. Then we'll link the project to your github and use github action
```bash
deno run --allow-read --allow-write --allow-env npm:create-vite-extra@latest
```

the github action
```bash
name: Deploy

on: push

jobs:
  deploy:
    runs-on: ubuntu-latest

    permissions:
      id-token: write # This is required to allow the GitHub Action to authenticate with Deno Deploy.
      contents: read

    steps:
      - name: Clone repository
        uses: actions/checkout@v3

      - name: Install Deno
        uses: denoland/setup-deno@v1

      - name: Build
        run: deno task build

      - name: Deploy to Deno Deploy
        uses: denoland/deployctl@v1
        with:
          project: late-duck-63 # the name of the project on Deno Deploy
          entrypoint: https://deno.land/std/http/file_server.ts
          root: dist
```
Life Hacks in Coding: Boosting Your Development Skills
Tags: javascript, webdev, programming, tutorial
Published: 2023-06-15 16:12:07


Coding is a dynamic and ever-evolving field that requires continuous learning and improvement. To become a proficient developer, it's essential to stay updated with the latest techniques and adopt life hacks that can enhance your productivity and efficiency. In this article, we'll explore some valuable development tips and tricks that can help you level up your coding game. From smart code snippets to useful tools and organizational strategies, we've got you covered.

**Smart Code Snippets:**

Code snippets can be incredibly handy for speeding up your development process and reducing repetitive tasks. Here are a few examples of code snippets that can save you time:

_Example 1: Generating a Random Number in JavaScript_

```
function getRandomNumber(min, max) {
  return Math.floor(Math.random() * (max - min + 1) + min);
}

const randomNumber = getRandomNumber(1, 100);
console.log(randomNumber);
```
_Example 2: Checking if an Array Contains a Specific Value in Python_

```
my_list = [1, 2, 3, 4, 5]
value = 3

if value in my_list:
    print("Value found!")
else:
    print("Value not found.")
```


**Utilizing Tables for Data Representation:**

Tables are an effective way to present data in a clear and organized manner. They can be especially useful when working with complex datasets or presenting information in a visually appealing format. Let's consider an example:
Table: Employee Information

```
bash
Copy code
| Employee ID | Name       | Department | Salary  |
|-------------|------------|------------|---------|
| 001         | John Smith | IT         | $60,000 |
| 002         | Lisa Brown | HR         | $50,000 |
| 003         | Mark Davis | Finance    | $70,000 |
```

**Leveraging Helpful Tools:**

Several tools can significantly enhance your coding experience and streamline your workflow. Here are a few popular ones:

- Integrated Development Environments (IDEs): IDEs like Visual Studio Code, PyCharm, or Eclipse provide advanced features such as code auto-completion, debugging tools, and version control integration.
- Package Managers: Tools like npm (for JavaScript), pip (for Python), or Composer (for PHP) simplify the installation and management of third-party libraries and dependencies.
- Version Control Systems: Git, Mercurial, or Subversion enable efficient collaboration, code versioning, and easy project management.


By incorporating these life hacks into your coding routine, you can boost your development skills and become a more efficient and effective programmer. Remember, continuous learning, experimentation, and adopting smart strategies are key to mastering the art of coding. So go ahead, implement these tips, and take your coding abilities to the next level!
Solana Wallets Ultimate Map
Tags: web3, blockchain, wallet, cryptocurrency
Published: 2023-06-15 16:03:49



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

You've likely seen numerous Solana wallet maps with scant details. But it's 2023 - wallets are more than just coin sending tools.

Ready to delve deeper and see what wallets can actually do?

Let's check our first Ultimate Solana Wallets map

## Hardware Wallets

Hardware wallets are physical, electronic devices designed to securely store private keys for cryptocurrencies

Solana is now supported by wallets such as

- Ledger
- Keystone
- Ellipal
- TokenPocket
- Arculus

## Web-based Wallets

Web-based wallets are digital ledgers accessible and manageable through a web browser.

- Wallets like 
- Solflare
- NuFi
- Cashmere
- Goki
- Snowflake
- Zerion

provide a web browser interfaces for your addresses

## Mobile wallets

Tons of Solana wallets provide mobile versions for their users:

- BitKeep 
- imToken
- Frontier
- Phantom
- Glow
- Zelcore
- Trust

## Browser extensions

Browser extensions have become synonymous with crypto wallets and are indispensable tools in the crypto industry

- The most popular ones are 
- Phantom
- Trust
- Math
- BitKeep
- Coinbase Wallet
- Glow

## Desktop Wallets

Desktop wallets enable users to interact with crypto from their laptops. Some noteworthy ones include 

- Atomic Wallet
- Exodus
- Math
- Brave
- Zelcore_io
- Infinity Wallet
- TorusLabs

## Staking Support

Many wallets implemented staking features in their interfaces, including 

- Phantom
- Coinbase Wallet
- Trust
- Solflare
- imToken
- Frontier

## NFT Support

NFTs are now integral parts of almost every wallet

You can interact with your NFTs in most Solana ecosystem wallets such as 

- Phantom
- Solareum
- Glow
- Backpack
- Zerion
- Snowflake
- @yiToken

## Swaps Support

Swaps enable you to exchange your crypto directly in your wallet, simplifying trading and facilitating crypto adoption for new users

- Wallets like 
- Boxch
- Solflare
- Saifu
- Coinbase Wallet
- Zelcore
- Solareum
- BitKeep

The Solana wallets ecosystem is growing day by day

If we've missed any important wallets, feel free to add your suggestions in the comments or DM us.

We also plan to publish new Ultimate Maps about other web3 tools. Stay tuned!

If you want to learn more about Solana wallets or other web3 tools – check http://web3stack.me
Books Every Software Engineer Must Read in 2023
Tags: php, architecture, booksforsoftwareengineers, cleancodebooksummary
Published: 2023-06-15 15:56:33

---
title: Books Every Software Engineer Must Read in 2023
published: true
description: Enhance knowledge in data-intensive applications, clean code, software architecture, and more

tags: php, architecture, BooksForSoftwareEngineers , CleanCodeBookSummary
cover_image: https://anastasionico.uk/img/blog/books-every-software-engineer-must-read-in-2023.jpeg
# Use a ratio of 100:42 for best results.
# published_at: 2023-06-15 15:54 +0000
---

Imagine you’re on a roller coaster ride, soaring through twists and turns, feeling the rush of adrenaline.

Now, picture yourself on that same ride, but that never changes.

A predictable loop that offers no excitement or surprises.

 

FOREVER.

 

Which one would you choose? Most likely, the first one.

Similar to the euphoria of a roller coaster, a web developer’s career is a continuous journey filled with opportunities for growth and advancement.

 

However, to embrace this journey and progress in your career, it’s crucial to learn new skills and stay up to date with the ever-evolving web development landscape.

Why is it important to learn and stay up to date?

Well, let me share a story with you.

 

At my first job as a developer back in the day I was living in the South of Italy, and I met one of my first bosses.

He was a talented web developer named Riccardo. 

He was highly skilled in his craft and had a strong foundation in various programming languages. 

Riccardo thought they had it all figured out, comfortable in his knowledge and expertise.

However, as time went on, Riccardo began to notice a shift in the industry.

 

New technologies emerged, new demands for frameworks, and the demands of clients and users changed. 

Suddenly, Riccardo’s once-rock-solid skills seemed outdated and less relevant.

And our whole team was affected by it.

To stay relevant and excel in this dynamic field, it’s essential to cultivate a mindset of continuous learning. 

 

By regularly acquiring new skills, exploring emerging technologies, and staying up-to-date with industry trends, you position yourself for career growth, increased job prospects, and the ability to meet the evolving needs of clients and users.

 

In this article, I’ll share a few evergreen books that keep me relevant after 10+ years in this industry.

Let’s get started.

[Enhance Your Software Engineering Journey: Must-Read Books for 2023!](https://anastasionico.uk/blog/books-every-software-engineer-must-read-in-2023)
Once a Maintainer: Josh Branham
Tags: opensource, rails, devsecops
Published: 2023-06-15 15:55:32

This week for Once a Maintainer we talked to Josh Branham, contributor to the popular attr_encrypted gem and the person who solved the Rails 7 incompatibility issue. We talked with Josh about custom forking, the guts of Rails, and how to get to the right person in an open source project.[](https://open.substack.com/pub/onceamaintainer/p/once-a-maintainer-josh-branham?r=2773u5&utm_campaign=post&utm_medium=web)
LifeLine Blog #1
Tags: spanish, webdev, development, blog
Published: 2023-06-15 15:53:28


## Razón de su existencia

Siempre he sido una persona que le da bastante prioridad a su tiempo y trata en lo máximo posible usarlo en cosas productivas, por esta razón llevo ya un tiempo buscando una aplicación que me permita ser más eficiente con el mismo, pero ya me canse de esperar, fue cuando un día desperté por la mañana y me dije a mí mismo eres programador ya es hora de que plasmes eso que tienes en la mente en código y a su vez en algo funcional y quizá con esto también ayudes a otras personas que podrían tener el mismo problema que tú.

## El mercado

Las aplicaciones que existen actualmente en el mercado no me cumplen en su totalidad lo que yo necesitaba, ya que simplemente se limitan a ofrecerte ya sea un calendario o un gestor de tareas y era raro aquella que te ofrecía ambas, pero yo necesitaba más, yo quería algo que me permitiera analizar mi día a día más allá de solamente organizarlo y con esto poder tomar acción sobre el mismo, sé que por el momento puede ser algo difícil entender lo que trato de explicar en esta primera entrada del blog, pero cuando puedan analizar por su cuenta la aplicación quizá entiendan mejor todo esto.

## Avances

A la fecha en la que se publica esta entrada los avances no son muy significativos, por lo tanto, no sirven como ejemplo para todo lo que trato de expresar en mis anteriores palabras, lo que podrán observar si acceden al <a href='https://lifeline.dowar.xyz' target='_blank'>sitio web</a> es lo siguiente:

- Calendario semanal.
- Gestor de tareas con dos vistas.
  - Clásico(checklist).
  - Kanban,
- Integración con wakatime(por el momento solo mostrar total del día).

## Que sigue?

Antes de continuar con nuevas funciones necesito pulir lo poco que mencione en el punto anterior, pero después de eso quiero agregar lo siguiente:

- Integración con otros servicios como Todoist, Google calendar, Google fit, etc.
- Un gestor de extensiones con el cual puedas tener solamente aquello que desees utilizar de la aplicación y así evitar que esta tenga un tamaño excesivo e innecesario.
- Una línea de tiempo de todas las actividades que realizas, para lograr esto se usara lo siguiente:
  - Extensión de navegador que analizara las páginas que visitas y el tiempo que permaneces en ellas.
  - Extensión de la aplicación móvil/escritorio realizará lo mismo que la extensión del nevegador solamente que en tu dispositivo móvil y computadora.
- Capacidad para guardar información(documentos) sería algo parecido a un bloc de notas pero con unos cuantos añadidos.

## Esto apenas comienza

Sé que se ve como un proyecto demasiado ambicioso y más porque solamente está siendo desarrollado por una única persona, pero a pesar de eso no pasa ni un solo día en el que no esté trabajando en hacer este proyecto realidad.

## Agradecimientos

Gracias por haber llegado hasta este punto y espero que este proyecto te llega a ser de utilidad.
DAY1: Starting Providing Solution of GFG SDE Sheet
Tags: programming, dsa, cpp
Published: 2023-06-15 15:26:18

Hello Folks!! Welcome to the DAY1 of the 'GFG SDE SHEET Solution'! In this blog post, I will cover all the questions of the GFG SDE SHEET with a effective and with a easy approach including telling you about the concepts related to that topic.

I preferred C++ as my coding language, for placements purpose u can do it with any language. My basic intension is to go through all the concepts and feels confident after doing 100+ questions. 


**Question Heading:** **BINARY SEARCH**
Ques: Given a sorted array of size N and an integer K, find the position(0-based indexing) at which K is present in the array using binary search.

Ans:

**What is binary search?**
Binary search is the search technique that works efficiently on sorted lists. Hence, to search an element into some list using the binary search technique, we must ensure that the list is sorted.

Approaches:
1. Illiterate the array till the length of the array which is(n) where u can go for the **Linear Search** and u have to check the every element of the array with the (k), if it is in the array , then print the index(i) else print -1 symbolize the element is not found in the array.

// User function template for C++
class Solution {
  public:
    int binarysearch(int arr[], int n, int k) {
        for(int i=0;i<n;i++){
            if(arr[i]==k){
                return i;
            }
        }
        return -1;
    }
};


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

2. Array should be in increasing order, **Binary search** for finding the element(k) in the array, then define the lower=0 and upper=arr.length()-1, to cover the whole array and then run the loop while the lower is less than upper, find the middle element using mid=(lower+ upper)/2, then check if (arr[mid]<k) then make lower=mid+1 and run the loop, if mid==k return mid, if(arr[mid]>k) then make upper=mid-1, if not found then return -1;

class Solution {
  public:
    int binarysearch(int arr[], int n, int k) {
        int lower=0,upper=n-1;
        while(lower<=upper){
            int mid=(upper+lower)/2;
            if(arr[mid]==k){
                return mid;
            }
            else if(arr[mid]>k){
                upper=mid-1;
            }
            else{
                lower=mid+1;
            }
        }
        return -1;
    }
};


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


Congratulations you have successfully learned the Binary Search Concept at the completion of the DAY 1!!
Stay tuned for the next blog, Happy Coding!!
Fixing require LoadError as an example for the matrix gem
Tags: ruby, rails, pdf
Published: 2023-06-15 15:13:13

Some gems like matrix or rexml were added at some point to ruby becoming so-called default gems. But they may be removed from being default in newer ruby versions, resulting in broken builds like for us with prawn.

In most such cases it is the best to update the used gem (for us prawn) to a newer version, which defines the missing gem as required for this specific ruby version.


Read the full article here at qameta.com: [Fixing require LoadError as an example for the matrix gem](https://qameta.com/posts/fixing-require-loaderror-as-example-for-matrix-gem/)