teleren/devto huggingface dataset:
How to use React
Tags: react, beginners
Published: 2024-03-28 19:54:53

## What is REACT
React is a javascript library focused on creating interfaces by merging html with js (javascript).

## A summary of the HTML
HTML is a markup language for the web, the purpose of which is to create an interface for the user, with tags such as


`<h1></h1>`

the `<h1>` tag is used to demarcate a title, a big title, this goes for all the other variations of the <h> tag, they all represent a title.

`<p></p>`
the <p> tag represents a paragraph, and that's all you'll need for this tutorial.

## A summary of JAVASCRIPT and react
The javascript is an object-based, interpreted language, and is better known as the scripting language of the web. Nowadays, many web pages are made with javascript as their scripting part, either using node.js or pure javascript, in our case react needs to be used alongside node.js with javascript, as this is a javascript library and does not come built-in with the scripting language of the web. to start the react project will use a command line, which is;
```
npm i create-react-app
```
This command is to download the react project creator.
```
npx create-react-app your-project-name
```
This command already creates the project.

There will probably come a project where the app.js looks like this
```

import logo from './logo.svg';

function App() {
  return (
    <div className="App">
      
    </div>
  );
}

export default App;

```
Lets explain this code.

`import -this in the thing who you import- from -the file who this things is-`

the import line of code imports something into our code, be it a library or another .js code file.

```
function App() {
  return (
    <div className="App">
      
    </div>
  );
}
```

This code will call the HTML elements, to be displayed, as I said at the beginning this will create the html elements and render them together with the javascript, incorporating javascript with html.

To add html elements we could add the elements, such as the paragraph and the header, inside the parent div, in this case the APP div, the result will be; 

```
function App() {
  return (
    <div className="App">
      <h1>Hello world, I am a Header</h1>
      <p>Hello world, I am a paragraph</p>
    </div>
  );
}

```

To run this code you will need to prompt this into your cmd;

```
npm start
```

The result will be;


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gdsebaorua1hurz4ffmq.png)
Linux Command Lines That You Should Know!
Tags: cybersecurity, linux, bash, security
Published: 2024-03-28 19:52:59

Have you ever encountered frustration running commands in the terminal to get one job done? You use plenty of commands to get one job and then you get frustrated, These are the command lines that will lessen your frustration and get you more productive on the task, So, are you ready to be Pro in Linux? let’s start with emptying the file!

## Just Empty Don’t Delete!

If you just want to empty the file without deleting the file itself, you can use this command:

`> filename`

## Use alias to mistypos

Sometimes it must have happened to you that you always mistype a command and you have to retype it again, So no need to retype it again just use alias in Linux!

For example, you might often mistype echo as ecoh, then just put an alias in your bashrc file like this:

`alias ecoh=echo`

## less to read files
Using cat to see the contents of the file is not a good option, because it displays the whole text and then you struggle to see the script from the start,

Using less command to read files is better option.

`less path_to_file`

You can search for terms inside less, move by page, display with line numbers etc.

## Move to beginning or end of line

This has happened to me many times, whenever I’m working with a long command, I used to use arrow keys to get to the beginning, but my nightmare ended when I found out this!

You can also Home and End keys here of course but alternatively, you can use Ctrl+A to go to the beginning of the line and Ctrl+E to go to the end.

## Accidental Terminal Freeze!

Accidently used Ctrl+S on the terminal? Don’t worry, you don’t have to close the terminal, not anymore. Just use Ctrl+Q and you can use the terminal again.

ctrl+Q

## Reverse Search
This would have happened to you when doing long CTFS and you were working for some time and then you had to use the same command as you used earlier in the terminal, you can use reverse search to search for the command that you used earlier the in the history!

Just use the keys ctrl+r to initiate reverse search and type some part of the command. It will look up the history and will show you the commands that match the search term.

ctrl+r search_term

By default, it will show just one result. To see more results matching your search term, you will have to use ctrl+r again and again. To quit reverse search, just use Ctrl+C.

## Switch back to the last working directory

Whenever you end up being in the wrong directory, and you then cd to the last directory that you were working on, so no need for that use this to switch back to the last working directory!

`cd -`

## Running multiple commands in one single command
Don’t wait for the first command to complete to run the second after that, You can use the ‘;’ separator for this purpose. This way, you can run a number of commands in one line.

