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
| class B1 | |
| { | |
| }; | |
| class B2 | |
| { | |
| }; | |
| class D1 : public B1, private B2 | |
| { |
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
| #include <iostream> | |
| class Base1 | |
| { | |
| int mA; | |
| public: | |
| Base1(int a) : mA(a) {} | |
| void showBase1() |
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
| app.module('logics', function(module, app) { | |
| var death; | |
| death = function(model, object) { | |
| if (model.get('health') <= 0) { | |
| object.destroy(); | |
| } | |
| }; | |
| app.physics.on('charactersContact:begin', function(e) { | |
| if (!e.modelA.isAlly(e.modelB)) { |
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
| module Backend | |
| module ModelHelper | |
| def self.default_scope | |
| scope = Proc.new if block_given? | |
| self.default_scopes = [scope] | |
| end | |
| end | |
| end | |
| class Backend::Product < ::Product |
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
| #include <Ogre.h> | |
| #include <OIS.h> | |
| class FrameListener : public Ogre::FrameListener | |
| { | |
| OIS::Keyboard* mKeyboard; | |
| OIS::Mouse* mMouse; | |
| public: | |
| FrameListener(OIS::Keyboard* keyboard, OIS::Mouse* mouse) : |
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
| def custom_form_for(object, *args, &block) | |
| options = args.extract_options! | |
| options.url = **как-то создаешь особенную ссылку на модель** if **находимся в админке** | |
| simple_form_for(object, *(args << options.merge(builder: CustomFormBuilder)), &block) | |
| end |
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
| #include "Ogre.h" | |
| #include <SDL/SDL.h> | |
| #include <SDL/SDL_syswm.h> | |
| int main(int argc, char *argv[]) | |
| { | |
| //================================================= | |
| //------------------------------------------------- | |
| //================================================= |
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
| // Хватит писать фабрики, есть boost::factory, всё просто. | |
| #include <boost/functional/factory.hpp> | |
| #include <boost/function.hpp> | |
| #include <boost/assign.hpp> | |
| namespace Gui | |
| { | |
| class Element {}; | |
| class Button : public Element {}; |
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
| class Position | |
| int x: 0 | |
| int y: 0 | |
| class Size | |
| int width: 0 | |
| int height: 0 | |
| class Geometry | |
| Position position |
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
| <div class="article"> | |
| <h2 class="title">{{ field title }} First article {{ end }}</h2> | |
| <div class="content">{{ field content, type: html }} Content {{ end }}</div> | |
| </div> |