teleren/devto huggingface dataset:
Rust! Why another programming language for Embedded Systems
Tags: rust, programming, embeddedsystem, career
Published: 2022-09-09 17:58:21

Greetings, Rustaceans!

Whenever we talk about Embedded Systems, we remember the programming languages associated with embedded systems are C and C++, as they both are low-level languages and faster in execution. But C and C++ are older (in terms of origin, not in terms of usefulness) and there are few chances they shall be upgraded according to the future world requirements as technology is pacing faster forward.

Rust is being developed for the safety and faster execution of the program in diverse domains, whereas embedded devices are also a dynamic domain, so it does require a future-oriented programming language. Let's quickly understand how and why rust can be used for embedded systems along with C and C++.

## Why Rust? It provides features mentioned below

- Performance
- Reliability
- Productivity

## Why Rust for embedded devices?

#### Statically typed and strongly typed

Embedded devices totally depend on the I/O pins, so it requires dedicated pin configuration so that it won't be used by another part of your application. Rust is statically typed and strongly typed so the guaranteed pin configuration is maintained at the compile time only.

#### Memory safety and memory management

Rust's important feature is that it is better than other programming languages in most use cases of memory safety. Rust doesn't have garbage memory collection so one can use a global allocator and dynamic data structure, to avoid segmentation faults or core dump issues. Both stack and heap are used independently in Rust.

#### Concurrency

Thread safety and management is also crucial and important aspect of multi-tasking-based embedded applications. Rust has different concurrency abstractions for various use cases, which provides the ability to maximize performance and minimize errors in a robust way.

#### Interoperability

Can be interfaced or integrated into existing C or C++ codebase. For this purpose, there are two dedicated modules in the `stdlib` called `std::ffi` and `std::os::raw`. This is possible because the memory layout between Rust and C/C++ is similar enough or the same.

#### Portability

Write once and use it with a variety of systems, as it allows cross-compiling, to build a binary in one architecture and can be used in multiple architectures. Support is being added and upgraded for microcontrollers and microprocessors.

#### Community is keep growing

As part of the Rust open source project, support for embedded systems is driven by a best-in-class open source community, with support from commercial partners. (Source: www.rust-lang.org)
Hey,Dev World,Glad to write my first post.
Published: 2022-09-09 17:52:33


I recently developed my portfolio using

- React js
- Three js(landing page)
- Html
- CSS
- JavaScript
 
###[checkin](https://pranavmadhu.netlify.app/) here:- 

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

###portfolio Feel free to comment your opinion.
What is the ternary operator and how do I use it?
Tags: javascript, beginners, programming
Published: 2022-09-09 17:44:41

JavaScript's ternary operator (`?:`), also called the conditional operator, is used to replace a conditional statement, most commonly an assignment. For example:

```js
// Code using if...else
let x;
if (someCondition) {
  x = 10;
} else {
  x = 20;
}

// Same result using the ternary operator
const x = someCondition ? 10 : 20;
```

As you can tell from the above example, the ternary operator is shorter than using an `if...else` statement and allows us to assign the resulting value to a variable, provided the condition is pretty much a one-liner. A useful result of this is that we can use the ternary operator for arrow functions with implicit returns:

```js
// Code using if...else
const conditionalX = (condition, x) => {
  if (condition) return x;
  else return x + 5;
}

// Same result using the ternary operator
const conditionalX = (condition, x) => condition ? x : x + 5;
```

