teleren/devto huggingface dataset:
What does javascript engine do?👩‍💻
Tags: javascript, webdev, programming, beginners
Published: 2022-08-02 12:36:29

For starters **javascript runtime environment is not the javascript engine**.

Javascript engine is inside the javascript runtime environment which is different for different implementations. A javascript engine which is most famous is V8 (Chrome and node.js), Mozilla uses Spidermonkey which was the first js engine.

### Parsing👇

Here the code is broken down to smaller pieces known as tokens and is then transformed. 

The code that is entered is turned into an **abstract syntax tree**.


### Optimization & compilation👇

Javascript can be treated as **both interpreted or compiled language**. Spidermonkey treated it as an interpreted language for its fast use in browsers.

Nowadays, both are used, in **just in time compiled** javascript form. 

The abstract syntax tree is broken down into bytes here and sent forward.


### Execution👇
This is done along with the two of our favourite components of JS, **Call Stack & Memory Heap**.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/06batzdq5fxrmkgdic44.png)
 
The logic of different JS engine is different from one another. Some of the features that are combined to make the best out it are:

- Inline caching: It takes note of the repeated calls to the same method that tend to occur on the same type of object.

- Mark and Sweep: This is a garbage collection algorithm where the garbage collector does marking in first phase & sweeping in second.
All the reachable in use objects are ticked as true and marked while others are marked as 0. Then we sweeps the unreachable objects from heap memory.


