teleren/devto huggingface dataset:
Aggregate Functions
Tags: opengauss
Published: 2023-03-29 07:42:32

sum(expression)

Description: Specifies the sum of expressions across all input values.

Return type:

Generally, it is the same as the argument data type. In the following cases, type conversion occurs:

BIGINT for SMALLINT or INT arguments
NUMBER for BIGINT arguments
DOUBLE PRECISION for floating-point arguments
Example:

```
openGauss=# SELECT SUM(amount) FROM customer_t1;
  sum
-------
 14200
(1 row)
```
max(expression)

Description: Specifies the maximum value of expressions across all input values.

Parameter type: any array, numeric, string, date/time type, or IPv4 and IPv6 addresses (INET and CIDR data types)

Return type: same as the argument data type

Example: 

```
openGauss=# SELECT MAX (c_customer_sk) FROM customer_t1;
 max
------
 9976
(1 row)
```
min(expression)

Description: Specifies the minimum value of expressions across all input values.

Parameter type: any array, numeric, string, date/time type, or IPv4 and IPv6 addresses (INET and CIDR data types)

Return type: same as the argument data type

Example:

```
openGauss=#  SELECT MIN (c_customer_sk) FROM customer_t1;
min
------
 3869
(1 row)
```
avg(expression)

Description: Specifies the average (arithmetic mean) of all input values.

Return type:

NUMBER for any integer-type argument.

DOUBLE PRECISION for floating-point arguments.

Otherwise, it is the same as the argument data type.

Example:

```
openGauss=# SELECT AVG(AMOUNT) FROM customer_t1;
          avg
-----------------------
 2366.6666666666666667
(1 row)
```
count(expression)

Description: Specifies the number of input rows for which the value of the expression is NULL.

Return type: BIGINT

Example:

```
openGauss=# SELECT COUNT(c_customer_id) FROM customer_t1;
 count
-------
     7
(1 row)
count(*)
```

Description: Returns the number of input rows.

Return type: BIGINT

Example:

openGauss=# SELECT COUNT(*) FROM customer_t1;
count
-------
     8
(1 row)

delta

Description: Returns the difference between the current row and the previous row.

Parameter: numeric

Return type: numeric

mode() within group (order by value anyelement)

Description: Returns the value with the highest occurrence frequency in a column. If multiple values have the same frequency, the smallest value is returned. The sorting mode is the same as the default sorting mode of the column type. value is an input parameter and can be of any type.

Return type: same as the argument data type

Example:

""
openGauss=# select mode() within group (order by value) from (values(1, 'a'), (2, 'b'), (2, 'c')) v(value, tag);
 mode
------
    2
(1 row)
openGauss=# select mode() within group (order by tag) from (values(1, 'a'), (2, 'b'), (2, 'c')) v(value, tag);
 mode
------
 a
(1 row)
Previous
React Hooks and Lifecycle Methods
Tags: react, reacthooks
Published: 2023-03-29 09:19:16

---
title: React Hooks and Lifecycle Methods
published: true
description: React State and Lifecycle are very useful methods and with the advancement of React hooks and when a developer uses hooks instead of traditional React classes the most important question becomes how one is gonna implement the lifecycle methods offered by React classes in Hooks. We will look after the Hooks implementation of various lifecycle methods in this blog.
tags: react, reactjs, reacthooks
canonical_url: https://onlyoneaman.com/pensieve/react-hooks-lifecycle-methods
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-03-28 16:11 +0000
---

React State and Lifecycle are very useful methods and with the advancement of React hooks and when a developer uses hooks instead of traditional React classes the most important question becomes how one is gonna implement the lifecycle methods offered by React classes in Hooks. We will look after the Hooks implementation of various lifecycle methods in this blog.

