text:
module Data.Katydid.Relapse.Parser
  (
    -- * Parse Grammar
    parseGrammar
  , parseGrammarWithUDFs
    -- * Internal functions
    -- | These functions are exposed for testing purposes.
  , grammar
  , pattern
  , nameExpr
  , expr
  , idLit
  , bytesCastLit
  , stringLit
  , doubleCastLit
  , uintCastLit
  , intLit
  , ws
  )
where

import           Text.ParserCombinators.Parsec
import           Numeric                        ( readDec
                                                , readOct
                                                , readHex
                                                , readFloat
                                                )
import           Data.Char                      ( chr )
import qualified Data.Text                     as Text
import qualified Data.ByteString.Char8         as ByteString
import           Control.Arrow                  ( left )

import           Data.Katydid.Relapse.Expr
import           Data.Katydid.Relapse.Exprs
import           Data.Katydid.Relapse.Exprs.Logic
import           Data.Katydid.Relapse.Exprs.Var
import           Data.Katydid.Relapse.Ast

-- | parseGrammar parses the Relapse Grammar.
parseGrammar :: String -> Either String Grammar
parseGrammar = parseGrammarWithUDFs stdOnly

-- | parseGrammarWithUDFs parses the Relapse Grammar with extra user defined functions.
parseGrammarWithUDFs :: MkFunc -> String -> Either String Grammar
parseGrammarWithUDFs extraUDFs str =
  let mkFunc n es = case mkExpr n es of
        (Left  _) -> extraUDFs n es
        (Right v) -> return v
  in  left show $ parse (grammar mkFunc <* eof) "" str

infixl 4 <++>
(<++>) :: CharParser () String -> CharParser () String -> CharParser () String
f <++> g = (++) <$> f <*> g

infixr 5 <::>
(<::>) :: CharParser () Char -> CharParser () String -> CharParser () String
f <::> g = (:) <$> f <*> g

check :: Either String a -> CharParser () a
check e = case e of
  (Left  err) -> fail err
  (Right v  ) -> return v

empty :: CharParser () String
empty = return ""

opt :: CharParser () Char -> CharParser () String
opt p = (: "") <$> p <|> empty

_lineComment :: CharParser () ()
_lineComment = char '/' *> many (noneOf "\n") <* char '\n' *> return ()

_blockComment :: CharParser () ()
_blockComment =
  char '*' *> many (noneOf "*") <* char '*' <* char '/' *> return ()

_comment :: CharParser () ()
_comment = char '/' *> (_lineComment <|> _blockComment)

_ws :: CharParser () ()
_ws = _comment <|> () <$ space

-- | For internal testing
ws :: CharParser () ()
ws = () <$ many _ws

bool :: CharParser () Bool
bool = True <$ string "true" <|> False <$ string "false"

_decimalLit :: CharParser () Int
_decimalLit = oneOf "123456789" <::> many digit >>= _read readDec

_octalLit :: CharParser () Int
_octalLit = many1 octDigit >>= _read readOct

_hexLit :: CharParser () Int
_hexLit = many1 hexDigit >>= _read readHex

_read :: ReadS a -> String -> CharParser () a
_read read s = case read s of
  [(n, "")    ] -> return n
  ((n, "") : _) -> return n
  _             -> fail "digit"

_optionalSign :: (Num a) => CharParser () a
_optionalSign = -1 <$ char '-' <|> return 1

_signedIntLit :: CharParser () Int
_signedIntLit = (*) <$> _optionalSign <*> _intLit

_intLit :: CharParser () Int
_intLit =
  _decimalLit
    <|> char '0'
    *>  (_octalLit <|> (oneOf "xX" *> _hexLit) <|> return 0)

-- | For internal testing
intLit :: CharParser () Int
intLit =
  string "int(" *> _signedIntLit <* char ')' <|> _signedIntLit <?> "int_lit"

uintLit :: CharParser () Word
uintLit = do
  i <- intLit
  if i < 0 then fail "negative uint" else return $ fromIntegral i

-- | For internal testing
uintCastLit :: CharParser () Word
uintCastLit = string "uint(" *> uintLit <* char ')'

_exponent :: CharParser () String
_exponent = oneOf "eE" <::> (oneOf "+-" <::> many1 digit <|> many1 digit)

_floatLit :: CharParser () Double
_floatLit = do
  i <- many1 digit
  e <-
    _exponent
    <|> (    (string "." <|> empty)
        <++> (_exponent <|> many1 digit <++> (_exponent <|> empty))
        )
    <|> empty
  _read readFloat (i ++ e)

-- | For internal testing
doubleCastLit :: CharParser () Double
doubleCastLit =
  string "double(" *> ((*) <$> _optionalSign <*> _floatLit) <* char ')'

-- | For internal testing
idLit :: CharParser () String
idLit = (letter <|> char '_') <::> many (alphaNum <|> char '_')

_qualid :: CharParser () String
_qualid = idLit <++> (concat <$> many (char '.' <::> idLit))

_bigUValue :: CharParser () Char
_bigUValue = char 'U' *> do
  hs <- count 8 hexDigit
  n  <- _read readHex hs
  return $ toEnum n

_littleUValue :: CharParser () Char
_littleUValue = char 'u' *> do
  hs <- count 4 hexDigit
  n  <- _read readHex hs
  return $ toEnum n

_escapedChar :: CharParser () Char
_escapedChar =
  choice (zipWith (\c r -> r <$ char c) "abnfrtv'\\\"/" "\a\b\n\f\r\t\v\'\\\"/")

_unicodeValue :: CharParser () Char
_unicodeValue =
  (  char '\\'
    *> (   _bigUValue
       <|> _littleUValue
       <|> _hexByteUValue
       <|> _escapedChar
       <|> _octalByteUValue
       )
    )
    <|> noneOf "\\\""

_interpretedString :: CharParser () String
_interpretedString = between (char '"') (char '"') (many _unicodeValue)

_rawString :: CharParser () String
_rawString = between (char '`') (char '`') (many $ noneOf "`")

-- | For internal testing
stringLit :: CharParser () Text.Text
stringLit = Text.pack <$> (_rawString <|> _interpretedString)

_hexByteUValue :: CharParser () Char
_hexByteUValue = char 'x' *> do
  hs <- count 2 hexDigit
  n  <- _read readHex hs
  return $ chr n

_octalByteUValue :: CharParser () Char
_octalByteUValue = do
  os <- count 3 octDigit
  n  <- _read readOct os
  return $ toEnum n

_byteLit :: CharParser () Char
_byteLit = do
  i <- _intLit
  if i > 255 then fail $ "too large for byte: " ++ show i else return $ chr i

_byteElem :: CharParser () Char
_byteElem = _byteLit <|> between
  (char '\'')
  (char '\'')
  (_unicodeValue <|> _octalByteUValue <|> _hexByteUValue)

-- | For internal testing
bytesCastLit :: CharParser () ByteString.ByteString
bytesCastLit =
  ByteString.pack
    <$> (string "[]byte{" *> sepBy (ws *> _byteElem <* ws) (char ',') <* char
          '}'
        )

_literal :: CharParser () AnyExpr
_literal =
  mkBoolExpr
    .   boolExpr
    <$> bool
    <|> mkIntExpr
    .   intExpr
    <$> intLit
    <|> mkUintExpr
    .   uintExpr
    <$> uintCastLit
    <|> mkDoubleExpr
    .   doubleExpr
    <$> doubleCastLit
    <|> mkStringExpr
    .   stringExpr
    <$> stringLit
    <|> mkBytesExpr
    .   bytesExpr
    <$> bytesCastLit

_terminal :: CharParser () AnyExpr
_terminal =
  (  char '$'
    *> (   mkBoolExpr varBoolExpr
       <$  string "bool"
       <|> mkIntExpr varIntExpr
       <$  string "int"
       <|> mkUintExpr varUintExpr
       <$  string "uint"
       <|> mkDoubleExpr varDoubleExpr
       <$  string "double"
       <|> mkStringExpr varStringExpr
       <$  string "string"
       <|> mkBytesExpr varBytesExpr
       <$  string "[]byte"
       )
    )
    <|> _literal

_builtinSymbol :: CharParser () String
_builtinSymbol =
  string "=="
    <|>  string "!="
    <|>  char '<'
    <::> opt (char '=')
    <|>  char '>'
    <::> opt (char '=')
    <|>  string "~="
    <|>  string "*="
    <|>  string "^="
    <|>  string "$="
    <|>  string "::"

_builtin :: MkFunc -> CharParser () AnyExpr
_builtin mkFunc =
  mkBuiltIn <$> _builtinSymbol <*> (ws *> _expr mkFunc) >>= check

_function :: MkFunc -> CharParser () AnyExpr
_function mkFunc =
  mkFunc
    <$> idLit
    <*> (char '(' *> sepBy (ws *> _expr mkFunc <* ws) (char ',') <* char ')')
    >>= check

_listType :: CharParser () String
_listType =
  char '['
    <::> char ']'
    <::> (   string "bool"
         <|> string "int"
         <|> string "uint"
         <|> string "double"
         <|> string "string"
         <|> string "[]byte"
         )

_mustBool :: AnyExpr -> CharParser () (Expr Bool)
_mustBool = check . assertBool

newList :: String -> [AnyExpr] -> CharParser () AnyExpr
newList "[]bool" es = mkBoolsExpr . boolsExpr <$> mapM (check . assertBool) es
newList "[]int"  es = mkIntsExpr . intsExpr <$> mapM (check . assertInt) es
newList "[]uint" es = mkUintsExpr . uintsExpr <$> mapM (check . assertUint) es
newList "[]double" es =
  mkDoublesExpr . doublesExpr <$> mapM (check . assertDouble) es
newList "[]string" es =
  mkStringsExpr . stringsExpr <$> mapM (check . assertString) es
newList "[][]byte" es =
  mkListOfBytesExpr . listOfBytesExpr <$> mapM (check . assertBytes) es

_list :: MkFunc -> CharParser () AnyExpr
_list mkFunc = do
  ltype <- _listType
  es    <- ws *> char '{' *> sepBy (ws *> _expr mkFunc <* ws) (char ',') <* char
    '}'
  newList ltype es

_expr :: MkFunc -> CharParser () AnyExpr
_expr mkFunc = try _terminal <|> _list mkFunc <|> _function mkFunc

-- | For internal testing
expr :: MkFunc -> CharParser () (Expr Bool)
expr mkFunc =
  (try _terminal <|> _builtin mkFunc <|> _function mkFunc) >>= _mustBool

_nameString :: CharParser () (Expr Bool)
_nameString =
  (   mkBuiltIn "=="
    <$> (_literal <|> (mkStringExpr . stringExpr . Text.pack <$> idLit))
    )
    >>= check
    >>= _mustBool

sepBy2 :: CharParser () a -> String -> CharParser () [a]
sepBy2 p sep = do
  x1 <- p
  string sep
  x2 <- p
  xs <- many (try (string sep *> p))
  return (x1 : x2 : xs)

_nameChoice :: CharParser () (Expr Bool)
_nameChoice = foldl1 orExpr <$> sepBy2 (ws *> nameExpr <* ws) "|"

-- | For internal testing
nameExpr :: CharParser () (Expr Bool)
nameExpr =
  (boolExpr True <$ char '_')
    <|> (   notExpr
        <$> (char '!' *> ws *> char '(' *> ws *> nameExpr <* ws <* char ')')
        )
    <|> (char '(' *> ws *> _nameChoice <* ws <* char ')')
    <|> _nameString

_concatPattern :: MkFunc -> CharParser () Pattern
_concatPattern mkFunc =
  char '['
    *> (foldl1 Concat <$> sepBy2 (ws *> pattern mkFunc <* ws) ",")
    <* optional (char ',' <* ws)
    <* char ']'

_interleavePattern :: MkFunc -> CharParser () Pattern
_interleavePattern mkFunc =
  char '{'
    *> (foldl1 Interleave <$> sepBy2 (ws *> pattern mkFunc <* ws) ";")
    <* optional (char ';' <* ws)
    <* char '}'

_parenPattern :: MkFunc -> CharParser () Pattern
_parenPattern mkFunc = do
  char '('
  ws
  first <- pattern mkFunc
  ws
  (  char ')'
    *> ws
    *> (ZeroOrMore first <$ char '*' <|> Optional first <$ char '?')
    )
    <|> (  (   (first <$ char '|' >>= _orList mkFunc)
           <|> (first <$ char '&' >>= _andList mkFunc)
           )
        <* char ')'
        )