> For more on javascript runtime environment 
🌟[Understanding JRE](https://medium.com/@gemma.croad/understanding-the-javascript-runtime-environment-4dd8f52f6fca#:~:text=The%20JavaScript%20runtime%20environment%20provides,and%20make%20the%20code%20work.)
openGauss System Architecture
Tags: opengaus
Published: 2022-08-02 12:35:00

openGauss is a standalone database where data is stored on a single physical node and data access tasks are pushed to service nodes. In this way, high concurrency of servers enables quick data processing. 
In addition, data can be copied to the standby server through log replication, ensuring high reliability and scalability.

Software Architecture
openGauss is a standalone database and can be deployed in primary/standby mode.

openGauss shows the logical components of Figure 1.

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

Figure 1 openGauss logical components
openGauss Product Positioning
Tags: opengauss, database
Published: 2022-08-02 12:33:30

openGauss is a HA rational database that supports the SQL2003 standard and primary/standby deployment.

Multiple storage modes support composite service scenarios. The in-place update storage engine is introduced.
The NUMA data structure supports high performance.
HA is supported by Paxos consistency log replication protocol, primary/standby mode, and cyclic redundancy check (CRC).
Security features are supported, such as fully-encrypted computing and ledger database, to provide comprehensive end-to-end data security protection.
The Table Access Method interface layer supports multiple storage engines.

openGauss is a multi-core-oriented open-source relational database that provides ultimate performance, full-link service and data security, AI-based tuning, and efficient O&M capabilities. 
This leading database at enterprise level is developed in collaboration with global partners and is released under the Mulan Permissive Software License v2. openGauss deeply integrates Huawei's years of R&D experience in the database field and continuously builds competitive features based on enterprise-level scenario requirements.
Links especialmente selecionados Git
Tags: beginners, programming, tutorial, git
Published: 2022-08-02 12:23:05

Pessoal, segue uma lista selecionada de links para avançar mais no aprendizado do git.

- https://git-school.github.io/visualizing-git/
- https://think-like-a-git.net/
- https://marklodato.github.io/visual-git-guide/

Um abraço!
Git
Tags: beginners, programming, tutorial, productivity
Published: 2022-08-02 12:12:58

Git is probably one of the most used tools by programmers. While it is the most used tools, it is also a bit difficult to grasp by beginners. I wrote this tutorial in order to give you an overview of git and understand how to use its various features.

Suppose you work in a bakery making cakes for customers. The bakery here represents the organization you are working for. Now, you probably aren't the only one working there. There are others alongside you who make cakes as well. All the bakers use the bakery's common storeroom to get the ingredients required to make the cakes. The storeroom here represents the master code or the main code that everyone uses to develop new features or fix existing code.
Imagine how troublesome it will be if all the bakers took the same ingredients and started working on making the same cake all at once. Someone might add extra sugar or not add some other ingredient, resulting in a horrible tasting cake.
This is where the branching feature of git comes into play. All the bakers take the same ingredients from the store and start working on their individual cakes in their individual kitchens based on different customer's requirements. In other words, all the engineers are making changes to the same code without being affected by what others are doing. This in short, is what is probably the most famous feature git has to offer. If you are with me till now, keep reading!

Now, once the cakes are ready, we can't just send it out to the customers without any review. We take our peers' help to make sure the cake is beautiful to look at as well as the taste is up to the mark. This is what engineers do when they raise a pull request.
They ask their peers to review their code and suggest our changes before merging the code into a release branch. Once, it is in a release branch, it is tested once again to make sure we did not miss out on any issues that may pop up later and irritate the customer. 

Now, how to make sure that our code is used up by other software engineers when they write new features to the codebase? We merge our branch with the master. Now, when someone uses the master code to start development. Our code will be present in there as well. Simple!
Let's create microservices system from scratch - post mortem
Tags: beginners, architecture, microservices
Published: 2022-08-02 12:08:57

[The last part](https://dev.to/digitalcrafting/let-s-create-microservices-system-from-scratch-part-4-4jl3) of this series was posted almost 1.6 year ago and I am way overdue with the post mortem. So, what happened?

**I tried to bite more, than I could chew.**

That's pretty much it. It's not going to be another 10-minute long story about that. Instead, I have 3 simple things I learned:

**1. Start simple**

Instead of going straight to microservices, start with monolithic application first, and then expand it as needed. This would apply well in your professional job as well. 

Since this series died, I actually completed another project doing exactly that - started with monolith, and when the functionality was done, I split and refactored the code.  

**2. Do small increments every day**

If you want to finish a project, don't do marathons on weekends, instead, force yourself to do at least a single commit every day. It doesn't even have to be a big one. I had commits where I just renamed a class or moved it to another package. Focus on one step at a time, and before you know it, you will be done.

**3. Focus on a single technology**

My initial idea was to try writing microservices in different languages since this is one of the big selling points of that architecture - you can have as many different languages interacting with each other as you need. While this might be a good idea on paper, in practice it's unmaintainable (this point comes both from this project and my job experience).

While the languages themselves are not that hard to learn, the frameworks and ecosystems are a nightmare. Each has a different toolset, different philosophy behind them, and different problems they come with. Avoid that as much as you can.

Additionally, if each team uses different technology, you can't just switch teams if you are bored or exhausted with your project - you have to look for another job. You also don't have anyone, besides your teammates, who can take a look at a problem with a fresh eye and ideas. 

---

As mentioned before, this failure was not in vain, as I actually created and finished another project, about which I will talk in another set of articles. 

I hope this post will help someone finish their project :)
iOS — Persist Data using SQLite.swift Library with SwiftUI example
Tags: ios, swift, sql, iosdev
Published: 2022-08-02 12:00:38

Learn how to use SQLite database with [SwiftUI](https://blog.canopas.com/swiftui-complex-navigation-made-easier-with-uipilot-5b33279f3476) and perform CRUD operations

In software development, we often need to persist app data with some [data](https://blog.canopas.com/ios-designing-data-layer-for-offline-first-apps-f929c83bb195) structure. But how do we store that data efficiently?

There’s an evergreen database designed exactly for that purpose — SQLite. It is available by default on iOS.

If you’ve used Core Data before, you’ve already used SQLite. Core Data is just a layer on top of SQLite that provides a more convenient API.

In this article, we are going to use SQLite for storing the data structure, and for that, we’ll use a very popular Library Sqlite.swift.

Ultimately, we will develop a basic [ToDo app](https://blog.canopas.com/developing-a-todo-app-with-android-integration-testing-following-tdd-approach-part-3-of-3-57b41910ad99) with SwiftUI.

Note: We will use the UIPilot library for navigation but feel free to skip it if you don’t need it.

Our final app, at the end of this article, will look something like this.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7hp029bi34dyby5pj1f0.gif)

To read the full article, [visit our blog](https://blog.canopas.com/ios-persist-data-using-sqlite-swift-library-with-swiftui-example-c5baefc04334).
Should I share my love for regex ?
Tags: discuss, watercooler, regex, backtoschool
Published: 2022-08-02 11:59:09

---
title: Should I share my love for regex ?
published: true
description: I love regex, do you think it's useful ?
tags: discuss, watercooler, regex, backtoschool
---
Today, and probably for the 10th time since January, somebody asked for help with a regex. And I was, as usual, happy to help.

I **LOVE** regex, they feel like building a solution for a puzzle. It can be making sure that a pattern is followed, replacing large amount of data in a document or even extracting data.

I've been thinking about writing a series of post about how they work and how to build them.
I would love to hear from you what you would like to see in these posts.
GDSC Lead 2022-2023
Tags: leadership, community
Published: 2022-08-02 11:44:09

**GDSC Lead**
Hi Dev Community!
I am thrilled to announce that I am the lead for the year 2022-2023.
I was rejected twice, but I never lose hope, and I tried again.
I was an event manager for the year 2020-2021, and then I was a technical lead for the years 2021-2022. I learned a lot in these two years. I organized workshops and events with the help of my leads. 
I am thankful for my lead and mentors Adil Raza and Muqadas Urooj, who selected me for their team. I learned communication, speaking, and leadership skills from them.
I am so much thankful to my interviewer Priydarshahni and Pradipta Sharma.
I am really thankful to all those who have guided me to reach this level.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/di9ohkngswxxrrqfondo.png)
Aws Summit 2022
Tags: schedule, aws
Published: 2022-08-02 11:34:13

Entre os dias 3 e 4 deste mês, ocorrerá a AWS Summit São Paulo 2022, evento que faz parte do AWS Global Summit.

O evento acontecerá no Transamerica Expo Center de forma presencial.

As conferências Globais da AWS tem como objetivo reunir profissionais envolvidos direta ou indiretamente nos processos voltados para nuvem.

Em 2022 teremos a presença da vice-presidente de _AWS Serverless Compute_ e _Amazon Web Services_, **Holly Mesrobian**, apresentando diferenciais que tornam a AWS a melhor plataforma em nuvem e casos de sucesso destacando a flexibilidade da AWS.

Entre os palestrantes estarão clientes, parceiros e profissionais da AWS.

---

O dia 03/08 é voltado (mas não exclusivo) para profissionais que já executam _workloads_ na AWS.

---

O dia 04/08 é indicado para quem está começando em computação em nuvem.

---

A agenda completa está disponível em [aws SUMMIT SÃO PAULO](https://aws.amazon.com/pt/events/summits/sao-paulo/).
Solana Summer Camp Amsterdam
Tags: blockchain, web3, opensource, algorithms
Published: 2022-08-02 11:31:00

​Ratio Finance, in collaboration with Solanium and Nosana are thrilled to host Amsterdam’s FIRST Solana Summer Camp Hackathon.

​For 3 weeks we welcome the world’s most voraciously inspired developers, builders & teams for a chance to win a total of $5M in global prizes and seed funding from Solana.

​With 6 prize tracks to include DeFi/ Mobile/ Payment/ Web3/ Gaming/ & DAOS, we cannot wait to see what the most unstoppable minds at the cutting edge of open finance come up with next. LFG.

Learn more here:
https://solana.com/summercamp

Register for any of our sessions here:
https://lu.ma/solana-summer-camp-amsterdam

Join our community channel to stay updated:
https://t.me/solanasummercampamsterdam
Update vs Fixed Update? Unity3D
Published: 2022-08-02 11:23:00

If you are a game developer, you are familiar with the terms _Update_() and _FixedUpdate_(). 
But many of us are perplexed about the difference. We all know, Update() is used when we need to update something in every frame. 

`   // Update is called once per frame
    void Update()
    {
       
    }
`
But there is some issue with the Update method. 
Frame rate differs from device to device or game to game. In that case, if you use any physics method in _Update_ methods, it will not perform appropriately. To get rid of that, we should use the _FixedUpdate_ method.

`
    private void FixedUpdate()
    {
       
    }
`

The _FixedUpdate_ function runs at a fixed interval independent of your game’s frame rate so that our function works in every fixed frame. So when we need to use  _Rigidbody_, we need to use _FixedUpdate()_. Such as, move the player or add force. 


Happy Coding!!
Eslint & Prettier configuration in React project
Tags: react, eslint, prettier, guideline
Published: 2022-08-02 11:16:00

When building web applications, using linting tools help you a crucial role in web development process. I think every developer should know, how to install and configure the linting process in your application. So, today i'll discuss about linting configuration and efficiently making sure that the best code standards are applied to our project.


**Step 01:** Install `eslint` package in your project as dev dependency. 

```
yarn add eslint --dev
```

**Step 02:** Eslint need to initialize, `.eslintrc.json` file will be created.

```
yarn run eslint --init
```

**Step 03:** Eslint rules updated from `.eslintrc.json` file.

```
"rules": {
  "react/react-in-jsx-scope": "off",
  "no-unused-vars": ["warn", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }],
  "prettier/prettier": ["error", { "singleQuote": true }],
  "no-console": "warn"
}
```

**Step 04:** Required plugins are needed to be install,

```
yarn add eslint-config-prettier eslint-plugin-prettier prettier --dev
```

**Step 05:** Update extends array on `.eslintrc.json` file,

```
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:prettier/recommended"];
```

**Step 06:** Create new `.prettierrc` file, paste following codes,

```
{
  "semi": true,
  "tabWidth": 2,
  "printWidth": 100,
  "singleQuote": true,
  "jsxSingleQuote": true,
  "trailingComma": "none",
  "jsxBracketSameLine": true
}
```

**Step 07:** Update your `package.json` file with following codes,

```
"lint": "eslint .",
"lint:fix": "eslint --fix",
"format": "prettier --write './**/*.{js,jsx,ts,tsx,css,md,json}' --config ./.prettierrc"
```

Running the script `yarn format` will format the code style of all JavaScript files. Like `ESLint`, it has amazing Code Editors extensions that enable the `Prettier` to run on files when they are being saved, formating them on the fly without the need to run the script manually!

Note: For this process i've used `yarn` packages, if you're familiar with npm, then you can use `npm` packages.

Time is everything in a fast pace environment so it's important to have a good setup of tools allowing the developers to be more efficient and spend more time developing new features than looking for errors on the code.

Thank you !
在 Java 中以 2 進位字串印出整數
Tags: java
Published: 2022-08-02 11:08:34

Java 雖然提供有類似 C 的 [printf()](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Formatter.html#syntax), 不過可選用的格式卻沒有 2 進位整數, 如果需要將整數以 2 進位字串印出, 可以使用 [`Integer`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html) 類別提供的兩個類別方法。

## Integer.toString()

[Integer.toString()](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html#toString(int,int)) 在輸出整數時可以指定進位制, 例如以下以 2 進位印出整數 100：

```java
jshell> Integer.toString(100, 2)
$10 ==> "1100100"
```

第 2 個參數就是進位制, 你甚至可以任意指定, 像是以下就是用 3 進位印出整數 100：

```java
jshell> Integer.toString(100, 3)
$11 ==> "10201"
```

不過這個方法在輸出負數的時候, 是以正負號加上數值絕對值的 2 進位字串來表示, 例如以 2 進位印出 -10 的結果就會是：

```java
jshell> Integer.toString(-10, 2)
$9 ==> "-1010"
```

如果你要在程式中以 2 進位方式表達負整數的字面值 (literal), 就可以用類似的方法, 例如：

```java
jshell> a = -0b1010
a ==> -10
```

如果你希望看到 -10 在記憶體中真正的表示方式, 就不能使用此方法。

## Integer.toBinaryString()

Integer 類別提供有專門輸出 2 進位字串的 [toBinaryString()](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html#toBinaryString(int)) 類別方法, 它會輸出記憶體中整數的實際 2 進位表示結果, 例如：

```java
jshell> Integer.toBinaryString(100)
$7 ==> "1100100"

jshell> Integer.toBinaryString(-10)
$8 ==> "11111111111111111111111111110110"
```

你會看到輸出負數時, 是以 2 的補數呈現, 而且為了避免誤解, 它會呈現完整的 32 個位元, 以便讓你看到左邊的位元都是 1。在輸出正數的時候, 即使不顯示左側的 0 位元也不會造成誤解, 所以只會呈現有效的位元數, 左側未出現的位元都是 0。

Integer 類別也提供 [`toHexString()`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html#toHexString(int)) 以及 [toOctalString()](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html#toOctalString(int)) 讓你可以將整數輸出成 16 進位字串或 8 進位字串, 有需要時都可以好好利用。

## 小結

能夠正確呈現 2 進位結果對於我們理解整數的儲存方式與正負數轉換很有幫助, 有些時候我們也的確需要呈現 2 進位結果時, 本文介紹的方法就可以派上用場了。
How to detect scroll up and scroll down in Nuxt/Vue
Tags: vue, nuxt, javascript, webdev
Published: 2022-08-02 11:04:26

Meantime in working hour I have to make something like this. If i scroll up little bit, I have to make visible my full navbar otherwise small bar is enough to show. 
![Example How to detect scroll up and scroll down in Nuxt/Vue ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rj44lwtk91oaz2lo1l1h.gif)
That's the reason I have to define a function where this function is responsible find out scroll up and down event. And I done it by this - 

At first in created hook we have to add a event listener by -
```js
created() {
        if(process.client){
             window.addEventListener("scroll", this.handleScroll);
        }
 
  },
```
and then inside `methods` and in handleScroll function we will declare a variable which contain current scroll position and make compare with next scroll position 

```js
handleScroll() {
   
    if(process.client){
      var currentScrollPosition = window.scrollY

      if(currentScrollPosition < this.scrollPosition){
         console.log("Scrolling up");
         this.showFullNav = true
         //your desire logic 
      }
      else{
          this.showFullNav = false
          console.log("Scrolling down");
         //your desire logic 

      }
     
      this.scrollPosition = window.scrollY
    }
}, 
```
And finally we have to destroy this event when page leave by - 
```js
  destroyed() {
    if(process.client){
       window.removeEventListener("scroll",this.handleScroll);  
    }
   
  },
```
That's it...
Day 01 of 100 Days of Code Python Bootcamp by Dr. Angela
Tags: python, programming, beginners, 100daysofcode
Published: 2022-08-02 10:52:00

Finished Day 01 of 100 Days of Code. 

For today's project, I learned about the basic syntax of Python starting from printing a simple Hello World to string manipulation, variables and the input function. The goal here is to finish the bootcamp and equip myself with the skills to be a Python Developer. 

![100 Days of Python](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a1r2oiaq9e1ze85uog20.png)
7 Prime tips to keep in mind while developing an E-commerce for any business.
Tags: ecommerce, onlinestores, ecommercefeatures
Published: 2022-08-02 10:36:53

In today's innovative world every business is shifting online and E- commerce helps customers to sell their products online without facing any issue. Nowadays people with unique ideas prefer online websites rather than physical stores and get high revenue with e-commerce websites. E-commerce helps entrepreneurs to reach customers anywhere in the world. E- commerce websites help the customer to purchase products in whatever place at  whatever time  with just a few clicks and get their products delivered within a few days. In this article you will get to know seven prime tools you should keep in mind while developing an e-commerce website for your new assignment. This article will not only help you but also make your website more effective amongst your competitors' websites. There are many points to keep in mind while developing an e-commerce site but we have listed prime seven which we think will be a great addition to your website. These tips will help you to create your website consumer friendly and also helps in increasing performance of your website and gaining more attention to your website. To create a good  website one should always consider hiring an ecommerce website developer as it helps in making the website more effective and efficient. 

(https://www.magetop.com/blog/7-things-to-consider-while-working-on-ecommerce-development-for-any-business/)