teleren/devto huggingface dataset:
Handling CRUD with Entity Framework in Blazor Data Grid
Tags: blazor, grid, crud, webdev
Published: 2021-06-25 09:27:14

Learn how easily you perform CRUD operations in Blazor [Data Grid](https://www.syncfusion.com/blazor-components/blazor-datagrid "Data Grid") with Entity Framework.

Download an example from GitHub:
https://bit.ly/35tObeI

Learn how to configure the Entity Framework in a Blazor WebAssembly app:
https://bit.ly/2FsjziS
 
TRIAL LICENSE KEY:
If you need a trial license key, start your Blazor trial from your Syncfusion account and then obtain your trial license key from the downloads page. 
https://www.syncfusion.com/account/manage-trials/start-trials

Check if you are eligible for a free license for all the Syncfusion products on our Community License page.
https://www.syncfusion.com/products/communitylicense

{% youtube MEdHxxqeY9A %}
Create an incremental sequence charecter?
Published: 2021-06-25 09:17:30

Hi 
I need to increment the code as in below sequence
S001 to S999
after that it shall start 
Q001 ... Q999 and sequence follows

O
M
L
K
J
I
H (except H999)
G
F
E
B
A
can anyone help me with logic (javascript is preferred)
Permission Issues on MacOS with Git
Published: 2021-06-25 09:02:28

Greetings, to those whom pondered here!

> I am currently embarking a journey at Hack Reactor and wanting to catalog some of things I learn on my own or during that day. I hope that you will join me in this process!

This has been a bit of an inconvenience for me personally, has been permission denied in the terminal when using git. It appears that I was finally able to fix this today and I wanted to share this to anyone who may have experienced similar issues as I have.

Linux users, don't leave just yet! ***This should also apply to linux as well!***

If you are receiving permission errors with the `~/.config` directory, then it could mean that the permissions are restricted or it does not exist yet. These steps should help address these concerns.

1. Open your terminal, and type in:
    ``` terminal

       cd ~/

    ```
    >
    * `cd` - **c**hange **d**irectory
    * `~/` - the `$HOME` path (i.e. `/Users/{username}`)

2. We want to list all of our files and who currently owns the `.config`. In your terminal, type in:
    ``` terminal

       ls -all

    ```
    > 
    * `ls` - **l**ists directory contents
    * `-all` - does not ignore entries starting with .

3. Check to see if it is set to root. If it is set to root, then type in:
    ``` terminal

       sudo chown -R $(whoami) .config

    ```
    >
    * `sudo` - **su**per user **do** `/soo·dow/`. A command to override permission. Be cautious with this power!
    * `chown` - **ch**ange file **own**ership
    * `-R` - to modify the permissions *__R__ecursively*
    * `$(whoami)` - displays the current logged-in user.
    * `.config` - this is just the file name.

You can apply this to any situation where you need to change who owns the file!

**Disclaimer!** *Please proceed with caution. I am not liable for any security/permission concerns or issues that you may run into. If there are concerns, please research before proceeding.*
Storyblok (Headless CMS)
Tags: storyblok, vue
Published: 2021-06-25 08:41:31

Storyblok allows you to design certain pages and components of your website using CMS, but then you can inject them into a modern front end framework like Nuxtjs on page load. This allows designers and devs to work together in harmony, although it does take some initial setup. It means that Designers can make quick changes without consulting devs. It is an example of a Headless CMS -> more details here: https://www.storyblok.com/tp/headless-cms-explained

The demo:

If you edit anything on Storyblok and press publish it will be reflected in the local host project

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ogaqg0yg9m9xj2mroocr.png)
 
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9w9ee4vwjaimn37c6v6d.png)

The json calls to Storyblok on page load:
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/axcfztvmvj0zrvif7vi4.png)
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n3b8k1mprn28x77im837.png)
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4tc8hjy8t6rrcxdqazgm.png)
  
 ![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1et6eekj5qa97qvw54oj.png)
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6gp3wpb9b2juy7p1454d.png)
pdb | ipdb in docker-compose, enable interactive debugging
Tags: pdb, python, docker
Published: 2021-06-25 08:29:44


