teleren/devto huggingface dataset:
SQL by pass
Tags: opengauss
Published: 2023-02-23 07:24:30

Availability
This feature is available since openGauss 1.0.0.

Introduction
Query performance is improved by customizing an execution scheme for typical queries in the TP scenario.

Benefits
The TP query performance is improved.

Description
In a typical OLTP scenario, simple queries account for a large proportion. This type of queries involves only single tables and simple expressions. To accelerate such query, the SQL bypass framework is proposed. After simple mode judgment is performed on such query at the parse layer, the query enters a special execution path and skips the classic execution framework, including operator initialization and execution, expression, and projection. Instead, it directly rewrites a set of simple execution paths and directly invokes storage interfaces, greatly accelerating the execution of simple queries.

Enhancements
None

Constraints
None

Dependencies
None
Kunpeng NUMA Architecture Optimization
Tags: opengauss
Published: 2023-02-23 07:23:46

Availability
This feature is available since openGauss 1.0.0.

Introduction
Kunpeng NUMA architecture optimization mainly focuses on Kunpeng processor architecture features and ARMv8 instruction set, and optimizes the system from multiple layers, including OS, software architecture, lock concurrency, logs, atomic operations, and cache access. This greatly improves the openGauss performance on the Kunpeng platform.

Benefits
Transactions per minute (TPM) is a key performance indicator of the database competitiveness. Under the same hardware costs, a higher database performance means the database can process more services, thereby reducing the usage cost of customers.

Description
openGauss optimizes the Kunpeng NUMA architecture based on the architecture characteristics. This reduces cross-core memory access latency and maximizes multi-core Kunpeng computing capabilities. The key technologies include redo log batch insertion, NUMA distribution of hotspot data, and CLog partitions, greatly improving the TP system performance.
Based on the ARMv8.1 architecture used by the Kunpeng chip, openGauss uses the LSE instruction set to implement efficient atomic operations, effectively improving the CPU usage, multi-thread synchronization performance, and Xlog write performance.
Based on the wider L3 cache line provided by the Kunpeng chip, openGauss optimizes hotspot data access, effectively improving the cache access hit ratio, reducing the cache consistency maintenance overhead, and greatly improving the overall data access performance of the system.
Kunpeng 920, 2P server (64 cores x 2, memory: 768 GB), 10 GE network, I/O: 4 NVMe PCIe SSDs, TPC-C: 1000 warehouses, performance: 1,500,000 tpmC.
Enhancements
Batch redo log insertion and CLog partition are supported, improving the database performance on the Kunpeng platform.
Efficient atomic operations using the LSE instruction set are supported, improving multi-thread synchronization performance.
Constraints
None

Dependencies
None
openGauss GROUP BY Clause
Published: 2023-02-23 07:21:59

The GROUP BY clause is used together with the SELECT statement to group the same data. You can group one or more columns, but the columns to be grouped must exist.

## Syntax

`SELECT 
{ * | [column, ...] }
[ FROM from_item [, ...] ]
[ WHERE condition ]
[ GROUP BY grouping_element [, ...] ]
[ ORDER BY {expression [ ASC | DESC ] }];`

## Parameter Description
GROUP BY clause

Groups the query results based on the values of one or more columns. The query results with the same value are in the same group.

The GROUP BY clause is placed after the WHRER clause and before the ORDER BY clause in the SELECT statement.

## Examples
The customer_t1 table contains duplicate values of c_first_name. The duplicate values of c_first_name are in the same group, and the sum of the values of Amount is calculated.

`openGauss=# SELECT c_first_name, sum(Amount)  FROM customer_t1 GROUP BY c_first_name;
 c_first_name | sum
--------------+------
 James        | 5000
 Grace        | 1000
 Local        | 3000
              |
 Joes         | 2200
 Lily         | 3000
(6 rows)`
openGauss DISTINCT
Published: 2023-02-23 07:13:38

The DISTINCT keyword is used together with the SELECT statement to remove duplicate records and obtain only unique records.

When there are multiple duplicate records in a table, the DISTINCT keyword is used to obtain only unique records instead of duplicate records.

## Syntax
`SELECT  DISTINCT [ ON ( expression [, ...] ) ] ]
{ * | [column, ...] }
[ FROM from_item [, ...] ];`
## Parameter Description
DISTINCT [ ON ( expression [, …] ) ]
Removes all duplicate rows from the result set of the SELECT statement so that each row in the result set is unique.

Retains only the first row in the set of rows that have the same result computed on the given expression.

## Examples
Insert the following data into the customer_t1 table:


`openGauss=# INSERT INTO customer_t1 (c_customer_sk, c_customer_id, c_first_name,Amount) VALUES 
    (6881, 'maps', 'Lily',1000),
    (4320, 'tpcds', 'Lily',2000);`
