teleren/devto huggingface dataset:
AntDB-Oracle Compatibility Developer’s Manual P3–55
Published: 2023-09-13 12:18:10

##### RANK

Determines the ranking of a set of values. When there are the same sorted values, there will be the same ranking and the number of rows with the same values will be recorded in the next ranking.

**Example:**

Calculate the salary ranking of each person within the same department.

```
select empno,ename,sal, deptno, rank() over (partition by deptno order by sal)  from emp;
 EMPNO | ENAME  |  SAL  | DEPTNO | RANK() OVER (PARTITION BY DEPTNO ORDER BY SAL)  
-------+--------+-------+--------+---------------------------------------------------
  7934 | MILLER |  6300 |     10 |                                              1
  7782 | CLARK  |  7450 |     10 |                                              2
  7839 | KING   | 10000 |     10 |                                              3
  7469 | SMITH  |  4800 |     20 |                                              1
  7369 | SMITH  |  6800 |     20 |                                              2
  7566 | JONES  |  7975 |     20 |                                              3
  7902 | FORD   |  8000 |     20 |                                              4
  7788 | SCOTT  |  8000 |     20 |                                              4
  7876 | ADAMS  |  8100 |     20 |                                              6
  7900 | JAMES  |  5950 |     30 |                                              1
  7521 | WARD   |  6250 |     30 |                                              2
  7654 | MARTIN |  6250 |     30 |                                              2
  7844 | TURNER |  6500 |     30 |                                              4
  7499 | ALLEN  |  7600 |     30 |                                              5
  7698 | BLAKE  | 11850 |     30 |                                              6
(15 rows)
```

##### DENSE\_RANK

The DENSE\_RANK window function determines the ranking of one of a set of values based on the ORDER BY expression in the OVER clause. If the optional PARTITION BY clause is present, the ranking is reset for each group of rows. Rows with the same values that meet the ranking criteria receive the same ranking. The DENSE\_RANK function differs from RANK in that there is no spacing in the sequence of sorted values if two or more rows are tied. For example, if two rows have a ranking of 1, the next ranking is 2.

**Example:**

```
postgres=# SELECT deptno, ename, sal, DENSE_RANK ( ) OVER ( partition BY deptno ORDER BY sal DESC ) "RANK" FROM emp WHERE sal>6500;
 DEPTNO |  ENAME |  SAL  | RANK 
--------+--------+-------+---------
     10 | KING   | 10000 |    1
     10 | CLARK  |  7450 |    2
     20 | ADAMS  |  8100 |    1
     20 | SCOTT  |  8000 |    2
     20 | FORD   |  8000 |    2
     20 | JONES  |  7975 |    3
     20 | SMITH  |  6800 |    4
     30 | BLAKE  | 11850 |    1
     30 | ALLEN  |  7600 |    2
(9 rows)
```
Performance Testing: The Basics
Published: 2023-09-13 12:15:58

As a user, would you ever like to use an app or a website which has performance issues? Of course, not. Well, performance is one of the key factors in determining the overall value of any web app or website. So, let’s figure out what it is, why it’s important, and some of the tools that will help you to get started.

