teleren/devto huggingface dataset:
Foreign Data Wrappers in Postgres
Tags: remoteserver, postgres, database, datascience
Published: 2023-05-03 18:04:25


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

**Foreign Data Wrappers **in PostgreSQL allow you to access data from remote data sources, such as other PostgreSQL servers or other relational or non-relational databases, as if they were local tables. This allows you to integrate data from different sources and perform complex queries across multiple data sources.

To use an FDW in PostgreSQL, first we need  to create a foreign server object that defines the connection to the remote data source. 

This includes specifying the type of database system or data source being accessed, the hostname and port number of the remote server, and any necessary authentication credentials.

Then, can create a foreign table in your local PostgreSQL database that maps to a table or query in the remote data source. This involves defining the columns and data types of the foreign table, and specifying the mapping between the columns of the foreign table and the columns of the remote table or query.

_**When you query the foreign table in PostgreSQL, PostgreSQL will automatically translate the query into the appropriate syntax for the remote data source and send the query to the remote server for execution.**_

 The remote server will return the results of the query to PostgreSQL, which will then return the results to you as if you had queried a local table.

FDWs can be very useful for integrating data from different sources, particularly when the data is spread across multiple databases or data sources. 

However, it's important to keep in mind that performance may be impacted by the network latency and bandwidth between the PostgreSQL server and the remote data source.

 The delay between packets can happen and this can cause a slower query response.



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f6uebkej5z56l4gnn9k9.png)
Introducing Themes for the Enhance Blog Template
Tags: enhance, blog, theming
Published: 2023-05-03 17:59:37

