teleren/devto huggingface dataset:
Chrome Extension Social Logins Issues
Tags: javascript, react, manifestjson, backgroundjs
Published: 2023-02-24 08:32:34

steps of our code : -
1. we our opening the google pop up .

    function getGoogleAuthEndpoint() {
    const googleStringifiedParams = queryString.stringify({
      client_id: process.env.REACT_APP_GOOGLE_CLIENT_ID,
      redirect_uri: `${process.env.REACT_APP_PUBLIC_URL_ADMIN_API}/api/auth/socialRedirectLoginUrl/google`,
      scope: [
        "https://www.googleapis.com/auth/userinfo.email",
        "https://www.googleapis.com/auth/userinfo.profile",
      ].join(" "), // space seperated string
      response_type: "code",
      access_type: "offline",
      prompt: "consent",
    });

    const googleAuthEndpoint = `https://accounts.google.com/o/oauth2/v2/auth?${googleStringifiedParams}`;

    return googleAuthEndpoint;
  }


2. Next in the redirect_uri we our pasting our api url which after verification by the google will run that api.

3. The API succesfully returns the url of home page in chrome extension like :-
        return {url : redirectUrl}

4. if we hit this url then we our getting our homepage of extension on our local .

5.But chrome extension after signup or login does not open home 
   page but gives the error that our chrome Id is blocked .


What can be the possible reasons for that ?
How to use Linode Object Storage with Laravel
Tags: laravel, php, tutorial
Published: 2023-02-24 08:30:00