__`pdb`__ is a powerful debugging tool that is included as a Python standard library. It can seriously speed up, our debug process, while resolving certain bugs

for this 

## Problematic 

Trying to initiate the `pdb` in your `docker-compose` container will result in the following error. 

```shell
...
...
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/backend/app.py", line 25, in test_response
    return response
  File "/backend/app.py", line 25, in test_response
    return response
  File "/usr/local/lib/python3.9/bdb.py", line 88, in trace_dispatch
    return self.dispatch_line(frame)
  File "/usr/local/lib/python3.9/bdb.py", line 113, in dispatch_line
    if self.quitting: raise BdbQuit
bdb.BdbQuit

``` 

that happens only if you try to run `pdb` in `docker-compose` and not via ` docker run ...`, due to `up` not being an interactive command by design.  
more on this topic: https://github.com/docker/compose/issues/4677

you can try in out yourself:

step 1.  clone the repo setup repo with the minimal `Flask` app in `docker-compose`. 
`https://github.com/zahaar/docker-pdb-interactive-debugging/
`
step 2. `cd docker-pdb-interactive-debugging`
step 3. checkout on `docker-error` branch
`git checkout docker-error`
step 4. run `docker compose up`, or `docker-compose up` if you are using old docker CLI version
step 5. in a separate shell run `curl` command.  
`curl -XGET 'http://localhost:5000/api/v1.0/the_answer' `

you would see the expected `pdb.DdbQuit` exception error:
```
...
...
  File "/usr/local/lib/python3.9/bdb.py", line 113, in dispatch_line
    if self.quitting: raise BdbQuit
bdb.BdbQuit
```

## Solution

`pdb` expects an open TTY, so let's add it to our `compose` file

```
...
...
    ports:
      - '5000:5000'
    stdin_open: true # für pdb
    tty: true # für pdb
```

Let's try recreating the steps:

Step 1. `git clone https://github.com/zahaar/docker-pdb-interactive-debugging/`, but on a `main` branch this time
Step 2. `docker compose up`
Step 3. In a separate shell window attach local input to a running container, by running.  
`docker attach docker-interractive-debugging_api_1 // container name`
> Note we have this capability only after opening an TTY for our container

Step 4. In a separate shell window run.  
```
curl -XGET 'http://localhost:5000/api/v1.0/the_answer'
```
Step 5. now in the window where container output was `attached` you would see, `pdb` waiting for commands.  
you can:
* `p true_response` to print the value of the variable `true_response`
* `c` to resume normal flow
* to all other crazy things with `pdb` !!!

That's it. Easy.

> __Important Note__: to stop attached window without stopping the __main__ running container, you have to use,  
escape sequence: `CTRL + p -> CTRL + q`



