teleren/devto huggingface dataset:
Apache AGE 1.3.0 For PostgreSQL 12 | Complete Features & Bug Fixes
Tags: apacheage, postgres
Published: 2023-04-26 16:30:12

Greetings!

Just like the last blog described the details about the release Apache AGE 1.3.0 for PostgreSQL 13, this one's gonna list the features and fixes for AGE 1.3.0 for PostgreSQL 12.

Following is a list of al the features and bug fixes for this release. (The number following hash **'#'** is the key to the issue number on the github repository, the link for which is provided at the end.)

Implement CALL ...[YIELD] for cypher functions. (#630)
Graph names with the empty string '' are no longer allowed. (#251)
Fix typos at multiple locations. (#470)
Fix Bug with CALL... [YIELD], clause ignores WHERE.
Fix EXPLAIN to allow for nested cypher commands.
Fix delete_global_graphs and add regression tests. (#336)
Invalid labels now return NULL.
Update CONTRIBUTING.md (#348)
Fix null pointer on name compare. (#376)
Fix Travis CI warning messages.
Additional regression tests added for age_global_graph. (#341)
Readme Added for AGE-JDBC-Driver. (#383)
Updated volatility categories for many functions.
Fix issue 339 - entities in WHERE clause have wrong Expr. (#391)
Create complete graph function. (#342) (#662)
Fix issue 317: Graph naming convention. (#349)
Update SET clause to support assigning a map to a variable. (#468)
Patch to address PR 203 that appears to be inactive. (#671)
Add additional comments for create_graph function. (#582)
Optimize age_exists function. (#586)
Implement plus-equal operator in SET clause. (#638)
Implement CI test for python driver. (#587)
Move from travis CI to github actions for build. (#673)
Update all driver CIs to Github actions.
Fix build warnings.
Updated Readme for drivers folder. (#642)
Remove async from function definitions. (#680)
Barbell graph generation (#648) and Barbell regress tests. (#708)
Update Python Driver ANTLR 4.9.3 -> 4.11.1 (#706)
Fix WITH ignoring WHERE clause. (#646)
Implement isEmpty() predicate function. (#710)
Fix cypher function input argument checks. (#718)
Fix Issue 693 - server termination from return exists(path). (#721)
Update regression tests for cypher_with. (#725)
Fix issue 733 - create_complete_graph() terminates the server. (#734)
Prevent MATCH from following OPTIONAL MATCH. (#740)
Fix property constraints against resolved variables. (#724) (#751) (#701)
(#747)
Include invalid labels in reused variables. (#751) (#762)
Fix update_entity_tuple to use correct CommandId. (#769)
Remove check for scalar agtypes in unwind. (#736)
Update PG12 CI workflows. (#776)
Update readme and version for python driver. (#780)
Update README.md

So that's all the features for this release and that's all for now.

https://age.apache.org/
https://github.com/apache/age

GoodBye!
The Intriguing Issue of 429 Errors in Cloud Infrastructure
Tags: 429, kubernetes, cloudflare
Published: 2023-04-26 16:29:04

In the realm of cloud infrastructure, unexpected challenges may arise, leading to complex problem-solving scenarios. One such instance occurred in Calendar.dev's Kubernetes deployment, where a peculiar bug caused 429 errors (too many requests) from DigitalOcean's API. This article details the investigative process and shares valuable insights for both learning and amusement.

Upon deploying Calendar.dev via CI/CD, 429 errors were received from DigitalOcean's API, implying over 250 requests per minute. Despite confidence in making fewer requests during deployment, DigitalOcean representatives insisted otherwise. In search of a resolution, the number of replicaSets was reduced, but even with just one, an image pull error emerged from Kubernetes. A careful count revealed no more than 10 requests made to DigitalOcean within a 10-minute window, leaving the situation perplexing.

Further investigation revealed that the rate limit error stemmed from domain checking. The primary issue was traced to a recent domain change to calendar.dev. An outdated Kubernetes (k8s) cert-manager had not been updated to refresh the HTTPS certificate after the domain switch. Consequently, cert-manager attempted to provision new certificates but failed to validate the domain, as it was incorrectly pointing to the external load balancer IP.

DNS was initially dismissed as a potential problem, considering that the SSL certificate functioned without issue, and the error only surfaced when altering the number of replicaSets. The absence of an invalid SSL certificate warning was attributed to Cloudflare, which automatically provided an SSL certificate when recently added to the mix. Unaware of this automatic provisioning, cert-manager continued to run, leading to an unintended overlap of SSL certificates.

In summary, each production deployment was met with 429 errors as Kubernetes attempted to spin up new pods. The excessive API requests to DigitalOcean were a result of Kubernetes trying to renew an improperly configured SSL certificate pointing to the incorrect domain. The lack of a visible error, caused by Cloudflare's automatic SSL certificate provision, masked the issue.

In hindsight, the DNS problem was difficult to identify without any apparent DNS issues, and the focus was directed toward potential Kubernetes configuration mistakes. This was an interesting experience and underscores the importance of understanding interactions between cloud infrastructure components, such as Cloudflare and SSL certificates, to prevent similar challenges. 

There's an old saying:
No, it is not a compiler error. It is never a compiler error.
When you're at your wits end trying to solve a bug you can often assume the worst which can stop you from exploring other areas and just saying "what if".
Pattern Matching In Apache AGE
Tags: apacheage
Published: 2023-04-26 16:25:49

Pattern matching is one of the most fundamental operation in a database system. It has numerous use cases like validating form submissions, performing search and replace operations, cleaning and standardizing data, and searching for specific patterns in a database.
Functions provided by Apache AGE for this are as follows:

## Starts With
Performs case-sensitive prefix searching on strings.

```
SELECT * FROM cypher('graph_name', $$
	MATCH (v:Person)
	WHERE v.name STARTS WITH "J"
	RETURN v.name
$$) AS (names agtype);
```
## Contains
Performs case-sensitive inclusion searching in strings.

```
SELECT * FROM cypher('graph_name', $$
	MATCH (v:Person)
	WHERE v.name CONTAINS "o"
	RETURN v.name
$$) AS (names agtype);
```
## Ends With
Performs case-sensitive suffix searching on strings.

```
SELECT * FROM cypher('graph_name', $$
	MATCH (v:Person)
	WHERE v.name ENDS WITH "n"
	RETURN v.name
$$) AS (names agtype);

```
## Regular Expressions
Regex or regular expressions are special sequences used to find or match patterns in strings. AGE supports the use of POSIX regular expressions using the =~ operator.
Example:

```
SELECT * FROM cypher('graph_name', $$
	MATCH (v:Person)
	WHERE v.name =~ '(?i)JoHn'
	RETURN v.name
$$) AS (names agtype);
```
We can provide any regular expression after ~= and it will search for the strings that matches that expression.

The special characters used in regex include the backslash , the caret ^, the dollar sign $, the period or dot ., the vertical bar or pipe symbol |, the question mark ?, the asterisk or star *, the plus sign +, the opening parenthesis (, the closing parenthesis ), the opening square bracket [, and the opening curly brace {. These special characters are often called “metacharacters”.

The backslash \ is used to escape metacharacters so they can be treated as literal characters. The caret ^ is used to match the start of a string. The dollar sign $ is used to match the end of a string. The period or dot . is used to match any character except newline. The vertical bar or pipe symbol | is used to match either/or. The question mark ? is used to match zero or one of the preceding character. The asterisk or star * is used to match zero or more of the preceding character. The plus sign + is used to match one or more of the preceding character. The opening parenthesis ( and closing parenthesis ) are used for grouping. The opening square bracket [ and closing square bracket ] are used for character classes. The opening curly brace { and closing curly brace } are used for quantifiers.
Mishary Rashid Alafasy
Tags: kuwaitiqari
Published: 2023-04-26 16:19:08


Juz 1 ⇨ http://j.mp/2b8SiNO
Juz 2 ⇨ http://j.mp/2b8RJmQ
Juz 3 ⇨ http://j.mp/2bFSrtF
Juz 4 ⇨ http://j.mp/2b8SXi3
Juz 5 ⇨ http://j.mp/2b8RZm3
Juz 6 ⇨ http://j.mp/28MBohs
Juz 7 ⇨ http://j.mp/2bFRIZC
Juz 8 ⇨ http://j.mp/2bufF7o
Juz 9 ⇨ http://j.mp/2byr1bu
Juz 10 ⇨ http://j.mp/2bHfyUH
Juz 11 ⇨ http://j.mp/2bHf80y
Juz 12 ⇨ http://j.mp/2bWnTby
Juz 13 ⇨ http://j.mp/2bFTiKQ
Juz 14 ⇨ http://j.mp/2b8SUTA
Juz 15 ⇨ http://j.mp/2bFRQIM
Juz 16 ⇨ http://j.mp/2b8SegG
Juz 17 ⇨ http://j.mp/2brHsFz
Juz 18 ⇨ http://j.mp/2b8SCfc
Juz 19 ⇨ http://j.mp/2bFSq95
Juz 20 ⇨ http://j.mp/2brI1zc
Juz 21 ⇨ http://j.mp/2b8VcBO
Juz 22 ⇨ http://j.mp/2bFRxNP
Juz 23 ⇨ http://j.mp/2brItxm
Juz 24 ⇨ http://j.mp/2brHKw5
Juz 25 ⇨ http://j.mp/2brImlf
Juz 26 ⇨ http://j.mp/2bFRHF2
Juz 27 ⇨ http://j.mp/2bFRXno
Juz 28 ⇨ http://j.mp/2brI3ai
Juz 29 ⇨ http://j.mp/2bFRyBF
Juz 30 ⇨ http://j.mp/2bFREcc
Design Patterns and Their Benefits
Tags: designpatterns, architecture, webdev, programming
Published: 2023-04-26 16:09:36

Design patterns are reusable solutions to common software design problems. They provide a way for software developers to solve common problems in a consistent and efficient way, without having to reinvent the wheel every time.

**Benefits of using Design Patterns =>**
• **Reusability**: Avoid reinventing the wheel each time.

• **Scalability**: Design flexible and adaptable software.

• **Maintainability**: Easier to modify and debug code.

• **Standardization**: Common vocabulary and structure across different projects.

• **Collaboration**: Easier for multiple developers to work on the same codebase.

**Some commonly used design patterns =>**
• **Strategy Pattern**: The strategy pattern is used to define a family of algorithms, encapsulate each one, and make them interchangeable.

For example, imagine you have a game with different character types, each with their own unique abilities. The strategy pattern would allow you to define a set of strategies (i.e., algorithms) for each character type, and then easily switch between them as needed.

• **Observer Pattern**: The observer pattern is used to notify objects when there is a change in another object.

For example, imagine you have a weather app that needs to notify its users when the temperature changes. The observer pattern would allow you to define a set of observers (i.e., the users), and then notify them when the temperature changes.

• **Decorator Pattern**: The decorator pattern is used to add functionality to an object dynamically, without changing its original structure.

For example, imagine you have a car and you want to add a GPS navigation system to it. The decorator pattern would allow you to add the GPS system without having to modify the car itself.

• **Command Pattern**: The command pattern is used to encapsulate a request as an object, allowing it to be stored, passed around, and executed at a later time.

For example, imagine you have a home automation system that allows you to control your lights, thermostat, and other devices. The command pattern would allow you to encapsulate each command (e.g., turn on the lights), store it as an object, and execute it later.

• **Factory Pattern**: The factory pattern is used to create objects without exposing the creation logic to the client.

For example, imagine you have a game with different levels, each with their own set of enemies. The factory pattern would allow you to create the enemies for each level without exposing the creation logic to the client.

• **Composite Pattern**: The composite pattern is used to create a tree-like structure of objects, where individual objects and groups of objects are treated the same way.

For example, imagine you have a file system, where files and directories are treated the same way. The composite pattern would allow you to treat individual files and directories as the same type of object, and create a tree-like structure of the entire file system.
Top 9 Database Types You Must Know in 2023!
Tags: database, datascience, azure, clouddatabase
Published: 2023-04-26 16:06:07

Top 9 Database Types You MUST Know in 2023!

𝗥𝗲𝗹𝗮𝘁𝗶𝗼𝗻𝗮𝗹 𝗗𝗮𝘁𝗮𝗯𝗮𝘀𝗲𝘀: The popular kid! Organizes data into neat tables with a predefined schema (think: Excel spreadsheets). Perfect for your local library's book catalog. 

𝗡𝗼𝗦𝗤𝗟 𝗗𝗮𝘁𝗮𝗯𝗮𝘀𝗲𝘀: The rule-breaker! Doesn't stick to a fixed schema and can handle all sorts of unstructured data. Imagine a digital treasure chest for your social media posts! 

𝗢𝗯𝗷𝗲𝗰𝘁-𝗢𝗿𝗶𝗲𝗻𝘁𝗲𝗱 𝗗𝗮𝘁𝗮𝗯𝗮𝘀𝗲𝘀: The developer's BFF! Stores data in objects (like an organized closet), making them perfect for software development. Picture a virtual wardrobe app! 

𝗚𝗿𝗮𝗽𝗵 𝗗𝗮𝘁𝗮𝗯𝗮𝘀𝗲𝘀: The relationship guru! Uses nodes and edges to represent data, ideal for complex connections. Think: a dating app that finds your perfect match! 

𝗧𝗶𝗺𝗲-𝗦𝗲𝗿𝗶𝗲𝘀 𝗗𝗮𝘁𝗮𝗯𝗮𝘀𝗲𝘀: The time-traveling hero! Designed to handle loads of time-stamped data, like IoT sensor data or financial transactions. Picture a smart thermostat tracking temperature changes. 

𝗖𝗼𝗹𝘂𝗺𝗻𝗮𝗿 𝗗𝗮𝘁𝗮𝗯𝗮𝘀𝗲𝘀: The analytical genius! Optimized for read-heavy operations and large-scale analytics. Imagine a sports stats platform that crunches data lightning fast! 

𝗡𝗲𝘄𝗦𝗤𝗟 𝗗𝗮𝘁𝗮𝗯𝗮𝘀𝗲𝘀: The hybrid mastermind! Combines the best of both worlds: the scalability of NoSQL and the ACID compliance of traditional relational databases. Think of it as a powerhouse for handling high transaction rates with consistency. 

Each database type has its unique superpowers (and weaknesses)! Understanding these differences is essential when selecting the perfect database for your project.
Binary search
Tags: computerscience, algorithms, binary, search
Published: 2023-04-26 16:04:37

**Binary search** is commonly used technique in computer science.

Using this technique you can **find element** in **sorted array** in `O(log n)` time complexity.

Below is my implementation of this **algorithm**.

```js
const binarySearchArr = (arr, target) => {
  let [a, b] = [0, arr.length];
  let lm;
  while (b - a > 0) {
    const mid = (a + b) / 2 | 0;
    const val = arr[mid];
    if (target < val) {
      b = mid;
    } else if (val < target) {
      a = mid;
    } else {
      return mid;
    }
    if (lm === mid) break;
    lm = mid;
  }
  return -1;
};
```

With this function we can very easily solve [Search a 2D Matrix](https://leetcode.com/problems/search-a-2d-matrix) task on LeetCode.

Only thing we need yet is converting matrix to array or representing it as array which I implemented using **Proxy**.

```js
const matrixAsArray = matrix => {
  const [h, w] = [matrix.length, matrix[0].length];
  return new Proxy([], {
    get(target, prop, receiver) {
      if (prop === 'length') return h * w;
      const idx = +prop;
      const col = idx % w;
      const row = (idx - col) / w;
      return matrix[row][col];
    }
  });
};
```

With these two functions **solving** this task is now trivial as you can see below.

```js
const searchMatrix = (matrix, target) => {
  const arr = matrixAsArray(matrix);
  return binarySearchArr(arr, target) !== -1;
};
```

You can play with this code on [Instacode.app](https://instacode.app/run/FDDGHsDsGcBcAIBGBLSBDATgTwMoFNNQALAQQw3gF54AKTDAGnlkwHM9YBKKgPngG9g8eABsO8ANpomiALpVJABib0AdGMitYRWQG4ho8SIC2+4QHciyMbUTwAtPDTw+i7oOHCIMBMeQATBTp4AGokbgB6eAAmeAAfeEUzT284eAA3NBEFegk-fz0DYWQAM1oWDHYEAB4MrPcizztqfOThAF94PBFoPHhS2kzs2oqqhs9PZxaAtvhO7t6BRuEMDgBXDEh4Vsb2xoGaEypKaf9uRFW0AGtZo9PkvZX1zYcARn12-TAoNOM0WAwyAAHiRoGQMGgsAo-gDgbwll4fggJEQmOZ5NQ8v9AUD1HhNNomDCcRJFLI8QSdMlVrANltIHhzPAAAoYcBArA0CSyJgeTxVGijDhMAAObJFTFWoDwyHSeAw4wm-TKNDF4BFx2oAHINFoiFruDS6fAiPAAFTwcyzRE+fr+IEKEJqkXW+CpBAQbLUAIOgCkltd7vgbKZ1BoPocbvAIkiAeWweeW2JwIkIdkEk9hQmjzmnA+XyDvUIRAAsti4WHk0CmEKuPC+UH6NDyyCweRITQq3mDEaXih0Nh8MXwXRyDW2BxuABCE5vfMgYBFjDEMuwoFciSvBgAZgYAFYGAB2Hmb5SvLevABsDGiZIYEmiu+3ym3ABYGJeyTz4K9t92lyuLYbluu4Hse96vGeF7XreJ6PjuL7vp+sjfo+3YgEAA)

I also added both of these functions [binarySearchArr](https://github.com/gkucmierz/utils/commit/8df0181aead4e2fa88b52ab174d94b92d2698a98) and [matrixAsArray](https://github.com/gkucmierz/utils/commit/b505d4354f53486e60c71d08bde05786c238107b) in my [JavaScript Utils](https://www.npmjs.com/package/@gkucmierz/utils) collection.
How to make lifelong learning a habit. Step 1: Be curious
Tags: career, productivity, codenewbie
Published: 2023-04-26 15:52:19

I wanted to highlight this comment, which says it all really well.

{% embed https://dev.to/rainleander/comment/2676e %}

For a whole list of different perspectives, check out the whole conversation:

{% embed https://dev.to/codenewbieteam/how-do-you-make-lifelong-learning-a-habit-49dm %}
Apache AGE 1.3.0 | Complete Features & Bug Fixes
Tags: apacheage, postgres
Published: 2023-04-26 15:38:10

Hi Guyz!

Welcome back to the Apache AGE 1.3.0 series. This blog contains a comprehensive list of all the features and bug fixes incorporated in the latest release of AGE.

So let's get on with it. Here's the list: (The numbers following the hash **'#'** sign are the issue numbers that were solved from the github repository. Link given at the end.)

 Implement CALL ...[YIELD] for cypher functions. (#630)
    Graph names with the empty string '' are disallowed. (#251)
    Fix typos at multiple locations. (#470)
    Fix Bug with CALL... [YIELD], clause ignores WHERE.
    Fix EXPLAIN to allow for nested cypher commands.
    Fix delete_global_graphs and add regression tests. (#336)
    Invalid labels now return NULL.
    Update CONTRIBUTING.md (#348)
    Fix null pointer on name compare. (#376)
    Fix Travis CI warning messages.
    Additional regression tests added for age_global_graph. (#341)
    Readme Added for AGE-JDBC-Driver. (#383)
    Updated volatility categories for many functions.
    Fix issue 339 - entities in WHERE clause have wrong Expr. (#391)
    Create complete graph function. (#342) (#662)
    Fix issue 317: Graph naming convention. (#349)
    Update SET clause to support assigning a map to a variable. (#468)
    Patch to address PR 203 that appears to be inactive. (#671)
    Add additional comments for create_graph function. (#582)
    Optimize age_exists function. (#586)
    Implement plus-equal operator in SET clause. (#638)
    Implement CI test for python driver. (#587)
    Move from travis CI to github actions for build. (#673)
    Update all driver CIs to Github actions.
    Fix build warnings. (#709)
    Updated Readme for drivers folder. (#642)
    Removed async from function definitions. (#680)
    Barbell graph generation (#648) and Barbell regress tests. (#708)
    Updated Python Driver ANTLR 4.9.3 -> 4.11.1 (#706)
    Fix WITH ignoring WHERE clause. (#646)
    Implement isEmpty() predicate function. (#710)
    Fix cypher function input argument checks. (#718)
    Fix Issue 693 - server termination from return exists(path). (#721)
    Update regression tests for cypher_with. (#725)
    Fix issue 733 - create_complete_graph() terminates the server. (#734)
    Prevent MATCH from following OPTIONAL MATCH. (#740)
    Fix property constraints against resolved variables. (#724) (#751)
(#701) (#747)
    Include invalid labels in reused variables. (#751) (#762)
    Fix update_entity_tuple to use correct CommandId. (#769)
    Remove check for scalar agtypes in unwind. (#736)
    Update PG13 CI workflows. (#775)
    Update readme and version for python driver. (#780)
    Update README.md


So that's all for this release. In the next blog, we are going to discuss AGE 1.3.0 release for PostgreSQL 12.

https://age.apache.org/
https://github.com/apache/age

Stay Tuned!
It's Not About Your Tech Stack: Why Solving Problems Matters More
Tags: javascript, programming, productivity, devops
Published: 2023-04-26 15:24:59

Are you obsessed with your tech stack? Do you proudly list all the languages, frameworks, and tools you use on your LinkedIn profile or resume? Do you think that your tech stack is what sets you apart from other developers, engineers, or entrepreneurs?

Well, I hate to break it to you, but nobody cares about your tech stack. Yes, you read that right. Nobody outside your tech bubble cares about whether you use React or Vue, AWS or GCP, Python or Java. Nobody hires you, invests in you, or buys from you because of your tech stack.

What people care about is solving their problems. Whether it's a customer who wants to buy a product, a manager who wants to optimize a process, or a user who wants to enjoy a service, they all have problems that they want to solve. They don't care about the underlying technology as long as it helps them solve their problems.

That's why you should focus on problem-solving, not tech stack bragging. Instead of showcasing your tech stack, showcase your problem-solving skills. Talk about how you have identified, analyzed, and solved complex problems in your previous projects or jobs. Show how you have listened to your customers, users, or stakeholders, and delivered value to them. Demonstrate how you have adapted to changing requirements, constraints, or feedback, and iterated until you achieved the desired outcomes.

When you emphasize problem-solving over tech stack, you also show that you are customer-centric, outcome-driven, and agile. You show that you understand the purpose of technology is not to impress others with your skills, but to empower them with solutions. You show that you can work with diverse teams, domains, and cultures, and that you can communicate effectively with both technical and non-technical stakeholders.

So, the next time you update your LinkedIn profile or resume, think twice before you list your tech stack. Instead, think about the problems you have solved and the impact you have created. That's what truly matters.