teleren/devto huggingface dataset:
Lulu Rent a Car company based in Dubai International city.
Tags: webdev, javascript
Published: 2024-05-01 14:02:13


[Lulu Rent a Car ](https://lulurentacar.com/)company based in Dubai International city. All latest cars brands are available for rental services 24/7. 
We offer daily, weekly and mothly cars for rent as well as long term rental services with cheap rates.
What if Array is Object like thing after all?
Tags: javascript
Published: 2024-05-01 14:01:24

Both Array and Object are a JavaScript data structure. While Array stores data with sequential index number, Object attaches values to key. 

But couldn't we consider that index of Array is a hidden equivalent to Object's key? (of type number)

Let me develop:

// array
`fruits = ['apple', 'banana', 'cherry'];` 
`console.log(fruits[0]);` // 'apple' 🤔 

// object
`fruits = {0: 'apple', 1: 'banana', 2: 'cherry'};`
`console.log(fruits[0]);` // 'apple' 😮 


Hm... Could Array potentially be build on Object?
The Future of BIM Technology
Tags: ai, bim, architecture, webdev
Published: 2024-05-01 13:57:29

Building Information Modeling (BIM) is revolutionizing the architecture industry, transforming the way buildings are designed, constructed, and managed. As a leader in professional services, LynxPros is committed to staying ahead of the curve, leveraging the latest BIM advancements and utilizing leading architecture software such as Archicad for drafting services, delivering exceptional value to our clients. Read More at [Lynxpros](https://www.lynxpros.com/archicad-drafting-services-future-bim-technology)
WindUI + Figma
Tags: news, tailwindcss, design, designsystem
Published: 2024-05-01 13:27:28

We are thrilled to announce our brand new Figma Design Library for WindUI! 🎉  
Your favorite  library is now seamlessly integrated with Figma, allowing you to design and develop effortlessly! 

[https://shorturl.at/gHMX5](https://shorturl.at/gHMX5)

We are looking forward to your feedback! Happy designing!💚
Ruby Array Methods That Will Blow Your Mind, Pt. 4: Fusions
Tags: programming, rails, ruby, coding
Published: 2024-05-01 13:02:11

This is the second to the last part of this series where we consider some more interesting methods to combine array of arrays into one single array.

## zip

The `zip` method in Ruby arrays is used to combine corresponding elements from two arrays into an array of arrays.(Whew 🤯 so many arrays in there and yet more to come). It takes one or more arrays as arguments and returns a new array of arrays. Each sub-array contains the elements at the same index from each of the input arrays. If the arrays are of different lengths, `nil` values are used to fill in the gaps.

```
array1 = [1, 2, 3]
array2 = ['a', 'b', 'c']
result = array1.zip(array2)

# Output: [[1, 'a'], [2, 'b'], [3, 'c']]
```

In this example, `zip` is called on `array1` with `array2` as an argument. The method combines the elements of `array1` and `array2` that have the same index into a new array of arrays.


## flatten

Well you guessed it, the flatten method used to flatten a nested array. This method transforms the nested array into a one-dimensional array. It's important to note that the 'flatten' method doesn't modify the original array unless it's called as 'flatten!'. Another important bit to note is that flatten doesn't take a block which is one very vital distinguising factor from `flat_map` described below.

```
nested_array = [[1, 2, [3, 4]], [5, 6], 7]
flattened_array = nested_array.flatten
puts flattened_array
# Output: [1, 2, 3, 4, 5, 6, 7]
```

In the above code, the 'flatten' method is called on the 'nested_array'. The result is a new array 'flattened_array' where all elements are in a single, un-nested level.


## flat_map

The `flat_map` method is literally a combination of the normal `map` and `flatten` methods. It is used to transform each element using a block and then flatten the result into a single array. This method is particularly useful when you want to map over an array, and the block you pass returns an array for each element. The `flat_map` method will flatten all of these into a single array.

```
arrays = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
flat_mapped = arrays.flat_map { |array| array }

# Output: flat_mapped will be [1, 2, 3, 4, 5, 6, 7, 8, 9]
# Just returning the elements behave like the normal `flatten`

arrays = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
flat_mapped = arrays.flat_map { |array| array * 2 }

# Output: flat_mapped will be [1, 2, 3, 1, 2, 3, 4, 5, 6, 4, 5, 6, 7, 8, 9, 7, 8, 9]

```

In the above example, `flat_map` is called on an array of arrays. The block passed to `flat_map` simply returns each sub-array as it is in the first example while in the second, it doubles the array then flattens it into a single array.

If you know other interesting methods don't be shy to drop it in the comments as we prepare to go through the last bit in the series of interesting Ruby Array methods.
SQL AGGREGATE FUNCTIONS
Tags: sql, database, mysql, postgres
Published: 2024-05-01 12:45:36

**DAY 2**
Hello Everyone 👋, 

It's me again markme today our topic is aggregate functions in SQL and we're going to walkthrough to some of it such as

- **AVG()**
- **SUM()**
- **COUNT()**
- **MIN()**
- **MAX()**

and then we're going to use that into query after we discuss it one by one, so let's get start.


 ## **AVG() FUNCTION**
- AVG() or average function is getting the average of all records in a selected column.take note that avg fuction is only accepting numbers not string and varchar.

Then this is how you use AVG() in a query

> SELECT AVG(salary) FROM users

Explanation: it will get the average salary of all users in the table that's the output.

---
 ## **SUM() FUNCTION**
- SUM() sum function is used to calculate the sum of values in a column.

Then this is how you use SUM() in a query

> SELECT SUM(salary) FROM users;

Explanation: In essence, the query fetches the total sum of all salaries stored in the "_salary_" column of the "_users_".

---
 ## **COUNT() FUNCTION**
- COUNT() count function is used to count the number of rows that meet a specified condition.

Then this is how you use COUNT() in a query

> SELECT COUNT(salary) FROM users;

Explanation: In this sample query we're getting the total rows where the salary value is not null or absence. like if there is no value it will not count as 1 it will go to the next row then check the value.

---
 ## **MIN() FUNCTION**
- MIN() function is used to retrieve the minimum value from a column.

Then this is how you use MIN() in a query

> SELECT MIN(salary) FROM users;

Explanation: In this query it will get the minimum value in the salary column it will check all the row who's the lowest value then show it in the output.

---
 ## **MAX() FUNCTION**
- MAX() function is used to retrieve the maximum value from a column.

Then this is how you use MAX() in a query

> SELECT MAX(salary) FROM users;

Explanation: In this query it will get the maximum value in the salary column it will check all the row who's the highest value then show it in the output.

That's the some example of aggregate function when we are going to apply it in sql. its good to use  this aggregate and combine it with group clause.

Now that you got a glimpse of the aggregate function try to apply that also in your end and explore much more deeper.

_"Consistency is the key to mastery."_

If you guys have comments or concern about this topic please comment down below. Thanks for reading.

- MARKME
Updating My Mac Window Shortcuts Strategy for Optimal Workflow
Tags: macos, productivity, rectangle, windowmanagement
Published: 2024-05-01 12:55:22

I previously wrote about [using keyboard shortcuts to manage windows in macOS](https://dev.to/mohsen_vaziri/mac-keyboard-shortcuts-for-arranging-app-windows-2l1l). With recent macOS updates and my discovery of the [Rectangle](https://rectangleapp.com/) app, it’s time for a strategy refinement.

### The Challenge of macOS Shortcut Reliability


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

While I found the ⌃⌥⌘ keyboard combinations effective in the past, comments from others indicated that they’ve become less reliable on newer macOS versions. This inconsistency can disrupt productivity. After some investigation, switching to ⌃⌥⇧ shortcuts has restored the expected smooth functionality.

### Introducing **Rectangle: Efficiency and Customization**

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

[Rectangle](https://rectangleapp.com/) is a fantastic free app that streamlines window resizing and arrangement through keyboard shortcuts. It offers a high degree of customization, but its default shortcuts are intuitive and work perfectly for me without any adjustments.

While the macOS native window animations are slightly smoother, Rectangle’s superior reliability makes it a clear winner in a professional workflow.

### Seamless Setup, Enhanced Productivity

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

Rectangle’s installation is incredibly straightforward. Its immediate out-of-the-box functionality was a pleasant surprise. For anyone seeking to reduce the friction of window management on their Mac, [Rectangle](https://rectangleapp.com/) is a solution I wholeheartedly recommend.

### The Power of Optimized Window Management

Don’t underestimate the impact streamlined window organization can have on your workflow. The ability to quickly position and resize windows minimizes distractions and helps maintain focus on the task at hand.

### Share Your Productivity Tips!

Do you have other Mac productivity tips or tricks involving window management? Please share them below!
second person
Tags: gamedev, writing
Published: 2024-05-01 12:51:44

There is a maxim when one starts writing: do not use the second person.

I have heard this many times, and it is clear that there is a literary tradition that favors the first and third person.

However, interactive narrative as we know it today has as its great-grandmother the collective narrative of tabletop role-playing games, where the second person is mainly used.

 **You are in this situation; what do you do about it?** 

I’m not saying that all narrative games have to be in the second person.

But it is an immersion tool that the traditional writer often ignores.

You have a new tool,

What are you going to do with it?

PS: It’s the first of May, Labor Day, so I sat down to write a bit. In recent months, my ADHD has gotten the best of me, and I committed to many very big things. Now I’m trying to distribute my efforts a little better. Hope I can handle it 🐌. I created a[now page](https://frantufro.com/now)on my blog and a reminder to update it to make sure I follow through.
Opensource Installation
Tags: opensource, python, devops, github
Published: 2024-05-01 12:51:30

Hey everyone! This is my first post on DEV but I wanted to know if anyone has recommendations for how to support **non-technical** users in installing open-source software. 

Specifically, we have a python based server but we're struggling to support non-technical users installing and configuring it.

Edit [Lots of clarification]: 
Target OS: 
  Linux generally, Ubuntu is the core of development. (would like to expand to windows eventually)
Installer:
  no config interface right now, an ansible installer that installs and configures everything but a bit difficult to maintain and bound to a specific ubuntu version.
Configuration Interface:
  tiered connfiguration supporting environment variables and a yaml file.
documentation:
  https://freetakteam.github.io/FreeTAKServer-User-Docs/
Root:
  currently requires root access but we're trying to address it
Running your pytests faster
Tags: python, cpython, pytest, gc
Published: 2023-01-12 09:39:30

---
title: Running your pytests faster
published: false
date: 2023-01-12 00:00:00 UTC
tags: python, cpython, pytest, gc
published: true
canonical_url: http://aivarsk.com/2023/01/12/pytest_gc/
---

Open your `conftest.py` and type the following lines:

```
import gc
# Like gc.disable() but overrides your dependencies that do
# gc.disable() and gc.enable()
gc.set_threshold(0)

```

Depending on the project size and number of tests there is a speedup from a few percent in smaller projects up to 10% in a project with 30,000 tests. Your experience may vary.

I went down the Python GC rabbit hole and there will be a long story about it so here is a short one.

Most of the memory in Python is released when the reference count reaches zero. For a few cases when you might get cyclic references, there is a stop-the-world garbage collector. However, the trigger condition for starting the GC is when allocated but not released instances of non-atomic types reach a small threshold. That leads to a lot of GC cycles when you load something into memory for legitimate reasons: your Django QuerySet caching, file records, and collecting unit tests to run.

For my test case, 2nd generation gets more than 400,000 objects while `pytest` is running the tests. It takes some time to get there from the 0th generation and it just increases the `n` in the complexity of the collection algorithm.

If [Instagram can run services without GC in production](https://instagram-engineering.com/dismissing-python-garbage-collection-at-instagram-4dca40b29172) so can our tests.
Best Farmhouse For Party in Gurgaon
Tags: farmhouse, partyplace, weddingvenue
Published: 2024-05-01 12:38:43

Gurgaon's highest party destination – the undisputed best Farmhouse for unforgettable celebrations! This exceptional venue boasts sprawling lawns and contemporary interiors, setting the stage for the ultimate party experience. Whether it's a birthday bash or a grand wedding, this farmhouse takes the top spot with its unmatched charm and modern amenities. Revel in the serenity of the surroundings while relishing city conveniences. Combining elegance with comfort, it ensures a seamless celebration every time. Elevate your events and create lasting memories at [Gurgaon's best Farmhouse on rent](https://goo.gl/maps/jjQtYFT4wU5cFHPM8) – where excellence meets celebration in the heart of festivities!
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wa78lk1tvsd5mubpag4w.png)
Social Security Schemes: Atal Pension Yojana (India)
Published: 2024-05-01 12:31:27

The Atal Pension Yojana (APY) was introduced by the Government of India. It was launched by the Prime Minister of India, Shri Narendra Modi, on 9th May 2015. The scheme is aimed at providing pension benefits to workers in the unorganized sector, ensuring financial security for their old age.
The Atal Pension Yojana (APY) is a [social security scheme](https://www.linkedin.com/pulse/social-security-schemes-india-brief-guide-anjali-singla-gmzcf/) launched by the Government of India to address the pension needs of workers in the unorganized sector. The scheme was introduced with the aim of providing a regular pension income to ensure financial stability and security for individuals in their old age.

One of the key features of the APY is its focus on encouraging voluntary participation from individuals in the unorganized sector who do not have access to formal pension schemes. The scheme offers a guaranteed minimum pension ranging from Rs. 1,000 to Rs. 5,000 per month, depending on the contribution amount and the age at which the individual joins the scheme. 

To enroll in the APY, individuals need to have a savings bank account, be between 18 and 40 years of age, and be eligible to receive benefits under the scheme. The contribution amount varies based on the age of entry and the desired pension amount, with contributions starting as low as Rs. 42 per month for a Rs. 1,000 pension.

The APY also offers benefits such as fixed pension amounts for the spouse in case of the subscriber's demise and the option to choose the pension amount and the frequency of contributions. The scheme is administered by the Pension Fund Regulatory and Development Authority (PFRDA) and contributions are invested in a pension fund to generate returns over time.

Overall, the Atal Pension Yojana plays a crucial role in providing social security to workers in the unorganized sector, helping them build a corpus for their retirement and ensuring a dignified life post-retirement.
JavaScript: Techniques for Checking if a Key Exists in an Object
Tags: webdev, javascript, devops, programming
Published: 2024-05-01 12:16:28

To [check if a key exists in an object in TypeScript](https://cloudastra.co/blogs/javascript-techniques-to-check-if-key-exists-in-object-typescript), you can use various methods such as the `in` operator, optional chaining (`?.`), or direct property checks. Here's a brief explanation of how to achieve this:

1. **Using the `in` Operator:**
   The `in` operator checks if a specified property exists in an object. It can be used as follows:
   ```typescript
   const myObject = { name: "John", age: 30 };

   if ("age" in myObject) {
       console.log("The 'age' property exists in the object.");
   } else {
       console.log("The 'age' property does not exist in the object.");
   }
   ```

2. **Using Optional Chaining (`?.`):**
   Optional chaining allows you to safely access nested properties without causing errors if an intermediate property is `null` or `undefined`. You can combine optional chaining with a property check:
   ```typescript
   const myObject = { name: "Alice", address: { city: "New York" } };

   if (myObject.address?.city) {
       console.log("The 'city' property exists in the 'address' object.");
   } else {
       console.log("The 'city' property does not exist in the 'address' object.");
   }
   ```

3. **Direct Property Check:**
   For a simple existence check, you can directly check if a property is not `undefined` or use a type guard function:
   ```typescript
   const myObject = { name: "Bob", email: "bob@example.com" };

   if (myObject.hasOwnProperty("email")) {
       console.log("The 'email' property exists in the object.");
   } else {
       console.log("The 'email' property does not exist in the object.");
   }
   ```

Using these methods, you can determine whether a specific key exists in an object and handle the logic accordingly in TypeScript. Each approach has its use case depending on the complexity of the object structure and the type of check needed.
Best Spine Surgeon in Pune | Dr. Dilip Kiyawat
Published: 2024-05-01 11:59:39

Introduction:

Living with spine issues can be debilitating, impacting every aspect of your life. Whether it’s a herniated disc, spinal stenosis, or any other condition, finding the right spine surgeon is crucial for effective treatment and recovery. In Pune, amidst a bustling medical landscape, one name stands out for its expertise and patient-centric approach - Dr. Dilip Kiyawat.

 
 

Who is Dr. Dilip Kiyawat?

Dr. Dilip Kiyawat is a renowned spine surgeon based in Pune, with years of experience and a track record of successful surgeries. His dedication to patient care, coupled with his advanced skills in spine surgery, has earned him a stellar reputation in the medical community and among his patients.

 

What Sets Dr. Kiyawat Apart?

Expertise :   Dr. Kiyawat specializes in spine surgery, focusing solely on conditions affecting the spine. His depth of knowledge and surgical skills make him a trusted authority in the field.

Comprehensive Approach:   Dr. Kiyawat believes in a holistic approach to spine care. He takes the time to understand each patient's unique condition, lifestyle, and goals before recommending a treatment plan.

Advanced Techniques : Keeping up with the latest advancements in spine surgery, Dr. Kiyawat utilizes state-of-the-art techniques and minimally invasive procedures whenever possible. This results in faster recovery times and reduced post-operative discomfort for patients.

Patient-Centric Care: Dr. Kiyawat prioritizes patient satisfaction and comfort throughout the treatment journey. From the initial consultation to post-operative care, he ensures that patients feel supported and informed every step of the way.

 

Services Offered:

Dr. Kiyawat offers a wide range of spine surgeries and treatments, including:

Microdiscectomy

Spinal Fusion

Artificial Disc Replacement

Decompression Surgery

Scoliosis Correction

Revision Spine Surgery

Each treatment plan is tailored to meet the individual needs and preferences of the patient, with a focus on achieving the best possible outcomes.

 

Conclusion:

If you're seeking relief from spine issues in Pune, Dr. Dilip Kiyawat is the name you can trust. With his expertise, advanced techniques, and patient-centric approach, he ensures that each patient receives the highest quality care possible. Don't let spine pain hold you back - schedule a consultation with Dr. Kiyawat today and take the first step towards a healthier, pain-free life.


For More Information:

Dr. Dilip Kiyawat

Website  :   https://drdilipkiyawatneurosurgeon.com/         

E mail :  drdilipkiyawatneurosurgeon@gmail.com

Mobile Number  :  9822046043

Address  :  Railway Station, 32, Sasoon Rd, near Pune, Central Excise Colony, Sangamvadi, Pune, Maharashtra 411001
Introducing DIVZ - a React component to scroll, swipe & zoom through content on the 3D z-axis
Tags: react, showdev, webdev, css
Published: 2024-05-01 11:41:07

I'm excited to share DIVZ - a free open source React UI component that lets you scroll, swipe & zoom through HTML elements on the 3D z-axis. Think of it as a new, experimental way to navigate and present web content 🙌

[![https://lewhunt.github.io/divz/](https://lewhunt.github.io/assets/readme/divz-demo1.gif)](https://lewhunt.github.io/divz/)

<hr>

### [👉 Try out the demos here 👈](https://lewhunt.github.io/divz/) 


### [👉 Dive into the source code 👈](https://github.com/lewhunt/divz)

<hr>

## Installation
Developers can install Divz as an open source component to use in React apps. Quickest install method is via the npm install command below:

```bash
npm install divz
```
<hr>

## Usage
After install, import the component and render it in your app or page, wrapping it around your list of divs or other HTML elements:

```jsx
import { Divz } from "divz";

function App() {
  return (
    <Divz>
      <div>1</div>
      <div>2</div>
      <div>3</div>
      <div>4</div>
    </Divz>
  );
}
```

The [demo source code](https://github.com/lewhunt/divz/blob/main/src/App.tsx) illustrates how the component can be initialised with more props - along with images and videos inside the child divs - for a richer user experience.

<hr>

## Why Divz?
Divz was initially created to showcase portfolio work within a pseudo-3D environment, loosely inspired by Apple's Time Machine interface which allows the user to zoom through historical Finder windows:

[![https://en.wikipedia.org/wiki/Time_Machine_%28macOS%29](https://upload.wikimedia.org/wikipedia/en/1/1a/Timemachine_gallery_windowsquicklook20070611.jpg)](https://en.wikipedia.org/wiki/Time_Machine_%28macOS%29)

<hr>

## What Sets It Apart?
- <b>Simplified Integration:</b> Divz is designed to be responsive and easy to use, acting as a straightforward wrapper around a list of divs or other HTML elements.
- <b>Diverse Applications:</b> While the demos showcase its versatility as a carousel, slideshow, or gallery component, Divz opens the door to a range of other potential uses. Consider it an innovative, experimental method for navigating web content.
- <b>Broad Device Support:</b> Divz accommodates various navigation modes, including touch for mobile devices, cursor/trackpad for desktop users, and arrow keys for TV devices.

<hr>

## How Does It Work?
Under the hood, Divz performs CSS3 transforms on the core component and the child HTML elements, set dynamically with React TypeScript. The component is packaged using Vite to allow npm library integration.

<hr>

## Support
I hope this has given a good intro to the component and you get some use out of it for your own projects!

[ :speech_balloon: Fire over a comment](https://github.com/lewhunt/divz/issues) if you have any feedback, requests or issues :bug:

[:star: Give it a Github star](https://github.com/lewhunt/divz) if you like the component or want to bookmark it 🙏