_orList :: MkFunc -> Pattern -> CharParser () Pattern
_orList mkFunc p =
  Or p . foldl1 Or <$> sepBy1 (ws *> pattern mkFunc <* ws) (char '|')

_andList :: MkFunc -> Pattern -> CharParser () Pattern
_andList mkFunc p =
  And p . foldl1 And <$> sepBy1 (ws *> pattern mkFunc <* ws) (char '&')

_refPattern :: CharParser () Pattern
_refPattern = Reference <$> (char '@' *> ws *> idLit)

_notPattern :: MkFunc -> CharParser () Pattern
_notPattern mkFunc =
  Not <$> (char '!' *> ws *> char '(' *> ws *> pattern mkFunc <* ws <* char ')')

_emptyPattern :: CharParser () Pattern
_emptyPattern = Empty <$ string "<empty>"

_zanyPattern :: CharParser () Pattern
_zanyPattern = ZAny <$ string "*"

_containsPattern :: MkFunc -> CharParser () Pattern
_containsPattern mkFunc = Contains <$> (char '.' *> pattern mkFunc)

_treenodePattern :: MkFunc -> CharParser () Pattern
_treenodePattern mkFunc =
  Node
    <$> nameExpr
    <*> (ws *> (try (char ':' *> ws *> pattern mkFunc) <|> _depthPattern mkFunc)
        )

_depthPattern :: MkFunc -> CharParser () Pattern
_depthPattern mkFunc =
  _concatPattern mkFunc
    <|> _interleavePattern mkFunc
    <|> _containsPattern mkFunc
    <|> flip Node Empty
    <$> ((string "->" *> expr mkFunc) <|> (_builtin mkFunc >>= _mustBool))

newContains :: CharParser () AnyExpr -> CharParser () Pattern
newContains e =
  flip Node Empty <$> ((mkBuiltIn "*=" <$> e) >>= check >>= _mustBool)

-- | For internal testing
pattern :: MkFunc -> CharParser () Pattern
pattern mkFunc =
  char '*'
    *>  ((char '=' *> newContains (ws *> _expr mkFunc)) <|> return ZAny)
    <|> _parenPattern mkFunc
    <|> _refPattern
    <|> try _emptyPattern
    <|> try (_treenodePattern mkFunc)
    <|> try (_depthPattern mkFunc)
    <|> _notPattern mkFunc

_patternDecl :: MkFunc -> CharParser () Grammar
_patternDecl mkFunc =
  newRef
    <$> (char '#' *> ws *> idLit)
    <*> (ws *> char '=' *> ws *> pattern mkFunc)

-- | For internal testing
grammar :: MkFunc -> CharParser () Grammar
grammar mkFunc =
  ws
    *>  (foldl1 union <$> many1 (_patternDecl mkFunc <* ws))
    <|> union
    <$> (newRef "main" <$> pattern mkFunc)
    <*> (foldl union emptyRef <$> many (ws *> _patternDecl mkFunc <* ws))


text:
/* eslint ember/order-in-controllers: 0 */
/* eslint ember/avoid-leaking-state-in-ember-objects: 0 */
import { inject as service } from '@ember/service';
import Controller from '@ember/controller';
import { computed } from '@ember/object';
import RSVP from 'rsvp';
import { isEmpty, isPresent } from '@ember/utils';

const { sort, gt } = computed;
const { all, Promise } = RSVP;

export default Controller.extend({
  store: service(),
  flashMessages: service(),
  queryParams: ['offset', 'limit', 'filter', 'school'],
  offset: 0,
  limit: 25,
  filter: '',
  school: null,
  hasMoreThanOneSchool: gt('model.schools.length', 1),
  sortSchoolsBy:['title'],
  sortedSchools: sort('model.schools', 'sortSchoolsBy'),
  selectedSchool: computed('model.schools.[]', 'model.primarySchool', 'school', function(){
    let schools = this.get('model.schools');
    const schoolId = this.school;
    if(isPresent(schoolId)){
      const school = schools.findBy('id', schoolId);
      if(school){
        return school;
      }
    }
    return this.get('model.primarySchool');
  }),

  deletedUpdates: [],
  updatesBeingSaved: [],

  allUpdates: computed('selectedSchool', function(){
    return new Promise(resolve => {
      let school = this.selectedSchool;
      this.store.query('pending-user-update', {
        filters: {
          schools: [school.get('id')]
        }
      }).then(updates => {
        //preload user for each update
        all(updates.mapBy('user')).then(() => {
          resolve(updates);
        });
      });
    });
  }),

  displayedUpdates: computed('allUpdates.@each.user', 'filter', 'offset', 'limit', 'deletedUpdates.[]', function(){
    const limit = this.limit;
    const offset = this.offset;
    const end = limit + offset;

    return new Promise(resolve => {
      this.allUpdates.then(allUpdates => {
        let sortedUpdates = allUpdates.sortBy('user.lastName', 'user.firstName').slice(offset, end).filter(update => {
          return !this.deletedUpdates.includes(update) &&
            (isEmpty(update.get('user.fullName'))
              || update.get('user.fullName').toLowerCase().includes(this.filter.toLowerCase()));
        });
        resolve(sortedUpdates);
      });
    });
  }),

  actions: {
    changeSelectedSchool(schoolId){
      this.set('school', schoolId);
    },
    updateEmailAddress(update){
      this.updatesBeingSaved.pushObject(update);
      update.get('user').then(user => {
        user.set('email', update.get('value'));
        user.save().then(() => {
          update.deleteRecord();
          update.save().then(() => {
            this.deletedUpdates.pushObject(update);
            this.updatesBeingSaved.removeObject(update);
            this.flashMessages.success('general.savedSuccessfully');
          });
        });
      });
    },
    disableUser(update){
      this.updatesBeingSaved.pushObject(update);
      update.get('user').then(user => {
        user.set('enabled', false);
        user.save().then(() => {
          user.get('pendingUserUpdates').then(updates => {
            updates.invoke('deleteRecord');
            RSVP.all(updates.invoke('save')).then(() => {
              this.deletedUpdates.pushObject(update);
              this.updatesBeingSaved.removeObject(update);
              this.flashMessages.success('general.savedSuccessfully');
            });
          });
        });
      });

    },
    excludeFromSync(update){
      this.updatesBeingSaved.pushObject(update);
      update.get('user').then(user => {
        user.set('userSyncIgnore', true);
        user.save().then(() => {
          user.get('pendingUserUpdates').then(updates => {
            updates.invoke('deleteRecord');
            RSVP.all(updates.invoke('save')).then(() => {
              this.deletedUpdates.pushObject(update);
              this.updatesBeingSaved.removeObject(update);
              this.flashMessages.success('general.savedSuccessfully');
            });
          });
        });
      });

    }
  }
});

redpajama_set_name: RedPajamaGithub


text:
#ifndef SRC_TRACE_PROCESSOR_IMPORTERS_PROTO_CHROME_SYSTEM_PROBES_MODULE_H_
#define SRC_TRACE_PROCESSOR_IMPORTERS_PROTO_CHROME_SYSTEM_PROBES_MODULE_H_

#include "perfetto/base/build_config.h"
#include "src/trace_processor/importers/proto/chrome_system_probes_parser.h"
#include "src/trace_processor/importers/proto/proto_importer_module.h"

#include "protos/perfetto/trace/trace_packet.pbzero.h"

namespace perfetto {
namespace trace_processor {

// Parses only the Chrome recorded system stats fields. This is separated from
// SystemProbesModule due to the binary size impact of the system probes parser.
class ChromeSystemProbesModule : public ProtoImporterModule {
 public:
  explicit ChromeSystemProbesModule(TraceProcessorContext* context);

  void ParseTracePacketData(const protos::pbzero::TracePacket_Decoder& decoder,
                            int64_t ts,
                            const TracePacketData&,
                            uint32_t field_id) override;

 private:
  ChromeSystemProbesParser parser_;
};

}  // namespace trace_processor
}  // namespace perfetto

#endif  // SRC_TRACE_PROCESSOR_IMPORTERS_PROTO_CHROME_SYSTEM_PROBES_MODULE_H_


text:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>定义input type="file" 的样式</title>
<style type="text/css">
body {
	font-size: 14px;
}

input {
	vertical-align: middle;
	margin: 0;
	padding: 0
}

.file-box {
	position: relative;
	width: 340px
}

.txt {
	height: 22px;
	border: 1px solid #cdcdcd;
	width: 180px;
}

.btn {
	background-color: #FFF;
	border: 1px solid #CDCDCD;
	height: 24px;
	width: 70px;
}

.file {
	position: absolute;
	top: 0;
	right: 80px;
	height: 24px;
	filter: alpha(opacity : 0);
	opacity: 0;
	width: 260px
}
</style>
</head>
<body>
	<div class="file-box">
		<form action="" method="post" enctype="multipart/form-data">
			<input type='text' name='textfield' id='textfield' class='txt' />
			<input type='button' class='btn' value='浏览...' />
			<input type="file" name="fileField" class="file" id="fileField" size="28" onchange="document.getElementById('textfield').value=this.value" />
			<input type="submit" name="submit" class="btn" value="上传" />
		</form>
	</div>
</body>
</html>


text:
import { Component } from '@angular/core';
import {
	NgbCalendar,
	NgbCalendarHebrew,
	NgbDate,
	NgbDatepickerI18n,
	NgbDatepickerI18nHebrew,
	NgbDatepickerModule,
	NgbDateStruct,
} from '@ng-bootstrap/ng-bootstrap';
import { FormsModule } from '@angular/forms';
import { JsonPipe } from '@angular/common';

@Component({
	selector: 'ngbd-datepicker-hebrew',
	standalone: true,
	imports: [NgbDatepickerModule, FormsModule, JsonPipe],
	templateUrl: './datepicker-hebrew.html',
	styles: [
		`
			.hebrew-day {
				text-align: right;
				padding: 0.25rem 0.65rem 0.25rem 0.25rem;
				border-radius: 0.25rem;
				display: inline-block;
				height: 2.75rem;
				width: 2.75rem;
			}
			.hebrew-day:hover,
			.hebrew-day.focused {
				background-color: #e6e6e6;
			}
			.hebrew-day.selected {
				background-color: #007bff;
				color: white;
			}
			.outside {
				color: lightgray;
			}
			.gregorian-num {
				font-size: 0.5rem;
				direction: ltr;
			}
		`,
	],
	providers: [
		{ provide: NgbCalendar, useClass: NgbCalendarHebrew },
		{ provide: NgbDatepickerI18n, useClass: NgbDatepickerI18nHebrew },
	],
})
export class NgbdDatepickerHebrew {
	model: NgbDateStruct;

	constructor(private calendar: NgbCalendar, public i18n: NgbDatepickerI18n) {
		this.dayTemplateData = this.dayTemplateData.bind(this);
	}

	dayTemplateData(date: NgbDate) {
		return {
			gregorian: (this.calendar as NgbCalendarHebrew).toGregorian(date),
		};
	}

	selectToday() {
		this.model = this.calendar.getToday();
	}
}


text:
FROM jenkins:2.19.1

USER root
COPY kubectl /usr/bin/
RUN curl -O https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz
RUN tar -xvf go1.6.linux-amd64.tar.gz
RUN mv go /usr/local

ENV GOPATH /go
RUN mkdir $GOPATH
ENV PATH /usr/local/go/bin:$GOPATH/bin:$PATH
RUN go get github.com/linkerd/namerctl && go install github.com/linkerd/namerctl
ENV NAMERCTL_BASE_URL http://namerd.default.svc.cluster.local:4180

USER jenkins
RUN /usr/local/bin/install-plugins.sh workflow-aggregator:2.4
RUN /usr/local/bin/install-plugins.sh github-oauth:0.24
COPY jobs /usr/share/jenkins/ref/jobs

ENTRYPOINT ["/bin/tini", "--", "/usr/local/bin/jenkins.sh"]


text:
import subprocess

