teleren/devto huggingface dataset:
Handy MATLAB Tips for beginners: Syntax, variable names and more
Tags: tutorial, beginners, matlab
Published: 2022-08-22 07:36:00

In this super little post, I will give some tips that, I hope, will benefit beginner MATLAB users. They will be related to syntax and variable names. So, let's go!

## Tip 1: Spaces

Generally, spaces do not affect MATLAB code when creating variables (except when creating arrays), so you can decide whether you want to put them or not.

I recommend using them as they make the code easier to learn. For example, MATLAB will interpret these two lines equally, independently of the spaces:

```
x=3;
x = 3;

```

One thing to consider when using spaces is that you can't add them in variable names. Those names may have digits and letters, but never white spaces.

For example, you can have a variable called myVariable or my\_variable, but not my variable because it includes spaces in it.

## Tip 2: Syntax Errors

When we commit an error in MATLAB, it lets us know with some red lines that describe the said error. For example:

![MATLAB error.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1660297802311/H5J2XJQpM.png)

In the example above, I have committed a syntax error, as I can't assign a value to a constant, and MATLAB informs me about that.

We describe a syntax error as not fulfilling the proper form of a MATLAB statement. And this term applies to any programming language, not only MATLAB.

## Tip 3: Variable names

A variable name can be a letter or a word. We can use numbers (they can't be the first element of the variable name) and lower case and upper case letters.

We can check the highest number of characters allowed for a variable name in MATLAB with the **namelengthmax** command. If we write an identifier longer than the maximum, then MATLAB will ignore the extra characters.

MATLAB also differentiates between upper and lower case. For example, a variable called **M** is different from another one called **m**. Or a variable called **CAR** is different from **cAr**.

We can also include underscoring in our variable names (but we can't use them as the first element). For example, we can have a variable called **my\_car**.

## To sum up

In this short post, I've written the three most common mistakes beginners make when they begin programming, and I hope to have given some handy tips on how to address them.

The most important thing to correct our mistakes when programming (as no matter how good we are, we will always make mistakes) is to read what the error is, so we can begin correcting it.

## Useful links

Check other articles in my [MATLAB](https://dev.to/sandra1me/series/19226) series if you want to know more!
Using Python Scripts to Take Screenshots
Tags: generalprogramming, imageprocessing, automation, python
Published: 2022-08-22 07:30:51

There are many reasons why developers might want to capture screenshots of web pages. You might want to capture an image generated from dynamic code that you've written, collect screenshots of web pages mentioned in a dataset that you're working with, or keep software documentation up to date by automating screenshots using a CI/CD tool.

It can be surprisingly tricky to take screenshots using Python, especially when JavaScript is involved. In this tutorial, you’ll learn to take screenshots of web pages using different approaches and packages in Python. You'll also see how a tailor-made solution like Urlbox can help you easily capture screenshots of websites.

Read the full blog on [Urlbox](https://www.urlbox.io/website-screenshots-python).

Thanks for reading 💜

---

I publish a [monthly newsletter](https://www.ravsam.in/newsletter/) in which I share personal stories, things that I am working on, what is happening in the world of tech, and some interesting dev-related posts which I come across while surfing the web.

Connect with me through [Twitter](https://twitter.com/ravgeetdhillon) • [LinkedIn](https://linkedin.com/in/ravgeetdhillon) • [Github](https://github.com/ravgeetdhillon) or send me an [Email](mailto:ravgeetdhillon@gmail.com).

— [Ravgeet](https://www.ravgeet.in/), *Full Stack Developer and Technical Content Writer*
Re.rockspace.local
Tags: rockspace, login, technology
Published: 2022-08-22 07:29:30

Hopefully, the above information will prove to be helpful for you with context to the [Rock space WiFi extender setup](https://rockspace.live/rockspace-extender-setup) using http //re.rockspace.local and also helps you in resolving the re rockspace.local login issues. If you are still getting troubled by [http //re.rockspace.local login](https://rockspace.live/re-rockspace-local/) issues, you can contact our technical experts’ team for instant support.
VLSI Major Projects
Tags: vlsi, projects, programming, beginners
Published: 2022-08-22 07:29:25

Engineering student projects for B.Tech and M.Tech final year students. Takeoff Edu Group offers a wide range of projects best for [vlsi major projects](https://takeoffprojects.com/vlsi-major-projects) looking for magnificent final projects at low cost. 

We have successfully delivered vlsi major projects to our engineering students. Our programs are specially designed by experts for best results of vlsi major projects for engineering students. max of the B.Tech, M.Tech, PhD and Diploma scholars.

Takeoff Edu Group provides the most creative conceptions and ideas that can make very effective final year projects for scholars, experimenters, and engineers. So browse through our list of [vlsi major projects](http://youtube.com/watch?v=SnlDC_LazmI) and choose the smart final year projects for your requirements. 


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

Very Large Scale Integration Technology( VLSI) is an IC technology, designed by integrating a large number of electronic factors similar as sense gates, transistors, FET’s, etc. This technology substantially focuses on three major design and physical constraints related to an electric circuit like power, area, and speed. Some of the important VLSI systems are mentioned below. A many of the VLSI platforms that are presently forthcoming are FPGA operations, SOCs, and ASIC designs.

The systems which deal with the semiconductor design are called as systems in VLSI design. These are veritably delicate and precious to apply in real time. The demand for microcontrollers, detectors, and memory from the semiconductor( VLSI chip design) assiduity will get a substantial boost as the ongoing demand for all consumer bias similar as smartphones, tablets, mobile, electric motor vehicles, and wearable devices, IoT detectors are adding every day. This led to a prime demand for high performance, low power consumption, rugged and dependable on- chip products.

Demand for Engineers in the area of VLSI design, FPGA Design & Development with sufficient hands- on expertise, knowledge, and comprehensive understanding of the infrastructure and optimization ways of each major SoC, FPGA/ CPLD, similar as Xilinx, Altera, and Micro semi is veritably essential to gain entry into core VLSI arena. Also working knowledge on tools like Cadence, Mentor, Xilinx, etc.
Redact values in a map using clojure.walk/postwalk
Published: 2022-08-22 07:28:47

```
(defn redact
  [data]
  (walk/postwalk
   (fn [node]
     (if (and (vector? node) (= :id-number (first node)))
       [:id-number "REDACTED"]
       node))
   data))
```
Failure Models of Distributed Systems
Tags: distributedsystems, algorithms, systems
Published: 2022-08-22 07:18:00

## Introduction
[The previous article](https://dev.to/skoya76/communication-models-of-distributed-systems-26i2) explained the communication model for the timing of consensus problem. In this article, we will introduce four general definitions of failure models for consensus problem nodes.

## Crash-stop faults
This model only places the assumption that the node will Crash-stop faults. Also, a node that is stopped in this model never comes back.

## Omission faults
This model assumes Crash-stop faults and Omission faults. Omission faults may or may not reply to messages. This ignoring cannot be judged by other nodes as to whether it is Crash-stop faults or Omission faults.

## Crash-recovery faults
This model assumes Crash-stop faults, Omission faults, and Crash-recovery faults. The crash recovery fault makes the assumption that a node may crash at any time and may begin to re-intervene with the response at any time. The model also assumes partial data loss due to crash. If there is no response from a node in this model, it is not possible to determine whether it is Crash-stop faults, Omission faults, or Crash-recovery faults. 

## Byzantine faults
This model assumes Crash-stop faults, Omission faults,  Crash-recovery faults, and Byzantine faults. Byzantine breakdowns can do whatever the node does. For example, it can ignore messages, it can pretend to be malfunctioning, can reply to fake messages, or it can do evil deeds jointly among multiple Byzantine failure nodes.

## Conclusion
The difficulty of dealing with each failure model is illustrated in the figure below.

![difficulty](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o9hwuf9kvzhtxkj8ztqb.png)

In other words, the Byzantine failure model is the most difficult assumption to deal with.
How to use Python Celery+Docker to convert YT Videos to MP3
Tags: webdev, codenewbie, python, tutorial
Published: 2022-08-22 07:13:18

This project was created as a tutorial for people that are trying to improve their coding skills.

You can check the full documentation to learn more, or just read this section
 
https://gdi3d.github.io/learning-to-build/#/app/converting-youtube-video-to-mp3-celery 

And then build your own.
HertzBeat - An open-source monitoring system with custom and agentless.
Tags: opensource, product, monitoring
Published: 2022-08-22 07:09:52

Hi everyone!

Very happy to be able to recommend an open source project here.

Hertzbeat is an open-source, real-time monitoring system with custom-monitor and agentless. Support web service, database, os, middleware and more.

github: [https://github.com/dromara/hertzbeat](https://github.com/dromara/hertzbeat)

home: [https://hertzbeat.com/en/](https://hertzbeat.com/en/)

Very welcome to use and give us a star! Thanks!!!!

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

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

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

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

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b5nxp3oitn0c8edaijaj.png)
    
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cxhqdaxrc158jdp6aazk.png)
Day 10 : 100DaysOfSwift🚀
Tags: ios, swift, swiftui, 100daysofswift
Published: 2022-08-22 07:00:58

**Day 10**
**Classes and inheritance**

Similar to constants, variables and functions the user can define class properties and methods

Classes are similar to structs in that they allow you to create new types with properties and methods, but they have five important differences

**Creating your own classes**

The first difference between classes and structs is that classes never come with a memberwise initializer. This means if you have properties in your class, you must always create your own initializer.

```
class FullName {
    var firstName: String
    var lastName: String

    init(firstName: String, lastName: String) {
        self.firstName = firstName
        self.lastName = lastName
    }
}

let FName = FullName(firstName: "Saurabh", lastName: "Chavan")
print(FName.firstName)
//Saurabh
```

**Class inheritance**

Inheritance allows us to create a new class from an existing class.

The new class that is created is known as subclass (child or derived class) and the existing class from which the child class is derived is known as superclass (parent or base class).

we use the colon : to inherit a class from another class.

Syntax:

```
// define a superclass
class Animal {
  // properties and methods definition
}

// inheritance
class Dog: Animal {

  // properties and methods of Animal
  // properties and methods of Dog
}
```
Here, we are inheriting the Dog subclass from the Animal superclass.

**Example:**

```
class Animal {

  // properties and method of the parent class
  var name: String = ""

  func eat() {
    print("I can eat")
  }
}

// inherit from Animal
class Dog: Animal {

  // new method in subclass
  func display() {

    // access name property of superclass
    print("My name is ", name);
  }
}

// create an object of the subclass
var labrador = Dog()

// access superclass property and method 
labrador.name = "Rohu"
labrador.eat()

// call subclass method 
labrador.display()

**Output**

I can eat
My name is Rohu
```

Example 2:

```
class Sau {
    var name:String = ""
}

class Saurabh:Sau {
    func display(){
        print("My name is",name)
    }
}

let FName = Saurabh()
FName.name = "Saurabh"
FName.display()
//output
My name is Saurabh
```
**Overriding methods**

Child classes can replace parent methods with their own implementations – a process known as overriding.

if the same method is defined in both the superclass and the subclass, then the method of the subclass class overrides the method of the superclass. This is known as overriding.

Syntax:

```
class Vehicle {
  
  func displayInfo(){
    ... 
  }
}

class Car: Vehicle {
  
  // override method
  override func displayInfo() {
    ... 
  }   
} 
```
Changing the author slug in Wordpress
Published: 2022-08-22 06:59:26

Often for corporate sites we want to change (or basically hide) the author pages since we don't use them for SEO and we don't necessarily want users to even view them. A lot of times there might be just one person writing the blog articles so it doesn't make sense to search by author. Redirecting using a 301 is pretty self-explanatory, but he's a little snippet we can use to re-write the author-slug (URL) to make it a bit less "bloggy". 

```
add_action('init', 'seanaus120_author_base');
function seanaus120_author_base() {
    global $wp_rewrite;
    $author_slug = 'profile'; // change slug name
    $wp_rewrite->author_base = $author_slug;
}
```

Currently in use at:
[Wild Posting](https://wildposters.com/wild-posting/)
[Gorilla Printing](https://gorillaprinting.com/wild-posting/)
[Wine N Liquor](https://winenliquor.com/alcohol-delivery-los-angeles/)
[Wheatpaste Posters](https://gorillaprinting.com/wheatpaste-posters/)
[Wheatpaste Posters](https://www.printingnewyork.com/product/wheatpaste-posters/)
[Poster Printing](https://wildposters.com/poster-printing-nyc/)
[Poster Printing NYC](https://www.printingnewyork.com/poster-printing-nyc/)
[OOH Marketing](https://wildposters.com/ooh-marketing/)
[Million Dollar Club](https://milliondollargiftclub.com/)
[Gift Ideas](https://milliondollargiftclub.com/gifts-for-the-impossible-man/)
[Telecommunications](https://ucg.co.nz)
[Dark Fibre](https://ucg.com.au/dark-fibre/)
[Hybrid Fibre-Coaxial](https://ucg.com.au/hybrid-fibre-coaxial/)
[Window Advertising](https://www.printingnewyork.com/window-advertising/)
[Window Graphics](https://wildwindowgraphics.com/)
[Window Wraps](https://wildwindowgraphics.com/window-wraps/)
[Window Stickers](https://wildwindowgraphics.com/window-stickers/)
Left Shift and Right Shift Operators (>> and <<) for C#
Tags: csharp
Published: 2022-08-22 06:52:57

前陣子在刷 LeetCode 時，發現解題方式可以使用**移位運算子**，雖然筆者早就看過這個運算元，卻沒實際了解過，也趁這個機會快速了解移位運算子是個什麼樣的概念。

首先，筆者遇到的題型非常簡單，將二進位制轉換為十進位制，如將二進位 `1110` 轉換成十進位，得解為 `14`，在 C# 中可直接使用 `Convert` 來實現進位之間的轉換

```CSharp
string binary = "1110";

// 二進位轉十進位, 第二個參數為 base
Convert.ToInt32(binary, 2);
```

如此是透過現成方法來實現轉換，為了更了解二進制的應用，特意觀察不少的解法，其中不少解法是透過移位運算子，撰寫起來也非常簡潔且優雅，那什麼是移位運算子？

移位運算子有兩種
- 左移運算子 `<<`
- 右移運算子 `>>`

區分方式也非常易懂，純粹是移位方向的不同，以 `1110` 為例，對此二進位制的所有位元進行**左移**一個位元，即將所有位元往左邊移動一位，而最右邊的第一個數則補上 `0`，得到結果為 `11100`，若左移兩個位元則為 `111000`；反之**右移**則是向右移動，對 `1110` 右移一個位元得到 `0111`，若右移兩個位元則得 `0011`。

- 左移一個位元的表示方式為 `num << 1`
- 左移一個位元的表示方式為 `num << 2`
- 右移一個位元的表示方式為 `num >> 1`
- 右移一個位元的表示方式為 `num >> 1`

實際使用程式碼測試，先宣告一個整數變數 `num`，因為該變數是以十進位表示之，此處特意註解 `num` 二進位的表示方式，接著透過移位運算子，向左搬移一位，最後得十進位的結果。

```CSharp
// 十進位 14, 二進位 1110
int num = 14;

// 向左移 1 位
num = num << 1;

// 得到十進位 28, 二進位 11100
Console.Write(num);
```

試試看右移一個位元

```CSharp
// 十進位 14, 二進位 1110
int num = 14;

// 向左移 1 位
num = num >> 1;

// 得到十進位 7, 二進位 0111
Console.Write(num);
```

> **讀者有發現一件神奇的事嗎？**

如果我們向左移一個位元，其結果會是原本的兩倍，若向右位移一位，其結果會是原本的一半。

有這麼神奇的事？試試看一次移兩個位元會發生什麼事

```CSharp
int num = 20;

// 80
Console.WriteLine(num << 2);

// 5
Console.WriteLine(num >> 2);
```

每增加一個位移的位元，就會作一次乘二或除二的動作，將 `num=20` 向左位移兩個位元，其結果就是 `20 * 2 * 2 = 80`，同理向右移兩個位元可得 `20 / 2 / 2 = 5`

最後，移位運算子當然也有指派的運算子，若要將 `num` 位移後的結果指派給 `num`，可以這麼寫 `num = num >> 1`，也可以使用移位指派運算子寫成 `num >>= 1`，左位移則是 `num <<= 1`。這麼簡單的運算子，筆者真是太晚才想好好的認識它，收工！

### Reference
[Left Shift and Right Shift Operators (>> and <<)](https://docs.microsoft.com/en-us/cpp/cpp/left-shift-and-right-shift-operators-input-and-output?view=msvc-160)

---

Thanks for reading the article :tulip: :sunflower: :blossom:

If you like it, please don't hesitate to click heart button :heart:
or follow my [GitHub](https://github.com/FakeStandard) :star:
or buy me a coffee :arrow_down: I'd appreciate it.

[![Buy-me-a-coffee][1]][2]

[1]: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h077sxd0vx1hix4t7lw8.png
[2]: https://www.buymeacoffee.com/FakeStandard
CSS Battle - #80
Tags: css
Published: 2022-08-22 06:48:16

Recently I came across a video of a CSS battle between Kevin Powell and Kyle from Web Dev Simplified. 
They challenge each other and built the CSS design in under 11 minutes.

I decided to check if I could beat them. 
This is the design I had to build.

![Piano](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6xrs7mnb99jkvr3kcw38.png)

Although I completed the challenge in 10 minutes, but I was not able to match it a 100%;

Here is the code : 
```html
<div class="wrapper">
  <div class="white"></div>
  <div class="white"></div>
  <div class="white"></div>
  <div class="white"></div>
  <div class="white"></div>
  <div class="white"></div>
  <div class="white"></div>
  <div class="black-box">
    <div class="black"></div>
    <div class="black"></div>
    <div class="black blank"></div>
    <div class="black"></div>
    <div class="black"></div>
    <div class="black"></div>
  </div>
</div>
<style>
  *{
    box-sizing : border-box;
  }
  body {
    padding : 0;
    margin : 0;
    background-color : #998235;
    width : 100vw;
    height : 100vh;
    display : flex;
    justify-content : center;
    align-items : center;
  }
  .wrapper {
    height : 100px;
    width : 180px;
    background-color : #191919;
    border-radius : 10px;
    display: flex;
    justify-content: space-evenly;
    align-items : flex-end;
    padding-bottom :5px;
    position : relative;
  }
  .white {
    width : 20px;
    height : 70px;
    background-color : #FFFFFF;
    border-radius : 5px;
  }
  .black-box {
/*     background : red; */
    position : absolute;
    height : 50px;
    width : 90%;
    top : 15px;
    display : flex;
    justify-content : space-evenly;
  }
  .black {
    background-color : #191919;
    height : 90%;
    width : 15px;
  }
  .blank {
    background : none;
  }
</style>
```

You can check out the challenge here : [Battle #80](https://cssbattle.dev/play/80)
tsParticles 2.2.3 Released
Tags: javascript, typescript, webdev, showdev
Published: 2022-08-22 06:45:00

## tsParticles 2.2.3 Changelog

### Bug Fixes

- Fixed issue with `interactivity.detectsOn` with non `"window"` values, fixes #4606

---

## Social links

- [Discord](https://discord.gg/hACwv45Hme)
- [Slack](https://join.slack.com/t/tsparticles/shared_invite/enQtOTcxNTQxNjQ4NzkxLWE2MTZhZWExMWRmOWI5MTMxNjczOGE1Yjk0MjViYjdkYTUzODM3OTc5MGQ5MjFlODc4MzE0N2Q1OWQxZDc1YzI)
- [Telegram](https://t.me/tsparticles)
- [Reddit](https://www.reddit.com/r/tsParticles/)

---

{% github matteobruni/tsparticles %}
CSS SELECTORS CHEAT SHEETS
Tags: css, html, webdev, programming
Published: 2022-08-22 06:44:24

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

--------------------------------

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/45her4pgixcjuqxvegvb.jpeg)

---------------------------------

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

---------------------------------------------
Prettier y Husky
Tags: prettier, husky
Published: 2022-08-22 06:25:46

## **¿Que es Prettier?**

Básicamente es un **formateador** de **código**

## **¿Para qué nos vale?**

- Para mantener un **estilo de código** en toda la app
- Ayudas a los demás a poder **leer tu código**
- Evitas **código** mal **formateado** sin querer

## **¿Que es Husky?**

Es una librería que nos permite configurar **git hooks**, lo que nos permite ejecutar tareas durante la ejecución de algún código de git. Ejemplos:

- **git push**
- **git commit**
- **git precommit**

## **¿Como funciona?**

Primero tienes que **instalar** en el **proyecto** ambas librerías, **npm i -D prettier husky**

## **Configuramos Prettier**

Añadimos en la raiz del proyecto un archivo **.prettierrc** y le añadimos lo siguiente:

```jsx
{
  "printWidth": 79,
  "tabWidth": 2,
  "useTabs": false,
  "semi": false,
  "singleQuote": true,
  "jsxBracketSameLine": false,
  "proseWrap": "always"
}
```

Después nos vamos al archivo **package.json**, buscamos **scripts** y añadimos el comando **format** de la siguiente manera:

- Solo para archivos Javascript
    
    ```jsx
    "format": "prettier --write \"**/*.js\""
    ```
    
- Para varios tipos de archivo
    
    ```jsx
    "format": "prettier --write \"**/*.+(js|css|html|json)\""
    ```
    

## **Configuramos Husky**

Añadimos al archivo **package.json** lo siguiente:

**Nota**: Donde aparece pre-commit, podemos elegir mas tipos, como commit y push

```jsx
"husky": {
  "hooks": {
    "pre-commit": "lint-staged"
  }
}
```

## ¿Como utilizarlos?

Si las usamos en conjunto ambas librerias, simplemente cada vez que hagamos un proceso de git que use un hook que le hayamos indicado a Husky, realizara la función dentro de scripts que -le hayamos indicado.

**Nota**: No solo valdría para prettier, podríamos añadir un linter de javascript y alguna cosa mas, pero eso ya en otro capitulo
Integration of the Rewarded Ads feature of Huawei Ads Kit in Android
Published: 2022-08-22 06:18:08

In this article, we can learn how to integrate Rewarded Ads feature of Huawei Ads Kit into the android app. So, Rewarded ads are full-screen video ads that allow users to view in exchange for in-app rewards.

**Ads Kit**

Huawei Ads provides to developers a wide-ranging capabilities to deliver good quality ads content to users. This is the best way to reach the target audience easily and can measure user productivity. It is very useful when we publish a free app and want to earn some money from it.

HMS Ads Kit has 7 types of Ads kits. Now we can implement Rewarded Ads in this application.