teleren/devto huggingface dataset:
Basic React JS Router and Components
Tags: react, router, webdev
Published: 2024-06-05 12:35:55

[React JS Router](https://www.almabetter.com/bytes/tutorials/reactjs/basic-reactjs-router) is a library that enables navigation between different components in a React application. It provides a <Router> component to manage the routing functionality. Components can be rendered conditionally based on the current URL using <Route> components, which define paths and corresponding components. Navigation between routes is achieved using <Link> components, which generate anchor tags. Components used with React Router include BrowserRouter, Route, Switch, Link, and NavLink. These components facilitate the creation of single-page applications with multiple views, enabling seamless navigation and rendering of different components based on URL changes.
ID document Liveness Check
Tags: webdev, ai, android, identity
Published: 2024-06-05 12:31:12

An ID document liveness check verifies the authenticity of an ID by confirming the presence of a live person during verification. It uses advanced technology to ensure the ID belongs to the person presenting it.

Identity verification is crucial in today’s digital age. Businesses need to ensure that the person providing an ID is indeed the rightful owner. ID document liveness checks play a vital role in this process. They combine facial recognition and artificial intelligence to detect any signs of fraud.

This technology helps prevent identity theft and unauthorized access. It is widely used in banking, e-commerce, and other sectors where security is paramount. Implementing an ID document liveness check can significantly enhance trust and security for both businesses and customers.

For more article:
https://miniai.live/id-document-liveness-check/
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o0sznpsq9vd4vtuk8i0o.png)
Top Printing Services | Business Cards | Brochures | Flyers
Published: 2024-06-05 12:24:24

