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 Cursor{ | |
// @include components/d2.ts | |
create(){ | |
} | |
} |
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 TextBox{ | |
constructor(x, y, game){ | |
this.lineHeight = 20 | |
this.lineNumber = 0 | |
this.game = game | |
this.x = x | |
this.y = y | |
} | |
write(text){ |
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
const mkdirp = require('mkdirp') | |
const rmdir = require('rmdir') | |
const fs = require('fs') | |
rmdir('./media/01', (err)=>{ | |
var path = './media/01/f1/' | |
mkdirp(path, (err)=>{ | |
if (err) return err | |
const content = "asdasd" | |
fs.writeFile(path + 'file.jpg', content, (err)=>{ |
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
fit('should not put image in request', (done)=>{ | |
defer = $q.defer() | |
defer.promise.then(function(){ | |
console.log("blah") | |
done() | |
}) | |
defer.resolve() | |
}) |
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
<h2>{{'common.register' | translate}}</h2> | |
<form class="form-horizontal" style="width: 500px; margin: 0 auto" ng-submit="send()" novalidate name="registerForm"> | |
<div class="form-group"> | |
<label for="email" class="col-sm-3">{{'common.email' | translate}}</label> | |
<div class="col-sm-9"> | |
<input | |
type="email" | |
class="form-control" | |
id="email" | |
name="email" |
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
interface IAuthConnection{ | |
logIn() | |
logOut() | |
register() | |
} | |
@injectable() | |
export class AuthConnection implements IAuthConnection{ | |
connection: IConnection | |
constructor( |
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 | |
// [{"text":"asasadsd"}, {"text":"saasd dsf d"}, {"text":"oooooooooooololo","options":["sadasd", "asdsadsad","asdasdasd","asdasdsad"]}] | |
class questionariesActions extends sfActions{ | |
public function preExecute(){ | |
if ($id = $this->getRequest()->getParameter('id')){ | |
$this->forward404Unless($this->questionary = EventQuestionaryPeer::getById($id), sprintf('Объект мероприятия с указанным id не существует (%s).', $id)); | |
$this->breadcrumbs = array( | |
array('url' => $this->getController()->genUrl('@events_common'), 'label'=>'Список мероприятий'), |
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 | |
class Controller_Galleries extends Controller_API{ | |
protected $_model = 'Gallery'; | |
public $secure_actions = array( | |
'remove_image' => array('admin'), | |
'update_image' => array('admin'), | |
); | |
public function action_upload_image(){ |
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 | |
class Controller_API extends Controller_Default{ | |
public $auth_required = true; | |
public $user; | |
public $secure_actions = array( | |
'remove' => array('admin'), | |
'save' => array('admin'), | |
); |
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
window._RTCPeerConnection = window.mozRTCPeerConnection || window.webkitRTCPeerConnection || window.RTCPeerConnection | |
window._RTCSessionDescription = window.webkitRTCSessionDescription || window.mozRTCSessionDescription || window.RTCSessionDescription; | |
window._IceCandidate = window.mozRTCIceCandidate || window.RTCIceCandidate | |
unless window._RTCPeerConnection then console.error 'Your browser doesn\'t support WebRTC' | |
navigator.getUserMedia = navigator.getUserMedia || navigator.mozGetUserMedia || navigator.webkitGetUserMedia | |
app.factory 'PeerConnection', ['$rootScope', 'XMPP', 'Config', '$q', 'Account','LocalStorage', ($rootScope, XMPP, Config, $q, Account, LSParams)-> | |
class PeerConnection |