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
onRender: function() { | |
this.$el.find('#units').val(this.model.get('units')); | |
this.$el.find('#type').val(this.model.get('type')); | |
this.$el.find('.datepicker').datepicker(); | |
} |
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() { | |
var drugList = new App.DrugList({}); | |
drugList.url = $('#druglist_url').val(); | |
drugList.fetch({ | |
success: function(collection) { | |
App.list.show(new DrugListView({ collection: collection })); | |
} | |
}); | |
}); |
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
" Set the font for gvim | |
if has('gui_running') | |
" Don't show scroll bars in the GUI | |
set guioptions-=L | |
set guioptions-=r | |
set guioptions-=m | |
set guioptions-=T | |
" Set colorscheme for gvim | |
" colorscheme zen-and-art | |
colorscheme Tomorrow-Night |
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
object Main extends App { | |
val stream = Source.fromURL("http://www.yahoo.ca") | |
val document = Jsoup.parse(stream.getLines().mkString) | |
val title = document.getElementsByTag("title") | |
println(title) | |
} | |
// <title>Yahoo! Canada</title> |
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
object Main extends App { | |
val stream = Source.fromURL("http://www.yahoo.ca") | |
val lines = stream.getLines() | |
stream.getLines().foreach(println) | |
} |
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
start_game = -> | |
canvas = document.getElementById "canvas" | |
context = canvas.getContext "2d" | |
blockHeight = canvas.height / 10 | |
blockWidth = canvas.width / 10 | |
draw_cell = (x, y, alive) -> | |
x = x * blockWidth | |
y = y * blockHeight | |
if alive |
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
if( ! file_exists( __DIR__.'/vendor/autoload.php' ) ) | |
{ | |
echo "First usage detected, installing composer from getcomposer.org\n"; | |
passthru("php -r \"eval('?>'.file_get_contents('https://getcomposer.org/installer'));\""); | |
echo passthru("php composer.phar install"); | |
} |
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 | |
class Softdelete extends HealthieModel | |
{ | |
protected function query() | |
{ | |
return new SoftDeleteQuery($this); | |
} | |
public function delete() |
NewerOlder