This file contains hidden or 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 | |
global $post; | |
wp_enqueue_script('department-popovers'); | |
the_post(); | |
get_header(); | |
get_sidebar('breadcrumbs'); | |
$model = Snap::inst('WSE_Model_Faculty')->load( get_the_ID() ); |
This file contains hidden or 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
/** | |
* innerHTML style function | |
* | |
* @param DOMNode node | |
* @returns string the inner html string | |
*/ | |
protected function _inner_html( $node ) | |
{ | |
$doc = new DOMDocument('1.0','utf-8'); |
This file contains hidden or 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 haversine_distance(lat1,lat2,R){ | |
R = R || 6371; // km | |
var dLat = (lat2-lat1).toRad(); | |
var dLon = (lon2-lon1).toRad(); | |
var lat1 = lat1.toRad(); | |
var lat2 = lat2.toRad(); | |
var a = Math.sin(dLat/2) * Math.sin(dLat/2) + | |
Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2); | |
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); |
This file contains hidden or 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
/* Import Fonts */ | |
@import url("http://fonts.googleapis.com/css?family=Petit+Formal+Script"); | |
/* Customization variables */ | |
// general | |
// bg colors | |
@bg_color: #444; | |
// buttons |
This file contains hidden or 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 fabs_linkify($str){ | |
$re = "/(([a-z0-9\$\-\_\.\+\!\*'\(\)\,]+)\@)?((https?\:\/\/)?(www\.)?([a-z0-9\$\-\_\.\+\!\*'\(\)\,\/]+)\.(com|org|net|gov|us|tv)(\/[a-z0-9\$\-\_\.\+\!\*'\(\)\,\/]+)?)/i"; | |
return preg_replace_callback($re, 'fabs_linkify_callback', $str); | |
} | |
function fabs_linkify_callback($matches){ | |
if( $matches[1] ) { | |
return '<a href="mailto:'.$matches[0].'">'.$matches[0].'</a>'; | |
} | |
else{ |
This file contains hidden or 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
/** | |
* A quick example of how to use Simple events on an arbitrary javascript class. | |
*/ | |
var Cat = function(){ | |
var self = this; | |
this.on('hairball', function(){ | |
self.throwup(); | |
}); | |
}; |
This file contains hidden or 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 EventMixin(Target){ | |
var listeners = {}; | |
var methods = { | |
emit : function(ev){ | |
if( !listeners[ev] ) return; | |
var ar = listeners[ev]; | |
var args = [].slice.call(arguments, 1); | |
for(var i=0; i<ar.length; i++) ar[i].apply(this, args); | |
}, |
NewerOlder