Today, we’re shipping a small but exciting update to our [Enhance blog template](https://github.com/enhance-dev/enhance-blog-template), in the form of a new starter theme and the ability to quickly switch between themes via a single line of code.

We’ve been thinking about the idea of themeable Enhance apps for a while now, and this is our first step in that direction. Starting today, the Enhance blog template comes preloaded with two different themes — the original theme the template was first released with, and a new minimal theme. Both handle dark mode out of the box.

<figure>
  ![The new "minimal" blog theme, featuring sans serif typography in light and dark variants](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l98hvpxmz01zlm7xxv90.jpg)
  <figcaption>The new minimal theme</figcaption>
</figure>

<figure>
  ![The previous default theme, now called "elegant", featuring a mix of sans serif and serify typography in light and dark variants](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yhjgthjs6544m7nm850f.jpg)
  <figcaption>The original theme</figcaption>
</figure>

Our new minimal theme (which is active by default) uses a similar layout to our original theme, but features more neutral colors and typography. If you prefer the original theme, however, switching between themes is as easy as changing one line of code in your project’s `.arc` file. Under the `@enhance-styles` pragma, point the `config` option at `theme-elegant.json`:

```
@enhance-styles
config theme-elegant.json
```

These two themes vary primarily in color palette and typefaces. However, we’re planning to explore affordances for much deeper theming in the future, which will allow you to tweak many different aspects of a theme with ease. We hope these themes give you a great starting point for your own customizations and styling.

## Further Reading

- Read [the release announcement](/blog/posts/2023-03-17-introducing-the-enhance-blog-template) for our blog template
- [Learn how to style](/blog/posts/2023-04-06-customizing-the-enhance-blog-template) the blog template
- Grab [a domain name](https://begin.com/blog/posts/2023-04-03-begin-domains)
- Get set up with [webmentions](/blog/posts/2023-04-19-webmention-support-in-enhance-blog-template)
- [Syndicate your blog](/blog/posts/2023-04-28-supporting-publish-own-site-syndicate-elsewhere) with POSSE

## Next Steps

- Join [the Enhance Discord](https://enhance.dev/discord) to share your blog, request theming features, or to ask for help from our team and the community
Oh shit, git!
Tags: git
Published: 2023-05-03 17:55:52

Here's a quick tip to get back on track if you ever get stuck as a beginner:

## 0 Quick save

Copy your local repo folder to somewhere else. Worst case, and you can restore everything.


## 1 Resetting

Assuming you are on the main branch; `git add . && git reset --hard origin/main` will remove all local file changes and reset your main branch.
GitHub Actions with MongoDB
Tags: githubhack23, nextjs, mongodb, opensource
Published: 2023-05-03 17:51:54

## What I built 
I have built an example of how you can connect MongoDB to GitHub Actions and use it as a reward system for a repo's contributors.

### Category Submission: 
This might be a `DIY Deployments` submission and the action runs on every push and helps figure out who the committer is.
If not, then it is a `Wacky Wildcards` submission.

### App Link
The demo of the template can be found on https://github-actions-mongodb.vercel.app

### Screenshots 

Action runs when the contributor's token count goes up by 1.
![action runs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gylhbpyowoxzyp81nixf.png)

The dashboard where you can buy rewards with the tokens you earned when contributing.
![dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/evjg39h680jrugc4gbc9.png)

### Description 
This project includes a GitHub actions that runs on every push, gets the username of the user that has committed, and adds one token to their username profile in MongoDB.
It also comes with a dashboard, where the user can login with GitHub and spend their tokens on items.

### Link to Source Code 
{% embed https://github.com/VulcanWM/github-actions-mongodb %}

### Permissive License 
This project uses the license: `Apache License 2.0`

## Background
I feel like a reward system always keeps me going and I wanted contributors to Open Source Communities to also feel the enthusiasm to keep them contributing.
I've always loved using MongoDB and I wanted to learn how to combine that with GitHub Actions.

### How I built it 
I used React and Next.js to create this website, and then I hosted it on Vercel.
I obviously used MongoDB as a database, as it is great for people who like using NoSQL databases.
I learnt how to create and use GitHub Actions, and I also learnt how to run specific files with `npm`.

### Additional Resources/Info
I would like to give special thanks to the GitHub documentation for providing a lot of information which helped me create the Action.
Boosting Database Performance with GIN Indexes in PostgresPro
Tags: apacheage, agedb, postgres
Published: 2023-05-03 17:42:29

## Introduction:
PostgreSQL is a popular open-source database management system, known for its flexibility, robustness, and extensibility. It provides various indexing techniques, one of which is the Generalized Inverted Index or GIN. In this article, we will explore how GIN indexes work, and how they can significantly enhance database performance in PostgresPro.

## What are GIN Indexes?
GIN indexes are designed to handle complex data types, including arrays, JSON, and full-text search. They are implemented as a set of inverted indexes, where each index entry is a key-value pair, where the key is a term from the indexed data, and the value is a pointer to the row that contains that term. GIN indexes are particularly useful for queries that involve multiple conditions, as they can quickly identify the relevant rows that match all the query conditions.

## How GIN Indexes work in PostgresPro?
PostgresPro implements GIN indexes using a multi-level structure, where each level contains a set of index entries that are logically grouped into blocks. Each block has a fixed size and contains a set of entries that share a common prefix. PostgresPro uses a specialized search algorithm called the Generalized Search Tree (GiST) to traverse the GIN index, which enables it to quickly identify the relevant blocks that contain the matching index entries.

## Benefits of GIN Indexes:
There are several benefits of using GIN indexes in PostgresPro, including:

**Improved query performance:** GIN indexes can significantly improve query performance, particularly for complex queries that involve multiple conditions.

**Efficient support for array and JSON data types:** GIN indexes are particularly useful for queries that involve array or JSON data types, as they can efficiently index and search through these data types.

**Flexibility and extensibility:** GIN indexes are highly flexible and can be extended to support custom data types and query operations.

## Conclusion:
GIN indexes are a powerful indexing technique that can significantly enhance database performance in PostgresPro. They provide efficient support for complex data types, including arrays, JSON, and full-text search, and can improve query performance for complex queries. By leveraging the power of GIN indexes, PostgresPro users can achieve better scalability, faster query processing, and improved overall database performance.
What's new in PostgreSQL 14: Highlights of the upcoming release
Tags: apacheage, agedb, postgres
Published: 2023-05-03 17:33:05

PostgreSQL 14, the latest major release of the world's most advanced open-source relational database management system, is expected to be released in the third quarter of 2021. This release includes a host of new features, enhancements, and improvements, including:

## Improved Performance and Scalability

PostgreSQL 14 offers significant performance improvements over previous versions, especially for large databases. One of the key areas of focus in this release is improving the scalability of parallel query execution. This has been achieved by improving the dynamic memory allocation mechanism and introducing a new parallel hash join algorithm.

## Enhanced Security Features

PostgreSQL 14 has added several new security features to make the database more secure by default. The most notable of these is the introduction of role-level password policies. This allows administrators to define password policies that apply to specific database roles, making it easier to enforce password complexity rules.

Another new security feature is the ability to specify the number of authentication attempts allowed before an account is locked. This helps to prevent brute-force attacks by limiting the number of attempts that can be made to guess a password.

## Improved Data Management

PostgreSQL 14 also includes several new features to improve data management. One of these is the ability to define a default partition for a partitioned table. This allows for more efficient querying of partitioned tables, as queries can be optimized to only search the relevant partitions.

Another new feature is the ability to refresh materialized views concurrently. This allows for faster updates to materialized views, which can be especially useful in high-traffic applications.

## Better Developer Experience

PostgreSQL 14 also includes several new features aimed at improving the developer experience. One of these is support for extended statistics on columns, which can help improve query planning and performance. Another new feature is the ability to modify the structure of a partitioned table without needing to rebuild the entire table, which can save time and reduce downtime during schema changes.

## Conclusion

PostgreSQL 14 is shaping up to be a major release, with significant improvements in performance, security, data management, and developer experience. These new features and enhancements make it an even more compelling choice for organizations of all sizes looking for a robust and scalable relational database management system. If you're already using PostgreSQL, upgrading to version 14 is likely to be a no-brainer. If you're not yet using PostgreSQL, now is a great time to start.
How can Owl Carousel improve the user experience of an eCommerce website?
Tags: javascript, owlcarousel, webdev, ecommerce
Published: 2023-05-03 17:24:00


![Owl Carousel improve](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7vbw9ladu443vi6sfeed.png)
Adding auto-play pause on hover functionality to an Owl Carousel can greatly enhance the user experience of your website or application. In this tutorial, we'll show you how to achieve this with some simple jQuery code.

First, let's start by setting up an Owl Carousel with auto-play enabled. Here's an example:
```
$(document).ready(function(){
  $('.owl-carousel').owlCarousel({
    loop:true,
    margin: 10,
    autoplay: true,
    autoplayTimeout: 2000,
    responsive:{
        0:{
            items:1
        },
        600:{
            items:3
        },
        1000:{
            items:5
        }
    }
  });
});
```
This sets up an Owl Carousel with auto-play enabled and some responsive breakpoints to adjust the number of items displayed based on screen size. However, this carousel doesn't pause auto-play when the user hovers over an item. To add this functionality, we need to add some additional jQuery code.

```
$(document).ready(function(){
  var owl = $('.owl-carousel');
  owl.owlCarousel({
    loop:true,
    margin: 10,
    autoplay: true,
    autoplayTimeout: 2000,
    responsive:{
        0:{
            items:1
        },
        600:{
            items:3
        },
        1000:{
            items:5
        }
    }
  });
  
  // Pause autoplay on hover
  owl.on('mouseover', '.owl-item', function() {
    owl.trigger('stop.owl.autoplay');
  });

  // Resume autoplay when mouse leaves item
  owl.on('mouseout', '.owl-item', function() {
    owl.trigger('play.owl.autoplay');
  });
});
```
Here, we've added event listeners for mouseover and mouseout on the .owl-item elements within the carousel. When the user hovers over an item, the stop.owl.autoplay event is triggered to pause auto-play. When the user leaves the item, the play.owl.autoplay event is triggered to resume auto-play.

And that's it! With just a few lines of jQuery code, you can add auto-play pause on hover functionality to your Owl Carousel and greatly improve the user experience of your website or application.

In summary, adding auto-play pause on hover functionality to an Owl Carousel is a simple yet effective way to enhance the user experience of your website or application. By following the steps outlined in this tutorial, you can easily add this functionality to your Owl Carousel and give your users a more seamless browsing experience.
Criando um repositório no GitHub via linha comando
Tags: github, git, repositorio, gitbash
Published: 2023-05-03 17:07:51

# Descrição rápida para subir seu projeto para um repositório já criado dentro do GitHub #

1. Antes de qualquer coisa, é essencial que você tenha o Git instalado em sua máquina. Em caso de dúvida, basta entrar com o comando `git -v` no prompt de comando para verificar se o git está instalado com sucesso e sua versão.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/itm31sl459brq3ropd3g.png)

2. Dentro de seu repositório no GitHub, clique na opção HTTPS em Quick setup, o link gerado será necessário. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j23yi863yuf842izw5ty.png)

3. Abra o Git Bash ou o Terminal dentro da pasta do projeto a ser enviado.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gp0dy2k2qsc9bfbgw80x.png)

4. Inicie a pasta como um repositório do Git através do comando:
`git init`

5. Em seguida, adicione os arquivos de configuração para preparar o commit:
`git add .`

6. Crie um novo commit para os arquivos que irá subir para o repositório:
`git commit -m "commit inicial"`

7. Use o comando `-M main` para renomear a sua branch "master" pra "main", para quando for executado o git push, ao invés de criar uma nova branch, o git irá atualizar a branch que já está lá, nesse caso a "main".
`git branch -M main`
> Se você der o git push estando na branch master o github vai entender que você criou uma nova branch, e lá no seu repositório remoto ele vai criar essa branch também. Não tem problema, você só vai ter que fazer um "merge" lá dentro do próprio GitHub. Mas pra facilitar ele já te sugere alterar o nome da sua branch e poupar esse trabalho.

8. Suba seus arquivos utilizando a URL gerada no passo 2 no seguinte comando:
`git remote add origin URL-GERADA-PELO-PASSO-2-AQUI`

9. Autorize o upload com seu login e senha:
`git push -u origin master`
Load Edges Data from CSV file to Apache AGE
Tags: apacheage, graphdatabase, database, postgres
Published: 2023-05-03 16:48:35

In Apache AGE, we can load edges data from CSV file. A CSV file for edges should be formatted as follows:

**start_id:**
It is node id of the node from where the edge is stated. This id should be valid i.e., node with such id should exist.

**start_vertex_type:**
It should contain `class/ label` name of the node. This `label` should be valid.

**end_id:**
The end id of the node at which the edge shall be terminated. This id should also be valid i.e., node with such id should exist.

**end_vertex_type:**
It should contain `class/ label` name of the node. This `label` should be valid.

**properties:**
The properties of the edge. The header (1st Row) shall contain the property name. 2nd Row and onward rows contains data (values).

**Create Edge Label:**
`SELECT create_elabel('GraphName','EdgeLabelName');`

**Load Edge Data from csv File:**
`SELECT load_edges_from_file('GraphName', 'EdgeLabelName',
     'Path/to/file.csv');
`

For more details visit: https://age.apache.org/overview/

**AGE Github Link:** https://github.com/apache/age

**AGE Viewer Github Link:** https://github.com/apache/age-viewer
We're organizing a remote hackathon (with $5k in prizes)
Tags: webdev, hackathon, javascript, serverless
Published: 2023-05-03 16:46:16

The team here at [Gadget.dev](http://www.gadget.dev/?utm_source=devto&utm_campaign=devto-hackathon&utm_medium=community) is hosting a hackathon May 13-20 and we'd love for you to join! 

It’s completely remote, free for anyone to join, and you have a full week to build and submit your apps to compete for $5,000 in prizes.

If you've never heard about Gadget, we're a fully hosted full-stack development platform that allows developers to go fast -- like, really fast! You can build fully hosted Shopify apps in hours rather than weeks by skipping the boilerplate and jumping straight into code. 

Learn more about the hackathon and sign up for free [here](http://www.gadget.dev/hackathon?utm_source=devto&utm_campaign=devto-hackathon&utm_medium=community).

## Learn, code, repeat
To help anyone new to Gadget or the Shopify ecosystem get started we're hosting learning sessions that will teach you how to use Gadget to build Shopify apps, AI apps using e.g. LangChain and vector embeddings, and using new Shopify technology like Functions and checkout UI extensions. Trust us, you'll come out of these with a lot of new tools. 

To sign up to one of these free level-up sessions go [here](http://www.gadget.dev/hackathon#resources?utm_source=devto&utm_campaign=devto-hackathon&utm_medium=community) to register (even if you don't want to join the hackathon!)

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

Let us know if you have any questions, otherwise we hope to see some of you at the hackathon!
CSS Gradient Generator
Tags: css, webdev, productivity, tutorial
Published: 2023-05-03 16:45:00

### What is Gradient 

In computer graphics, a color gradient specifies a range of position-dependent colors, usually used to fill a region.For example, many window managers allow the screen background to be specified as a gradient. The colors produced by a gradient vary continuously with position, producing smooth color transitions. A color gradient is also known as a color ramp or a color progression. In assigning colors to a set of values, a gradient is a continuous colormap, a type of color scheme. 

In nutshell, a gradient is the smooth transition of one or more shades in our canvas. Mostly, gradients are used to come up with visually appealing and soothing backgrounds. Compared to flat colors, a gradient color canvas is smoother and will highlight your content. It will also add more depth to your designs, making them memorable. Though, while working on gradients, make sure you there is a smooth transition of colors and try not to overdo it.


So We decided to build a free [CSS Gradient Generator](https://democoding.in/css-gradient-generator)

What you can do with this tool Some of the features include:

- You can change the both the colors ( Use Slider )
- change the percent of color
- Random Gradient

We also add some crazy examples of [CSS Gradient Generator](https://democoding.in/css-gradient-generator). they all are free to use


![some crazy examples of CSS Gradient Generator](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ze640c2hkvf4a4sa09a6.png)

---

This tool is free to use and to play with. let us know in the comments section what you think about it, what would you do differently, or how we can improve it. Thank You 🧡🧡

Check it out: [CSS Gradient Generator](https://democoding.in/css-gradient-generator)
Remove your AddThis component by May 31, 2023
Tags: sitecore, addthis, sxa
Published: 2023-05-03 16:56:16

---
title: Remove your AddThis component by May 31, 2023
published: true
date: 2023-05-03 16:38:16 UTC
tags: Sitecore,AddThis,SXA
canonical_url: https://jasonstcyr.com/2023/05/03/remove-your-addthis-component-by-may-31-2023/
cover_image: https://theagilecoder.files.wordpress.com/2023/05/addthis-banner.jpg
---

Oracle has announced that they will be [turning off the AddThis service](https://www.addthis.com/) **on May 31, 2023** which is going to impact a lot of websites around the web that have been using this for the easy social sharing icons that it provided. 

## How does this affect you? 
From a Sitecore implementation perspective, you may have put the AddThis buttons into some of your components or pages, or you are using the SXA AddThis component, which [Sitecore is now deprecating](https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB1002996) because of the announcement. The component is planned to be removed in an upcoming version and any existing version of the component will stop working properly once Oracle deactivates the AddThis service.

## What should you do?
The most immediate need will be to remove the AddThis feature from your sites. If you are using the SXA component, you probably want to remove the SXA component from your pages and republish your items so that it no longer shows on your site. If you have done this with custom renderings, you’ll want to remove the code references to the AddThis service.

After you have AddThis removed from your site, you can decide if you want to find a replacement feature.

## Related links

➡ [Sitecore KB article](https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB1002996)
➡ [Oracle announcement on AddThis.com](https://www.addthis.com/)
➡ [Related blog by David San Filippo](https://blogs.perficient.com/2023/04/19/sitecore-sxas-social-share-component-will-no-longer-work-after-may-2023/) (Perficient)