// [Kbps] [ms] [ms] [percent] public static final TcpConnectionSimulator wifi = new TcpConnectionSimulator( 500, 80, 200, 1); public static final TcpConnectionSimulator t3_fiber = new TcpConnectionSimulator( 45000, 10, 0, 0); public static final TcpConnectionSimulator cell = new TcpConnectionSimulator( 100, 400, 250, 5); }
""); assert(expandFullName($databaseConnection, " Jake Brown ", $error) === "Mr. Jacob Brown III"); assert($error === ""); assert(expandFullName($databaseConnection, "No Such Guy", $error) === ""); assert($error === "No match found."); assert(expandFullName($databaseConnection, "John", $error) === ""); assert($error === "More than one result.");
Douglas Adams" , ""); checkFullName("Jake Brown" , "Mr. Jacob Brown III" , ""); checkFullName("No Such Guy", "" , "No match found."); checkFullName("John" , "" , "More than one result."); checkFullName("Doug Adams", "Mr. Douglas Adams", ""); checkFullName(" Jake Brown ", "Mr. Jacob Brown III", ""); checkFullName("No Such Guy", "", "No match found."); checkFullName("John", "", "More than one result.");
$location, string $user); public function saveProfile(HttpRequest $request); public function extractQueryParam(HttpRequest $request, string $param); public function replyOK(HttpRequest $request, string $html); public function findFriends(HttpRequest $request); public function replyNotFound(HttpRequest $request, string $error); public function closeDatabase(string $location); }
function saveProfile(HttpRequest $request); public function findFriends(HttpRequest $request); // リクエストとリプライのユーティリティ public function extractQueryParam(HttpRequest $request, string $param); public function replyOK(HttpRequest $request, string $html); public function replyNotFound(HttpRequest $request, string $error); // データベースのヘルパー public function openDatabase(string $location, string $user); public function closeDatabase(string $location); }