[Get premium printing solutions for brochures, flyers, and business cards. We offer business card printing, digital business cards, and brochure design. Find business card printing near you and create stunning print media with our brochure maker and Canva business cards.](https://bhagirathtechnologies.com/services/7)
What is Blum? How can you earn on it?
Tags: blockchain, web3
Published: 2024-06-05 12:23:19

## What is the difference from Notcoin?
Blum itself differs in essence from Notcoin, as Notcoin was a simple clicker game where you farmed coins and then sold them on the exchange for real money after listing (the release of securities on the stock exchange). But Blum is a different story. Blum is planned as a decentralized exchange where you can trade various tokens. In the game, you can also farm your own token called BP (Blum Point). It can be farmed in two ways: through a mini-game called "Drop game," where green targets and bombs fall on you, and you need to collect the targets and avoid the bombs because collecting bombs resets your progress in the mini-game. Crystals also fall, and you need to collect them as they stop the time in the mini-game. BP can also be farmed by launching "farming." It's not too complicated; you can simply start farming every 8 hours and go about your business, then collect your BP after 8 hours.

## How to start farming BP?
To start farming, you need to join the closed Blum bot. You can only join it through an invitation, and the number of invitations is limited. Specifically for you, I will leave two links through which you can join Blum.
[1 link (main)
](t.me/BlumCryptoBot/app?startapp=ref_x0AvnsMaRg)
[2 link (if invitations on the first one are exhausted)
](t.me/BlumCryptoBot/app?startapp=ref_svHrSI5fUu)
## Why can you earn 100% on Blum?
It all depends on the developers of this application. The leading developer of this application is Vladimir Smirkis, a former director of Binance (the largest cryptocurrency exchange that left Russia due to certain political events) in the CIS. Blum also won funding in a competition for the most promising crypto projects from Binance.

## When will the cabbage fall into your lap?
According to various insights, you will be able to receive cabbage (earnings) from BP by the end of 2024. However, there are rumors that Blum plans to add farming and other tokens that could have already been listed. This means that you can earn money from Blum even before the end of this year.

## What are the conclusions?
So, if you missed out on Notcoin and missed the opportunity to earn $400-$1000 (which is equivalent to 35,000 rubles to 88,000 rubles), then you definitely need to farm Blum. And even if you didn't miss out, extra money won't hurt. Plus, Blum only requires less than 5 minutes of your time per day.
Know the Cost of Building a Dating App by Fulminous Software
Tags: costofdatingapp, datingappcost
Published: 2024-06-05 12:20:42

So you have a brilliant idea for a revolutionary dating app! But before you launch into development, a crucial question arises: **[how much will it cost to build a dating app](https://fulminoussoftware.com/how-much-does-it-cost-to-build-a-dating-app)**? The answer, like finding true love, can be a little complex.


This guide will unveil the factors that influence the cost of building your dream dating app
● Features, Features, Features: The more features your app boasts, the
higher the development cost. Basic features like profiles, matching
algorithms, and messaging are essential, but adding bells and whistles like voice chat, video calls, or unique personality tests will increase the price tag.
● Complexity Matters: A simple app with a straightforward design will be less expensive to develop than a feature-rich app with a complex backend system.
● Location, Location, Location: Developer rates can vary depending on their location. Hiring developers from regions with lower costs can be an option, but communication and time zone differences might need to be
considered.
● In-House vs. Outsourcing: Building your development team in-house offers greater control, but it can be expensive. Outsourcing to a development agency can be more cost-effective, but do your research to ensure a good fit.


Beyond the Price Tag:
While cost is important, don’t make it the sole deciding factor. Consider the development company’s experience, communication style, and ability to understand your vision.


A Rough Estimate:
Developing a basic dating app can range from $25,000 to $50,000, while
feature-rich apps can climb to $100,000 or more. Remember, this is just an estimate!


Building Your Dream App:
Fulminous Software understands the importance of creating a dating app that connects people. We offer experienced developers, clear communication, and a focus on your vision to bring your app to life.


Ready to find your perfect match in the app world? Contact Fulminous Software today for a free consultation! Let’s discuss your idea, explore your budget, and build an amazing dating app that sparks connections.
BlazeSQL
Published: 2024-06-03 10:49:23

[BlazeSQL](https://www.blazesql.com/) is for any company that has an SQL database and non-technical employees that need to get data insights from the database. Especially if they frequently need to answer new questions, so they are always asking their technical colleagues to do it for them. This is annoying for the technical colleagues who have to answer these requests all the time, and it’s annoying for the non-technical people because they always have to ask and wait.


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

Most companies have their data in SQL Databases, and this data contains important information that many employees in the company need in order to make informed, smart decisions. However, extracting this data (ex. to answer a question like “who are my top 3 customers this week?” usually requires writing SQL code to tell the database which data to return. Most people don’t know how to write SQL code and need to ask a technical colleague (wasting everyone’s time), and even if you do know SQL it takes effort to write the correct query.

BlazeSQL is analytics software (Web and desktop app) that uses AI to remove the technical effort from getting data insights. You just tell the chatbot what you want after connecting it to your database, and it does everything for you.

Originally it was actually mainly for technical users, and it just generated the SQL code which you could then copy out. But now, it can also run the code to get the data, graph it, and you can add it to a dashboard inside BlazeSQL. This means that now non-technical users can also use it, and not even see the SQL code. Ex. below is a video of the “non-technical mode” which doesn’t show the SQL code. You can see a video of the technical mode on blazesql.com
Accent Colors for Checkboxes and Radios
Published: 2024-06-05 12:17:05


Utilize **accent-*** utilities to modify the accent color of elements, ideal for customizing the appearance of **_checkboxes_** and **_radio buttons_** by replacing the browser's default color.

![Cover](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6o9ahim44xl2w93z0t13.png)

Here, I have given accent color accent-pink-500, you can customize the color according to your need.This comes handy if you want to customize the look of your check boxes and radio buttons according to your theme.

The code for it is given below:

```
<div class="mx-auto my-auto border h-[100px] w-[300px] rounded-md flex justify-center items-center gap-4 shadow-lg">
<label class="font-semibold font-serif">Accent Color</label>
<input type="checkbox" class="accent-pink-500 " id="checkbox" >
</div>
```

Thanks for reading!
Adaptive Artificial Intelligence in Business How Can You Implement it
Published: 2024-06-05 12:13:04

 Adaptive Artificial Intelligence (AI) represents a significant advancement in technology, enabling systems to learn from interactions and adapt their behaviors autonomously. Unlike traditional AI, which operates within a fixed scope, Adaptive AI can improve performance over time by adjusting to new data and changing conditions. This adaptability is achieved through machine learning, neural networks, and deep learning, making Adaptive AI particularly valuable in dynamic environments such as personalized medicine and autonomous vehicles. The evolution from traditional to Adaptive AI has been driven by advancements in computational power, data availability, and algorithmic innovations, transforming industries by enhancing operational efficiency, customer experience, and decision-making capabilities. 

    #rapidinnovation#AdaptiveAI #MachineLearning #AIInnovation #BusinessAI #AIIntegration

 link: https://www.rapidinnovation.io/post/adaptive-artificial-intelligence-in-business-how-can-you-implement-it
How I Overcame The Imposter Syndrome
Tags: webdev, beginners, programming, html
Published: 2024-06-05 12:00:00

The first law to having a long a healthy career in software development is to embrace your imposter.

We like to complain in the industry all the time about imposter syndrome. And it is a real psychological thing that some people have.

But I think we often claim that we are experiencing an imposter syndrome and we are not.

We are just programmers!

Let me give you an example. Myself, after over 10 software projects, every project I joined, and this includes the project I worked on last year.

For the first three months of that project, I'm swimming in frameworks I have never seen, patterns that are maybe somewhat new, weird aspects to the business that I have never encountered.

And yet everybody on the team wants to pretend that they are so experienced, that they know exactly what is going on.

But, if you are actually really intelligent, and you have any sense of self awareness, you will know that I don't know everything that is going on in the project.

And I think if you can become comfortable with that, and just accept that that is part of the job, you are going to have a long career in software.

Now, if you don't like that, you are probably in the wrong position.

Happy Coding!
Karl

P.S. For more tips and tricks, please [subscribe to my free weekly newsletter](karlgusta.substack.com).
The Fascinating Journey of Frontend and Web Development
Tags: webdev, javascript, programming, tutorial
Published: 2024-06-05 11:50:45




**Hello dev.to community!**

Today, let’s take a step back and explore the fascinating beginnings of frontend and web development. The journey from static HTML pages to dynamic, interactive web applications is nothing short of remarkable.

## **The Dawn of the Web**
In 1991, Tim Berners-Lee, a British scientist, introduced the World Wide Web to the public. The first website, hosted on Berners-Lee’s NeXT computer at CERN, was a simple, text-only page written in HTML. This marked the birth of web development as we know it.

## **HTML: The Foundation**
HTML (HyperText Markup Language) was the first building block of web development. It allowed developers to create and structure content on the web. Early web pages were static, consisting of plain text and basic hyperlinks.

## **Enter CSS: Styling the Web**
As the web grew, so did the need for more visually appealing and structured content. In 1996, CSS (Cascading Style Sheets) was introduced. CSS enabled developers to separate content from design, allowing for more sophisticated and consistent styling across websites.

## **JavaScript: Bringing Interactivity**
In 1995, Brendan Eich created JavaScript, a scripting language that transformed static web pages into dynamic, interactive experiences. JavaScript allowed developers to create real-time content updates, form validations, animations, and much more.

## **The Rise of Frameworks and Libraries**
As web development became more complex, frameworks and libraries emerged to streamline the development process. Libraries like jQuery simplified DOM manipulation and event handling. Frameworks like AngularJS, React, and Vue.js provided structured approaches to building scalable and maintainable web applications.

## **Responsive Design: Adapting to Devices**
With the proliferation of smartphones and tablets, responsive design became crucial. Introduced in the early 2010s, responsive design principles ensured that websites looked and functioned well on all devices, regardless of screen size. CSS media queries and flexible grids were key to this transformation.

## **Modern Frontend Development**
Today, frontend development is a vibrant and rapidly evolving field. Modern tools and technologies such as ES6+, Webpack, and TypeScript have further enhanced the developer experience. Progressive Web Apps (PWAs) and Single Page Applications (SPAs) represent the cutting edge of what’s possible on the web.

## **Conclusion**
From simple HTML pages to sophisticated web applications, the journey of frontend and web development has been driven by innovation and a desire to create better user experiences. As we look to the future, the possibilities are endless, and the web will continue to evolve in exciting and unexpected ways.

Thank you for joining me on this historical journey. Whether you're a seasoned developer or just starting out, it's always fascinating to see how far we've come and where we're headed next.
Simple Modal with Javascript
Published: 2024-06-04 23:01:01

This is a note that how to make a simple modal.

```html
<button class="show-modal">Show modal </button>

<div class="modal hidden">
      <button class="close-modal">&times;</button>
      <h1>I'm a modal window</h1>
      <p>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
        tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
        veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
        commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
        velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
        occaecat cupidatat non proident, sunt in culpa qui officia deserunt
        mollit anim id est laborum.
      </p>
    </div>
    <div class="overlay hidden"></div>

```

```css
.hidden {
  display: none;
}

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  background-color: #fff;
  padding: 6rem;
  border-radius: 8px;
  box-shadow: 0 3rem 5rem rgb(0 0 0 /.3);
  z-index: 99;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0 0 0 /.6);
  backdrop-filter: blur(4px);
  z-index: 1;
}

```

```Js
'use strict';

const modal = document.querySelector('.modal');
const overlay = document.querySelector('.overlay');
const btnCloseModal = document.querySelector('.close-modal');
const btnOpenModal = document.querySelectorAll('.show-modal');

const closeModal = function() {
  modal.classList.add('hidden');
  overlay.classList.add('hidden')
}

const openModal = function() {
  modal.classList.remove('hidden');
  overlay.classList.remove('hidden')
}

// if there are many open buttons
for (let i = 0; i < btnOpenModal.length; i++) {
  btnOpenModal[i].addEventListener("click", openModal);
}


btnCloseModal.addEventListener("click", closeModal);
overlay.addEventListener('click', closeModal);

// keyboard operation (Escape version)
document.addEventListener('keydown', function(e) {
  if(e.key === 'Escape' && !modal.classList.contains('hidden')) {
      closeModal();
  }
})


```

for -> forEach
```
// if there are many open buttons
for (let i = 0; i < btnOpenModal.length; i++) {
  btnOpenModal[i].addEventListener("click", openModal);
}
```
↓
```
btnOpenModal.forEach(btn => btn.addEventListner('click', openModal)
```
NextUI Theme Generator
Tags: webdev, ui, react, javascript
Published: 2024-06-05 11:44:41

I've been using [NextUI](https://nextui.org/) for quite some time, but I missed having a theme generator like other component libraries have.

So, I decided to create my own: [NextUI Theme Gen](https://nextui-themegen.netlify.app/). Feel free to give it a try.

If you like it, don't forget to leave a star on [GitHub](https://github.com/xylish7/nextui-theme-generator). Thanks!
Work with :through associations made easy
Tags: rails, activerecord, associations
Published: 2024-06-05 11:30:29

---
title: Work with :through associations made easy 
published: true
description: 
tags: Rails,ActiveRecord,Associations
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7murv509jib4hf9ar7k1.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2024-06-05 10:52 +0000
---

As explained in [Rails association reference](https://guides.rubyonrails.org/association_basics.html#methods-added-by-has-many), defining a `has_many` association gives **17** methods.

We'll focus on the `collection_singular_ids=(ids)` part.

```rb
class Book
  has_many :book_genres
  has_many :genres, through: :book_genres
end

class Genre
  has_many :book_genres
  has_many :books, through: :book_genres
end

# the tie model
class BookGenre
  belongs_to :book
  belongs_to :genre  
end
```

Given a `book`, we'd get a `genre_ids=` (from `has_many :genres`). This method is very powerful. It's designed in such a way that you can use the value as-is straight from controller params in mass-assigment, and only the genres you specified would remain. Yes, `genre_ids=` will take care of identifying assocs being removed and new ones being added and only apply the change, not touching unchanged records!

```rb
book.genre_ids #=> [1, 2]

# this will delete the BookGenre record tying this book to genre 1
# and create a new one tying it to genre 3, leaving tie to 2 unchanged!
book.update!(genre_ids: ["2", "3"])

book.genre_ids #=> [2, 3] 
```

This only leaves validation errors. Say you want to validate that every book has at least one genre specified.

Easy, you can even use a macro validation:

```rb
Book.validates :genre_ids, length: { minimum: 1, message: :at_least_one_required }
```

The last piece of the puzzle is how will the form react. You may need to align what field/helper you are using, so validation errors color the field nice and red on any problems.

```rb
<%= f.input :genre_ids %>

# or maybe

<%= f.association :genres %>
```

Just make sure the param being submitted is `:genre_ids`, so mass-assignment works.

For StrongParams you may need to do this:
```rb
params.require(:book).permit(
  :title, genre_ids: []
).
```
Celebrating Opkey's New Status as an Official Workday Test Automation Partner
Tags: workday, test, automation
Published: 2024-06-05 11:23:04

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2g8mp3vrdk0bk9nzjbnt.png)
Today, I am thrilled to announce a significant milestone in Opkey's journey: we have officially been certified as a Workday Test Automation Partner. This achievement is a testament to our innovative approach to No-Code, AI-enabled test automation, as well as the dedication of the Opkey team. ‍

**The Path to Partnership**

This certification is exciting because it aligns perfectly with our mission to streamline and transform how businesses test their enterprise applications. Workday stands out as one of the world's most innovative and essential enterprise applications. By obtaining Workday certification, we can leverage our technology to help an even broader range of customers.‍

**A Testament to Teamwork**

Achieving this certification was no small feat, and it could not have been possible without the relentless pursuit of excellence by our team. I want to take a moment to express my deepest gratitude to every member of the Opkey family.  

Thank you to everyone, from our developers and engineers who tirelessly refined our platform to our sales and customer support teams that effectively communicate Opkey’s vision. Your dedication not only contributes to our continual growth but also ensures that we remain at the forefront of technological innovation in this industry. ‍

**Looking Forward**

This partnership will allow us to better serve our existing customers and reach new ones within the Workday community. It will enable us to continue improving our offerings and expand our impact, helping more organizations to realize the benefits of effective test automation. ‍

**A Note of Thanks**

Lastly, I want to thank you—our customers and partners—for your trust and support. Your feedback and engagement have been invaluable in shaping our platform and our company. We look forward to continuing to serve you with even greater effectiveness as a Workday Test Automation Partner.  

Here's to continued success and innovation!

Warm regards,

Pankaj Goel

Founder & CEO, Opkey