⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file has been truncated, but you can view the full file.
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
'use strict'; | |
var COMPILED = !0, goog = goog || {}; | |
goog.global = this; | |
goog.DEBUG = !1; | |
goog.LOCALE = "en"; | |
goog.provide = function (a) { | |
if (!COMPILED) { | |
if (goog.isProvided_(a)) | |
throw Error('Namespace "' + a + '" already declared.'); |
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
CREATE TABLE `makers` ( | |
`id` int(10) unsigned NOT NULL, | |
`name` varchar(255) NOT NULL, | |
`description` varchar(255) NOT NULL, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |
-- |
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
public function get_short_created_at() | |
{ | |
$date = $this->get_attribute('created_at'); | |
if (is_string($date)){ | |
$dateObject = DateTime::createFromFormat('Y-m-d H:i:s', $date); | |
return $dateObject->format('Y-m-d'); | |
} | |
return $date; | |
} |
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
// inside of a controller call: | |
Session::flash('status_success', 'Succesfully submitted!'); | |
// inside of your view : | |
<script> | |
@if (!is_null(Session::get('status_success'))) | |
@if (is_array(Session::get('status_success'))) | |
@foreach (Session::get('status_success') as $success) | |
displayMessage('{{$success }}', "success"); |
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
$('#overlay-objet img').droppable({ | |
tolerance: 'pointer', | |
drop: _.bind(function(event, ui) { | |
object = $(event.target); | |
if (object.attr("data-val") != undefined){ | |
objectDrag = object.attr('data-val').toString(); | |
objectDrop = $(ui.draggable).attr('data-val').toString(); | |
//$(ui.draggable).removeClass('objet-drag').addClass('objet-hover'); | |
object.addClass('hidden'); | |
$('#'+object.attr('data-toggle')).removeClass('hidden'); |
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
Demo.Views.Page = Backbone.View.extend({ | |
className: "page", | |
initialize: function () { | |
this.render(); | |
}, | |
show: function () { | |
$('.page').css({"position": "absolute"}); | |
var direction_coefficient = this.options.back ? 1 : -1; | |
if ($('.page').length) { |
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
var SomeModel = Backbone.Model.extend({}); | |
someModel = new SomeModel(); | |
someModel.bind("change", function(model, collection){ | |
alert("You set some_attribute to " + model.get('some_attribute')); | |
}); | |
someModel.set({some_attribute: "some value"}); |
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
<input type="button" id="start" value="Start Life" onclick="life.toggleLife();"> | |
<input type="button" value="Clear" onclick="life.clear();"> | |
<canvas id="universe" width="500" height="500"> |