teleren/devto huggingface dataset:
Select transactions
Tags: sql, oracle
Published: 2023-09-22 05:36:45

(Trying to format query below but its not working)

Hello!

In Oracle DB there is created a view to check Money Transactions (with columns like id, receiver, sender, date, amount etc.) which contains 10 tables connected to each other. So, we have query selecting by quantity of transactions in given time period:

`SELECT *
  FROM view_transactions
 WHERE     TRUNC (datedoc) >= DATE ('01/01/2023', 'dd/mm/yyyy')
       AND TRUNC (datedoc) <= DATE ('29/01/2023', 'dd/mm/yyyy')
       AND receiver IN
               (SELECT receiver
                  FROM (SELECT COUNT (receiver) counter, receiver
                          FROM view_transactions
                         WHERE     TRUNC (datedoc) >=
                                       DATE ('01/01/2023', 'dd/mm/yyyy')
                               AND TRUNC (datedoc) <=
                                       DATE ('29/01/2023', 'dd/mm/yyyy')
                              
                        GROUP BY receiver)
                 WHERE counter >= 13)
ORDER BY id`

Here number `13`, it says to display the `receivers` who received money more than `13 times` in the period of the month.

And now I have to make this query more diffficult. Also need search for the `senders` who send more than `3 or more times` for that `receivers` who received money 13 times. If `senders` meet `3 or more times`, so need to `group receiver` and `sum amount`.

Example, this months Bill got 15 times money transactions from different senders, and he received from Dell 5 times with amount of 120$, 250$, 312$, 500$ and 50$. John and Michael sent to Bill by 2 times each. 
So need to display:

 **receiver**      **sender**     **sum**
- Bill          Dell       1232
- Bill          John       some summa
- Bill          Michael    some summa

Could anyone help to do this?
Git Repo Specific Keys
Tags: git, key, ssh
Published: 2023-09-22 05:36:10

Managing different identities can be difficult with git. One of the ways to make this easy is by configuring the keys specific to the repo in the repo itself:

``` zsh
git config --local user.name "John Doe"
git config --local user.email "john@doe.com"
git config --local core.sshCommand "ssh -i ~/custom/location/id_rsa"
```

This will be stored in the repo’s git config file `.git/config`:

``` zsh
[user]
        name = John Doe
        email = john@doe.com

[core]
        sshCommand = "ssh -i ~/custom/location/id_rsa"

```

Similarly, to clone a repo with a different identity or the default key, there is a easily forgettable one liner:

``` zsh
git clone -c "core.sshCommand=ssh -i <key_path>" git@github.com:<user>/<repo>.git
```

This is one of those things, that you don't need daily but  super hard to find when you need it. Hence the post!

Since we are here, if you are wondering how to create a new identity for git, its fairly easy:

``` zsh
ssh-keygen -t ed25519 -f ~/.ssh/abc -q -C '' -N ''
```

Thats all for today! :)
Testing Techniques
Published: 2023-09-22 05:28:23

## **Boundary value testing**
   Tests the software at the boundaries of input values to identify any defects.
Boundary Analysis testing is used when practically it is impossible to test a large pool of test cases individually
Two techniques - Boundary value analysis and equivalence partitioning testing techniques are used
In Equivalence Partitioning, first, you divide a set of test condition into a partition that can be considered.

## **Decision table testing**

Decision table testing is a software testing technique used to test system behavior for different input combinations. This is a systematic approach where the different input combinations and their corresponding system behavior are captured in a tabular form. That is why it is also called as a Cause-Effect table where Cause and effects are captured for better test coverage.

## **Use case testing**

use case testing is a type of black box testing that helps in identifying test cases that cover the entire system transaction-by-transaction from start to finish. It is a description of how a specific user uses the system. This method is widely used in developing tests at systems or acceptance levels.

## **LCSAJ testing**

