Fahrenheit to Celsius : https://rfvxsxrjd5.execute-api.us-east-1.amazonaws.com/dev/f2c
Celsius to Fahrenheit : https://rfvxsxrjd5.execute-api.us-east-1.amazonaws.com/dev/c2f
<?xml version="1.0" encoding="UTF-8"?> | |
<phpunit | |
colors="true" | |
verbose="true" | |
processIsolation="false" | |
stopOnFailure="false" | |
syntaxCheck="false" | |
convertErrorsToExceptions="true" | |
convertNoticesToExceptions="true" | |
convertWarningsToExceptions="true" |
<?php | |
namespace FiveTalents\Model\Behavior; | |
use Cake\Datasource\EntityInterface; | |
use Cake\Event\Event; | |
use Cake\ORM\Behavior; | |
/** | |
* AfterSaveOrDelete behavior |
Fahrenheit to Celsius : https://rfvxsxrjd5.execute-api.us-east-1.amazonaws.com/dev/f2c
Celsius to Fahrenheit : https://rfvxsxrjd5.execute-api.us-east-1.amazonaws.com/dev/c2f
<?php | |
class Helper { | |
public function render(array $payment_methods, $error_saving_plans = false, $boleto_tab_checked = false) | |
{ | |
$html = ''; | |
foreach (self::TAB_NAMES as $tab_name) { | |
$payment_enabled = $this->isPaymentEnabled($tab_name, $payment_methods); | |
$tab_disabled = $this->isTabDisabled($tab_name, $error_saving_plans); | |
$checked = $this->shouldBeChecked($tab_name, $payment_enabled, $tab_disabled, $boleto_tab_checked); |
<?php | |
namespace App\Controllers; | |
use Psr\Http\Message\ServerRequestInterface as Request; | |
use Psr\Http\Message\ResponseInterface as Response; | |
use Interop\Container\ContainerInterface as Container; | |
class HomeController | |
{ | |
/** |
<?php | |
public function longDbCall() | |
{ | |
$cache_key = $this->cache->generateKey('longDbCall'); | |
return $this->cache->remember($cache_key, function () { | |
return $this->__longDbCall(); | |
}); | |
} |
<?php | |
use Phalcon\Mvc\Application as PhalconApplication; | |
use Phalcon\Config as PhalconConfig; | |
error_reporting(E_ALL); | |
define('DS', DIRECTORY_SEPARATOR); | |
define('WEBROOT_PATH', __DIR__ . DS); | |
define('ROOT_PATH', dirname(WEBROOT_PATH) . DS); | |
define('APP_PATH', ROOT_PATH . 'app' . DS); |
require 'tic_tac_toe_cn' | |
game = Tic_Tac_Toe.new | |
board = Array.new(3) {Array.new(3)} | |
game.initBoard(board) | |
puts "Starting Tic Tac Toe" | |
puts "Player 1 choose X or O" | |
playerOne = gets.chomp.upcase | |
if playerOne == "X" | |
playerTwo = "O" |
By adding this gem to our project we will be able to use methods of the Tic_Tac_Toe class (these methods are listed below) | |
.new - makes a new Tic Tac Toe object | |
.initBoard(board) - makes a cell block from the dimensions of board object | |
.winningRows(board) - checks the board object to see if a row contains 3 of the same symbol | |
.winningCols(board) - checks the board object to see if a col contains 3 of the same symbol | |
.winningDiagonals(board) - checks the board object to see if a diagonal contains 3 of the same symbol | |
.displayBoard(board) - displays board object in the terminal | |
.fullBoard(board) - checks to see if the board object is full | |
.turnPlayed(board,player,player_choice) - checks to see if a valid move was played by checking the board object, player symbol and location that the player picked |
db.setSchema([ | |
{ | |
singular: 'author', | |
plural: 'authors', | |
relations: { | |
'books': {hasMany: 'book'} | |
} | |
}, | |
{ | |
singular: 'book', |