Convenience function for performing a groupBy
on a list then a sortBy
on the resulting groups using Underscore methods.
sortedGroupBy(list, groupByIterator, sortByIterator)
<?php | |
/** | |
* Convert a comma separated file into an associated array. | |
* The first row should contain the array keys. | |
* | |
* Example: | |
* | |
* @param string $filename Path to the CSV file | |
* @param string $delimiter The separator used in the file | |
* @return array |
# | |
# @author Jonathon byrd | |
# | |
############################################################ | |
# first things first, set your iptables for a web server. If you jack these | |
# up you don't want to have to re-install your os after doing much more. | |
# @see http://www.thegeekstuff.com/2011/06/iptables-rules-examples/ | |
# and | |
# @see https://help.ubuntu.com/community/IptablesHowTo |
<button id='stop'>stop</button> | |
<button id='start'>start</button> | |
<div id='count'></div> | |
<div id="shell"> | |
</div> | |
<script | |
src="http://maps.googleapis.com/maps/api/js?key=AIzaSyA_OZRpMaskOiOyodu5PQSbFKrY5hjFRxY&sensor=false"></script> | |
<script> | |
var mapMarkup = '<div id="map" style="width: 200px; height: 200px;">loading</div>'; | |
<script id="modal-view-template" type="text/html"> | |
<div class="modal-header"> | |
<h2>This is a modal!</h2> | |
</div> | |
<div class="modal-body"> | |
<p>With some content in it!</p> | |
</div> | |
<div class="modal-footer"> | |
<button class="btn">cancel</button> | |
<button class="btn-default">Ok</button> |
// Create a jquery plugin that prints the given element. | |
jQuery.fn.print = function(){ | |
// NOTE: We are trimming the jQuery collection down to the | |
// first element in the collection. | |
if (this.size() > 1){ | |
this.eq( 0 ).print(); | |
return; | |
} else if (!this.size()){ | |
return; | |
} |
var data = { | |
type: "something", | |
name: "whatever", | |
addresses: [ | |
{ | |
type: "read_address", | |
address: "1/2/3", | |
value: "10" | |
}, | |
{ |
Convenience function for performing a groupBy
on a list then a sortBy
on the resulting groups using Underscore methods.
sortedGroupBy(list, groupByIterator, sortByIterator)
<script id="modal-view-template" type="text/html"> | |
<div class="modal-header"> | |
<h2>This is a modal!</h2> | |
</div> | |
<div class="modal-body"> | |
<p>With some content in it!</p> | |
</div> | |
<div class="modal-footer"> | |
<button class="btn">cancel</button> | |
<button class="btn-default">Ok</button> |
<script id="modal-view-template" type="text/html"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
<h4 class="modal-title" id="myModalLabel">Modal title</h4> | |
</div> | |
<div class="modal-body"> | |
... | |
</div> |
// Add this to the onRender() of the view you want to add your file upload to | |
// The options passed in will override the default Plupload options | |
// (http://www.plupload.com/documentation.php) | |
this.fileUploadView = new FileUploadView({ | |
el: '#upload-container', | |
url: 'upload.php', | |
successMessage: 'Your file uploaded successfully.' | |
}); | |
this.fileUploadView.render(); |