LCSAJ stands for Linear Code Sequence and Jump. LCSAJ testing is a white-box testing methodology used to determine the code coverage, i.e., what percentage of the code is executed with the existing test cases. It helps in designing new test cases, which can increase the coverage of the code under test. Once the code coverage reaches a certain level, we can stop the testing. Hence, LCSAJ methodology also helps in determining when to stop the testing of a software.
Laravel 10 Send Mail Using Queue
Tags: laravel, php, mail, queue
Published: 2023-09-22 05:26:13

As a Laravel developer, one of the common requirements is sending emails from your application. However, processing email sending synchronously can impact the performance and responsiveness of your application, especially when dealing with large volumes of emails.

That's where Laravel's powerful feature called queues comes to the rescue. In this article, I will guide you through the process of leveraging queues in Laravel 10 to send emails asynchronously, resulting in improved performance and an enhanced user experience.

In laravel 10 send mail using a queue example we will set up the mailtrap for sending an email. Laravel queues provide a unified queueing API across a variety of different queue backends, such as Amazon SQS, Redis, or even a relational database.

Table of content:

- Install Laravel 10
- Creating a Mailable Class
- Configuration of Queue
- Create Queue Job
- Dispatching Mail Jobs to the Queue
- Processing the Queue Jobs
- Run Laravel 10 Application
- Conclusion
Temp table in SQL Server
Tags: sql, sqlserver, microsoft, ssms
Published: 2023-09-22 04:55:40

**What is temp table in SQL Server?**

In SQL Server, a temporary table is a table that is created and exists only for the duration of a database session or a specific batch of SQL statements. Temporary tables are typically used to store intermediate results, perform complex data manipulations, or break down a complex query into simpler steps.

**There are two types of temporary tables in SQL Server:**

1. _**Local Temporary Tables:**_ These tables are prefixed with a single "#" symbol and are visible only within the current session. They are automatically dropped when the session that created them ends or when the batch of SQL statements completes.

**Example:**
```
CREATE TABLE #TempTable (
ID INT,
Name VARCHAR(50)
);
```

2. Global Temporary Tables: These tables are prefixed with a double "##" symbol and are visible across multiple sessions. They persist until all sessions that have referenced them are closed.

**Example:**
```
CREATE TABLE ##GlobalTempTable (
ID INT,
Name VARCHAR(50)
);
```

Temporary tables are useful for scenarios where you need to temporarily store and manipulate data within a specific scope, without affecting the structure of your permanent tables. Once you're done with a temporary table, it's a good practice to explicitly drop it to release the associated resources.

Please note that temporary tables can be a powerful tool, but they should be used judiciously to avoid performance issues and resource contention in a multi-user database environment.
developer tools list
Tags: tooling
Published: 2023-09-22 05:08:05