If you are new to state and lifecycle, Have a look at the official docs.
[React State and Lifecycle](https://reactjs.org/docs/state-and-lifecycle.html). Briefly, these are the methods which can be useful if you wanna execute a function when a component is mounted or unmounted or at every render of the component.

But we cannot use any of the existing lifecycle methods (componentDidMount, componentDidUpdate, componentWillUnmount etc.) in a hook. They can only be used in class components. And with Hooks, you can only use in functional components. The line below comes from the React doc:

> # _If you’re familiar with React class lifecycle methods, you can think of useEffect Hook as componentDidMount, componentDidUpdate, and componentWillUnmount combined._

suggest is, you can mimic these lifecycle methods from a class component in a functional component.

## ComponentDidMount

Code inside **componentDidMount** runs once when the component is mounted. useEffect hook equivalent for this behaviour is

    useEffect(() => {
      // Your code here
    }, []);

> Notice the second parameter here (empty array). This will run only once.

## ComponentDidUpdate

Without the second parameter the useEffect hook will be called on every render of the component.

    useEffect(() => {
      // Your code here
    });

## ComponentWillUnmount

componentWillUnmount is used for cleanup (like removing event listeners, cancel the timer etc). Say you are adding an event listener in componentDidMount and removing it in componentWillUnmount as below.

    componentDidMount() {
      window.addEventListener('mousemove', () => {})
    }

    componentWillUnmount() {
      window.removeEventListener('mousemove', () => {})
    }

Hooks equivalent of the above code will be as follows

    useEffect(() => {
      window.addEventListener('mousemove', () => {});

      // returned function will be called on component unmount
      return () => {
        window.removeEventListener('mousemove', () => {})
      }
    }, [])

Hope this was helpful 😄
Comparing Email Protocols Benefits and Drawbacks of Two Common Options
Tags: pop, imap
Published: 2023-03-29 09:18:42

In today's digital world, email has become one of the most commonly used modes of communication for personal and professional purposes. With the increasing use of email, it's important to understand the different email protocols available and their respective benefits and drawbacks. In this article, we will compare two of the most commonly used email protocols: [POP and IMAP.](https://www.tvisha.com/blog/pop-and-imap)

POP3 (Post Office Protocol version 3) is an email protocol that has been in use since the early days of email. POP3 works by downloading emails from a mail server to the user's device, and then deleting them from the server. This means that once an email is downloaded, it is only available on the user's device and cannot be accessed from another device. POP3 is widely supported by email clients and is easy to set up.

One of the major benefits of POP3 is that it is fast and efficient. Since emails are downloaded to the user's device, they can be accessed quickly and easily. Additionally, since emails are deleted from the server once they are downloaded, users don't need to worry about exceeding their email storage limit on the server.

However, there are some drawbacks to using POP3. Since emails are only available on the device they were downloaded to, users cannot access their emails from other devices. This can be a major drawback for people who need to access their emails on multiple devices, such as a smartphone, tablet, or desktop computer. Additionally, since emails are deleted from the server once they are downloaded, there is no backup of the user's emails in case their device is lost or stolen.
16 berufliches Vorwärtskommen: Dienen.
Tags: deutsch, career, austausch, 1min
Published: 2023-03-29 09:10:20

Moin Moin,

das Verb zu dem die Nomen _Dienst_ und _Dienstleistung_ gehören, erfährt einen Aufwärtstrend.
Ich werbe fortan dafür, dieses Wort und seine Wortgruppe, häufiger zu verwenden.
Ich schlage vor, dass wir uns bei unserer Arbeit regelmäßig folgende Frage stellen:

> „Für wen ist diese Dienstleistung zu was brauchbar oder verwendbar ?“.

Also, wem [dient↗] (https://www.dwds.de/wb/dienen#d-1-4) sie. Dies gilt auch für die einzelnen Leistungen ( ”features” ) der Dienstleistung und auch für Produkte.

Ist die Dienstleistung dienlich für den Chef? Den Profit? Den Kunden? Die Aktionäre?
Welche dieser eben genannten Ausrichtungen dient deiner Karriere ( berufliches Vorwärtskommen )?


Beste Grüße,
Mustafa
120 Scrum Master Interview Questions for IT Recruiters
Tags: interview, scrum
Published: 2023-03-29 09:04:05

If you are an IT recruiter, you will often encounter [scrum master roles](https://bluebirdinternational.com/scrum-master/). Along with evaluating resumes, it is helpful to understand the skills of IT professionals. To do this effectively, you must understand the role of a scrum master. Our previous blog post on the work of a scrum master and the following interview questions can assist you.

[Bluebird’s ](https://bluebirdinternational.com/)blog post presents interview questions to help you gain a better understanding of your candidate’s knowledge and expertise. However, you should only ask these questions if you are confident in your ability to understand the question and response and possess in-depth knowledge about the subject.

It is best to avoid attempting to demonstrate more expertise than you have. Good luck with your interviews, and we hope that this post helps you conduct more effective scrum master interviews. Let’s examine the topics and questions in more detail.

**Daily Standup Meetings**
What is the purpose of daily stand-up meetings in Scrum, and why are they essential for the team’s success? How do you ensure that every team member contributes effectively during the daily stand-up meetings? [more…](https://bluebirdinternational.com/scrum-master-interview-questions/)

**Demos**
Can you explain what a demo is in the context of Scrum? How often should demos be held during a Sprint? [more…](https://bluebirdinternational.com/scrum-master-interview-questions/)

**Retrospective**
What is the primary objective of the retrospective? Can you describe a typical retrospective meeting in a Scrum project? [more…](https://bluebirdinternational.com/scrum-master-interview-questions/)

**Backlog**
Can you explain what a product backlog is and its purpose in Scrum? How do you prioritize items in the backlog? What factors do you consider when prioritizing? [more…](https://bluebirdinternational.com/scrum-master-interview-questions/)

**Helping The Team**
How do you ensure that team members are effectively collaborating and communicating with one another? How do you identify and address conflicts within the team? [more…](https://bluebirdinternational.com/scrum-master-interview-questions/)

**Monitoring Potential Risks And Obstacles**
How do you identify potential risks and obstacles during the project? How do you prioritize identified risks and obstacles? m[ore…](https://bluebirdinternational.com/scrum-master-interview-questions/)

**Scrum Framework**
Can you explain the Scrum framework in your own words? How does Scrum differ from other Agile methodologies? [more…](https://bluebirdinternational.com/scrum-master-interview-questions/)

In summary, these interview questions can help you assess a candidate’s knowledge and experience as a scrum master. However, it is important to have in-depth knowledge about the subject to conduct a meaningful conversation. We hope this post proves valuable to you in conducting effective scrum master interviews.
基本情報 Part 02 -- 10進数から2進数への変換 ( 整数 & 少数 )
Tags: fe, binary
Published: 2023-03-29 08:56:19


## 整数の変換

0 になるまで 2 で割り続ける。
その度に出たあまりを逆から並べていく。


12 を変換する場合

1. 12/2 -> 6 ... あまり 0
1. 6/2 -> 3 ... 0
1. 3/2 -> 1 ... 1
1. 1/2 -> 0 ... 1

これを下から並べると 1100 になる。
これが　12 を二進数にした結果。

---

## 少数の変換

0 未満が 1 になるまで　2 でかけ続ける。
その度に出た整数部を順に少数部に並べていく。

0.625 を変換する場合

1. 0.625 * 2 -> 1.25 -> 整数部: 1, 少数部: 0.25
1. 0.25 * 2 -> 0.5 -> 整数部: 0, 少数部: 0.5
1. 0.5 * 2 -> 1.0 -> 整数部: 1, 少数部: 0

整数部を上から並べると 101 になる。
101 を少数第一位から並べると　0.101 になる。

これが　0.625 を 2 進数にした結果。
Meet Updated Delphi DAC with Support for RAD Studio 11 Alexandria Release 3 and Lazarus 2.2.6
Tags: delphi, dac
Published: 2023-03-29 08:49:12

Devart, a recognized vendor of world-class data connectivity solutions for various data connection technologies and frameworks, announced the latest update of [Delphi Data Access Components](https://www.devart.com/dac.html?utm_source=devto&utm_medium=referral&utm_campaign=pr_dac_29.03.2023) products. The key feature of this update is support for RAD Studio 11 Alexandria Release 3, Lazarus 2.2.6, and iOS Simulator ARM 64-bit target platform.

The latest DAC update significantly enhances compatibility with the latest development environments, and adds much-needed functions.

**The list of the database-specific features:**
*for PostgreSQL:
-support for PostgreSQL version 15.
-improved the process of getting extended fields info. 
*for NexusDB:
-support for NexusDB 4.70.01. 
-support for working with tables protected by a password.
*for MongoDB:
-support for MongoDB Atlas.
-support for DNS Seed List connection format.
*for SQLite:
-support for GUID fields stored in binary format.
-improved reading fields of the BLOB family.
*for SQL Server:
-improved compatibility with Linked Server.
-improved the GetOrderBy method behavior.
*Added the UuidWithBraces-specific option for the Connection component for ODBC. 
*Work with alias improved for InterBase and Firebird. 
*ROUND() function improved for DBF. 

To learn more about the recent release and download new products, visit: 
https://blog.devart.com/new-in-delphi-dac-support-for-rad-studio-11-alexandria-release-3-and-lazarus-2-2-6.html

**Delphi Data Access Components** allow developing multi-platform applications in Embarcadero RAD Studio, Delphi, C++Builder, Lazarus, and Free Pascal on Windows, Linux, macOS, iOS, and Android, for both 32-bit and 64-bit platforms. They are powerful tools that provide direct access to popular databases such as Oracle, Microsoft SQL Server, MySQL, InterBase, Firebird, PostgreSQL, SQLite, as well as clouds - Salesforce, FreshBooks, SugarCRM and many others. Moreover, we offer a mature ORM framework for Delphi.

**About Devart**
 
Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration, and backup solutions. The company also implements Web and Mobile development projects. 
For additional information about Devart, visit https://www.devart.com/.
💪 5 STRATEGIES TO STAY MOTIVATED AS A DEVELOPER
Published: 2023-03-29 08:49:10

As a developer , you're no stranger to the challenges and criticism that come with the territory. Whether you're facing a particularly tricky coding problem or receiving negative feedback on your work, it can be easy to lose motivation and feel discouraged. However, staying motivated is crucial to success in the field of programming. In this post, we'll explore some tips and strategies to help you stay motivated and inspired, even in the face of challenges.

💡 First and foremost, it's essential to set clear goals for yourself. Whether it's learning a new language, building a particular project, or improving your skills in a specific area, having a tangible goal in mind can help you stay focused and motivated. Make sure your goals are realistic, and track your progress along the way.

💡 Celebrate your achievements, no matter how small they may seem.
It's also important to learn from your failures. As a developer, you're bound to encounter setbacks and make mistakes. However, instead of getting discouraged, use these experiences as opportunities to learn and grow. Analyze your mistakes, figure out what you can do better next time, and keep moving forward.

💡 Another key factor in staying motivated is surrounding yourself with positive people. Seek out individuals who inspire and motivate you, and avoid those who bring you down or discourage you. Join online communities or local meetups to connect with like-minded individuals who share your passion for programming.

💡 Taking breaks is also essential to maintaining motivation and avoiding burnout. Make sure to take time for yourself, whether it's going for a walk, meditating, or simply disconnecting from work for a while. You'll come back feeling refreshed and ready to tackle whatever challenges come your way.

💡 Finally, keep learning. The field of programming is constantly evolving, and it's essential to stay up-to-date with the latest trends and technologies. Attend conferences, take online courses, or read up on the latest developments in your area of interest. The more you learn, the more inspired and motivated you'll become.

In conclusion, staying motivated as a developer is essential to achieving success in the field. By setting goals, learning from failures, surrounding yourself with positive people, taking breaks, and continuing to learn, you can stay motivated and inspired, even in the face of challenges. Keep these tips in mind as you continue on your development journey, and don't forget to celebrate your successes along the way. And if you're looking for more inspiration and guidance, consider following me for more programming tips and tricks.

Let's connect and continue learning together!

Linkedin:https://www.linkedin.com/in/andoh-francis-133aa7245/
Github Link: https://lnkd.in/dPRnV5J7

#project #work #programming #success #motivation #development #share #learning #opportunities #help #inspiration
Send background props to other component
Tags: nextjs, javascript
Published: 2023-03-29 08:45:15

Hello,
I am switching from one component to another with <Link>, but I want to send a data to the other component in the background. For example; google maps place id. When I do as below, the placeId query appears in the URL section. I just want it to show a url in the form of direct /map but I want to send the placeId to the other component in the background. Can this be done?

`<Link href={{{pathname: '/map', query: { placeId: 'test' }}}>
  Map
</Link>`
Guzzle üzerinden Proxy kullanımı
Tags: guzzle, proxy, bash
Published: 2023-03-29 08:38:04

Guzzle üzerinden Proxy kullanmak için 2 yöntem bulunmaktadır. Guzzle [kendi belgelendirme](http://docs.guzzlephp.org/en/latest/request-options.html#proxy)sinde belirttiği gibi BASH üzerinden tanımlanmış ortam değişkenlerine uyumluluk göstermektedir. Diğeri ise yazılım üzerinden proxy ayarının eklenebilmesidir. 

# Ortam değişkenleri ile proxy ayarı

Bu çalışma için sistem genelinde bash ortam değişkenlerini ekleyebilmek için **/etc/environment** dosyası içerisinde yeni satır olarak aşağıdaki satırlar eklenmelidir.

Tabi ki http ve https adresinde yer alan kullanıcı adı ve parola bilgileri ile IPADRESİ ve PORT bilgisi istenildiği şekilde düzenlenmelidir. 

```bash
export http_proxy="http://kullaniciadi:parola@IPADRESI:PORT"
export https_proxy="http://kullaniciadi:parola@IPADRESI:PORT"
```

Bu satırlar eklentikten sonra çalışan servisler etkilenmeyecektir, çünkü servisler eski ortam değişkenleri ile ayağa kalkmıştır. Dolayısıyla en kestirme çözüm işletim sisteminin yeniden başlatılması olacaktır.

# Yazılım üzerinden proxy ayarı

Bu ayar hardcoded olarak eklenmesi doğru olmayacağı için değiştirilebilir yapıda yazılımsal geliştirme gerekecektir.

Bunun için örnek bir proxy ayarı içeren kod aşağıdaki gibidir.

Tabi ki http ve https adresinde yer alan kullanıcı adı ve parola bilgileri ile IPADRESİ ve PORT bilgisi istenildiği şekilde düzenlenmelidir. 

```php
use GuzzleHttp\Client;

$client = new Client([
    "proxy" => [
        'http' => 'http://kullaniciadi:parola@IPADRESI:PORT',
        'https' => 'http://kullaniciadi:parola@IPADRESI:PORT'
    ],
    'verify' => false
]);

$response = $client->get('https://api.ornek.org/?format=json');

echo $response->getBody();
```
How to load large mp4 video as frames on canvas with konvajs
Tags: javascript, konvajs, canvas, html
Published: 2023-03-29 08:32:16

I have a angular web app. We have a canvas functionality for which we use konvajs to enable drawing capabilities on images(png, jpeg etc) loaded on canvas. Now we need to understand how can we do the drawing capabilities on video loaded on canvas. Is it possible?
Open-Source - I love it
Published: 2023-03-29 08:19:53

So, a couple of days ago I faced a problem. My OwnCloud installation, running on a Raspberry Pi, did not work any longer after the latest update. I could not upload or sync any data, anymore: Not enough space on the server! Huh?

Long story short, Problem was that OwnCloud does not officially support 32 Bit, only 64 Bit operation systems. I do run it on a Raspi 4, but only the Kernel is 64 Bit because I upgrade the running System from a previous installation on a Raspi 3.

Anyway, folks from all over the world had the same problem. Some found a quick workaround and ultimately, after only a couple of days, the good guys from OwnCloud came up with a fix, though they officially do not support 32 Bit!

I always enjoy this 'energy' when people from all over the world come together to exchange ideas, work together and produce something valuable. I don't know anyone of them, have not met them but the synergy is there, anyway. And that's always the same, not matter in what issue or pull request I am involved. May it be OwnCloud, Kubernetes, Vim or others.

It simply feels great!
How To Install WordPress Sites on a Single DigitalOcean Droplet
Published: 2023-03-29 08:00:47

To install WordPress on two domains with SSL on the same DigitalOcean droplet using PuTTY, follow these steps:

##Step 1: Log in to your DigitalOcean account

Log in to your DigitalOcean account at https://cloud.digitalocean.com. If you don't have a droplet yet, create one with Ubuntu 20.04 LTS as the operating system. You'll need the droplet's IP address and password.

##Step 2: Connect to the droplet via PuTTY

    Download PuTTY (https://www.putty.org/) and install it on your computer.
    Open PuTTY and enter your droplet's IP address in the "Host Name (or IP address)" field.
    Click "Open" to initiate the SSH connection.
    Log in as "root" and enter your droplet's password when prompted.