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
<!doctype html> | |
<head> | |
<title>Stripe OAuth Example</title> | |
</head> | |
<body> | |
{{ token }} | |
</body> | |
</html> |
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
<?php | |
define('CLIENT_ID', 'YOUR_CLIENT_ID'); | |
define('API_KEY', 'YOUR_API_KEY'); | |
define('TOKEN_URI', 'https://connect.stripe.com/oauth/token'); | |
define('AUTHORIZE_URI', 'https://connect.stripe.com/oauth/authorize'); | |
if (isset($_GET['code'])) { // Redirect w/ code | |
$code = $_GET['code']; |
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
<!doctype html> | |
<head> | |
<title>Stripe OAuth Example</title> | |
</head> | |
<body> | |
<%= @access_token %> | |
</body> | |
</html> |
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
# @abstract VoteCounterProtocol is the interface for vote counting. | |
# A vote counting protocol should subclass VoteCounterProtocol. | |
module VoteCounterProtocol | |
state do | |
# On the client side, tell the vote counter to start counting votes | |
# for a specific ballot. | |
# @param [Object] ballot_id the unique id of the ballot | |
# @param [Number] num_votes the number of votes that will be cast (this number will remain static throughout the vote) | |
interface input :begin_vote, [:ballot_id] => [:num_votes] |
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
# Want to have Membership separate, so can plug in different Membership modules on the fly | |
# Check number of members in the beginning, when find winner, consult current state of member table OR have vote_status = currently voting | |
module VoteMasterProtocol | |
state do | |
interface input :begin_vote, [:ballotid, :content, :ratio] | |
interface output, :result, [:ballotid, :result] | |
end | |
end |
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
package edu.berkeley.cs | |
package scads | |
package piql | |
package gradit | |
import storage.ScadsCluster | |
import avro.marker._ | |
import org.apache.avro.util._ |
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
ENTITY book_lines | |
{ | |
int book_line_id, | |
string line, | |
int source, | |
int linenum, | |
int created_at, | |
int updated_at | |
PRIMARY(linenum, source) | |
} |
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
ENTITY book_lines | |
{ | |
int book_line_id, | |
string line, | |
int source, | |
int linenum, | |
int created_at, | |
int updated_at | |
PRIMARY(linenum, source) | |
} |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>edu.berkeley.cs.scads</groupId> | |
<artifactId>scadrclient</artifactId> | |
<packaging>jar</packaging> | |
<version>2.0-SNAPSHOT</version> | |
<name>SCADR Client Library</name> | |
<parent> | |
<groupId>edu.berkeley.cs.scads</groupId> |
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
ENTITY book_lines | |
{ | |
int book_line_id, | |
string line, | |
int source, | |
int linenum, | |
int created_at, | |
int updated_at | |
PRIMARY(line, source) | |
} |
NewerOlder