$oTest = bucketDB::factory(array('type' => 'MySQL', 'host' => 'localhost', 'user' => 'root', 'password' => '', 'dbname' => 'test_bucket', 'engine' => 'MEMORY')); test_update($oTest, $concurrency, $t, 'MEMORY'); $oTest = bucketDB::factory(array('type' => 'MySQL', 'host' => 'localhost', 'user' => 'root', 'password' => 'password', 'dbname' => 'test_bucket', 'engine' => 'MEMORY', 'additionalIndexes' => ', INDEX USING BTREE (date_time)')); //Test using additional B-TREE index on date_time - slower than MEMORY //test_update($oTest, $concurrency, $t, 'MEMBTR'); $oTest = bucketDB::factory(array('type' => 'MySQL', 'host' => 'localhost', 'user' => 'root', 'password' => 'password', 'dbname' => 'test_bucket', 'engine' => 'MEMORY', 'pkIndexType' => 'USING BTREE')); //Test using Primay Key as B-TREE index //test_update($oTest, $concurrency, $t, 'MEMPKB'); - slower than MEMORY $oTest = bucketDB::factory(array('type' => 'MySQL_Insertion', 'host' => 'localhost', 'user' => 'root', 'password' => 'password', 'dbname' => 'test_bucket', 'engine' => 'MEMORY')); test_update($oTest, $concurrency, $t, 'MEMINS'); $oTest = bucketDB::factory(array('type' => 'PgSQL', 'port' => 5432, 'host' => 'localhost', 'user' => 'pgsql', 'password' => 'password', 'dbname' => 'test_bucket')); test_update($oTest, $concurrency, $t, 'PgSQL '); $oTest = bucketDB::factory(array('type' => 'SHM')); test_update($oTest, $concurrency, $t, 'SHM '); $oTest = bucketDB::factory(array('type' => 'SHMSemaphore')); test_update($oTest, $concurrency, $t, 'SHMSEM'); } $t->stop(); $t->display(); exit; function test_update($oTest, $concurrency, $t, $text) { $oTest->updateCreate(); $oTest->disconnect(); $date = '2008-05-16 16:00:00'; for ($c = 0; $c < $concurrency; $c++) { mt_srand(1000 + $c); $pid = pcntl_fork(); if ($pid == 0) { $oTest->connect(); for ($i = 0; $i < TEST_ITERATIONS; $i++) {
error_reporting(E_ALL); // number of iterations define('TEST_ITERATIONS', 100); // how many reads should be performed per each set/update define('TEST_READS', 1); require "Benchmark/Timer.php"; require 'testCases/Cache.php'; $t = new Benchmark_Timer(); $t->start(); $aTests = array(25, 50, 75, 100); $t->setMarker('Script init'); foreach ($aTests as $concurrency) { $oTest = Cache::factory(array('type' => 'memcached', 'host' => '127.0.0.1', 'port' => 11211)); test_update($oTest, $concurrency, $t, 'MEMCACHED '); $oTest = Cache::factory(array('type' => 'sharedance', 'host' => 'localhost')); test_update($oTest, $concurrency, $t, 'SHAREDANCE'); } $t->stop(); $t->display(); exit; function test_update($oTest, $concurrency, $t, $text) { $oTest->disconnect(); $oTest->invalidateAll(); $oTest->init($concurrency, TEST_ITERATIONS); for ($c = 0; $c < $concurrency; $c++) { mt_srand(1000 + $c); $pid = pcntl_fork(); if ($pid == 0) { $oTest->connect(); for ($i = 0; $i < TEST_ITERATIONS; $i++) {
$start_date = "2015-02-01"; $enter_crsi = 30; $enter_range = 100; $pct_limit_below = 1; $exit_crsi = 70; $order_by = "crsi asc"; $max_risk = 3; $risk_factor = 0.4; $risk_sd = 1; $starting_capital = 1000000; register_new_live_account($description, $risk_category, $start_date, $enter_crsi, $enter_range, $pct_limit_below, $exit_crsi, $order_by, $max_risk, $risk_factor, $risk_sd, $starting_capital); } else { if ($_GET['action'] == 'test_global_variable') { global $original_investment; echo "original inv: ", $original_investment; test_update(); echo "after change inv: ", $original_investment; } else { if ($_GET['action'] == 'deactivate_account') { $portfolioID = $_GET['portfolio_id']; deactivate_account($portfolioID); echo "deactivate account {$portfolioID} ", PHP_EOL; } else { if ($_GET['action'] == 'reactivate_account') { $portfolioID = $_GET['portfolio_id']; reactivate_account($portfolioID); echo "reactivate account {$portfolioID} ", PHP_EOL; } elseif ($_GET['action'] == 'get_portfolio_return_history') { $start_date = $_GET['start_date']; $end_date = $_GET['end_date']; $pid = $_GET['portfolio_id'];
When subsections are deeply nested, different sequence types are used. For instance, subsubsections may use roman numerals. </P><P> This library provides resources for numbering in more than the traditional Arabic/English/Roman styles. The available styles are {$number_style_names}. These styles are selectable for an object type. For instance "[style='Aerg']" specifies that Arabic, lowercase-English, lowercase-Roman, Greek, and Hindi (Devangari) are used for hierarchy levels 1, 2, 3, and 4 respectively. For instance a 4 level title example for the seventh item at each level would be labelled "7.g.vii.η". A 5 level title of all sevens with "[style='GRCEH']" (uppercase-Greek, uppercase-Roman, Chinese, uppercase-English, Hindi) would be "Η.VII.七.G.७". </P> TEXT_NUMBERING . X_table([width => '50%', align => 'center', text => X_caption("Examples of Numbering Styles") . X_tr(X_th("STYLE") . X_th("REPRESENTATION")) . X_tr(X_td("[style='AAAA']") . X_td("7.7.7.7")) . X_tr(X_td("[style='Aerg']") . X_td("7.g.vii.η")) . X_tr(X_td("[style='GRCEH']") . X_td("Η.VII.七.G.७"))]) . $testSequences() . $testLanguages() . "\$\$\\boxed{Hello}\$\$\\(\\boxed{World}\\)"); /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ foreach ($sequences as $key => $txt) { HTML("<P>{$key} {$txt}</P>"); } HTML(test_update()); HTML('<hr>B'); HTML(X_table4()); HTML('<hr>C'); HTML(X_table4(['level' => 0, 'border' => 1, 'align' => 'right', 'data' => [[[], ['_West'], ['_Central'], ['_East']], [['_North'], ['Seattle'], ['Madison'], ['Augusta']], [['_Middle'], ['Mendocino'], ['Topeka'], ['Richmond']], [['_South'], ['Pasadena'], ['Houston'], ['Miami']]]])); HTML(X_tail()); echo X_store(); } /* End of MAIN */