Skip to content

Commit

Permalink
Merge pull request #1862 from bgoonz/preview
Browse files Browse the repository at this point in the history
  • Loading branch information
bgoonz authored Mar 14, 2022
2 parents 838db16 + 0db26e7 commit d631f7e
Show file tree
Hide file tree
Showing 43 changed files with 12,064 additions and 375 deletions.
3 changes: 0 additions & 3 deletions .env

This file was deleted.

21 changes: 0 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,4 @@






















# Logs
logs
*.log
Expand Down
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engines" : { "node" : ">=0.15" } }
{ "engines" : { "node" : ">=0.14" } }
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.15.0
v17.6.0
14 changes: 7 additions & 7 deletions docs/content/DS_ALGO/algorithms/sets/permutations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ It has to be exactly `4-7-2`.

## Permutations without repetitions

A permutation, also called an arrangement number or order, is a rearrangement of
A permutation, also called an "arrangement number" or "order", is a rearrangement of
the elements of an ordered list `S` into a one-to-one correspondence with `S` itself.

Below are the permutations of string `ABC`.

`ABC ACB BAC BCA CBA CAB`
```MATH
ABC ACB BAC BCA CBA CAB
```

Or for example the first three people in a running race: you can't be first and second.

**Number of combinations**

```
```MATH
n * (n-1) * (n -2) * ... * 1 = n!
```

Expand All @@ -29,11 +31,9 @@ n * (n-1) * (n -2) * ... * 1 = n!
When repetition is allowed we have permutations with repetitions.
For example the the lock below: it could be `333`.

![Permutation Lock](https://www.mathsisfun.com/combinatorics/images/combination-lock.jpg)
###### Number of combinations

**Number of combinations**

```
```MATH
n * n * n ... (r times) = n^r
```

Expand Down
30 changes: 17 additions & 13 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,31 @@
*
* See: https://www.gatsbyjs.org/docs/browser-apis/
*/

// onPreRouteUpdate() and onRouteUpdate() are called before onInitialClientRender,
// use initialized flag to ensure that window.onGatsbyPreRouteUpdate() and
// window.onGatsbyRouteUpdate() will not be called before
// window.onGatsbyInitialClientRender() has run
let initialized = false;

exports.onInitialClientRender = () => {
initialized = true;
if ( 'onGatsbyInitialClientRender' in window && typeof window.onGatsbyInitialClientRender === 'function' ) {
window.onGatsbyInitialClientRender();
}
if ( 'onGatsbyRouteUpdate' in window && typeof window.onGatsbyRouteUpdate === 'function' ) {
window.onGatsbyRouteUpdate();
}
initialized = true;
if ('onGatsbyInitialClientRender' in window && typeof window.onGatsbyInitialClientRender === 'function') {
window.onGatsbyInitialClientRender();
}
if ('onGatsbyRouteUpdate' in window && typeof window.onGatsbyRouteUpdate === 'function') {
window.onGatsbyRouteUpdate();
}
};

exports.onRouteUpdate = () => {
if ( initialized && 'onGatsbyRouteUpdate' in window && typeof window.onGatsbyRouteUpdate === 'function' ) {
window.onGatsbyRouteUpdate();
}
if (initialized && 'onGatsbyRouteUpdate' in window && typeof window.onGatsbyRouteUpdate === 'function') {
window.onGatsbyRouteUpdate();
}
};

exports.onPreRouteUpdate = () => {
if ( initialized && 'onGatsbyPreRouteUpdate' in window && typeof window.onGatsbyPreRouteUpdate === 'function' ) {
window.onGatsbyPreRouteUpdate();
}
if (initialized && 'onGatsbyPreRouteUpdate' in window && typeof window.onGatsbyPreRouteUpdate === 'function') {
window.onGatsbyPreRouteUpdate();
}
};
82 changes: 41 additions & 41 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
const siteMetadata = require( './site-metadata.json' )
module.exports = {
pathPrefix: '/',
siteMetadata: siteMetadata,
plugins: [
`gatsby-plugin-react-helmet`,
`gatsby-source-data`,
`gatsby-transformer-remark`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `pages`,
path: `${__dirname}/src/pages`
}
},
{
resolve: `gatsby-plugin-disqus`,
options: {
shortname: `webdevhub-1`,
}
},
{
resolve: `gatsby-plugin-sass`,
options: {}
},
{
resolve: `gatsby-remark-page-creator`,
options: {}
},
{
resolve: `@stackbit/gatsby-plugin-menus`,
options: {
sourceUrlPath: `fields.url`,
pageContextProperty: `menus`,
},
},
{
resolve: `gatsby-plugin-disqus`,
options: {
shortname: `webdevhub-1`
}
},
]
pathPrefix: '/',
siteMetadata: siteMetadata,
plugins: [
`gatsby-plugin-react-helmet`,
`gatsby-source-data`,
`gatsby-transformer-remark`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `pages`,
path: `${__dirname}/src/pages`
}
},
{
resolve: `gatsby-plugin-disqus`,
options: {
shortname: `webdevhub-1`
}
},
{
resolve: `gatsby-plugin-sass`,
options: {}
},
{
resolve: `gatsby-remark-page-creator`,
options: {}
},
{
resolve: `@stackbit/gatsby-plugin-menus`,
options: {
sourceUrlPath: `fields.url`,
pageContextProperty: `menus`
}
},
{
resolve: `gatsby-plugin-disqus`,
options: {
shortname: `webdevhub-1`
}
}
]
};
22 changes: 14 additions & 8 deletions gatsby-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@
//<script src={withPrefix('js/analytics.js')} /> }
* See: https://www.gatsbyjs.org/docs/ssr-apis/
*/
const React = require( "react" );
const withPrefix = require( "./src/utils/withPrefix" ).default;
exports.onRenderBody = function ( {
setHeadComponents,
setPostBodyComponents
} ) {
setHeadComponents( [
] );
/**
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/ssr-apis/
*/

const React = require("react");
const withPrefix = require("./src/utils/withPrefix").default;

exports.onRenderBody = function ({ setHeadComponents, setPostBodyComponents }) {

setHeadComponents([

]);
setPostBodyComponents( [ < React.Fragment >
< script src={ withPrefix( 'js/addthis.js' ) } />
< script src={ withPrefix( 'js/blm.js' ) } />
Expand Down
3 changes: 1 addition & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
publish = "public"
command = "npm run build"

[build.environment]
NODE_VERSION = "14"

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
"marked": "0.6.1",
"moment": "2.23.0",
"moment-strftime": "0.5.0",
"node-sass": "4.10.0",
"node-sass": "4.14.0",
"node-sass-utils": "1.1.2",
"react": "16.13.1",
"react-dom": "16.4.2",
"react": "16.5.1",
"react-dom": "16.13.1",
"react-helmet": "5.2.1",
"react-html-parser": "2.0.2",
"react-script-tag": "1.1.2",
"rehype-react": "3.0.2",
"sprintf-js": "1.1.2",
"pdfcrowd":"5.4.0"
"pdfcrowd": "5.4.0"
}
}
Loading

1 comment on commit d631f7e

@vercel
Copy link

@vercel vercel bot commented on d631f7e Mar 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.