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
console = {}; | |
var i, max, funcs = [ | |
'log', 'debug', 'info', 'warn', 'error', 'assert', 'dir', 'dirxml', | |
'trace', 'group', 'groupCollapsed', 'groupEnd', 'time', 'timeEnd', | |
'profile', 'profileEnd', 'count' | |
]; | |
for( i = 0, max = funcs.length; i < max; i++ ) { | |
console[ funcs[ i ] ] = function(){}; | |
} |
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 Animal( name, health ) { | |
this.name = name; | |
this.health = health; | |
} | |
Animal.prototype.eat = function( value ) { | |
this.health += value; | |
}; | |
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
define( | |
[ | |
// Template | |
'text!tpl/HomeView.tpl' | |
// Control | |
'realeyes/control/Dispatcher' | |
// Model | |
'realeyes/model/AppModel' |
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(ns){ | |
var Application = function Application(options) { | |
this.initialize(options); | |
} | |
$.extend(Application.prototype, { | |
initialize: function(options) { | |
console.log('Application::initialize()', options); |
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
// Creating the service | |
factory('GetMajorEventsTimelineSvc', ['$q', '$http', '$window', function($q, $http, $window) { | |
return function() { | |
return { | |
get: function() { | |
var uri = 'http://overlays.nbcsports.com/services/lowttl/pl.asmx/GetMajorEventsTimeline'; | |
var method = 'JSONP'; | |
var params = {}; | |
params.GameID = 694904; | |
params.callback = 'onGetMajorEvents'; |
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
{ | |
"caret_style": "phase", | |
"color_scheme": "Packages/Theme - Flatland/Flatland Dark.tmTheme", | |
"detect_indentation": false, | |
"auto_indent": true, | |
"smart_indent": true, | |
"detect_slow_plugins": false, | |
"font_face": "Andale Mono", | |
"font_size": 13.0, | |
"ignored_packages": |
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
switch(errorType) { | |
case 1: { | |
console.log('unknown', 1); | |
$(self).trigger('errorMessage', playerModel.playerConfig.errorMessages.unknown); | |
break; | |
} | |
case 2: { | |
console.log('videoNotFound', 2); | |
$(self).trigger('errorMessage', playerModel.playerConfig.errorMessages.videoNotFound); | |
break; |
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> | |
<title>ngTabs</title> | |
<style type="text/css" media="screen"> | |
ul { | |
list-style: none; | |
padding: 0; | |
margin: 0; | |
} |
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 getDistanceFromLatLonInKm(lat1,lon1,lat2,lon2) { | |
var R = 6371; // Radius of the earth in km | |
var dLat = deg2rad(lat2-lat1); // deg2rad below | |
var dLon = deg2rad(lon2-lon1); | |
var a = | |
Math.sin(dLat/2) * Math.sin(dLat/2) + | |
Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * | |
Math.sin(dLon/2) * Math.sin(dLon/2) | |
; | |
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); |
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 ng-app="SliderModuleApp" class="sample"> | |
<div ng-controller="SliderModuleCtrl"> | |
<div id="slider02"></div> | |
<div id="view02"> | |
<h1>I'm The View</h1> | |
<img id="image02" src="images/view-two.jpg" alt="View"> | |
</div> | |
</div> | |
<script> | |
var SliderModuleApp = angular.module('SliderModuleApp', [function(){ |
OlderNewer