teleren/devto huggingface dataset:
Bug of the month: Cannot convert a BigInt value to a number
Tags: webdev, javascript, programming, bug
Published: 2024-04-02 14:17:57

Hello Everyone,

I encountered a puzzling bug while deploying my web3 application to production. If you're familiar with web3 frontend libraries and browser plugins like MetaMask, you might find this interesting.

## The Problem:

Upon deployment, I faced an unexpected error:

## Problem
```
Uncaught TypeError: Cannot convert a BigInt value to a number
```
It functioned perfectly on my local machine but caused a crash in the live environment.

Let's troubleshoot:

- Could it be a configuration problem during deployment?
No, the local build works smoothly.

- Perhaps there's an issue with the configuration settings?
No, they're all set correctly.

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

After a thorough investigation, I discovered the real culprit: browser support!

The error arises because the production build of React doesn't specify browser versions. Instead, it uses default configurations, leading to the error.

## The Solution:

Simply update your package.json file as follows:

```
"browserslist": {
    "production": [
      "supports bigint",
      "not dead"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
}
```
With this adjustment, your app should run smoothly in production.

Feel free to reach out if you have any questions.

Happy coding!
Codeforces Round 929 (Div. 3) D. Turtle Tenacity: Continual Mods
Published: 2024-04-02 14:17:19

```
/*
by looking at the test cases, I discovered that 
if we divide the array numbers by the gcd of the
whole array(we call this array A), if there are 
more than one 1's in it, then "NO", or else "YES"
pf. just write the array in increasing order and
 it is obvious

*/
#include<bits/stdc++.h>
using namespace std;
int arr[100005]={0};
int main(){
	int t; cin>>t;
	for (int tt=0; tt!=t; tt++){
		for (int i=0; i!=100005; i++){
			arr[i] = 0;
		}
		int n; cin>>n;
		int x; cin>>x;
		int g = x;
		arr[0]=x;
		for (int i=1; i!=n; i++){
			int num; cin>>num;
			arr[i] = num;
			g = __gcd(num,g);
		}
		for (int i=0; i!=n; i++){
			arr[i] = arr[i]/g;			
		}
		int ok = 0;
		for (auto u:arr){
			if (u==1){
				ok += 1;
			}
		}
		//cout<<g<<"\n";
		if (ok>1){
			cout<<"NO"<<"\n";
		}
		else{
			cout<<"YES"<<"\n";
		}
	}
}
```
"Day 55 of My Learning Journey: Setting Sail into Data Excellence! Today's Focus: Maths for Data Analysis (Probability - 1)
Tags: dataengineering, datascience, analyst, maths
Published: 2024-04-02 14:16:15

PROBABILITY - 1




Basic of Probability :- 

A possibility or chances that it will happen in future is called probability.
Possibility of events happening.

Introduction 

Faired Dice 
Faired coin 

Playing card - 52 cards

4 type  ( all together is called 4 - suit ) 
Heart - 13  ( suit 1)
Club - 13
Spade - 13
diamond - 13

Face card - 3 in one suit so, 12 in a playing card  [ J,K,Q ]

Owner cards = face card + Ace ( 16 ) —> [ A,K,Q,J  ]

Knave card =  [ 10 , K ,Q ]  12 cards.





APPROACH in Probability :- 

Approach TYPE :- 

Theoretical approach 
Experimental approach or empirical approach


CLASSICAL PROBABILITY 
This outcome is equally likely.

AXIOMATIC PROBABILITY
In this outcome are not equally likely

Experimental PROBABILITY :- 
Depends on the past data.



Basic term in probability :- 

Experiment : An operation which can produce some well-defined outcomes is called an experiment.

Outcome : An outcome of a random experiment is any one of the possible results of the experiment.

Events :- For a random experiment , an event is any possible set of outcomes.

Sample Space : The sample space of an experiment is the set of all possible outcomes or results of that experiment. The elements of a sample space may be numbers, words, letters, or symbols etc.


Symbol meaning 

∩ - intersection
∪ - union


This concept will also help in SQL . ( like union, intersection, all union, etc) 

