teleren/devto huggingface dataset:
4 Free Tailwind CSS Badge Components [Open-Source]
Tags: tailwindcss, webdev, opensource
Published: 2024-06-06 13:28:50

Hello Devs👋

I prepared a list of open-source badge components coded with [Tailwind CSS](https://tailwindcss.com/) and [Material Tailwind](https://material-tailwind.com/?ref=devto).

Each Tailwind CSS badge example showcased below is easy to integrate and customize. The links to the source code are placed below each example. Simply copy and paste the code directly into your application. 


Happy coding! 

## Badge Component Examples

### 1. Badge with Icon

Try this badge that comes with an icon and is perfect for notifications/status indicators that need extra visual emphasis.

![badge with icon](https://i.imgur.com/aFKHWfA.png)
Get the source code for this [badge with icon example](https://www.material-tailwind.com/docs/html/badge#badge-custome-style?ref=devto)!


### 2. Badge with Different Colors

Use this example to easily differentiate between multiple statuses/ categories. Customized colors make the UI more intuitive.


![badge with colors](https://i.imgur.com/iPKfjcn.png)
Get the source code for this [badge with different colors example](https://www.material-tailwind.com/docs/html/badge#badge-color?ref=devto)!

### 3. Badge with Different Placements

Check out this example to see how you can place the badge in different positions relative to their parent element. 

![badge with placements](https://i.imgur.com/rQfPph1.png)
Get the source code for this [badge with different placements example](https://www.material-tailwind.com/docs/html/badge#badge-placement?ref=devto)!

### 4. Badge Overlap

Check out this Tailwind CSS component example to see how badges can overlap with other elements.

![badge overlap](https://i.imgur.com/RrLUKQ9.png)
Get the source code for this [badge overlap example](https://www.material-tailwind.com/docs/html/badge#badge-overlap?ref=devto)!

🚀 Looking for even more examples?
Check out our open-source **[Tailwind CSS components library](https://www.material-tailwind.com/?ref=devto)** - Material Tailwind -  and browse through 500+ components and website sections.

🤖 Or you can also generate customized blocks easily using the power of AI. Try now for free [Magic AI Blocks](https://www.material-tailwind.com/magic-ai)!
RockLane - Interview Questions
Published: 2024-06-06 13:22:58

Q1. Tell me about yourself
Q2. A challenging task that you faced at work

Q3. Predict the output

```JS
console.log("Start");

setTimeout(() => {
  console.log("Timeout 1");
}, 0);

Promise.resolve()
  .then(() => {
    console.log("Promise 1");
  })
  .then(() => {
    console.log("Promise 2");
  });

setTimeout(() => {
  console.log("Timeout 2");
}, 0);

console.log("End");

//Start
//End
//Promise 1
//Promise 2
//Timeout 1
//Timeout 2
```

Q4. Flatten this array

```JS
const flattenArray = (arr) => {
  return arr.reduce((acc, val) => {
    if (Array.isArray(val)) {
      acc.concat(flattenArray(val));
    } else {
      acc.concat(val, []);
    }
  });
};

const arr = [1, 2, [3, 4], 5, [[[6, 7], 8, [[[[9]]]]]]];
const flatten = (arr) => {
  let flattenedArr = flattenArray(arr);
  console.log(flattenedArr);
};
```

Q5. Difference between useMemo() and useCallback()
Q6. Why do we use keys in react?
Q7. Server side Rendering V/S Client Side Rendering.
Q8. How to center a display flex?
Q9. What is the difference between absolute and relative positioning?
Q10. Do you use version control. If yes what all commands you know.
Q11. Do you know rebase?
Some Code Tricks Every Web Developer Should Know
Tags: webdev, frontend, html
Published: 2024-06-06 13:22:50

## Contenteditable Attribute
This attribute allows you to make an element editable by the user like a text input.

`<div contenteditable="true">
Hello User.
</div>`

## Placeholder Color
You can use the ::placeholder psuedo-element to style the placeholder text in an input field allowing you to customize the look 
`input::placeholder{
color:"#fff;
}`
Apple Gummies Tyson 2.0 HeavyWeight 7000 Disposables
Tags: apple, gummie, tyson, disposables
Published: 2024-06-06 13:20:15

Indulge in the irresistible combination of crisp apple flavor and chewy gummy goodness with Apple Gummies - Tyson 2.0 HeavyWeight 7000 Disposables! These innovative disposable vape devices are designed to deliver a burst of fruity delight with every puff, providing vapers with a convenient and satisfying vaping experience. Whether you're a dedicated vaper or new to the scene, Apple Gummies - Tyson 2.0 promises to elevate your vaping journey to new heights.

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

**Bursting with Flavor
**
Apple Gummies - Tyson 2.0 tantalizes your taste buds with the sweet and tangy taste of ripe apples, perfectly complemented by the chewy sweetness of gummy candy. With each inhale, you'll experience the crisp freshness of apples, followed by the satisfying chewiness of gummy candy on the exhale. It's a flavor sensation that's sure to leave you craving more.

**Long-lasting Performance
**
Tyson 2.0 HeavyWeight 7000 Disposables offer an impressive 7000 puffs of pure vaping pleasure, ensuring extended enjoyment without the hassle of frequent refills or charging. Its high-capacity battery and premium e-liquid formulation deliver a smooth and consistent draw with every puff, allowing you to savor the delicious flavors of Apple Gummies for longer.

**Convenient and Portable
**
Whether you're on the go or relaxing at home, Apple Gummies - Tyson 2.0 is the perfect companion for all your vaping adventures. Its sleek and compact design fits comfortably in your pocket or purse, making it ideal for travel or outdoor activities. 

**Quality You Can Trust
**
At Tyson HeavyWeight, we are committed to delivering the highest quality vaping products to our customers. Each Apple Gummies - Tyson 2.0 disposable vape device undergoes rigorous testing and quality control measures to ensure a premium vaping experience that exceeds expectations. With Apple Gummies - Tyson 2.0, you can vape with confidence, knowing you're getting the best of the best.

**Conclusion
**
Treat yourself to the sweet sensation of Apple Gummies - Tyson 2.0 HeavyWeight 7000 Disposables. With its irresistible blend of apple and gummy candy flavors, long-lasting performance, and unmatched convenience, this disposable vape device is sure to become your new go-to choice. Whether you're craving a burst of fruity sweetness or simply seeking a hassle-free vaping solution, Apple Gummies - Tyson 2.0 invites you to experience the ultimate vaping pleasure. 


[https://vapemarley.com/shop/disposable-vapes/tyson/mike-tyson-7000/apple-gummies-tyson-2-0-heavyweight-7000-disposables/]
AWS Certified Cloud Practitioner Study Guide - Exam Guide Outline
Tags: aws
Published: 2024-06-06 13:14:08

**Introduction:** Becoming an AWS Certified Cloud Practitioner is an essential step for professionals looking to establish their expertise in cloud computing with Amazon Web Services (AWS). This study guide aims to provide a comprehensive outline to help you prepare effectively for the AWS Certified Cloud Practitioner exam.

**Exam Overview:** 
The AWS Certified Cloud Practitioner exam evaluates candidates' understanding of AWS Cloud concepts, AWS services, security, architecture, pricing, and support. It is designed for individuals with no prior AWS experience and serves as a foundational credential for more advanced AWS certifications.

**Exam Guide Outline:**

**Cloud Concepts:**

Understanding the AWS Cloud and its global infrastructure.
Key advantages of cloud computing.
AWS Cloud deployment models (e.g., public, private, hybrid).
AWS Cloud service models (e.g., IaaS, PaaS, SaaS).

**AWS Core Services:**

- Compute Services: EC2, ECS, Lambda.
- Storage Services: S3, EBS, Glacier.
- Database Services: RDS, DynamoDB.
- Networking Services: VPC, Route 53.

**Security:**

- Shared Responsibility Model.
- Identity and Access Management (IAM).
- Encryption methods and AWS Key Management Service (KMS).
- Compliance and Data Protection.

**Architectural Principles:**

- Best practices for designing resilient and scalable architectures.
- AWS Well-Architected Framework.
- High Availability and Fault Tolerance.

**Pricing and Billing:**

- AWS pricing models (e.g., On-Demand, Reserved, Spot Instances).
- Cost optimization strategies.

**AWS Pricing Calculator.Support Plans:**

- AWS Support tiers and benefits.
- AWS Trusted Advisor.
- AWS Personal Health Dashboard.

**Study Resources:**

AWS Certified Cloud Practitioner Exam Guide: [Link](https://aws.amazon.com/certification/certified-cloud-practitioner/)
AWS Documentation: [Link](https://docs.aws.amazon.com/)
AWS Training and Certification: [Link](https://www.aws.training/)
Practice Exams: [Link](https://www.dumpsedu.com/CLF-C02-exam-questions)
Official AWS Whitepapers: [Link](https://aws.amazon.com/whitepapers/)

**Conclusion:** Preparing for the AWS Certified Cloud Practitioner exam requires a thorough understanding of AWS Cloud concepts, services, security, architecture, pricing, and support. Utilizing the outlined topics and recommended study resources will enhance your preparation and increase your chances of passing the exam successfully.

Remember, continuous practice and hands-on experience with AWS services are key to mastering the material and achieving certification.

Good luck on your AWS Certified Cloud Practitioner journey!

[Disclaimer: The sources provided are accurate as of the time of writing. Be sure to verify the latest information on the official AWS website and documentation.]
FINQ's weekly market insights: Peaks and valleys in the S&P 500 – June 6, 2024
Tags: ai, stockmarket, investing, stocks
Published: 2024-06-06 13:08:13

Dive into this week's market dynamics, highlighting the S&P 500's leaders and laggards with FINQ's precise AI analysis.

## **Top achievers:**

- Amazon (AMZN)
- ServiceNow (NOW)
- Uber Technologies (UBER)

## **Facing challenges:**

- Loews Corp (L)
- Amcor PLC (AMCR)
- Davita Inc (DVA)

Understand the market shifts with our detailed analysis and strategic insights.

**Disclaimer:** This information is for educational purposes only and is not financial advice. Always consider your financial goals and risk tolerance before investing.
Getting Started with Azure Bot Service: Building Your First Chatbot
Tags: ai, azure, bot, azurebot
Published: 2024-06-06 13:06:17

**Introduction**
Importance of chatbots for customer support and engagement.
Overview of Azure Bot Service for building, deploying, and managing bots.
Prerequisites
Active Azure account.
Basic knowledge of C# or JavaScript.
Visual Studio or Visual Studio Code.
Step 1: Setting Up Azure Bot Service
Create a New Bot Service:

**Use the Azure Portal to create a Bot Service**.
Fill in details like Bot handle, subscription, and resource group.
Configure the Bot:

**Set the messaging endpoint in the bot resource settings.**
Step 2: **Creating a Bot Application**
Create a New Project:

**Use Visual Studio or Visual Studio Code to create a bot project with the Bot Framework template.**
Install Bot Framework SDK:

For C#, install Microsoft.Bot.Builder and Microsoft.Bot.Builder.Integration.AspNet.Core via NuGet.
For JavaScript, install botbuilder and restify via npm.
Implement the Bot Logic:

**Write code to handle messages, e.g., an echo bot that repeats user input.
Step 3: Testing and Deploying Your Bot**
Test Locally:

Use the Bot Framework Emulator to test your bot.
Deploy to Azure:

Deploy the bot from Visual Studio or using Azure CLI.
Update the messaging endpoint in the Azure Bot Service settings.
**Step 4: Connecting to Channels**
Add Channels:

Add desired channels (e.g., Teams, Slack, Facebook Messenger) via the Azure Portal.
Configure Channel Settings:

Provide necessary API keys or tokens for each platform.
Conclusion
Overview of the steps to build and deploy a chatbot using Azure Bot Service.
Encouragement to integrate additional Azure services for extended capabilities.
AIPowered Sustainability Navigating Towards a Greener Future
Published: 2024-06-06 13:00:59

 AI is revolutionizing sustainability by optimizing energy use, reducing waste, and enhancing ecological monitoring. Key innovations include smart grids, renewable energy management, recycling robots, and wildlife tracking. Successful implementations in renewable energy, smart cities, and agriculture demonstrate AI's potential. Challenges like data privacy, bias, and resource consumption must be addressed. Future strategies involve policy, technological advancements, and public education. 

    #rapidinnovation #AI #Sustainability #RenewableEnergy #SmartCities #EcologicalMonitoring
Recovering from burn out by building in public
Tags: buildinpublic
Published: 2024-06-06 13:00:00

Working in big tech really burned me out. 

Honestly I thought I’d have been over it by now having been out of my company for 2 months now, but that doesn’t seem to be the case. Probably not realistic when I was on a slow burn for over a year. What sucks is that I still like programming and building things, at least the idea of it. Problem solving is fun, technology is fun, why aren’t I having any fun using technology to solve problems?

The weird combination of circumstances that I led me to quit my job made me question a lot of my identity as a developer, but part of why I quit was to work past my previous experienced. 

Therefore, I’m trying something new. As an independent developer I represent myself and I have to keep myself accountable to improving not just my skills but my overall attitude towards programming. I’m starting a “Build in Public” series so I can do both in a more consistent (and public) way. Cheers! 🥂
Будущее мелкорезаного табака
Published: 2024-06-06 12:58:57

Будущее мелкорезаного табака

Несмотря на проблемы, стоящие перед табачной промышленностью, будущее мелкорезаного табака выглядит радужным. Поскольку все больше курильщиков стремятся к натуральным и аутентичным ощущениям от курения, спрос на мелкорезаный табак, скорее всего, будет расти.

Кроме того, рост популярности вейпинга и других альтернативных систем доставки никотина помогает новому поколению курильщиков приобщиться к удовольствию мелко нарезанного табака. Когда эти новые курильщики откроют для себя богатый вкус и историю мелкорезаного табака, они, скорее всего, станут его поклонниками на всю жизнь.
[https://тк1.рус/](https://тк1.рус/)
Managed Shared Hosting Explained: Who Should Use It?
Published: 2024-06-06 11:04:36


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

Navigating the realm of web hosting can be challenging, but shared hosting offers a cost-effective and dependable solution for startups and established enterprises alike. [Shared hosting](https://www.wewp.io/) involves multiple websites sharing a single server and its resources, making it an affordable choice for individuals and small businesses. Managed WordPress (WP) hosting takes this further by providing additional support and maintenance tailored for WordPress websites.

Shared hosting stands out for its affordability, allowing users to reduce hosting costs significantly by sharing server resources. Managed shared hosting providers handle technical aspects such as server maintenance, security updates, and backups, freeing website owners to focus on content creation and business growth.

When choosing a hosting solution, it’s essential to compare shared hosting with other types. Dedicated hosting offers exclusive server use but at a higher cost, making shared hosting a more budget-friendly option for those with moderate traffic needs. Virtual Private Server (VPS) hosting provides a middle ground with dedicated resources within a virtual environment but is more expensive than shared hosting. Cloud hosting, while scalable and reliable, is also more costly and complex to manage.

**Also Read** : [Shared Hosting Vs. Managed WordPress Hosting: Which One To Choose?](https://www.wewp.io/shared-hosting-vs-managed-wordpress-hosting/)

Managed shared hosting has several advantages, including cost-effectiveness, ease of use, and robust security measures. However, it also has drawbacks, such as resource limitations and potential security risks due to the shared environment.

When selecting a managed shared hosting provider, consider factors like reliability, uptime guarantees, customer support quality, resource allocation, scalability options, and security measures.

Top shared hosting providers include WeWP, Kinsta, Hostinger, Bluehost, and HostGator. These providers offer various features tailored to different needs, ensuring website security, reliability, and scalability.

**Also Read** : [Ultimate Guide to Host a Website on Cloud](https://www.wewp.io/guide-host-website-on-cloud/)

Managed shared hosting is ideal for individuals and small businesses seeking an affordable, hassle-free hosting solution. WeWP, in particular, offers tailored managed shared WP hosting with excellent support, making it a great choice for WordPress users looking for reliability and top-notch performance.

Read Full Blog Here With Complete Insight : [https://www.wewp.io/what-is-managed-shared-hosting/](https://www.wewp.io/)
C++
Tags: cpp
Published: 2024-06-06 12:56:12

Assalomu Aleykum Postimni O'qiganingiz Uchun Raxmat Meni C++ Bo'yich Po'stlar Qo'yamn Boraman O'qiysilar Degan Umiddamn Agar Qo'yagan Postlarim Foydali Bo'ladigan Bo'lsa Like Bosib Qo'yarsila Hozircha Bu Mening Birinchi Postim Lekin Keyin Kunlarda C++ Bo'yicha Postalar Qo'yib Boraman.


IlmHub O'qubchishi Ahrorbek
How do I change the label colour of a navbar element when selected?
Published: 2024-06-06 12:48:58

`import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'home_screen.dart';
import 'settings.dart';
import 'order_history_screen.dart';
import 'profile_screen.dart';

class BottomNavigationBarWidget extends StatefulWidget {
  const BottomNavigationBarWidget({Key? key}) : super(key: key);

  @override
  State<BottomNavigationBarWidget> createState() =>
      _BottomNavigationBarWidgetState();
}

class _BottomNavigationBarWidgetState extends State<BottomNavigationBarWidget> {
  late NavigationController controller;

  @override
  void initState() {
    super.initState();
    controller = Get.put(NavigationController());
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      bottomNavigationBar: Obx(
        () => NavigationBar(
          labelBehavior: NavigationDestinationLabelBehavior.onlyShowSelected,
          indicatorColor:const Color(0xFF24293E),
          height: 80,
          elevation: 0,
          selectedIndex: controller.selectedIndex.value,
          onDestinationSelected: (index) {
            controller.selectedIndex.value = index;
          },
          backgroundColor: const Color.fromARGB(255, 18, 22, 38),
          destinations: const [
            NavigationDestination(
              label: 'Home',
              icon: Icon(Icons.home_rounded, size: 28),
              selectedIcon:
                  Icon(Icons.home_rounded, color: Color(0xFF8EBBFF), size: 28),
            ),
            NavigationDestination(
              label: 'Orders',
              icon: Icon(Icons.shopping_cart_rounded, size: 28),
              selectedIcon: Icon(Icons.shopping_cart_rounded,
                  color: Color(0xFF8EBBFF), size: 28),
            ),
            NavigationDestination(
              label: 'Profile',
              icon: Icon(Icons.person, size: 28),
              selectedIcon:
                  Icon(Icons.person, color: Color(0xFF8EBBFF), size: 28),
            ),
            NavigationDestination(
              label: 'Settings',
              icon: Icon(Icons.settings, size: 28),
              selectedIcon:
                  Icon(Icons.settings, color: Color(0xFF8EBBFF), size: 28),
            ),
          ],
        ),
      ),
      body: Obx(
        () {
          return IndexedStack(
            index: controller.selectedIndex.value,
            children: controller.screens,
          );
        },
      ),
    );
  }
}

class NavigationController extends GetxController {
  final Rx<int> selectedIndex = 0.obs;
  final List<Widget> screens = [
    const HomeScreen(userName: 'Akhil'),
    const OrderHistoryScreen(),
    const ProfileScreen(),
    const SettingScreen(),
  ];
}
`
ValueError: A given column is not a column of the dataframe
Tags: machinelearning, datascience, python
Published: 2024-06-06 12:45:18


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/inri5310dc2igx4a1xgj.PNG)Sometimes, when attempting to use the 'pipeline,' I encounter an error called 'ValueError: A given column is not a column of the dataframe.' However, the column still exists in the dataset.

I found this error to be quite interesting. Initially, I thought about seeking help on Kaggle or Stack Overflow to solve this problem. Eventually, I discovered the solution on Stack Overflow, and now I understand why this error occurs. It's really interesting.

Let me describe how to overcome this error…

```
from sklearn.compose import ColumnTransformer
from sklearn.pipeline import Pipeline

preprocessor = ColumnTransformer(
    transformers=[
        ('ohe', OneHotEncoder(drop='first', sparse=False, handle_unknown='ignore'), ohe),
        ('scaler', StandardScaler(), scaler),
        ('ordinal', OrdinalEncoder(), ordinal),
        ('label', LabelEncoder(), label)
    ], remainder='passthrough')
```

I attempted to use 'ColumnTransformer' to preprocess everything, and that worked fine. However, when I tried to fit the pipeline, a 'column not found' error occurred.

The reason for this error is that I used the target value 'LabelEncoder' in the preprocessing section. However, the target/output part should be handled independently, as shown in the code below:

```
label = LabelEncoder()

y_label_train = label.fit_transform(y_train)
y_label_test = label.transform(y_test)
```

After that, we can fit this without errors.

If there is another method to solve this error, you can share it. I would like to learn another way to resolve this issue.

Thank you.
Steps in Data Preprocessing
Tags: machinelearning, datascience, ai
Published: 2024-06-06 12:40:01


Data preprocess

a. missing values
b. smoothing noisy data
c. outliers
d. inconsistency

Data integration

a. data integrates
b. data duplicates
c. data merging
d. data consolidation

Data transformation

a. Scale
b. Normalization
c. Aggregate
d. Generalized

and others steps.
Flutter Backgroud Locator
Tags: flutter, background, location, latitude
Published: 2024-06-06 12:31:28

Hello Team - Request your help an support. We have developed an uber. we have issue in getting driver location from Some devices Like vivo, oppo etc. We are trying to get location every 5 mins and 70% devices are sending it. But remaining 30% is not sending location in 5 mins window. Kindly suggest solution for this.