`command_1; command_2; command_3`
Reference: [It’s Foss](https://itsfoss.com/linux-command-tricks/)
P3 Cuisines Southern Comfort Foods
Published: 2024-03-28 19:48:48

**<a href=https://p3cuisines.com/>P3 Cuisines</a>** is a distinguished restaurant in Baltimore specializing in Cajun and Creole foods. Led by Chef Shonda Washington, who draws inspiration from her New Orleans upbringing and training in Italy, the restaurant offers a unique dining experience that blends simple ingredients with rich flavors. It stands out for its fusion of South Asian and Maryland soul food, featuring signature dishes like seafood, Po-boy sandwiches, and Creole specialties. P3 Cuisine, known for its warm ambiance and soulful essence, caters to a diverse clientele, aiming to deliver a delightful culinary journey with each dish.
What does it mean for a container to be deterministic? 🙂
Published: 2024-03-28 19:35:06

By default Docker/Kubernetes container images are built using commands  like "apt update", which do different things depending on when they're run. The image contents aren't 100% built from the input source, so they're nondeterministic and can break easily.

Using other tools, you can specify *exactly* what does into an image: deterministic. If you or the CI or your colleague in a month runs the build script, they'll get 100% the same results. It's *much* easier to develop.

Another huge benefit is that caches (e.g. CI build times) work more effectively. The feedback pipeline is a *lot* faster.

Thanks, Jason!
Read This if You Hate Ternary Operators
Tags: javascript, ternary, conditional, operator
Published: 2024-03-28 19:34:05

**_First_** things first, if you want to see the rest of the animeme banner in all of its glory, which is what more than likely drew you to this article in the first place, you can find it [here](https://preview.redd.it/ternary-operator-v0-cxvk4zf2h21b1.png?auto=webp&s=8bc73ffe4a0781c43f561a81575fb9a0c6e1e7a3).

---

Now that the critical and pressing matters are out of the way, please grant me a couple of minutes of your time to persuade you to fall **madly**, _deeply_ in love with ternary operations (thank you, @kevinpowell)

When I first saw ternary operators, I became _immediately_ angry. Unnecessarily angry, even. There was absolutely no reason for me to be feeling that way over some plaintext displaying on my screen. But it happened and I allowed myself to feel that way, which is usually a healthy thing. But not in this case. 

To save any future programmers from this irrational behavior, I want to share a [mnemonic](https://en.wikipedia.org/wiki/Mnemonic) I thought of that will hopefully make sense of what is otherwise some confusing syntax at first glance.

---

So here, we have a typical ternary operation:

```javascript
let highest;
const num1 = 42;
const num2 = 42;

highest = num1 > num2 ? num1
    : num1 < num2 ? num2
    : num1;
```

The way that I choose to see this expression is quite a literal one. Whenever I see that question mark after an expression, I read it as if someone was asking a question:

---

> **Is `num1` greater than `num2`?**
>
> **Oh, it isn't? Well then, is `num1` less than `num2`?**
>
> **That's _still_ not true?? Hmmm, well then that only leaves me with one option, which is that `num1` and `num2` must be equivalent to each other!**
>
> **Therefore, `highest` will be assigned to `num1` (or `num2`, your call).**

---

While this may seem pretty silly if you've already made peace with ternary operations, I really wish someone would've explained it to me in this way when I first came across them.

Another important thing about ternary operators to keep in mind, is that syntax formatting is _everything_. Much like the way I structured the ternary operator above, it really helps with readability when it's organized as such. It's pretty similar to how [switch cases](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) are formatted, when you think about it. 

There's no hard and fast rule about how a ternary should be structured, but as long as you're separating out each expression on a new line, you should be pretty good.

---

That's all I have for this one. I hope it was a step-forward in seeing the beauty of ternary operators if you've harbored any resentment towards them in the past. They can be a beautiful thing! 

~~ <3
Exploring HTML5 Elements: A Comprehensive Mind Map Table
Tags: beginners, html
Published: 2024-03-28 19:27:37


I recently embarked on a journey to understand the structure of HTML5 language better. As a beginner, when I opened the MDN Web Docs website, I was overwhelmed by the sheer volume of information available. To tackle this, I decided to create something like a crib—a comprehensive mind map table of all HTML5 elements, their possible attributes, and values.

I utilized the resources available on MDN Web Docs extensively. Additionally, I leveraged the assistance of ChatGPT to help me organize and categorize the HTML elements accurately. With their help, I classified all elements into ten distinct groups:

1. Document Structure and Meta
2. Text Formatting
3. Semantic Elements
4. Links and Navigation
5. Embedded Content Element
6. Interactive Elements
7. Tables
8. Forms
9. Lists
10. Miscellaneous

Each group contains a collection of HTML5 elements with their respective attributes and possible values. This organization helps streamline the learning process and provides clarity on how different elements relate to each other.

**How to Use:**

1. Navigate by Groups: Easily find relevant elements by exploring the categorized groups.

2. Understand Attributes: Gain insights into the purpose and usage of attributes for each HTML5 element.

3. Explore Values: Discover the various values that attributes can take, enhancing your understanding of their functionality.

**Get Started:**
Ready to explore the mind map table? [Click here](https://miro.com/app/board/uXjVKcjXo2s=/?share_link_id=697068455869) to access the full resource on Miro.

**Feedback and Contributions:**
As I continue my learning journey, I welcome feedback and contributions to improve the accuracy and completeness of this resource. If you notice any mistakes or have suggestions for enhancements, please feel free to leave a comment or reach out to me directly.


Let's empower each other to become better web developers through collaborative learning and sharing of knowledge.

Happy coding! 

P.S. If anyone knows how to attach Miro project to a post, please share with me)

{% embed https://miro.com/app/board/uXjVKcjXo2s=/?share_link_id=697068455869 %}
Top-Tier Electrical Solutions: Your Premier Destination in Albany, NY!
Published: 2024-03-28 19:21:20

Welcome to Houghtaling Electrical, your premier destination for top-tier electrical solutions in the heart of Albany, New York and its surrounding areas. Serving both residential and commercial clients, we offer a comprehensive range of expert solutions.
Specializing in lighting design, from indoor elegance to outdoor landscapes, we tailor each design to suit your unique preferences and lifestyle.
Our commitment to excellence extends beyond aesthetics. With prompt and reliable service, we handle everything from underground cable location to fault locating, ensuring your electrical systems run smoothly at all times. Additionally, our expertise encompasses breaker panel installations, doorbell wiring, AC wiring, standby generators, and more, guaranteeing safety and reliability for your property.
Visit: [Houghtaling Electrical, Top-Tier Electrical Solutions](https://houghtalingelectrical.com/)
Contact us: 518-857-5320
iOS404 - The missing web features of iOS.
Tags: ios, mobile, webdev, webkit
Published: 2024-03-28 19:13:47

---
title: iOS404 - The missing web features of iOS.
published: true
description: Using caniuse data, see how iOS lags behind compared to Chrome for Android, Firefox for Android, and/or Safari Desktop
tags: ios, mobile, webdev, webkit
cover_image: https://ios404.com/icons/ios-404-og-1200x630.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2024-03-28 18:32 +0000
---

In 2018, I was working in the pre-pandemic world. All the devs (iOS + web) sat in the same section.

I loved being inspired by the apps my fellow programmers were creating with Swift.

In one such app, a colleague showed me a feature that allowed the user to swipe to change options along with some haptics to accompany the movement. This additional layer of feedback significantly enhanced the user's experience.

I started focusing more on mobile for my web apps too.

While I was adding haptics to a site with Vibration API - I started checking iPhones and iPads too (I use a Pixel). Too frequently, the tech I wanted to use to make sites as rich as native apps, was noticeably absent from only iOS. Compounding this frustration, I couldn't nudge users on iPhones or iPads to other browsers since it was all WebKit.

Fast foward to 2024. 

I've embarked on a period of "fun-employment," during which I'm immersing myself in learning new skills such as R3F, Blender, and nextjs. Although learning is energizing, to really learn the concepts you've got to make things. 

My theme for March was "Advocacy" --- and that's how [iOS404](https://ios404.com) came to be.

I wanted it to be plain-as-day what iOS is lacking in web features even compared to its flagship Desktop Safari.

iOS404 uses caniuse data. Other sources like MDN are more exhaustive and have even more missing iOS features. I'm hoping [iOS404](https://ios404.com) data is a great start and can aid you as you plan and build your websites.

Happing coding, and across __all mediums and languages__.

-Shalanah Dawson
QB TECH SOLUTION
Published: 2024-03-28 19:13:29


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v6fdag9v978mpd3amp6u.jpg)We Provide services Whether it be web development, social media, SEO, business cards, flyers, logo designs and more. Visit [qbtechsolution](https://www.qbtechsolution.com/) for more information.
How JavaScript executed in the v8 engine
Published: 2024-03-28 18:42:32

Exploring the V8 Engine: The Role of Ignition and TurboFan

The V8 JavaScript engine is a powerful beast that powers not only Google Chrome but also Node.js, Electron, and a host of other software platforms. It's renowned for its speed and efficiency, which is largely due to its two main components: Ignition and TurboFan. These two systems work in tandem to execute JavaScript code at lightning-fast speeds. But how do they do it? Let's dive in.

### Parsing and Abstract Syntax Tree (AST) Creation

The journey of JavaScript code execution begins with parsing. V8 takes the raw JavaScript code and breaks it down into a structure it can understand – the Abstract Syntax Tree (AST). This tree represents the syntax of the code in a hierarchical form, with each node representing a construct occurring in the source code.

### Bytecode Generation by Ignition

Once the AST is in place, Ignition comes into play. This low-level, register-based interpreter takes the AST and converts it into bytecode. This bytecode is a lower-level, platform-independent representation of the original JavaScript code. It's designed to be compact and efficient, allowing for quick interpretation and execution.

### Execution: The Role of Ignition

Ignition then walks through this bytecode, executing it line by line. It's a meticulous process, where Ignition manages the call stack and handles memory allocation among other operations. This step is crucial as it's where the code actually comes to life and performs the operations it was written to do.

### Optimization with TurboFan

However, not all code is created equal. Some parts are executed more frequently than others. These "hot" parts are where TurboFan, V8's optimizing compiler, comes in. TurboFan compiles these frequently executed parts into highly optimized machine code, tailored to the specific hardware it's running on. This results in a significant performance boost.

### Adaptive Execution: Switching Between Ignition and TurboFan

One of the most interesting aspects of V8 is its ability to switch between Ignition and TurboFan. This adaptive execution ensures that JavaScript code runs as efficiently as possible. When a piece of code is identified as "hot," TurboFan takes over, optimizing it on the fly. If the code changes or is no longer frequently executed, V8 can switch back to Ignition, ensuring resources are used effectively.

### Conclusion

The interplay between Ignition and TurboFan is a fine example of modern computing – a symphony of interpretation and compilation, working together to make JavaScript a fast and efficient language for the web and beyond. As developers, understanding these underlying processes can help us write better, more performance-oriented code. And as users, we can appreciate the complex machinery that works silently behind the scenes every time we open a web page or run a Node.js application. V8 is truly a marvel of software engineering, and its continuous evolution promises even faster and more efficient JavaScript execution in the years to come.
What are Large Language Models (LLMs)?
Tags: largelanguagemodels, ai, deeplearning
Published: 2024-03-28 18:38:52

Large Language Models (LLMs) are advanced artificial intelligence systems designed to understand, generate, and interact with human language at a large scale. These models are trained on vast datasets of text from the internet, books, articles, and other sources to learn the structure, nuances, and complexities of language.

#### Key Features of LLMs:

 - **Understanding Context:** LLMs are capable of understanding context and generating coherent and contextually relevant responses. This allows them to perform tasks like answering questions, summarizing texts, and even creating content that feels natural and human-like.
 - **Generative Capabilities:** Beyond understanding text, LLMs can generate new content. This includes writing articles, composing poetry, creating code, and more, based on the patterns and knowledge they've acquired during training.
 - **Versatility:** They can be applied to a wide range of language tasks, such as translation, sentiment analysis, and content recommendation, making them incredibly versatile tools in both business and creative applications.

[**Learn about Langchain**](https://python.langchain.com/docs/get_started/introduction)

#### How LLMs Work:

LLMs are based on a type of neural network architecture known as transformers. Transformers are designed to handle sequential data, making them ideal for natural language processing (NLP) tasks. The training process involves adjusting the model's parameters based on the input data so that the model learns to predict the next word in a sentence, given the words that precede it. Over time, this allows the model to generate coherent and contextually appropriate text.

#### Applications of LLMs:

 - **Customer Service:** Automating responses to customer inquiries on websites and social media.
 - **Content Creation:** Assisting in writing articles, reports, and even generating creative fiction.
 - **Translation Services:** Providing more accurate and nuanced translations than traditional machine translation tools.
 - **Education:** Offering tutoring, feedback on written work, and personalized learning experiences.

#### Challenges and Ethical Considerations:

While LLMs offer significant benefits, they also pose challenges and ethical considerations. These include concerns about bias in the training data, the potential for generating misleading or harmful content, and issues of intellectual property and copyright when generating text. Ensuring responsible use and ongoing monitoring of these models is crucial to address these challenges.

Large Language Models represent a significant leap forward in the field of artificial intelligence, offering unprecedented capabilities in understanding and generating human language. As these models continue to evolve, they promise to unlock new possibilities across various domains, transforming how we interact with technology and each other.