def cli_call(context, arg_list, expect_success=True):
    p = subprocess.Popen(arg_list, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    output, error = p.communicate()
    if p.returncode != 0:
        if output is not None:
            print("Output:\n" + output)
        if error is not None:
            print("Error Message:\n" + error)
        if expect_success:
            raise subprocess.CalledProcessError(p.returncode, arg_list, output)
    return output, error, p.returncode


text:
FROM debian:stretch
LABEL maintainer "Jessie Frazelle <jess@linux.com>"

RUN apt-get update && apt-get install -y \
	adb \
	android-tools* \
	ca-certificates \
	curl \
	fastboot \
	usbutils \
	--no-install-recommends \
	&& rm -rf /var/lib/apt/lists/*

ENTRYPOINT [ "bash" ]


text:
@implementation LINGLoginManager
- (BOOL)isLogin{
    return self.password.length > 0;
}
+ (instancetype)sharedManager
{
    static LINGLoginManager *_sharedManager = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _sharedManager = [[LINGLoginManager alloc] init];
        _sharedManager.service = KEYCHAIN_SERVICE_NAME;
        _sharedManager.account = KEYCHAIN_ACCOUNT_NAME;
        NSError *error = nil;
        if ([_sharedManager fetch:&error]) {
            DDLogInfo(@"fetch token success");
        }
        else{
            DDLogVerbose(@"fetch token error : %@",error);
        }
    });
    return _sharedManager;
}
@end


text:
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Windows.Input;
using BasicMVVMQuickstart_Desktop.ViewModels;

namespace BasicMVVMQuickstart_Desktop
{
    public class QuestionnaireViewDesignViewModel
    {
        public QuestionnaireViewDesignViewModel()
        {
            this.QuestionnaireViewModel = new QuestionnaireViewModel();
        }

        public QuestionnaireViewModel QuestionnaireViewModel { get; set; }
    }
}


text:
<?php

/**
 * Requirements Checker: This script will check if your system meets
 * the requirements for running Nette Framework.
 *
 * This file is part of the Nette Framework (http://nette.org)
 */

/**
 * Check PHP configuration.
 */
foreach (array('function_exists', 'version_compare', 'extension_loaded', 'ini_get') as $function) {
	if (!function_exists($function)) {
		die("Error: function '$function' is required by Nette Framework and this Requirements Checker.");
	}
}

/**
 * Check assets folder, template file must be readable
 */
define('TEMPLATE_FILE', dirname(__FILE__) . '/assets/checker.phtml');
if (!is_readable(TEMPLATE_FILE)) {
	die('Error: template file is not readable. Check assets folder (part of distribution), it should be present, readable and contain readable template file.');
}

/**
 * Check Nette Framework requirements.
 */
$tests[] = array(
	'title' => 'Web server',
	'message' => isset($_SERVER['SERVER_SOFTWARE']) ? $_SERVER['SERVER_SOFTWARE'] : 'unknown',
);

$tests[] = array(
	'title' => 'PHP version',
	'required' => TRUE,
	'passed' => version_compare(PHP_VERSION, '5.3.1', '>='),
	'message' => PHP_VERSION,
	'description' => 'Your PHP version is too old. Nette Framework requires at least PHP 5.3.1 or higher.',
);

$tests[] = array(
	'title' => 'Memory limit',
	'message' => ini_get('memory_limit'),
);

$tests['hf'] = array(
	'title' => '.htaccess file protection',
	'required' => FALSE,
	'description' => 'File protection by .htaccess is not present. You must be careful to put files into document_root folder.',
	'script' => ' ',
);

$tests['hr'] = array(
	'title' => '.htaccess mod_rewrite',
	'required' => FALSE,
	'description' => 'Mod_rewrite is probably not present. You will not be able to use Cool URL.',
	'script' => ' ',
);

$tests[] = array(
	'title' => 'Function ini_set()',
	'required' => FALSE,
	'passed' => function_exists('ini_set'),
	'description' => 'Function ini_set() is disabled. Some parts of Nette Framework may not work properly.',
);

$tests[] = array(
	'title' => 'Function error_reporting()',
	'required' => TRUE,
	'passed' => function_exists('error_reporting'),
	'description' => 'Function error_reporting() is disabled. Nette Framework requires this to be enabled.',
);

$tests[] = array(
	'title' => 'Function flock()',
	'required' => TRUE,
	'passed' => flock(fopen(__FILE__, 'r'), LOCK_SH),
	'description' => 'Function flock() is not supported on this filesystem. Nette Framework requires this to process atomic file operations.',
);

$tests[] = array(
	'title' => 'Register_globals',
	'required' => TRUE,
	'passed' => !iniFlag('register_globals'),
	'message' => 'Disabled',
	'errorMessage' => 'Enabled',
	'description' => 'Configuration directive register_globals is enabled. Nette Framework requires this to be disabled.',
);

$tests[] = array(
	'title' => 'Variables_order',
	'required' => TRUE,
	'passed' => strpos(ini_get('variables_order'), 'G') !== FALSE && strpos(ini_get('variables_order'), 'P') !== FALSE && strpos(ini_get('variables_order'), 'C') !== FALSE,
	'description' => 'Configuration directive variables_order is missing. Nette Framework requires this to be set.',
);

$tests[] = array(
	'title' => 'Session auto-start',
	'required' => FALSE,
	'passed' => session_id() === '' && !defined('SID'),
	'description' => 'Session auto-start is enabled. Nette Framework recommends not to use this directive for security reasons.',
);

$tests[] = array(
	'title' => 'PCRE with UTF-8 support',
	'required' => TRUE,
	'passed' => @preg_match('/pcre/u', 'pcre'),
	'description' => 'PCRE extension must support UTF-8.',
);

$reflection = new ReflectionFunction('paint');
$tests[] = array(
	'title' => 'Reflection phpDoc',
	'required' => TRUE,
	'passed' => strpos($reflection->getDocComment(), 'Paints') !== FALSE,
	'description' => 'Reflection phpDoc are not available (probably due to an eAccelerator bug). You cannot use @annotations.',
);

$tests[] = array(
	'title' => 'ICONV extension',
	'required' => TRUE,
	'passed' => extension_loaded('iconv') && (ICONV_IMPL !== 'unknown') && @iconv('UTF-16', 'UTF-8//IGNORE', iconv('UTF-8', 'UTF-16//IGNORE', 'test')) === 'test',
	'message' => 'Enabled and works properly',
	'errorMessage' => 'Disabled or does not work properly',
	'description' => 'ICONV extension is required and must work properly.',
);

$tests[] = array(
	'title' => 'JSON extension',
	'required' => TRUE,
	'passed' => extension_loaded('json'),
);

$tests[] = array(
	'title' => 'Fileinfo extension',
	'required' => FALSE,
	'passed' => extension_loaded('fileinfo'),
	'description' => 'Fileinfo extension is absent. You will not be able to detect content-type of uploaded files.',
);

$tests[] = array(
	'title' => 'PHP tokenizer',
	'required' => TRUE,
	'passed' => extension_loaded('tokenizer'),
	'description' => 'PHP tokenizer is required.',
);

$tests[] = array(
	'title' => 'PDO extension',
	'required' => FALSE,
	'passed' => $pdo = extension_loaded('pdo') && PDO::getAvailableDrivers(),
	'message' => $pdo ? 'Available drivers: ' . implode(' ', PDO::getAvailableDrivers()) : NULL,
	'description' => 'PDO extension or PDO drivers are absent. You will not be able to use Nette\Database.',
);

$tests[] = array(
	'title' => 'Multibyte String extension',
	'required' => FALSE,
	'passed' => extension_loaded('mbstring'),
	'description' => 'Multibyte String extension is absent. Some internationalization components may not work properly.',
);

$tests[] = array(
	'title' => 'Multibyte String function overloading',
	'required' => TRUE,
	'passed' => !extension_loaded('mbstring') || !(mb_get_info('func_overload') & 2),
	'message' => 'Disabled',
	'errorMessage' => 'Enabled',
	'description' => 'Multibyte String function overloading is enabled. Nette Framework requires this to be disabled. If it is enabled, some string function may not work properly.',
);

$tests[] = array(
	'title' => 'Memcache extension',
	'required' => FALSE,
	'passed' => extension_loaded('memcache'),
	'description' => 'Memcache extension is absent. You will not be able to use Nette\Caching\Storages\MemcachedStorage.',
);

$tests[] = array(
	'title' => 'GD extension',
	'required' => FALSE,
	'passed' => extension_loaded('gd'),
	'description' => 'GD extension is absent. You will not be able to use Nette\Image.',
);

$tests[] = array(
	'title' => 'Bundled GD extension',
	'required' => FALSE,
	'passed' => extension_loaded('gd') && GD_BUNDLED,
	'description' => 'Bundled GD extension is absent. You will not be able to use some functions such as Nette\Image::filter() or Nette\Image::rotate().',
);

$tests[] = array(
	'title' => 'Fileinfo extension or mime_content_type()',
	'required' => FALSE,
	'passed' => extension_loaded('fileinfo') || function_exists('mime_content_type'),
	'description' => 'Fileinfo extension or function mime_content_type() are absent. You will not be able to determine mime type of uploaded files.',
);

$tests[] = array(
	'title' => 'HTTP_HOST or SERVER_NAME',
	'required' => TRUE,
	'passed' => isset($_SERVER['HTTP_HOST']) || isset($_SERVER['SERVER_NAME']),
	'message' => 'Present',
	'errorMessage' => 'Absent',
	'description' => 'Either $_SERVER["HTTP_HOST"] or $_SERVER["SERVER_NAME"] must be available for resolving host name.',
);

$tests[] = array(
	'title' => 'REQUEST_URI or ORIG_PATH_INFO',
	'required' => TRUE,
	'passed' => isset($_SERVER['REQUEST_URI']) || isset($_SERVER['ORIG_PATH_INFO']),
	'message' => 'Present',
	'errorMessage' => 'Absent',
	'description' => 'Either $_SERVER["REQUEST_URI"] or $_SERVER["ORIG_PATH_INFO"] must be available for resolving request URL.',
);

$tests[] = array(
	'title' => 'SCRIPT_NAME or DOCUMENT_ROOT & SCRIPT_FILENAME',
	'required' => TRUE,
	'passed' => isset($_SERVER['SCRIPT_NAME']) || isset($_SERVER['DOCUMENT_ROOT'], $_SERVER['SCRIPT_FILENAME']),
	'message' => 'Present',
	'errorMessage' => 'Absent',
	'description' => '$_SERVER["SCRIPT_NAME"] or $_SERVER["DOCUMENT_ROOT"] with $_SERVER["SCRIPT_FILENAME"] must be available for resolving script file path.',
);

$tests[] = array(
	'title' => 'REMOTE_ADDR or php_uname("n")',
	'required' => TRUE,
	'passed' => isset($_SERVER['REMOTE_ADDR']) || function_exists('php_uname'),
	'message' => 'Present',
	'errorMessage' => 'Absent',
	'description' => '$_SERVER["REMOTE_ADDR"] or php_uname("n") must be available for detecting development / production mode.',
);

paint($tests);

/**
 * Paints checker.
 * @param  array
 * @return void
 */
function paint($requirements)
{
	$redirect = round(time(), -1);
	if (!isset($_GET) || (isset($_GET['r']) && $_GET['r'] == $redirect)) {
		$redirect = NULL;
	}

	$errors = $warnings = FALSE;

	foreach ($requirements as $id => $requirement)
	{
		$requirements[$id] = $requirement = (object) $requirement;
		if (isset($requirement->passed) && !$requirement->passed) {
			if ($requirement->required) {
				$errors = TRUE;
			} else {
				$warnings = TRUE;
			}
		}
	}

	require TEMPLATE_FILE;
}

/**
 * Gets the boolean value of a configuration option.
 * @param  string  configuration option name
 * @return bool
 */
function iniFlag($var)
{
	$status = strtolower(ini_get($var));
	return $status === 'on' || $status === 'true' || $status === 'yes' || (int) $status;
}


text:
package edu.umass.cs.ciir.waltz.dociter.movement;

import ciir.jfoley.chai.collections.util.ListFns;
import edu.umass.cs.ciir.waltz.dociter.IKeyBlock;

import java.util.HashSet;
import java.util.List;
import java.util.Objects;

/**
 * @author jfoley.
 */
public abstract class AChildrenMover<T extends Mover> extends AMover {
	protected final List<T> children;
	protected int lastKey;

	public AChildrenMover(List<T> children) {
		this.children = ListFns.ensureRandomAccess(children);
		assert(children.size() > 1);
		assert(children.size() == new HashSet<>(children).size());
		for (T child : children) {
			Objects.requireNonNull(child, "All children of movers must be non-null.");
		}
		loadNewCurrentBlock();
	}

  @Override
  public void reset() {
    for (Mover child : children) {
      child.reset();
    }
    loadNewCurrentBlock();
  }

	protected final int findLowestMax() {
		int lastKey = children.get(0).maxKey();
		for (int i = 1; i < children.size(); i++) {
			Mover child = children.get(i);
			lastKey = Math.min(lastKey, child.maxKey());
		}
		return lastKey;
	}

	protected final int findMinimumKey() {
		int minimumChildKey = children.get(0).currentKey();
		for (int i = 1; i < children.size(); i++) {
			Mover child = children.get(i);
			minimumChildKey = Math.min(minimumChildKey, child.currentKey());
		}
		return minimumChildKey;
	}

	protected final int findHighestMinimum() {
		int highMin = children.get(0).currentKey();
		for (int i = 1; i < children.size(); i++) {
			Mover child = children.get(i);
			highMin = Math.max(highMin, child.currentKey());
		}
		return highMin;
	}

	@Override
	public void nextBlock() {
		if(lastKey == DONE_ID) return;
		for (Mover child : children) {
			child.movePast(lastKey);
			assert (child.isDoneWithBlock() || child.currentKey() > lastKey);

			if (child.isDoneWithBlock()) {
				child.nextBlock();
			}
		}
		loadNewCurrentBlock();
	}

	protected void loadNewCurrentBlock() {
		this.currentBlock = null;
		this.index = 0;
		this.lastKey = DONE_ID;

		while(true) {
			// find the first of any child's maximum keys.
			int lastKey = findLowestMax();
			if (lastKey == DONE_ID) {
				return;
			}

			this.lastKey = lastKey;
			this.currentBlock = loadKeysFromChildren(lastKey);
			if(this.currentBlock == null) {
				return; // End of List
			}
			if(!this.currentBlock.isEmpty()) {
				break;
			}

			// No matches
			for (T child : this.children) {
				if(child.isDoneWithBlock()) {
					child.nextBlock();
				}
			}
		}

		// rewind so values can be stepped through.
		for (T child : children) {
			int here = this.currentKey();
			child.rewindBlock(here);
		}
	}

	/**
	 * Select matching from child blocks
	 * @param lastKey is the min(x.maxKey for x in children); the upper bound of current block.
	 * @return a block filled with matches between here and lastKey inclusive.
	 */
	protected abstract IKeyBlock loadKeysFromChildren(int lastKey);

}


text:
<?php
class Amasty_Customerattr_Model_Rewrite_Checkout_Type_Onepage extends Mage_Checkout_Model_Type_Onepage
{
    public function saveBilling($data, $customerAddressId)
    {
        if (isset($data['amcustomerattr']))
        {
            // checking unique attributes
            $checkUnique = array();
            $nameGroupAttribute = '';
            $idGroupSelect = '';
            $collection = Mage::getModel('eav/entity_attribute')->getCollection();

            $alias = Mage::helper('amcustomerattr')->getProperAlias($collection->getSelect()->getPart('from'), 'eav_attribute');
            $collection->addFieldToFilter($alias . 'is_user_defined', 1);
            $collection->addFieldToFilter($alias . 'entity_type_id', Mage::getModel('eav/entity')->setType('customer')->getTypeId());

            foreach ($collection as $attribute)
            {
                if ($attribute->getIsUnique())
                {
                    $translations = $attribute->getStoreLabels();
                    if (isset($translations[Mage::app()->getStore()->getId()]))
                    {
                        $attributeLabel = $translations[Mage::app()->getStore()->getId()];
                    } else
                    {
                        $attributeLabel = $attribute->getFrontend()->getLabel();
                    }
                    $checkUnique[$attribute->getAttributeCode()] = $attributeLabel;
                }
            }

            $collection = Mage::getModel('customer/attribute')->getCollection();
            $alias = Mage::helper('amcustomerattr')->getProperAlias($collection->getSelect()->getPart('from'), 'eav_attribute');
            $collection->addFieldToFilter($alias . 'is_user_defined', 1);
            $collection->addFieldToFilter($alias . 'entity_type_id', Mage::getModel('eav/entity')->setType('customer')->getTypeId());
            foreach ($collection as $attribute)
            {
                if ('selectgroup' == $attribute->getTypeInternal()){
                    $nameGroupAttribute = $attribute->getAttributeCode();
                }
            }
            foreach ($data['amcustomerattr'] as $attributeCode => $attributeValue){
                 if ($attributeCode == $nameGroupAttribute) {
                    $idGroupSelect = $attributeValue;
                }
            }
            if ($idGroupSelect) {
                $option = Mage::getModel('eav/entity_attribute_option')->load($idGroupSelect);
                if ($option && $option->getGroupId()) {
                    $customer = Mage::getModel('customer/customer');
                    $customer->setGroupId($option->getGroupId());
                }
            }

            if ($checkUnique) {
                foreach ($checkUnique as $attributeCode => $attributeLabel) {
                    //skip empty values
                    if (!$data['amcustomerattr'][$attributeCode]) {
                        continue;
                    }
                    $customerCollection = Mage::getResourceModel('customer/customer_collection');
                    $customerCollection->addAttributeToFilter($attributeCode, array('eq' => $data['amcustomerattr'][$attributeCode]));
                    if ($customerId = Mage::getSingleton('customer/session')->getCustomer()->getId()) {
                        $mainAlias = ( false !== strpos($customerCollection->getSelect()->__toString(), 'AS `e') ) ? 'e' : 'main_table';
                        $customerCollection->getSelect()->where($mainAlias . '.entity_id != ?', $customerId);
                    }
                    if ($customerCollection->getSize() > 0) {
                        $result = array(
                            'error'     => 1,
                            'message'   => Mage::helper('amcustomerattr')->__('Please specify different value for "%s" attribute. Customer with such value already exists.', $attributeLabel),
                        );
                        return $result;
                    }
                }
            }
            Mage::getSingleton('checkout/session')->setAmcustomerattr($data['amcustomerattr']);
        }
        return parent::saveBilling($data, $customerAddressId);
    }
}


text:
<?php

/**
 * Load this asset with...
 * p2m\assets\MomentTimezoneWithDataAsset::register($this);
 *
 * or specify as a dependency with...
 *     'p2m\assets\MomentTimezoneWithDataAsset',
 */

namespace p2m\assets;

class MomentTimezoneWithDataAsset extends \p2m\assets\base\P2AssetBundle
{
	protected $packageName = 'moment-timezone';

	protected $packageVersion = '0.5.27';

	protected $packageData = [
		'baseUrl' => 'https://cdn.jsdelivr.net/npm/moment-timezone@##-version-##/builds',
		'sourcePath' => '@npm/moment-timezone/builds',
		'static' => [
			'jsOptions' => [
				'integrity' => 'sha384-uByKoV0SBU+rgBKwp1KJqdbdWS70ta8SkmmV74Zq7ZSCk9hgn8+cpB6PbrHGjPOB',
				'crossorigin' => 'anonymous',
			],
		],
		'js' => [
			'moment-timezone-with-data.min.js',
		],
		'depends' => [
			'p2m\assets\P2CoreAsset',
		],
	];

	public function init()
	{
		$this->configureAsset($this->packageData);
		parent::init();
	}
}


text:
/** @file chert_termlisttable.h
 * @brief Subclass of ChertTable which holds termlists.
 */
/* Copyright (C) 2007,2008,2009 Olly Betts
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifndef XAPIAN_INCLUDED_CHERT_TERMLISTTABLE_H
#define XAPIAN_INCLUDED_CHERT_TERMLISTTABLE_H

#include <xapian/types.h>

#include "chert_lazytable.h"
#include "pack.h"

#include <string>

namespace Xapian {
class Document;
}

class ChertTermListTable : public ChertLazyTable {
  public:
    static std::string make_key(Xapian::docid did) {
	std::string key;
	pack_uint_preserving_sort(key, did);
	return key;
    }

    /** Create a new ChertTermListTable object.
     *
     *  This method does not create or open the table on disk - you
     *  must call the create() or open() methods respectively!
     *
     *  @param dbdir	    The directory the chert database is stored in.
     *  @param readonly	    true if we're opening read-only, else false.
     */
    ChertTermListTable(const std::string & dbdir, bool readonly)
	: ChertLazyTable("termlist", dbdir + "/termlist.", readonly,
			 Z_DEFAULT_STRATEGY) { }

    /** Set the termlist data for document @a did.
     *
     *  Any existing data is replaced.
     *
     *  @param did	The docid to set the termlist data for.
     *  @param doc	The Xapian::Document object to read term data from.
     *  @param doclen	The document length.
     */
    void set_termlist(Xapian::docid did, const Xapian::Document & doc,
		      chert_doclen_t doclen);

    /** Delete the termlist data for document @a did.
     *
     *  @param did  The docid to delete the termlist data for.
     */
    void delete_termlist(Xapian::docid did) { del(make_key(did)); }

    /** Non-lazy override of ChertLazyTable::create_and_open().
     *
     * Don't create lazily, but if the termlist is deleted, work without it.
     *
     *  This method isn't virtual, but we never call it such that it needs to
     *  be.
     */
    void create_and_open(unsigned int blocksize) {
	ChertTable::create_and_open(blocksize);
    }
};

