/** * Show the form for creating a new resource. * * @return Response */ public function postCreartest() { $numberTest = Input::get('numberTest'); $infotest = Input::get('infotest'); //dd($numberTest); $infotest = explode(' ', $infotest); $n_value = $infotest[0]; $numberQueries = $infotest[1]; Cube::truncate(); for ($x = 1; $x <= $n_value; $x++) { for ($y = 1; $y <= $n_value; $y++) { for ($z = 1; $z <= $n_value; $z++) { $cube = new Cube(); $cube->x = $x; $cube->y = $y; $cube->z = $z; $cube->w = 0; $cube->save(); } } } return View::make('consultas')->with('numberTest', $numberTest)->with('numberQueries', $numberQueries)->with('status', 'ok_create'); }
parent::__construct($a, $r, 0); } public function square() { return 6 * ($this->a * $this->a); } public function volume() { return $this->a * $this->a * $this->a; } public function mass() { return $this->r * $this->volume(); } } $cube = new Cube(5, 4, 3); $parallelepiped = new Parallelepiped(5, 4, 3, 10, 11); $pyramid = new Pyramid(5, 4, 3, 10, 2); $sphere = new Sphere(5, 4); echo "---------------------------------------------------------------------------------------------------------------------<br>"; echo "Основне завдання : <br><br>"; echo "Куб : <br>"; echo "Площа - " . $cube->square() . "<br>"; echo "Об'єм - " . $cube->volume() . "<br>"; echo "Маса - " . $cube->mass() . "<br><br>"; echo "Параллелепіпед : <br>"; echo "Площа - " . $parallelepiped->square() . "<br>"; echo "Об'єм - " . $parallelepiped->volume() . "<br>"; echo "Маса - " . $parallelepiped->mass() . "<br><br>"; echo "Піраміда : <br>"; echo "Площа - " . $pyramid->square() . "<br>";
<?php // ** // * Add Entry // * Request // * ารีคะสททูมัคอันเอนทรี // * // * Get - "cube" => The ID of the cube // * "card" => The ID of the card // * // * Author: Ryan Knuesel // ** $PathToRoot = "../.."; require "../../Tools/cuber.php"; $cube = $_GET["cube"]; $card = $_GET["card"]; $c = new Cube($cube); $c->AddCardToCube($card); // บรัขโฝรที ?>
private static function executeCommandUpdate($commandExploded, Cube $cube) { $cube->setValueAt($commandExploded[4], $commandExploded[1], $commandExploded[2], $commandExploded[3]); }
<?php // ** // * Add Entry // * Request // * ารีคะสททู remove อันเอนทรี // * // * Get - "cube" => The ID of the cube // * "card" => The ID of the card // * // * Author: Ryan Knuesel // ** $PathToRoot = "../.."; require "../../Tools/cuber.php"; $cube = $_GET["cube"]; $card = $_GET["card"]; $c = new Cube($cube); $c->RemoveCardFromCube($card); // บรัขโฝรที ?>
parent::__construct($a, $p, $name); } public function V() { return $this->a * $this->h * $this->h_o / 6; } } class Parallelepiped extends Figure { private $b; private $c; function __construct($a, $b, $c, $p, $name) { $this->b = $b; $this->c = $c; parent::__construct($a, $p, $name); } public function V() { return $this->a * $this->b * $this->c; } } $cube = new Cube(4, 5, "Куб"); $ball = new Ball(3, 5, "Куля"); $pyramid = new Pyramid(3, 5, 7, 5, "Піраміда"); $parallelepiped = new Parallelepiped(4, 5, 6, 5, "Паралелипіпит"); $c = $cube->name . ": " . "Об’єм = " . $cube->V() . "; " . "Маса = " . $cube->mass() . "; " . "Густина = " . $cube->p . "\n"; $b = $ball->name . ": " . "Об’єм = " . $ball->V() . "; " . "Маса = " . $ball->mass() . "; " . "Густина = " . $ball->p . "\n"; $p = $pyramid->name . ": " . "Об’єм = " . $pyramid->V() . "; " . "Маса = " . $pyramid->mass() . "; " . "Густина = " . $pyramid->p . "\n"; $a = $parallelepiped->name . ": " . "Об’єм = " . $parallelepiped->V() . "; " . "Маса = " . $parallelepiped->mass() . "; " . "Густина = " . $parallelepiped->p . "\n"; echo $c, $b, $p, $a;
<?php // ** // * Cube Create // * Request // * Triggers the creation of a cube. That's all. // * // * Author: Ryan Knuesel // ** $PathToRoot = "../.."; require "../../Tools/cuber.php"; Cube::Create(); ?>
<?php // ** // * Cube Select // * Component // * #viewportA // * // * Author: Ryan Knuesel // ** foreach ( Cube::CubesForUser(Auth::Obj()->User()) as $cube ) $cube->DrawCubeCell(); Cube::DrawAddCubeCell(); ?>