teleren/devto huggingface dataset:
What is Event loop in JS (javascript)
Tags: javascript, tutorial, event, eventloop
Published: 2023-07-20 11:09:13

In JavaScript, the event loop is an essential idea that helps us do multiple things at once, without waiting for each task to finish before starting the next one. It's like having a super assistant that manages our tasks efficiently.

With the event loop, we can work on some tasks while others are happening in the background. This allows us to do things asynchronously, meaning we don't have to pause everything when one task takes longer.

Imagine you have several chores to do, like cooking, cleaning, and reading a book. Instead of doing them one after the other, the event loop lets you cook something, then pause it to do some cleaning, and later continue cooking from where you left off. It's like multitasking!

The event loop is a part of JavaScript that ensures everything runs smoothly. It takes care of managing the order in which tasks are done, handling different events like clicking a button, and making sure that special functions (callbacks) are called at the right time.

Thanks to the event loop, JavaScript can handle complex tasks efficiently, making web applications work smoothly and respond to users quickly.

Here's how the event loop works:

**Call Stack**: When your JavaScript code runs, it starts by executing the statements one by one, forming a stack of function calls. The call stack is like a stack of dishes, where the top dish is the currently executing function.

**Web APIs**: JavaScript has access to various Web APIs provided by the browser, such as `setTimeout`, `fetch`, and more. When you use these APIs for asynchronous tasks, like setting a timer with `setTimeout`, these tasks are moved to the background to be handled by the browser.

**Callback Queue**: Once an asynchronous task is completed (e.g., the timer set by `setTimeout` is finished or an API request is resolved), its callback function is placed in a queue known as the "callback queue."

**Event Loop**: The event loop constantly monitors the call stack and checks if it is empty. If the call stack is empty, it looks at the callback queue for pending callbacks.

**Dequeuing Callbacks**: If there are any pending callbacks in the callback queue, the event loop takes the first one and moves it to the call stack, ready to be executed. The callback is then processed and removed from the queue.

**Execution and Repeat**: The callback function is executed, and if there are nested functions inside, they are executed one after the other. Once the call stack becomes empty again, the event loop repeats the process, checking for more pending callbacks in the callback queue.

By using the event loop, JavaScript can handle multiple tasks concurrently, making it suitable for tasks that require waiting for responses, such as API calls or waiting for user interactions. It ensures that the browser remains responsive and doesn't get stuck on time-consuming operations, enhancing the user experience in web applications.
Quantum AI - Benefits, Reviews, Results, Price & Side Effects?
Tags: webdev, javascript, beginners, programming
Published: 2023-07-20 10:54:02