#endif // XAPIAN_INCLUDED_CHERT_TERMLISTTABLE_H


text:
package kafka

import message.Message
import org.apache.log4j.PropertyConfigurator
import kafka.utils.Logging
import serializer.Encoder

object TestKafkaAppender extends Logging {

  def main(args:Array[String]) {

    if(args.length < 1) {
      println("USAGE: " + TestKafkaAppender.getClass.getName + " log4j_config")
      System.exit(1)
    }

    try {
      PropertyConfigurator.configure(args(0))
    } catch {
      case e: Exception => System.err.println("KafkaAppender could not be initialized ! Exiting..")
      e.printStackTrace()
      System.exit(1)
    }

    for(i <- 1 to 10)
      info("test")
  }
}

class AppenderStringSerializer extends Encoder[AnyRef] {
  def toMessage(event: AnyRef):Message = new Message(event.asInstanceOf[String].getBytes)
}


text:
from google.cloud import language_v1beta2

async def sample_classify_text():
    # Create a client
    client = language_v1beta2.LanguageServiceAsyncClient()

    # Initialize request argument(s)
    document = language_v1beta2.Document()
    document.content = "content_value"

    request = language_v1beta2.ClassifyTextRequest(
        document=document,
    )

    # Make the request
    response = await client.classify_text(request=request)

    # Handle the response
    print(response)

# [END language_v1beta2_generated_LanguageService_ClassifyText_async]


text:
#ifndef NDHIST_LIMITS_HPP_INCLUDED
#define NDHIST_LIMITS_HPP_INCLUDED 1

#include <ndhist/detail/limits.hpp>

/**
 * The maximal number of possible dimensions a histogram object can have. Note
 * that this limit is independent from the limit for the number of dimensions
 * possible for having the fill method available for a tuple of arrays (which is
 * dependent on the limits in BoostNumpy).
 * But as default value we set it to the same number (just for convienience).
 */
#ifndef NDHIST_LIMIT_MAX_ND
    #define NDHIST_LIMIT_MAX_ND \
        NDHIST_DETAIL_LIMIT_TUPLE_FILL_MAX_ND
#endif

#endif // !NDHIST_LIMITS_HPP_INCLUDED


