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
%% delta(x speed), -//-y, px (lim=px*x),-//- py | |
{Scale, Sdurat} = gen_scale(linear(1), linear(1), 2, 2), | |
{Irotate, Rdurat} = gen_rotate(linear(2), 4.5), %% delta(speed), p (lim = p*360) | |
Rotate = delay(Sdurat, Irotate), | |
{Itrans, Tdurat} = gen_translate(pow(2), 3.7), | |
Trans = delay(Sdurat + Rdurat, Itrans), | |
Trigger = delay(Sdurat + Rdurat + Tdurat, gen_trigger(TrigFunc)), |
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
(gdb) p x < 1 | |
$7 = true | |
(gdb) p x < (bx + block()->size()) | |
$8 = false | |
(gdb) p (bx + block()->size()) | |
$9 = 1 | |
(gdb) | |
------- |
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
data BiTree a = Leaf a | BiTree a (BiTree a) (BiTree a) deriving Show | |
{-flatten :: BiTree a -> [a]-} | |
{-flatten (BiTree v l r)= [v] ++ flatten l ++ flatten r-} | |
{-flatten (Leaf v) = [v]-} | |
flatten' :: BiTree a -> [a] -> [a] | |
flatten' (Leaf v) res = v:res | |
flatten' (BiTree v l r) res = v:flatten' l (flatten' r res) |
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
#include <cstdlib> | |
#include <iostream> | |
using namespace std; | |
struct Functor { | |
inline int operator () (int i, char c) { | |
return i+c; | |
} | |
}; |
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
-module(head_srv). | |
-compile(export_all). | |
%-export([start/1, benchmark/1, console_start/0, loop/1]). | |
-include("jsonerl/jsonerl.hrl"). | |
-record(command, {action, error, login, desc}). | |
-record(logic_state, {ies = none}). | |
-define(INTERNAL_TIMEOUT, 10000). | |
-define(LISTEN_PORT, 6070). |
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
#include <cstdlib> | |
#include <cstdio> | |
#include <iostream> | |
using namespace std; | |
template <typename T1, typename T2> | |
class Cast { | |
private: | |
struct BigType { |
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
-- | Задание практикума №2 | |
-- Вариант №2 "Отождествление Рефал-выражений" | |
module Main where | |
import Debug.Trace | |
import Data.Maybe | |
import Control.Monad | |
import Text.ParserCombinators.Parsec as Parsec | |
-- * Вспомогательные функции и типы |
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 NSInvocationOperation (mutipleObject) | |
- (id)initWithTarget:(id)target selector:(SEL) objects:(id)first, ...; | |
@end | |
@implementation NSInvocationOperation (multipleObjects) | |
- (id)initWithTarget:(id)target selector:(SEL)sel objects:(id)first, ... { | |
NSAutoreleasePool *pool = [NSAutoreleasePool new]; | |
NSMethodSignature *signature = [target methodSignatureForSelector:sel]; |
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
#import <Foundation/Foundation.h> | |
typedef id (^MVGetterBlock)(void); | |
typedef void (^MVSetterBlock)(id); | |
typedef id (^MVStateOpBlock)(id); | |
typedef NSOperation * (^MVOpSetupBlock)(MVGetterBlock, MVSetterBlock); | |
@interface MVStateStorage : NSObject { | |
__block NSMutableDictionary *data; |
OlderNewer