Skip to content

Instantly share code, notes, and snippets.

View ataraxie's full-sized avatar

Felix Grund ataraxie

  • University of British Columbia
  • Vancouver
View GitHub Profile
package faculty;
import ca.ubc.cpsc210.grocery.model.GroceryBill;
import ca.ubc.cpsc210.grocery.model.GroceryItem;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class GroceryBillTest {
package faculty;
import ca.ubc.cpsc210.grocery.model.GroceryBill;
import ca.ubc.cpsc210.grocery.model.GroceryItem;
import ca.ubc.cs.autotest.AutoTest;
import ca.ubc.cs.autotest.Grader;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
package ca.ubc.cpsc210.grocery;
import ca.ubc.cpsc210.grocery.model.GroceryBill;
import ca.ubc.cpsc210.grocery.model.GroceryItem;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class GroceryBillTest {
package ca.ubc.cpsc210.snippeting.examprep;
// Represents a task having a related course and number of hours remaining to complete
// Author: norm, modified by PC
public class Task {
private String courseName;
private int hours;
// EFFECTS: constructs a task with an associated course name
// and expected number of hours to complete
package ca.ubc.cpsc210.snippeting.examprep;
import java.util.ArrayList;
import java.util.List;
/**
* A representation of a collection of tasks assigned to a student that have
* not yet been completed.
*
* Tasks can be added to the collection with the addTask method.
adsdsad
$formContainer
.on('change', 'select', function() {
let $select = $(this);
let selectedId = $select.val();
$select.find('option[value="'+selectedId+'"]').attr('selected', 'selected').siblings().removeAttr('selected');
})
.on('keyup', 'input[type="text"]', function() {
let $input = $(this);
let value = $input.val();
if (value) {
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tobii.Interaction;
using WebSocketSharp;
using WebSocketSharp.Server;
var SOME_MODULE = (function($) {
var PAGE_IDS = [2031628,2392174,5046273,5046286,9568331/*, ...*/];
var BASE_URL = 'http://wiki.myconfluence.com/pages/editpage.action?pageId=';
function openRange(from, to) {
var doOpen = function(index) {
var win = window.open(BASE_URL + PAGE_IDS[index], '_blank');
win.focus();
};
@ataraxie
ataraxie / pocketquery-control-template.html
Last active August 29, 2015 14:25
PocketQuery Control Template Example
<div id="programmatic_dashboard_div" style="border: 1px solid #ccc">
<table class="columns">
<tr>
<td><div id="programmatic_control_div" style="padding-left: 2em; min-width: 250px"></div></td>
<td><div id="programmatic_chart_div"></div></td>
</tr>
</table>
</div>
<script>