This file contains hidden or 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
Difficulty | Number of Death | Number of red shirt | |
---|---|---|---|
1 | 5 | 5 | |
2 | 6 | 6 | |
3 | 7 | 6 | |
4 | 8 | 8 | |
5 | 10 | 10 |
This file contains hidden or 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
Id | name | DateCreation | |
---|---|---|---|
1 | Drew Stoltenberg | 2018-12-27 02:35:29 | |
2 | Reba Breitenberg | 2018-12-27 23:55:04 | |
3 | Talon Bradtke | 2018-12-28 03:44:00 | |
4 | Eugenia Ebert | 2018-12-29 01:14:14 | |
5 | Allene Barrows | 2018-12-29 21:21:31 | |
6 | Maida Beahan | 2018-12-30 16:19:17 | |
7 | Grayce Schultz | 2018-12-30 18:32:21 | |
8 | Roy Heidenreich | 2018-12-31 01:57:09 | |
9 | Cedrick Schmeler | 2018-12-31 16:00:05 |
This file contains hidden or 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
Id | Name | Price | |
---|---|---|---|
1 | Ambasa | 5.60 | |
2 | Ameyal | 12.70 | |
3 | Appletiser | 19.70 | |
4 | Aquarius | 10.50 | |
5 | Barqs | 9.40 | |
6 | Beat | 10.00 | |
7 | Beverly | 14.80 | |
8 | Coca-Cola | 14.50 | |
9 | Caffeine Free Coca-Cola | 2.40 |
This file contains hidden or 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
yum install -y binutils.x86_64 compat-libcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64 libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libXi.i686 libXi.x86_64 libXtst.i686 libXtst.x86_64 make.x86_64 sysstat.x86_64 zip unzip |
This file contains hidden or 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
idinvoice | idcustomer | namecustomer | detail1 | amount1 | unitprice1 | detail2 | amount2 | unitprice | detail3 | amount3 | unitprice3 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 1 | John | prod1 | 2 | 60 | prod2 | 2 | 5 | prod3 | 2 | 100 | |
2 | 2 | Peter | prod3 | 1 | 200 | prod4 | 3 | 80 | prod5 | 1 | 200 | |
2 | 2 | Anna | prod6 | 2 | 30 | prod2 | 1 | 60 | prod5 | 1 | 400 | |
2 | 2 | Susan | prod4 | 1 | 100 | prod10 | 10 | 100 | prod3 | 20 | 300 |
This file contains hidden or 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
id | name | idcompany | namecompany | |
---|---|---|---|---|
1 | John | 23 | Contoso | |
2 | Anna | 25 | Adventureworks | |
3 | Bob | 32 | Contoso. | |
4 | Peter | 33 | Sakila | |
5 | Ruth | 23 | Contoso | |
6 | Peter | 34 | CONTOSO. |
This file contains hidden or 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 | |
$msg=$smachine->fetchUI(); // we show a visual id (it is optional and it's only for debug purpose) | |
$smachine->checkAllJobs(); // we check every (active,pause,continue) job available. | |
$smachine->viewUI(null,$msg); // null means it takes the current job |
This file contains hidden or 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 | |
// business rules | |
$smachine->addTransition(INITIAL_STATE,DRIVING_TO_BUY_MILK | |
,'when milk = 0 and gas > 0'); | |
$smachine->addTransition(INITIAL_STATE,CANCEL_DRIVING | |
,'when gas = 0',null,'stop'); // null means, no timeout and stop means, the job will stop | |
$smachine->addTransition(DRIVING_TO_BUY_MILK,PICKING_THE_MILK | |
,'when store_open = 1 and stock_milk > 0'); | |
$smachine->addTransition(DRIVING_TO_BUY_MILK,UNABLE_TO_PURCHASE |
This file contains hidden or 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 | |
// database configuration | |
$smachine->tableJobs="buymilk_jobs"; | |
$smachine->tableJobLogs="buymilk_logs"; // it is optional | |
$smachine->setDB('localhost',"root","abc.123","statemachinedb"); | |
$smachine->createDbTable(false); // you don't need to create this table every time. | |
$smachine->loadDBAllJob(); // we load all jobs, including finished ones. | |
//$smachine->loadDBActiveJobs(); // use this in production, we don't need stopped job every time. |
This file contains hidden or 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 | |
// it is specific for this project | |
define('INITIAL_STATE',1); | |
define('DRIVING_TO_BUY_MILK',2); | |
define('CANCEL_DRIVING',3); | |
define('PICKING_THE_MILK',4); | |
define('PAYING_FOR_THE_MILK',5); | |
define('UNABLE_TO_PURCHASE',6); | |
define('DRIVE_BACK_HOME',7); |