This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function count_change ($money, $coins) { | |
sort($coins, SORT_NUMERIC); | |
$money = (int) $money; | |
$ways = array(); // ['denom' => [ 'value' => 'numWays' ]] | |
foreach ($coins as $_c => $_denom) { | |
for ($_m = 0; $_m <= $money; $_m++) { | |
if ($_m === 0) { | |
$ways[$_c][$_m] = 1; | |
continue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function possibilities ($word) { | |
$tree = [ | |
'children' => [ | |
[ | |
'symbol' => 'E', | |
'children' => [ | |
[ | |
'symbol' => 'I', | |
'children' => [ | |
[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#if (${NAMESPACE}) | |
namespace ${NAMESPACE}; | |
#end | |
#if (${TESTED_NAME} && ${NAMESPACE} && !${TESTED_NAMESPACE}) | |
use ${TESTED_NAME}; | |
#elseif (${TESTED_NAME} && ${TESTED_NAMESPACE} && ${NAMESPACE} != ${TESTED_NAMESPACE}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DB_NAME=scotchbox | |
DB_USER=root | |
DB_PASSWORD=root | |
# Optional variables | |
DB_HOST=localhost | |
DB_PREFIX=wp_ | |
WP_ENV=development | |
WP_HOME=http://scotchbox.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Step 1 - Update Package List | |
sudo apt-get install python-software-properties | |
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php | |
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/apache2 | |
# Step 2 - Remove PHP 5 and Install PHP 7 | |
sudo apt-get update |