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
<?php | |
require_once("auth.php"); | |
class NoCredentialsAuth extends AuthBackend | |
{ | |
private $authed = false; | |
private $user; | |
private function __construct() |
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 boolean hassum(int target) { | |
return hassum_recursive(-1, 0, 0, target); | |
} | |
private boolean hassum_recursive(int hi, int lo, int sum, int target) { | |
if (sum == target) { | |
return true; | |
} else if (sum > target && lo < hi) { | |
return hassum_recursive(hi, lo + 1, sum - array[lo], target); | |
} 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
for (var i = 0; i < obj["userids"].length; i++) { | |
(function(userid) { | |
$.get("user/" + userid, {"token":token}, function(resp, userid) { | |
var user_name = JSON.parse(resp)["full_name"]; | |
build += "<li><a class='user' id='user-" + userid + "' href='#show-" + userid + "'>" + user_name + "</a></li>"; | |
remaining -= 1; | |
if (remaining == 0) { | |
make_users_list(obj, build); | |
hide_spinner(); | |
$("#login").hide(); |