text:
<?xml version="1.0" encoding="UTF-8"?>
<sem:triples xmlns:sem="http://marklogic.com/semantics">
  <sem:triple>
    <sem:subject>http://www.lds.org/concept/gs/chosen</sem:subject>
    <sem:predicate>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</sem:predicate>
    <sem:object datatype="sem:iri">http://www.w3.org/2004/02/skos/core#Concept</sem:object>
  </sem:triple>
  <sem:triple>
    <sem:subject>http://www.lds.org/concept/gs/chosen</sem:subject>
    <sem:predicate>http://www.w3.org/2004/02/skos/core#prefLabel</sem:predicate>
    <sem:object xml:lang="eng" datatype="xsd:string">Chosen</sem:object>
  </sem:triple>
  <sem:triple>
    <sem:subject>http://www.lds.org/concept/gs/chosen</sem:subject>
    <sem:predicate>http://www.w3.org/2004/02/skos/core#altLabel</sem:predicate>
    <sem:object xml:lang="eng" datatype="xsd:string">adjective or noun</sem:object>
  </sem:triple>
  <sem:triple>
    <sem:subject>http://www.lds.org/concept/gs/chosen</sem:subject>
    <sem:predicate>http://www.lds.org/core#entityType</sem:predicate>
    <sem:object datatype="sem:iri">http://www.lds.org/Topic</sem:object>
  </sem:triple>
  <sem:triple>
    <sem:subject>http://www.lds.org/concept/gs/chosen</sem:subject>
    <sem:predicate>http://www.lds.org/core#partOfSpeech</sem:predicate>
    <sem:object xml:lang="eng" datatype="xsd:string">adj</sem:object>
  </sem:triple>
  <sem:triple>
    <sem:subject>http://www.lds.org/concept/gs/chosen</sem:subject>
    <sem:predicate>http://www.lds.org/core#instanceOf</sem:predicate>
    <sem:object datatype="xsd:anyURI">http://www.lds.org/scriptures/gs/chosen-adjective-or-noun</sem:object>
  </sem:triple>
  <sem:triple>
    <sem:subject>http://www.lds.org/concept/gs/chosen</sem:subject>
    <sem:predicate>http://www.w3.org/2004/02/skos/core#definition</sem:predicate>
    <sem:object xml:lang="eng" datatype="xsd:string">Those selected by God for special responsibilities.</sem:object>
  </sem:triple>
  <sem:triple>
    <sem:subject>http://www.lds.org/concept/gs/chosen</sem:subject>
    <sem:predicate>http://www.w3.org/2004/02/skos/core#related</sem:predicate>
    <sem:object datatype="sem:iri">http://www.lds.org/concept/gs/call</sem:object>
  </sem:triple>
  <sem:triple>
    <sem:subject>http://www.lds.org/concept/gs/chosen</sem:subject>
    <sem:predicate>http://www.w3.org/2004/02/skos/core#inScheme</sem:predicate>
    <sem:object datatype="sem:iri">http://www.lds.org/concept-scheme/guide-to-the-scriptures</sem:object>
  </sem:triple>
  <sem:triple>
    <sem:subject>http://www.lds.org/concept/gs/chosen</sem:subject>
    <sem:predicate>http://www.lds.org/core#relCount</sem:predicate>
    <sem:object datatype="xsd:integer">1</sem:object>
  </sem:triple>
</sem:triples>


text:
package com.nhpatt.smilesdemoproject.screens;

import android.content.Context;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.widget.ProgressBar;
import com.liferay.mobile.screens.viewsets.defaultviews.asset.list.AssetListAdapter;
import com.liferay.mobile.screens.viewsets.defaultviews.asset.list.AssetListView;
import com.nhpatt.smilesdemoproject.R;

/**
 * @author Javier Gamarra
 */
public class AssetGridLayout extends AssetListView {

	public AssetGridLayout(Context context) {
		super(context);
	}

	public AssetGridLayout(Context context, AttributeSet attributes) {
		super(context, attributes);
	}

	public AssetGridLayout(Context context, AttributeSet attributes, int defaultStyle) {
		super(context, attributes, defaultStyle);
	}

	@Override
	protected int getItemLayoutId() {
		return R.layout.smiles;
	}

	@Override
	protected AssetListAdapter createListAdapter(int itemLayoutId, int itemProgressLayoutId) {
		return new AssetCustomAdapter(itemLayoutId, itemProgressLayoutId, this);
	}

	@Override
	protected void onFinishInflate() {
		super.onFinishInflate();

		int itemLayoutId = getItemLayoutId();
		int itemProgressLayoutId = getItemProgressLayoutId();

		recyclerView = (RecyclerView) findViewById(com.liferay.mobile.screens.R.id.liferay_recycler_list);
		progressBar = (ProgressBar) findViewById(com.liferay.mobile.screens.R.id.liferay_progress);

		AssetListAdapter adapter = createListAdapter(itemLayoutId, itemProgressLayoutId);
		recyclerView.setAdapter(adapter);
		recyclerView.setHasFixedSize(true);
		recyclerView.setLayoutManager(new GridLayoutManager(getContext(), 2));

		RecyclerView.ItemDecoration dividerItemDecoration = getDividerDecoration();
		if (dividerItemDecoration != null) {
			recyclerView.addItemDecoration(getDividerDecoration());
		}
	}
}


text:
require "spec_helper"
require "./lib/wulin_master/components/grid/toolbar"

describe WulinMaster::Toolbar do
  it "should has items created from actions" do
    actions = [{name: "create"}, {name: "export"}]
    toolbar = WulinMaster::Toolbar.new("post_grid", actions)

    expect(toolbar.items.size).to eq(2)
    toolbar.items.each { |item| expect(item).to be_a WulinMaster::ToolbarItem }
    expect(toolbar.items.first.icon).to eq("add_box")
    expect(toolbar.items.first.options[:name]).to eq("create")
    expect(toolbar.items.last.options[:name]).to eq("export")
  end
end


text:
<?php

declare(strict_types=1);

namespace GOL\GameBundle\Test\Unit\Domain;

use GOL\GameBundle\Domain\Board;
use PHPUnit\Framework\TestCase;

/**
 * Class BoardTest
 * @package GOL\GameBundle\Test\Unit\Domain
 */
class BoardTest extends TestCase
{
	/**
	 * @dataProvider boardConstructorProvider
	 */
	public function testBoardConstructor($rows, $columns, $expected)
	{
	    $board = new Board($rows, $columns);

	    $notEmptyElements = array_filter($board->getStatus(), function ($position) {
	        return !in_array('', $position);
	    });

	    $this->assertEquals($expected, count($notEmptyElements));
	}

	public function boardConstructorProvider()
	{
	    return [
	        'New Board 3x4 should return an array with empty values'   => [3, 4, 0],
	        'New Board 4x6 should return an array with empty values'   => [4, 6, 0],
	        'New Board 12x8 should return an array with empty values'  => [12, 8, 0],
	        'New Board 50x30 should return an array with empty values' => [50, 30, 0],
	    ];
	}
}


text:
<?php

use \FB;
use \My\Helper;

$app->post('/home/registrasi/', function () use ($app) {

            // check for required params
            Helper::verifyRequiredParams(array('nama', 'alamat','nohp','email', 'password'));

            $response = array();

            // reading post params
            $nama = $app->request->post('nama');
            $alamat = $app->request->post('alamat');
            $nohp = $app->request->post('nohp');
            $email = $app->request->post('email');
            $password = $app->request->post('password');

            // validating email address
            ValidasiModel::validasiEmail($email);

            $result = RegistrasiModel::membuatUser($nama, $alamat, $nohp, $email, $password);

            if ($result == USER_CREATED_SUCCESSFULLY) {

                $user = RegistrasiModel::getUserByEmail($email);

                 // use is found
                $response["error"] = FALSE;
                $response["uid"] = $user["konsumen_id"];
                $response["user"]["nama"] = $user["nama"];
                $response["user"]["alamat"] = $user["alamat"];
                $response["user"]["nohp"] = $user["nohp"];
                $response["user"]["email"] = $user["email"];
                $response["user"]["api_key"] = $user["api_key"];
                $response["user"]["status"] = $user["status"];
                $response["user"]["created_at"] = $user["created_at"];
                $response["user"]["updated_at"] = $user["updated_at"];

            } else if ($result == USER_CREATE_FAILED) {
                $response["error"] = true;
                $response["message"] = "Oops! An error occurred while registering";
            } else if ($result == USER_ALREADY_EXISTED) {
                $response["error"] = true;
                $response["message"] = "Sorry, this email already existed";
            }
            // echo json response
            Helper::echoRespnse(201, $response);
        });

$app->get('/home/registrasix/aktifasi/:id/', function ($id) use ($app) {

    $article = ArticleModel::getArticle($id);

    if(empty($article)){

        return Helper::response(false, array(), 'Article not found', 404);
    }

    return Helper::response(true, $article);
});

$app->get('/home/registrasi/aktifasi/:nama/(:token(/))', function () use ($app) {

    $args = func_get_args();

    $app->view()->set('nama', empty($args[0])?'':$args[0]);
    $app->view()->set('token', empty($args[1])?'':$args[1]);

    $app->render('aktifasi.php');
});

$app->get('/home/registrasi/aktifasi/:nama/:token/(:aktifkan(/))', function () use ($app) {

            $response = array();

            $args = func_get_args();

            $token = (empty($args[1])?'':$args[1]);

            $result = RegistrasiModel::aktifkanUser($token);

            if ($result) {

                $user = RegistrasiModel::getUserByToken($token);

                 // use is found
                $response["error"] = FALSE;
                $response["uid"] = $user["konsumen_id"];
                $response["user"]["nama"] = $user["nama"];
                $response["user"]["alamat"] = $user["alamat"];
                $response["user"]["nohp"] = $user["nohp"];
                $response["user"]["email"] = $user["email"];
                $response["user"]["api_key"] = $user["api_key"];
                $response["user"]["status"] = $user["status"];
                $response["user"]["created_at"] = $user["created_at"];
                $response["user"]["updated_at"] = $user["updated_at"];

            } else {
                $response["error"] = true;
                $response["message"] = "Sorry, failed to activate, please check your token";
            }
            // echo json response
            Helper::echoRespnse(201, $response);

});

$app->get('/home/registrasi/success/(:secret(/))', function () use ($app) {

    $args = func_get_args();

    $app->view()->set('secret', empty($args[0])?'':$args[0]);

    $app->render('aktifasi_sukses.php');
});


text:
<resources>
    <string name="app_name">TvWidget</string>
</resources>


text:
module.exports = function (input) {
  return input + this.getOptions().text;
};
module.exports.pitch = function (remaining, preceding, input) {
  console.log(`Remaining: ${remaining}, preceding: ${preceding}
Input: ${JSON.stringify(input, null, 2)}
  `);

  return "pitched";
};


text:
<component name="libraryTable">
  <library name="kotlinx-serialization-core" type="repository">
    <properties include-transitive-deps="false" maven-id="org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.4.0" />
    <CLASSES>
      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlinx/kotlinx-serialization-core-jvm/1.4.0/kotlinx-serialization-core-jvm-1.4.0.jar!/" />
    </CLASSES>
    <JAVADOC />
    <SOURCES>
      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlinx/kotlinx-serialization-core-jvm/1.4.0/kotlinx-serialization-core-jvm-1.4.0-sources.jar!/" />
    </SOURCES>
  </library>
</component>


text:
package org.onosproject.lisp.msg.types;

import io.netty.buffer.ByteBuf;
import org.onosproject.lisp.msg.exceptions.LispParseError;
import org.onosproject.lisp.msg.exceptions.LispReaderException;
import org.onosproject.lisp.msg.exceptions.LispWriterException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Objects;

import static com.google.common.base.MoreObjects.toStringHelper;
import static org.onosproject.lisp.msg.types.LispCanonicalAddressFormatEnum.*;

/**
 * LISP Canonical Address Formatted address class.
 *
 *

 * {@literal
 *  0                   1                   2                   3
 *  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 * |           AFI = 16387         |     Rsvd1     |     Flags     |
 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 * |    Type       |     Rsvd2     |            Length             |
 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 * }

 */
public class LispLcafAddress extends LispAfiAddress {

    private static final Logger log = LoggerFactory.getLogger(LispLcafAddress.class);

    private final LispCanonicalAddressFormatEnum lcafType;
    private final byte reserved1;
    private final byte reserved2;
    private final byte flag;
    private final short length;

    /**
     * Initializes LCAF address.
     *
     * @param lcafType LCAF type
     * @param reserved1 reserved1 field
     * @param reserved2 reserved2 field
     * @param flag flag field
     * @param length length field
     */
    protected LispLcafAddress(LispCanonicalAddressFormatEnum lcafType,
                              byte reserved1, byte reserved2, byte flag, short length) {
        super(AddressFamilyIdentifierEnum.LCAF);
        this.lcafType = lcafType;
        this.reserved1 = reserved1;
        this.reserved2 = reserved2;
        this.flag = flag;
        this.length = length;
    }

    /**
     * Initializes LCAF address.
     *
     * @param lcafType LCAF type
     * @param reserved2 reserved2 field
     * @param flag flag field
     * @param length length field
     */
    protected LispLcafAddress(LispCanonicalAddressFormatEnum lcafType,
                              byte reserved2, byte flag, short length) {
        super(AddressFamilyIdentifierEnum.LCAF);
        this.lcafType = lcafType;
        this.reserved2 = reserved2;
        this.flag = flag;
        this.length = length;
        this.reserved1 = 0;
    }

