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
using UnityEngine; | |
namespace UBOAT.Mods.HistoricalPropulsion | |
{ | |
public static class BatteryModel | |
{ | |
// Получить энергию батареи в kWh | |
public static float GetBatteryEnergy_kWh(string typeId) | |
{ | |
var spec = BoatSpecsLoader.GetSpec(typeId); |
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
roman@roman-salnikov-pc:~/Public/projects/resource-rest-bundle$ make unit_tests | |
+++ run unit tests +++ | |
PHP Fatal error: Uncaught TypeError: Argument 1 passed to PHPUnit\Runner\BaseTestRunner::getTest() must be of the type string, object given, called in /home/roman/Public/projects/resource-rest-bundle/vendor/bin/.phpunit/phpunit-8.3-0/src/TextUI/Command.php on line 177 and defined in /home/roman/Public/projects/resource-rest-bundle/vendor/bin/.phpunit/phpunit-8.3-0/src/Runner/BaseTestRunner.php:84 | |
Stack trace: | |
#0 /home/roman/Public/projects/resource-rest-bundle/vendor/bin/.phpunit/phpunit-8.3-0/src/TextUI/Command.php(177): PHPUnit\Runner\BaseTestRunner->getTest() | |
#1 /home/roman/Public/projects/resource-rest-bundle/vendor/bin/.phpunit/phpunit-8.3-0/src/TextUI/Command.php(160): PHPUnit\TextUI\Command->run() | |
#2 /home/roman/Public/projects/resource-rest-bundle/vendor/bin/.phpunit/phpunit-8.3-0/phpunit(22): PHPUnit\TextUI\Command::main() | |
#3 /home/roman/Public/projects/resource-rest-bundle/vendor/symfony/phpunit- |
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
sudo chmod 666 /var/run/docker.sock |
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
function getValues() { | |
$valuesArray = []; | |
// get the initial memory usage | |
echo round(memory_get_usage() / 1024 / 1024, 2) . ' MB' . PHP_EOL; | |
for ($i = 1; $i < 800000; $i++) { | |
$valuesArray[] = $i; | |
// let us do profiling, so we measure the memory usage | |
if (($i % 200000) == 0) { | |
// get memory usage in megabytes | |
echo round(memory_get_usage() / 1024 / 1024, 2) . ' MB'. PHP_EOL; |