text:
NSErrorUserInfoKey const MTZTableFormRowKey = @"MTZTableFormRowKey";
NSErrorUserInfoKey const MTZFormFieldKey = @"MTZFormFieldKey";

@interface MTZTableFormRow ()
@end

@implementation MTZTableFormRow

- (instancetype)initWithClass:(Class)clazz formObject:(NSObject<MTZFormObject> *)formObject keyPath:(MTZKeyPath *)keyPath model:(id<MTZModel>)model {
    self = [super initWithClass:clazz model:model action:nil];
    if (self) {
        _formObject = formObject;
        _keyPath = keyPath;
        [self checkDataTypes];
    }

    return self;
}

- (instancetype)initWithNib:(UINib *)nib formObject:(NSObject<MTZFormObject> *)formObject keyPath:(MTZKeyPath *)keyPath model:(id<MTZModel>)model {
    self = [super initWithNib:nib model:model action:nil];
    if (self) {
        _formObject = formObject;
        _keyPath = keyPath;
        [self checkDataTypes];
    }

    return self;
}

- (instancetype)initWithClass:(Class)clazz
                   formObject:(id<MTZFormObject>)formObject
                      keyPath:(MTZKeyPath *)keyPath
                   modelClass:(Class)modelClass
                 modelPayload:(id<MTZLazyModelPayload>)modelPayload {
    self = [super initWithClass:clazz modelClass:modelClass modelPayload:modelPayload action:nil];
    if (self) {
        _formObject = formObject;
        _keyPath = keyPath;
        [self checkDataTypes];
    }

    return self;
}

- (instancetype)initWithNib:(UINib *)nib
                 formObject:(id<MTZFormObject>)formObject
                    keyPath:(MTZKeyPath *)keyPath
                 modelClass:(Class)modelClass
               modelPayload:(id<MTZLazyModelPayload>)modelPayload {
    self = [super initWithNib:nib modelClass:modelClass modelPayload:modelPayload action:nil];
    if (self) {
        _formObject = formObject;
        _keyPath = keyPath;
        [self checkDataTypes];
    }

    return self;
}

- (void)updateFormObject {
    id formObjectTypedValue = [self finalFormValue];
    if (!formObjectTypedValue) {
        NSAssert(NO, @"Obtained nil value for form object from %@", self.converter);
    }

    [self.formObject setValue:formObjectTypedValue forKeyPath:self.keyPath];
}

- (void)updateFormFieldWithCustomValue:(id)customValue {
    id formFieldTypedValue = [self finalFieldValueWithCustomValue:customValue];
    if (formFieldTypedValue) {
        Class finalClass = [formFieldTypedValue class];
        while ([NSStringFromClass(finalClass) containsString:@"Swift"] ||
               [NSStringFromClass(finalClass) containsString:@"NSTaggedPointerString"]) {
            finalClass = [finalClass superclass];
        }

        NSAssert(!self.formField || [[self.formField.fieldValue class] isSubclassOfClass:finalClass] ||
                 [finalClass isSubclassOfClass:[self.formField.fieldValue superclass]], @"Type '%@' for form field with type '%@' is incompatible without a converter.", [formFieldTypedValue class], [self.formField.fieldValue class]);
    }

    self.formField.fieldValue = formFieldTypedValue;
    if (self.masker) {
        [self.masker textFieldDidChange:self.formField];
    }
}

#pragma mark - Properties
- (NSObject<MTZFormObject> *)formObject {
    NSAssert(_formObject, @"Form objects are weakly held by MTZTableFormRow, so they must be strongly held by something else.");
    return _formObject;
}

- (void)setFormField:(__kindof UIControl<MTZFormField> *)formField {
    _formField = formField;
    [_formField removeTarget:nil action:nil forControlEvents:UIControlEventAllEvents];
    [_formField addTarget:self action:@selector(updateFormObject) forControlEvents:UIControlEventEditingChanged];
    [_formField addTarget:self action:@selector(updateFormObject) forControlEvents:UIControlEventValueChanged];

    if (self.masker) {
        UITextField *textField = (UITextField *)_formField;
        NSAssert([textField isKindOfClass:[UITextField class]], @"Maskers can only be applied to UITextField's.");
        [textField addTarget:self.masker action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
    }

    if ([formField isKindOfClass:[UITextField class]] || [formField isKindOfClass:[UITextView class]]) {
        ((UITextField *)formField).delegate = self;
        ((UITextField *)formField).inputView = nil;
        ((UITextField *)formField).inputAccessoryView = [UIToolbar inputAccessoryViewForControl:formField  delegate:self.section];
    }

    [self updateFormFieldWithCustomValue:nil];
}

#pragma mark - MTZFormValidatable
- (BOOL)validate:(NSError **)error {
    for (MTZFormValidator *validator in self.validators) {
        BOOL valid = [validator validate:[self finalFormValue] error:error];
        if (!valid) {
            NSMutableDictionary *mutableUserInfo = [(*error).userInfo mutableCopy];
            mutableUserInfo[MTZTableFormRowKey] = self;
            mutableUserInfo[MTZFormFieldKey] = self.formField;
            mutableUserInfo[NSLocalizedDescriptionKey] = validator.errorMessage;
            (*error) = [NSError errorWithDomain:(*error).domain code:(*error).code userInfo:mutableUserInfo];
            return NO;
        }
    }

    return YES;
}

#pragma mark - UITextFieldDelegate
- (void)textFieldDidBeginEditing:(UITextField *)textField {
    if ([self.formField respondsToSelector:@selector(setInvalid:)]) {
        [self.formField setInvalid:NO];
    }
}

- (void)textFieldDidEndEditing:(UITextField *)textField {
    if ([self.formField respondsToSelector:@selector(setInvalid:)]) {
        if (textField.text.length) {
            NSError *error;
            [self.formField setInvalid:![self validate:&error]];
        } else {
            [self.formField setInvalid:NO];
        }
    }
}

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
    self.masker.previousTextFieldContent = textField.text;
    self.masker.previousSelection = textField.selectedTextRange;
    self.masker.textWasPasted = string.length > 1;
    return YES;
}

- (BOOL)textFieldShouldReturn:(UITextField *)textField {
    [textField resignFirstResponder];
    return YES;
}

#pragma mark - UITextViewDelegate
- (void)textViewDidBeginEditing:(UITextView *)textView {
    [self textFieldDidBeginEditing:(UITextField *)textView];
}

- (void)textViewDidEndEditing:(UITextView *)textView {
    [self textFieldDidEndEditing:(UITextField *)textView];
}

#pragma mark - Private
- (id)finalFieldValueWithCustomValue:(id)customValue {
    id inputValue = customValue ?: [self.formObject valueForKeyPath:self.keyPath];
    if (self.converter) {
        return [self.converter toFieldValue:inputValue];
    }

    return inputValue;
}

- (id)finalFormValue {
    if (self.converter) {
        return [self.converter fromFieldValue:self.formField.fieldValue];
    }

    return self.formField.fieldValue;
}

- (void)checkDataTypes {
    if ([self isMemberOfClass:[MTZTableFormRow class]]) {
        __unused BOOL isDate = MTZFormObjectKeyPathIsOfClass(self.formObject, (MTZKeyPath *)self.keyPath, [NSDate class]);
        NSAssert(!isDate, @"MTZTableFormRow is not compatible with NSDate (keypath '%@'). Please use MTZTableFormDateRow instead.", self.keyPath);
    }
}

@end

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace PhpParser;

/*
 * This parser is based on a skeleton written by Moriyoshi Koizumi, which in
 * turn is based on work by Masato Bito.
 */
abstract class ParserAbstract
{
    const SYMBOL_NONE = -1;

    /*
     * The following members will be filled with generated parsing data:
     */

    /** @var int Size of $tokenToSymbol map */
    protected $tokenToSymbolMapSize;
    /** @var int Size of $action table */
    protected $actionTableSize;
    /** @var int Size of $goto table */
    protected $gotoTableSize;

    /** @var int Symbol number signifying an invalid token */
    protected $invalidSymbol;
    /** @var int Action number signifying default action */
    protected $defaultAction;
    /** @var int Rule number signifying that an unexpected token was encountered */
    protected $unexpectedTokenRule;

    protected $YY2TBLSTATE;
    protected $YYNLSTATES;

    /** @var array Map of lexer tokens to internal symbols */
    protected $tokenToSymbol;
    /** @var array Map of symbols to their names */
    protected $symbolToName;
    /** @var array Names of the production rules (only necessary for debugging) */
    protected $productions;

    /** @var array Map of states to a displacement into the $action table. The corresponding action for this
     *             state/symbol pair is $action[$actionBase[$state] + $symbol]. If $actionBase[$state] is 0, the
                   action is defaulted, i.e. $actionDefault[$state] should be used instead. */
    protected $actionBase;
    /** @var array Table of actions. Indexed according to $actionBase comment. */
    protected $action;
    /** @var array Table indexed analogously to $action. If $actionCheck[$actionBase[$state] + $symbol] != $symbol
     *             then the action is defaulted, i.e. $actionDefault[$state] should be used instead. */
    protected $actionCheck;
    /** @var array Map of states to their default action */
    protected $actionDefault;

    /** @var array Map of non-terminals to a displacement into the $goto table. The corresponding goto state for this
     *             non-terminal/state pair is $goto[$gotoBase[$nonTerminal] + $state] (unless defaulted) */
    protected $gotoBase;
    /** @var array Table of states to goto after reduction. Indexed according to $gotoBase comment. */
    protected $goto;
    /** @var array Table indexed analogously to $goto. If $gotoCheck[$gotoBase[$nonTerminal] + $state] != $nonTerminal
     *             then the goto state is defaulted, i.e. $gotoDefault[$nonTerminal] should be used. */
    protected $gotoCheck;
    /** @var array Map of non-terminals to the default state to goto after their reduction */
    protected $gotoDefault;

    /** @var array Map of rules to the non-terminal on their left-hand side, i.e. the non-terminal to use for
     *             determining the state to goto after reduction. */
    protected $ruleToNonTerminal;
    /** @var array Map of rules to the length of their right-hand side, which is the number of elements that have to
     *             be popped from the stack(s) on reduction. */
    protected $ruleToLength;

