This file contains 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
public function registerUser($userLogin, $userPassword) { | |
if ($this->database->isLoginBusy($userLogin)) { | |
return false; | |
} | |
if ($this->database->registerUser($userLogin, $userPassword)) { | |
return true; | |
} | |
return false; | |
} |
This file contains 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
private function user() { | |
if (!$this->userService->isAdmin()) { | |
$this->status = StatusHandler::error(StatusHandler::NOT_ADMIN); | |
return; | |
} | |
if ($this->userService->registerUser($this->args['newlogin'], $this->args['newpassword'])) { | |
$this->status = StatusHandler::success(); | |
} | |
else { |
This file contains 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
sum=0 | |
count=0 | |
while [ -n "$1" ]; do | |
((count++)) | |
sum=`expr $sum + $1` | |
shift | |
done | |
expr $sum / $count |
This file contains 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
{"status":"OK"} | |
{"status":"OK"} | |
{"status":"OK"} | |
{"status":"OK"} | |
{"status":"OK"} | |
{"status":"OK"} | |
{"status":"OK"} | |
{"status":"OK"} | |
{"status":"OK"} | |
{"status":"OK"} |
This file contains 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
{ "open": { "baza": "springbootdb", "login": "ja", "password": ""}} | |
{"organizer": {"secret": "d8578edf8458ce06fbc5bb76a58c5ca4", "newlogin": "Donald_Grump11", "newpassword": "admin"}} | |
{"organizer": {"secret": "d8578edf8458ce06fbc5bb76a58c5ca4", "newlogin": "Sanka", "newpassword": "haslo"}} | |
{"organizer": {"secret": "d8578edf8458ce06fbc5bb76a58c5ca4", "newlogin": "Ogi", "newpassword": "hejper"}} | |
{"event": {"login": "Donald_Grump11", "password": "admin", "eventname": "Konwent", "start_timestamp": "2016-01-20 10:00", "end_timestamp": "2016-02-01 18:00"}} | |
{"event": {"login": "Sanka", "password": "haslo", "eventname": "PG", "start_timestamp": "2017-01-02 8:00", "end_timestamp": "2017-02-02 18:00"}} | |
{"event": {"login": "Ogi", "password": "hejper", "eventname": "KASIA", "start_timestamp": "2017-03-12 11:00", "end_timestamp": "2017-03-15 21:00"}} | |
{ "user": { "login": "Donald_Grump11", "password": "admin", "newlogin": "Delores65", "newpassword": "commodo007"} } | |
{ "user": { "login": "Sanka", "password": "haslo", "newlog |