The current data is as follows:

`openGauss=# SELECT * FROM customer_t1 ;
 c_customer_sk | c_customer_id | c_first_name | c_last_name | amount
---------------+---------------+--------------+-------------+--------
          3869 | hello         | Grace        |             |   1000
          3869 | hello         | Grace        |             |   1000
          3869 |               | Grace        |             |
          3869 | hello         |              |             |
          3869 | hello         |              |             |
               |               |              |             |
          6985 | maps          | Joes         |             |   2200
          9976 | world         | James        |             |   5000
          4421 | Admin         | Local        |             |   3000
          6881 | maps          | Lily         |             |   1000
          4320 | tpcds         | Lily         |             |   2000
(11 rows)`
Query all values of c_first_name in the customer_t1 table. There are two Lily and three Grace.
`openGauss=# SELECT c_first_name  FROM customer_t1 ;
 c_first_name
--------------
 Grace
 Grace
 Grace



 Joes
 James
 Local
 Lily
 Lily
(11 rows)`
Use the DISTINCT keyword in the SELECT statement. The result shows that duplicate data has been deleted.


`openGauss=# SELECT DISTINCT c_first_name  FROM customer_t1 ;
 c_first_name
--------------
 James
 Grace
 Local

 Joes
 Lily
(6 rows)`
openGauss ORDER BY Clause
Published: 2023-02-23 07:11:05

The ORDER BY clause sorts the data in one or more columns retrieved by the SELECT statement in ascending (ASC) or descending (DESC) order.

## Syntax

`SELECT 
{ * | [column, ...] }
[ FROM from_item [, ...] ]
[ ORDER BY {expression [ ASC | DESC ] }];`

## Parameter Description
ORDER BY clause

Sorts data retrieved by the SELECT statement in descending or ascending order. If the ORDER BY expression contains multiple columns:

If two columns are equal according to the leftmost expression, they are compared according to the next expression and so on.
If they are equal according to all specified expressions, they are returned in an implementation-dependent order.
Examples
Sort the result in ascending order based on the value of c_customer_sk.


`openGauss=# SELECT * FROM customer_t1 ORDER BY c_customer_sk ASC;
 c_customer_sk | c_customer_id | c_first_name | c_last_name | amount
---------------+---------------+--------------+-------------+--------
          3869 | hello         | Grace        |             |   1000
          3869 | hello         | Grace        |             |   1000
          3869 |               | Grace        |             |
          3869 | hello         |              |             |
          3869 | hello         |              |             |
          4421 | Admin         | Local        |             |   3000
          6985 | maps          | Joes         |             |   2200
          9976 | world         | James        |             |   5000
               |               |              |             |
(9 rows)`
Sort the result in descending order based on the value of c_customer_sk.


`openGauss=# SELECT * FROM customer_t1 ORDER BY c_customer_sk DESC;
 c_customer_sk | c_customer_id | c_first_name | c_last_name | amount
---------------+---------------+--------------+-------------+--------
               |               |              |             |
          9976 | world         | James        |             |   5000
          6985 | maps          | Joes         |             |   2200
          4421 | Admin         | Local        |             |   3000
          3869 | hello         | Grace        |             |   1000
          3869 | hello         |              |             |
          3869 | hello         | Grace        |             |   1000
          3869 |               | Grace        |             |
          3869 | hello         |              |             |
(9 rows)`
SPA behaviour in Astro JS
Tags: astro, hotwired, turbo
Published: 2023-02-23 06:56:07

---
title: SPA behaviour in Astro JS
published: true
description: 
tags: astro, hotwired, turbo
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-02-23 06:55 +0000
---

Astro Js is a great framework for building completely static sites with out of the box SEO pros. However its MPA (Multi page application) approach might seem odd for few scenarios. To give your Astro application a SPA behaviour is possible and is super easy. 