    /**
     * Initializes LCAF address.
     *
     * @param lcafType LCAF type
     * @param reserved2 reserved2 field
     * @param length length field
     */
    protected LispLcafAddress(LispCanonicalAddressFormatEnum lcafType,
                              byte reserved2, short length) {
        super(AddressFamilyIdentifierEnum.LCAF);
        this.lcafType = lcafType;
        this.reserved2 = reserved2;
        this.length = length;
        this.reserved1 = 0;
        this.flag = 0;
    }

    /**
     * Initializes LCAF address.
     *
     * @param lcafType LCAF type
     * @param reserved2 reserved2 field
     */
    protected LispLcafAddress(LispCanonicalAddressFormatEnum lcafType, byte reserved2) {
        super(AddressFamilyIdentifierEnum.LCAF);
        this.lcafType = lcafType;
        this.reserved2 = reserved2;
        this.reserved1 = 0;
        this.flag = 0;
        this.length = 0;
    }

    /**
     * Initializes LCAF address.
     *
     * @param lcafType LCAF type
     * @param length length field
     */
    protected LispLcafAddress(LispCanonicalAddressFormatEnum lcafType, short length) {
        super(AddressFamilyIdentifierEnum.LCAF);
        this.lcafType = lcafType;
        this.reserved1 = 0;
        this.reserved2 = 0;
        this.flag = 0;
        this.length = length;
    }

    /**
     * Initializes LCAF address.
     *
     * @param lcafType LCAF type
     */
    protected LispLcafAddress(LispCanonicalAddressFormatEnum lcafType) {
        super(AddressFamilyIdentifierEnum.LCAF);
        this.lcafType = lcafType;
        this.reserved1 = 0;
        this.reserved2 = 0;
        this.flag = 0;
        this.length = 0;
    }

    /**
     * Obtains LCAF type.
     *
     * @return LCAF type
     */
    public LispCanonicalAddressFormatEnum getType() {
        return lcafType;
    }

    /**
     * Obtains LCAF reserved1 value.
     *
     * @return LCAF reserved1 value
     */
    public byte getReserved1() {
        return reserved1;
    }

    /**
     * Obtains LCAF reserved2 value.
     *
     * @return LCAF reserved2 value
     */
    public byte getReserved2() {
        return reserved2;
    }

    /**
     * Obtains LCAF flag value.
     *
     * @return LCAF flag value
     */
    public byte getFlag() {
        return flag;
    }

    /**
     * Obtains LCAF length value.
     *
     * @return LCAF length value
     */
    public short getLength() {
        return length;
    }

    /**
     * Deserializes common fields from byte buffer.
     *
     * @param byteBuf byte buffer
     * @return LispLcafAddress with filled common data fields
     */
    public static LispLcafAddress deserializeCommon(ByteBuf byteBuf) {

        // reserved1 -> 8 bits
        byte reserved1 = (byte) byteBuf.readUnsignedByte();

        // flags -> 8 bits
        byte flag = (byte) byteBuf.readUnsignedByte();

        // LCAF type -> 8 bits
        byte lcafType = (byte) byteBuf.readUnsignedByte();

        // reserved2 -> 8bits
        byte reserved2 = (byte) byteBuf.readUnsignedByte();

        // length -> 16 bits
        short length = (short) byteBuf.readUnsignedShort();

        return new LispLcafAddress(LispCanonicalAddressFormatEnum.valueOf(lcafType),
                                    reserved1, reserved2, flag, length);
    }

    /**
     * Serializes common fields to byte buffer.
     *
     * @param byteBuf byte buffer
     * @param address LISP LCAF address instance
     */
    public static void serializeCommon(ByteBuf byteBuf, LispLcafAddress address) {
        byteBuf.writeByte(address.getReserved1());
        byteBuf.writeByte(address.getFlag());
        byteBuf.writeByte(address.getType().getLispCode());
        byteBuf.writeByte(address.getReserved2());
        byteBuf.writeShort(address.getLength());
    }

    @Override
    public int hashCode() {
        return Objects.hash(lcafType, reserved1, reserved2, flag, length);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }

        if (obj instanceof LispLcafAddress) {
            final LispLcafAddress other = (LispLcafAddress) obj;
            return Objects.equals(this.lcafType, other.lcafType) &&
                   Objects.equals(this.reserved1, other.reserved1) &&
                   Objects.equals(this.reserved2, other.reserved2) &&
                   Objects.equals(this.flag, other.flag) &&
                   Objects.equals(this.length, other.length);
        }
        return false;
    }

    @Override
    public String toString() {
        return toStringHelper(this)
                .add("lcafType", lcafType)
                .add("reserved1", reserved1)
                .add("reserved2", reserved2)
                .add("flag", flag)
                .add("length", length)
                .toString();
    }

    protected static class LcafAddressBuilder<T> {

        protected byte reserved1;
        protected byte flag;
        protected byte lcafType;
        protected byte reserved2;
        protected short length;

        /**
         * Sets reserved1 value.
         *
         * @param reserved1 reserved1 value
         * @return LcafAddressBuilder object
         */
        public T withReserved1(byte reserved1) {
            this.reserved1 = reserved1;
            return (T) this;
        }

        /**
         * Sets flag.
         *
         * @param flag flag boolean
         * @return LcafAddressBuilder object
         */
        public T withFlag(byte flag) {
            this.flag = flag;
            return (T) this;
        }

        /**
         * Sets LCAF type.
         *
         * @param lcafType LCAF type
         * @return LcafAddressBuilder object
         */
        public T withLcafType(byte lcafType) {
            this.lcafType = lcafType;
            return (T) this;
        }

        /**
         * Sets reserved2 value.
         *
         * @param reserved2 reserved2 value
         * @return LcafAddressBuilder object
         */
        public T withReserved2(byte reserved2) {
            this.reserved2 = reserved2;
            return (T) this;
        }

        /**
         * Sets length value.
         *
         * @param length length value
         * @return LcafAddressBuilder object
         */
        public T withLength(short length) {
            this.length = length;
            return (T) this;
        }

        /**
         * Builds LispLcafAddress object.
         *
         * @return LispLcafAddress instance
         */
        public LispLcafAddress build() {
            return new LispLcafAddress(LispCanonicalAddressFormatEnum.valueOf(lcafType),
                                        reserved1, reserved2, flag, length);
        }
    }

    /**
     * LISP LCAF reader class.
     */
    public static class LcafAddressReader implements LispAddressReader<LispLcafAddress> {

        private static final int LCAF_TYPE_FIELD_INDEX = 4;

        @Override
        public LispLcafAddress readFrom(ByteBuf byteBuf) throws LispParseError, LispReaderException {

            int index = byteBuf.readerIndex();

            // LCAF type -> 8 bits
            byte lcafType = (byte) byteBuf.getUnsignedByte(index + LCAF_TYPE_FIELD_INDEX);

            if (lcafType == APPLICATION_DATA.getLispCode()) {
                return new LispAppDataLcafAddress.AppDataLcafAddressReader().readFrom(byteBuf);
            }

            if (lcafType == LIST.getLispCode()) {
                return new LispListLcafAddress.ListLcafAddressReader().readFrom(byteBuf);
            }

            if (lcafType == SEGMENT.getLispCode()) {
                return new LispSegmentLcafAddress.SegmentLcafAddressReader().readFrom(byteBuf);
            }

            if (lcafType == SOURCE_DEST.getLispCode()) {
                return new LispSourceDestLcafAddress.SourceDestLcafAddressReader().readFrom(byteBuf);
            }

            log.warn("Unsupported LCAF type, please specify a correct LCAF type");

            return null;
        }
    }

    /**
     * LISP LCAF address writer class.
     */
    public static class LcafAddressWriter implements LispAddressWriter<LispLcafAddress> {

        @Override
        public void writeTo(ByteBuf byteBuf, LispLcafAddress address) throws LispWriterException {
            switch (address.getType()) {
                case APPLICATION_DATA:
                    new LispAppDataLcafAddress.AppDataLcafAddressWriter().writeTo(byteBuf,
                            (LispAppDataLcafAddress) address);
                    break;
                case LIST:
                    new LispListLcafAddress.ListLcafAddressWriter().writeTo(byteBuf,
                            (LispListLcafAddress) address);
                    break;
                case SEGMENT:
                    new LispSegmentLcafAddress.SegmentLcafAddressWriter().writeTo(byteBuf,
                            (LispSegmentLcafAddress) address);
                    break;
                case SOURCE_DEST:
                    new LispSourceDestLcafAddress.SourceDestLcafAddressWriter().writeTo(byteBuf,
                            (LispSourceDestLcafAddress) address);
                    break;
                default:
                    log.warn("Unsupported LCAF type, please specify a correct LCAF type");
                    break;
            }
        }
    }
}


text:
<component
	id="Accordion"
	title="Accordion 2.0"
	tooltip="Accordion - Dynamic List of Entries"
	icon="res/Accordion/Accordion.png"
	handlerType="sapui5"
	propertySheetPath="res/Accordion/aps/PropertyPage.html"
	group="ScnCommunityBasics"
	databound="false"
>

	<jsInclude>res/require_loader.js</jsInclude>
	<jsInclude>res/Accordion/AccordionLoader.js</jsInclude>
	<cssInclude>res/Accordion/Accordion.css</cssInclude>

	<property
		id="cleanAll"
		type="boolean"
		title="Clean All Nodes"
		group="Display"
		bindable="true"
		visible="false">

	</property>
	<property
		id="defaultImage"
		type="Url"
		title="Default Image"
		group="Display"
		bindable="true"
		visible="true">

	</property>
	<property
		id="elementsContent"
		type="String"
		title="Elements"
		group="Display"
		bindable="true"
		visible="true">

	</property>
	<property
		id="expandedKey"
		type="String"
		title="Expaned Key"
		group="Display"
		bindable="true"
		visible="false">

	</property>
	<property
		id="imageSize"
		type="String"
		title="Size of the Image"
		group="Display"
		bindable="true"
		visible="true">

	</property>
	<property
		id="maxSectionHeight"
		type="int"
		title="Max Height for Section"
		group="Display"
		bindable="true"
		visible="true">

	</property>
	<property
		id="memberDisplay"
		type="String"
		title="Member Display"
		group="Display"
		bindable="true"
		visible="true">

	</property>
	<property
		id="onFirstExpand"
		type="ScriptText"
		title="On First Expand"
		group="Events"
		visible="true">

	</property>
	<property
		id="onSelectionChanged"
		type="ScriptText"
		title="On Selection Changed"
		group="Events"
		visible="true">

	</property>
	<property
		id="selectedKey"
		type="String"
		title="Selected Key"
		group="Display"
		bindable="true"
		visible="false">

	</property>
	<property
		id="supportedContentNotation"
		type="String"
		title="Supported Content Notation"
		group="Display"
		bindable="true"
		visible="false">

	</property>
	<property
		id="withImage"
		type="boolean"
		title="Use Images"
		group="Display"
		bindable="true"
		visible="true">

	</property>

	<initialization>
		<defaultValue property="TOP_MARGIN">0</defaultValue>
		<defaultValue property="BOTTOM_MARGIN">auto</defaultValue>
		<defaultValue property="LEFT_MARGIN">0</defaultValue>
		<defaultValue property="RIGHT_MARGIN">auto</defaultValue>
		<defaultValue property="WIDTH">260</defaultValue>
		<defaultValue property="HEIGHT">600</defaultValue>

		<defaultValue property="cleanAll"><![CDATA[false]]></defaultValue>
		<defaultValue property="defaultImage"><![CDATA[]]></defaultValue>
		<defaultValue property="elementsContent"><![CDATA[[{"parentKey":"ROOT","key":"SECTION1","leaf":false,"text":"First Section"},{"parentKey":"ROOT","key":"SECTION2","leaf":false,"text":"Second Section"},{"parentKey":"ROOT","key":"SECTION3","leaf":false,"text":"Third Section"},{"parentKey":"SECTION1","key":"SECTION1_ITEM","leaf":true,"text":"Item 1"},{"parentKey":"SECTION1","key":"SECTION1_ITEM1","leaf":true,"text":"Item 2"},{"parentKey":"SECTION2","key":"SECTION2_ITEM","leaf":true,"text":"Item 2/1"},{"parentKey":"SECTION2","key":"SECTION2_ITEM1","leaf":true,"text":"Item 2/2"},{"parentKey":"SECTION2","key":"SECTION2_ITEM2","leaf":true,"text":"Item 2/3"},{"parentKey":"SECTION3","key":"SECTION3_ITEM","leaf":true,"text":"Item 3/1"}]]]></defaultValue>
		<defaultValue property="expandedKey"><![CDATA[]]></defaultValue>
		<defaultValue property="imageSize"><![CDATA[Size_16px]]></defaultValue>
		<defaultValue property="maxSectionHeight"><![CDATA[200]]></defaultValue>
		<defaultValue property="memberDisplay"><![CDATA[Text]]></defaultValue>
		<defaultValue property="onFirstExpand"><![CDATA[]]></defaultValue>
		<defaultValue property="onSelectionChanged"><![CDATA[]]></defaultValue>
		<defaultValue property="selectedKey"><![CDATA[]]></defaultValue>
		<defaultValue property="supportedContentNotation"><![CDATA[PARENT_CHILD_TEXT_URL]]></defaultValue>
		<defaultValue property="withImage"><![CDATA[true]]></defaultValue>

	</initialization>