    /*
     * The following members are part of the parser state:
     */

    /** @var Lexer Lexer that is used when parsing */
    protected $lexer;
    /** @var mixed Temporary value containing the result of last semantic action (reduction) */
    protected $semValue;
    /** @var array Semantic value stack (contains values of tokens and semantic action results) */
    protected $semStack;
    /** @var int Position in stacks (state stack, semantic value stack, attribute stack) */
    protected $stackPos;

    /**
     * Creates a parser instance.
     *
     * @param Lexer $lexer A lexer
     */
    public function __construct(Lexer $lexer) {
        $this->lexer = $lexer;
    }

    /**
     * Parses PHP code into a node tree.
     *
     * @param string $code The source code to parse
     *
     * @return Node[] Array of statements
     */
    public function parse($code) {
        $this->lexer->startLexing($code);

        // We start off with no lookahead-token
        $symbol = self::SYMBOL_NONE;

        // The attributes for a node are taken from the first and last token of the node.
        // From the first token only the startAttributes are taken and from the last only
        // the endAttributes. Both are merged using the array union operator (+).
        $startAttributes = array('startLine' => 1);
        $endAttributes   = array();

        // In order to figure out the attributes for the starting token, we have to keep
        // them in a stack
        $attributeStack = array($startAttributes);

        // Start off in the initial state and keep a stack of previous states
        $state = 0;
        $stateStack = array($state);

        // Semantic value stack (contains values of tokens and semantic action results)
        $this->semStack = array();

        // Current position in the stack(s)
        $this->stackPos = 0;

        for (;;) {
            //$this->traceNewState($state, $symbol);

            if ($this->actionBase[$state] == 0) {
                $rule = $this->actionDefault[$state];
            } else {
                if ($symbol === self::SYMBOL_NONE) {
                    // Fetch the next token id from the lexer and fetch additional info by-ref.
                    // The end attributes are fetched into a temporary variable and only set once the token is really
                    // shifted (not during read). Otherwise you would sometimes get off-by-one errors, when a rule is
                    // reduced after a token was read but not yet shifted.
                    $tokenId = $this->lexer->getNextToken($tokenValue, $startAttributes, $nextEndAttributes);

                    // map the lexer token id to the internally used symbols
                    $symbol = $tokenId >= 0 && $tokenId < $this->tokenToSymbolMapSize
                        ? $this->tokenToSymbol[$tokenId]
                        : $this->invalidSymbol;

                    if ($symbol === $this->invalidSymbol) {
                        throw new \RangeException(sprintf(
                            'The lexer returned an invalid token (id=%d, value=%s)',
                            $tokenId, $tokenValue
                        ));
                    }

                    $attributeStack[$this->stackPos] = $startAttributes;

                    //$this->traceRead($symbol);
                }

                $idx = $this->actionBase[$state] + $symbol;
                if ((($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] == $symbol)
                     || ($state < $this->YY2TBLSTATE
                         && ($idx = $this->actionBase[$state + $this->YYNLSTATES] + $symbol) >= 0
                         && $idx < $this->actionTableSize && $this->actionCheck[$idx] == $symbol))
                    && ($action = $this->action[$idx]) != $this->defaultAction) {
                    /*
                     * >= YYNLSTATES: shift and reduce
                     * > 0: shift
                     * = 0: accept
                     * < 0: reduce
                     * = -YYUNEXPECTED: error
                     */
                    if ($action > 0) {
                        /* shift */
                        //$this->traceShift($symbol);

                        ++$this->stackPos;
                        $stateStack[$this->stackPos]     = $state = $action;
                        $this->semStack[$this->stackPos] = $tokenValue;
                        $attributeStack[$this->stackPos] = $startAttributes;
                        $endAttributes = $nextEndAttributes;
                        $symbol = self::SYMBOL_NONE;

                        if ($action < $this->YYNLSTATES)
                            continue;

                        /* $yyn >= YYNLSTATES means shift-and-reduce */
                        $rule = $action - $this->YYNLSTATES;
                    } else {
                        $rule = -$action;
                    }
                } else {
                    $rule = $this->actionDefault[$state];
                }
            }

            for (;;) {
                if ($rule === 0) {
                    /* accept */
                    //$this->traceAccept();
                    return $this->semValue;
                } elseif ($rule !== $this->unexpectedTokenRule) {
                    /* reduce */
                    //$this->traceReduce($rule);

                    try {
                        $this->{'reduceRule' . $rule}(
                            $attributeStack[$this->stackPos - $this->ruleToLength[$rule]]
                            + $endAttributes
                        );
                    } catch (Error $e) {
                        if (-1 === $e->getRawLine()) {
                            $e->setRawLine($startAttributes['startLine']);
                        }

                        throw $e;
                    }

                    /* Goto - shift nonterminal */
                    $this->stackPos -= $this->ruleToLength[$rule];
                    $nonTerminal = $this->ruleToNonTerminal[$rule];
                    $idx = $this->gotoBase[$nonTerminal] + $stateStack[$this->stackPos];
                    if ($idx >= 0 && $idx < $this->gotoTableSize && $this->gotoCheck[$idx] == $nonTerminal) {
                        $state = $this->goto[$idx];
                    } else {
                        $state = $this->gotoDefault[$nonTerminal];
                    }

                    ++$this->stackPos;
                    $stateStack[$this->stackPos]     = $state;
                    $this->semStack[$this->stackPos] = $this->semValue;
                    $attributeStack[$this->stackPos] = $startAttributes;

                    if ($state < $this->YYNLSTATES)
                        break;
                    /* >= YYNLSTATES means shift-and-reduce */
                    $rule = $state - $this->YYNLSTATES;
                } else {
                    /* error */
                    if ($expected = $this->getExpectedTokens($state)) {
                        $expectedString = ', expecting ' . implode(' or ', $expected);
                    } else {
                        $expectedString = '';
                    }

                    throw new Error(
                        'Syntax error, unexpected ' . $this->symbolToName[$symbol] . $expectedString,
                        $startAttributes['startLine']
                    );
                }
            }
        }
    }

    protected function getExpectedTokens($state) {
        $expected = array();

        $base = $this->actionBase[$state];
        foreach ($this->symbolToName as $symbol => $name) {
            $idx = $base + $symbol;
            if ($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol
                || $state < $this->YY2TBLSTATE
                && ($idx = $this->actionBase[$state + $this->YYNLSTATES] + $symbol) >= 0
                && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol
            ) {
                if ($this->action[$idx] != $this->unexpectedTokenRule) {
                    if (count($expected) == 4) {
                        /* Too many expected tokens */
                        return array();
                    }

                    $expected[] = $name;
                }
            }
        }

        return $expected;
    }

    /*
     * Tracing functions used for debugging the parser.
     */

    protected function traceNewState($state, $symbol) {
        echo '% State ' . $state
            . ', Lookahead ' . ($symbol == self::SYMBOL_NONE ? '--none--' : $this->symbolToName[$symbol]) . "\n";
    }

    protected function traceRead($symbol) {
        echo '% Reading ' . $this->symbolToName[$symbol] . "\n";
    }

    protected function traceShift($symbol) {
        echo '% Shift ' . $this->symbolToName[$symbol] . "\n";
    }

    protected function traceAccept() {
        echo "% Accepted.\n";
    }

    protected function traceReduce($n) {
        echo '% Reduce by (' . $n . ') ' . $this->productions[$n] . "\n";
    }

    /*
     * Helper functions invoked by semantic actions
     */

    /**
     * Moves statements of semicolon-style namespaces into $ns->stmts and checks various error conditions.
     *
     * @param Node[] $stmts
     * @return Node[]
     */
    protected function handleNamespaces(array $stmts) {
        $style = $this->getNamespacingStyle($stmts);
        if (null === $style) {
            // not namespaced, nothing to do
            return $stmts;
        } elseif ('brace' === $style) {
            // For braced namespaces we only have to check that there are no invalid statements between the namespaces
            $afterFirstNamespace = false;
            foreach ($stmts as $stmt) {
                if ($stmt instanceof Node\Stmt\Namespace_) {
                    $afterFirstNamespace = true;
                } elseif (!$stmt instanceof Node\Stmt\HaltCompiler && $afterFirstNamespace) {
                    throw new Error('No code may exist outside of namespace {}', $stmt->getLine());
                }
            }
            return $stmts;
        } else {
            // For semicolon namespaces we have to move the statements after a namespace declaration into ->stmts
            $resultStmts = array();
            $targetStmts =& $resultStmts;
            foreach ($stmts as $stmt) {
                if ($stmt instanceof Node\Stmt\Namespace_) {
                    $stmt->stmts = array();
                    $targetStmts =& $stmt->stmts;
                    $resultStmts[] = $stmt;
                } elseif ($stmt instanceof Node\Stmt\HaltCompiler) {
                    // __halt_compiler() is not moved into the namespace
                    $resultStmts[] = $stmt;
                } else {
                    $targetStmts[] = $stmt;
                }
            }
            return $resultStmts;
        }
    }

    private function getNamespacingStyle(array $stmts) {
        $style = null;
        $hasNotAllowedStmts = false;
        foreach ($stmts as $stmt) {
            if ($stmt instanceof Node\Stmt\Namespace_) {
                $currentStyle = null === $stmt->stmts ? 'semicolon' : 'brace';
                if (null === $style) {
                    $style = $currentStyle;
                    if ($hasNotAllowedStmts) {
                        throw new Error('Namespace declaration statement has to be the very first statement in the script', $stmt->getLine());
                    }
                } elseif ($style !== $currentStyle) {
                    throw new Error('Cannot mix bracketed namespace declarations with unbracketed namespace declarations', $stmt->getLine());
                }
            } elseif (!$stmt instanceof Node\Stmt\Declare_ && !$stmt instanceof Node\Stmt\HaltCompiler) {
                $hasNotAllowedStmts = true;
            }
        }
        return $style;
    }
}


text:
Akka.NET v1.4.27 support and Autofac 6.3.0.

