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
<?php | |
/** | |
* Events import page | |
* | |
* | |
* NOTE: Before this script will work, please copy vendor/membersuite/lib/mozilla.pem to $_SERVER['DOCUMENT_ROOT'].'/ms_sdk/lib/’ | |
*/ | |
include_once(get_template_directory() . '/inc/vendor/membersuite/lib/phpsdk.phar'); |
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
javascript:(function(window, document) { | |
var isScrolling, scrollTimeout; | |
var defaultScrollSpeed = 50; | |
var scrollSpeed = 10; | |
var adjustIncrement = 2; | |
var jumpIncrement = 50; | |
var stopPoint = -1; | |
var scrolled = 0; | |
var scrollDelay = 0; | |
var reverse = false; |
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
<div class="print_friendly print_header"> | |
<span class="primary_text">Automotive</span> | |
<span class="secondary_text">Template</span> | |
<li><a href="tel:Phone"><i class="fa fa-phone"></i> Phone</a></li> | |
<li class="address"><a href="#"><i class="fa fa-map-marker"></i> Address</a></li> | |
</div> | |
<!--Header Start--> |
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
var fizzbuzz = function(num){ | |
var result = ""; | |
if (num % 3 == 0){ | |
result += "Fizz"; | |
} | |
if (num % 5 == 0){ | |
result += "Buzz"; | |
} | |
if (result == ""){ | |
result += num; |
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
var app = angular.module('d20', ['ngDialog', 'siyfion.sfTypeahead'], function ($interpolateProvider, $locationProvider) { | |
$interpolateProvider.startSymbol("{[{"); | |
$interpolateProvider.endSymbol("}]}"); | |
$locationProvider.html5Mode(true); | |
}); | |
app.config(['$httpProvider', function($httpProvider) { | |
$httpProvider.defaults.xsrfCookieName = 'csrftoken'; | |
$httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken'; | |
}]); |
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
//What die to roll {die}, which is 20 for a d20, 8 for a d8, etc. | |
//A modifier to add to the total, if any. | |
//Returns an object with the individual results in an array, and the total. | |
var roll = function(num, die, mod){ | |
var results = []; | |
var total = 0; | |
if (num > 0){ | |
for(var i = 0; i < num; i++){ | |
var result = Math.floor((Math.random() * die) + 1); | |
results.push(result); |
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
def site_list(request): | |
feeds = Feed.objects.all().order_by('-title') | |
result = {} | |
# first separate by letter | |
for feed in feeds: | |
letter = feed.title[0] | |
if letter in result.keys(): | |
result[letter].add(feed) | |
else: | |
result[letter] = [feed] |
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
struct process{ | |
int id; | |
int arrival; | |
int burst; | |
}; | |
queue<process> processes; | |
void first_come(){ |
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
def alphabetizer(names): | |
""" | |
Takes a list as a parameter, and sorts them into alphabetical order | |
and groups them by the first letter. | |
""" | |
result = [] | |
temp_dict = {} | |
for name in names: | |
first_letter = name[0].upper() | |
if first_letter not in temp_dict: |