teleren/devto huggingface dataset:
Gatsby wordpress
Tags: gatsby, wordpress
Published: 2021-08-02 12:17:56

Hello there
I am trying to add a path prefix for blog-post.js
Explanation:
everything works fine i add
Static pages index, blog ....
i change the path on the gatsby-node.js
i see the preview of my wordpress on my blog page but when i click i got a 404

gatsby-node.js


```
const { postsPerPage } = graphqlResult.data.wp.readingSettings
const postsChunkedIntoArchivePages = chunk(posts, postsPerPage)
const totalPages = postsChunkedIntoArchivePages.length
return Promise.all(
postsChunkedIntoArchivePages.map(async (\_posts, index) => {
const pageNumber = index + 1
const getPagePath = page => {
if (page > 0 && page <= totalPages) {
// Since our homepage is our blog page
// we want the first page to be "/" and any additional pages
// to be numbered.
// "/blog/2" for example
return page === 1 ? `/blog/` : `/blog/${page}`
}
return null
}
```

when i click on a post i got 404 and i see my post at root
Search:

```
/hello-world/
/404.html
/404/
```

Any idea Thanks
All You Need To Know About Project Collaboration At Workplace

Tags: productivity
Published: 2021-08-02 12:15:30

Collaboration is the need of the hour for modern enterprises to stay productive and competitive. In the online project management domain, collaboration happens in producing or creating ideas, solutions, points of view, proposals, reports, etc. T here are just so many different project collaboration software available for us to collaborate bringing optimal information and ideas. So let us simply jump on to the tools and best practices for collaboration .

<h2>4 Tools Useful For Project Collaboration</h2>

<h3>1. G Suite (Google Suite)</h3>
It is one of the best-known task management apps for collaboration and lives up to the hype as the name implies. G Suite is a suite of different applications from Google used by all .
When sharing access control, add comments and highlights with other documents like PDF for JPEG files uploaded to drive. Get security features like permissions, multi-factor authentication, automated security alerts, and access control with G Suite.

<h3>2. Microsoft 365</h3>
Just like G Suite, Microsoft 365 comes with tools for cloud storage, email, video, and voice conferencing through Teams. Microsoft 365 allows for real-time collaboration, sharing, and access control for apps.
As Word, Excel, and PowerPoint, depending on which plan you choose some applications are not available as cloud-based. Say for example a database management tool is only available as a desktop application.

<b>Original Source : <a href="https://www.taskopad.com/blog/project-collaboration-software/">Project Collaboration Software </a> </b>
Mobile Security Framework (MobSF) for automated Mobile security testing
Tags: security, mobile
Published: 2021-08-02 12:12:44

Security in technology is a big thing, and for a reason. Up till June 2021, there are already 9.8 million records breached.

Scary thoughts, right? That is one reason people put a lot of effort into securing their applications.

With this, we can't forget our mobile applications. Seeing as they have become such a prominent element in our day-to-day lives, we need to make sure our user's data is secured.

In this article, we'll look at the risk we have while building a mobile application, as well as some basic steps we can take to protect our application. And last but not least, a mobile security framework called MobSF that can help us by doing a lot of checks in the background and make our applications more secure.

Before we get into ways to get started with mobile security, let's look at what kind of breaches we should be worried about when we talk about mobile security.

## Mobile security risks

With mobile breaches, we can talk about a wide range of issues that come with it. Below, I'll explain some of the problems at hand and what they mean for your end-user.

### Customer information

A common risk is the theft of your user's data. Data is often breached by extracting database or login information. Which in turn is not good! Common laws in place to protect customer data once should be on their a-game when securing this data.

Also, be aware that customer information can be several things, meaning a link between systems or basic contact details. Please don't neglect the fact that it's valuable for hackers to know the link between your website and, for instance, a social media account.

### Financial information

Perhaps one of the worst ones is financial information. This includes payment hijacking and the theft of credit card information—something no one ever wants to experience.

### IP Theft

Imagine having a popular app, but it's not available in the stores, only via own downloads. Someone with bad intentions might put an infected copy on the stores to retrieve data using your name and application status!

### Brand confidence

As the app builder and owner, you will lose brand confidence when security breaches are reported. Imagine if it turns out some website lost all your data. Indeed you are worried about ever using it again.

For me, this is really important and often not thought about enough. Data theft is one thing, but how does your app or company revolver as a brand from this.

You might have seen the news about Facebook or Netflix having security issues; how do you personally feel about this? I always try and reflect and see how I would feel about this.