**Please note that Akka.DI.Autofac and all other Akka.DI. plugins are deprecated** going forward. Please use [Akka.DependencyInjection instead](https://getakka.net/articles/actors/dependency-injection.html) going forward.


text:
module HTTParty
  if defined?(::BasicObject)
    BasicObject = ::BasicObject #:nodoc:
  else
    class BasicObject #:nodoc:
      instance_methods.each { |m| undef_method m unless m =~ /^__|instance_eval/ }
    end
  end
end


text:
#define THREAD_QUANTA 5

/* Possible states of a thread; */
typedef enum  {T_FREE, T_RUNNING, T_RUNNABLE, T_SLEEPING} uthread_state;

#define STACK_SIZE  4096
#define MAX_THREAD  64

typedef struct uthread uthread_t, *uthread_p;

struct uthread {
	int				tid;
	int 	       	esp;        /* current stack pointer */
	int 	       	ebp;        /* current base pointer */
	char		   *stack;	    /* the thread's stack */
	uthread_state   state;     	/* running, runnable, sleeping */
};

int uthread_init(void);
int  uthread_create(void (*func)(void *), void* value);
void uthread_exit(void);
void uthread_yield(void);
int  uthred_self(void);
int  uthred_join(int tid);

// Aliases:
int  uthread_self(void);
int  uthread_join(int tid);

struct sem_queue_node {
    //int tid;
    struct sem_queue_node* next;
};

struct binary_semaphore {
    uint value;
    struct sem_queue_node* first;
    struct sem_queue_node* last;
};

void binary_semaphore_init(struct binary_semaphore* semaphore, int value);

// Calling binary_semaphore_down when the semaphore is already down will block
// until another thread calls binary_semaphore_up
void binary_semaphore_down(struct binary_semaphore* semaphore);

// Calling binary_semaphore_up when the semaphore is already up is an error
void binary_semaphore_up(struct binary_semaphore* semaphore);


text:
{{ define "title" }}Administration Panel: {{ if eq .Section "sourcegroups" }}Source{{ else }}Metric{{ end }} Groups — Facette{{ end }}

{{ define "head" }}

{{ end }}

{{ define "content" }}

Administration Panel — {{ if eq .Section "sourcegroups" }}Source{{ else }}Metric{{ end }} Groups

				{{ if not .ReadOnly }}

{{ end }}

					<input data-listfilter="{{ .Section }}" placeholder="Search for Group" type="text">

Groups List

{{ if not .ReadOnly }}

{{ end }}

Last updated on

							{{ if not .ReadOnly }}

							{{ end }}

				<button data-listmore="{{ .Section }}" disabled="disabled">Load More</button>

{{ end }}


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package app.metatron.discovery.domain.mdm;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.rest.core.config.Projection;

import java.util.Map;

import app.metatron.discovery.common.BaseProjections;
import app.metatron.discovery.common.datasource.LogicalType;
import app.metatron.discovery.domain.datasource.Field;
import app.metatron.discovery.domain.mdm.source.MetadataSource;
import app.metatron.discovery.domain.workbook.configurations.format.FieldFormat;

public class MetadataColumnProjections extends BaseProjections {

  @Projection(types = MetadataColumn.class, name = "default")
  public interface DefaultProjection {

    String getId();

    String getPhysicalType();

    String getPhysicalName();

    String getName();

    String getDescription();

    Long getSeq();
  }

  @Projection(types = MetadataColumn.class, name = "forListView")
  public interface ForListViewProjection {

    String getId();

    String getPhysicalType();

    String getPhysicalName();

    String getName();

    String getDescription();

    @Value("#{@metadataPopularityService.getPopularityColumnValue(target.id)}")
    Double getPopularity();

    LogicalType getType();

    Field.FieldRole getRole();

    ColumnDictionary getDictionary();

    CodeTable getCodeTable();

    @Value("#{target.getFieldFormat()}")
    FieldFormat getFormat();

    @Value("#{target.getAdditionalContextMap()}")
    Object getAdditionalContext();

    Long getSeq();
  }

  @Projection(types = MetadataColumn.class, name = "forDictionaryListView")
  public interface ForDictionaryListViewProjection {

    String getId();

    String getPhysicalType();

    String getPhysicalName();

    String getName();

    String getDescription();

    LogicalType getType();

    @Value("#{target.metadata.id}")
    String getMetadataId();

    @Value("#{target.metadata.name}")
    String getMetadataName();

    @Value("#{target.metadata.sourceType}")
    Metadata.SourceType getMetadataSourceType();

    @Value("#{target.metadata.source}")
    MetadataSource getMetadataSource();

    Long getSeq();
  }

}


text:
/* eslint-enable import/no-unresolved, import/extensions */
import { black, transparent } from './colors';
import { ELEVATION_ZINDEX } from './constants';

const getPlatformElevation = elevation => {
  if (elevation === 0) {
    return {
      shadowColor: transparent,
      zIndex: 0,
    };
  }

  return {
    shadowColor: black,
    shadowOpacity: 0.3,
    shadowRadius: elevation / 2,
    shadowOffset: {
      height: 1,
      width: 0,
    },
    // we need to have zIndex on iOS, otherwise the shadow is under components that
    // are rendered later
    zIndex: ELEVATION_ZINDEX,
  };
};

export default getPlatformElevation;


text:
@interface ViewController ()

@end

@implementation ViewController

- (void) onAuthenticationSuccess : (User *) user
{
    [self.buttonLogin setTitle:user.name forState:UIControlStateNormal];

}
- (void) onAuthenticationFailure : (NSString *) errorMessage
{
    UIAlertView * alert =[[UIAlertView alloc ] initWithTitle:@"OK Dailog"
                                                     message:errorMessage
                                                    delegate:self
                                           cancelButtonTitle:@"Cancel"
                                           otherButtonTitles: nil];
    [alert addButtonWithTitle:@"On Authentication Failure"];
    [alert show];
}
- (void) onTokenAcquiredSuccess : (Token *) token
{

}
- (void) onTokenAcquiredFailure : (NSString *) errorMessage
{

}

- (void)viewDidLoad
{
    [super viewDidLoad];
    AppDelegate *appDelegate  = [[UIApplication sharedApplication] delegate];
    IdPProxy *idpProxy = [appDelegate wso2Proxy];

    [idpProxy initialize : @"nZQREUlViaeVJDb78HF37GWwfYMa"  client_secret: @"BNcJ4hIzG58vCS8RHywCpWe3Wkoa" scope: @"custom" callee: @"eBuy" idp_server:@"http://10.100.0.189:9763"];

    idpProxy.delegate = self ;
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
}

- (IBAction)tap:(id)sender {
    AppDelegate *appDelegate  = [[UIApplication sharedApplication] delegate];
    IdPProxy *idpProxy = [appDelegate wso2Proxy];
    [idpProxy authenticateUser];
}

@end


text:
* add missing file extension for ESM import ([a421bbe](https://github.com/socketio/engine.io-parser/commit/a421bbec7bf43c567c49c608dee604872f6db823))
* **typings:** update the type of RawData ([039b45c](https://github.com/socketio/engine.io-parser/commit/039b45cc65b50acc1f9da42ad605eaccb8ccbcde))

## [5.0.3](https://github.com/socketio/engine.io-parser/compare/5.0.2...5.0.3) (2022-01-17)

## [5.0.2](https://github.com/socketio/engine.io-parser/compare/5.0.1...5.0.2) (2021-11-14)

### Bug Fixes

* add package name in nested package.json ([7e27159](https://github.com/socketio/engine.io-parser/commit/7e271596c3305fb4e4a9fbdcc7fd442e8ff71200))
* fix vite build for CommonJS users ([5f22ed0](https://github.com/socketio/engine.io-parser/commit/5f22ed0527cc80aa0cac415dfd12db2f94f0a855))

## [5.0.1](https://github.com/socketio/engine.io-parser/compare/5.0.0...5.0.1) (2021-10-15)

### Bug Fixes

* fix vite build ([900346e](https://github.com/socketio/engine.io-parser/commit/900346ea34ddc178d80eaabc8ea516d929457855))

# [5.0.0](https://github.com/socketio/engine.io-parser/compare/4.0.3...5.0.0) (2021-10-04)

This release includes the migration to TypeScript. The major bump is due to the new "exports" field in the package.json file.

See also: https://nodejs.org/api/packages.html#packages_package_entry_points

## [4.0.3](https://github.com/socketio/engine.io-parser/compare/4.0.2...4.0.3) (2021-08-29)

### Bug Fixes

* respect the offset and length of TypedArray objects ([6d7dd76](https://github.com/socketio/engine.io-parser/commit/6d7dd76130690afda6c214d5c04305d2bbc4eb4d))

## [4.0.2](https://github.com/socketio/engine.io-parser/compare/4.0.1...4.0.2) (2020-12-07)

### Bug Fixes

* add base64-arraybuffer as prod dependency ([2ccdeb2](https://github.com/socketio/engine.io-parser/commit/2ccdeb277955bed8742a29f2dcbbf57ca95eb12a))

## [2.2.1](https://github.com/socketio/engine.io-parser/compare/2.2.0...2.2.1) (2020-09-30)

## [4.0.1](https://github.com/socketio/engine.io-parser/compare/4.0.0...4.0.1) (2020-09-10)

### Bug Fixes

* use a terser-compatible representation of the separator ([886f9ea](https://github.com/socketio/engine.io-parser/commit/886f9ea7c4e717573152c31320f6fb6c6664061b))

# [4.0.0](https://github.com/socketio/engine.io-parser/compare/v4.0.0-alpha.1...4.0.0) (2020-09-08)

This major release contains the necessary changes for the version 4 of the Engine.IO protocol. More information about the new version can be found [there](https://github.com/socketio/engine.io-protocol#difference-between-v3-and-v4).

Encoding changes between v3 and v4:

- encodePacket with string
  - input: `{ type: "message", data: "hello" }`
  - output in v3: `"4hello"`
  - output in v4: `"4hello"`

- encodePacket with binary
  - input: `{ type: 'message', data: <Buffer 01 02 03> }`
  - output in v3: `<Buffer 04 01 02 03>`
  - output in v4: `<Buffer 01 02 03>`

- encodePayload with strings
  - input: `[ { type: 'message', data: 'hello' }, { type: 'message', data: '€€€' } ]`
  - output in v3: `"6:4hello4:4€€€"`
  - output in v4: `"4hello\x1e4€€€"`

- encodePayload with string and binary
  - input: `[ { type: 'message', data: 'hello' }, { type: 'message', data: <Buffer 01 02 03> } ]`
  - output in v3: `<Buffer 00 06 ff 34 68 65 6c 6c 6f 01 04 ff 04 01 02 03>`
  - output in v4: `"4hello\x1ebAQID"`

Please note that the parser is now dependency-free! This should help reduce the size of the browser bundle.

### Bug Fixes

* keep track of the buffer initial length ([8edf2d1](https://github.com/socketio/engine.io-parser/commit/8edf2d1478026da442f519c2d2521af43ba01832))

### Features

* restore the upgrade mechanism ([6efedfa](https://github.com/socketio/engine.io-parser/commit/6efedfa0f3048506a4ba99e70674ddf4c0732e0c))

# [4.0.0-alpha.1](https://github.com/socketio/engine.io-parser/compare/v4.0.0-alpha.0...v4.0.0-alpha.1) (2020-05-19)

### Features

* implement the version 4 of the protocol ([cab7db0](https://github.com/socketio/engine.io-parser/commit/cab7db0404e0a69f86a05ececd62c8c31f4d97d5))

# [4.0.0-alpha.0](https://github.com/socketio/engine.io-parser/compare/2.2.0...v4.0.0-alpha.0) (2020-02-04)

### Bug Fixes

* properly decode binary packets ([5085373](https://github.com/socketio/engine.io-parser/commit/50853738e0c6c16f9cee0d7887651155f4b78240))

### Features

* remove packet type when encoding binary packets ([a947ae5](https://github.com/socketio/engine.io-parser/commit/a947ae59a2844e4041db58ff36b270d1528b3bee))

### BREAKING CHANGES

* the packet containing binary data will now be sent without any transformation

Protocol v3: { type: 'message', data: <Buffer 01 02 03> } => <Buffer 04 01 02 03>
Protocol v4: { type: 'message', data: <Buffer 01 02 03> } => <Buffer 01 02 03>

# [2.2.0](https://github.com/socketio/engine.io-parser/compare/2.1.3...2.2.0) (2019-09-13)

* [refactor] Use `Buffer.allocUnsafe` instead of `new Buffer` (#104) ([aedf8eb](https://github.com/socketio/engine.io-parser/commit/aedf8eb29e8bf6aeb5c6cc68965d986c4c958ae2)), closes [#104](https://github.com/socketio/engine.io-parser/issues/104)

### BREAKING CHANGES

* drop support for Node.js 4 (since Buffer.allocUnsafe was added in v5.10.0)

Reference: https://nodejs.org/docs/latest/api/buffer.html#buffer_class_method_buffer_allocunsafe_size


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.lachesis.support.auth.repository.UserRepository">

	<resultMap id="userMap" type="com.lachesis.support.objects.entity.auth.User">
		<id property="id" column="ID" />
		<result property="code" column="CODE" />
		<result property="username" column="USERNAME" />
		<result property="password" column="PASSWORD" />
		<result property="name" column="NAME" />
		<result property="gender" column="GENDER" />
		<result property="mobilePhone" column="MOBILE_PHONE" />
		<result property="telephone" column="TELEPHONE" />
		<result property="email" column="EMAIL" />
		<result property="active" column="ACTIVE" />
		<result property="locked" column="LOCKED" />
		<result property="deleted" column="DELETED" />
		<result property="createAt" column="CREATE_AT" />
		<result property="updateAt" column="UPDATE_AT" />
		<result property="createBy" column="CREATE_BY" />
		<result property="updateBy" column="UPDATE_BY" />
		<result property="dataSource" column="DATA_SOURCE" />
	</resultMap>

	<select id="findOne" resultMap="userMap">
		select * from T_USER
		where
		ID = #{id}
	</select>

	<select id="findOneByUsername" resultMap="userMap">
		select * from T_USER
		where
		USERNAME = #{username}
		and
		DELETED = 0
	</select>

	<insert id="insertOne" useGeneratedKeys="true" keyProperty="id">
		insert into T_USER
		(
		ID,
		CODE,
		USERNAME,
		PASSWORD,
		NAME,
		GENDER,
		MOBILE_PHONE,
		TELEPHONE,
		EMAIL,
		ACTIVE,
		LOCKED,
		DELETED,
		CREATE_AT,
		UPDATE_AT,
		CREATE_BY,
		UPDATE_BY,
		DATA_SOURCE
		)
		values
		(
		#{id},
		#{code},
		#{username},
		#{password},
		#{name},
		#{gender},
		#{mobilePhone},
		#{telephone},
		#{email},
		#{active},
		#{locked},
		#{deleted},
		#{createAt},
		#{updateAt},
		#{createBy},
		#{updateBy},
		#{dataSource}
		)
	</insert>

	<update id="updateOne">
		update T_USER
		<set>
			<if test="code != null and code != '' ">
				CODE = #{code},
			</if>
			<if test="username != null and username != ''">
				USERNAME = #{username},
			</if>
			<if test="password != null and password != '' ">
				PASSWORD = #{password},
			</if>
			<if test="name != null and name != '' ">
				NAME = #{name},
			</if>
			<if test="gender != null and gender != '' ">
				GENDER = #{gender},
			</if>
			<if test="mobilePhone != null and mobilePhone != '' ">
				MOBILE_PHONE = #{mobilePhone},
			</if>
			<if test="telephone != null and telephone != '' ">
				TELEPHONE = #{telephone},
			</if>
			<if test="email != null and email != '' ">
				EMAIL = #{email},
			</if>
			<if test="active != null">
				ACTIVE = #{active},
			</if>
			<if test="locked != null">
				LOCAKED = #{locked},
			</if>
			<if test="deleted != null">
				DELETED = #{deleted},
			</if>
			<if test="createAt != null">
				CREATE_AT = #{createAt},
			</if>
			<if test="updateAt != null">
				UPDATE_AT = #{updateAt},
			</if>
			<if test="createBy != null">
				CREATE_BY = #{createBy},
			</if>
			<if test="updateBy != null">
				UPDATE_BY = #{updateBy},
			</if>
			<if test="dataSource != null and dataSource != '' ">
				DATA_SOURCE = #{dataSource}
			</if>
		</set>
		where ID = #{id}
	</update>

	<insert id="addRole">
		insert into R_USER_ROLE
		(
		ID,
		USER_ID,
		ROLE_ID,
		DELETED,
		CREATE_AT,
		CREATE_BY,
		UPDATE_AT,
		UPDATE_BY,
		DATA_SOURCE
		)
		values
		(
		#{id},
		#{userId},
		#{roleId},
		#{deleted},
		#{createAt},
		#{createBy},
		#{updateAt},
		#{updateBy},
		#{dataSource}
		)
	</insert>

	<insert id="addRoles">
		insert into R_USER_ROLE
		(
		ID,
		USER_ID,
		ROLE_ID,
		DELETED,
		CREATE_AT,
		CREATE_BY,
		UPDATE_AT,
		UPDATE_BY,
		DATA_SOURCE
		)
		values
		<foreach item="item" collection="list" separator=",">
			(
			#{item.id},
			#{item.userId},
			#{item.roleId},
			#{item.deleted},
			#{item.createAt},
			#{item.createBy},
			#{item.updateAt},
			#{item.updateBy},
			#{item.dataSource}
			)
		</foreach>
	</insert>

	<delete id="deleteRole">
		delete from R_USER_ROLE
		where
		USER_ID = #{userId}
		and
		ROLE_ID = #{role.id}
	</delete>

	<delete id="deleteRoles">
		delete from R_USER_ROLE
		where
		USER_ID = #{userId}
		and
		ROLE_ID in
		<foreach collection="roles" item="item" index="index" open="("
			separator="," close=")">
			#{item.id}
		</foreach>
	</delete>

	<delete id="deleteAllRoles">
		delete from R_USER_ROLE
		where
		USER_ID = #{userId}
	</delete>

</mapper>


text:
const detox = require('detox');
const config = require('../../package.json').detox;
const adapter = require('detox/runners/jest/adapter');
const specReporter = require('detox/runners/jest/specReporter');

// Set the default timeout
jest.setTimeout(120000);
jasmine.getEnv().addReporter(adapter);

// This takes care of generating status logs on a per-spec basis. By default, jest only reports at file-level.
// This is strictly optional.
jasmine.getEnv().addReporter(specReporter);

beforeAll(async () => {
  await detox.init(config);
});

beforeEach(async () => {
  await adapter.beforeEach();
});

afterAll(async () => {
  await adapter.afterAll();
  await detox.cleanup();
});


text:
import { OperatingSystem } from 'vs/base/common/platform';
import { ResolvedKeybinding, SimpleKeybinding, Keybinding, KeyCode, ChordKeybinding } from 'vs/base/common/keyCodes';
import { IKeyboardMapper } from 'vs/workbench/services/keybinding/common/keyboardMapper';
import { IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding';
import { USLayoutResolvedKeybinding } from 'vs/platform/keybinding/common/usLayoutResolvedKeybinding';
import { ScanCodeBinding, ScanCode, IMMUTABLE_CODE_TO_KEY_CODE } from 'vs/base/common/scanCode';

/**
 * A keyboard mapper to be used when reading the keymap from the OS fails.
 */
export class MacLinuxFallbackKeyboardMapper implements IKeyboardMapper {

	/**
	 * OS (can be Linux or Macintosh)
	 */
	private readonly _OS: OperatingSystem;

	constructor(OS: OperatingSystem) {
		this._OS = OS;
	}

	public dumpDebugInfo(): string {
		return 'FallbackKeyboardMapper dispatching on keyCode';
	}

	public resolveKeybinding(keybinding: Keybinding): ResolvedKeybinding[] {
		return [new USLayoutResolvedKeybinding(keybinding, this._OS)];
	}

	public resolveKeyboardEvent(keyboardEvent: IKeyboardEvent): ResolvedKeybinding {
		let keybinding = new SimpleKeybinding(
			keyboardEvent.ctrlKey,
			keyboardEvent.shiftKey,
			keyboardEvent.altKey,
			keyboardEvent.metaKey,
			keyboardEvent.keyCode
		);
		return new USLayoutResolvedKeybinding(keybinding, this._OS);
	}

	private _scanCodeToKeyCode(scanCode: ScanCode): KeyCode {
		const immutableKeyCode = IMMUTABLE_CODE_TO_KEY_CODE[scanCode];
		if (immutableKeyCode !== -1) {
			return immutableKeyCode;
		}

		switch (scanCode) {
			case ScanCode.KeyA: return KeyCode.KEY_A;
			case ScanCode.KeyB: return KeyCode.KEY_B;
			case ScanCode.KeyC: return KeyCode.KEY_C;
			case ScanCode.KeyD: return KeyCode.KEY_D;
			case ScanCode.KeyE: return KeyCode.KEY_E;
			case ScanCode.KeyF: return KeyCode.KEY_F;
			case ScanCode.KeyG: return KeyCode.KEY_G;
			case ScanCode.KeyH: return KeyCode.KEY_H;
			case ScanCode.KeyI: return KeyCode.KEY_I;
			case ScanCode.KeyJ: return KeyCode.KEY_J;
			case ScanCode.KeyK: return KeyCode.KEY_K;
			case ScanCode.KeyL: return KeyCode.KEY_L;
			case ScanCode.KeyM: return KeyCode.KEY_M;
			case ScanCode.KeyN: return KeyCode.KEY_N;
			case ScanCode.KeyO: return KeyCode.KEY_O;
			case ScanCode.KeyP: return KeyCode.KEY_P;
			case ScanCode.KeyQ: return KeyCode.KEY_Q;
			case ScanCode.KeyR: return KeyCode.KEY_R;
			case ScanCode.KeyS: return KeyCode.KEY_S;
			case ScanCode.KeyT: return KeyCode.KEY_T;
			case ScanCode.KeyU: return KeyCode.KEY_U;
			case ScanCode.KeyV: return KeyCode.KEY_V;
			case ScanCode.KeyW: return KeyCode.KEY_W;
			case ScanCode.KeyX: return KeyCode.KEY_X;
			case ScanCode.KeyY: return KeyCode.KEY_Y;
			case ScanCode.KeyZ: return KeyCode.KEY_Z;
			case ScanCode.Digit1: return KeyCode.KEY_1;
			case ScanCode.Digit2: return KeyCode.KEY_2;
			case ScanCode.Digit3: return KeyCode.KEY_3;
			case ScanCode.Digit4: return KeyCode.KEY_4;
			case ScanCode.Digit5: return KeyCode.KEY_5;
			case ScanCode.Digit6: return KeyCode.KEY_6;
			case ScanCode.Digit7: return KeyCode.KEY_7;
			case ScanCode.Digit8: return KeyCode.KEY_8;
			case ScanCode.Digit9: return KeyCode.KEY_9;
			case ScanCode.Digit0: return KeyCode.KEY_0;
			case ScanCode.Minus: return KeyCode.US_MINUS;
			case ScanCode.Equal: return KeyCode.US_EQUAL;
			case ScanCode.BracketLeft: return KeyCode.US_OPEN_SQUARE_BRACKET;
			case ScanCode.BracketRight: return KeyCode.US_CLOSE_SQUARE_BRACKET;
			case ScanCode.Backslash: return KeyCode.US_BACKSLASH;
			case ScanCode.IntlHash: return KeyCode.Unknown; // missing
			case ScanCode.Semicolon: return KeyCode.US_SEMICOLON;
			case ScanCode.Quote: return KeyCode.US_QUOTE;
			case ScanCode.Backquote: return KeyCode.US_BACKTICK;
			case ScanCode.Comma: return KeyCode.US_COMMA;
			case ScanCode.Period: return KeyCode.US_DOT;
			case ScanCode.Slash: return KeyCode.US_SLASH;
			case ScanCode.IntlBackslash: return KeyCode.OEM_102;
		}
		return KeyCode.Unknown;
	}

	private _resolveSimpleUserBinding(binding: SimpleKeybinding | ScanCodeBinding): SimpleKeybinding {
		if (!binding) {
			return null;
		}
		if (binding instanceof SimpleKeybinding) {
			return binding;
		}
		const keyCode = this._scanCodeToKeyCode(binding.scanCode);
		if (keyCode === KeyCode.Unknown) {
			return null;
		}
		return new SimpleKeybinding(binding.ctrlKey, binding.shiftKey, binding.altKey, binding.metaKey, keyCode);
	}

	public resolveUserBinding(firstPart: SimpleKeybinding | ScanCodeBinding, chordPart: SimpleKeybinding | ScanCodeBinding): ResolvedKeybinding[] {
		const _firstPart = this._resolveSimpleUserBinding(firstPart);
		const _chordPart = this._resolveSimpleUserBinding(chordPart);
		if (_firstPart && _chordPart) {
			return [new USLayoutResolvedKeybinding(new ChordKeybinding(_firstPart, _chordPart), this._OS)];
		}
		if (_firstPart) {
			return [new USLayoutResolvedKeybinding(_firstPart, this._OS)];
		}
		return [];
	}
}


text:
package moe.kafji.composer.example;

import org.junit.Before;
import org.junit.Test;

import java.util.Arrays;

import static org.mockito.Mockito.*;

public class ComposerTest {

  private Tracker firstTracker;
  private Tracker secondTracker;

  @Before
  public void setUp() throws Exception {
    firstTracker = mock(Tracker.class);
    secondTracker = mock(Tracker.class);
  }

  @Test
  public void track() throws Exception {
    Tracker composer = new TrackerComposer(Arrays.asList(firstTracker, secondTracker)) {
      @Override
      public void trackAppError(Exception error) {
      }
    };

    final long timestamp = System.currentTimeMillis();

    composer.trackAppStart(timestamp);

    verify(firstTracker).trackAppStart(timestamp);
    verify(secondTracker).trackAppStart(timestamp);
  }

  @Test
  public void mutability() throws Exception {
    MutableTrackerComposer composer = new MutableTrackerComposer(Arrays.asList(firstTracker, secondTracker)) {
    };

    Tracker trackerThree = mock(Tracker.class);
    composer.add(trackerThree);

    composer.remove(firstTracker);

    final long timestamp = System.currentTimeMillis();

    composer.trackAppStart(timestamp);

    verify(firstTracker, never()).trackAppStart(timestamp);
    verify(secondTracker).trackAppStart(timestamp);
    verify(trackerThree).trackAppStart(timestamp);
  }
}


text:
package com.microsoft.windowsazure.services.servicebus.models;

/**
 * Represents the result of a receiveSubscriptionMessage operation.
 */
public class ReceiveSubscriptionMessageResult {

    private BrokeredMessage value;

    /**
     * Creates an instance of the ReceiveSubscriptionMessageResult
     * class.
     *
     * @param value
     *            A {@link BrokeredMessage} object assigned as the value of the
     *            result.
     */
    public ReceiveSubscriptionMessageResult(BrokeredMessage value) {
        this.setValue(value);
    }

    /**
     * Specifies the value of the result.
     *
     * @param value
     *            A {@link BrokeredMessage} object assigned as the value of the
     *            result.
     */
    public void setValue(BrokeredMessage value) {
        this.value = value;
    }

    /**
     * Returns the value of the result.
     *
     * @return A {@link BrokeredMessage} object that represents the value of the
     *         result.
     */
    public BrokeredMessage getValue() {
        return value;
    }

}


text:
package org.apache.kafka.clients.producer.internals;

import org.apache.kafka.common.TopicPartition;
import org.apache.kafka.common.record.CompressionType;
import org.apache.kafka.common.record.MemoryRecords;
import org.apache.kafka.common.record.MemoryRecordsBuilder;
import org.apache.kafka.common.record.TimestampType;
import org.junit.Test;

import java.nio.ByteBuffer;

import static org.junit.Assert.assertFalse;

public class ProducerBatchTest {

    private final long now = 1488748346917L;

    private final MemoryRecordsBuilder memoryRecordsBuilder = MemoryRecords.builder(ByteBuffer.allocate(128),
            CompressionType.NONE, TimestampType.CREATE_TIME, 128);

    /**
     * A {@link ProducerBatch} configured using a very large linger value and a timestamp preceding its create
     * time is interpreted correctly as not expired when the linger time is larger than the difference
     * between now and create time by {@link ProducerBatch#maybeExpire(int, long, long, long, boolean)}.
     */
    @Test
    public void testLargeLingerOldNowExpire() {
        ProducerBatch batch = new ProducerBatch(new TopicPartition("topic", 1), memoryRecordsBuilder, now);
        // Set `now` to 2ms before the create time.
        assertFalse(batch.maybeExpire(10240, 100L, now - 2L, Long.MAX_VALUE, false));
    }

    /**
     * A {@link ProducerBatch} configured using a very large retryBackoff value with retry = true and a timestamp
     * preceding its create time is interpreted correctly as not expired when the retryBackoff time is larger than the
     * difference between now and create time by {@link ProducerBatch#maybeExpire(int, long, long, long, boolean)}.
     */
    @Test
    public void testLargeRetryBackoffOldNowExpire() {
        ProducerBatch batch = new ProducerBatch(new TopicPartition("topic", 1), memoryRecordsBuilder, now);
        // Set batch.retry = true
        batch.reenqueued(now);
        // Set `now` to 2ms before the create time.
        assertFalse(batch.maybeExpire(10240, Long.MAX_VALUE, now - 2L, 10240L, false));
    }

    /**
     * A {@link ProducerBatch#maybeExpire(int, long, long, long, boolean)} call with a now value before the create
     * time of the ProducerBatch is correctly recognized as not expired when invoked with parameter isFull = true.
     */
    @Test
    public void testLargeFullOldNowExpire() {
        ProducerBatch batch = new ProducerBatch(new TopicPartition("topic", 1), memoryRecordsBuilder, now);
        // Set `now` to 2ms before the create time.
        assertFalse(batch.maybeExpire(10240, 10240L, now - 2L, 10240L, true));
    }
}


text:
title: Header
page_title: Header - WinForms Calendar Control
description: The header in WinForms Calendar contains the calendar title and the navigation buttons.
slug: winforms/calendar/customizing-appearance/header
tags: header
published: True
position: 0
previous_url: calendar-customizing-appearance-header, /calendar/customizing-appearance/header
---

# Header

The Header area of __RadCalendar__ is located above the calendar's content area. The header contains the calendar title and the navigation buttons.

>caption Figure 1: The structure of RadCalendar header.
![calendar-customizing-appearance-header 001](images/calendar-customizing-appearance-header001.png)

Use the the following properties to modify title appearance and functionality:

*  __TitleFormat:__ Gets or sets the format string that is applied to the calendar title.

*  __TitleAlign:__ Gets or sets the horizontal alignment of calendar's title.

*  __ShowHeader:__ Gets or sets whether the calendar will display the title.

*  __ShowNavigationButtons:__ Gets or sets whether the navigation buttons should be visible.

*  __ShowFastNavigationButtons:__ Gets or sets whether the fast navigation buttons should be visible.

*  __FastNavigationNextImage:__ Gets or sets the image that is displayed for the fast next navigation control.

*  __FastNavigationNextText:__ Gets or sets the text that is displayed for the fast next navigation control.

* __FastNavigationNextToolTip:__ Gets or sets the tool tip that is displayed for the fast next navigation control.

* __FastNavigationPrevImage:__ Gets or sets the image that is displayed for the fast previous navigation control.

* __FastNavigationPrevText:__ Gets or sets the text that is displayed for the fast previous navigation control.

* __FastNavigationPrevToolTip:__ Gets or sets the tool tip that is displayed for the fast previous navigation control.

* __NavigationNextImage:__ Gets or sets the image that is displayed for the navigation next  control.

* __NavigationNextText:__ Gets or sets the text that is displayed for the navigation  next  control.

* __NavigationNextToolTip:__ Gets or sets the tool tip that is displayed for the navigation next  control.

* __NavigationPrevImage:__ Gets or sets the image that is displayed for the navigation previous control.

* __NavigationPrevText:__ Gets or sets the text that is displayed for the navigation previous rev control.

* __NavigationPrevToolTip:__ Gets or sets the tool tip that is displayed for the navigation previous control.

* __FastNavigationStep:__ Gets or sets the number of views that will be scrolled when the user clicks on a fast navigation link.

## Title Properties

You can customize the __RadCalendar Title__ to define how and what information should be shown:

* Control title alignment using the __TitleAlign__ property.

* Control title format using the __TitleFormat__ property. For details about available format characters see the [Date Format Pattern]({%slug winforms/calendar/localization/date-format-pattern%}) topic.

* The separator string that is placed between the start and end dates in a MultiView title is controlled by the __DateRangeSeparator__ property.

* To allow navigation in the calendar, set the __EnableNavigation__ property to true. Customize the fast navigation buttons using the following properties:

    - FastNavigationNextImage

    - FastNavigationNextText

    - FastNavigationNextToolTip

    - FastNavigationPrevImage

    - FastNavigationPrevText

    - FastNavigationPrevToolTip

## See Also

* [Column and Row Headers]({%slug winforms/calendar/customizing-behavior/column-and-row-headers%})
* [Footer]({%slug winforms/calendar/customizing-appearance/footer%})
* [Keyboard Navigation]({%slug  winforms/calendar/customizing-behavior/keyboard-navigation%})
* [MultiView]({%slug winforms/calendar/customizing-behavior/multiview-mode%})
* [Navigation]({%slug winforms/calendar/customizing-behavior/customizing-navigation%})
* [Repeating Events]({%slug winforms/calendar/customizing-behavior/repeating-events%})
* [Selecting Dates]({%slug winforms/calendar/customizing-behavior/selecting-dates%})
* [Zoom]({%slug winforms/calendar/customizing-appearance/zooming%})


text:
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.                             */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.                                                               */
/*----------------------------------------------------------------------------*/
package edu.wpi.first.wpilibj.templates;

//import edu.wpi.first.wpilibj.IterativeRobot;
//import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.buttons.JoystickButton;
//import edu.wpi.first.wpilibj.RobotDrive;
//import edu.wpi.first.wpilibj.Solenoid;
//import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.Timer;
//import edu.wpi.first.wpilibj.Watchdog;
import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.Victor;
//import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.CANJaguar;
//import edu.wpi.first.wpilibj.Relay;
//import edu.wpi.first.wpilibj.Encoder;
//import edu.wpi.first.wpilibj.PIDController;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.can.CANTimeoutException;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj.Preferences;
import edu.wpi.first.wpilibj.AnalogPotentiometer;

/**
 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the IterativeRobot
 * documentation. If you change the name of this class or the package after
 * creating this project, you must also update the manifest file in the resource
 * directory.
 */
public class RobotTemplate extends IterativeRobot
{

    /**
     * This function is run when the robot is first started up and should be
     * used for any initialization code.
     */

    /*
     * setting up variables for changing values of PID constants & max speed in smart dashboard
     */
    Preferences prefs = Preferences.getInstance();

    double P;
    double I;
    double D;
    double MAX_RPM;
    double StartPosition;

    double[] motorSpeed = new double[4]; //holds motor speeds (in rpm)

    int m_dsPacketsIntakedInCurrentSecond;	// keep track of the ds packets received in the current second

    // Declare variables for the driver joysticks
    Joystick JoyLeft = new Joystick(1);			// joystick 1 (arcade stick or right tank stick)
    Joystick JoyRight = new Joystick(2);                   //joystick 2 (arcade stick or left tank stick)
    JoystickButton DriverIntake = new JoystickButton(JoyRight, 2);   //starts arms intake, joystick 1, button 3
    JoystickButton DriverEject = new JoystickButton(JoyLeft, 2);     //starts arms reject, joystick 2, button 3
    JoystickButton CrabOn = new JoystickButton(JoyLeft, 8); //turn crabbing on [using mecanums]
    JoystickButton CrabOff = new JoystickButton(JoyLeft, 9); //turn crabbing off [using traction]

    boolean CrabState = true;   //determines if crabbing is on or off
    int autonState = 0;
    double autonIngestTime;
    Timer autonTimer = new Timer();
    double driveTime;
    // Declare variables for the operator joystick
    Joystick JoyOp = new Joystick(3);
    JoystickButton OpIntake = new JoystickButton(JoyOp, 3);   //Press-and-hold for roller intake
    JoystickButton OpEject = new JoystickButton(JoyOp, 2);     //Press-and-hold for roller eject
    JoystickButton OpAutoIntake = new JoystickButton(JoyOp, 1);   //starts automatic ball intake
    JoystickButton OpDeploy = new JoystickButton(JoyOp, 8);
    JoystickButton OpReloadPrefs = new JoystickButton(JoyOp, 12);   //use this button when changing values in SmartDashboard

    CANJaguar motor1;       //ctrls the drive motors
    CANJaguar motor2;
    CANJaguar motor3;
    CANJaguar motor4;
    DigitalInput cageLimitSwitch;
    DigitalInput ballLimitSwitch;
    AnalogPotentiometer winchlength;
    DigitalInput autonSwitch;
    Victor Winch = new Victor(5);        //ctrls the cage and intake roller motion
    Victor Ingest = new Victor(6);
    int CANTimeouts;
    int m_autoPeriodicLoops;
    int m_disabledPeriodicLoops;
    int m_telePeriodicLoops;

    int ingestState = 0; //check what ingest is doing
    int cageState = 0; //check what cage is doing
    int cageCommand = 0; //tell cage want it needs to do

    final double PI = 3.141592654;
    final double Maxwinch = 3.0;

    public RobotTemplate()
    {
    }

    public void CANTimeout()
    {
        CANTimeouts++;
        SmartDashboard.putNumber("CANTimeouts", CANTimeouts);
    }

    /*
     * keeps track of the ingest states & transitions between them
     *
     */
    public void controlIngest()
    {

        switch (ingestState)
        {

            case 0: //no ingest in progress
                //check button & advance to state 1 if pressed
                Ingest.set(0);  //rollers are stopped
                if (OpAutoIntake.get())
                {
                    ingestState = 1;
                }
                break;
            case 1:
                cageCommand = 1;// extend cage
                Ingest.set(1); //makes rollers pick up ball
                if (cageState == 1)
                {
                    ingestState = 2;
                }
                break;
            case 2:
                Ingest.set(1); //ingest
                boolean bl = !ballLimitSwitch.get();
                if (bl)
                {
                    ingestState = 3;
                }
                break;
            case 3:
                cageCommand = -1; //retract cage
                Ingest.set(0);
                if (cageState == -1)
                {
                    ingestState = 4;
                    autonTimer.reset();
                    autonTimer.start();
                }
                break;
            case 4:
                Ingest.set(1);
                if(autonTimer.get() > 0.75)
                {
                    Ingest.set(0);
                    autonTimer.stop();
                }
                break;
            default:
                System.out.println("Invalid Ingest State" + ingestState);
                ingestState = 0;
        }
    }

    /*
     * sets the ranges for controlling how fast to run the winch motor
     */
    public void setWinch(double speed)
    {
        double len = winchlength.get(); //need to display winchlength to find l
        if ((len < 1.0) || (len > 4.0))
        {
            speed = 0.0;
        } else
        {
            if ((len < 1.2) && (speed > 0.0))
            { //pot values: greater = in, smaller = out
                speed = 0.0;
            } else
            {
                if ((len > 3.9) && (speed < 0.0))
                {
                    speed = 0.0;
                }
            }
        }
        Winch.set(speed); //positive values = out
    }

    /*
     * changes the states of the cage based on the position of the winch
     */
    public void controlCage()
    {

        double len = winchlength.get(); //need to display winchlength to find l

        if (len > 3.6 || !(cageLimitSwitch.get()))
        {   //get numbers of these later
            cageState = -1;
        } else
        {
            if (len < 1.7)
            {
                cageState = 1;
            } else
            {
                cageState = 0;
            }
        }

        switch (cageCommand)
        {
            case 1: //we want it to go out
                if (len > 2.6)
                {
                    setWinch(0.2); // maximum unwind power
                } else
                {
                    if (len > 1.6)
                    {
                        setWinch((len - 1.6) / 5); // soft landing
                    } else
                    {
                        setWinch(0.0);
                    }
                }
                break;
            case -1: //want it to go in
                if (cageState == -1)
                { //if the cage is already all the way in
                    setWinch(len - 3.8);//so it overcomes the elastic
                } else
                {
                    setWinch(-0.35);//else if it is not all the way in set the speed
                }
                break;
            case -2:
                if (!cageLimitSwitch.get())
                {
                    cageCommand = -1;
                } else
                {
                    setWinch(-0.35);
                }
                break;
            default:
                System.out.println("Invalid case value" + cageCommand);
                cageCommand = -1;
        }

    }

    public void robotInit()
    {

        SmartDashboard.putNumber("CAN timeouts", CANTimeouts);
        boolean CANInit = false;
        CANTimeouts = 0;
        while (CANInit == false)
        {
            try
            {
//                m_telePeriodicLoops = 0;				// Reset the number of loops in current second
//                m_dsPacketsReceivedInCurrentSecond = 0;                 // Reset the number of dsPackets in current second

                motor1 = new CANJaguar(2, CANJaguar.ControlMode.kSpeed); //determines that the Jaguar controls for speed
                motor2 = new CANJaguar(4, CANJaguar.ControlMode.kSpeed);
                motor4 = new CANJaguar(8, CANJaguar.ControlMode.kSpeed);
                motor3 = new CANJaguar(6, CANJaguar.ControlMode.kSpeed);
                cageLimitSwitch = new DigitalInput(1);
                ballLimitSwitch = new DigitalInput(2);
                autonSwitch = new DigitalInput(3);
                winchlength = new AnalogPotentiometer(2);
                motor1.setPositionReference(CANJaguar.PositionReference.kQuadEncoder);    //chooses which kind of encoder to determine speed feedback
                motor1.setSpeedReference(CANJaguar.SpeedReference.kQuadEncoder);    //chooses which kind of encoder to determine speed feedback
                motor2.setSpeedReference(CANJaguar.SpeedReference.kQuadEncoder);
                motor3.setSpeedReference(CANJaguar.SpeedReference.kQuadEncoder);
                motor4.setSpeedReference(CANJaguar.SpeedReference.kQuadEncoder);
                motor1.configMaxOutputVoltage(15);
                motor2.configMaxOutputVoltage(15);
                motor3.configMaxOutputVoltage(15);
                motor4.configMaxOutputVoltage(15);
                motor1.configEncoderCodesPerRev(256);   //counts pulses per revolution
                motor2.configEncoderCodesPerRev(256);
                motor3.configEncoderCodesPerRev(256);
                motor4.configEncoderCodesPerRev(256);
                StartPosition = motor1.getPosition();

                updatePrefs();

                motor1.setX(0);
                motor2.setX(0);
                motor3.setX(0);
                motor4.setX(0);

                motor1.enableControl(); //starts feedback ctrl
                motor2.enableControl();
                motor3.enableControl();
                motor4.enableControl();
                CANInit = true;
            } catch (CANTimeoutException ex)
            {
                CANTimeout();
            }
        }
        System.out.println("### PTERODACTYL HAS ARRIVED ###");

    }

    /**
     * This function is called once before autonomous control
     */
    public void disabledInit()
    {
        System.out.println("### DISABLED ###");
    }

    /**
     * This function is called periodically during autonomous
     */
    public void disabledPeriodic()
    {
    }

    /**
     * This function is called once before autonomous control
     */
    public void autonomousInit()
    {
        System.out.println("### AUTONOMOUS MODE ENABLED ###");
        cageCommand = -2;
        autonState = 4;
        autonIngestTime = autonTimer.getUsClock();
        if (autonSwitch.get())
        {
            autonState = 4;
        } else
        {
            autonState = 0;
        }
    }

    /**
     * This function is called periodically during autonomous
     * This function picks up the ball and moves about 15 feet.
     */
    public void autonomousPeriodic()
    {
        controlCage();
        switch (autonState)
        {
            case 0:
                try
                {
                    motor1.setX(0);
                    motor2.setX(0);
                    motor3.setX(0);
                    motor4.setX(0);
                    Ingest.set(0);
                } catch (CANTimeoutException ex)
                {
                    CANTimeout();
                }
                break;
            case 1: // Start cage deployment
                cageCommand = -2;
                controlIngest();
                autonState = 2;
                break;
            case 2: // Wait for cage to finish deploying
                controlIngest();
                if (cageCommand == 0)
                {
                    ingestState = 1;
                }
                autonState = 4;
                break;
            case 3: // Cage is deployed, ball capture has started
                if (!ballLimitSwitch.get())
                {
                    autonIngestTime = autonTimer.getUsClock();
                    autonState = 4;
                }
                break;

            case 4:
                try {
                    StartPosition = motor1.getPosition();
                    autonState = 5;
                } catch (CANTimeoutException ex)
                {
                    CANTimeout();
                }
                break;

            case 5:
                driveTime = autonTimer.getUsClock() - autonIngestTime;
                double Distance = 0.0;
                try
                {
                    motor1.setX(MAX_RPM * 0.5);
                    motor2.setX(-MAX_RPM * 0.5);
                    motor3.setX(-MAX_RPM * 0.5);
                    motor4.setX(MAX_RPM * 0.5);
                    Distance = Math.abs(motor1.getPosition()-StartPosition);
                } catch (CANTimeoutException ex)
                {
                    CANTimeout();
                }
                //if (driveTime > 2600000)
                if (Distance > 10.0)
                {   //change this
                    autonState = 6;
                }
                break;

            case 6:
                System.out.println("we have reached case 5 where release should be made");
                    try
                    {
                        motor1.setX(MAX_RPM * 0);
                        motor2.setX(-MAX_RPM * 0);
                        motor3.setX(-MAX_RPM * 0);
                        motor4.setX(MAX_RPM * 0);
                    } catch (CANTimeoutException ex)
                        {
                            CANTimeout();
                        }

                autonState = 7;
                break;

            case 7:
            {
                //autonTimer.reset();
                //autonTimer.start();
                try
                {
                    if (Math.abs(motor2.getSpeed()) < 10)
                    {
                        //autonTimer.stop();
                        autonState = 8;
                    }
                }
                catch (CANTimeoutException ex)
                {
                    CANTimeout();
                }

                break;
            }

            case 8:
                Ingest.set(-1.0);   //rollers release the ball for the remaining time of autonomous
                break;

        }
    }

    /*
    This function runs in autonomous mode. The robot moves about 10 feet and scores into the goal
    */

    public void autonomousScore()
    {
                autonTimer.reset();
                autonTimer.start();

                try
                {
                    motor1.setX(MAX_RPM * 0.5);
                    motor2.setX(-MAX_RPM * 0.5);    //The robot starts moving
                    motor3.setX(-MAX_RPM * 0.5);
                    motor4.setX(MAX_RPM * 0.5);
                }catch (CANTimeoutException ex)
                {
                    CANTimeout();
                }

                if(autonTimer.get() > 1.75)   // after 1.75 seconds the robot turns off the motors
                {
                    try
                    {
                        motor1.setX(MAX_RPM * 0);
                        motor2.setX(-MAX_RPM * 0);
                        motor3.setX(-MAX_RPM * 0);
                        motor4.setX(MAX_RPM * 0);
                    } catch (CANTimeoutException ex)
                        {
                            CANTimeout();
                        }
                    autonTimer.stop();
                }

                Ingest.set(-1.0);   //rollers release the ball for the remaining time of autonomous
    }

    /**
     * This function is called once before autonomous control
     */
    public void testInit()
    {
        System.out.println("### TEST MODE ENABLED ###");
        cageCommand = -2;
    }

    /**
     * This function is called periodically during test mode
     */
    public void testPeriodic()
    {
    }

    /**
     * This function is called once before operator control
     */
    public void teleopInit()
    {
        System.out.println("### TELEOP MODE ENABLED ###");
        try
        {
            motor1.enableControl(); //starts feedback ctrl
            motor2.enableControl();
            motor3.enableControl();
            motor4.enableControl();
        } catch (CANTimeoutException ex)
        {
            CANTimeout();
        }
        cageCommand = -2;
    }

    // returns speed in ft/s
    public double RobotSpeed(double[] s)
    { //get average of all motors and convert to ft/s
        double sHighest = 0;
        for (int x = 0; x < 4; x++)
        {
            sHighest += s[x];
        }
        sHighest /= 4;

        double speed = (sHighest * PI) / (120);
        return speed;
    }

    /*
     * smartdashboard ctrls
     */
    public void updatePrefs()
    {
        MAX_RPM = prefs.getDouble("M", 0.0);
        P = prefs.getDouble("P", 0.0);   //can change values from here, press button to activate changes
        I = prefs.getDouble("I", 0.0);
        D = prefs.getDouble("D", 0.0);
        SmartDashboard.putNumber("Jaguar P", P);  //displays PID values on SmartDash
        SmartDashboard.putNumber("Jaguar I", I);
        SmartDashboard.putNumber("Jaguar D", D);
        SmartDashboard.putNumber("MAX_RPM", MAX_RPM);
        try
        {
            motor1.setPID(P, I, D);  //sets PID constants for Jag PID loop
            motor2.setPID(P, I, D);
            motor3.setPID(P, I, D);
            motor4.setPID(P, I, D);
            motor1.enableControl(); //starts feedback ctrl
            motor2.enableControl();
            motor3.enableControl();
            motor4.enableControl();
        } catch (CANTimeoutException ex)
        {
            CANTimeout();
        }
        System.out.println("finished prefs");
    }

    /**
     * This function is called periodically during operator control This
     * function is responsible for joystick inputs and motor speed
     */
    public void teleopPeriodic()
    {
        controlCage();
        controlIngest();
        try
        {
            double VertL = -JoyLeft.getY();  //gets vertical & horizontal values from left joystick
            double Horz = (JoyLeft.getX() + JoyRight.getX()) / 2;
            double VertR = -JoyRight.getY(); //gets vertical value from right joystick
            double JoyKneeOne = 0.05;        //first knee of joystick range which starts 'maneuvering range'
            double JoyKneeTwo = 0.8;         //second knee of joystick range which ends 'maneuvering range' and starts 'speed range'
            double JoyMaxRange = 1.0;        //maximum input range of joysticks

            if (Math.abs(VertL) < JoyKneeOne) //implements deadzones
            {
                VertL = 0.0;
            }

            if (Math.abs(VertR) < JoyKneeOne) //implements deadzones
            {
                VertR = 0.0;
            }

            if ((Math.abs(VertL) >= JoyKneeOne) && (Math.abs(VertL) <= JoyKneeTwo)) //mapping for maneuvering range
            {
                if (VertL < 0.0)
                {
                    VertL = (3.0 / 5.0) * VertL - 0.02;     //changes raw negative input into a maneuverable speed
                } else
                {
                    VertL = (3.0 / 5.0) * VertL + 0.02;     //changes raw positive input into a maneuverable speed
                }
            } else
            {
                if ((Math.abs(VertL) > JoyKneeTwo) && (Math.abs(VertL) <= JoyMaxRange)) //mapping for speed range
                {
                    if (VertL < 0)
                    {
                        VertL = (5.0 / 2.0) * VertL + 1.5;  //changes raw negative input into a fast speed
                    } else
                    {
                        VertL = (5.0 / 2.0) * VertL - 1.5;  //changes raw positive input into a fast speed
                    }
                }
            }

            if ((Math.abs(VertR) >= JoyKneeOne) && (Math.abs(VertR) <= JoyKneeTwo)) //mapping for maneuvering range
            {
                if (VertR < 0.0)
                {
                    VertR = (3.0 / 5.0) * VertR - 0.02;
                } else
                {
                    VertR = (3.0 / 5.0) * VertR + 0.02;
                }
            } else
            {
                if ((Math.abs(VertR) > JoyKneeTwo) && (Math.abs(VertR) <= JoyMaxRange)) //mapping for speed range
                {
                    if (VertR < 0.0)
                    {
                        VertR = (5.0 / 2.0) * VertR + 1.5;
                    } else
                    {
                        VertR = (5.0 / 2.0) * VertR - 1.5;
                    }
                }
            }

            //double maxspeed = VertL + VertR;
            //deadband for if not crabbing
            if (Math.abs(Horz) < 0.25)
            {
                Horz = 0.0;
            } //deadband for crabbing
            else
            {
                if (Math.abs(VertL) + Math.abs(VertR) < 1)
                {
                    VertL = 0;
                    VertR = 0;
                }
            }
            /*
             if (maxspeed > 1.8) {
             VertL = 1.0;
             VertR = 1.0;
             Horz = 0;
             } else if (maxspeed < -1.8) {
             VertL = -1.0;
             VertR = -1.0;
             Horz = 0;
             }
             */
            if (CrabOn.get() == true)
            {       //crabbing states
                CrabState = true;
            }
            if (CrabOff.get() == true)
            {
                CrabState = false;
            }
            if (CrabState == false)
            {
                Horz = 0.0;
            }

            // Joystick values are final:  Horz, VertL, VertR (-1..0..1)
            //holonomic code
            double motor1Speed = +VertL - Horz;
            double motor2Speed = -VertR - Horz;
            double motor3Speed = -VertR + Horz;
            double motor4Speed = +VertL + Horz;

            double biggestValue;
            biggestValue = 1.0;

            if (Math.abs(motor1Speed) > 1.0)
            {
                biggestValue = Math.abs(motor1Speed);
            }
            if (Math.abs(motor2Speed) > biggestValue)
            {
                biggestValue = Math.abs(motor2Speed);
            }                                   //finds the biggest motor value
            if (Math.abs(motor3Speed) > biggestValue)
            {
                biggestValue = Math.abs(motor3Speed);
            }
            if (Math.abs(motor4Speed) > biggestValue)
            {
                biggestValue = Math.abs(motor4Speed);
            }

            motor1Speed /= biggestValue;
            motor2Speed /= biggestValue;
            motor3Speed /= biggestValue;
            motor4Speed /= biggestValue;

            // motor#Speed values are final (-1..0..1)
            motor1.setX(MAX_RPM * motor1Speed);
            motor2.setX(MAX_RPM * motor2Speed);
            motor3.setX(MAX_RPM * motor3Speed);
            motor4.setX(MAX_RPM * motor4Speed);

            // Motora are commanded between -500 and 500 RPM
            // Operator runs star rollers with thumb buttons (press-and-hold)
            if (OpIntake.get() || DriverIntake.get())
            {  //if pressed take ball in
                ingestState = 0;
                Ingest.set(1.0);
            } else
            {
                if (OpEject.get() || DriverEject.get())
                {       //if pressed eject ball
                    ingestState = 0;
                    Ingest.set(-1.0);
                } else
                {
                    if (ingestState == 0)
                    {
                        Ingest.set(0.0);
                    }
                }
            }

            // Operator controls cage by joystick fwd/back (Y axis)
            double OpWench = JoyOp.getY();
            if (OpWench > 0.9)
            {
                ingestState = 0;  // Cancel auto-ingest if started
                cageCommand = -1; // Request cage retract
            } else
            {
                if (OpWench < -0.9)
                {
                    ingestState = 0;  // Cancel auto-ingest if started
                    cageCommand = 1;  // Request cage extend
                }
            }

            // Operator can start auto-capture with trigger
            if (OpAutoIntake.get())
            {
                ingestState = 1;
            }

            // Emergency deployment button
            if (OpDeploy.get())
            {
                cageCommand = -2;
            }

            motorSpeed[0] = motor1.getSpeed();      //gets motor speeds
            motorSpeed[1] = motor2.getSpeed();
            motorSpeed[2] = motor3.getSpeed();
            motorSpeed[3] = motor4.getSpeed();

            double command1Speed = motor1Speed;
            double command2Speed = motor2Speed;
            double command3Speed = motor3Speed;
            double command4Speed = motor4Speed;

            SmartDashboard.putNumber("Motor1 Position", Math.abs(motor1.getPosition()-StartPosition));  //displays motor position on SmartDash
            SmartDashboard.putNumber("Motor1 Speed", motorSpeed[0]);  //displays motor speed on SmartDash
            SmartDashboard.putNumber("Motor2 Speed", motorSpeed[1]);
            SmartDashboard.putNumber("Motor3 Speed", motorSpeed[2]);
            SmartDashboard.putNumber("Motor4 Speed", motorSpeed[3]);
            SmartDashboard.putNumber("Commanded Motor1 Speed", command1Speed);
            SmartDashboard.putNumber("Commanded Motor2 Speed", command2Speed);
            SmartDashboard.putNumber("Commanded Motor3 Speed", command3Speed);
            SmartDashboard.putNumber("Commanded Motor4 Speed", command4Speed);
            SmartDashboard.putNumber("Robot Speed", RobotSpeed(motorSpeed));
            SmartDashboard.putNumber("Left Joystick", JoyLeft.getY());
            SmartDashboard.putNumber("Right Joystick", JoyRight.getY());
            SmartDashboard.putNumber("Left Drive", VertL);
            SmartDashboard.putNumber("Right Drive", VertR);
            SmartDashboard.putNumber("Pot Value", winchlength.get());
        } catch (CANTimeoutException ex)
        {
            CANTimeout();
        }

        if (OpReloadPrefs.get() == true)
        {
            updatePrefs();
        }
    }
}


text:
azure.mgmt.storage.v2016_01_01.operations module
================================================

.. automodule:: azure.mgmt.storage.v2016_01_01.operations
    :members:
    :undoc-members:
    :show-inheritance:


text:
package io.requery.query;

/**
 * Offset query step.
 *
 * @param <E> type of result
 */
public interface Offset<E> extends Return<E> {

    /**
     * Defines the offset within this query results will start from.
     *
     * @param offset desired offset
     * @return next query step
     */
    Return<E> offset(int offset);
}


text:
from django.conf.urls import patterns, include, url
from api.api import router
from django.contrib import admin
from health import api

urlpatterns = patterns('',
	url(r'^api/v1/', include(router.urls)),
	url(r'^api-token-auth/','rest_framework.authtoken.views.obtain_auth_token'),
	url(r'^api-explorer/', include('rest_framework_swagger.urls')),
	url(r'^admin/', include(admin.site.urls)),
	url(r'^', api.health),
)


text:
if [ ! -d  /Volumes/ESP ]; then
  echo "Mounting EFI volume"
  sudo mkdir -p /Volumes/ESP
  sudo mount -t msdos /dev/disk0s1 /Volumes/ESP
fi


text:
The two builtin container types in Orange are arrays and tuples.

## Arrays

Arrays are a collection of zero or more values of a single type. They can be formed by having a comma-delimited list of values enclosed in brackets. For example, `[0,1,2,3,4]` is an array of numbers and `["hello", "goodbye"]` is an array of `string` (or more appropriately, an array of `char[]`).

The type of an array is the container type plus a `[]`.

The values in an array can be accessed by adding `[index]` to an expression whose type is an array. For example, the value of `[0,2,4,6,8][3]` is `6`.

Arrays store their length internally, which can be access with `.length`.

```
[0,1,2,3,4].length == 5
```

### Constrained Array Type

If you wanted to enforce an array type to have a certain number of values, you could enclose a constant integer inside the brackets when writing the type. For example, `int[5]` is an array of 5 `int`s.

## Tuples

A tuple is a collection of two or more values of any combination of types. They are formed similarly to arrays, except instead of enclosing the collection in square brackets, they're enclosed in parenthesis.

Since tuples don't have the constraint of all the values of being the same type, you can store anything you want in them: `("dog", 52u)` would be a tuple of a `string` and `uint`, written as `(string, uint)`.

You can access the members of a tuple with the dot syntax (`.index`). From our example earlier, these following expressions hold:

```
("dog", 52u).0 == "dog" // true
("dog", 52u).1 == 52u   // true
```

### Named Tuples

Optionally, you can name each component in the tuple and have the option of using the traditional `.index` syntax for accessing the components or `.name`.

```
(animal: "dog", someNumber: 52u).animal == "dog" // true
(animal: "dog", someNumber: 52u).0 == "dog"      // true
```

You don't have to name every component; you can only name one, if that is preferred.

Note that using named tuples is a constraint just like providing the size of an array in the array's type. For all Orange is concerned, `(string, uint) and (animal: string, someNumber: uint)` are different types, even though they store the same values.

This may seem pointless and restrictive, but it stops from accidentally interchanging `(country: string, countryAge: uint)` and `(animal: string, someNumber: uint)` in your code.