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
test "date has display column but sorts by survey column" do | |
@entries = @sr.entries(:sorting_order_by => 577, :sorting_dir => 'ASC') | |
@entries.collect! { |entry| entry[2] } | |
assert_equal @ordered_dates_asc, @entries | |
assert_not_equal @ordered_dates_desc, @entries | |
debugger | |
@entries = @sr.entries(:sorting_order_by => 577, :sorting_dir => 'DESC') | |
@entries.collect! { |entry| entry[2] } | |
assert_equal @ordered_dates_desc, @entries | |
assert_not_equal @ordered_dates_asc, @entries |
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
class SurveyReportOrderByColumnTest < ActiveSupport::TestCase | |
setup do | |
@survey_report = FormBuilder::SurveyReport.new(:survey_id => 132, :name => "Foo Bar Report") | |
@survey_report.data = {'576' => 1, '577' => 2, '578' => 3} | |
@survey_report.filters = [] | |
@ordered_dates_asc = ["03/30/1962", "03/30/1979", "09/01/2000", "05/11/2008"] | |
@ordered_dates_desc = @ordered_dates_asc.reverse | |
@ordered_names_asc = ["Bob", "Coach", "Third", "tom"] | |
@ordered_names_desc = @ordered_names_asc.reverse |
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
Delayed::Worker.max_attempts = 25 | |
Delayed::Worker.destroy_failed_jobs = true # destroy after 25 attempts | |
Delayed::Worker.default_priority = 10 # otherwise defaults to 0 and lower numbers run first | |
# Only use delayed_job if we're in production or if you explicitly set it. | |
Delayed::Worker.delay_jobs = Rails.env.production? || ENV['DELAYED_JOB'] |
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
(function (window, $, undefined) { | |
var myGlobal; | |
var module = { | |
moduleMethod1: function () { | |
myGlobal = 42; | |
}, | |
moduleMethod2: function () { | |
console.log(myGlobal); |
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
array(10) { | |
[0]=> | |
object(stdClass)#877 (104) { | |
["address"]=> | |
object(stdClass)#434 (5) { | |
["address1"]=> | |
string(16) "650 Dresher Road" | |
["city"]=> | |
string(7) "Horsham" | |
["countryID"]=> |
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
<style> | |
#box1 { | |
position:absolute; | |
top:0; | |
left:0; | |
width:100%; | |
height:100%; | |
z-index:-1; |
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
# include <iostream> | |
# include <cstdio> | |
#include <cmath> | |
#include <vector> | |
#include <unordered_map> | |
#include <array> | |
using namespace std; | |
float logBase2(float N) |
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
Show hidden characters
{ | |
"shell_cmd": "$0 --version" | |
} | |
// the output from this is an error but it shows me what shell my builder is trying to use: | |
// /Users/wroathe/.bash_profile: line 131: shopt: globstar: invalid shell option name | |
// /bin/bash: --version: command not found | |
// [Finished in 0.3s with exit code 127] | |
// [shell_cmd: --version] |
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
{ | |
"animation_enabled": false, | |
"auto_complete_commit_on_tab": true, | |
"bold_folder_labels": true, | |
"caret_style": "smooth", | |
"color_scheme": "Packages/User/Solarized (Light) (SL).tmTheme", |
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
function wrap_youtube_autoembed_in_flexbox($html, $url) { | |
if (stripos($url, "youtube") !== false) { | |
$html = '<div class="flex-video widescreen">' . $html . '</div>'; | |
} | |
return $html; | |
} | |
add_filter("oembed_result", "wrap_youtube_autoembed_in_flexbox", 10, 2); |
OlderNewer