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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
<title>Simple Molecules</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geo.js"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js"></script> | |
<style type="text/css"> |
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
{ | |
"name": "Untitled Document", | |
"guid": 11, | |
"components": [ | |
{ | |
"type": "DG.GameView", | |
"guid": 101, | |
"componentStorage": { | |
"currentGameName": "CartWeight", | |
"currentGameUrl": "http://localhost:8000/CartWeight/", |
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
getContext <- function(re, data=sampleData) { | |
reWithContext <- paste0(".{0,10}", re, ".{0,10}") | |
context <- data[grep(reWithContext, data$text, perl=T),] | |
m <- regexpr(reWithContext, context$text, perl=T) | |
cbind(context, data.frame(context=regmatches(context$text, m))) | |
} | |
writeOut <- function(df, fname) { | |
f <- file(fname, 'wt') | |
for (rownum in 1:nrow(df)) { |
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
asciify <- function(text) { | |
text <- stri_trans_general(text, 'Any-Latin') | |
text <- stri_trans_general(text, 'Any-Publishing') | |
text <- stri_trans_general(text, 'Latin-Ascii') | |
text | |
} |
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
# Start with a list of endpoints; here we just use all of them | |
endpoints = Run.where("remote_endpoint IS NOT NULL").map &:remote_endpoint | |
select_params = [ | |
{ | |
:embeddable_type => "Embeddable::OpenResponse", | |
:embeddable_table => "embeddable_open_responses", | |
:answer_table => "embeddable_open_response_answers", | |
:question_foreign_key => "open_response_id", | |
:feedback_table => "c_rater_feedback_items", |
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
... | |
introView: SC.StackedView.design({ | |
layout: { top: 20, bottom: 20 }, | |
childViews: [ | |
SC.LabelView.design(SC.StaticLayout, { | |
useStaticLayout: YES, | |
classNames: ['append-to-me'], | |
escapeHTML: NO, | |
displayValue: "So, I'm a big ol' string of text. <br><br>And I'm another string of text." | |
})] |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Raphael graphs</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> | |
<script type="text/javascript" src="javascripts/raphael/raphael.js"></script> | |
<link rel="stylesheet" href="stylesheets/apidocs.css"> |
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
/*globals $ Raphael */ | |
// make these accessible at the Firebug/Web Inspector console | |
var r, group; | |
$(function () { | |
var notHighlighted = { | |
stroke: "#aaaaaa", | |
fill: "#aaaaaa" |
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
/*globals $ Raphael */ | |
// make these accessible at the Firebug/Web Inspector console | |
var r, group; | |
$(function () { | |
var notHighlighted = { | |
stroke: "#aaaaaa", | |
fill: "#aaaaaa" |
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
module("Smartgraphs.questionSequenceController question-sequence navigation", { | |
setup: function () { | |
Smartgraphs.Question.FIXTURES = [ | |
SC.mixin(SC.copy(qhash), {guid: 'q1', sequence: 'test-sequence-1'}), | |
SC.mixin(SC.copy(qhash), {guid: 'q2', sequence: 'test-sequence-2'}) | |
]; | |
Smartgraphs.QuestionSequence.FIXTURES = [ | |
{ guid: 'test-sequence-1', questions: ['q1'] }, | |
{ guid: 'test-sequence-2', questions: ['q2'] } |
OlderNewer