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>Add Song</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> | |
</head> | |
<body> | |
<div class="container"> | |
<form> |
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
<script> | |
var balance = <?php echo $_SESSION['balance']; ?>; | |
</script> |
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
$dvds = Dvd::with('genre', 'rating', 'label') | |
->whereHas('genre', function($query) use ($genre_name) { | |
$query->where('genre_name', '=', $genre_name); | |
}) | |
->get(); |
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
Backbone.View.extend({ | |
events: | |
'click input[type=checkbox]': 'handleCheckboxChange' | |
handleCheckboxChange: () -> | |
}) |
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
angular | |
.module('defaultValueSelect', []) | |
.controller('ExampleController', function($scope, someCalculationService) { | |
$scope.data = { | |
availableOptions: [ | |
{id: '1', name: 'Option A'}, | |
{id: '2', name: 'Option B'}, | |
{id: '3', name: 'Option C'} | |
], | |
selectedOption: {id: '3', name: 'Option C'} //This sets the default value of the select in the ui |
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
$genre = $request->input('genre'); | |
$movies = DB::table('dvds') | |
->select('title', 'genre_name', 'rating_name', 'label_name', 'sound_name', 'format_name') | |
// more joins here | |
->join('genres', 'dvds.genre_id', '=', 'genres.id'); | |
if ($genre !== 'All') { | |
$movies = $movies->where('genre_id', '=', $genre); | |
} |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
init() { | |
this.set('todos', ['todo 1', 'todo 2']); | |
}, | |
actions: { | |
add() { | |
this.get('todos').pushObject('todo 3'); |
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
{ | |
"errors": [ | |
{ | |
"code": "application error code (not HTTP status code)" | |
} | |
] | |
} |
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
{ | |
"errors": [ | |
{ | |
"code": "application error code (not HTTP status code)", | |
"source": { | |
"pointer": "data/attributes/name" | |
} | |
} | |
] | |
} |
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
[{ | |
id: 5, | |
title: "Self Esteem", | |
artist: 1, | |
genre: 1, | |
price: 1.29, | |
playCount: 1, | |
createdBy: "admin" | |
}, { | |
id: 8, |
OlderNewer