[Quantum AI](https://www.deccanherald.com/brandspot/sponsored/quantum-ai-trading-platform-review-legit-or-fake-insights-for-canada-and-australia-1224976.html) really a great all rounder to fight fatigue, colds, flu's plus a string of other ailments. The advantages of this infusion are wonderful when designed to a decaffeinated green tea Fat Burner Supplement.
[https://www.deccanherald.com/brandspot/sponsored/quantum-ai-trading-platform-review-legit-or-fake-insights-for-canada-and-australia-1224976.html](https://www.deccanherald.com/brandspot/sponsored/quantum-ai-trading-platform-review-legit-or-fake-insights-for-canada-and-australia-1224976.html)
https://soundcloud.com/quantum-ai/quantumaifacts
https://ydsavhtwa.podbean.com/
https://medium.com/@quantumaiinfo/about
https://www.crunchbase.com/event/quantum-ai-4fa5
https://www.linkedin.com/pulse/quantum-ai-price-reviews-benefits-complaints-warnings-quantum-ai/
https://www.sportsblog.com/quantumaifact/quantum-ai-benefits-reviews-results-price-side-effects/
https://www.pinterest.ca/pin/1093178509531931101/
https://www.click.in/gurgaon/quantum-ai-reviews-price-benefits-uses-how-does-it-w-c75-v53335123
https://lookerstudio.google.com/reporting/79cc121a-c592-49b5-b5da-281ebd253f0c/page/DrdXD
https://colab.research.google.com/drive/113bSeaj-x7J5cvnTzOF1HyThf4wkHsVZ
https://groups.google.com/g/quantum-ai-info/c/FaIj4X4kh6w
https://sites.google.com/view/quantumai-2023/
https://quantumaiinfo.blogspot.com/2023/07/quantumaiinfo.html
https://techplanet.today/post/quantum-ai-reviews-price-benefits-uses-how-does-it-work
https://twitter.com/quantumaii52513
Solving the 'Reverse Integer' on LeetCode with C++
Tags: leetcode
Published: 2023-07-20 10:48:05

## Problem
https://leetcode.com/problems/reverse-integer/description/

## Answer
```
class Solution {
public:
    int reverse(int x) {
        long long result = 0;
        while(x) {
            result = result * 10 + x % 10;
            if (result > INT_MAX || result < INT_MIN) {
                return 0;
            }
            x /= 10;
        }
        return result;
    }
};

```

Let's examine the solution to the problem.
For an example, consider the following:
```
Input: x = -123
Output: -321
```

We solve the problem by taking the last digit in order.
```
Input: x = -123
1: -3
2: -32
3: -321

Output: -321
```

Now, let's dissect the code:

```
    int reverse(int x) {
        long long result = 0;
```

The `long long result = 0` is used to store the answer. It might exceed the int range because we're reversing `x`. Therefore, we use `long long`.

```
        while(x) {
            result = result * 10 + x % 10;
```
As mentioned before, we solve the problem by taking the last digit in order.

We use `x % 10` to get the last digit. The variable `result` will have a value starting from the second iteration. We use `result * 10` to shift the digits one place to the left as we add the new digit to the rightmost place.

```
x = -123
result = 0
Step 1: result = result * 10 + x % 10 = 0 * 10 + -123 % 10 = -3
x = -12 // explained later in this blog post.
result = -3
Step 2: result = result * 10 + x % 10 = - 3 * 10 + -12 % 10 = -32
x = -1
result = -32
Step 3: result = result * 10 + x % 10 = - 32 * 10 + -1 % 10 = -321
```

```
            if (result > INT_MAX || result < INT_MIN) {
                return 0;
            }
```
If `result` exceeds the range of int, we must return 0. The condition `result > INT_MAX || result < INT_MIN` checks for that.
```
            x /= 10;
```
We use `x /= 10` to eliminate the last digit.

For instance,
```
x = - 123

Step 1: 
x = -123
// result = 0
result = result * 10 + x % 10 = -3
   
Step 2: 
x = -12
// result = -3 
result = result * 10 + x % 10 = -3
```
We need to eliminate the rightmost digit, so we use `x /= 10` to shift the digits one place to the right.

We continue this process until `x` becomes 0.
Refine Native
Tags: refinehackathon
Published: 2023-07-20 10:16:58

## What I built 
I build a library for Refine that allows users to use the power of Refine to create cross-platform apps. The library is called RefineNative and currently supports `expo-router` and `react-native-paper`.
### Category Submission: 
- Best Overall Project
- Most Technical Impressive

### App Link

[@refinenative/expo-router](https://www.npmjs.com/package/@refinenative/expo-router)
[@refinenative/react-native-paper](https://www.npmjs.com/package/@refinenative/react-native-paper)
### Screenshots 

![Refine native sample](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ydl79oooke601y7b957.jpg)
<br/>
![Refine native sample](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/548g39khuvxilhic4zub.jpg)
<br/>
![Refine native sample](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fcg2wxt3qlf0omrpkf5f.jpg)
<br/>
![Refine native sample](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lzz781j3ky3sbyoluufc.jpg)
<br/>
![Refine native sample](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nu80c732d9z83eucibna.jpg)
### Description 
This project contains two libraries, `@refinenative/expo-router` and `@refinenative/react-native-paper`. The first one allows you to integrate Refine with `expo-router` project, and the second one contains some components that are built using `react-native-paper` and can shorten the time needed to build a CRUD page.
It follows the same structure and philosophy of Refine, so if you are familiar with Refine, you will find it easy to use.
### Link to Source Code 
https://github.com/abdellah711/refinenative
### Permissive License 
MIT License
## Background (What made you decide to build this particular app? What inspired you?) 
I got the idea of building this library when I was working on a React Native project that contains a lot of CRUD pages, and I thought that it would be great if Refine can be used to build cross-platform apps.
### How I built it (How did you utilize refine? Did you learn something new along the way? Pick up a new skill?) 
While building this project I learned a lot about how to use Refine and how to build a library for Refine (it's my first library). I also discovered the power of Refine and the complexity that it hides from the user.
### Additional Resources/Info
- [React Native](https://reactnative.dev/)
- [Expo Router](https://expo.github.io/router/docs/)
- [React Native Paper](https://callstack.github.io/react-native-paper/)
Geometry Dash
Tags: gamedev
Published: 2023-07-20 09:42:06

I just wanted to remark that [geometry dash](https://geometry-dash.io/) is a great game, even if it's unlikely that the people who made it will ever see my comment. The demo has both regular levels and more difficult game modes, such as fingerdash and deadlocked, with the latter being exclusive to the full version of the game. Standard levels are also included in the demo. There are also many more of them. Once you have mastered the earlier, free levels like clutterfunk and all of the insane levels like clutterfunk and the others, it is not simple to proceed to the higher stages, which are purportedly easier and harder but are actually quite difficult. This is my one and only complaint about the game. It makes no difference whether the level you are now playing on is a true insane level or not. My mind immediately goes to blast processing and geometrical dominator. The progression from Clutterfunk to either of the two higher levels is difficult but not impossible to accomplish. In addition, electrodynamix is worthy of being referred to as the devil.
A study of session sharing across systems that use cookie-based authentication
Tags: symfony, security, architecture, webdev
Published: 2023-07-20 10:08:25


For a long time I have wanted to code a solution to share the same session between different systems that rely on session and cookie authentication, not tokens, JWT or any other oAuth solution.

During my studies, I programmed a Symfony bundle called [jpm/session-sharing-bundle](https://packagist.org/packages/jpm/session-sharing-bundle) that allowed me to create a PoC to test my proposal. Visit my [PoC video demonstration](https://youtu.be/g-CefwgGgqM) to see how it works with a "real" example.

## Summary of the idea concept

But to give you an idea of how it works, it's pretty simple: 

1. the solution is that the middleware intercepts the requests to create and restore the session when needed. 
2. the data transfer is cryptographic with **Sync** key, checksum and permission list on both sides.
3. only the SessionId is transferred, so to recover the data all connected units should use the REDIS connection. 

## Flow of data inside the communication

1. The unknown user access `http://remote.test`
2. The request is intercepted by the `SessionManagerSubscriber` the user is redirected (HTTP 302) to the identity provider using a callback info
3. The IDP (Host) receives a GET request: `http://host-idp.test/login?callback=aHR0cDovL3JlbW90ZS50ZXN0`.
4. The `RemoteAuthSubscriber` from IDP (Host) intercepts the call, decodes the callback parameter, extracts the domain, and confirms if it belongs to the allowed list of domains (`JPM_KNOWN_REMOTE_HOSTS`) 
   - if not: it will do/ask the auth but will not redirect to the unknown requester.
5. Once the request is validated, the IDP verifies if the user has a valid session open.
   - if not: the auth form from IDP is shown to the user and the callback parameter is kept.
6. Once the session is created (or exists) the `sessionID` is encrypted using the sync key ad the defuse lib.
7. Now the user is redirected back to the callback URL with the token param holding the encrypted value.
8. Now the remote app receives a request: `http://remote.test?token=ZGVmNTAyMDAwYjliZDI5ODU5NGQxYzQwYTE...`
9. Again the `SessionManagerSubscriber` intercepts the request but now once it finds the token it decodes, decrypts, restores the session and finally lets the identified user access the resource.
    - if the given session is not valid/found: a 403 is thrown and stops the loop.
Now the remote app receives a request: `http://remote.test?token=ZGVmNTAyMDAwYjliZDI5ODU5NGQxYzQwYTE...`
Again the SessionManagerSubscriber intercepts the request but now once it find the token it decodes, decrypts, restores the session and finally let the identified user access the resource.
if the given session is not valid/found: a 403 is throw and stops the loop.

## Note of responsibility 

A note of responsibility has been added to the library README, but I will post again here. This bundle and the POC were developed as a study case. So is not ready or recommended to use in production, but it can help you to expand and develop your own way to do.
I Created an Innovative Bookmarking Tool : Markbook 2.0
Tags: development, javascript, productivity, tooling
Published: 2023-07-20 10:02:55

# Markbook 2.0: Elevate Your Bookmarking Experience!

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

Do you find yourself drowning in a sea of bookmarks, struggling to locate specific information when you need it the most? Enter Markbook 2.0, the game-changer that takes website organization and search to a whole new level! With its enhanced capabilities, Markbook offers seamless searching not only through titles and URLs but also within the actual contents of your marked tabs. Say goodbye to the frustration of sifting through numerous bookmarks; Markbook makes finding information a breeze. And that's not all—Markbook 2.0 brings you the added convenience of syncing all your marks across devices, making it the ultimate tool for effortless browsing and quick access.

**Get Markbook now:** [Download Markbook on Chrome Web Store](https://chrome.google.com/webstore/detail/markbook/jbfinpijiheebocjpioghehgoibdnkdc)

## Why Markbook 2.0 Matters:

1. *Boost Productivity:* With lightning-fast search capabilities and organized bookmarks, Markbook saves you valuable time and effort in finding crucial information, thus boosting your productivity.

2. *Enhance Knowledge Retention:* By being able to search within the content of your marked pages, you'll have a better grasp of the knowledge they hold, leading to improved retention.

3. *Access on the Go:* Markbook's cross-device syncing ensures you never miss a beat, no matter where you are. Your bookmarks are always accessible, even when switching between devices.

## Final Thoughts:

Markbook 2.0 revolutionizes the way you organize and access online resources. Its advanced search functionality, streamlined organization, and cross-device syncing are a powerful combination that will transform the way you browse the web. So why wait? Install Markbook now and experience the convenience and efficiency it brings to your online world.

And that's not all! I am continuously working to enhance your browsing experience. In the next release, I am focusing on optimizing the search algorithm, making it even faster and more accurate. Additionally, get ready to enjoy more exciting features that will further elevate how you manage your bookmarks.

One of the most beloved features of Markbook is the ability to pin it for easy access. By pinning Markbook to your browser, you'll have instant access to your marked tabs without the need to navigate through menus or bookmarks folders. It's just one click away, making it a true time-saver for your daily browsing activities.

Stay tuned for updates, and thank you for being a part of the Markbook journey!

**Get Markbook now:** [Download Markbook on Chrome Web Store](https://chrome.google.com/webstore/detail/markbook/jbfinpijiheebocjpioghehgoibdnkdc)
How to find the list of conferences on the ABCD Index platform ?
Tags: webdev, research, devjournal, conference
Published: 2023-07-20 10:02:04


Conference is a place where scholars, researchers, fellow researchers, academicians and other individuals can represent their work, meet people having similar goals, discuss the problems, progress and outcomes of their research, accept suggestions and get new ideas to conduct further research. In the present scenario, finding information regarding conferences is not a hard nut to crack, but finding valid information is still not an easy task. To make this as easy as cakewalk for students, scholars and for other institutions or individuals,  ABCD Index provides a list of conferences according to the need and preference of individuals.

To get the list of conferences on ABCD Index kindly follow the steps given below –

Step 1 – open the home page of ABCD index. (to access the homepage of ABCD Index kindly type ABCD Index on the search bar of browser or click on the link- [https://abcdindex.com/blogs/computer-science-conferences](ABCD Index Conference List is Here)
 
Step 2 -  on the homepage of ABCD index platform you can see some menus on the top of the window like home, about, publishers, reviewer etc. to get list of conferences going to held, ABCD Index provides two types of way for getting the list you are looking f kindly go to reviewer or publishers tab.

1.  **Way to reach conference by reviewer menu** –
-       click on the  reviewer menu, a drop down list will pop up on the screen; kindly look for the  ‘conference’ in the list and select it by clicking on the conference option.
-       By doing as directed above, a list of conferences will be visible on your screen.
 
2. **Way to reach conference by publishers menu**
 
-click  on the publisher menu , a list of options will be visible on the screen, now select ‘conference’ from the list; this will lead you to the list of conferences.

One can also click on the link to get the list of conference  [https://abcdindex.com/blogs/upcoming-seminars-and-conferences-in-india-in-english-literature-2023](https://abcdindex.com/conference_search.php)

On the [Abcdindex platform](https://abcdindex.com/blogs/international-conference-on-social-sciences-and-humanities) list of conferences are maintained efficiently so that scholars, students, academicians, researchers and whoever is interested in attending events like this can have genuine sources of information that are also assured to verify them so no one can feel cheated.
[Agriculture Conference 2023 In India
](https://abcdindex.com/blogs/agriculture-conference-in-india)
[Mechanical Engineering Conference 2023
](https://abcdindex.com/blogs/mechanical-engineering-conference)
[International Conference On Machine Learning
](https://abcdindex.com/blogs/international-conference-on-machine-learning)
PostgreSQL Foreign Data Wrapper (FDW)
Tags: postgres, postgrsql
Published: 2023-07-20 10:01:38

Recently i've been exposed to the idea of foreign data wrappers in Postgres, and thought i'd share what i've learned so far.

## What is it?
The idea behind it is simple: being able to access and interact with data stored in remote (external) databases (i.e databases that live on different machines) <u>as if they were regular database tables</u>.
PostgreSQL provides this feature through an extension called **postgres_fdw**.

## Setup
The general steps to setup and use the extension are as follows:

1. Install FDW extension, **postgres_fdw** comes pre-installed with Postgres and is officially supported. But you can also use other extensions.
2. Create server, use the `CREATE SERVER` statement to define a connection to the remote data source.
3. Create user mapping, create a user mapping to associate a local PostgreSQL user with a remote user for authentication purposes.
4. Create foreign table, use the `CREATE FOREIGN TABLE` statement to define the structure/schema of the foreign table (column names, data types, ...etc). There is also a command to automatically import the schema.
5. Querying foreign tables, you can finally interact with foreign tables as if they were regular local tables. 
Using normal SQL (Select, insert, ...etc).
A good tip here would be to optimize performance, you can do so by pushing down operations to the remote server, i.e asking the foreign server to perform the cost estimate (`EXPLAIN` command) by setting the **use_remote_estimate** option to true on the server or table level

- You can follow a step-by-step tutorial through a [helpful guide](https://dbsguru.com/steps-to-setup-a-foreign-data-wrapperpostgres_fdw-in-postgresql/#) i found, though one thing to note if you don't have another machine to test fdw is that you can actually use the same machine and 2 seperate databases.

### References
1. https://www.crunchydata.com/blog/understanding-postgres_fdw
2. https://dbsguru.com/steps-to-setup-a-foreign-data-wrapperpostgres_fdw-in-postgresql/#
Explore the latest career opportunities available in the UI/UX field
Tags: ui, ux, beginners, uiux
Published: 2023-07-20 09:57:27

Don Norman, who coined UX in 1990, had a very different view of career opportunities. This field is experiencing a boom in the last few years.

India has more than 600,000,000 Internet users. This number is expected to grow exponentially in the future, particularly after the Pandemic's push towards digitalization. UX/UI has become a specialized branch of the UX field.

Related Read: [UI UX Design Course in Pune](https://www.sevenmentor.com/ui-and-ux-and-web-development-training-in-pune.php)

In the future, UX-UI will play a major role in India's Digital Revolution. It will also create many new jobs.
To be a product designer, you will need to have experience with UX, project managing, and collaborating with other teams.
UX/UI designers: UX/UI designers are responsible for making the product easy to use. They also have a good understanding of information architecture, user flows and design tools. Good UX ensures that a site is navigable logically. UX/UI designers are people who possess both UI and UX skills.

UX designer: UX designers specialize in the design of user experiences and are focused on this. These designers are responsible for navigation, user journeys, and data visualizations.

User researchers gather and analyze user insights to inform design. They assist the business and product teams in finding meaningful and actionable data that represents user personas. The user researcher works with Business, Product, Development and Marketing in order to align business goals and user requirements.

Tags: [UI/UX Design Training in Pun](https://www.sevenmentor.com/ui-and-ux-and-web-development-training-in-pune.php)e | [UI/UX Design Classes in Pune](https://www.sevenmentor.com/ui-and-ux-and-web-development-training-in-pune.php) | [Best UI/UX Design Course in Pune with Placement](https://www.sevenmentor.com/ui-and-ux-and-web-development-training-in-pune.php) | [UI UX Design courses in Pune with fees](https://www.sevenmentor.com/ui-and-ux-and-web-development-training-in-pune.php) | [UIUX Classes in Pune](https://www.sevenmentor.com/ui-and-ux-and-web-development-training-in-pune.php) | [UIUX Course in Pune](https://www.sevenmentor.com/ui-and-ux-and-web-development-training-in-pune.php) | UI/UX Training in Pune | [Best IT Training Institute in Pune](https://www.sevenmentor.com/)