## What is Linode Object storage?
[Linode Object Storage](https://www.linode.com/products/object-storage/) is a highly available S3 compatible object storage.
It is used to manage unstructured data such as images, videos, etc.


## Setting up Object Storage in Linode

1. Go to [Linode cloud console](https://cloud.linode.com/).
2. Go to Object Storage and select **Create Bucket**.
![creating object storage bucket in linode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6j1pulrqiayl80hu80se.png)

3. From the Object storage dashboard, go to **Access key** tab and select create access key.
![create access key](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w0vuy3ro7ceo773o1mho.png)

4. Give it a name, and give it **Read/Write** access for the bucket created in the previous step.
![give access to bucket](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vz3hkg3ijzfipf8rkep5.png)



5. It will show you the access and secret keys, copy and save it securely.



## Configuring Laravel application

Since Linode Object Storage is a S3 compatible, we can use the S3 driver in Laravel for managing files.

1. To use the S3 driver we need to install the `flysystem` package in Laravel. Use the following command to install the package

    ```bash
    composer require league/flysystem-aws-s3-v3 "^3.0"
    ```

2. We need to create some environment variables in the `.env` file of Laravel application as follows

    ```bash
    LINODE_KEY="your-linode-access-key"
    LINODE_SECRET="your-linode-access-secret"
    LINODE_ENDPOINT="https://ap-south-1.linodeobjects.com"
    LINODE_REGION="ap-south-1"
    LINODE_BUCKET="dev-to"
    LINODE_BUCKET_URL="https://dev-to.ap-south-1.linodeobjects.com/"
    ```
    You can get the bucket url from the details of the bucket in linode cloud console.

3. Go to `config/filesystems.php` config file and add the following in the `disks` array.

    ```php
    <?php
    
    'disks' => [
      ...
     'linode' => [
         'driver' => 's3',
         'key' => env('LINODE_KEY'),
         'secret' => env('LINODE_SECRET'),
         'endpoint' => env('LINODE_ENDPOINT'),
         'region' => env('LINODE_REGION'),
         'bucket' => env('LINODE_BUCKET'),
         'visibility' => 'public',
      ],
      ...
    ]
    ```

4. Make sure you have `linode` set as the default file system disk in the `.env` file. Otherwise you have to specify each time you call a method.

    ```bash
    FILESYSTEM_DISK=linode
    ```


## Storing files in Linode

Now you can use the [available methods](https://laravel.com/docs/master/filesystem) in Laravel to manage the files in Linode Object Storage.

For example, 
```php
use Illuminate\Support\Facades\Storage;

Storage::disk('linode')->put('avatars/1', $content);

$contents = Storage::get('avatars/user.jpg'); // No need to specify disk name if the default is set to 'linode'

```
Which Programming Language Did You Choose to Start with, and Why Did You Choose It?
Tags: discuss, beginners, codenewbie
Published: 2023-02-24 08:00:00

Starting your journey in programming can be an exciting but daunting experience. One of the first decisions you'll make is choosing which programming language to start with.

We want to hear from our newbies and from some of the more experienced community members, too: What was the first programming language you learned, and what programming language(s) are you currently studying?
The openGauss open source community was selected into the "Technology China" open source innovation list
Published: 2023-02-24 07:54:26

congratulate! The openGauss open source community was once again selected into the "Science and Technology China" open source innovation list

The openGauss open source community was selected into the "Technology China" open source innovation list

On February 20, at the 2023 "Science and Technology Innovation China" annual meeting, the China Association for Science and Technology officially released the 2022 "Science and Technology Innovation China" series list. The openGauss open source community was selected as the annual outstanding open source community of the "Science and Technology China" Open Source Innovation List, which is also the second consecutive year that the openGauss open source community has been selected on the list.

In the 2022 "Science and Technology China" Open Source Innovation List, 30 innovative and excellent open source products, excellent communities with high activity and high contributions, and excellent open source organizations that promote the development of the open source industry will be discovered, leading the creation of an open source innovation ecosystem.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mqvuucr5ertd8wfwbh5z.png)
On June 30, 2020, the openGauss database was officially open sourced. Since its open source, it has insisted on creating database root technology, building a root community, and prospering the new ecology. It has made continuous breakthroughs in 2022 and was selected into the open source innovation list again.

In 2022, openGauss will continue to carry out technological innovation, create a flexible resource pool architecture, and better realize the integration of software and hardware, so as to adapt to the challenges posed by technological development to the database and help the database industry chain realize full-stack innovation.

At the same time, the number of users in the openGauss community exceeded 1 million for the first time, the number of community contributors exceeded 4,000, the number of PRs reached 8,600, the number of Issues reached 8,000, and there were 24 SIG interest groups, the backbone of the community. A total of 220 companies and organizations joined the community. The community is active Continue to increase.

In terms of industry applications, the joint partners have completed a total of 500+ industry solution adaptations, covering more than 10 industries such as government, finance, and operators; not only that, based on extensive commercial use in multiple industries, openGauss has accumulated more than 30,000 deployments so far sets, of which more than 20,000 sets were newly deployed in 22 years, and the non-cloud database market added more than 10%. openGauss has become the key to leveraging industrial digitalization with its full-stack integration of innovation and enrichment of industry practices.
Helpful tools for game developers
Tags: gamedev, unity3d
Published: 2023-02-24 07:37:33

## Unity: 
Unity is a game engine that allows developers to create games for multiple platforms, including PC, consoles, mobile devices, and virtual reality headsets. It provides tools for 3D modeling, animation, and physics simulation, as well as scripting in C#.

## Unreal Engine: 
Unreal Engine is another popular game engine that offers similar features to Unity. It has a visual scripting system called Blueprint, which allows non-programmers to create game logic.

## Visual Studio: 
Visual Studio is an integrated development environment (IDE) that provides a comprehensive set of tools for coding, debugging, and testing games. It supports multiple programming languages, including C#, C++, and Python.

## Blender: 
Blender is a free and open-source 3D modeling software that can be used for creating game assets like characters, environments, and objects. It has a powerful animation system and supports a wide range of file formats.

## Git: 
Git is a version control system that allows developers to track changes to their code and collaborate with other developers on a project. It provides features like branching, merging, and rollback.

## Trello: 
Trello is a project management tool that allows developers to organize tasks and track progress. It uses a visual card-based system to represent tasks and can be used for both individual and team projects.

## Adobe Creative Suite: 
Adobe Creative Suite includes software like Photoshop, Illustrator, and After Effects, which can be used for creating game art and animations. They provide powerful tools for creating and editing images, vectors, and videos.

## Audacity: 
Audacity is a free and open-source audio editing software that can be used for creating and editing game sounds and music. It supports a wide range of audio formats and provides tools for noise reduction, equalization, and effects.

## GameMaker Studio: 
GameMaker Studio is a game engine that is specifically designed for 2D games. It provides a visual scripting system and supports multiple programming languages.

## Firebase: 
Firebase is a mobile and web application development platform that provides features like user authentication, real-time database, cloud storage, and analytics. It can be used for adding online multiplayer, cloud saves, and other network features to games.
openGauss SCHEMA
Published: 2023-02-24 07:21:10

Schemas function as models. Schema management allows multiple users to use the same database without mutual impacts, to organize database objects as manageable logical groups, and to add third-party applications to the same schema without causing conflicts.

Each database has one or more schemas. Each schema contains tables and other types of objects. When a database is initially created, it has a public schema by default, and all users have the usage permission on the schema. Only the system administrator and initial users can create common functions, aggregate functions, stored procedures, and synonym objects in the public schema. Only the initial users can create operators in the public schema. Other users cannot create the preceding five types of objects even if they are granted the create permission. You can group database objects by schema. A schema is similar to an OS directory but cannot be nested.

The same database object name can be used in different schemas of the same database without causing conflicts. For example, both a_schema and b_schema can contain a table named mytable. Users with required permissions can access objects across multiple schemas of the same database.

When you execute the CREATE USER statement to create a user, the system creates a schema with the same name as the user in the database where the statement is executed.

## Syntax
Create a schema.
`CREATE SCHEMA schema_name 
    [ AUTHORIZATION user_name ] ;`
Modify a schema.

Rename a schema.

`ALTER SCHEMA schema_name 
    RENAME TO new_name;`
Change the owner of a schema.
`ALTER SCHEMA schema_name 
    OWNER TO new_owner;`
Delete a schema and its objects.

`DROP SCHEMA  schema_name;`
Schemas beginning with pg_temp or pg_toast_temp are for internal use. Do not delete them. Otherwise, unexpected consequences may be incurred.

## Parameter Description
schema_name

Specifies the schema name.

 NOTICE: The name must be unique. The schema name cannot start with pg_.

Value range: a string. It must comply with the identifier naming convention.

AUTHORIZATION user_name

Specifies the owner of a schema. If schema_name is not specified, user_name will be used as the schema name. In this case, user_name can only be a role name.

Value range: an existing username or role name

schema_element

Specifies an SQL statement defining an object to be created within a schema. Currently, only the CREATE TABLE, CREATE VIEW, CREATE INDEX, CREATE PARTITION, CREATE SEQUENCE, CREATE TRIGGER and GRANT clauses are supported.

Objects created by sub-commands are owned by the user specified by AUTHORIZATION.

 NOTE: If objects in the schema on the current search path are with the same name, specify the schemas for different objects. You can run the SHOW SEARCH_PATH statement to check the schemas on the current search path.
How to create OTP code generator with Total.js Flow?
Tags: totaljs, totaljsflow, lowcode, otp
Published: 2023-02-24 07:19:05

According to Wikipedia, a one-time password (OTP) is a password that is valid for only one login session or transaction. It is also known as a one-time PIN, one-time authorization code or dynamic password. OTP has become popular because it is one of the most secure ways to verify user identity before login or password recovery. However, implementing such a feature in your application can be challenging. In this post, I am happy to show you how to generate and verify OTP easily within **Total.js Flow**.
What we will learn today:

- What is Total.js Flow?
- Why Total.js Flow?
- How to implement an OTP generator in Total.js Flow?

## What is Total.js Flow?

[Total.js Flow](https://totaljs.com/flow) is a visual programming interface built on top of the [Total.js framework](https://totaljs.com). It's a node-red alternative intended for building IoT applications, home automation, data scraping, microservices and much more.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hrkobqnau0mjb9f1u8zm.jpg)

## Why Total.js Flow?

Total.js is a unique tool with lots of benefits:
- Total.js Flow is **free** and **open-source**
- Total.js Flow is designed to be **productive**,
- **Free components**,
- Your flows are **reusable** and **scalable**
- You have **cloud deployment** options
- You have **real-time** visual debugging
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p73k1iyt6i72mwif4ta5.gif)
## How to implement an OTP generator in Total.js Flow?

I have prepared a youtube video that will show you step-by-step how to implement it. Enjoy the video and do not forget to subscribe and live some comments.
{% embed https://youtu.be/9Pk6SK3aRYQ %}
openGauss Views
Tags: opengauss
Published: 2023-02-24 07:18:09

A view is a virtual table, not a base table. A database only stores the definition of a view and does not store its data. The data is still stored in the original basic table. If data in the base table changes, the data in the view changes accordingly. In this sense, a view is like a window through which users can know their interested data and data changes in the database.

## Syntax
Create a view

`CREATE [ TEMP | TEMPORARY ] VIEW view_name [ ( column_name [, ...] ) ]
     AS query;`
Delete a view
`DROP VIEW  view_name ;`

## Parameter Description

TEMP | TEMPORARY

Creates a temporary view.

view_name

Specifies the name of the view to be created. It is optionally schema-qualified.

Value range: a string. It must comply with the identifier naming convention.

column_name

Specifies an optional list of names to be used for columns of the view. If not given, the column names are deduced from the query.

Value range: a string. It must comply with the identifier naming convention.

query

Specifies a SELECT or VALUES statement that will provide the columns and rows of a view.
openGaus Batch Processing Mode
Tags: opengaus
Published: 2023-02-24 07:12:23

openGauss supports the execution of SQL statements from text files and provides the gsql tool to process SQL statements in batches.

Batch processing is recommended in the following scenarios:

If you run a query repeatedly (for example, daily or weekly), you can set it as a script to avoid repeated input.
You can generate a new query from an existing similar query by copying and editing the script file.
For multi-line statements or multi-statement sequences, if an error occurs, you do not need to input all the content again. You only need to edit the script to correct the error, and then execute it again.
You can distribute the script to others so that they can also execute the statements.
When interactive use is not allowed in some cases, you must use the batch processing mode.

## Syntax
`gsql -d dbname -p port -f filename`

## Parameter Description
dbname

Specifies the name of the database to connect to.

port

Specifies the port number of the database server.

-f filename

Specifies that files are used as the command source instead of interactively-entered commands. This parameter specifies the path and name of the text file to be read.

## Examples
Create the sql.txt file locally. The file content is as follows:

`CREATE TABLE customer
(
    c_customer_sk             integer,
    c_customer_id             char(5),
    c_first_name              char(6),
    c_last_name               char(8),
    Amount                    integer
);

INSERT INTO customer(c_customer_sk, c_customer_id, c_first_name,Amount) VALUES (3769, 'hello', 'Grace', 1000);
INSERT INTO customer (c_customer_sk, c_first_name) VALUES (3769, 'Grace');
INSERT INTO customer (c_customer_sk, c_customer_id, c_first_name) VALUES (3769, 'hello', DEFAULT);
INSERT INTO customer (c_customer_sk, c_customer_id, c_first_name,Amount) VALUES 
    (6885, 'maps', 'Joes',2200),
    (4321, 'tpcds', 'Lily',3000),
    (9527, 'world', 'James',5000);`
Execute the SQL statements in the sql.txt file.

`gsql -d postgres -p 21013 -f /home/user/sql.txt`
The result is as follows:
`CREATE TABLE
INSERT 0 1
INSERT 0 1
INSERT 0 1`
INSERT 0 3
Sobha Neopolis Apartments
Tags: sobhaneopolisapartmenst, webdev, javascript
Published: 2023-02-24 07:09:49

[Sobha Neopolis](https://www.sobhaneopolis.net.in) is placed in on veritably beautiful places in Bangalore with peaceful and clam terrain by your easy accuses for all your requirements and conditions we offer you all kinds of development like 2, 3, 3.5, and 4 BHK units apartments
openGauss Row-Store Execution to Vectorized Execution
Published: 2023-02-24 07:04:31

## Availability
This feature is available since openGauss 3.0.0.

## Introduction
Row-store table queries are converted into vectorized execution plans for execution, improving the execution performance of complex queries.

## Benefits
When processing row-store table queries, the executor has poor performance when executing complex queries that include many expressions or join operations, while the vectorized executor has excellent performance when executing complex queries. Therefore, query performance of complex queries can be effectively improved by converting row-store table execution into vectorized execution.

## Description
This feature adds a RowToVec operation to scan operators. After the data in the row-store table is converted into the vectorized format in the memory, the upper-layer operators can be converted into vectorized operators. In this way, the vectorized executor can be used for calculation. Scan operators that support this conversion include SeqScan, IndexOnlyscan, IndexScan, BitmapScan, FunctionScan, ValueScan and TidScan.

## Enhancements
None.

## Constraints
Vectorization is not supported in the following scenarios:

The targetList contains a function that returns set.
The targetList or qual contains expressions that do not support vectorization, such as array expressions, multi-subquery expressions, field expressions, and system catalog columns.
openGauss Xlog no Lock Flush
Tags: opengauss
Published: 2023-02-24 07:00:59

## Availability
This feature is available since openGauss 2.0.0.

## Introduction
Canceled the WalInsertLock contention and dedicated WalWriter disk write thread.

## Benefits
The system performance is further improved on the basis that the original Xlog functions remain unchanged.

## Description
This feature optimizes the WalInsertLock mechanism by using log sequence numbers (LSNs) and log record counts (LRCs) to record the copy progress of each backend. The backend can directly copy logs to the WalBuffer without contending for the WalInsertLock. In addition, a dedicated WALWriter thread is used to write logs, and the backend thread does not need to ensure the Xlog flushing.

## Enhancements
None.

## Constraints
None.

Dependencies
None.
openGauss SMP for Parallel Execution
Tags: opengauss
Published: 2023-02-24 06:59:36

## Availability
This feature is available since openGauss 1.1.0.

## Introduction
The Symmetric Multi-Processing (SMP) technology of openGauss uses the multi-core CPU architecture of a computer to implement multi-thread parallel computing, fully using CPU resources to improve query performance.

## Benefits
Fully utilizes the system multi-core capability to improve requery performance.

## Description
In complex query scenarios, a single query takes long time and the system concurrency is low. Therefore, the SMP technology is used to implement operator-level parallel execution, which effectively reduces the query time and improves the query performance and resource utilization. The overall implementation of the SMP technology is as follows: For query operators that can be executed in parallel, data is sliced, multiple working threads are started for computation, and then the results are summarized and returned to the frontend. A data interaction operator named Stream is added to the SMP architecture to implement data interaction between multiple working threads, ensuring the correctness and integrity of the query.

## Enhancements
None.

## Constraints
Index scanning cannot be executed in parallel.
MergeJoin cannot be executed in parallel.
WindowAgg order by cannot be executed in parallel.
The cursor cannot be executed in parallel.
Queries in stored procedures and functions cannot be executed in parallel.
Subplans and initplans cannot be queried in parallel, and operators that contain subqueries cannot be executed in parallel, either.
Query statements that contain the median operation cannot be executed in parallel.
Updating materialized views cannot be executed in parallel.
Queries that trigger triggers cannot be executed concurrently. Especially, INSERT, UPDATE, and DELETE operations on tables that contain foreign keys will trigger triggers.
The Ustore engine does not support parallel execution.
Query statements containing rownum do not support parallel execution.
Statements involving LOBs greater than 1 GB cannot be executed concurrently.
Dependencies
None.