Install the Firebase Node modules:
$ npm install firebase firebase-admin --save
class Spiderman { | |
lookOut() { | |
alert('My Spider-Sense is tingling.'); | |
} | |
} | |
let miles = new Spiderman(); | |
miles.lookOut(); |
// create context with no upfront defaultValue | |
// without having to do undefined check all the time | |
function createCtx<A>() { | |
const ctx = React.createContext<A | undefined>(undefined) | |
function useCtx() { | |
const c = React.useContext(ctx) | |
if (!c) throw new Error("useCtx must be inside a Provider with a value") | |
return c | |
} | |
return [useCtx, ctx.Provider] as const |
<?php | |
$host = 'localhost'; | |
$user = 'root'; | |
$password = '123456'; | |
$dbname = 'pdoposts'; | |
// Set DSN | |
$dsn = 'mysql:host='. $host .';dbname='. $dbname; | |
// Create a PDO instance |
function fadeOut(el){ | |
el.style.opacity = 1; | |
(function fade() { | |
if ((el.style.opacity -= .1) < 0) { | |
el.style.display = "none"; | |
} else { | |
requestAnimationFrame(fade); | |
} | |
})(); |
/** | |
* detect IE | |
* returns version of IE or false, if browser is not Internet Explorer | |
*/ | |
(function detectIE() { | |
var ua = window.navigator.userAgent; | |
var msie = ua.indexOf('MSIE '); | |
if (msie > 0) { |
?> | |
<?php | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
$query = new WP_Query(array( | |
'post_type' => 'business_partners', | |
'posts_per_page' => -1, | |
'orderby' => 'title', | |
'order' => 'ASC', |
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700);@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css);.full-container{width:100%}.fixed-container{margin:0 auto;padding:0 15px}.column-container{font-size:0}.column{font-size:14px;padding:0 15px;vertical-align:top;display:inline-block}.xs-full{width:100%}.xs-one-half{width:50%}.xs-one-third{width:33.3333333333%}.xs-two-third{width:66.6666666667%}.xs-one-fourth{width:25%}.xs-two-fourth{width:50%}.xs-three-fourth{width:75%}.xs-one-fifth{width:20%}.xs-two-fifth{width:40%}.xs-three-fifth{width:60%}.xs-four-fifth{width:80%}.xs-one-sixth{width:16.6666666667%}.xs-two-sixth{width:33.3333333333%}.xs-three-sixth{width:50%}.xs-four-sixth{width:66.6666666667%}.xs-five-sixth{width:83.3333333333%}.xs-one-seventh{width:14.2857142857%}.xs-two-seventh{width:28.5714285714%}.xs-three-seventh{width:42.8571428571%}.xs-four-seventh{width:57.1428571429%}.xs-five-seventh{width:71.4285714286%}.xs-six-seventh{width:85.7142857143%} |
<?php | |
/** | |
* Get all type posts | |
* | |
* @return void | |
* @author alispx | |
**/ | |
function alispx_get_type_posts_data( $post_type = 'post' ) { |
Many of the solutions available around the internet for Bonfire: Where art thou are quite not right even if they pass the tests in FreeCodeCamp (FCC) because they don't adhere to the instructions completely.
Make a function that looks through a list (first argument) and returns an array of all objects that have equivalent property values (second argument).
Here are two solutions that exactly adhere to the instructions given in the Bonfire Challenge.