Equally likely Events :- 
Events are said to be equal if the probability of their occurrence ( or non-occurrence ) are equal.
These are the events which are completely distinct or same but occurrence no. is same.
Like A has 3 values and B also has 3 values.


Mutually Exclusive Events :- 
Two events are said to be mutually exclusive if their intersection is a null set .

It means that when we union nothing must be common between them, or both must be distinct to each other.



Exhaustive Events :- 
Events are said to be exhaustive if their union is equal to the sample state.
Both are join (union) it shows the complete dataset.







FOR US STATISTICAL / EXPERIMENTAL PROBABILITY IS MOST IMPORTANT 

Experimental Probability:
Definition: experimental probability, also known as empirical or frequentist probability, is based on observed frequencies in data. It involves conducting experiments, collecting data, and calculating probabilities based on the relative frequencies of events.
Example: If you toss a coin many times and observe that it lands heads 60% of the time, the experimental probability of getting heads on the next toss is estimated to be 0.6.



Feel free to share this post to enhance awareness and understanding of these fundamental concepts in statistical analysis!


🙏 Thank you all for your time and support! 🙏
Real-Time Example: Using Goroutines and Channels
Tags: go, beginners, programming, learning
Published: 2024-04-02 13:47:37

In Go, **goroutines** and **channels** are used for concurrent programming. **Goroutines** are lightweight threads of execution, and channels are used to communicate between **goroutines**. They are powerful features that make it easy to write concurrent programs in Go.

One real-world web application scenario where **goroutines** and **channels** can be useful is a web scraper. Web scraping involves fetching data from websites, which can be a time-consuming task. By using goroutines, you can fetch data from multiple websites concurrently, which can significantly speed up the process. Channels can be used to collect and process the data fetched from different websites.

Here's a simplified example of a web scraper in Go using goroutines and channels:

```
package main

import (
    "fmt"
    "io/ioutil"
    "net/http"
)

func fetch(url string, ch chan<- string) {
    resp, err := http.Get(url)
    if err != nil {
        fmt.Println("Error fetching URL:", err)
        ch <- ""
        return
    }
    defer resp.Body.Close()

    body, err := ioutil.ReadAll(resp.Body)
    if err != nil {
        fmt.Println("Error reading response body:", err)
        ch <- ""
        return
    }

    ch <- string(body)
}

func main() {
    urls := []string{"https://example.com", "https://google.com", "https://github.com"}
    ch := make(chan string)

    for _, url := range urls {
        go fetch(url, ch)
    }

    for range urls {
        fmt.Println(<-ch)
    }
}

```
In this example, the fetch function fetches the content of a URL using an HTTP GET request and sends the content to a channel. We create a goroutine for each URL in the urls slice, so the fetching of each URL happens concurrently. Finally, we read from the channel to get the fetched content and print it.
How to know if you have the XZ vulnerability and what you can do about it
Tags: security, xz, backdoor, linux
Published: 2024-04-02 14:12:20

If you have been on the internet recently you should already know what happened with the XZ vulnerability. Basically this vulnerability was introduced very recently and not all distros are affected by it.

Only the versions 5.6.0 and 5.6.1 is affected. So if you aren't using these and you haven't upgraded recently then you are safe.

If you are ubuntu user this shouldn't affect you as the most recent version of xz available for ubuntu is version 5.4.

Still I'll document here how to detect and downgrade specific packages if something like this occur.

So the package that was the problem is the `xz-utils` pacakge.

At first we'll have to which version we are using. 

We can do it using the following commands
```
xz --version
```

or 

```
apt-cache showpkg xz-utils
```

or

```
apt-cache policy xz-utils
```

If the currently used version is `5.6.0` or `5.6.1` we'll have to downgrade.

To downgrade first we'll need to know which versions are available.

We can do that using
```
apt search xz-utils
```

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


Now when we've selected a version to downgrade to we can downgrade using this
```
sudo apt-get install xz-utils=<version>
```
A sample of this is like this
```
sudo apt-get install xz-utils=5.2.5-2ubuntu1
```

Although not recommended, but if you want to hold automatic upgrade for this package you can do it like this.

```
sudo apt-mark hold xz-utils
```

