teleren/devto huggingface dataset:
The difference between the P tag and the PRE tag in HTML
Published: 2024-06-06 14:38:19

Hey, This day we will understand the difference between the p and the pre tags. Firstly, what is the rule of these two tags?

These two tags are used to write paragraphs in HTML language, but the difference between the first and second tags, is how are treat the content of text.

The P tag removes the useless spaces, and remove the returns to line, but if you want to return to line, you can use the <br/> tag.

The PRE tag not removes the returns to line and the spaces, but if the width of his parent reduce, his width don't reduce.

For this the PRE tag is not adaptable, but the P tag add returns to line to reduce his width if is necessary.

Here a complete example to illustrate this:
{% codepen https://codepen.io/TidyCoder/pen/QWRgrXx %}
Frosty Delight with Banana Ice Frozen Fruit Monster E-Liquid 100ml
Tags: banana, ice, frozen, fruit
Published: 2024-06-06 14:20:55

****Introduction:
****
Prepare your taste buds for an exhilarating journey into the world of frozen delights with Banana Ice Frozen Fruit Monster E-Liquid 100ml. In this blog post, we'll uncover the frosty sensation and delightful flavors offered by this refreshing vape juice. Get ready to indulge in a frosty delight like never before.

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

**Discovering Banana Ice Frozen Fruit Monster:
**
Banana Ice Frozen Fruit Monster isn't your ordinary vape juice – it's a tantalizing blend of sweet banana flavor infused with a refreshing icy twist. With each puff, you'll experience the perfect balance of fruity sweetness and coolness, creating a sensation that is both invigorating and satisfying. 

****A Refreshing Escape:
****
Escape the heat and refresh your senses with Banana Ice Frozen Fruit Monster E-Liquid 100ml. With its generous 100ml capacity, you can enjoy extended vaping sessions without the need for frequent refills, allowing you to immerse yourself fully in the frosty delight. Whether you're lounging at home or on the go, this vape juice is the perfect companion for any occasion.

****Experience the Icy Freshness:
****
One of the standout features of Banana Ice Frozen Fruit Monster is its icy freshness. The chilling sensation of menthol combined with the sweetness of ripe bananas creates a flavor profile that is truly unique and exhilarating. With each inhale, you'll be greeted by a burst of coolness that instantly refreshes your palate, followed by the smooth and creamy notes of ripe bananas, leaving you craving for more.

**Conclusion: Embrace the Frosty Delight:
**
In conclusion, Banana Ice Frozen Fruit Monster E-Liquid 100ml is a must-try for any vaper seeking a refreshing and satisfying vaping experience. With its frosty delight and delightful flavors, it's sure to become a staple in your vape collection. So why wait? Dive into the frosty sensation today and discover the irresistible allure of Banana Ice Frozen Fruit Monster.

[https://fruitmonsterofficial.com/product/banana-ice-frozen-fruit-monster-e-liquid-100ml/
]
HackerRank SQL Preparation: Japanese Cities' Attributes(MySQL)
Tags: sql, writeups, hackerrank, mysql
Published: 2024-06-06 14:18:07

**Problem Statement:**
Query all attributes of every Japanese city in the **CITY** table. The `COUNTRYCODE` for Japan is `JPN`.

**Link:** [HackerRank - Japanese Cities Attributes](https://www.hackerrank.com/challenges/japanese-cities-attributes/problem)

**Solution:**

```sql
SELECT * FROM CITY WHERE COUNTRYCODE = 'JPN';
```

**Explanation:**

- `SELECT *`: The asterisk (*) is a wildcard character in SQL that means "all columns." This part of the query specifies that you want to retrieve all columns from the table.
- `FROM CITY`: Indicates that you are selecting data from the **CITY** table.
- `WHERE COUNTRYCODE = 'JPN'`: This condition filters the rows to include only the cities where the `COUNTRYCODE` is 'JPN' (Japan).

This query will return all the columns for every row in the **CITY** table where the `COUNTRYCODE` is 'JPN'. It's useful when you need to retrieve all details about every city in Japan.

By running this query, you can see the complete dataset of Japanese cities stored in the **CITY** table, including information such as city names, populations, districts, and other relevant attributes.
How to Deploy a Next JS App on IPFS (InterPlanetary File System) and automate using Fleek
Tags: fleek, nextjs, ipfs, devops
Published: 2024-06-06 14:15:18

In todays’ AI era, where running a model for inference on GPU is a costly affair, it becomes important to find cost effective alternatives to at least deploy the app frontends. One such alternative I came across is IPFS. It provides you the decentralized storage flavor to your application at a fraction of cost. And when it comes to deploying web applications, its always better if we can automate the process.

In this post I will walkthrough the process of automating the deployment of a NextJS frontend to IPFS using Fleek.

More details: https://medium.com/@amlana21/how-to-deploy-a-next-js-app-on-ipfs-interplanetary-file-system-and-automate-using-fleek-5637c792b7a3
Spring Cloud: Refresh scope bean
Tags: spring, springcloud
Published: 2024-06-06 14:09:34

Properties of microservice may be changed during execution. A mechanism is available for refresh in Spring Cloud.

Following library is used

- Java 17
- Spring Framework 6.1.6
- Spring Cloud Common 4.1.2

# About @RefreshScope annotation

Following is the definition of *@RefreshScope*.

```java
package org.springframework.cloud.context.config.annotation;
// ...
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Scope("refresh")
@Documented
public @interface RefreshScope {
  // ...
}
```

*@RefreshScope* (or *@Scope("refresh")*) is used for setting a bean with refresh scope. Following example is a component class annotated with *@RefreshScope*, for accessing URL of an API.

```java
@Component
@RefreshScope
public class ConfigComponent {

    private String apiUrl;

    public String getApiUrl() {
        return apiUrl;
    }

    @Value("${api-url}")
    public void setApiUrl(String apiUrl) {
        this.apiUrl = apiUrl;
    }

}
```

Two bean definitions are created.

1. name "configComponent", a singleton bean which is injected to other components. This is a proxy instance.
2. name "scopedTarget.configComponent", a refresh scope bean that is the actual instance. New instance is replaced when a refresh action is triggered.

When getApiUrl() method of "configComponent" proxy instance is called, *org.springframework.aop.framework.CglibAopProxy.DynamicAdvisedInterceptor#intercept* will be called and to lookup "scopedTarget.configComponent" bean in BeanFactory.

Then *org.springframework.beans.factory.support.AbstractBeanFactory#doGetBean* will be called. Bean "scopedTarget.configComponent" is a refresh scope, so the new instance is saved into cache in *org.springframework.cloud.context.scope.refresh.RefreshScope*.

# Trigger beans refresh action

A Spring Boot Actuator endpoint (/actuator/refresh) is available for trigger beans refresh action. For enables it, to add the following into configuration.

```
management.endpoints.web.exposure.include=refresh
```

The operation is defined in *org.springframework.cloud.context.refresh.ContextRefresher#refresh*.

```java
public synchronized Set<String> refresh() {
  Set<String> keys = refreshEnvironment();
  this.scope.refreshAll();
  return keys;
}
```

When it is triggered, first the configuration is reloaded from configuration sources provided by such as Spring Cloud Config, Spring Cloud Kubernetes. Then, existing refresh scope beans will be dereferenced and cannot be accessed furthermore. A new bean will be created at the point the bean method is called by using values of new configuration.

# Reference
1. [https://docs.spring.io/spring-cloud-commons/reference/spring-cloud-commons/application-context-services.html#refresh-scope](https://docs.spring.io/spring-cloud-commons/reference/spring-cloud-commons/application-context-services.html#refresh-scope)
HackerRank SQL Preparation: Select by ID(MySQL)
Tags: sql, writeups, hackerrank, mysql
Published: 2024-06-06 14:07:20

**Problem Statement:**
Query all columns for a city in the **CITY** table with the ID 1661.

---

**Link:** [HackerRank - Select by ID](https://www.hackerrank.com/challenges/select-by-id/problem)

**Solution:**

```sql
SELECT * FROM CITY WHERE ID = 1661;
```

**Explanation:**

- `SELECT *`: The asterisk (*) is a wildcard character in SQL that means "all columns." This part of the query specifies that you want to retrieve all columns from the table.
- `FROM CITY`: Indicates that you are selecting data from the **CITY** table.
- `WHERE ID = 1661`: This condition filters the rows to include only the city with the specific `ID` of 1661.

This query will return all the columns for the row in the **CITY** table where the `ID` is 1661. It's useful when you need to retrieve all details about a specific city identified by its unique ID.

By running this query, you can see all the attributes (such as city name, country code, population, etc.) for the city that has the ID of 1661.
Eat Chia Seeds to Perform Well in Coding
Published: 2024-06-06 14:03:56

In the fast-paced world of coding, maintaining peak mental performance and overall well-being is crucial. Chia seeds, a tiny yet powerful superfood, can be a game-changer for programmers looking to enhance their cognitive abilities and sustain long hours of concentration. This article explores the benefits of chia seeds for coders and provides insights on how to incorporate them into your diet, along with information on where to buy high-quality chia seeds in Pakistan from [Just Organics](https://justorganics.pk/collections/chia-seeds).
PAP – Peroxide-Free Teeth Whitening: Is It the Safest Way to Go?
Published: 2024-06-06 14:03:15

Explore the safety of PAP - Peroxide-Free Teeth Whitening. Learn about its effectiveness and risks for a brighter, healthier smile.
Most people don’t feel confident about their smiles because of discolored teeth. Tight-lipped smiles are the order of the day. This is why teeth whitening near you is the most prevalent cosmetic dental treatment.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qrg6hpec9zh9f6nhme9e.jpg)
Since the demand for [teeth whitening in Morristown, NJ](https://www.dentalcareofmorristown.com/pap-peroxide-free-teeth-whitening-is-it-the-safest-way-to-go/), is high, countless products in the market are trying to meet the demand. Therefore, don’t be shocked to see different products, some good, some excellent, while others you may not be sure where to classify them!

In the same breath, there is a new product known as PAP, which is a peroxide-free teeth whitening treatment. However, there are still some questions that are surrounding this treatment. So, read along to get to dive into what PAP is all about.
My Algorithms Blog「141. Linked List Cycle」
Tags: leetcode, python, algorithms, beginners
Published: 2024-06-06 14:00:25

## Problem
The task is to determine whether a given linked list contains a cycle. The input is provided in the following format, where each element represents a node's value in the linked list:

```
Input: head = [3,2,0,-4], pos = 1
Input: head = [1,2], pos = 0
```

If the linked list contains a cycle, the function should return True;
otherwise, it should return False. Note that the position `pos` where the cycle connects to the linked list is not passed as a parameter.

**First approach**

My initial approach uses a fast pointer and a slow pointer. The fast pointer moves two steps at a time, while the slow pointer moves one step at a time. If the fast pointer meets the slow pointer, it indicates the presence of a cycle in the linked list. However, upon reviewing my code, I believe it may be inefficient and could be optimized.


```python
# Definition for singly-linked list.
# class ListNode:
#     def __init__(self, x):
#         self.val = x
#         self.next = None

class Solution:
    def hasCycle(self, head: Optional[ListNode]) -> bool:
        if not head:
            return False
        
        fast = slow = head

        while fast.next != None:
            if fast.next.next == None:
                return False
            else:
                fast = fast.next.next
                slow = slow.next
                if fast == slow:
                    return True
        
        return False
```

- Time complexity: `O(n)`

- Space complexity: `O(1)`

Based on the LeetCode review, which uses Floyd's Cycle Finding Algorithm, my code is shown below in comparison to the provided answer code.

```python
class Solution:
    def hasCycle(self, head: Optional[ListNode]) -> bool:
        if not head:
            return False
        
        slow = head
        fast = head.next

        while slow != fast:
            if fast is None or fast.next is None:
                return False
            slow = slow.next
            fast = fast.next.next
        return True
```

- Time complexity: `O(n)`

- Space complexity: `O(1)`
HackerRank SQL Preparation: Select All(MySQL)
Tags: sql, writeups, hackerrank, mysql
Published: 2024-06-06 13:57:03

**Problem Statement:**
Query all columns (attributes) for every row in the **CITY** table.

---

**Link:** [HackerRank - Select All SQL](https://www.hackerrank.com/challenges/select-all-sql/problem)

**Solution:**

```sql
SELECT * FROM CITY;
```

**Explanation:**

- `SELECT *`: The asterisk (*) is a wildcard character in SQL that means "all columns." This part of the query specifies that you want to retrieve all columns from the table.
- `FROM CITY`: Indicates that you are selecting data from the **CITY** table.

This query will return all the columns for every row in the **CITY** table. It's useful when you need to inspect or analyze all data available in the table without any specific filtering or conditions.
Key principles to writing better Javascript
Tags: webdev, javascript, beginners
Published: 2024-06-06 13:46:39

Since the day I started writing code, I believe I was always writing bad code. I didn’t notice it was bad until I started working on a mini-project that was not really mini. As the project grew , I found myself debugging my project just to slot in the features and updates.

Accepting this was like eating a boiled sweet potato without a drink(a Malawian equivalent proverb to hard pill to swallow). But I had to accept this_ uncomfortability_. I first started by hunting for tips and experiences mostly on Hacker news and Reddit.

The collection of blog post mostly lead to the SOLID principle

We’re SOLID? yes
SOLID is and abbreviation that screams Single responsibility, Open-closed,Liskov substitution, Interface segregation,Dependency Inversion.

It is 100% okay if this sounds like something off a philosophical book.Out of the five, I really wanna tether around Single responsibility.

SINGLE RESPONSIBILITY
This principle drives my daily function architecture. A function should only do one thing. If your function is made to add two numbers that’s all it should do, nothing extra.

You’ll sometimes find yourself questioning whether the task my function is one. Let me support this previous statement with a snippet.

```
function multiply(a,b){

return a*b;
}
```

This function above clearly does one thing and thats (drum roll) multiplication. Hence this qualifies as single responsibility.

Evaluate this next snippet

```
function multiply(a,b,answer){
answer=a*b;
return answer;
}
```
The second function also qualifies as single responsibility. But the second function is bad code.
The core reason why the second function is bad is that it involves manipulation of outside values(answer). The terminology for this is mutation.

Even though mutation has alot of advantages its downside is that if alot of functions are mutating it becomes hard to track where bugs are coming from. FYI, this reason is also why global variables are discouraged. Some languages even use access modifiers to prevent this.

Single responsibility should always be considered when you are writing your functions because it is easier to track bugs and makes easier addition of features when scaling.
AI Homework Helper - Apex Vision AI
Tags: ai, education
Published: 2024-06-06 13:45:09

Apex Vision AI is an innovative Chrome extension designed to be the ultimate AI homework helper. This tool provides instant, accurate homework solutions, making studying more efficient for students. Whether you need help with math, science, literature, or any other subject, Apex Vision AI offers real-time assistance to ensure you get the right answers quickly. It seamlessly integrates with platforms like Canvas and McGraw Hill, automatically filling in answers and simplifying the learning process.

With features like detailed explanations, undetectability, instant answers, and a user-friendly interface, Apex Vision AI stands out as a reliable AI homework solver. It's not just about getting answers; it's about understanding the material better and boosting your academic performance. Regular updates keep the tool accurate and effective, making it an essential study companion for any student looking to enhance their learning experience.[](https://apexvision.ai/)
Improve Your Prompt Engineering Skills: Key Points
Published: 2024-06-06 13:40:37


![ Prompt Engineering Skills](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aqczomeb1izqrybg66qx.jpg)

**Clarity and Specificity:**

Ensure prompts are clear and specific to avoid ambiguity.
Example: Ask detailed questions like "What are the latest advancements in AI in 2024?"

**Contextualization:**

Provide context to guide relevant responses.
Example: "In the context of environmental sustainability, what are the key benefits of electric vehicles?"

**Step-by-Step Instructions:**

Break down complex queries into smaller steps.
Example: "First, explain blockchain technology principles. Then, discuss its applications in finance."

**Use of Examples:**

Include examples to clarify expected responses.
Example: "Summarize the plot of '1984' by George Orwell, starting with the setting and main characters."

**Open vs. Closed Questions:**

Decide between open-ended or closed responses based on need.
Open-ended: "What are the benefits of renewable energy sources?"
Closed: "Is solar energy a renewable resource?"

**Avoid Overloading the Prompt:**

Don’t pack too much information or multiple questions into one prompt.
Ensure Specificity:

Avoid general prompts; be specific for detailed answers.
Example: "Discuss the impact of AI on job automation in manufacturing."
Real-World Applications

**Content Creation:**

Generate engaging and relevant content.

**Education:**

Create better learning materials and detailed explanations.

**Customer Support:**

Design prompts for accurate and helpful responses.
Python Essentials for Beginners
Tags: python, programming, beginners, tutorial
Published: 2024-06-06 13:35:39

I've created a Python notebook that covers the essential fundamentals for anyone to learn Python.

What You'll Find in the Notebook:

1. Variables & Data Types: Learn how to store and work with different kinds of data in Python.
2. Operators: Understand how to perform calculations, comparisons, and logical operations.
3. Functions: Discover how to write reusable blocks of code that simplify your programs.
4. Control Flow (If-Else, Loops): Control the flow of your program based on conditions and repeat actions.
5. File I/O: Learn how to interact with files, reading and writing data as needed.
6. Functional Tools (Lambda, Map, Filter, Reduce): Explore techniques for working with collections of data.

Feel free to check out the notebook and use it as a reference as you learn Python.

https://github.com/tushrv/Exercise/blob/main/python_basics.ipynb

Additional Topics that can be added:
1. Modules and Packages: Learn how to use external libraries to extend Python's capabilities.
2. Error Handling (Try-Except): Understand how to handle errors that might occur in your code.
3. Regular Expressions: Learn to find and manipulate patterns in text.
4. Virtual Environments: Learn how to manage project dependencies effectively.

Please share your feedback. Is it helpful for beginners? Would you like to see more examples or additional topics covered? Your feedback will help me make it even better!
A Guide to ID document recognition: From concept to Future
Tags: webdev, androiddev, ai, identity
Published: 2024-06-06 13:33:34

ID Document Recognition involves the use of technology to verify the authenticity of identification documents. It ensures security and accuracy in identity verification processes.

ID Document Recognition is crucial in various sectors, including banking, travel, and online services. It leverages advanced technologies like OCR (Optical Character Recognition) and AI to scan and validate IDs. This process helps prevent fraud, enhances security, and ensures compliance with regulations.

Businesses benefit from streamlined verification, reducing manual errors and saving time. Users experience faster and more secure transactions. As digital interactions increase, the demand for reliable ID recognition systems continues to grow. Implementing robust ID recognition technology can significantly improve operational efficiency and customer trust.

For more article:
https://miniai.live/a-guide-to-id-document-recognition-from-concept-to-future/
CSS Outlines
Tags: webdev, css, css3, beginners
Published: 2024-06-06 13:29:43

## CSS Outlines

CSS outlines are lines that are drawn around elements, outside the [borders](https://www.devwares.com/tailwindcss/classes/tailwind-border-width/). Outlines are similar to [borders](https://www.devwares.com/tailwindcss/classes/tailwind-border-radius/), but they differ in a few significant ways:

- Outlines do not take up space.
- Outlines can be non-rectangular.

Outlines are defined by the following properties:

## Outline Style

The outline-style property is used to specify the style of the outline. It can take the following values: none, dotted, dashed, solid, double, groove, ridge, inset, outset.

```css
p {  outline-style: solid;}
```

In this example, the outline style of the p element is set to solid.

## Outline Color

The outline-color property is used to specify the color of the outline.

```css
p {  outline-color: red;}
```

In this example, the outline color of the p element is set to red.

## Outline Width

The outline width property is used to specify the width of the outline. The width is specified in either length units (like px, em, etc.) or by using one of the three pre-defined values: thin, medium, or thick.

```css
p {  outline-width: 2px;}
```
In this example, the outline width of the p element is set to 2 pixels.

## Outline Offset

The outline-offset property is used to specify the space between an outline and the edge or border of an element. The offset is specified in length units.

```css
p {  outline-offset: 15px;}
```
In this example, the outline offset of the p element is set to 15 pixels.

## Shorthand Property: Outline

The outline property is a shorthand property for setting outline-width, outline-style, and outline-color in a single declaration. If one of the three properties is not specified, the default value will be used.

```css
p {  outline: 2px solid red;}
```

In this example, the p element is given a red, solid outline that is 2 pixels wide.