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 | |
/** | |
* Checks for a partial match in the geocode response | |
* | |
* @return boolean | |
*/ | |
public function isPartialResponse() { | |
if (isset($this->geocodeResponse['results'][0]['partial_match']) && $this->geocodeResponse['results'][0]['partial_match'] == 'true') | |
return true; |
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 | |
/** | |
* Existence of Composition class requires that an external object of | |
* class B is passed in on construction | |
* | |
* UML Explanation - The object at this role contains the object at the opposite role. | |
* | |
* Alternatively stated, an object of class Composition cannot be created without | |
* an object of class B (in this case through dependency injection) |
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 | |
<?php | |
abstract class OnTheBookShelf | |
{ | |
abstract function getBookInfo($previousBook); | |
abstract function getBookCount(); | |
abstract function setBookCount($new_count); | |
abstract function addBook($oneBook); |
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 | |
class MovieTheater { | |
private $objectBoxOffice; | |
private $objectMovie; | |
public function __construct(BoxOffice $boxOffice) | |
{ | |
// using composition | |
$this->objectBoxOffice = $boxOffice; |
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 | |
$username='h2odev'; | |
$password='likewater'; | |
$location='http://h2odev.law.harvard.edu/playlists/151'; | |
$baseUrl = 'http://h2odev.law.harvard.edu/'; | |
$currDir = dirname(__FILE__) . DIRECTORY_SEPARATOR; | |
$userAgent = require($currDir . 'cuseragent.php'); | |
$ch = curl_init (); |
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
$("#selectBox").append('<option value="option6">option6</option>'); |
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 requestAJAX = jQuery.ajax({ | |
method: 'POST', | |
url: 'data-export.php', | |
dataType: 'html', | |
data: { nameOfArrayPassedToServer : arrayNameInJS } | |
}); | |
requestAJAX.done(function(response) { | |
console.log(response); |
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
http://paislee.io/a-conceptual-introduction-to-angularjs/ | |
http://nicholasjohnson.com/angular/book/ | |
Javascript | |
----------------------- | |
http://speakingjs.com/es5/index.html | |
http://bonsaiden.github.io/JavaScript-Garden/ |
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
jQuery('body').on('click', '.close', function() { | |
// get parent id | |
var parent = $(this).parent(); | |
var parentId = parent[0].id; | |
// hide error | |
toggleBootstrapHidden('#' + parentId, 'hide'); | |
}); |
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 ($) { | |
'use strict'; | |
var dismiss = '[data-dismiss="alert"]' | |
var Alert = function (el) { | |
$(el).on('click', dismiss, this.close) | |
var $parent = $(this).closest('.alert') |
OlderNewer