</component>


text:
define({
  "_widgetLabel": "Norādes",
  "_featureAction_DirectionFrom": "Virzieni no šejienes",
  "_featureAction_DirectionTo": "Virzieni uz šejieni",
  "_featureAction_OpenInDirections": "Atvērt norāžu sadaļā",
  "_featureAction_OpenRoute": "Atvērt maršrutu",
  "_featureAction_EditRoute": "Labot maršrutu",
  "searchPlaceholder": "Atrast adresi vai vietu"
});


text:
package TAPLcomp.rcdsubbot

import scala.util.parsing.combinator.{ImplicitConversions, PackratParsers}
import scala.util.parsing.combinator.syntactical.StandardTokenParsers

sealed trait Ty

case object TyTop extends Ty

case object TyBot extends Ty

case class TyArr(t1: Ty, t2: Ty) extends Ty

case class TyRecord(els: List[(String, Ty)]) extends Ty

sealed trait Term

case class TmVar(i: String) extends Term

case class TmAbs(v: String, ty: Ty, t: Term) extends Term

case class TmApp(t1: Term, t2: Term) extends Term

case class TmRecord(fields: List[(String, Term)]) extends Term

case class TmProj(t: Term, proj: String) extends Term

object RcdSubBotParsers extends StandardTokenParsers with PackratParsers with ImplicitConversions {
  lexical.reserved += ("Bool", "true", "false", "if", "then", "else",
    "Nat", "String", "Unit", "Float", "unit", "case", "let", "in", "succ", "pred",
    "as", "of", "fix", "iszero", "Top", "Bot")
  lexical.delimiters += ("\\", "(", ")", ";", "/", ".", ":", "->", "=", "<", ">", "{", "}", "=>", "==>", ",", "|")

  // lower-case identifier
  lazy val lcid: PackratParser[String] = ident ^? { case id if id.charAt(0).isLower => id }
  // upper-case identifier
  lazy val ucid: PackratParser[String] = ident ^? { case id if id.charAt(0).isUpper => id }

  lazy val `type`: PackratParser[Ty] = arrowType
  lazy val aType: PackratParser[Ty] =
    "(" ~> `type` <~ ")" |
      "Bot" ^^ { _ => TyBot } |
      "Top" ^^ { _ => TyTop } |
      "{" ~> fieldTypes <~ "}" ^^ { ft => TyRecord(ft) }

  lazy val fieldTypes: PackratParser[List[(String, Ty)]] =
    repsep(fieldType, ",")

  lazy val fieldType: PackratParser[(String, Ty)] =
    lcid ~ (":" ~> `type`) ^^ { case id ~ ty => (id, ty) }

  lazy val arrowType: PackratParser[Ty] =
    (aType <~ "->") ~ arrowType ^^ { case t1 ~ t2 => TyArr(t1, t2) } |
      aType

  // TERMS
  lazy val term: PackratParser[Term] =
  appTerm |
    ("\\" ~> lcid) ~ (":" ~> `type`) ~ ("." ~> term) ^^ { case v ~ ty ~ t => TmAbs(v, ty, t) }
  lazy val appTerm: PackratParser[Term] =
    appTerm ~ pathTerm ^^ { case t1 ~ t2 => TmApp(t1, t2) } |
      pathTerm

  lazy val pathTerm: PackratParser[Term] =
    pathTerm ~ ("." ~> lcid) ^^ { case t1 ~ l => TmProj(t1, l) } |
      pathTerm ~ ("." ~> numericLit) ^^ { case t1 ~ l => TmProj(t1, l) } |
      aTerm

  lazy val aTerm: PackratParser[Term] =
    "(" ~> term <~ ")" |
      lcid ^^ { i => TmVar(i) } |
      "{" ~> fields <~ "}" ^^ { fs => TmRecord(fs) }

  lazy val fields: PackratParser[List[(String, Term)]] =
    repsep(field, ",")
  lazy val field: PackratParser[(String, Term)] =
    lcid ~ ("=" ~> term) ^^ { case id ~ t => (id, t) }

  def input(s: String) = phrase(term)(new lexical.Scanner(s)) match {
    case t if t.successful => t.get
    case t => sys.error(t.toString)
  }

}


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using UnityEditor;
using UnityEngine;
using UnityEngine.Assertions;

namespace Devdog.General.Editors.ReflectionDrawers
{
    public abstract class DrawerBase : IEquatable<DrawerBase>
    {
        public object value { get; set; }
        public bool boolValue { get { return (bool) value; } }
        public float floatValue { get { return (float)value; } }
        public int intValue { get { return (int)value; } }
        public uint uintValue { get { return (uint)value; } }
        public string stringValue { get { return (string)value; } }
        public UnityEngine.Object unityObjectValue { get { return (UnityEngine.Object) value; } }

        public object parentValue { get; protected set; }
        public FieldInfo fieldInfo { get; protected set; }
        public virtual bool isEmpty
        {
            get { return value == null || value.Equals(null); }
        }

        public bool hideInProperties { get; protected set; }
        public bool readOnly { get; protected set; }
        public bool required { get; set; }

        public HeaderAttribute headerAttribute { get; protected set; }
        public HideGroupAttribute hideGroupAttribute { get; protected set; }
        public OnlyDerivedTypesAttribute onlyDerivedTypesAttribute { get; protected set; }

        public bool hideGroup
        {
            get
            {
                if (hideGroupAttribute == null)
                {
                    return false;
                }

                if (isInArray)
                {
                    return hideGroupAttribute.includeArrayChildren;
                }

                return true;
            }
        }

        public virtual GUIContent overrideFieldName { get; set; }
        public virtual GUIContent fieldName
        {
            get
            {
                if (overrideFieldName != null)
                {
                    return overrideFieldName;
                }

                string lengthText = "";
                var arr = value as Array;
                if (arr != null)
                {
                    lengthText = " : " + arr.Length;
                }

                if (isInArray)
                {
                    return new GUIContent("Element " + arrayIndex);
                }

                if (fieldInfo == null)
                {
                    return new GUIContent(UnityEditor.ObjectNames.NicifyVariableName(value.GetType().Name) + lengthText);
                }

                return new GUIContent(UnityEditor.ObjectNames.NicifyVariableName(fieldInfo.Name) + lengthText);
            }
        }

        public bool isInArray
        {
            get { return arrayIndex >= 0; }
        }
        public int arrayIndex { get; protected set; }

        protected DrawerBase(FieldInfo fieldInfo, object value, object parentValue, int arrayIndex)
        {
            this.fieldInfo = fieldInfo;
            this.value = value;
            this.parentValue = parentValue;
            this.arrayIndex = arrayIndex;

            if (fieldInfo != null)
            {
                // Faster than fieldInfo.GetCustomAttributes(type, true), as it creates a LOT of GC
                var customAttributes = fieldInfo.GetCustomAttributes(true);

                hideInProperties = customAttributes.Any(o => o.GetType() == typeof (HideInPropertiesAttribute));
                readOnly = customAttributes.Any(o => o.GetType() == typeof(InspectorReadOnlyAttribute));
                required = customAttributes.Any(o => o.GetType() == typeof(RequiredAttribute));
                headerAttribute = (HeaderAttribute)customAttributes.FirstOrDefault(o => o.GetType() == typeof(HeaderAttribute));
                hideGroupAttribute = (HideGroupAttribute)customAttributes.FirstOrDefault(o => o.GetType() == typeof(HideGroupAttribute));
                onlyDerivedTypesAttribute = (OnlyDerivedTypesAttribute)customAttributes.FirstOrDefault(o => o.GetType() == typeof(OnlyDerivedTypesAttribute));
            }
        }

        public static bool operator ==(DrawerBase left, DrawerBase right)
        {
            return Equals(left, right);
        }

        public static bool operator !=(DrawerBase left, DrawerBase right)
        {
            return !Equals(left, right);
        }

        public void RefreshValue()
        {
            if (parentValue != null)
            {
                if (isInArray)
                {
                    var a = (Array)parentValue;
                    value = a.GetValue(arrayIndex);
                }
                else
                {
                    value = fieldInfo.GetValue(parentValue);
                }

                NotifyValueChanged(value);
            }
        }

        public string GetFieldTypeName(bool getLowestType)
        {
            var fieldType = GetFieldType(getLowestType);
            if (fieldType.IsGenericType)
            {
                if (isInArray)
                {
                    var arr = (Array)parentValue;
                    var v = arr.GetValue(arrayIndex);

                    // Couldn't determine type, going with array's type.
                    if (v == null || getLowestType)
                    {
                        return ReflectionDrawerUtility.GetGenericTypeNiceName(fieldType);
                    }

                    if (v.GetType().IsGenericType)
                    {
                        return ReflectionDrawerUtility.GetGenericTypeNiceName(v.GetType());
                    }

                    return v.GetType().Name;
                }

                return ReflectionDrawerUtility.GetGenericTypeNiceName(fieldType);
            }

            return fieldType.Name;
        }

        public Type GetFieldType(bool getLowestType)
        {
            if (isInArray)
            {
                var arr = (Array)parentValue;
                var v = arr.GetValue(arrayIndex);

                // Couldn't determine type, going with array's type.
                if (v == null || getLowestType)
                {
                    return fieldInfo.FieldType.GetElementType();
                }

                return v.GetType();
            }

//            if (onlyDerivedTypesAttribute != null)
//            {
//                return onlyDerivedTypesAttribute.type;
//            }

            if ((getLowestType || value == null) && fieldInfo != null)
            {
                return fieldInfo.FieldType;
            }

            return value.GetType();
        }

        protected Rect GetSingleLineHeightRect(Rect rect)
        {
            rect.height = EditorGUIUtility.singleLineHeight;
            rect.y += (ReflectionDrawerStyles.singleLineHeight - rect.height) / 2;

            return rect;
        }

        protected int GetExtraHeight()
        {
            if (headerAttribute != null && isInArray == false)
            {
                return ReflectionDrawerStyles.headerSize;
            }

            return 0;
        }

        public int GetHeight()
        {
            return GetHeightInternal() + GetExtraHeight();
        }

        protected abstract int GetHeightInternal();

        public void Draw(ref Rect rect)
        {
            GUIDisabledBlock block = null;
            if (readOnly)
            {
                block = new GUIDisabledBlock();
            }
            else
            {
                EditorGUI.BeginChangeCheck();
            }

            if (headerAttribute != null && isInArray == false)
            {
                GUI.color = new Color(1, 1, 1, 0.85f);

                rect.y += 12;
                EditorGUI.LabelField(rect, headerAttribute.header, UnityEditor.EditorStyles.boldLabel);
                rect.y += ReflectionDrawerStyles.headerSize - 12;

                GUI.color = Color.white;
            }

            if (required && isEmpty)
            {
                GUI.color = Color.red;
            }

            var val = DrawInternal(rect);
            rect.y += GetHeightInternal();

            GUI.color = Color.white;

            if (readOnly && block != null)
            {
                block.Dispose();
            }
            else
            {
                if (EditorGUI.EndChangeCheck())
                {
                    NotifyValueChanged(val);
                }
            }
        }

        protected abstract object DrawInternal(Rect rect);
        public abstract DrawerBase FindDrawerRelative(string fieldName);

        public virtual void NotifyValueChanged(object newValue)
        {
            if (isInArray)
            {
                var arr = (Array) parentValue;
                arr.SetValue(newValue, arrayIndex);
            }
            else
            {
                if (fieldInfo != null)
                {
                    fieldInfo.SetValue(parentValue, newValue);
                }
            }

            GUI.changed = true;
            this.value = newValue;
        }