or to revert the hold you can use this
```
sudo apt-mark unhold xz-utils
```

You can follow [this](https://www.darkreading.com/vulnerabilities-threats/are-you-affected-by-the-backdoor-in-xz-utils) for more specific instructions for other distros.
I got tired of waiting for my teammates to review my code, so I created a bot that helps
Published: 2024-04-02 14:04:39

Hi all, I'm a software developer and in every team that I've been at, code reviews were a major bottleneck.

This bottleneck causes practical problems for our team:

- It takes a lot of manual coordination and effort for me, as a dev, to get my PR reviewed and merged.

- Code left unmerged often blocks progress on other tasks, and continues to demand attention from me for a longer time (which reduces my ability to perform other tasks).

- In general, longer PRs == less output (more time for our code to reach customers)

I identified three major issues that cause this problem:

Devs usually have to manually coordinate the review with the reviewers ("Hey, I've replied to you on Github, can you take a look?" - stuff like that). These discussions occur on multiple chats (team channels, DMs) and different platforms (Slack, Github), and require significant manual coordination and attention from the dev.

Code frequently becomes unmergeable or requires attention, and it's hard to stay on top of all open PRs and perform needed actions on time (rebasing if conflicts arise, re-running CI fails, replying to an open discussion as a reviewer)

PRs are often undocumented, and it's tough to "reverse-engineer" a PR to understand what it does - especially if your team owns multiple domains.

To overcome that, I [created a bot](devoro.co) that integrates with Github and Slack and more efficiently structures your code review workflow.

The bot opens a Slack channel (and invites all reviewers) for every new PR. This way, reviewers collaborate on one space and are automatically updated (no need to coordinate manually!).

It also sends real-time notifications whenever your code needs attention. This helps you keep your code reviewable and mergeable at all times.

To reduce PR pickup time, the bot sends a daily report on all open PRs to keep everyone in sync. The report contains all needed information on each PR - increasing transparency and accountability between team members (everyone knows what they need to do to keep the team unblocked).

Curious to hear what you think! Is this an issue you've encountered as well?
Trip to Abu Dhabi
Tags: travel, tour
Published: 2024-04-02 13:53:49

Abu Dhabi shimmered in my memory like a mirage, even weeks later. The trip was pure magic, and a big thanks goes to [Trip Arabia](https://triparabia.me/). From the moment we landed, they whisked us away to breathtaking sights. The Sheikh Zayed Grand Mosque left me speechless – the white marble reflecting the endless sky, the intricate mosaics glinting in the sun. Trip Arabia Tours arranged a guided tour that brought the mosque's history and significance to life.

Then there was Yas Island! Ferrari World was an adrenaline rush, and the Yas Waterworld a welcome cool-down. They even scored us express passes, so we maximized the fun.  They weren't just about logistics, though. They recommended hidden gems – a delicious Emirati feast under the stars, a traditional souk where we bartered for pashminas.  Abu Dhabi was a whirlwind of culture, adventure, and friendly faces, all thanks to Zahara Tours' amazing service. You should travel and see for yourself the creations too...
Find Cheap Flights from London to Miami - Call 📞{{{080..0-0..54-83..09}}} for the Best Prices
Tags: travel, flight, airline, tickets
Published: 2024-04-02 13:50:20

Are you planning a trip from London to Miami and looking for the best deals on flights? Look no further! With our expert tips and tricks, you'll be able to find affordable flights without compromising on quality or comfort.


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

**Why Choose London to Miami Flights?**

London to Miami is a popular travel route, offering convenient flights for business and leisure travelers. Not only does Miami boast beautiful beaches and a vibrant nightlife, but it also offers a diverse range of cultural experiences for visitors to enjoy.

**Factors to Consider When Booking Flights**

When booking your flight from London to Miami, there are several factors to consider to ensure you get the best deal possible. Pay attention to departure and arrival times, airlines and their reputation, price comparison, and any additional fees that may apply.

**Tips for Finding Cheap Flights**

To find cheap flights from London to Miami, consider booking in advance, being flexible with your travel dates, using flight comparison websites, and signing up for airline newsletters to stay informed about special deals and promotions.

**Exploring Miami**
Once you've arrived in Miami, you'll find no shortage of things to see and do. From the vibrant nightlife of South Beach to the beautiful beaches of Key Biscayne, there's something for everyone to enjoy. Explore cultural attractions like the Pérez Art Museum Miami and indulge in delicious cuisine at one of the city's many restaurants.

**Conclusion**
Finding cheap [flights to Miami](https://www.flightforus.co.uk/destination/cheap-flights-to-miami) is easier than ever with our expert tips and tricks. By planning and keeping an eye out for special deals, you'll be able to enjoy all that Miami has to offer without breaking the bank.

**FAQs**

**Q. How far in advance should I book my flight from London to Miami?**

It's best to book your flight at least several weeks in advance to secure the best prices.

**Q. Are there direct flights available from London to Miami?**
Yes, several airlines offer direct flights from London to Miami.

**Q. What are the best months to visit Miami for cheaper flights**
Generally, the shoulder seasons of spring and fall offer cheaper flights to Miami.

**Q. Can I find last-minute deals for flights to Miami from London?**
While last-minute deals are sometimes available, booking in advance for the best prices is best.

**Q. Are there any hidden fees I should be aware of when booking cheap flights?**

Be sure to check for any additional fees, such as baggage fees or seat selection fees, before booking your flight.
Edit Like a Boss: Pro Techniques You Can Use Today
Published: 2024-04-02 13:38:12

Let's face it, not every photo comes out of the camera looking like a masterpiece. But with a few key editing techniques under your belt, you can transform your snapshots into stunning works of art.  This post dives into some pro-level editing tricks you can incorporate into your workflow today,  alongside some  ethical considerations for using artificial intelligence (AI) tools.

Master the Fundamentals:

Exposure & Color Correction: A well-exposed image forms the foundation for great editing. Learn to adjust exposure, highlights, shadows, and whites for balanced results. Color correction tools can help you achieve natural-looking colors or create a specific mood.

Sharpening & Noise Reduction: Sharpening adds crispness to details, while noise reduction eliminates unwanted grainy textures. Apply these tools subtly to avoid creating an artificial look.

Cropping & Composition: A strong composition can make or break an image. Use cropping to focus on the subject and eliminate distracting elements. Follow the rule of thirds or experiment with leading lines to guide the viewer's eye.

Pro-Level Techniques:

Dodge & Burn: This selective editing technique allows you to lighten or darken specific areas, adding depth and dimension to your photos.

Selective Adjustments: Edit specific areas of your image independently. Target adjustments like color balance or clarity to enhance specific elements within the frame.

Curves & Levels: These advanced tools offer precise control over color tones and contrast. While they have a learning curve, they can unlock a world of creative possibilities.

AI Editing: A Powerful Tool, Use it Wisely

While [undress AI](https://www.undressaitool.com/) might be a tempting search term, it's important to tread carefully with AI-powered editing tools that alter the content of an image in unrealistic ways.

Here's how to leverage AI ethically:

Noise Reduction: AI can be a powerful tool for removing unwanted noise, especially in low-light photos.
Color Grading: Some AI tools offer pre-sets or one-click solutions for achieving specific color styles. However, it's important to maintain a level of control to ensure the results look natural.
Basic Enhancements: AI can automate tasks like exposure and white balance adjustments, freeing you to focus on more creative edits.
Remember, AI should be a tool to enhance your editing skills, not replace them. Develop a solid foundation in the fundamentals, and use AI strategically to streamline your workflow and achieve specific effects.

Embrace Experimentation!

Don't be afraid to experiment and have fun with your edits.  Editing is a creative process, so find a style that speaks to you. There are no hard and fast rules, so keep exploring and learning new techniques.

With dedication and practice, you'll be editing like a boss in no time, transforming your photos from ordinary to extraordinary.
LEGO CITY BUT IT'S AI GENERATED 🧬
Tags: ai, webdev, programming, design
Published: 2024-04-02 13:27:22

{% embed https://vimeo.com/929874108?share=copy %}

## This movie is completely made by AI and edited by myself, full movie will release after a few months

This is the first and only artwork I made that has no HTML, JS, CSS or anything else in it. Please give me a review of how the glimpse was. If you think you can make a similar movie, I encourage you completely.

_The tools I used are:
Gemini(images),
Pika(Dialouges),
Runway(videos),
Clipchamp(editing),
myself(story)._

##Comment and react if you liked it 😊
My first post
Published: 2024-04-02 13:27:06

Hello everyone,

I'm Carson from Hong Kong, an AI/ML Developer. Currently, I'm working on [A.N.A. (Autonomous Neural Avatar) ](https://github.com/Carson-We/A.N.A.)and [Project Mojave](https://github.com/Carson-We/Project-Mojave), which involves the development of a humanoid robot capable of human-like activities.
Atom : The most customizable free Astro landing page
Tags: webdev, astro, tailwindcss, javascript
Published: 2024-04-02 13:26:07

Unleash the potential of your project with a website designed for impact. Showcase your innovative tech tool with intuitive simplicity and elegance. 

Atom is built with meticulous attention to detail as your creation and features a trendy and modern design look and feel to make your website standout.

Above all, Atom is entirely free, offering a premium template experience at no cost.

## Screenshots

![Tailus Atom bento](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eoqu8k6vripmwynsh821.png)


![Tailus Atom speed comparaison](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cnfqeo510qqm7dt2irjj.png)


![Tailus Atom content section](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ihe4odsggef10z0bb71m.png)

![Tailus Atom CTA and footer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vjt7m7opl3yolmfbqi9q.png)

## Make it yours with ease

Change colors, shadows, border radius, border and background contrast easily.


![Tailus Atom custom version](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5zpyacijhlecu0uo7c44.png)

Ready to unlock the potential of Atom ?

[Get your copy now](https://ui.tailus.io/templates/atom/)
Developing a cloud backend for a streaming service
Tags: videostreaming, ruby, backend, devops
Published: 2024-04-02 13:20:27

Evrone collaborated with Viasat to develop a cloud backend for the Viju streaming service, meeting its unique challenges. Leveraging Kubernetes on the Yandex.Cloud platform, they ensured scalability and stability, handling heavy loads and integrating CDN caching for faster video loading. With a focus on clean code and security, they implemented user authorization using JSON Web Token and enhanced payment systems. The result is a user-friendly, innovative platform capable of competing in the market, setting a new standard for video streaming services.

[Read the full case study here.](https://evrone.com/cases/viasat-development)
My Portfolio: My Mind's Kaleidoscope
Tags: webdev, frontend, javascript, creativity
Published: 2024-04-02 13:16:09

---
title: My Portfolio: My Mind's Kaleidoscope
published: true
description: Peering into the mirror of my mind, where thoughts dance in kaleidoscopic patterns.
tags: #webdevelopment #frontend #javascript #creativity
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9df4w1inlc6omckr58n8.png
---

Hello All, I'm currently revamping my existing portfolio, titled 'My Portfolio: My Mind's Kaleidoscope'. This presentation will walk you through its various sections, offering a glimpse into my creative journey. Stay tuned as I plan to upload this portfolio by the end of the week. Excited to share it with you all!

{% embed https://www.youtube.com/watch?v=WisnprhR9y0&t=12s %}


Thank you for reading this post. Have a Nice Day!


## 📝 Previous blog
📌 [Learning the Ropes: My Novice Journey to Problem Solving - Blog 1: Daydreaming, Random Thoughts, and Tetris Effect](https://dev.to/deva/learning-the-ropes-my-novice-journey-to-problem-solving-blog-1-daydreaming-random-thoughts-and-tetris-effect-4j47)

Feel free to reach out to me, and let's connect! 😊

## 🔗 Links

[![twitter](https://img.shields.io/badge/twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white)](https://twitter.com/vasudev617)[![github](https://img.shields.io/badge/github-0A66C2?style=for-the-badge&logo=github&logoColor=white)](https://github.com/Vasudevatirupathinaidu)[![Dev Vinci Lab](https://img.shields.io/badge/YouTube-%23FF0000.svg?style=for-the-badge&logo=YouTube&logoColor=white)](https://www.youtube.com/@vasudev16180)