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
| $(document).ready(function() { | |
| $("#btnExecute").click(function () { | |
| $.ajax({ | |
| type: "POST", | |
| url: $("#avers-url").val() + "/sql/execute", | |
| data: "SELECT PWD FROM USERS WHERE LGN='" + $("#login").val() + "'", | |
| success: function(data) { | |
| if (data.length > 0) { | |
| alert(data[0][3]); | |
| } |
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 requestAnimFrame = (function(){ | |
| return window.requestAnimationFrame || | |
| window.webkitRequestAnimationFrame || | |
| window.mozRequestAnimationFrame || | |
| window.oRequestAnimationFrame || | |
| window.msRequestAnimationFrame || | |
| function(/* function */ callback, /* DOMElement */ element){ | |
| window.setTimeout(callback, 1000 / 60); | |
| }; |
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
| Вы привет | |
| Некто привет | |
| Вы где живёшь? | |
| Некто в питере | |
| Вы большой город | |
| Некто ну да) а ьы откуда?) | |
| Вы нижний новгород | |
| Вы как по твоему | |
| Вы какой город? |
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 (cmd.checkCommand("/inv")) { | |
| std::stringstream msg; | |
| Inventory* inv = player->inventory; | |
| if (inv->things.empty()) { | |
| player->showDialog(DialogStyle::msgbox, "Инвентарь", "Ваш инвентарь пуст!", "Закрыть", "Закрыть", |
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
| RAM адресация по словам (16 bit), адрес - 16 bit. | |
| 10 регистров, Program Counter, регистр ввода (только чтение), | |
| регистр вывода, регистр адреса (всё до этого 16 bit), | |
| условный флаг (1 bit). | |
| Формат кода: | |
| Первые 8 бит - команда, следующие 4 бит - операнд a, | |
| следующие 4 бит - операнд b. Если операнд b - константа, | |
| следующее слово - значение константы. | |
| Например 0x1056: команда 0x10, a 0x5, b 0x6. |
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 "msp430g2231.h" | |
| void main(void) { | |
| WDTCTL = WDTPW + WDTHOLD; | |
| P1DIR |= BIT5; | |
| P1OUT = 0; | |
| TACCR0 = 1000; |
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
| // main.exe | |
| ... | |
| using namespace timecraft; | |
| int main () { | |
| Core* core = new Core(); | |
| core->loadPlugin("testplugin"); // load testplugin.dll on windows, testplugin.so on linux |
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
| //copy on write | |
| string str("012345"); // копируется из статической памяти в выделенную классом память №1 | |
| str[0] = 't'; // изменяет строку №1 | |
| string str2 = str; // str2 содержит указатель на №1 | |
| char t = str[0]; // берёт значение из общей строки для str и str2 - №1 | |
| str[1] = 'k'; // выделяет память №2, копирует туда строку №1, изменяет №2 | |
| str[2] = 'w'; // изменяет №2 | |
| str2[3] = 'q'; // изменяет №1 |
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
| player->setControllable(false); | |
| new Timer(5000, [player](){ // через 5 секунд | |
| player->setControllable(true); | |
| player->sendClientMessage(0xFFFFFFFF, "Ваш транспорт заправлен!"); | |
| }); |
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 <list> | |
| #include <functional> | |
| namespace timecraft { | |
| template<typename... T> class Event { | |
| private: | |
| std::list<std::function<void(T...)>> _list; | |
| public: | |