Introducing [Turbo](http://turbo.hotwired.dev) by Hotwired. 
Here's a great blog to summarise the whole approach.
https://www.maxiferreira.com/blog/astro-turbo-persistent-islands/

Want to give your Astro app a SPA behaviour? Here's a quick boilerplate repo.
https://github.com/paragchirde/Astro-SPA
Epson Printer Offline Mac Fix Epson Offline on Mac
Tags: epson, printer, offline, mac
Published: 2023-02-23 06:51:28

Fix Epson Printer Offline Mac - When we send a printing command to our Epson Printer, our Mac device frequently displays the error message "[Epson Printer is offline Mac](https://printerisoffline.com/how-to-fix-epson-printer-offline-on-mac-to-get-back-online/)". Most users will encounter this error at some point. All Steps to Resolve Epson Printer Offline on Mac
						
As a result, in this article, we have discussed some of the causes of the problem as well as some troubleshooting steps that will assist you in resolving the Epson printer offline Mac.
Reasons for Epson Printer Not Working on Mac
Kicker.de Scraper: Sportnachrichten scrapen
Tags: webdev, devops, octoparse, webscraping
Published: 2023-02-23 06:47:25

<mark>**Artikel Quelle:** [Kicker.de Scraper: Sportnachrichten scrapen](https://octoparse.de/blog/kickerde-scraper-sportnachrichten-scrapen)</mark>


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gnier56wnh4l1tf0mpuy.png)
.NET Community Toolkit 8.1 Released- Did You Know?
Tags: dotnet, dotnetcore, tooling, community
Published: 2023-02-23 06:46:00

**Introduction**

The .NET Community Toolkit is a collection of open-source libraries, tools, and controls designed to simplify the development of .NET applications. It is maintained by Microsoft and is available on GitHub. The latest release of the toolkit, version 8.1, was recently announced, and it comes with several new features and improvements.

## Here are some of the notable updates in the .NET Community Toolkit 8.1:


###New controls for Xamarin.Forms

The toolkit now includes several new controls for Xamarin.Forms, including a CarouselView control that allows users to scroll through a collection of items horizontally or vertically, a Rating control that allows users to rate items on a scale of one to five stars, and a TabView control that allows users to navigate between multiple pages.

###Improvements to existing controls

Several existing controls in the toolkit have been updated with new features and enhancements. For example, the MarkdownTextBlock control now supports syntax highlighting, and the ImageCropper control now supports cropping images to a circular shape.

###New helpers for WPF

The toolkit now includes several new helpers for WPF applications, including a ThumbnailImage control that allows users to display a thumbnail of an image, and a TextBoxMask behavior that enforces a specific format for text input.

###Updates to the MVVM toolkit

The MVVM toolkit in the .NET Community Toolkit has been updated with several new features, including support for events and behaviors in XAML, and new base classes for view models.

###Improved documentation

The documentation for the toolkit has been updated and expanded, making it easier for developers to get started with the toolkit and to use its features effectively.

Overall, the .NET Community Toolkit 8.1 is a significant update that provides developers with new tools and features to simplify the development of .NET applications. Whether you're building desktop, mobile, or web applications, the toolkit has something to offer. If you haven't used the toolkit before, now is a great time to check it out and see how it can help you streamline your development workflow.

This article is Written by- Bacancy's Skilled and Experienced- [Dot Net developers](https://www.bacancytechnology.com/hire-dot-net-developer)

Hope this helps you!
Chaining Example in javascript
Tags: javascript, tutorial, programming, beginners
Published: 2023-02-23 06:40:46

Chaining in JavaScript refers to the practice of calling multiple methods on an object in a single line of code, where the return value of each method call is used as the input to the next method call. This can help make your code more concise and readable.

**jQuery Chaining:**
jQuery is a popular JavaScript library that makes it easy to manipulate the DOM and handle events. One of the key features of jQuery is chaining, which allows you to perform multiple operations on the same set of elements in a single chain. Here's an example:

```
$("ul li")
  .addClass("highlight")
  .find("a")
  .attr("target", "_blank")
  .end()
  .eq(2)
  .addClass("active");
```
In this example, we use jQuery to select all the li elements within a ul element. We then chain several methods to perform different operations on these elements, including adding a CSS class, modifying a link attribute, and selecting a specific element by index.

**D3.js Chaining:**
D3.js is a popular JavaScript library for data visualization. It includes a number of powerful methods for manipulating SVG graphics, and these methods can be chained together to create complex visualizations. Here's an example:
```
javascript
Copy code
d3.select("svg")
  .append("circle")
  .attr("cx", 50)
  .attr("cy", 50)
  .attr("r", 30)
  .style("fill", "red")
  .transition()
  .duration(1000)
  .attr("cx", 150)
  .style("fill", "blue");
```
In this example, we use D3.js to select an SVG element, append a circle to it, set some attributes and styles for the circle, and then create a transition to animate the circle's position and color over time.

**Axios Chaining:**
Axios is a popular JavaScript library for making HTTP requests. It includes a number of powerful methods for configuring and sending requests, and these methods can be chained together to create complex request pipelines. Here's an example:
```
javascript
axios.get("/api/data")
  .then(response => response.data)
  .then(data => processData(data))
  .catch(error => console.log(error));
```

In this example, we use Axios to make a GET request to an API endpoint, and then chain some methods to handle the response data. We first extract the response data from the response object, and then pass it to a processData function. If there's an error during the request or processing, we catch it and log it to the console.

Here is Calculator example
```
class Calculator {
  constructor(initialValue) {
    this.value = initialValue;
  }

  add(num) {
    this.value += num;
    return this;
  }

  subtract(num) {
    this.value -= num;
    return this;
  }

  multiply(num) {
    this.value *= num;
    return this;
  }

  divide(num) {
    this.value /= num;
    return this;
  }
}

const result = new Calculator(10)
  .add(5)
  .subtract(3)
  .multiply(2)
  .divide(4)
  .value;

console.log(result); // Output: 6
```
git pull and git fetch
Tags: webdev, javascript, programming, beginners
Published: 2023-02-23 06:16:55

`git pull` and `git fetch` are both commands used in Git version control system, but they perform different actions.

`git fetch` is used to download the latest changes from a remote repository to your local repository, but it **does not automatically merge** the changes with your local branch. Instead, it updates your local tracking branches such as origin/master or origin/develop to match the remote ones. This means **you can review the changes that were fetched before deciding to merge** them with your local branch.

`git pull`, on the other hand, **is a combination of git fetch and git merge**. When you run `git pull`, it **downloads the latest changes from the remote repository and immediately merges them into your local branch**. This means that you don't have the opportunity to review the changes before merging them with your local branch.

In summary, `git fetch` downloads the latest changes from a remote repository to your local repository and updates your local tracking branches, but it **does not automatically merge the changes with your local branch**. `git pull`, on the other hand, **downloads the latest changes from a remote repository and immediately merges them into your local branch**. The choice between using git fetch and git pull depends on your workflow and whether you want to review the changes before merging them with your local branch or not.
KLA Software Engineer Summer Intern - 2023
Tags: interview, intern, oncampus
Published: 2023-02-23 06:05:29

**KLA Software Engineer Summer Intern — 2023**


**First Round (Coding Round):**

- There are two questions in this round and the time given is 90 min, which is conducted in HackerRank.
- The first question was like a standard question based on the BFS, but there are some more glitches added.
- The first question in brief: there is a 2D matrix filled with 1s, 0s, and walls. Given a start and destination indices where you have to tell whether a person can able to reach the destination from the start. The person can travel in any of the 4 directions. Also, he can break the wall if he visits the wall at least twice, now the wall will become the way which is 1. Where 1 means the way, and 0 means no way.
- The second question in brief: I guess no logic is needed for this just solve according to the given question. (Unfortunately, I haven’t solved this fully but solved it partially — made a simple mistake) this question is for 40 pints.

**Tips:**

- Watch the Striver graph playlist on YouTube. The first question carries 160 points. I have fully solved this in the first 40 min.
- You had to know C++ STL for question two.
- I got selected for the next round. Few people who did the second question fully and partially the 1st also got selected. From our class, 25 members were selected.

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

**Round two (in-person workshop):**

Round 2 is an in-person workshop that is conducted in their office.

- After having breakfast at the office, the workshop started at 9 am.
- They explained the problem statement and assigned a mentor for each of the 5 members (not a team-based one).
- There were 7 milestones in the problem. Each milestone is linked with the other. It is an open book workshop and the mentors and the staff were so friendly and so kind to us.
- It went until 5:30 pm, and 7 members were selected.

I couldn’t make it in round 2. But this is a wonderful experience for a person like me since this was my first in-person workshop.

Thanks, KLA.
Adding an EBS volume to a running AWS EC2 Instance
Tags: aws, storage, cloudskills, blockstorage
Published: 2023-02-23 05:34:18

When creating an EC2 instance on AWS, you are given the option to select the size of your storage. However you may run into a scenario where you need more storage than what you have provisioned . In that case. you can either increase the size of the storage or attach an extra EBS volume to your instance . This short post is about showing how to add an extra volume to an EC2 instance.
  
  I assume that you already know how to create a EBS volume.

Spin out  your instance and attach the new volume created by following the instructions below.
   

- Select the new volume
-    Under the "Action" tab select "attach volume"
-    Select the EC2 instance you created 
-    Under " Device name , keep  /dev/sdf 
(as best practice in linux, /dev/sda1 is for root volume and /dev/sd(f-p) for data volumes )
  

- Select "Attach volume"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pfkj2a7b5rdv37ppim3r.JPG)
  
After attaching  the volume, there are  few extra steps to do in order to make sure that the volume is  accessible.

 SSH into your EC2 and run the command below 
   

```
 df -f
```
   
 you will only see the root volume and not the newly attached volume.


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

   To "SEE" the newly mounted volume, run the command below
      

```
lsblk
```

  Now you will see the newly mounted volume along with its mount point. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/26s84l7bxc7lo0ckoa4x.JPG)

 The next step will be to mount the new volume. Run the command below 
  

```
 sudo mkfs -t xfs /dev/xvdf
 sudo mkdir  /data 
 sudo mount /dev/xvdf /data
```

After that when we run the "df -h" command , you we should be able to see the new volume along the with the root volume  
    
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p0fzppxtogwh1fdxn9zn.JPG)

 Hope you like it.
  Site Web :www.asksouley.com
  Twitter   :@asksouley