Skip to content

Instantly share code, notes, and snippets.

View pjanik's full-sized avatar

Piotr Janik pjanik

  • Kraków, Poland
View GitHub Profile
@pjanik
pjanik / gist:9206508
Created February 25, 2014 10:30
offset axes
private void renderOffsetAxes() {
Axes axes = (Axes) shape;
boolean b = viewer.transformManager.getPerspectiveDepth();
viewer.transformManager.setPerspectiveDepth2(false);
viewer.transformPoint(axes.originPoint, originScreen);
dx = originScreen.x - (viewer.dimScreen.width - OFFSET_DISTANCE);
dy = originScreen.y - (viewer.dimScreen.height - OFFSET_DISTANCE);
originScreen.x -= dx;
originScreen.y -= dy;
int originScreenZ;
@pjanik
pjanik / gist:9206519
Created February 25, 2014 10:31
offset axes
private void renderOffsetAxes() {
Axes axes = (Axes) shape;
boolean b = viewer.transformManager.getPerspectiveDepth();
viewer.transformManager.setPerspectiveDepth2(false);
viewer.transformPoint(axes.originPoint, originScreen);
dx = originScreen.x - (viewer.dimScreen.width - OFFSET_DISTANCE);
dy = originScreen.y - (viewer.dimScreen.height - OFFSET_DISTANCE);
originScreen.x -= dx;
originScreen.y -= dy;
int originScreenZ;
This file has been truncated, but you can view the full file.
Using worker: worker-linux-4-1.bb.travis-ci.org:travis-linux-7
$ export DATA_GAMES_PROXY_PREFIX=DataGames/Games/concord/lab/
$ export S3_ACCESS_KEY_ID=[secure]
$ export S3_SECRET_KEY=[secure]
$ export GA_ACCOUNT_ID=[secure]
Applying updates
$ git clone --depth=50 --branch=master git://github.com/concord-consortium/lab-interactives-site.git concord-consortium/lab-interactives-site
Cloning into 'concord-consortium/lab-interactives-site'...
remote: Counting objects: 10401, done.
Failures:
1) Activity is run from the portal with a domain, external_id, and return url
Failure/Error: stub.should have_been_requested
The request POST http://portal.org/return/1234 with body "[{\"type\":\"open_response\",\"question_id\":\"1\",\"answer\":\"something\"}]" with headers {'Authorization'=>'Bearer token', 'Content-Type'=>'application/json'} was expected to execute 1 time but it executed 0 times
The following requests were made:
GET http://127.0.0.1:54627/__identify__ with headers {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent'=>'Ruby'} was made 7 times
POST http://portal.org/return/1234 with body '[{"type":"open_response","question_id":"14","answer":"something"}]' with headers {'Authorization'=>'Bearer token', 'Content-Type'=>'application/json'} was made 1 time
(function() {
function Foo() {
this.bigData = new Array(5000000).join("XXXXX");
this.smallData = "bla bla";
}
Foo.prototype.m = function() {
var smallData = this.smallData;
$(window).on('click', function() {
(function() {
function Foo() {
this.bigData = new Array(5000000).join("XXXXX");
this.smallData = "bla bla";
}
Foo.prototype.m = function() {
var smallData = this.smallData;
$(window).on('click', function() {
(function() {
function Foo() {
this.bigData = new Array(5000000).join("XXXXX");
this.smallData = "bla bla";
}
Foo.prototype.m = function() {
var smallData = this.smallData;
$(window).on('click', function() {
names_in_old_order = sequence_with_activities.activities.map { |a| a.name }
sequence_with_activities.activities[0].name.should == names_in_old_order[0]
sequence_with_activities.activities[1].name.should == names_in_old_order[1]
sequence_with_activities.activities[2].name.should == names_in_old_order[2]
sequence_with_activities.lightweight_activities_sequences[0].update_attributes!(position: 1)
sequence_with_activities.lightweight_activities_sequences[1].update_attributes!(position: 0)
sequence_with_activities.lightweight_activities_sequences[2].update_attributes!(position: 2)
sequence_with_activities.reload # sequence_with_activities.activities.reset
names_in_new_order = sequence_with_activities.activities.map { |a| a.name }
names_in_new_order[1].should == names_in_old_order[0]
piotrs-mbp:xproject piotr$ RAILS_ENV=development rake app:setup:create_default_data
Problem processing key 'host' in config/mailer.yml
undefined method `host=' for ActionMailer::Base:Class
Generating default data from default data ymls
Updated default project
On branch dev-gh-pages
Your branch is up-to-date with 'dev/gh-pages'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: air-pollution/javascripts/app.js.map
modified: air-pollution/javascripts/vendor.js
modified: air-pollution/javascripts/vendor.js.map