        public bool Equals(DrawerBase other)
        {
            if (other == null)
            {
                return false;
            }

            return ReferenceEquals(this.value, other.value) && this.arrayIndex == other.arrayIndex;
        }

        public override bool Equals(object obj)
        {
            return Equals(obj as DrawerBase);
        }

        public override int GetHashCode()
        {
            unchecked
            {
                return ((fieldInfo != null ? fieldInfo.GetHashCode() : 0) * 397) ^ arrayIndex;
            }
        }
    }
}


text:
#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H
#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H

#include "common-hal/microcontroller/Pin.h"

#include "py/obj.h"

typedef struct {
    mp_obj_base_t base;
    uint8_t pin_a;
    uint8_t pin_b;
    uint8_t eic_channel_a:4;
    uint8_t eic_channel_b:4;
    uint8_t last_state:4;   // <old A><old B><new A><new B>
    int8_t quarter_count:4; // count intermediate transitions between detents
    mp_int_t position;
} rotaryio_incrementalencoder_obj_t;

void incrementalencoder_interrupt_handler(uint8_t channel);

#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:padding="10dp"
    >

 <TextView android:id="@+id/txtAddress"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceSmall"

                android:fontFamily="sans-serif-light"
           />

        <TextView android:id="@+id/txtStatus"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
             android:textAppearance="?android:attr/textAppearanceMedium"

                android:fontFamily="sans-serif-light"
             />

            <TextView android:id="@+id/labelFingerprintRemote"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dip"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:text="@string/label_fingerprint_remote"

                android:fontFamily="sans-serif-light"
             />

        <TextView android:id="@+id/txtFingerprintRemote"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
                        android:textStyle="bold"

                        android:textAppearance="?android:attr/textAppearanceMedium"
            android:padding="6dp"
                android:fontFamily="sans-serif-light"
             />

        	    <!--

        <TextView android:id="@+id/labelFingerprintActions"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dip"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:text="@string/verify_key_"

                android:fontFamily="sans-serif-light"
             />

        	<LinearLayout
        	    android:layout_width="match_parent"
        	    android:layout_height="wrap_content"
        	    android:layout_gravity="bottom"
        	    android:orientation="horizontal"
        	    android:padding="3dp" >

        <Button
        	    android:id="@+id/btnVerifyManual"
        	    android:layout_height="wrap_content"
        	    android:layout_width="wrap_content"

        	    android:text="@string/menu_verify_fingerprint" />

        	<Button
        	    android:id="@+id/btnVerifyScan"
        	    android:layout_height="wrap_content"
        	    android:layout_width="wrap_content"

        	    android:text="@string/menu_scan" />

        		<Button
        		    android:id="@+id/btnVerifyQuestion"
        		    android:layout_height="wrap_content"
        	    android:layout_width="wrap_content"

        		    android:text="@string/menu_verify_secret" />

        </LinearLayout>
        		-->

    </LinearLayout>


text:
// Test includes
var fs = require('fs');
var path = require('path');
var sinon = require('sinon');
var util = require('util');
var _ = require('underscore');

var keyFiles = require('../../lib/util/keyFiles');
var utils = require('../../lib/util/utils');

var executeCommand = require('./cli-executor').execute;
var nockHelper = require('./nock-helper');

exports = module.exports = CLITest;

function CLITest(testPrefix, forceMocked) {
  this.testPrefix = testPrefix;
  this.currentTest = 0;
  this.recordingsFile = __dirname + '/../recordings/' + this.testPrefix + '.nock.js';

  if (forceMocked) {
    this.isMocked = true;
  } else {
    this.isMocked = testPrefix && !process.env.NOCK_OFF;
  }

  this.isRecording = process.env.AZURE_NOCK_RECORD;
}

_.extend(CLITest.prototype, {
  setupSuite: function (callback) {
    if (this.isMocked) {
      process.env.AZURE_ENABLE_STRICT_SSL = false;

      sinon.stub(keyFiles, 'readFromFile', function () {
        return {
          cert: process.env.AZURE_CERTIFICATE,
          key: process.env.AZURE_CERTIFICATE_KEY
        };
      });

      sinon.stub(keyFiles, 'writeToFile', function () {});

      var originalReadFileSync = fs.readFileSync;
      sinon.stub(fs, 'readFileSync', function (filename) {
        if (path.basename(filename) !== 'config.json') {
          return originalReadFileSync(filename, 'utf8');
        } else {
          return '{ "endpoint": "https://management.core.windows.net",' +
            ' "subscription": "' + process.env.AZURE_SUBSCRIPTION_ID + '" }';
        }
      });

      var originalPathExistsSync = utils.pathExistsSync;
      sinon.stub(utils, 'pathExistsSync', function (filename) {
        if (path.basename(filename) === 'config.json') {
          return true;
        }

        return originalPathExistsSync(filename);
      });

      if (this.isRecording) {
        fs.writeFileSync(this.recordingsFile,
          '// This file has been autogenerated.\n\n' +
          'exports.scopes = [');
      }
    }

    // Remove any existing cache files before starting the test
    this.removeCacheFiles();

    callback();
  },

  teardownSuite: function (callback) {
    this.currentTest = 0;

    if (this.isMocked) {
      if (this.isRecording) {
        fs.appendFileSync(this.recordingsFile, '];');
      }

      keyFiles.readFromFile.restore();
      keyFiles.writeToFile.restore();

      if (fs.readFileSync.restore) {
        fs.readFileSync.restore();
      }

      if (utils.pathExistsSync.restore) {
        utils.pathExistsSync.restore();
      }

      delete process.env.AZURE_ENABLE_STRICT_SSL;
    }

    callback();
  },

  removeCacheFiles: function () {
    var sitesCachePath = path.join(utils.azureDir(), util.format('sites.%s.json', process.env.AZURE_SUBSCRIPTION_ID));
    if (utils.pathExistsSync(sitesCachePath)) {
      fs.unlinkSync(sitesCachePath);
    }

    var spacesCachePath = path.join(utils.azureDir(), util.format('spaces.%s.json', process.env.AZURE_SUBSCRIPTION_ID));
    if (utils.pathExistsSync(spacesCachePath)) {
      fs.unlinkSync(spacesCachePath);
    }

    var environmentsPath = path.join(utils.azureDir(), 'environment.json');
    if (utils.pathExistsSync(environmentsPath)) {
      fs.unlinkSync(environmentsPath);
    }
  },

  execute: function (cmd) {
    if (!_.isString(cmd) && !_.isArray(cmd)) {
      throw new Error('First argument needs to be a string or array with the command to execute');
    }

    var args = Array.prototype.slice.call(arguments);

    if (args.length < 2 || !_.isFunction(args[args.length - 1])) {
      throw new Error('Callback needs to be passed as last argument');
    }

    var callback = args[args.length - 1];

    if (_.isString(cmd)) {
      cmd = cmd.split(' ');

      var rep = 1;
      for (var i = 0; i < cmd.length; i++) {
        if (cmd[i] === '%s') {
          cmd[i] = args[rep++];
        }
      }
    }

    if (cmd[0] !== 'node') {
      cmd.unshift('cli.js');
      cmd.unshift('node');
    }

    if (!this.skipSubscription && this.isMocked && !this.isRecording) {
      cmd.push('-s');
      cmd.push(process.env.AZURE_SUBSCRIPTION_ID);
    }

    executeCommand(cmd, callback);
  },

  setupTest: function (callback) {
    nockHelper.nockHttp();

    if (this.isMocked && this.isRecording) {
      // nock recoding
      nockHelper.nock.recorder.rec(true);
    } else if (this.isMocked) {
      // nock playback
      var nocked = require(this.recordingsFile);

      if (this.currentTest < nocked.scopes.length) {
        nocked.scopes[this.currentTest++].forEach(function (createScopeFunc) {
          createScopeFunc(nockHelper.nock);
        });
      } else {
        throw new Error('It appears the ' + this.recordingsFile + ' file has more tests than there are mocked tests. ' +
          'You may need to re-generate it.');
      }
    }

    callback();
  },

  teardownTest: function (callback) {
    if (this.isMocked && this.isRecording) {
      // play nock recording
      var scope = this.scopeWritten ? ',\n[' : '[';
      this.scopeWritten = true;
      var lineWritten;
      nockHelper.nock.recorder.play().forEach(function (line) {
        if (line.indexOf('nock') >= 0) {
          // apply fixups of nock generated mocks

          // do not filter on body as they usual have time related stamps
          line = line.replace(/(\.post\('.*')[^\)]+\)/, '.filteringRequestBody(function (path) { return \'*\';})\n$1, \'*\')');
          line = line.replace(/(\.get\('.*')[^\)]+\)/, '.filteringRequestBody(function (path) { return \'*\';})\n$1, \'*\')');
          line = line.replace(/(\.put\('.*')[^\)]+\)/, '.filteringRequestBody(function (path) { return \'*\';})\n$1, \'*\')');
          line = line.replace(/(\.delete\('.*')[^\)]+\)/, '.filteringRequestBody(function (path) { return \'*\';})\n$1, \'*\')');
          line = line.replace(/(\.merge\('.*')[^\)]+\)/, '.filteringRequestBody(function (path) { return \'*\';})\n$1, \'*\')');
          line = line.replace(/(\.patch\('.*')[^\)]+\)/, '.filteringRequestBody(function (path) { return \'*\';})\n$1, \'*\')');

          scope += (lineWritten ? ',\n' : '') + 'function (nock) { \n' +
            'var result = ' + line + ' return result; }';
          lineWritten = true;
        }
      });
      scope += ']';
      fs.appendFileSync(this.recordingsFile, scope);
      nockHelper.nock.recorder.clear();
    }

    nockHelper.unNockHttp();

    callback();
  },

  /**
  * Generates an unique identifier using a prefix, based on a currentList and repeatable or not depending on the isMocked flag.
  *
  * @param {string} prefix          The prefix to use in the identifier.
  * @param {array}  currentList     The current list of identifiers.
  * @param {bool}   isMocked        Boolean flag indicating if the test is mocked or not.
  * @return {string} A new unique identifier.
  */
  generateId: function (prefix, currentList) {
    if (!currentList) {
      currentList = [];
    }

    while (true) {
      var newNumber;
      if (this.isMocked) {
        // Predictable
        newNumber = prefix + (currentList.length + 1);
        currentList.push(newNumber);

        return newNumber;
      } else {
        // Random
        newNumber = prefix + Math.floor(Math.random() * 10000);
        if (currentList.indexOf(newNumber) === -1) {
          currentList.push(newNumber);

          return newNumber;
        }
      }
    }
  }
});


text:
from __future__ import absolute_import, print_function, unicode_literals

from kolibri.core.webpack import hooks as webpack_hooks
from kolibri.plugins.base import KolibriPluginBase

from . import hooks, urls

class LearnPlugin(KolibriPluginBase):
    def url_module(self):
        return urls

    def url_slug(self):
        return "^learn/"

class LearnAsset(webpack_hooks.WebpackBundleHook):
    unique_slug = "learn_module"
    src_file = "assets/src/app.js"

class LearnInclusionHook(hooks.LearnSyncHook):
    bundle_class = LearnAsset


text:
<?php

namespace Phalcon\Assets\Resource;

use Phalcon\Assets\Resource as ResourceBase;

class Js extends ResourceBase
{

	/**
	 * Phalcon\Assets\Resource\Js
	 *
	 * @param string $path
	 * @param boolean $local
	 * @param boolean $filter
	 * @param array $attributes
	 *
	 */
	public function __construct($path, $local=true, $filter=true, $attributes=null) {}

}


text:
// Copyright (C) 2020 The Android Open Source Project
//
// 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 com.google.gerrit.acceptance.testsuite.change;

import com.google.auto.value.AutoValue;
import com.google.gerrit.entities.PatchSet;
import org.eclipse.jgit.lib.ObjectId;

/** Representation of a patchset used for testing purposes. */
@AutoValue
public abstract class TestPatchset {

  /** The numeric patchset ID. */
  public abstract PatchSet.Id patchsetId();

  /** The commit SHA-1 of the patchset. */
  public abstract ObjectId commitId();

  static Builder builder() {
    return new AutoValue_TestPatchset.Builder();
  }

  @AutoValue.Builder
  abstract static class Builder {
    abstract Builder patchsetId(PatchSet.Id patchsetId);

    abstract Builder commitId(ObjectId commitId);

    abstract TestPatchset build();
  }
}