Note, however, that nesting ternary expressions is usually discouraged with ESLint even going as far as having a [dedicated rule](https://eslint.org/docs/rules/no-nested-ternary) for this kind of situation. Additionally, the ternary operator is a favorite of React developers, as it allows for easy conditional rendering in JSX code:

```jsx
const ItemListTitle = (count) => (
  <h3>Item list{ count ? (<span> - {count} items</span>) : '(Empty)'}<h3>
);
```

Finally, you might be wondering why it's called the "ternary" operator. The word "ternary" is based on the [n-ary word setup](https://en.wikipedia.org/wiki/Arity) and means an operator with three operands (condition, expression to execute if truthy, expression to execute if falsy).

---

_Do you like short, high-quality code snippets and articles? So do we! Visit [30 seconds of code](https://www.30secondsofcode.org/) for more articles like this one or follow us on [Twitter](https://twitter.com/30secondsofcode) for daily JavaScript, React and Python snippets!_ 👨‍💻
Delete Nth Node From Last LinkedList
Tags: javascript, leetcode
Published: 2022-09-09 17:38:08




Approach 1:

```js
var removeNthFromEnd = function(head, n) {
    let length = 0;
    let current = head;
    
    while(current){
        current = current.next;
        length++;
    };
    
    let reachTill = length - n;

    current = head;
    let previous=head;
    length = 0;
    
    if(reachTill === 0) return head.next;

   while (current) {
       if(length === reachTill){
           break;
       }
       length++
    previous = current;
    current = current.next;
   }
    
    previous.next = current.next;
    return head;
};
```

Approach 2 :
![fast & slow Pointer Explanation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yo972oyjkmnmq5u3j122.jpeg)

```js
var removeNthFromEnd = function(head, n) {
   let fast= head;
   let slow = head;
    
    
    for(let i=0; i< n; i++){
        fast=fast.next;
    }
    
    console.log(fast)

  if (!fast) return head.next;

  while (fast.next) {
    fast = fast.next;
    slow = slow.next;
  }

  slow.next = slow.next.next;
  return head;
};
```
What Does a Software Developer Do? A Deep Dive into the Career
Published: 2022-09-09 17:34:29

You’ve always had a penchant for solving puzzles and problems—especially when it comes to technology. Not only that, but friends and family frequently come to you for help with all their tech troubles. And you’re typically the first one in line when a new gadget is released. You simply love the innovative world of technology and the possibilities that come with it.
What is a software developer, exactly?
You know that smartphone app you rely on? That computer game that kept you transfixed for hours as a kid? That program that helps you budget and track expenditures? Software developers created all of them.
Software developers are the creative, brainstorming masterminds behind computer programs of all sorts. While some software developers may focus on a specific program or app, others create giant networks or underlying systems that help trigger and power other programs. This is why there are two main classifications of developers: applications software developers and systems software developers.
Don’t Miss - Find [Best Software Development Companies](https://suggestron.com/services/software-development/)	
What do applications software developers do?
According to the U.S. Department of Labor (DOL), developers in this sector are responsible for designing computer or mobile applications.1 The nature of their work is largely focused on creating for consumers. This involves understanding user needs, developing software solutions, monitoring performance and modifying programs as needed.
What do systems software developers do?
These professionals are focused on operating systems-level software, compilers and network distribution software, as outlined by the DOL.1 This role is geared more toward designing solutions for enterprise organizations. This includes developing software for medical, industrial, military, communications, aerospace, business, scientific and general computing applications.
Don’t Miss – List of [Custom Software Development Companies](https://suggestron.com/services/custom-software-development/)
[Software Development Outsourcing Companies](https://suggestron.com/services/software-development-outsourcing/)
Where do software developers work?
Job opportunities for software developers are vast and varied. Application software developers held just over 944,200 jobs in 2018, according to the Bureau of Labor Statistics (BLS).3 There were about 421,300 positions for systems software developers in that same year, equating to more than 1.3 million opportunities for software developers.3
So where are these opportunities, exactly? The skills of software developers are needed in a variety of industries.
Top fields for application software developers3
•	Computer systems design and related services
•	Finance and insurance
•	Software publishers
•	Manufacturing
•	Management of companies and enterprises
This Article is published on [rasmussen.edu](https://www.rasmussen.edu/degrees/technology/blog/what-does-software-developer-do/)
Web3 vs Web 3.0
Published: 2022-09-09 17:22:52

 Jack Dorsey and Elon Musk are critical of Web3. Their complaint is that Web3 promises to give users control over their own data, but is failing to do so. They suggest that the reality of Web3 is that it is owned by VC’s and their limited partners.

 However there seems to be some confusion between Web3 and Web 3.0. Web3 is a term created by Polkadot founder Gavin Wood, while Web 3.0 or the semantic web was coined by Tim Berners-Lee, who is one of the inventors of the world wide web. 

 The Web3 foundation was created to promote the ideas of Web3, but even they confuse the terms Web3 and Web 3.0 using both on their website. It might be helpful to understand what Web 1.0 and Web 2.0 are to better understand what Web3 is. Web 1.0 is known as the read-only web that contained read-only websites connected by hyperlinks. Web 2.0 is known as the read-write web and includes all the well known social media sites, such as facebook and twitter.


The major tenents of Web3 and Web 3.0 are listed below:


Four key features of Web 3.0:

- Ubiquity
- Semantic Web
- Artificial Intelligence
- 3D Graphics

Berners-Lee described the goal as:

“I have a dream for the Web [in which computers] become capable of analyzing all the data on the Web – the content, links, and transactions between people and computers. A "Semantic Web", which makes this possible, has yet to emerge, but when it does, the day-to-day mechanisms of trade, bureaucracy and our daily lives will be handled by machines talking to machines. The "intelligent agents" people have touted for ages will finally materialize.”



Web3 Beliefs

- Users own their own data, not corporations
- Global digital transactions are secure
- Online exchanges of information and value are decentralized

The Foundation describes Web3 goals as:

“Our mission is to nurture cutting-edge applications for decentralized web software protocols.
Our passion is delivering Web 3.0, a decentralized and fair internet where users control their own data, identity and destiny.”



 As you can see Web3 is completely different than Web 3.0. Web 3.0 sounds like dystopian nightmare that the NSA and the CCP would love and are actively working towards. I am not saying that was Berners-Lee’s goal. Web3 is trying to do the exact opposite and giving back control of the web to users, which is a goal I can support.
Why not to use inline css
Tags: css, webdev, beginners, tutorial
Published: 2022-09-09 17:16:53

When first making websites you will probably want to style your html elements so the site doesn't look like it's from the 90s. This is done with cascading style sheets or css. Css is added to HTML in 2 ways inline or as an external file. A lot of people when first starting out will put their css inline. When first experimenting with how html and css fit together this is fine but you can run into a few problems doing this. I have outlined 5 reasons I believe you should not use inline css.

## 1 Maintenance 
Websites of all types need updating and occasional rebranding. most people will want to go back and change certain things. This is a normal part of the build and maintenance process. But it is very difficult if you have to update each element individually. That also takes a lot of time and we don't have much of that so let's not waste it.

## 2 Redundancy 
A lot of elements will end up having the same style properties. For example you probably want all the buttons to look the same. Instead of copying and Pasting the same values for each element. You can create css in an external sheet for all button elements and put the style properties in once then they all look the same. We now tie this back to number one, you want to update the color of your buttons. You can just update the color in your css file once instead of having to go and change the value for each element individually. 

## 3 Speed
More lines of code means longer load times. What could be accomplished with a few lines a css if repeatedly placed inline throughout a webpage can really increase file size. Bigger file means it eats up bandwidth, resulting in a slower site. When coding I try to take a DRY(don't repeat yourself) approach as it will often save time both writing and running the code. Browsers will also cache external file sheets for later use. However inline css can't be cached and will have to be reloaded every time the page is loaded.

##4 Not S.E.O friendly
Inline css adds a lot of extra text to your html this can affects how it is viewed by a search engine bot. This can affect your search engine rankings. Inline css also doesn't play well with older screen readers and can result in a style and/or layout that you didn't intend.

## 5 Unresponsive 
Css selectors and media queries don't work when placed inline. That's means no 

>
::hover 
::before 
::after
Or
@media

As a person who puts a lot of emphasis on responsive design I use selectors and media queries very often in my css.

## bonus
Inline css will override a global or inherited styling. This can be helpful if that's your intention. But can have unintended outcomes and get out of hand quickly when updating your site. 

The main point I want to get across is keeping the design separate from content. It can save you many headaches and is considered a web design best practice. Have fun styling your sites.
Enable hibernate on Ubuntu 20.04
Tags: linux, ubuntu, hibernate
Published: 2022-09-09 17:16:09

Source : [How to Change Lid Close Behavior in Ubuntu 20.04](https://ubuntuhandbook.org/index.php/2020/05/lid-close-behavior-ubuntu-20-04/)

### 1. Open a new shell session 
### 2. Run command to open file 
`sudo gedit /etc/systemd/logind.conf`
### 3. Edit the file to enable hibernate on closing lid
When the file is opened, search for the following line 
```bash
#HandleLidSwitch=suspend
```
remove the `#` to enable the setting and save the changed document

_You can also choose one of the following options if suspend is not what you are looking for_
```bash
HandleLidSwitch=lock – lock when lid closed.
HandleLidSwitch=ignore – do nothing.
HandleLidSwitch=poweroff – shutdown.
HandleLidSwitch=hibernate – hibernate Ubuntu.
```
### 4. Apply the changes
Apply the changes by restarting the service 
```bash
systemctl restart systemd-logind.service
```

Your system should suspend/hibernate now when you close the lid of your laptop

_________________

If you want to verify if the option you chose is available on your device you can run
```bash
sudo systemctl hibernate/suspend/lock
```
Detallado Automotriz a Domicilio
Published: 2022-09-09 17:15:03

Pulido PREMIUM de 5 pasos y nanocerámicos todos los dias a domicilio. Expertos en autos PREMIUM y negros.
Terminado espejo, excepcional brillo, espectacular repelencia al agua y a la suciedad, proteccion UV, duración 6 meses✨
Conoce paquetes aquí ℹ https://bit.ly/pqtDGDL


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lbv5wmg8h6h6odwdn3bq.jpeg)
Preact Releases Signals
Tags: preact, react, signals
Published: 2022-09-09 15:08:10

---
title: Preact Releases Signals
published: true
description: 
tags: preact,react,signals
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---

The [Preact team released signals](https://preactjs.com/blog/introducing-signals/). As someone who doesn't like the complexity/uniqueness of [Hooks](https://reactjs.org/docs/hooks-intro.html), it feels a lot more like the simplicity of Svelte. It also reminds me of Robert Penner of [easing equation](http://robertpenner.com/easing/) fame's [Signals library for ActionScript 3](https://github.com/robertpenner/as3-signals) he modeled after C#'s event handling.


I think this does 2 things: continues the tradition of Preact being fast but still providing a simple API which is extremely hard for good performance; they often don't go hand in hand like this. Second, it _does_ move Preact further away from React architecturally. You have people today who think you shouldn't use classes in React, which is misinformed, but I get _why_ they say that. Hooks and Classes are the supported, and encouraged architecture to utilize and Preact's Signals move intentionally away from that, further defining them as a unique framework, NOT a "React add on".


We've seen this framework forking happen a lot as good ideas are remixed like [Aurelia](https://aurelia.io/) via [Angular](https://angularjs.org/), [Derw](https://www.derw-lang.com/) via [Elm](https://elm-lang.org/), [Restify](http://restify.com/) via [Express](https://expressjs.com/), and [Spring Boot](https://spring.io/projects/spring-boot/) via [Spring](https://spring.io/) to name a few. It's interesting to me this obsession with performance that Preact has with their ability to provide a simple API. That said, I am in no way convinced this'll solve the architecture problem. Without at least guidance, or more importantly, a framework + docs on how to utilize Signals at scale, you'll just end up with a random mess. Still, it's awesome how far they've come, and it's neat to see them still innovating years later.
100DaysofReact (Day 1)
Tags: react, javascript, html, css
Published: 2022-09-09 16:53:39

Hello,
I am Rajkamal Kanna 
Today I started the 100 days of Simple Projects in React and I am taking the reference from @[James Hubert](https://dev.to/jwhubert91) 

This is for my Practice purpose only

wish me luck thank you 

host on Github : [Clock](https://rajkamalkanna.github.io/clock/)
Source Code : [Day1-Clock](https://github.com/Rajkamalkanna/clock)
Elasticsearch - analyzers and tokenizers in a human words
Published: 2022-09-09 16:51:42

Hi,

I would like to represent the article which is the first one part from series devoted to rather interesting, but together with that very complicated topic at elasticsearch - analyzers and tokenizers.

Hope that you will find it to be interesting and useful. Have a pleasant reading

"[Elasticsearch - analyzers and tokenizers - part 1 theory](https://sergiiblog.com/elasticsearch-analyzers-and-tokenizer-part-1-theory/)"
Xamarin Developer with .NET
Tags: xamarin, developer
Published: 2022-09-09 15:57:30

Titel: Xamarin Developer with .NET
Location: Jersey City, NJ
Duration: Contract

Job Description:

6 to 10 years of hands-on experience developing solutions with Microsoft .NET, C# Full stack related technologies.
Experience developing applications using APIs & services-driven architecture is a must.
Experience with Microsoft's .NET Framework using C# is a must. Experience with source control technologies like Git and related processes is a must.
3 years of recent experience with Xamarin (iOS & Android) is a must
Experience in Xamarin Native is a plus
Experience in SQL or NoSQL database technologies is a strong plus.
Experience in CI/CD solutions using GIT, Jenkins, and other tools Experience with other front-end web application technologies such as Angular, JavaScript, HTML, CSS, etc.
Good communication and teamwork skills, including the ability to work independently.

Thanks!
Shashi Shekhar
916-829-8282
shekharshashi699@gmail.com
HOW TO SOLVE (N-rows ) DIAMOND PATTERN USING C++.
Tags: beginners, programming, codingninjas, algorithms
Published: 2022-09-09 15:57:20

**(N-ROWS) DIAMOND OF STARS PATTERN**

loops are the most important part of any programming. to master the the concept of loops I practiced various type of pattern (Star,Alphabet,Numeric) .

This question is a last question of assignment in coding-ninjas platform . 

**Print the following pattern for the given number of rows.
Note: N is always odd.


Pattern for N = 5

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

The dots represent spaces.
**

I divided the pattern in 4 parts the upper left,The upper right,
The bottom left and the bottom right . which makes it very easy to solve the given problem.so there are total 6 loops

1. the loop which count the rows of upper triangle (n+1/2) .
2. the loop which count the rows of bottom triangle (n/2).
3. the loop to print spaces for upper triangle (nested loop of upper loop).
4. the loop to print spaces for bottom triangle (nested loop of bottom loop).
5. the loop to print the * for upper triangle (nested loop of upper loop).
6. the loop to print the * for bottom triangle (nested loop of bottom loop).

```
#include<iostream>
using namespace std;
int main()
{
    int i, j, rowNum, space;
    cin>>rowNum;
    for(i=1; i<=(rowNum+1)/2; i++)
    {
        for(j=1; j<=(rowNum+1)/2-i; j++)
            cout<<" ";
        for(j=1; j<=(2*i-1); j++)
            cout<<"*";
        cout<<endl;
    }
    for(i=(rowNum/2); i>=1; i--)
    {
        for(j=1; j<=(rowNum/2)-i+1; j++)
            cout<<" ";
        for(j=1; j<=2*i-1; j++)
            cout<<"*";
        cout<<endl;
    }
    cout<<endl;
    return 0;
}
```
[git-link](https://github.com/suryansh-code/DATA-STRUCTURE-ALGORITHM---CODING-NINJAS/blob/master/diamond_pattern.cpp)