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 promise() { | |
// values to be passed on | |
this._value = undefined; | |
this._error = undefined; | |
this._callback = undefined; | |
} | |
promise.prototype.fullfill = function fullfill(value, error) { |
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
#!/usr/bin/python | |
encrypted_text = [0x1b,0x37,0x37,0x33,0x31,0x36,0x3f,0x78,0x15,0x1b,0x7f,0x2b,0x78,0x34,0x31,0x33,0x3d,0x78,0x39,0x78,0x28,0x37,0x2d,0x36,0x3c,0x78,0x37,0x3e,0x78,0x3a,0x39,0x3b,0x37,0x36] | |
class Node_Hex: | |
value = None | |
frequency = 0 | |
adjacent = None | |
def __init__(self, value): |
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
class RestController < ApplicationController | |
before_filter :find, :only => [:show, :update, :delete] | |
def index | |
@objects = get_class().all | |
render json: @objects | |
end | |
def show |
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 | |
abstract class Controller_Api extends \Fuel\Core\Controller_Rest | |
{ | |
/** | |
* The model class for the orm | |
* @var string | |
*/ | |
protected $orm_model; |
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
/* <![CDATA[ */ | |
$(function() { | |
var input = document.createElement("input"); | |
if(('placeholder' in input)==false) { | |
$('[placeholder]').focus(function() { | |
var i = $(this); | |
if(i.val() == i.attr('placeholder')) { | |
i.val('').removeClass('placeholder'); | |
if(i.hasClass('password')) { | |
i.removeClass('password'); |