Please visit this article on the [aviyel.com](https://aviyel.com/) to know about these features in detail,

> [https://aviyel.com/post/519/mobile-security-framework-mobsf-for-automated-mobile-security-testing](https://aviyel.com/post/519/mobile-security-framework-mobsf-for-automated-mobile-security-testing)
A Fun Programming Joke To Start Your Day
Tags: jokes, dailydeveloperjokes
Published: 2021-08-02 12:00:22

---
title: "A Fun Programming Joke To Start Your Day"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1259082460c.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ Why do kayakers make bad programmers?

___A:___ Because they're afraid of waterfall.
 -->
Multi Thread Model 
Published: 2021-08-02 11:10:09

In multi thread model the server assigned incoming request to the new thread . Similar as a client server architecture the user generate a request while interacting with the application and then send to the server . 

The every times a new request comes in the server map a new thread from thread pool to the incoming request then the thread is responsible for process that request and sending back the response . 

> ***The number of thread is equal to the number of thread used from the thread pools .***


Now , the thread present in the thread pools are limited to the based on the resource available . 


If we look closely we will find the limitation of multi thread model . Suppose we have millions of request coming in per second are the thread present in the thread pools are limited number there will be situation where all the thread are exhausted from the thread pools in that situation a incoming request has to wait until a thread process the last request and return back the result . 


*This is a situation of scalability which could be resolve by adding more resource and creating more thread inside the thread pools .*

**Limitation of Multi Thread Model :** 
- In multi-thread model , for every request server creates a separate thread which handles that request . 
- If a thread acquired a lock in the shared resource and it is 'exclusive lock ' it will block other threads .
First 7 Days of #100DaysOfCode
Tags: beginners, 100daysofcode, webdev, challenge
Published: 2021-08-02 11:09:38

#Just do it!

Right! That is what most of us will see or hear as the word of advice when starting to learn something. It's cliche but it is literally the first step to anything, the initiative. 

###How did I start? 

So first, this is not the first time I took on the `#100DaysOfCode` challenge. I have tried and failed to keep myself accountable, countless times. I have failed not once, not twice on this challenge as I easily burn myself out. But I guess, that's really how we learn - *by making mistakes*. 

###How its going? 

Its going not as smooth and not as I've imagined. But I have learned that *failing is okay and normal*. The past 7 days have been a satisfying start for me because I let myself stumble, hit the roadblocks purposely, and learn at my own pace. 

In about a week, I have finished 2 Front End challenges from [https://frontendmentor.io] and you can see it all live on my [Github](https://github.com/IMVillarosa) and [Codepen](https://codepen.io/navimarcial)

***

#The next 7 days!

Today is my 8th day and I aim to complete more challenges to test the knowledge I have with HTML, CSS and JavaScript. I will try to make this journey fruitful by being consistent and one way to do that is by having someone who can keep you accountable other than yourself. 

So I'm encouraging you to join me and start this challenge. See how far you'll go by doing something you love! [Start your journey now](https://https://www.100daysofcode.com/).

###What I'm currently working on?

I'm diving deeper on more CSS and I'll be incorporating a mixed layout like Flexbox and Grid. So on the next 7 days, I'm hoping to be able to implement it on the challenges and projects I'll be making such as my official website portfolio.

###Resources

I highly suggest [Kevin Powell](https://www.youtube.com/user/KepowOb)'s YouTube videos and his [FREE 21-Day Challenge](https://courses.kevinpowell.co/courses/conquering-responsive-layouts/) about responsive layouts if you want to learn more about CSS and responsive design. 

***

#Acknowledgements

Sincerest appreciation to my fiance who supports me as I go through this `#100DaysOfCode`! :) 

##Stay updated on my journey by following me on [Instagram](https://instagram.com/navimarcial).
Problem while converting rdlc to al
Published: 2021-08-02 10:55:33

During convertion of RDLC to AL format,am getting such errors like finsql not recognized,kindly help me throught out the error,and also i attach the syntax of the convertion

Export-NAVApplicationObject -DatabaseName 'Demo Database BC (14-0)' -Path 'D:\Demo\Modified\Report206.txt'-DatabaseServer DESKTOP-IE0BQ5E\BCDEMO -ExportToNewSyntax -Filter 'Type=Report;Id=1306'

finsql.exe Command=ExportToNewSyntax, File="C:\Users\admin\Desktop\RP1.txt", Database="Demo Database BC (14-0)", ServerName=".\BCDEMO" ,Filter=Type=report;ID=1306
Need help with writing JavaScript using prototypes
Tags: javascript
Published: 2021-08-02 10:52:05

I've bought a Bootstrap + jQuery SAAS Theme which I'm now trying to edit to fit my companies brand. However, the JavaScript is written in a very interesting manner unfamiliar to me, with functions being inside a prototype of an object. This is very different to what I'm used to which is writing DOM manipulations just as a function. I'm looking for any guidance on this as well as any tutorials if there are any out there. So far, every JavaScript tutorial that I have managed to find only covers the very basics of prototypes. It has been very difficult to find any practical guide on how to use them as well as advantages and disadvantages of doing so in comparison to the common way of writing JavaScript. 

I've attached a couple of images to illustrate what I'm talking 
about.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1ettqmbk4via41fx6fkj.png) 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/idri5aiesiujnfd3w4dh.png)
Unofficial Fiverr API: New way to get your Fiverr Data
Tags: python, fastapi, fiverr, showdev
Published: 2021-08-02 10:52:04

Hello all,

I'm a freelancer on Fiverr and a Python Developer. Recently, I thought about integrating Fiverr reviews on my portfolio. 

I started digging for an official or already existing API that I can use to fetch and show them on my portfolio. But I didn't find any, so I took this opportunity to build one.

## Presenting Unofficial Fiverr API 🎉

### Features:
* Get seller details 🙋‍♂️
* Get seller gigs details 💼
* Get seller reviews 🌟
 * Group by buyers
 * Filter by Impression
 * Sort by time or relevance
 * Limit no. of reviews(added in v1.2)

It's built with Python FastAPI and hosted on Vercel.

Now you can integrate your Fiverr reviews into your portfolios or anywhere.

[API Documentation](https://fiverr-api.vercel.app/docs)

[Source code](https://www.github.com/salmannotkhan/fiverr-api)

[Checkout my other projects](https://www.github.com/salmannotkhan)
How to stop child elements from inheriting parent element's onClick in React
Tags: react, nextjs, webdev, tutorial
Published: 2021-08-02 10:51:52

So you created a div with an onClick that redirects to a link or does any normal function. But that div also contains child elements that would do different functions or nothing at all, and are still doing the parent element's function. There is a very simple solution to fix this.

Suppose this react code:

```react
import React from 'react'

const NormalReactElement = () => {
   return (
      <div onClick={() => console.log('Parent Element!')}>
         <div id="child-element">
            <p>I am a child element</p>
         </div>
      </div>
   )
}
```

So how do you fix this? Here's how you can fix this:

```react
const NormalReactElement = () => {

   const handleChildElementClick = (e) => {
      e.stopPropagation()
      // Do other stuff here
   }

   return (
      <div onClick={() => console.log('Parent Element!')}>
         <div id="child-element" onClick={(e) => handleChildElementClick(e)}>
            <p>I am a child element</p>
         </div>
      </div>
   )
}
```

Hope you like the quick solution to this, I'll see you in the next article.
What are Design Patterns ?
Tags: designpatterns, learning
Published: 2021-08-02 10:07:30

We see the Wikipedia definition for Design pattern, it says :

*"In software engineering, a design pattern is a general repeatable solution to a commonly occurring problem in software design. A design pattern isn't a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations."*

Design Pattern can be applied to multiple different context. In can be applied to the game, web application or a mobile application etc. It really doesn't matter what you are designing. They are reusable as well.

Problem -

Create a class with a single instance & that instance will be accessed by all other classes as well.

Solution -

Singleton Design Pattern is the best solution for the above use case.


So every design pattern has a set of rules or specifications for solving the problem. Based on the use case we have to apply the design pattern strategies to our problem while designing the solution which can be flexible, reusable & maintainable.


There are 3 different types of Design Pattern -
1. Creational
2. Behavioral
3. Structural

**When should we use the design patterns?**
We must use the design patterns during the analysis and requirement phase of SDLC(Software Development Life Cycle).

Design patterns ease the analysis and requirement phase of SDLC by providing information based on prior hands-on experiences.

Thanks !!


Keep Learning :)
Day 8 - Maximum Number of Words You Can Type
Published: 2021-08-02 10:28:23

###Day 8 - Maximum Number of Words You Can Type

Problems and my solutions can be found in my GitHub repo along with all other problems I have solved till date.

[Leetcode](https://leetcode.com/problems/maximum-number-of-words-you-can-type)
[GitHub link to problem and solution](https://github.com/abh1navv/leet-code/tree/master/maximum-number-of-words-you-can-type)


You can connect with me at &nbsp;
[LinkedIn](https://www.linkedin.com/in/abh1navv)
[Twitter/@abh1navv]
(https://www.twitter.com/abh1navv)
Put Footer at The Bottom with CSS Flexbox
Tags: css, flexbox, flex, layout
Published: 2021-08-02 10:17:07

I thought I knew how to use Flexbox to put a footer at the bottom until I read [@5t3ph](https://twitter.com/5t3ph)'s "[ModernCSS 01](https://moderncss.dev/keep-the-footer-at-the-bottom-flexbox-vs-grid/)". I used to wrap `<header>` and `<main>` in a `div` together along with a `<footer>` then add `justify-content: space-between;` on the body to make `<footer>` at the bottom. But Stephanie's solution is using `margin-top: auto;`! It's extremely inspiring.

To figure out this one trick I learned and discovered more things.

_By the way, the cover image is my solution, it's not bad, but it could be better._

- I've learned from Josh W Comeau's [CSS course](https://css-for-js.dev/) that flexbox is a completely different layout mode than "the normal one". And **margins don't collapse on flexbox**.
- For block level elements (with certain width size), the `auto` value of margin would take up all available space in the given direction (left/right). This is why we use `margin: 0 auto;` to center a block element.
- Because there's no margin collapse on flexbox, when apply an `margin-top: auto` to an flexbox element, the margin would horizontally take up that available space, just like the vertical effect on block elements. This is why there's a `margin-top: auto;` trick in Stephanie's solution.

In [this pen](https://codepen.io/cyishere/pen/xxdYGwo) I put in an `article` block with `margin-left: auto;` for compare.

I hope this article could help people know more about CSS flexbox.
Difference between include, require, include_once and require_once in PHP
Tags: php, webdev, beginners, programming
Published: 2021-08-02 09:33:50

First of all we should know what is the difference and similarity between include() and require(), include() and require() are used to include other files into a PHP file, and the difference between them are the include() generates a warning when there is an error, but the script will continue execution, otherwise, the require() generates a fatal error, and the script will stop.

The require_once() statement is similar to require() except require_once() will check if the file has already been included, and if so, it will not require it again, same with include_once().
GraphQL Federation Crypto App
Tags: graphql, crypto, react
Published: 2021-08-02 09:22:55

In this video I show you how to use GraphQL Federation by building a Crypto App. I will use React, Apollo GraphQL and a DataStax Astra database.

0:00 Introduction
1:38 Setting up our Database
3:48 GraphQL API and Playground
7:31 Schema-first approach
14:51 Inserting Coins
18:30 Creating our React App
23:17 Apollo Gateway and Services
51:22 Building out the Frontend
1:14:14 Styling our Project

Final code here: https://github.com/kubowania/graphQL-federation-crypto

Promos codes in this video:
💻 ANIA200 for $200 free credits from https://www.datastax.com/
💻 ANIAKUBOW for 3 months free of Webstorm here: https://jb.gg/webstorm_ide

{% youtube T722_t-HTFw %}
___
⭐ New to code and none of this is making sense? Watch my '12hr+ YouTube Coding Bootcamp' in which you will learn HTML, CSS and JavaScript Fundamentals completely from scratch. It's on my channel and its 100% free.

⭐ In most videos I use Tabnine as my A.I autocompletion tool. You can download it for free here: http://bit.ly/tabnine-top-tool

⭐ You can get a blockchain domain with my affiliate link here: http://bit.ly/get-a-crypto-domain

⭐ If you would like to buy me a coffee, well thank you very much that is mega kind! : https://www.buymeacoffee.com/aniakubow

⭐ Sign up for weekly coding tips from my newsletter partnership: https://bit.ly/JS-tips

You can also find me on:
Twitter: https://twitter.com/ania_kubow
Instagram: https://instagram.com/aniakubow
Why I shifted from C++ to JavaScript.
Tags: javascript, cpp
Published: 2021-08-02 09:17:26

In this article I will talk about shifting from a compiled language (CPP) to an interpreted language (JS).

## Introduction
I have been coding for almost 3 years now and my native language has been C++ for most of that time, but recently I have been preferring JavaScript and I will cover why in this article.

## Which is better?
Answering this question depends on what do you want to achieve, for example if you want speed then you should definitely choose C++, you can look up tons of comparisons online between the two languages.

## Why am I preferring JS recently.
* I am a very lazy person and I try to use my brain capacity to the very bare minimum, so using a tool that handles my frontend and backend at the same time saves me the hassle of integrating things together if they are of a different language.
* It takes a whole lot less time (and brain capacity) to learn, I didn't even realize how hard C++ was until like a year later, but this will significantly help you as a software engineer.
* You can do so much with so little code, for example let's say you have an array of animals that has a name and species:
```
var animals = [
  { name: 'Fluffykins', species: 'rabbit' },
  { name: 'Caro',       species: 'dog' },
  { name: 'Hamilton',   species: 'dog' },
  { name: 'Harold',     species: 'fish' },
  { name: 'Ursula',     species: 'cat' },
  { name: 'Jimmy',      species: 'fish' }
]

```
and you want to copy the names of all the animals to another array, the normal way to do this is by:
```

var names = []
for (var i = 0; i < animals.length; i++) {
  names.push(animals[i].name)
}

```

### taking up 87 characters

but thanks to JavaScript's ES6 arrow functions we can do this in literally one line:

```
var names = animals.map((x) => x.name)
```

### taking up 38 characters

you literally just saved up writing 49 characters for yourself, if you can't see beauty in this I don't know when will you ever do.
## Last word
Again this is not a comparison at all, I am just stating my personal experience, you should use what's best for what you are working on and what you feel most comfortable with. Thanks for reading.