teleren/devto huggingface dataset:
Why Godot drops objects when creating a MeshLibrary
Tags: godotengine, godot, gamedev
Published: 2021-11-04 12:36:49

## The Problem

I was recently messing around with `GridMap`s in Godot Engine which allow you to "paint" meshes on a 3D grid much like you would a 2D tileset. Following the [official `GripMap` tutorial](https://docs.godotengine.org/en/stable/tutorials/3d/using_gridmaps.html), I noticed some odd behavior creating a `MeshLibrary`.

![Grid Map has a Mesh Library with no meshes](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sww4j01vz9hba35uhbvc.png) 

I was using the models from the [City Kit Roads pack from Kenney.nl](https://kenney.nl/assets/city-kit-roads). They render nicely in the scene tree, but when using the `Scene -> Convert to MeshLibrary` option to create a `MeshLibrary` the resulting `.tres` file was empty. In previous projects, this feature has worked for me so I wondered if there was something particular about these assets that was missing something Godot expected.

![Scene to Export as Mesh Library](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zrd2ht318vytz8iaq8rf.png)

![Convert to Mesh Library menu item](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2yb0nyymvbbkejxlcm3r.png)

## The Investigation

I've had luck looking at the Godot source code, in other situations, thanks to it being open source. A quick look at the `MeshLibrary` code showed something worth looking into:

[mesh_library_editor_plugin.cpp#L78-L88](https://github.com/godotengine/godot/blob/dde48ebed6303b53a912005570179382e3bd250b/editor/plugins/mesh_library_editor_plugin.cpp#L78-L88)
```c++
void MeshLibraryEditor::_import_scene(Node *p_scene, /* ... */) {

  // ...

  for (int i = 0; i < p_scene->get_child_count(); i++) {
    Node *child = p_scene->get_child(i);
    if (!Object::cast_to<MeshInstance3D>(child)) {
      if (child->get_child_count() > 0) {
        child = child->get_child(0);
        if (!Object::cast_to<MeshInstance3D>(child)) {
          continue;
        }
      } else {
        continue;
      }
    }

// ...
```

Here the `_import_scene()` function is looping over the scenes children and if they are not a `MeshInstance3D` then it looks at the first grandchild, if there are no grandchildren or the first one isn't a `MeshInstance3D` then it skips the whole child. That seemed promising, so I opened the asset as a "New Inherited Scene"  and sure enough it was nested.

![Imported Scene Tree](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/amevp16nys2ywbnjh7zx.png)

## The Solution

A quick edit as a "New Inherited Scene" to change the hierarchy like this

![Modified Scene Tree](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8bg1rgryhbo3wvpz9l04.png)

And the models were added to the `MeshLibrary` without issues.

![Working Grid Map](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v2gbn5o39wf6cl5esyge.png)
Use PodDisruptionBudget (PDB) to define minimum application availability
Published: 2021-11-04 09:52:16

A pod disruption budget is used to define number of disruptions that can be tolerated at a given time by a specific set of pods. In simple words, minimum number of pods that should be running or maximum number of pods that can be deleted during voluntary disruptions. 

The voluntary disruption means any action in Kubernetes cluster initiated by someone or something that results into deleting the pods running on a given node. For example, during the cluster maintenance, the cluster admin wants to drain the node that results into deleting all the pods running on that node, or the cluster auto scaler is scaling down a node that results into deleting all the pods running on that node.

### Implications of not having PDB defined for your application
If your workload does not have PDB defined, it might go offline during cluster maintenance event or scale down action introducing **downtime** for the application.
 
### Defining PDB for your application
Below is an example of a sample application that defines pod disruption budget.

#### 1. Deployment
The Deployment object defines the application pod and it’s configuration. The application name and label used is *app1*.
```
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    name: app1
  name: app1
  namespace: ns1
spec:
  selector:
    matchLabels:
      name: app1
  template:
    metadata:
      labels:
        name: app1
    spec:
      containers:
      ...
```
#### 2. HPA
The HPA object defines the scaling criteria for application pods. The HPA is associated with deployment using the *scaleTargetRef* tag. Once HPA is associated with deployment, then that deployment can no longer be scaled independently. The OpenShift UI will have the manual scaling of pods disabled as shown below. You won’t see the up and down arrows to scale up or scale down the pod.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b1t25e9j9rolt8wdfnn1.PNG)
```
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
  name: app1
  labels:
    app: app1
    app.kubernetes.io/instance: app1
  namespace: ns1
spec:
  minReplicas: 2
  maxReplicas: 10
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: app1
  targetCPUUtilizationPercentage: 80
```
#### 3. PDB
The **PodDisruptionBudget** object defines the criteria for pods to handle disruptions.
```
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: app1
  namespace: ns1
spec:
  minAvailable: 25%
  selector:
    matchLabels:
      app: app1
```
Assuming the application is running with minimum two pods, one pod can be deleted and created on another node by scheduler during the voluntary disruption as deleting one pod keeps the availability as 50% which is greater than 25% defined in the PDB.
implements of the OOP concepts in Laravel
Tags: laravel, oop, php
Published: 2021-11-04 12:08:54

     Hello everyone, I hope you are healthy. Usually, I've confused about how to follow OOP rules as using Laravel! for example how to follow SOLID rules with the framework.
   For example, I want to build a simple marketplace for a company and I follow this method.
   For example for the invoicement part :
1- First, I created an interface for it.
Code:
InvoiceIf.php->
<?php
namespace App\Classes\Interfaces;
interface InvoiceIf
{
    public function customer();
    public function sellerUsers();
    public function products();
    public function prices();
}

Then, I've created a Eloquent Model like:
Invoice.php
<?php
namespace App\Classes;
use Illuminate\Database\Eloquent\Model;
use App\Classes\SellerUser;
class Invoice extends Model implements InvoiceIf
{
    final public function customer()
    {
        return $this->hasOne(Customer::class);
    }
    final public function sellerUsers()
    {
        return $this->hasMany(SellerUser::class);
    }
    final public function products()
    {
        return $this->hasMany(Product::class);
    }
    final public function prices()
    {
        return $this->hasMany(Price::class);
    }

}
Third, I create a Controller to handle user requirements. 
but in this time, this method that I've followed it is true or not?
please help me...
Quora vs Medium: Which One is Best for writers?
Tags: knowledge, beginners
Published: 2021-11-04 12:06:54

Image Credit: <a href="https://www.blogtriggers.com">BlogTriggers.com</a>

People always ask more and more about this “<a href="https://www.blogtriggers.com/2021/05/which-writing-platform-should-i-use-quora-vs-medium.html">Quora vs Medium</a>” thing and whether choosing one or another for their blogs, content pieces or online writings is the best choice.

Quora and Medium both successful. I like Medium because there was a lot of traffic and audience on the main site for articles. Quora was more specific about certain topics, and maybe contains lesser noise overall. 

However, personally, I like the way Medium's interface looks better than Quora's to read quality articles. Both platforms has their differerences, but we can share ideas and thoughts just as much as we want to.

Medium is best rather than quora for content writers in my view because it has greater credibility in terms of attracting viewers, readers, subscribers when compared to quora. I have observed that when I post an article on Quora it hardly gets any eyeballs when compared to Medium. But when I post the same article on Medium, in fact the same article gets well accepted by the viewers.

<h3>Final Conclusion of Quora vs Medium</h3>

If you are a beginner, you should start with quora, because the audience of quora is much bigger than medium. On the other hand, if you are an experienced content writer, go with medium because your content will be seen by more experience people.
Day 50/100 The weresquirrel
Tags: 100daysofcode, programming, challenge, motivation
Published: 2021-11-04 11:49:08

"Every now and then, usually between 8 p.m. and 10 p.m., Jacques finds himself transforming into a small furry rodent with a bushy tail.

On one hand, Jacques is quite glad that he doesn’t have classic lycanthropy. Turning into a squirrel does cause fewer problems than turning into a wolf. Instead of having to worry about accidentally eating the neighbor (that would be awkward), he worries about being eaten by the neighbor’s cat. After two occasions where he woke up on a precariously thin branch in the crown of an oak, naked and disoriented, he has taken to locking the doors and windows of his room at night and putting a few walnuts on the floor to keep himself busy.

That takes care of the cat and tree problems. But Jacques would prefer to get rid of his condition entirely. The irregular occurrences of the transformation make him suspect that they might be triggered by something. For a while, he believed that it happened only on days when he had been near oak trees. But avoiding oak trees did not stop the problem.

Switching to a more scientific approach, Jacques has started keeping a daily log of everything he does on a given day and whether he changed form. With this data he hopes to narrow down the conditions that trigger the transformations.

The first thing he needs is a data structure to store this information."

![squirrel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zury09n54zqjs34lqxm6.png)
Top 2 Free Android apps of the week
Tags: android, application, utility
Published: 2021-11-04 11:09:58

1. Dictionary app
Name : [wordonary](https://play.google.com/store/apps/details?id=in.anondev.wordonary)
Features: Clean UI, easy to use, No annoying ads
Cons: Required internet connection, too less features

2. Whiteboard app
Name: [Whiteboard](https://play.google.com/store/apps/details?id=cn.readpad.whiteboard)
Features: Easy to use, features rich, no annoying ads
Cons: Some text of app not in English, only available in white theme

Try these apps and let me know if you like them.
How to use Github CLI in 7 commands
Tags: github, productivity, cli, programming
Published: 2021-11-04 10:50:45

1. [Open project in Github](#1-open-project-in-github)
2. [List all issues](#2-list-all-issues)
3. [Create new issue](#3-create-new-issue)
4. [List all PRs](#4-list-all-prs)
5. [Check PR status](#5-check-pr-status)
6. [Merge PR into main](#6-merge-pr-into-main)
7. [Switch between branches](#7-switch-between-branches)

---

__Github CLI installed?__
Check by running `gh version`

Or [install Github CLI](https://cli.github.com)

---

## 1. Open project in Github
Open the github homepage of the current project in the browser.
```
gh browse
```

Github CLI's response:
```bash
Opening github.com/repo/my-repo in your browser.
```

---

## 2. List all issues
Return all outstanding issues in the repository.
```bash
gh issue list
```

Github CLI's response:
```bash
Showing 3 of 3 open issues in repo/my-repo

#178  bug when downloading pdf            about 3 minutes ago
#166  refactor stripe api call            about 2 days ago
#126  depreciate pacakge                  20 days ago
```

---

## 3. Create new issue
Did you find a new bug? 
Add something as a to-do for later on [Github Issues](https://github.com/features/issues/). The CLI will prompt you a few questions.
```bash
gh issue create
```

Github CLI's response:
```bash
Creating issue in repo/my-repo

? Title bug when downloading pdf
? Body <Received>
? What's next? Submit
https://github.com/repo/my-repo/issues/178
```

---

## 4. List all PRs
Retrieve an overview of all PR in the repository.

```bash
gh pr list
```

Github CLI's response:
```bash
Showing 3 of 3 open pull request in repo/my-repo

#170  feat/stripe-checkout
#142  feat/vitally-api
#139  bug/profile-responsiveness
```

---

## 5. Check PR status

To find out if the PR passed the automated testing suite.
```
gh pr status
```

Github CLI's response:
```bash
Relevant pull requests in repo/my-repo

Current branch
  #177  new-feature [new-feature]
  ✓ Checks passing
```

---


## 6. Merge PR into main
A useful shortcut to easily delete a branch from both Github __and__ your local enviroment.

2 options:

- __From the local main branch__

Merge a PR into the main branch by specifying the PR number.
```bash
gh pr merge 177
```
- __From the PR branch__

No need to specific the PR number.
```bash
gh pr merge
```

Github CLI's response:
```bash
? What merge method would you like to use? Create a merge commit
? Delete the branch locally and on GitHub? Yes
? What's next? Submit
✓ Merged pull request #177 (new-feature)
✓ Deleted branch new-feature
```

---

## 7. Switch between branches
This CLI command is based upon a popular [extension](https://github.com/mislav/gh-branch). 

Install the extension
```bash
gh extension install mislav/gh-branch
```

Run the extension.
```bash
gh branch
```

Move across branches with up and down arrow. Hit enter to select the branch. 

Github CLI's response:
```bash
  feat/stripe-checkout             6 weeks ago
  feat/postmark-integration        2 weeks ago
> new-feature                      25 hours ago
  bug/profile-responsiveness       2 hours ago
  4/4
```
How To Access The Commandline Interface Of Your Docker Container 
Tags: docker, cli
Published: 2021-11-04 10:43:15

While working in docker you may feel as you are locked in a box and you cant do anything inside the box.However docker provides for a way to work inside a container using its cli commands.

Lets say we are running a mongodb image and would like to access the mongo shell. How do you do that?

1. Simply Open A New Commandline interface different from where you have spinned up docker.
2. Type
```
docker exec -it mongodb mongo
```

This command is applicable to any docker container ,even those started using docker-compose. You just need to know two things:
- The Docker Container name
- The command that applies to that container

```
docker exec -it ContainerName ContainerCommand
```

So in our prior example:
```
docker exec -it mongodb mongo
```

**mongodb** is the name of our container
**mongo** is the name used to intialize the mongo shell


This command also applies to services started using the `docker compose` command . 


Let say you are running a laravel php application on docker this would apply

```
docker exec -it Laravel php  artisan make:controller ShopController
```

Notice :
**Laravel** is the name of my container which may vary depwnding on how you have named your container
**php artisan make:controller ShopController** is a cli command for Laravel
Fresh graduates should focus on their CVs!
Tags: writing, motivation
Published: 2021-11-04 10:38:53

Are you a fresh graduate who is worried about their job now and during the university tenure never thought about making a proper CV? So now as you got graduates you will need a perfectly designed and made graduate CV. If you are a resident of Ireland there is nothing to worry about there are many <a href="https://www.cvireland.com/graduate-cv">graduate resume helpers ireland</a> who can provide the best resume making services, that too on the perfect template for a graduated student. These experts have complete information regarding the present job market trends and so help an individual design and craft their CV accordingly. Do not wait, grab your services from the Irish resume making & designing experts
Fully functional google search with Next.js
Tags: react, javascript, webdev, css
Published: 2021-11-04 10:07:50

In this article, I am going to tell you about how I made Google fully functional Clone with `next.js` and `tailwind`. So Let's dive in.

In this we are not redirecting user to the google page, instead we are using google custom search API to perform all operation in the same domain _User can only fetch this API about 100 times so be careful with that you cannot search more that 100 times_

**Note** - If you are developing this by yourself then must use mock data so don't exhaust your API request limit

<h4> Features </h4>

- Realtime and Accurate Google Search
- Full Screen mode
- Installable PWA
- Search Any Query
- Full Responsiveness
- Show your location based on you IP
- Dark Theme support based on user's device setting

<h4>Technologies I've used -</h4>

- [Next.js](https://nextjs.org/)
- [TailwindCSS](https://tailwindcss.com/)
- [Custom Search JSON API](https://rb.gy/0lfupd)

<h4>Screenshots</h4>

Desktop - Home Page

![desktop](https://rb.gy/snaajr)

Desktop - Results Page

![desktop](https://rb.gy/zsiyme)

Mobile - Home Page

<img width="200" src="https://i.imgur.com/3CxDBaG.png" >

Mobile - Results Page

<img height="100" src="https://i.imgur.com/PovTPVT.png" >

This is obvious that I cannot share all the code there for that you have to visit the repository, which link is given below, this is not a complex application it is very easy to set up you just need to have a basic understanding of React and TailwindCSS.
First, you need to create the next.js app and install all the dependencies which are required you can look at my `package.json`, and then you just code.

For detailed info about this project [Visit Here](https://github.com/j471n/next-google#readme)

**Important Links**
[Get the Code](https://github.com/j471n/next-google)
[LIVE Demo](https://next-gooogle.vercel.app/)

### Conclusion

This project taught me many things such as next.js sever side, router and many more use full things you can also build that from scratch. I

<blockquote>
<p>If you like it then you can now extend your support by buying me a Coffee.😊👇</p>
</blockquote>
<a href="https://www.buymeacoffee.com/j471n"><img src="https://cdn.buymeacoffee.com/uploads/project_updates/2021/05/918bc0ffae9a1865553d54bc11e65c4b.gif" alt="Buy Me A Coffee" loading="lazy" width="100"></a>

### You might be interested in -

- [10 CSS Resources that you should bookmark](https://dev.to/j471n/10-css-resources-that-you-should-bookmark-46l6)
- [Some Strange Concept of JavaScript](https://dev.to/j471n/some-strange-concept-of-javascript-4icc)
- [Glassmorphism Loading Animation](https://dev.to/j471n/glassmorphism-loading-animation-4n2m)
Elementor Review - Der leistungsstarke WordPress Page Builder
Tags: wordpress, elementor, pagebuilder, wordpressplugins
Published: 2021-11-04 14:36:12

---
title: Elementor Review - Der leistungsstarke WordPress Page Builder
published: true
date: 2021-11-04 10:06:31 UTC
tags: WordPress,elementor,pagebuilder,WordPressPlugins
canonical_url: https://bloggerpilot.com/elementor/
---

![Elementor - WordPress Page Builder](https://bloggerpilot.com/wp-content/uploads/2021/10/elementor.png)

Elementor ist ein Content Page Builder, ein Drag-and-Drop-Tool, das es dir leicht macht, schöne Seiten aus verschiedenen Inhaltsquellen zu erstellen. Elementor ist ein umfassender Page Builder, der mit einer Vielzahl von Werkzeugen wie Layouts, Widgets und Inhaltsblöcken ausgestattet ist, mit denen du eine komplette Website erstellen kannst. Es ist ein schnell zu bedienendes Drag-and-Drop-Tool, das es jedem leicht macht, eine schöne Seite aus einer Reihe von Inhaltsquellen zu erstellen.

Der Original-Artikel erschien auf [Elementor Review - Der leistungsstarke WordPress Page Builder](https://bloggerpilot.com/elementor/).
How we got 2,000 stars in 4 days from a dev.to post
Tags: opensource, news, javascript, node
Published: 2021-11-04 09:59:51

After years of struggling when building a notification infrastructure for different projects I was involved with. My partner and I finally decided to open-source most of the work and bring it back to the community instead of building it all over again closed-source.

I've not even imagined the amount of traction the repository got in the last couple of days. How did happen you ask?

When first releasing the library we only introduced a node.js library to unify all the notification channels into a single API. Send emails, SMS, and other mediums with the same code. Need to change SES to SendGrid? No problem. Just a single line of code.

This got some traction, but nothing impressive so far.

Next comes, building and restructuring our major infrastructure blocks in preparation for a big open-source release. With a bigger picture including An Embeddable Notification Center widget, monitoring for delivered notifications and channels, an admin panel to manage notifications channels and content, and other cool features, basically, everything you need for a Notifications Infrastructure.

Before jumping to code, I decided to compose a quick blog post outlining the proposed features to the community and to hear their thoughts about this. At this point, I was not even sure somebody else had this issue before.

One day after publishing to dev.to we've noticed thousands of people visiting the post from the dev.to analytics dashboard. Further investigation showed that a lot of people came from Google. Turned out that we have been selected for the Google Discover timeline 🤯

The next day GitHub trending picked the project and it's just exploded from there:
- We've been trending on GitHub for 4 consecutive days 🤯
- More than 50 people joined our discord
- 10 new amazing contributors created PR's and contributed back
- **2,100** Total stars as of posting this post

## What's Next?

We are working hard on releasing the next huge release of notifire to the community with all the amazing features we discussed in the post as a Docker-based environment for easy implementation.

If you're interested in any of this check us out at: https://github.com/notifirehq/notifire

The original dev.to post: https://dev.to/scopsy/building-the-first-open-source-notification-infrastructure-5h9k

I want to say thank you to all the amazing contributors I had the luck to meet in the last past days check them out!

- [@deepak-sreekumar](https://github.com/deepak-sreekumar)
- [@artfuldev](https://github.com/artfuldev)
- [@diganta413](https://github.com/diganta413)
- [@davidsoderberg](https://github.com/davidsoderberg)
- [@SachinHatikankar100](https://github.com/SachinHatikankar100)
- [@davidsoderberg](https://github.com/davidsoderberg)
- [@tonytangdev](https://github.com/tonytangdev)
- [@akhil-gautam](https://github.com/akhil-gautam)
- [@painotpi](https://github.com/painotpi)
- [@ulentini](https://github.com/ulentini)
- [@Wyfy0107](https://github.com/Wyfy0107)
- [@LuigiZaccagnini](https://github.com/LuigiZaccagnini)