## Tip:
checkout `pdb` commands cheatsheet {% gist https://gist.github.com/zahaar/86da3129a71517fb3462bdc56c4ea1e3 %}
get number of product in each category with mongodb aggregate
Published: 2021-06-25 08:18:16

In one project, the Android developer asked me to give me an API that can show product categories with the number of products in each category; the best way to create this API in MongoDB is to use the 'aggregate' operator.
This was my category schema.
```
const mongoose = require("mongoose");
const { s, rs, n, ref } = require("../utils/mongo");

var schema = new mongoose.Schema(
  {
    user: ref("user"),
    name: { ...rs, unique: true },
    description: s,
    image: s,
    view: {
      ...n,
      default: 0,
    },
  },
  { timestamps: true }
);

module.exports = mongoose.model("category", schema);
```
and you can see my controller in below
```
module.exports = {
  getAll: async (req, res) => {
    await Category.aggregate([
        {
          $lookup: {
            from: "products",
            localField: "_id",
            foreignField: "categories",
            as: "products",
          },
        },
        {
          $project: {
            _id: 1,
            name: 1,
            products: { $size: "$products" },
            description: 1,
            view: 1,
            createdAt: 1,
            updatedAt: 1,
          },
        },
      ]).exec(function (err, result) {
        if (err) throw err;
        res.send(result);
      });
  },
```
and this is postman result

![postman result](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lsqz60jwctplm2lqbmcn.png)
How to get XPath of HTML element?
Tags: xpath, html
Published: 2021-06-25 08:01:50

Follow the below steps to get XPath of HTML element.

**Step 1:** Open browser, I am using Chrome

**Step 2:** Go to https://www.google.com/ 

**Step 3:** Right-click on the element of which XPATH is needed. 

![Right-click on the element](https://cdn.hashnode.com/res/hashnode/image/upload/v1624443884084/bzZJIvDgu.jpeg)

**Step 4:** Click on Inspect 


![Click on Inspect](https://cdn.hashnode.com/res/hashnode/image/upload/v1624444173491/wfEaRn3MQ.png)

**Step 5:** Right click on HTML tag (input tag) and follow till *Copy XPath* and click on it. Voila! 🎉 XPath is copied to your clipboard.

![Right click on HTML tag (input tag) and follow till Copy XPath](https://cdn.hashnode.com/res/hashnode/image/upload/v1624443920045/oiV3gaL1V.png)

Read more about XPath at https://developer.mozilla.org/en-US/docs/Web/XPath

## Thank you!

⚠ Check out original blog [here](https://ajaygalagali.hashnode.dev/how-to-get-xpath-of-html-element)
Azure Cloud Basics YouTube explanation in TAMIL
Published: 2022-07-05 10:49:05

---
title: Azure Cloud Basics YouTube explanation in TAMIL
published: true
date: 2021-06-25 07:57:44 UTC
tags: 
canonical_url: https://lkgforit.com/azure-cloud-basics-youtube-explanation-in-tamil
---

See the below video for Learning basics in Azure Cloud in Tamil language.

[https://youtu.be/ZBABY2NVwH0](https://youtu.be/ZBABY2NVwH0)

Please follow this YouTube channel for more videos like this:

[https://www.youtube.com/channel/UCnYzqHl\_und412jN2RTjJVA](https://www.youtube.com/channel/UCnYzqHl_und412jN2RTjJVA)
How to add images to README.md on GitHub?
Tags: github, readme, markdown, documentation
Published: 2021-06-25 07:57:12

This is such a simple✔ thing, but I struggled a bit when I was a newbie to [GitHub][github] and [Markdown][md]. I wanted to add screenshots of the project but was stuck😥 for a long time uploading images on markdown.
 
There are multiple ways of adding images to the Gituhub Readme file, I am going to explain to you the easiest I feel. Let's get started 😄

#### 1. Open your README file in your Github Repository

![Open Readme file.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1624548220650/67PBMW6yi.png)

---

#### 2. This is the image to be uploaded to README

![Image to be uploaded.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1624548483112/EzQdh-dYL.png)

---

#### 3. Drag and drop the image file on README editor

![Drag and drop.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1624548361713/Ilt_LriQY.png)

---

#### 4. Image will be uploaded to the Github server

![Uploading to Github server_LI.jpg](https://cdn.hashnode.com/res/hashnode/image/upload/v1624548626208/Xo1wOU4Rt.jpeg)

---

#### 5. Link to the uploaded image is generated by Github

![Uploaded.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1624548727034/U5H7k_4S81.png)

---

#### 6. Click on the preview 

![Preview_LI.jpg](https://cdn.hashnode.com/res/hashnode/image/upload/v1624548827463/ZL1SVR7MH.jpeg)

🥂 Voila! 

If you are wondering 💭 "What is *WhatsBin* ?", go check [this][whatsbin] blog post ✔

> 🤝 Thank you 

*See you in the next blog* 👋

⚠ Check out original blog [here][hn]


[github]:https://github.com/
[md]:https://en.wikipedia.org/wiki/Markdown
[whatsbin]:https://ajaygalagali.hashnode.dev/how-to-paste-on-pastebin-using-whatsapp

[hn]:https://ajaygalagali.hashnode.dev/how-to-add-images-to-readmemd-on-github
Top 9 Must Have Chrome Extensions.
Published: 2021-06-25 07:56:22

1. **Todo List** : [Todo List](https://t.co/gcgLtfvs4S?amp=1)
2. **Screencastify** : [ScreenCastify](https://t.co/nq4HWLBCfa?amp=1)
3. **MemoRise** : [MemoRise](https://t.co/1yxEwAEMnH?amp=1)
4. **Dark Reader** : [Dark Reader](https://t.co/8iRweNQiWY?amp=1)
5. **Save to Pocket** : [Save to Pocket](https://t.co/Lq8ssWdZRt?amp=1)
6. **OneNote web clipper** : [OneNote web clipper](https://t.co/RiORKxGqeV?amp=1)
7. **Bitly** : [Bitly](https://t.co/Do5z35WOtW?amp=1)
8. **Vimium** : [Vimium](https://t.co/SJFIKme2kV?amp=1)
9. **Google Keep** : [Google Keep](https://t.co/3OVB1rFlhQ?amp=1)

_I hope you like these **chrome extensions**_.
Laravel Apache hide .env and several security settings via .htaccess & hide .env password on debug
Tags: php, laravel
Published: 2021-06-25 07:56:03

ON .htaccess Add = 

```
   Options -Indexes

   <Files ~    
    "\.(env|json|config.js|md|gitignore|gitattributes|lock)$">
        Order allow,deny
         Deny from all
    </Files>

  
   <Files ~ "(artisan)$">
       Order allow,deny
       Deny from all
    </Files>

   <Files *.php>
      Order Deny,Allow
      Deny from all
   </Files>

   <Files index.php>
     Order Allow,Deny
     Allow from all
   </Files>


  ```

hide .env passwords in Laravel Debug output on config/app.php file add inside return
 
    ```
    return [

    'debug_blacklist' => [
        '_ENV' => [
            'APP_KEY',
            'DB_PASSWORD',
            'REDIS_PASSWORD',
            'MAIL_PASSWORD',
            'PUSHER_APP_KEY',
            'PUSHER_APP_SECRET',
        ],
        '_SERVER' => [
            'APP_KEY',
            'DB_PASSWORD',
            'REDIS_PASSWORD',
            'MAIL_PASSWORD',
            'PUSHER_APP_KEY',
            'PUSHER_APP_SECRET',
        ],
        '_POST' => [
            'password',
        ],
    ],
  `];`

 ```
Here is the story of my Self-Taught Developer coding journey how I get into coding.
Published: 2021-06-25 07:41:12

## My Coding Journey
I started learning ***Computer Science*** in 2020 When I was 12. I took the course [CS50](https://cs50.harvard.edu/x), shared by my father. In that course, they teach us the art of programming and how to think. Here is the [introduction video of that course](https://youtu.be/3oFAJtFE8YU).

While learning that course, I heard about ***Web Development***, ***hacking*** and other things related to **technology**, These things were the distractions, but then I started researching Web Development for a couple of weeks and other things.

I learned Web Development and other things while learning that course, then continued that course. So, After completing that course, Right Now I'm learning [Mobile App Development With React Native](https://cs50.harvard.edu/mobile).
http://cs50.harvard.edu/%20game%20developemnt
Here are the resources that might helpful for you:

- **Learn Computer Science, [CS50 Introduction to computer science](cs50.harvard.edu/x) The course that I took.**

- **Learn [CS50 Mobile App Development With React Native](cs50.harvard.edu/mobile), Also The course I took.**
- **Learn [CS50 Game Development](cs50.harvard.edu/games)**

### Connect with me:
Twitter: https://twitter.com/ProCoder88 

LinkedIn: https://linkedin.com/in/ProCoder88

Github: https://github.com/maazshakeel
CUPID - Why every single element of SOLID is wrong
Tags: solid, architecture, principle, guideline
Published: 2021-06-25 07:37:33

---
title: CUPID - Why every single element of SOLID is wrong
published: true
description: A thought about Dan North's new approach to software design
tags: solid, architecture, principle, guideline
cover_image: https://cdn.pixabay.com/photo/2018/06/08/00/48/developer-3461405_960_720.png
---

SOLID is THE standard that comes to my mind when it comes to Guidelines of Software Design and Architecture. In March 2021, Dan North, a pioneered Software Consultant, wrote a [blogpost](https://dannorth.net/2021/03/16/cupid-the-back-story/) about SOLID and it's downsides while critically analyzing it.

I found this topic when listening to an [episode of the .NET Rocks podcast](https://www.dotnetrocks.com/default.aspx?ShowNum=1745). Dan is good in describing things and he has an absolute fantastic humor. 

He created a 5 minute presentation for an alternative to SOLID and the result was [this slideshow about CUPID](https://speakerdeck.com/tastapod/cupid-for-joyful-coding?slide=9).

As SOLID was quite hard to apply and gave you specific techniques on how to do certain things, his new approach CUPID, he suggested as an alternative, aims to be 'properties' instead of 'principles' for the code you're writing. It seems much more easy to understand and doesn't give you strict techniques. In his words he gives a leightweight guide on how code should be to be 'joyful'. 

In the mentioned podcast episode he gave the example that fresh software engineers coming from university applying SOLID to legacy production code will sometimes end in a mess because they're too enthusiastic about applying the technical rules, SOLID contains.

I know this problem very well because when I learned about SOLID, I sometimes found code that was not designed to follow at least one of the principles **but it was well working code that had a structure that someone has thought about catchy**. 

If I would have applied the properties of CUPID, I would have seen the code with other eyes, I guess.

I see why Dan North rethought the SOLID principles. Not everything about SOLID is bad, that's why it proofed to be an unstated standard.

I, for myself, will try to apply CUPID to code I change and write because in my eyes it has the potential to be a new standard. Additionaly it is a lot easier to explain to coworkers, trainees and students. 

I think it can bring even more joy to coding and thats what we all need so badly.
Udemy Course Give away...
Tags: github, webdev, giveaway
Published: 2021-06-25 07:28:16

Hello friends...

I am doing a giveaway for my Git and GitHub Udemy course today.
Feel free to take it using the free coupon link below.

If you would like to share with your followers on Twitter or other platform, that would be great.

Here is a free coupon link
https://udemy.com/course/complete-git-and-github-course-beginner-friendly-approach/?couponCode=ZINOTRUST-FREE

Would really appreciate it if you tag me on the tweet/post.
My Twitter handle is @zinotrust 

**My Website:**  [ZinoTrustAcademy.com](https://zinotrustacademy.com/)  
**My YouTube Channel:**  [ZinoTrust Academy ](https://www.youtube.com/channel/UClXxZm-GQr4S-NsHGIXgg4Q) 

Cheers and have a great day.
Next big thing about custom software development company 2021
Published: 2021-06-25 07:01:00

What is custom software?
Custom software is developed for a particular company to cover its critical functions or fill the gaps present in existing IT solutions. Customized software is generally designed for a single client, or a group of clients (customers) who decide what kind of functionality and processes the software should possess.

Artificial intelligence (AI) - Artificial intelligence has become one of the most lucrative options for effective custom software development. We have the resources and intelligence to deploy AI solutions that transform businesses and serve end-to-end purposes. With the help of AI we can made delivery by drones or something else, AI-powered products and solutions will become the norm. For instance, as Teradata reported, nearly 80% of enterprises invest in AI-enabled tools and technologies. 

IoT (Internet of Things)- The prime example of innovation in IoT will be sensor-enabled pill bottles brought forth by Eli Lilly and Company bolstered the patient experience. A study conducted by Ericsson states that there will be nearly 22 billion internet-connected devices in the next 3-4 years.

Next-gen programming languages- It is also essential to note the rise of the coding language Rust in 2021. The reason why the language is gaining traction is mainly due to its potential adoption by Microsoft. Therefore, the language that first was considered a hobby among coding enthusiasts is becoming a major player.

Rise of native app tools- Native applications serve specific devices and often streamline the user experience in comparison to hybrid applications. Native tools can enhance the application’s performance, and businesses are aiming to employ the technology to derive the user experience. The advent of new challenges such as virtual learning, remote work, cloud computing, and more, custom solutions will shape these areas for a better experience. 

Blockchain technology- The worries for data security and breaches are becoming more relevant today, blockchain offers a secure landscape to minimise distress. It can pave the way for forging processes that are ideal for upholding stringent safety standards where data exposure can be sensitive—for instance, the misuse of financial documents, identity theft, personal information, and more.