From 1be2818a0826528699f28828bac88bfdebdd9c12 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Sirois Date: Tue, 30 Jul 2019 08:32:11 -0400 Subject: [PATCH] content: update content titles to match wanted format --- src/content/resources/javascript/callbacks/intro.md | 2 +- .../resources/javascript/iterative-vs-functional.md | 3 +-- src/content/resources/javascript/promises/intro.md | 10 +++++----- .../javascript/promises/simplifying-promises.md | 3 +-- src/content/resources/php/design-patterns/singleton.md | 9 ++++----- src/content/resources/python/basics.md | 3 ++- 6 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/content/resources/javascript/callbacks/intro.md b/src/content/resources/javascript/callbacks/intro.md index c490815..3d8826d 100644 --- a/src/content/resources/javascript/callbacks/intro.md +++ b/src/content/resources/javascript/callbacks/intro.md @@ -5,6 +5,6 @@ created_at: 2019/07/27 title: Callbacks --- -# Callbacks are everywhere +## Callbacks are everywhere If you've been doing javascript for any amount of time you'll have noticed that callbacks appear in just about every single piece of code. diff --git a/src/content/resources/javascript/iterative-vs-functional.md b/src/content/resources/javascript/iterative-vs-functional.md index a515781..2e9bd98 100644 --- a/src/content/resources/javascript/iterative-vs-functional.md +++ b/src/content/resources/javascript/iterative-vs-functional.md @@ -2,10 +2,9 @@ authors: - "veksen#1060" created_at: "2019/07/27" +title: Iterative vs Functional array helpers --- -# Iterative vs Functional array helpers - -- placeholder -- ## find diff --git a/src/content/resources/javascript/promises/intro.md b/src/content/resources/javascript/promises/intro.md index a57e13e..aefcd68 100644 --- a/src/content/resources/javascript/promises/intro.md +++ b/src/content/resources/javascript/promises/intro.md @@ -9,14 +9,14 @@ recommended_reading: - javascript/es6/arrow-functions --- -# A Promise to Keep +## A Promise to Keep A `Promise` in Javascript represents an action that has already started, but one that will be completed at a later time. Much like in real life, when you create a promise, you are expected to fulfill that promise. However, sometimes things go wrong where you can no longer fulfill a promise you made. This is essentially the main idea behind how promises work in javascript. -## Basics +### Basics When you create a Promise or call a function that returns a Promise in Javascript, you're left with an object that can either resolve into the actual value that you were promised, or it @@ -24,7 +24,7 @@ can reject and leave you with an error for why that promise failed. We can access these values using the `.then` and `.catch` methods on the `Promise` object respectively. -## A Simple Example +### A Simple Example First, let's explore a bit of a made-up example. Imagine we have a promise-returning function called `getMembers` that retrieves all the members in a discord server. When we execute this @@ -50,7 +50,7 @@ getMembers("The Programmers Hangout").then(members => { This way we are able to make sure that we only try to `console.log` when the `getMembers` function has resolved and ready to be used. -## Beginner Mistakes +### Beginner Mistakes Promises are possibly the #1 most common source of confusion for beginners. In order to avoid falling in pitfalls yourself, you have to remember 2 things about Javascript when @@ -85,7 +85,7 @@ getWeather("Los Angeles").then(weather => { }) ``` -## Real World Example +### Real World Example Here is a real function that gets character information from the Rick and Morty API. You can try it in your browser if you want to test it out. diff --git a/src/content/resources/javascript/promises/simplifying-promises.md b/src/content/resources/javascript/promises/simplifying-promises.md index ce4eff4..6d60e13 100644 --- a/src/content/resources/javascript/promises/simplifying-promises.md +++ b/src/content/resources/javascript/promises/simplifying-promises.md @@ -2,10 +2,9 @@ authors: - "Xetera#0001" created_at: "2019/07/26" +title: Simplifying Promises --- -# Simplifying Promises - -- placeholder -- The first naive attempt, using new Promise for something that already returns a promise. diff --git a/src/content/resources/php/design-patterns/singleton.md b/src/content/resources/php/design-patterns/singleton.md index 1ee26a0..cb7f3fa 100644 --- a/src/content/resources/php/design-patterns/singleton.md +++ b/src/content/resources/php/design-patterns/singleton.md @@ -2,10 +2,9 @@ authors: - "supergrecko#3434" created_at: "2019/07/27" +title: Singletons --- -# Singletons - A singleton is a class which is only instantiated once during runtime. This is done by keeping a static property containing its instance on the singleton class. There are multiple benefits to using a singleton class @@ -16,7 +15,7 @@ There are multiple benefits to using a singleton class By using a singleton instead of a static class we expose a cleaner class to use and we can use regular instance properties instead of static properties. -# Creating a Singleton in PHP +## Creating a Singleton in PHP Creating a class which can be used as a singleton is very simple. @@ -50,7 +49,7 @@ class Singleton } ``` -# Testing our Singleton +## Testing our Singleton To give a little functionality to our freshly baked Singleton we add these three members to the class @@ -93,7 +92,7 @@ $first->setWord("Banana"); var_dump($first->getWord() === $second->getWord()); // bool(true) ``` -# Further Research +## Further Research Here's a couple links which will help you understand Singletons better. diff --git a/src/content/resources/python/basics.md b/src/content/resources/python/basics.md index 4a9fb27..41ee2b2 100644 --- a/src/content/resources/python/basics.md +++ b/src/content/resources/python/basics.md @@ -2,9 +2,10 @@ authors: - "Xetera#0001" date: 2019/06/26 +title: Some Python Article --- -# Python +## Python This is a placeholder post