- [termdown](https://github.com/trehn/termdown)
  - do not leave work in hand until countdown is running
- [taskwarrior](https://github.com/GothenburgBitFactory/taskwarrior)
  - note down all distractive thoughts in tasks-list during work, review them all after predefined time for work is over
- [google chrome](https://www.google.com/intl/en_in/chrome/) with [web site blocker]
(https://chrome.google.com/webstore/detail/web-site-blocker/aoabjfoanlljmgnohepbkimcekolejjn)
  - website blocker will help in focusing on work by blocking social media
- [vscode](https://code.visualstudio.com/) with [neovim](https://marketplace.visualstudio.com/items?itemName=asvetliakov.vscode-neovim)
  - neovim will increase code writing speed. To think clearly, a developer should be able to write code as fast as he can think
- [obsidian](https://obsidian.md/) with [excalidraw](https://excalidraw.com/)
  - excalidraw diagrams are necessary to understand and create notes for complex concepts
- [google bard](https://bard.google.com/chat)
Managing Large DataList In Solana
Tags: solana, smartcontract, web3, rust
Published: 2023-09-22 05:00:21

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

This is a continuation of my solana journey. Here I will share my experience of using solana.

## Everything is stored in Account
In solana everything is stored in account. So a program is stored in account , your wallet data is stored in account, any user data who is interacting with any program that is also stored in account. As of now i used anchor for building solana programs so I will try to explain in that perspective.

## Default Way 
The most easiest and low maintenance way is to store data in a vec<T>. In this way your account could go up to 32kb. But there is a catch, I used to calculate the space and count how many items i can push into the vec before hitting that 32kb stack size. But unfortunately i was not able to reach that count, it was failing almost in the half way with `Memory allocation failed error`. 
After many finding i came to know this is due to rust, rust doesn't allocate memory on every push, Not sure but I think they try to allocate double of the current size once you reach the current size. Although there is workarounds around for this.

## Zero Copy Account
With zero-copy account you can reach 10mb size, this is the maximum account size that solana allows. The biggest issue is you need to pre-define array length , yes array. You can't use vector in zero-copy account. As a result when creating account user will have to pay much more even though they won't use all the space.

## Splitting Account
If other two options are not suitable for you , you may consider this way. The idea is you will store every element in its own account(I am currently experimenting with this approach). On positive side , it can grow almost infinitely , only pay for one account at once. 
But management can get hard in this approach, like you will have to decide how you will generate the seed for each element, you wanna reuse the space of previously allocated unused account, etc etc.... 

Third one is more of a structural solution. But you can choose any of them based on your necessity and requirements. I am not an expert , so I would really love to hear any correction or idea. Thank You.
AWS DevOps vs. Azure DevOps: Which is better for you?
Tags: webdev, devops, aws, azure
Published: 2023-09-22 04:55:46

Both Azure and AWS DevOps are powerful and widely used platforms for managing the software product engineering lifecycle and DevOps practices.

**Azure DevOps** is a comprehensive suite of cloud-based services provided by Microsoft.

It provides a wide range of tools, systems, and services that enable individuals and companies with everything, from planning and coding to building, testing, and deploying software products.

**AWS DevOps** is an ecosystem of cloud-based services provided by Amazon Web Services (AWS).

It offers various services that are flexible and designed to let organizations streamline and automate software product development and delivery processes with agility and efficiency.

AWS DevOps has similar features to Azure DevOps, but it distinguishes itself with its own set of unique features.

For instance, AWS DevOps seamlessly integrates with various AWS-based services.

This enables DevOps engineers to set up infrastructure, monitor, and efficiently manage features and services on the AWS Cloud platform.

Read this guide if you want to learn more in detail: https://www.azilen.com/blog/azure-devops-vs-aws-devops/
Connecting with community!
Published: 2023-09-22 04:48:58

This week i've learned the importance of being engaged with the coding community! Being involved inside of the developer community can help you get access to new information and different thought processes. I Have followed some very successful developers that I can use as models, to have a good roadmap to a great career. I also came across some websites that have guides such as [David Walsh blog](https://davidwalsh.name/), id suggest checking this out for news and guides to help you out!
connecting with new people
Published: 2023-09-22 04:48:44

Becoming a new coder can be extremely challenging. One thing that could help you would be reaching out to people with more experience or creating strong connections in the community. As I was always told, you are who you hang around. Therefore, hanging out with strong software developers and high skilled individuals it is sure that you too can pick up some of there skills. This is my plan as a new coder to reach the highest level and, connect with and bond with some new people.
how do you determine which design pattern is right design for your system
Tags: designpatterns, systemdesign, codequality
Published: 2023-09-22 04:46:47


1. **Problem Understanding** - we should know the actual goal we want to achieve, what is the functionality or constraints
2. **Design Patterns Knowledge** - create a habit of reading at least one design pattern daily along with the comparison or alternative can be used [Today I am going to read the Strategy and Template Design Pattern] 
3.**Evaluate** - which one is the right fit in terms of performance, scalability, maintainability, testing and most important, extensibility
4. **Apply**
5. and last **monitor/review** - revisit it again and re-evaluate again in terms refactoring , performance or replacing with a something new.
Memory behind Postgres
Tags: apacheage, postgres, sql, beginners
Published: 2023-09-22 04:18:17

Without diving a lot into the intricacies of the underlying architecture of Postgres, we'll be looking at it from the top.

Memory architecture in Postgres is classified into two broad categories: 
1. **Local Memory Area**
2. **Shared Memory Area**

As the name suggests, the local memory area is used by backend processes for their use. While the shared memory area is shared between all the processes.

Now, let's talk about the local memory area.

## Local Memory Area
> Each backend process allocates a memory area for query processing.

These areas are further divided where their sizes are either fixed or variable. Some areas are discussed below - 

Sub-Area | Description
--- | ---
**work_mem** | The executor uses this area for sorting tuples by `ORDER BY` and `DISTINCT` operations. It also uses it for joining tables by merge-join and hash-join operations.
**maintenance_work_mem** | This parameter is used for some kinds of maintenance operations (`VACUUM`, `REINDEX`).
**temp_buffers** | The executor uses this area for storing temporary tables.

## Shared Memory Area
> A shared memory area is allocated by a PostgreSQL server when it starts up.

These areas are also further divided into various sub-sections that are further discussed below - 

Sub-Area | Description
--- | ---
**Shared buffer pool** | PostgreSQL loads pages within tables and indexes from persistent storage to a shared buffer pool, and then operates on them directly. In itself, this is a huge topic and can become very complicated if we delve into all the types and sizes of the buffers.
**WAL buffer** | PostgreSQL supports the WAL (Write ahead log) mechanism to ensure that no data is lost after a server failure. WAL data is a transaction log in PostgreSQL and the WAL buffer is a buffering area of the WAL data before writing it to a persistent storage.
**Commit log** | The commit log (CLOG) keeps the states of all transactions, and is part of the concurrency control mechanism. The commit log is allocated to the shared memory and used throughout transaction processing.

These are not the only areas where the memory is allocated, memory is allocated for the following as well - 
* Sub-areas for the various access control mechanisms
* Sub-areas for the various background processes
* Sub-areas for transaction processing, and others

This post was just a beginner-friendly way to introduce to the readers about the memory architecture of the Postgres server. Also this, in no way is complete and the following could be referred to for further reading - 
* https://www.youtube.com/watch?v=PM1rqdCavo0

Until then, thank you for your time and see ya!
make sure with Wappsure
Tags: api, software, microservices, saas
Published: 2023-09-22 04:10:29

Hello folks,

Now check your user's real-time WhatsApp presence using our API service. In **Wappsure** we provide-
1. **Single Number Validation** via API Call
2. **Bulk Number Validation** via API (**25 Numbers** in single call)
3. **Validate phone number** via API Call (Get Possible Valid Numbers)

Give it a try with free trial and let me know your feedback and suggestion.

[Click here to check](https://beoy.short.gy/sp8Bla)
Why "search icons" is magnifying glass ?
Published: 2023-09-22 02:47:11

Let's delve into the history and reasoning behind the ubiquitous association of the magnifying glass with the search function.

[Magnifying Glass:](https://icons8.com/icons/set/search) The Quintessential Emblem of Search
In the vast lexicon of visual symbols, the magnifying glass stands prominently as the emblem of inquiry, inspection, and search. But how did this object, often associated with detectives and reading fine print, become the universal icon for the digital search function?

1. Historical Connotations
The magnifying glass, for centuries, has been a tool aiding in detailed examination. Detectives in literature and cinema often employed it to scrutinize clues, emblematic of a deep dive into details. This historical association with detailed observation made it a fitting metaphor for the act of searching.

2. Visual Simplicity
From a design perspective, the magnifying glass, with its circular lens and handle, is a simple and easily recognizable shape. This clarity makes it an ideal candidate for a symbol, ensuring immediate recognition and understanding across diverse audiences.

3. Universal Understanding
Given its usage in various fields, from science to detective work, the magnifying glass has global recognition. Such universality ensures that users from different cultures and backgrounds can instantly relate to its symbolic representation in the digital realm.

4. Zoomed Focus
A magnifying glass amplifies a particular section of an object, allowing for a closer look. This act of zooming in to focus mirrors the digital search's essence: narrowing down vast amounts of information to find specific content.

5. Evolution from Physical to Digital
As early computer interfaces were developed, there was a need to borrow familiar symbols from the physical world to guide users in the digital landscape. The magnifying glass, with its rich symbolism related to search, was a natural choice to represent the search function.

6. Consistent Usage Reinforces Association
Over time, as more digital platforms and software adopted the magnifying glass as the search icon, its association with the search function strengthened. Consistent usage across interfaces solidified its place as the go-to symbol for digital inquiry.

In summation, the magnifying glass, with its historical roots in detailed examination and its visually straightforward design, found its digital calling as the search icon. Its adoption and consistent usage across digital platforms transformed it from a simple optical tool into a universal emblem of digital exploration and inquiry.
Introducing Odin Tabs: A GPT-Powered Chrome Extension for Effortless Tab Navigation 🗣️
Tags: gpt3, javascript, chatgpt, webdev
Published: 2023-09-22 02:38:20

Hey fellow devs! Ever wished you could control your browser tabs with just your voice? Look no further than Odin Tabs! 🚀

Odin Tabs is a Chrome extension that harnesses the magic of speech recognition and the mighty Large Language Model (LLM) of your choice to make tab management a breeze. 🎙️💬

## Dive into the Features 🚀

📺 **Demo Video**: Want to see it in action? Check out the [Demo Video](https://www.youtube.com/watch?v=2lvl9aD4VXw).

## Use Cases 📋🔍

Discover how Odin Tabs can revolutionize your browsing experience:

- 🌐 **Empowering Independence**: Break barriers for users with motor impairments, making online information and communication accessible to all.

- 🔀 **Maximizing Productivity**: Seamlessly switch between tabs for tasks like data analysis, research, coding, project management, online learning, and social media.

- 📺 **Seamless Media Experience**: Transform your entertainment setup by navigating browser tabs on XR headsets, smart TVs, streaming devices, and media centers with ease.


## Notes 📝🚀

- Odin Tabs requires microphone access for speech recognition.

- OpenAI API powers text generation; you'll need an API key.

- Customize this open-source extension to fit your needs.

- Be aware of potential browser and API updates affecting functionality.

## Dive Deeper

- [Explore on GitHub](https://github.com/leonid20000/Odin-Tabs): Want to get your hands dirty? Head over to our GitHub repo for all the nitty-gritty details.

## Credits 👨‍💻📚

Odin Tabs, a project by Dr. Leonit Zeynalvand, is MIT licensed. 📜🔓

## Give it a star, if you think it deserves one! 🌟

Show your support for open source by starring the project. Your star fuels further enhancements. Thanks for being part of the open source community! 🌟
Macos M2交叉编译性能差问题
Tags: rust, sip, compiling
Published: 2023-09-22 02:19:38

- 有一个现象很怪，有点常识的人都知道不合理，我发现这个问题的严重性是服务器高性能机器、我的老笔记本、办公用的mac都试过之后才意识到的；

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

- 一开始只是以为Rust为了安全就是编译慢，其实并非如此，在三台机子上都编译过，才确定Macos问题的严重性；

- 后来在各个Rust技术群都问了一遍，其中有一个群里的大佬指出了真正的问题所在：`ISP`的问题 ---> [原贴](https://catcoding.me/p/apple-perf/)；
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h6wrclna3jhqkv4v8l24.png)

- 有些人说是架构问题：ARM架构问题，我觉得这个回答就有点敷衍和偏执了，架构问题再严重，那也是苹果的M2啊，几乎当前笔记本巅峰水平了吧，能比我8年前3200买的笔记本（AMD A8）差这么多？

- 尝试了ISP的解决方案，但是依然不行，速度没有丝毫提升（重启电脑也不行）

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