![](https://cdn-images-1.medium.com/max/2000/0*AP6h-oCbdZ386G50.png)
Different Types of Export in React
Tags: webdev, javascript, beginners, react
Published: 2023-09-13 12:15:30

When working with React, you'll often hear about "exporting" and "importing" components. These are fundamental concepts that enable the modular structure of React applications. In this article, we'll explore the different types of exports in React and how they're used.

## What are Exports?

In JavaScript, modules are individual files containing code. This code can be functions, objects, values, classes, or React components. The `export `keyword allows these elements to be used in other JavaScript files, thus making the code reusable and modular.

There are two main types of export in React: **named export** and **default export**.

## Default export

A file can have no more than one default export. This type of export is commonly used when a file exports only one component.

```jsx
// Message.js
import React from 'react';

const Message = () => {
  return <div>Hello React!</div>;   
}

export default Message;

```
You can import the `Message` component in another file like this:

```JSX
import Message from "./Message";
```

Note that the name Message is arbitrary and can be changed to anything you like

```JSX
import HelloMessage from "./Message";
```

## Named Exports
A file can have as many named exports as you like. Named exports are used when a file exports multiple components or values

```jsx
// utils.js
export function add(a, b) {
  return a + b;
}

export function subtract(a, b) {
  return a - b;
}
```
To use these functions in another file, we need to import them using the same names and curly braces:

```jsx
// App.js
import React from 'react';
import { add, subtract } from './utils'; // import the utility functions

function App() {
  return (
    <div>
      <p>{add(2, 3)}</p>
      <p>{subtract(5, 2)}</p>
    </div>
  );
}

export default App;
```

Alternatively, we can use the * symbol to import all the named exports from a file as an object, which is very similar to other languages like python and java

```jsx
// App.js
import React from 'react';
import * as utils from './utils'; // import all the named exports as an object

function App() {
  return (
    <div>
      <p>{utils.add(2, 3)}</p>
      <p>{utils.subtract(5, 2)}</p>
    </div>
  );
}

export default App;

```

## When to use named export and when to use default export?

- Use named export when you want to export multiple variables or functions from a file.
- Use default export when you want to export only one variable or function from a file.
- Use named export when you want to keep the same name for your variables or functions across different files.
- However, it's important to note that you can use both default and named exports in the same file.

**Conclusion**
Always ensure to match the export type with the corresponding import syntax to avoid errors. Remember, a file can have multiple named exports but only one default export. I hope that this article was helpful and informative for you. Happy coding! 😊
AntDB-Oracle Compatibility Developer’s Manual P3–54
Published: 2023-09-13 11:58:49

##### CUME\_DIST

Calculates the cumulative distribution of a value over a set of values. The range of return values is 0 \< CUME\_DIST \<= 1.

**Example:**

```
SELECT deptno , ename , sal, cume_dist ( ) over ( partition BY deptno ORDER BY sal DESC ) "RANK" FROM emp WHERE sal>2000;
 DEPTNO | ENAME  |  SAL  |        RANK         
--------+--------+-------+---------------------
     10 | KING   | 10000 |  0.3333333333333333
     10 | CLARK  |  7450 |  0.6666666666666666
     10 | MILLER |  6300 |                   1
     20 | ADAMS  |  8100 | 0.16666666666666666
     20 | FORD   |  8000 |                 0.5
     20 | SCOTT  |  8000 |                 0.5
     20 | JONES  |  7975 |  0.6666666666666666
     20 | SMITH  |  6800 |  0.8333333333333334
     20 | SMITH  |  4800 |                   1
     30 | BLAKE  | 11850 | 0.16666666666666666
     30 | ALLEN  |  7600 |  0.3333333333333333
     30 | TURNER |  6500 |                 0.5
     30 | WARD   |  6250 |  0.8333333333333334
     30 | MARTIN |  6250 |  0.8333333333333334
     30 | JAMES  |  5950 |                   1
(15 rows)
```
Car Battery Replacement Services - Autobay: Expert Auto Care Near You
Tags: car, repair, autobay, automobile
Published: 2023-09-13 11:55:10

Experience hassle-free [car battery replacement](https://www.autobay.me/amwaj-islands/battery-services/) at Autobay. Our skilled technicians provide efficient and affordable battery replacement services, ensuring your vehicle stays powered and ready to hit the road. Trust Autobay for reliable auto care solutions that keep you moving forward
AntDB-Oracle Compatibility Developer’s Manual P3–53
Published: 2023-09-13 11:48:53

##### COVAR\_POP

Calculate the covariance.

**Example:**

```
SELECT MGR , COVAR_POP ( SYSDATE - HIREDATE , sal )  AS covar_pop ,
COVAR_SAMP ( SYSDATE - HIREDATE , sal )  AS covar_samp
FROM emp GROUP BY MGR ORDER BY MGR , covar_pop , covar_samp ;

 MGR  |     COVAR_POP     |     COVAR_SAMP     
------+-------------------+---------------------
 7566 |                 0 |                  0
 7698 |             43976 |              54970
 7782 |                 0 |                   
 7788 |                 0 |                   
 7839 | 10547.22222222222 | 15820.833333333332
 7902 |                 0 |                  0
      |                 0 |                   
(7 rows)
```

##### COVAR\_SAMP

Calculate the sample covariance.

**Example:**

```
SELECT MGR , COVAR_SAMP( SYSDATE - HIREDATE , sal )  AS covar_pop ,
COVAR_SAMP ( SYSDATE - HIREDATE , sal )  AS covar_samp
FROM emp GROUP BY MGR ORDER BY MGR , covar_pop , covar_samp ;

 MGR  |     COVAR_POP      |     COVAR_SAMP     
------+--------------------+---------------------
 7566 |                  0 |                  0
 7698 |              54970 |              54970
 7782 |                    |                   
 7788 |                    |                   
 7839 | 15820.833333333332 | 15820.833333333332
 7902 |                  0 |                  0
      |                    |                   
(7 rows)
```
Hedgehog Studio Bot Not working
Tags: androidstudio, hedgehog, studiobot
Published: 2023-09-13 11:48:14


![android hedgehog image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o5fvvvipg2abu851q8bg.png)I downloaded android studio **hedgehog** and I don't see the option to use the **studio bot is the beta test over, I downloaded it directly from https://developer.android.com/studio/preview
** and followed all the instructions but when I got to the dropdown menu view, tools window the studio bot is not listed as an option.
JavaScript : Destructuring (English/Hindi)
Tags: webdev, javascript, beginners, programming
Published: 2023-09-13 11:35:13

## English


Destructuring in JavaScript is a feature that allows you to extract values from objects or arrays and assign them to variables in a concise and readable way. This can make your code cleaner and more organized. Let's look at an example:

Suppose you have an object representing a person:

```javascript
const person = {
  firstName: 'John',
  lastName: 'Doe',
  age: 30,
};
```

With destructuring, you can easily extract the values from this object and assign them to variables:

```javascript
const { firstName, lastName, age } = person;

console.log(firstName);  // Output: John
console.log(lastName);   // Output: Doe
console.log(age);        // Output: 30
```

This is equivalent to manually assigning the values like this:

```javascript
const firstName = person.firstName;
const lastName = person.lastName;
const age = person.age;
```

Destructuring works similarly for arrays as well. Consider this example with an array:

```javascript
const numbers = [1, 2, 3, 4, 5];

const [first, second, ...rest] = numbers;

console.log(first);  // Output: 1
console.log(second); // Output: 2
console.log(rest);   // Output: [3, 4, 5]
```

Here, the first and second elements of the array are extracted and assigned to variables, and the rest of the elements are collected into the rest array.

## Hindi

JavaScript mein destructuring ek feature hai jo aapko objects ya arrays se values ko extract karke unhe variables mein assign karne ki suvidha deta hai, aur yeh ek sankshep aur padhne mein asaan tareeke se hota hai. Isse aapka code saaf aur vyavasthit ho sakta hai. Chaliye ek udaharan dekhein:

Mana ki aapke paas ek vyakti ko darshane wala object hai:

```javascript
const person = {
  firstName: 'John',
  lastName: 'Doe',
  age: 30,
};
```

Destructuring ke dwara, aap aasani se is object se values ko nikal kar unhe variables mein assign kar sakte hain:

```javascript
const { firstName, lastName, age } = person;

console.log(firstName);  // Output: John
console.log(lastName);   // Output: Doe
console.log(age);        // Output: 30
```

Yeh manuaaly values ko aise assign karne ke barabar hai:

```javascript
const firstName = person.firstName;
const lastName = person.lastName;
const age = person.age;
```

Destructuring arrays ke liye bhi similarly kaam karta hai. Yeh ek array ke saath wala udaharan dekhein:

```javascript
const numbers = [1, 2, 3, 4, 5];

const [first, second, ...rest] = numbers;

console.log(first);  // Output: 1
console.log(second); // Output: 2
console.log(rest);   // Output: [3, 4, 5]
```

Yahan par, array ke pehle aur doosre elements ko extract karke variables mein assign kiya gaya hai, aur baki ke elements ko rest array mein collect kiya gaya hai.
AntDB-Oracle Compatibility Developer’s Manual P3–51
Published: 2023-09-13 11:30:12

##### Window function description

Analysis function (also called window function) and aggregation function, both are the row set group (a set of rows) to aggregate calculations, the difference is that the aggregation function can only return one value per group (one line), while the window function can return multiple values per group (multiple lines). The set of rows is also called a window and is defined by analytic\_clause. The window size depends on the actual number of rows or logical intervals (e.g. time). Each row in the group is the result of a logical calculation based on the window. Triggering an analytic function requires the special keyword OVER to specify the window.

**The syntax of the window function.**

analytic\_function ( \[arguments] ) OVER ( \[ partition\_clause ]

\[ order\_by\_clause \[ windowing\_clause ] ] )

Among that:

- over is the keyword that identifies the analytic function.

- analytic\_function is the name of the specified analytic function. There are many Oracle analytic functions.

- The format of the partition clause is partition by\[,value\_expr]… The keyword partition by clause logically divides a single result set into N groups based on the conditions of the partition expression. Here “partition by” and “group by” are synonyms.

- The sort clause order-by-clause specifies how the data exists within the partition. The format is:

order \[ siblings ] by { expr \| position \| c\_alias } \[ asc \| desc ] \[ nulls first \| nulls last ]

Among that:

(1), asc\|desc: specifies the order of ordering.

(2), nulls first\|nulls last: specifies that the return line containing the null value should appear in the first or last position in the ordered sequence.

- windowing clause windowing-clause gives a fixed or variable data windowing method, the analysis function will operate on these data. In a set of windows based on any change or fixed, the clause can be used to allow the analysis function to calculate its value.
Launch Your E-commerce Business With Our Advanced E-commerce Clone Script
Tags: html, javascript, css, website
Published: 2023-09-13 11:24:07


It is important to stand out in the competitive world of online shopping. Our **[e-commerce clone script](https://bitrixinfotech.com/ecommerce-clone)** available today is your secret weapon to build and launch your dream online store. Designed to meet all your eCommerce needs, this script empowers you with the tools and features needed to succeed. 

**Feature-Rich:** Our E-commerce Clone Script is packed with the latest features to ensure you provide an exceptional shopping experience to your customers. From user-friendly interfaces to secure payment gateways, we have you covered. 

**Customization:** Change your online store to your unique vision. Whether you want to create an Etsy-like marketplace for designers or a listed store like Shopify, our prints are flexible and customizable. 

**Scalability:** Start small and dream big! Our scripts can grow with your business, just like Amazon did. Effortfully manage an ever-expanding product line and growing customer base. 

**Wish-listed features:** Acknowledge the power of a wish-like platform that satisfies customers with affordable and trendy products, enabling repeat business and customer loyalty. 

Don’t miss your chance to win in the eCommerce environment with our eCommerce clone script. This is your shortcut to starting a feature-rich, scalable and customizable online store that customers will love. Up your eCommerce game and start your journey to success today!
problem using react-webcam
Tags: react, reactwebcam, frontend, node
Published: 2023-09-13 11:21:57

hey guys , i am working on a react project , i have to create a form which consists of few input fields like firstname , lastname , address , contact , photo , signature . The main challenge in this task is capturing images of user through webcam and capturing signature image through a signature pad , and i have to send this whole data to backend , if there is anyone who can help me i will be more than happy . Ill share the code also if there is someone who is intrested in helping me !
Node.js File System – Utilizing unlink() and unlinkSync() for File Deletion
Tags: node, javascript, webdev
Published: 2023-09-13 11:15:19

In Node.js, you can delete files using the built-in `fs` (File System) module. The `fs` module provides both asynchronous and synchronous methods to delete files: `unlink` for asynchronous operations and `unlinkSync` for synchronous operations. 

&nbsp;

### Steps to Delete a File in Node.js

&nbsp;

1. **Import the File System Module**: First, you need to import the `fs` module into your Node.js program.

    ```javascript
    import fs from 'fs';
    ```

2. **Delete File Asynchronously**: To delete a file asynchronously, you can use the `unlink` function. The syntax is as follows:

    ```javascript
    fs.unlink(filePath, callbackFunction);
    ```

3. **Delete File Synchronously**: To delete a file synchronously, you can use the `unlinkSync` function. The syntax is:

    ```javascript
    fs.unlinkSync(filePath);
    ```

&nbsp;

#### Example 1: Delete File Asynchronously with Error Handling

&nbsp;

In this example, make sure you have a file named `exampleFile.txt` in the same directory as your Node.js program. The following Node.js program deletes the file and includes error handling:

```javascript
import fs from 'fs';

// Delete file named 'exampleFile.txt'
fs.unlink('exampleFile.txt', (err) => {
  if (err) {
    console.error('An error occurred:', err);
  } else {
    console.log('File deleted successfully!');
  }
});
```

Run the program using the `node` command. Depending on whether the file is successfully deleted or an error occurs, the appropriate message will be displayed.

&nbsp;

#### Example 2: Delete File Synchronously with Error Handling

&nbsp;


This example demonstrates synchronous file deletion with error handling. This is useful when subsequent statements depend on the deletion of the file.

```javascript
import fs from 'fs';

try {
  // Delete file named 'exampleFile.txt' synchronously
  fs.unlinkSync('exampleFile.txt');
  console.log('File deleted successfully!');
} catch (err) {
  console.error('An error occurred:', err);
}
```

Run the program using the `node` command. If the file is deleted successfully, you'll see the message "File deleted successfully!". If an error occurs, the error message will be displayed.
SQL concept for Beginners
Tags: sql, sqltutorial, onlinecourse, certification
Published: 2023-09-13 11:14:09

**SQL** (Structured Query Language) is most popular programming language and used for managing and manipulating relational databases. If you're a beginner, here are some fundamental concepts to get you started:

**Databases:** Basically Databases are organized collections of structured data. They can contain tables, views, indexes, and other objects.

**Tables:** Tables are like spreadsheets where data is stored. Each table consists of rows and columns. Rows represent individual records, and columns represent attributes or fields of those records.

**Data Types:** SQL supports various data types such as integers, strings, dates, and more. You specify the data type when creating a table to define what type of data can be stored in each column.

**SQL Statements:** Here are main SQL statements listed below:

SELECT: Used to retrieve data from one or more tables.
INSERT: Used to add new data into a table.
UPDATE: Used to modify existing data in a table.
DELETE: Used to remove data from a table.

**Primary Key:** A primary key is a unique identifier for each record in a table. Example: Emp_ID can be Primary Key for EMPLOYEE table.

**Foreign Key:** A foreign key is a column or set of columns in one table that refers to the primary key in another table. It establishes relationships between tables.

**Indexes:** Indexes are data structures used to improve the speed of data retrieval operations on a table. They are often created on columns that are frequently used in WHERE clauses.

**Normalization:** Normalization is the process of organizing data in a database to eliminate redundancy and improve data integrity. It involves breaking down tables into smaller, related tables.

**Joins:** SQL allows you to combine data from multiple tables using JOIN operations. Common types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.

**WHERE Clause:** The WHERE clause is used in SELECT, UPDATE, and DELETE statements to filter rows based on specific conditions.

**ORDER BY Clause:** The ORDER BY clause is used to sort the result set in ascending or descending order based on one or more columns.

**GROUP BY Clause:** GROUP BY clause is used with aggregate functions (e.g., SUM, COUNT, AVG) to group rows that share the same values in one or more columns.

**Aggregate Functions:** Functions like SUM, COUNT, AVG, MIN, and MAX to perform calculations on groups of rows.

**Transactions:** A transaction is a sequence of one or more SQL statements to perform some task. Transactions ensure data consistency and integrity.

**Views:** Views are virtual tables created by querying one or more tables. They can simplify complex queries and provide an abstracted view of the data.

References:
[SQL Tutorial](https://www.tutorialspoint.com/sql/index.htm)
[SQL Courses](https://www.tutorialspoint.com/categories/sql)