text:
using System;
using QuantConnect.Orders;
using QuantConnect.Securities;
using QuantConnect.Securities.Interfaces;

namespace QuantConnect.Brokerages
{
    /// <summary>
    /// Oanda Brokerage Model Implementation for Back Testing.
    /// </summary>
    public class OandaBrokerageModel : DefaultBrokerageModel
    {
        /// <summary>
        /// Returns true if the brokerage could accept this order. This takes into account
        /// order type, security type, and order size limits.
        /// </summary>
        /// <remarks>
        /// For example, a brokerage may have no connectivity at certain times, or an order rate/size limit
        /// </remarks>
        /// <param name="security"></param>
        /// <param name="order">The order to be processed</param>
        /// <param name="message">If this function returns false, a brokerage message detailing why the order may not be submitted</param>
        /// <returns>True if the brokerage could process the order, false otherwise</returns>
        public override bool CanSubmitOrder(Security security, Order order, out BrokerageMessageEvent message)
        {
            message = null;

            // validate security type
            if (security.Type != SecurityType.Forex && security.Type != SecurityType.Cfd)
            {
                message = new BrokerageMessageEvent(BrokerageMessageType.Warning, "NotSupported",
                    "This model does not support " + security.Type + " security type."
                    );

                return false;
            }

            // validate order type
            if (order.Type != OrderType.Limit && order.Type != OrderType.Market && order.Type != OrderType.StopMarket)
            {
                message = new BrokerageMessageEvent(BrokerageMessageType.Warning, "NotSupported",
                    "This model does not support " + order.Type + " order type."
                    );

                return false;
            }

            return true;
        }

        /// <summary>
        /// Returns true if the brokerage would be able to execute this order at this time assuming
        /// market prices are sufficient for the fill to take place. This is used to emulate the
        /// brokerage fills in backtesting and paper trading. For example some brokerages may not perform
        /// executions during extended market hours. This is not intended to be checking whether or not
        /// the exchange is open, that is handled in the Security.Exchange property.
        /// </summary>
        /// <param name="security">The security being traded</param>
        /// <param name="order">The order to test for execution</param>
        /// <returns>True if the brokerage would be able to perform the execution, false otherwise</returns>
        public override bool CanExecuteOrder(Security security, Order order)
        {
            return order.DurationValue == DateTime.MaxValue || order.DurationValue <= order.Time.AddMonths(3);
        }

        /// <summary>
        /// Gets a new transaction model that represents this brokerage's fee structure and fill behavior
        /// </summary>
        /// <param name="security">The security to get a transaction model for</param>
        /// <returns>The transaction model for this brokerage</returns>
        public override ISecurityTransactionModel GetTransactionModel(Security security)
        {
            switch (security.Type)
            {
                case SecurityType.Forex:
                    return new OandaTransactionModel();

                case SecurityType.Cfd:
                default:
                    // use the default model, it's ok if we subscribe to data for this security, but the CanSubmitOrder will block it
                    return new SecurityTransactionModel();
            }
        }
    }
}


text:
<?php
include(__DIR__.'/../vendor/autoload.php');
use Nikoms\PhpUnitSplitter\Splitter;

Splitter::on(
    Splitter::BEFORE_SPLIT,
    function () {
        // Do something before creating groups.
        // NB: It only happen on one random process. Do not create constant here
    }
);

Splitter::on(
    Splitter::AFTER_SPLIT,
    function () {
        // Do something when all groups are set
        // NB: It only happen on one random process. Do not create constant here
    }
);

Splitter::on(
    Splitter::BEFORE_RUN,
    function () {
        // Before running one group. Ex: Creating DB, storing a constant with "define", etc...
    }
);
Splitter::on(
    Splitter::AFTER_RUN,
    function () {
        // After running one group. Ex: dropping DB
    }
);

redpajama_set_name: RedPajamaGithub


text:
layout: default
title: Pygments Lexers
---

Result of running

```
~/.rvm/gems/ruby-2.1.5/gems/pygments.rb-0.6.1/vendor/pygments-main/pygmentize -L > page/pygments-formats.md
```
Pygments version 2.0pre, (c) 2006-2014 by Georg Brandl.

### Lexers

* DASM16:    dasm16 (filenames *.dasm16, *.dasm)
* abap:    ABAP (filenames *.abap)
* ada, ada95ada2005:    Ada (filenames *.adb, *.ads, *.ada)
* agda:    Agda (filenames *.agda)
* ahk, autohotkey:    autohotkey (filenames *.ahk, *.ahkl)
* alloy:    Alloy (filenames *.als)
* antlr-as, antlr-actionscript:    ANTLR With ActionScript Target (filenames *.G, *.g)
* antlr-cpp:    ANTLR With CPP Target (filenames *.G, *.g)
* antlr-csharp, antlr-c#:    ANTLR With C# Target (filenames *.G, *.g)
* antlr-java:    ANTLR With Java Target (filenames *.G, *.g)
* antlr-objc:    ANTLR With ObjectiveC Target (filenames *.G, *.g)
* antlr-perl:    ANTLR With Perl Target (filenames *.G, *.g)
* antlr-python:    ANTLR With Python Target (filenames *.G, *.g)
* antlr-ruby, antlr-rb:    ANTLR With Ruby Target (filenames *.G, *.g)
* antlr:    ANTLR
* apacheconf, aconf, apache:    ApacheConf (filenames .htaccess, apache.conf, apache2.conf)
* apl:    APL (filenames *.apl)
* applescript:    AppleScript (filenames *.applescript)
* as, actionscript:    ActionScript (filenames *.as)
* as3, actionscript3:    ActionScript 3 (filenames *.as)
* aspectj:    AspectJ (filenames *.aj)
* aspx-cs:    aspx-cs (filenames *.aspx, *.asax, *.ascx, *.ashx, *.asmx, *.axd)
* aspx-vb:    aspx-vb (filenames *.aspx, *.asax, *.ascx, *.ashx, *.asmx, *.axd)
* asy, asymptote:    Asymptote (filenames *.asy)
* at, ambienttalk, ambienttalk/2:    AmbientTalk (filenames *.at)
* augeas:    Augeas (filenames *.aug)
* autoit:    AutoIt (filenames *.au3)
* awk, gawk, mawk, nawk:    Awk (filenames *.awk)
* basemake:    Base Makefile
* bash, sh, ksh:    Bash (filenames *.sh, *.ksh, *.bash, *.ebuild, *.eclass, .bashrc, bashrc, .bash_*, bash_*, PKGBUILD)
* bat, batch, dosbatch, winbatch:    Batchfile (filenames *.bat, *.cmd)
* bbcode:    BBCode
* befunge:    Befunge (filenames *.befunge)
* blitzbasic, b3d, bplus:    BlitzBasic (filenames *.bb, *.decls)
* blitzmax, bmax:    BlitzMax (filenames *.bmx)
* boo:    Boo (filenames *.boo)
* brainfuck, bf:    Brainfuck (filenames *.bf, *.b)
* bro:    Bro (filenames *.bro)
* bugs, winbugs, openbugs:    BUGS (filenames *.bug)
* c-objdump:    c-objdump (filenames *.c-objdump)
* c:    C (filenames *.c, *.h, *.idc)
* ca65:    ca65 (filenames *.s)
* cbmbas:    CBM BASIC V2 (filenames *.bas)
* ceylon:    Ceylon (filenames *.ceylon)
* cfc:    Coldfusion CFC (filenames *.cfc)
* cfengine3, cf3:    CFEngine3 (filenames *.cf)
* cfm:    Coldfusion HTML (filenames *.cfm, *.cfml)
* cfs:    cfstatement
* chai, chaiscript:    ChaiScript (filenames *.chai)
* chapel, chpl:    Chapel (filenames *.chpl)
* cheetah, spitfire:    Cheetah (filenames *.tmpl, *.spt)
* cirru:    Cirru (filenames *.cirru, *.cr)
* clay:    Clay (filenames *.clay)
* clojure, clj:    Clojure (filenames *.clj)
* clojurescript, cljs:    ClojureScript (filenames *.cljs)
* cmake:    CMake (filenames *.cmake, CMakeLists.txt)
* cobol:    COBOL (filenames *.cob, *.COB, *.cpy, *.CPY)
* cobolfree:    COBOLFree (filenames *.cbl, *.CBL)
* coffee-script, coffeescript, coffee:    CoffeeScript (filenames *.coffee)
* common-lisp, cl, lisp, elisp, emacs, emacs-lisp:    Common Lisp (filenames *.cl, *.lisp, *.el)
* console:    Bash Session (filenames *.sh-session)
* control, debcontrol:    Debian Control file (filenames control)
* coq:    Coq (filenames *.v)
* cpp, c++:    C++ (filenames *.cpp, *.hpp, *.c++, *.h++, *.cc, *.hh, *.cxx, *.hxx, *.C, *.H, *.cp, *.CPP)
* cpp-objdump, c++-objdumb, cxx-objdump:    cpp-objdump (filenames *.cpp-objdump, *.c++-objdump, *.cxx-objdump)
* croc:    Croc (filenames *.croc)
* cryptol, cry:    Cryptol (filenames *.cry)
* csharp, c#:    C# (filenames *.cs)
* css+django, css+jinja:    CSS+Django/Jinja
* css+erb, css+ruby:    CSS+Ruby
* css+genshitext, css+genshi:    CSS+Genshi Text
* css+lasso:    CSS+Lasso
* css+mako:    CSS+Mako
* css+mako:    CSS+Mako
* css+myghty:    CSS+Myghty
* css+php:    CSS+PHP
* css+smarty:    CSS+Smarty
* css:    CSS (filenames *.css)
* cucumber, gherkin:    Gherkin (filenames *.feature)
* cuda, cu:    CUDA (filenames *.cu, *.cuh)
* cypher:    Cypher (filenames *.cyp, *.cypher)
* cython, pyx, pyrex:    Cython (filenames *.pyx, *.pxd, *.pxi)
* d-objdump:    d-objdump (filenames *.d-objdump)
* d:    D (filenames *.d, *.di)
* dart:    Dart (filenames *.dart)
* delphi, pas, pascal, objectpascal:    Delphi (filenames *.pas)
* dg:    dg (filenames *.dg)
* diff, udiff:    Diff (filenames *.diff, *.patch)
* django, jinja:    Django/Jinja
* docker, dockerfile:    Docker (filenames Dockerfile, *.docker)
* dpatch:    Darcs Patch (filenames *.dpatch, *.darcspatch)
* dtd:    DTD (filenames *.dtd)
* duel, jbst, jsonml+bst:    Duel (filenames *.duel, *.jbst)
* dylan-console, dylan-repl:    Dylan session (filenames *.dylan-console)
* dylan-lid, lid:    DylanLID (filenames *.lid, *.hdp)
* dylan:    Dylan (filenames *.dylan, *.dyl, *.intr)
* ebnf:    EBNF (filenames *.ebnf)
* ec:    eC (filenames *.ec, *.eh)
* ecl:    ECL (filenames *.ecl)
* eiffel:    Eiffel (filenames *.e)
* elixir, ex, exs:    Elixir (filenames *.ex, *.exs)
* erb:    ERB
* erl:    Erlang erl session (filenames *.erl-sh)
* erlang:    Erlang (filenames *.erl, *.hrl, *.es, *.escript)
* evoque:    Evoque (filenames *.evoque)
* factor:    Factor (filenames *.factor)
* fan:    Fantom (filenames *.fan)
* fancy, fy:    Fancy (filenames *.fy, *.fancypack)
* felix, flx:    Felix (filenames *.flx, *.flxh)
* fortran:    Fortran (filenames *.f, *.f90, *.F, *.F90)
* foxpro, vfp, clipper, xbase:    FoxPro (filenames *.PRG, *.prg)
* fsharp:    FSharp (filenames *.fs, *.fsi)
* gap:    GAP (filenames *.g, *.gd, *.gi, *.gap)
* gas, asm:    GAS (filenames *.s, *.S)
* genshi, kid, xml+genshi, xml+kid:    Genshi (filenames *.kid)
* genshitext:    Genshi Text
* glsl:    GLSL (filenames *.vert, *.frag, *.geo)
* gnuplot:    Gnuplot (filenames *.plot, *.plt)
* go:    Go (filenames *.go)
* golo:    Golo (filenames *.golo)
* gooddata-cl:    GoodData-CL (filenames *.gdc)
* gosu:    Gosu (filenames *.gs, *.gsx, *.gsp, *.vark)
* groff, nroff, man:    Groff (filenames *.[1234567], *.man)
* groovy:    Groovy (filenames *.groovy)
* gst:    Gosu Template (filenames *.gst)
* haml:    Haml (filenames *.haml)
* handlebars:    Handlebars
* haskell, hs:    Haskell (filenames *.hs)
* haxeml, hxml:    Hxml (filenames *.hxml)
* html+cheetah, html+spitfire, htmlcheetah:    HTML+Cheetah
* html+django, html+jinja, htmldjango:    HTML+Django/Jinja
* html+evoque:    HTML+Evoque (filenames *.html)
* html+genshi, html+kid:    HTML+Genshi
* html+handlebars:    HTML+Handlebars (filenames *.handlebars, *.hbs)
* html+lasso:    HTML+Lasso
* html+mako:    HTML+Mako
* html+mako:    HTML+Mako
* html+myghty:    HTML+Myghty
* html+php:    HTML+PHP (filenames *.phtml)
* html+smarty:    HTML+Smarty
* html+velocity:    HTML+Velocity
* html:    HTML (filenames *.html, *.htm, *.xhtml, *.xslt)
* http:    HTTP
* hx, haxe, hxsl:    Haxe (filenames *.hx, *.hxsl)
* hybris, hy:    Hybris (filenames *.hy, *.hyb)
* hylang:    Hy (filenames *.hy)
* i6t:    Inform 6 template (filenames *.i6t)
* idl:    IDL (filenames *.pro)
* idris, idr:    Idris (filenames *.idr)
* iex:    Elixir iex session
* igor, igorpro:    Igor (filenames *.ipf)
* inform6, i6:    Inform 6 (filenames *.inf)
* inform7, i7:    Inform 7 (filenames *.ni, *.i7x)
* ini, cfg, dosini:    INI (filenames *.ini, *.cfg)
* io:    Io (filenames *.io)
* ioke, ik:    Ioke (filenames *.ik)
* irc:    IRC logs (filenames *.weechatlog)
* jade:    Jade (filenames *.jade)
* jags:    JAGS (filenames *.jag, *.bug)
* jasmin, jasminxt:    Jasmin (filenames *.j)
* java:    Java (filenames *.java)
* jlcon:    Julia console
* js+cheetah, javascript+cheetah, js+spitfire, javascript+spitfire:    JavaScript+Cheetah
* js+django, javascript+django, js+jinja, javascript+jinja:    JavaScript+Django/Jinja
* js+erb, javascript+erb, js+ruby, javascript+ruby:    JavaScript+Ruby
* js+genshitext, js+genshi, javascript+genshitext, javascript+genshi:    JavaScript+Genshi Text
* js+lasso, javascript+lasso:    JavaScript+Lasso
* js+mako, javascript+mako:    JavaScript+Mako
* js+mako, javascript+mako:    JavaScript+Mako
* js+myghty, javascript+myghty:    JavaScript+Myghty
* js+php, javascript+php:    JavaScript+PHP
* js+smarty, javascript+smarty:    JavaScript+Smarty
* js, javascript:    JavaScript (filenames *.js)
* json:    JSON (filenames *.json)
* jsp:    Java Server Page (filenames *.jsp)
* julia, jl:    Julia (filenames *.jl)
* kal:    Kal (filenames *.kal)
* kconfig, menuconfig, linux-config, kernel-config:    Kconfig (filenames Kconfig, *Config.in*, external.in*, standard-modules.in)
* koka:    Koka (filenames *.kk, *.kki)
* kotlin:    Kotlin (filenames *.kt)
* lagda, literate-agda:    Literate Agda (filenames *.lagda)
* lasso, lassoscript:    Lasso (filenames *.lasso, *.lasso[89])
* lcry, literate-cryptol, lcryptol:    Literate Cryptol (filenames *.lcry)
* lhs, literate-haskell, lhaskell:    Literate Haskell (filenames *.lhs)
* lidr, literate-idris, lidris:    Literate Idris (filenames *.lidr)
* lighty, lighttpd:    Lighttpd configuration file
* limbo:    Limbo (filenames *.b)
* liquid:    liquid (filenames *.liquid)
* live-script, livescript:    LiveScript (filenames *.ls)
* llvm:    LLVM (filenames *.ll)
* logos:    Logos (filenames *.x, *.xi, *.xm, *.xmi)
* logtalk:    Logtalk (filenames *.lgt)
* lsl:    LSL (filenames *.lsl)
* lua:    Lua (filenames *.lua, *.wlua)
* make, makefile, mf, bsdmake:    Makefile (filenames *.mak, *.mk, Makefile, makefile, Makefile.*, GNUmakefile)
* mako:    Mako (filenames *.mao)
* mako:    Mako (filenames *.mao)
* maql:    MAQL (filenames *.maql)
* mask:    Mask (filenames *.mask)
* mason:    Mason (filenames *.m, *.mhtml, *.mc, *.mi, autohandler, dhandler)
* mathematica, mma, nb:    Mathematica (filenames *.nb, *.cdf, *.nbp, *.ma)
* matlab:    Matlab (filenames *.m)
* matlabsession:    Matlab session
* minid:    MiniD (filenames *.md)
* modelica:    Modelica (filenames *.mo)
* modula2, m2:    Modula-2 (filenames *.def, *.mod)
* monkey:    Monkey (filenames *.monkey)
* moocode, moo:    MOOCode (filenames *.moo)
* moon, moonscript:    MoonScript (filenames *.moon)
* mql, mq4, mq5, mql4, mql5:    MQL (filenames *.mq4, *.mq5, *.mqh)
* mscgen, msc:    Mscgen (filenames *.msc)
* mupad:    MuPAD (filenames *.mu)
* mxml:    MXML (filenames *.mxml)
* myghty:    Myghty (filenames *.myt, autodelegate)
* mysql:    MySQL
* nasm:    NASM (filenames *.asm, *.ASM)
* nemerle:    Nemerle (filenames *.n)
* nesc:    nesC (filenames *.nc)
* newlisp:    NewLisp (filenames *.lsp, *.nl)
* newspeak:    Newspeak (filenames *.ns2)
* nginx:    Nginx configuration file
* nimrod, nim:    Nimrod (filenames *.nim, *.nimrod)
* nixos, nix:    Nix (filenames *.nix)
* nsis, nsi, nsh:    NSIS (filenames *.nsi, *.nsh)
* numpy:    NumPy
* objdump-nasm:    objdump-nasm (filenames *.objdump-intel)
* objdump:    objdump (filenames *.objdump)
* objective-c++, objectivec++, obj-c++, objc++:    Objective-C++ (filenames *.mm, *.hh)
* objective-c, objectivec, obj-c, objc:    Objective-C (filenames *.m, *.h)
* objective-j, objectivej, obj-j, objj:    Objective-J (filenames *.j)
* ocaml:    OCaml (filenames *.ml, *.mli, *.mll, *.mly)
* octave:    Octave (filenames *.m)
* ooc:    Ooc (filenames *.ooc)
* opa:    Opa (filenames *.opa)
* openedge, abl, progress:    OpenEdge ABL (filenames *.p, *.cls)
* pan:    Pan (filenames *.pan)
* pawn:    Pawn (filenames *.p, *.pwn, *.inc)
* perl, pl:    Perl (filenames *.pl, *.pm, *.t)
* perl6, pl6:    Perl6 (filenames *.pl, *.pm, *.nqp, *.p6, *.6pl, *.p6l, *.pl6, *.6pm, *.p6m, *.pm6, *.t)
* php, php3, php4, php5:    PHP (filenames *.php, *.php[345], *.inc)
* pig:    Pig (filenames *.pig)
* pike:    Pike (filenames *.pike, *.pmod)
* plpgsql:    PL/pgSQL
* postgresql, postgres:    PostgreSQL SQL dialect
* postscript, postscr:    PostScript (filenames *.ps, *.eps)
* pot, po:    Gettext Catalog (filenames *.pot, *.po)
* pov:    POVRay (filenames *.pov, *.inc)
* powershell, posh, ps1, psm1:    PowerShell (filenames *.ps1, *.psm1)
* prolog:    Prolog (filenames *.prolog, *.pro, *.pl)
* properties, jproperties:    Properties (filenames *.properties)
* protobuf, proto:    Protocol Buffer (filenames *.proto)
* psql, postgresql-console, postgres-console:    PostgreSQL console (psql)
* puppet:    Puppet (filenames *.pp)
* py3tb:    Python 3.0 Traceback (filenames *.py3tb)
* pycon:    Python console session
* pypylog, pypy:    PyPy Log (filenames *.pypylog)
* pytb:    Python Traceback (filenames *.pytb)
* python, py, sage:    Python (filenames *.py, *.pyw, *.sc, SConstruct, SConscript, *.tac, *.sage)
* python3, py3:    Python 3
* qbasic, basic:    QBasic (filenames *.BAS, *.bas)
* qml:    QML (filenames *.qml)
* racket, rkt:    Racket (filenames *.rkt, *.rktd, *.rktl)
* ragel-c:    Ragel in C Host (filenames *.rl)
* ragel-cpp:    Ragel in CPP Host (filenames *.rl)
* ragel-d:    Ragel in D Host (filenames *.rl)
* ragel-em:    Embedded Ragel (filenames *.rl)
* ragel-java:    Ragel in Java Host (filenames *.rl)
* ragel-objc:    Ragel in Objective C Host (filenames *.rl)
* ragel-ruby, ragel-rb:    Ragel in Ruby Host (filenames *.rl)
* ragel:    Ragel
* raw:    Raw token data
* rb, ruby, duby:    Ruby (filenames *.rb, *.rbw, Rakefile, *.rake, *.gemspec, *.rbx, *.duby)
* rbcon, irb:    Ruby irb session
* rconsole, rout:    RConsole (filenames *.Rout)
* rd:    Rd (filenames *.Rd)
* rebol:    REBOL (filenames *.r, *.r3, *.reb)
* red, red/system:    Red (filenames *.red, *.reds)
* redcode:    Redcode (filenames *.cw)
* registry:    reg (filenames *.reg)
* rexx, arexx:    Rexx (filenames *.rexx, *.rex, *.rx, *.arexx)
* rhtml, html+erb, html+ruby:    RHTML (filenames *.rhtml)
* robotframework:    RobotFramework (filenames *.txt, *.robot)
* rql:    RQL (filenames *.rql)
* rsl:    RSL (filenames *.rsl)
* rst, rest, restructuredtext:    reStructuredText (filenames *.rst, *.rest)
* rust:    Rust (filenames *.rs)
* sass:    Sass (filenames *.sass)
* scala:    Scala (filenames *.scala)
* scaml:    Scaml (filenames *.scaml)
* scheme, scm:    Scheme (filenames *.scm, *.ss)
* scilab:    Scilab (filenames *.sci, *.sce, *.tst)
* scss:    SCSS (filenames *.scss)
* shell-session:    Shell Session (filenames *.shell-session)
* slash:    Slash (filenames *.sl)
* slim:    Slim (filenames *.slim)
* smali:    Smali (filenames *.smali)
* smalltalk, squeak, st:    Smalltalk (filenames *.st)
* smarty:    Smarty (filenames *.tpl)
* sml:    Standard ML (filenames *.sml, *.sig, *.fun)
* snobol:    Snobol (filenames *.snobol)
* sourceslist, sources.list, debsources:    Debian Sourcelist (filenames sources.list)
* sp:    SourcePawn (filenames *.sp)
* sparql:    SPARQL (filenames *.rq, *.sparql)
* spec:    RPMSpec (filenames *.spec)
* splus, s, r:    S (filenames *.S, *.R, .Rhistory, .Rprofile, .Renviron)
* sql:    SQL (filenames *.sql)
* sqlite3:    sqlite3con (filenames *.sqlite3-console)
* squidconf, squid.conf, squid:    SquidConf (filenames squid.conf)
* ssp:    Scalate Server Page (filenames *.ssp)
* stan:    Stan (filenames *.stan)
* swift:    Swift (filenames *.swift)
* swig:    SWIG (filenames *.swg, *.i)
* systemverilog, sv:    systemverilog (filenames *.sv, *.svh)
* tcl:    Tcl (filenames *.tcl)
* tcsh, csh:    Tcsh (filenames *.tcsh, *.csh)
* tea:    Tea (filenames *.tea)
* tex, latex:    TeX (filenames *.tex, *.aux, *.toc)
* text:    Text only (filenames *.txt)
* todotxt:    Todotxt (filenames todo.txt, *.todotxt)
* toml:    TOML (filenames *.toml)
* trac-wiki, moin:    MoinMoin/Trac Wiki markup
* treetop:    Treetop (filenames *.treetop, *.tt)
* ts:    TypeScript (filenames *.ts)
* urbiscript:    UrbiScript (filenames *.u)
* vala, vapi:    Vala (filenames *.vala, *.vapi)
* vb.net, vbnet:    VB.net (filenames *.vb, *.bas)
* vctreestatus:    VCTreeStatus
* velocity:    Velocity (filenames *.vm, *.fhtml)
* verilog, v:    verilog (filenames *.v)
* vgl:    VGL (filenames *.rpf)
* vhdl:    vhdl (filenames *.vhdl, *.vhd)
* vim:    VimL (filenames *.vim, .vimrc, .exrc, .gvimrc, _vimrc, _exrc, _gvimrc, vimrc, gvimrc)
* xml+cheetah, xml+spitfire:    XML+Cheetah
* xml+django, xml+jinja:    XML+Django/Jinja
* xml+erb, xml+ruby:    XML+Ruby
* xml+evoque:    XML+Evoque (filenames *.xml)
* xml+lasso:    XML+Lasso
* xml+mako:    XML+Mako
* xml+mako:    XML+Mako
* xml+myghty:    XML+Myghty
* xml+php:    XML+PHP
* xml+smarty:    XML+Smarty
* xml+velocity:    XML+Velocity
* xml:    XML (filenames *.xml, *.xsl, *.rss, *.xslt, *.xsd, *.wsdl, *.wsf)
* xquery, xqy, xq, xql, xqm:    XQuery (filenames *.xqy, *.xquery, *.xq, *.xql, *.xqm)
* xslt:    XSLT (filenames *.xsl, *.xslt, *.xpl)
* xtend:    Xtend (filenames *.xtend)
* yaml+jinja, salt, sls:    YAML+Jinja (filenames *.sls)
* yaml:    YAML (filenames *.yaml, *.yml)
* zephir:    Zephir (filenames *.zep)

### Formatters
* bbcode, bb:    Format tokens with BBcodes. These formatting codes are used by many bulletin boards, so you can highlight your sourcecode with pygments before posting it there.
* bmp, bitmap:    Create a bitmap image from source code. This uses the Python Imaging Library to generate a pixmap from the source code. (filenames *.bmp)
* gif:    Create a GIF image from source code. This uses the Python Imaging Library to generate a pixmap from the source code. (filenames *.gif)
* html:    Format tokens as HTML 4 ``<span>`` tags within a ``<pre>`` tag, wrapped in a ``<div>`` tag. The ``<div>``'s CSS class can be set by the `cssclass` option. (filenames *.html, *.htm)
* img, IMG, png:    Create a PNG image from source code. This uses the Python Imaging Library to generate a pixmap from the source code. (filenames *.png)
* jpg, jpeg:    Create a JPEG image from source code. This uses the Python Imaging Library to generate a pixmap from the source code. (filenames *.jpg)
* latex, tex:    Format tokens as LaTeX code. This needs the `fancyvrb` and `color` standard packages. (filenames *.tex)
* raw, tokens:    Format tokens as a raw representation for storing token streams. (filenames *.raw)
* rtf:    Format tokens as RTF markup. This formatter automatically outputs full RTF documents with color information and other useful stuff. Perfect for Copy and Paste into Microsoft® Word® documents. (filenames *.rtf)
* svg:    Format tokens as an SVG graphics file.  This formatter is still experimental. Each line of code is a ``<text>`` element with explicit ``x`` and ``y`` coordinates containing ``<tspan>`` elements with the individual token styles. (filenames *.svg)
* terminal, console:    Format tokens with ANSI color sequences, for output in a text console. Color sequences are terminated at newlines, so that paging the output works correctly.
* terminal256, console256, 256:    Format tokens with ANSI color sequences, for output in a 256-color terminal or console. Like in `TerminalFormatter` color sequences are terminated at newlines, so that paging the output works correctly.
* testcase:    Format tokens as appropriate for a new testcase.
* text, null:    Output the text unchanged without any formatting. (filenames *.txt)

### Filters
* raiseonerror:    Raise an exception when the lexer generates an error token.
* whitespace:    Convert tabs, newlines and/or spaces to visible characters.
* tokenmerge:    Merges consecutive tokens with the same token type in the output stream of a lexer.
* highlight:    Highlight a normal Name (and Name.*) token with a different token type.
* gobble:    Gobbles source code lines (eats initial characters).
* codetagify:    Highlight special code tags in comments and docstrings.
* keywordcase:    Convert keywords to lowercase or uppercase or capitalize them, which means first letter uppercase, rest lowercase.

### Styles

* manni:    A colorful style, inspired by the terminal highlighting style.
* igor:    Pygments version of the official colors for Igor Pro procedures.
* xcode:    Style similar to the Xcode default colouring theme.
* vim:    Styles somewhat like vim 7.0
* autumn:    A colorful style, inspired by the terminal highlighting style.
* vs:
* rrt:    Minimalistic "rrt" theme, based on Zap and Emacs defaults.
* native:    Pygments version of the "native" vim theme.
* perldoc:    Style similar to the style used in the perldoc code blocks.
* borland:    Style similar to the style used in the borland IDEs.
* tango:    The Crunchy default Style inspired from the color palette from the Tango Icon Theme Guidelines.
* emacs:    The default style (inspired by Emacs 22).
* friendly:    A modern style based on the VIM pyte theme.
* monokai:    This style mimics the Monokai color scheme.
* paraiso-dark:
* colorful:    A colorful style, inspired by CodeRay.
* murphy:    Murphy's style from CodeRay.
* bw:
* pastie:    Style similar to the pastie default style.
* paraiso-light:
* trac:    Port of the default trac highlighter design.
* default:    The default style (inspired by Emacs 22).
* fruity:    Pygments version of the "native" vim theme.


text:
<?php

namespace spec\Genesis\Exceptions;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;

class ErrorAPISpec extends ObjectBehavior
{
    public function it_is_initializable()
    {
        $this->shouldHaveType('Genesis\Exceptions\ErrorAPI');
    }
}


text:
describe('Prism.StateView tests', function() {
    it('Should initialize its subviews', function () {
        var Store = Backbone.Prism.Store.extend({
            name: 'store'
        });

        var store = new Store([{name: 'Ralph', specie: 'dog'}, {name: 'Lucy', specie: 'cat'}]);
        var view = store.createView({
            name: 'test'
        });
        expect(view.parent).to.equal(store);
        expect(view.name).to.equal('test');
        expect(view._isInitialized).to.be.false;

        store.publish();
        expect(view._isInitialized).to.be.true;
        expect(view.models).to.exist;
        expect(view.length).to.equal(2);
        expect(store.at(0).get('name')).to.equal('Ralph');
        expect(store.at(0).get('specie')).to.equal('dog');
        expect(store.at(1).get('name')).to.equal('Lucy');
        expect(store.at(1).get('specie')).to.equal('cat');
    });

    it('Should trigger sync event', function () {
        var Store = Backbone.Prism.Store.extend({
            name: 'store'
        });

        var store = new Store([{name: 'Ralph', specie: 'dog'}, {name: 'Lucy', specie: 'cat'}]);
        var view = store.createView({
            name: 'test'
        });

        var listener = {
            callback: function () {
                return;
            }
        };

        var spy = sinon.spy(listener, 'callback');
        view.on('sync', listener.callback);
        store.publish();
        expect(spy.called).to.be.true;
    });

    it('Should export cid', function () {
        var Store = Backbone.Prism.Store.extend({
            name: 'store'
        });

        var store = new Store([{name: 'Ralph', specie: 'dog'}, {name: 'Lucy', specie: 'cat'}]);
        var view = store.createView({
            name: 'test'
        });

        store.publish();
        var values = view.toJSON();
        expect(values.length).to.equal(2);
        expect(values[0].cid).to.exist;
        expect(values[0].cid).to.match(/^c/);
        expect(values[0].name).to.equal('Ralph');
        expect(values[0].specie).to.equal('dog');
        expect(values[1].cid).to.exist;
        expect(values[1].cid).to.match(/^c/);
        expect(values[1].name).to.equal('Lucy');
        expect(values[1].specie).to.equal('cat');
    });

    it('Should modify options', function () {
        var Store = Backbone.Prism.Store.extend({
            name: 'store'
        });

        var store = new Store([{name: 'Ralph', specie: 'dog'}, {name: 'Lucy', specie: 'cat'}]);
        var view = store.createView({
            name: 'test',
            comparator: 'name',
            size: 10
        });
        var options = {size: 5};

        var listener = {
            callback: function () {
                return;
            }
        };

        var spy = sinon.spy(listener, 'callback');
        var config = view.createConfig(null, function () {
            return options;
        });
        config.on('set', listener.callback);

        store.publish();
        expect(spy.called).to.be.false; // first update is silent
        expect(view.options.size).to.equal(5);

        options = {size: 10, comparator: 'specie'};
        config.apply();
        expect(spy.called).to.be.true;
        expect(view.options.size).to.equal(10);
        expect(view.options.comparator).to.equal('specie');
        expect(view.models[0].get('name')).to.equal('Lucy');
    });

    it('Should apply comparator', function () {
        var Store = Backbone.Prism.Store.extend({
            name: 'store'
        });

        var store = new Store([
            {name: 'Ralph', specie: 'dog', age: 3},
            {name: 'Lucy', specie: 'cat', age: 5},
            {name: 'Gex', specie: 'lizard', age: 9},
            {name: 'Ed', specie: 'horse', age: 7},
            {name: 'Tom', specie: 'echidna', age: 3},
            {name: 'Go', specie: 'gopher', age: 2},
            {name: 'Frank', specie: 'parrot', age: 5}
        ]);

        var customView = store.createView({
            comparator: 'age'
        });

        var defaultView = store.getDefaultView();

        var comparator = defaultView.createComparator(null, function () {
            return function (m1, m2) {
                return m2.get('name') < m1.get('name') ? 1 : (m2.get('name') > m1.get('name') ? -1 : 0);
            };
        });

        store.publish();
        expect(customView.models[0].get('name')).to.equal('Go');
        expect(customView.models[6].get('name')).to.equal('Gex');
        expect(defaultView.models[0].get('name')).to.equal('Ed');
        expect(defaultView.models[6].get('name')).to.equal('Tom');
    });

    it('Should apply filters', function () {
        var Store = Backbone.Prism.Store.extend({
            name: 'store'
        });

        var store = new Store([
            {name: 'Ralph', specie: 'dog', age: 3},
            {name: 'Lucy', specie: 'cat', age: 5},
            {name: 'Gex', specie: 'lizard', age: 9},
            {name: 'Ed', specie: 'horse', age: 7},
            {name: 'Tom', specie: 'echidna', age: 3},
            {name: 'Go', specie: 'gopher', age: 2},
            {name: 'Frank', specie: 'parrot', age: 5}
        ]);

        var youngestView = store.createView({
            filter: function (pet) {
                return pet.get('age') < 7;
            }
        });

        var exactAgeView = store.createView({
            filter: {age: 5}
        });

        var defaultView = store.getDefaultView();

        var nameFilter = defaultView.createFilter(null, function () {
            return function (model) {
                return model.get('specie').match(/o/);
            };
        });

        var ageFilter = defaultView.createFilter(null, function () {
            return function (model) {
                return model.get('age') >=5;
            };
        });

        store.publish();

        expect(youngestView.models.length).to.equal(5);
        expect(exactAgeView.models.length).to.equal(2);
        expect(defaultView.models.length).to.equal(2);
    });

    it('Should ignore event', function () {
        var Store = Backbone.Prism.Store.extend({
            name: 'store'
        });

        var store = new Store([{name: 'Ralph', specie: 'dog'}, {name: 'Lucy', specie: 'cat'}]);
        var view = store.createView({
            name: 'test'
        });

        var listener = {
            callback: function () {
            }
        };

        var spy = sinon.spy(listener, 'callback');
        view.on('sync', listener.callback);

        store.publish();
        expect(spy.called).to.be.true;
        expect(spy.calledOnce).to.be.true;
        expect(view.models.length).to.equal(2);

        store.add({name: 'Gex', specie: 'lizard'});
        expect(spy.calledTwice).to.be.true;
        expect(view.models.length).to.equal(3);

        view.sleep();

        store.add({name: 'Ed', specie: 'horse'});
        expect(spy.calledThrice).to.be.false,
        expect(view.models.length).to.equal(3);

        view.wakeup(true);
        expect(spy.calledThrice).to.be.true;
        expect(view.models.length).to.equal(4);
    });

    it('Should return subview instance', function () {
        var Store = Backbone.Prism.Store.extend({
            name: 'store'
        });

        var store = new Store([{name: 'Ralph', specie: 'dog'}, {name: 'Lucy', specie: 'cat'}]);
        var view = store.createView({
            name: 'test'
        });
        var subview = view.createView({
            name: 'subview'
        });

        expect(subview.parent).to.equal(view);
        expect(view.views['subview']).to.equal(subview);
    });

    it('Should update subview', function () {
        var Store = Backbone.Prism.Store.extend({
            name: 'store'
        });

        var store = new Store([{name: 'Ralph', specie: 'dog'}, {name: 'Lucy', specie: 'cat'}]);
        var view = store.createView({
            name: 'test'
        });
        var subview = view.createView({
            name: 'subview',
            listenTo: 'sync'
        });

        store.publish();
        expect(view.length).to.equal(2);
        expect(subview.length).to.equal(2);

        store.add({name: 'Truman', specie: 'parrot'});
        expect(store.length).to.equal(3);
        expect(view.length).to.equal(3);
        expect(subview.length).to.equal(3);
    });

    it('Should apply view configs', function () {
        var Store = Backbone.Prism.Store.extend({
            name: 'store'
        });

        var store = new Store([
            {name: 'Ralph', specie: 'dog', age: 3},
            {name: 'Lucy', specie: 'cat', age: 5},
            {name: 'Gex', specie: 'lizard', age: 9},
            {name: 'Ed', specie: 'horse', age: 7},
            {name: 'Tom', specie: 'echidna', age: 3},
            {name: 'Go', specie: 'gopher', age: 2},
            {name: 'Frank', specie: 'parrot', age: 5}
        ]);
        var view = store.createView({
            name: 'test'
        });
        var subview = view.createView({
            name: 'subview',
            listenTo: 'sync'
        });

        var obj = {
            configCallback: function () {
                return {
                    offset: 1,
                    size: 4
                };
            }
        };

        var viewConfig = view.createConfig(null, obj.configCallback);

		    var subViewConfig = subview.createConfig(null, function () {
            return {
                size: 3
			      };
		    });

        var subViewComparator = subview.createComparator(null, function () {
			      return function (model1, model2) {
				        return model1.get('age') < model2.get('age') ? 1 : (model1.get('age') > model2.get('age') ? -1 : 0);
			      };
		    });

		    expect(view.configs[viewConfig.cid]).to.equal(viewConfig);
		    store.publish();
		    expect(view.length).to.equal(4);
		    expect(subview.length).to.equal(3);
		    expect(subview.models[0].get('name')).to.equal('Gex');
	  });

    it('Should paginate view', function () {
        var Store = Backbone.Prism.Store.extend({
            name: 'store'
        });

        var store = new Store([
            {name: 'Ralph', specie: 'dog', age: 3},
            {name: 'Lucy', specie: 'cat', age: 5},
            {name: 'Gex', specie: 'lizard', age: 9},
            {name: 'Ed', specie: 'horse', age: 7},
            {name: 'Tom', specie: 'echidna', age: 3},
            {name: 'Go', specie: 'gopher', age: 2},
            {name: 'Frank', specie: 'parrot', age: 5}
        ]);
        var view = store.createView({
            name: 'test'
        });

        var paginator = view.createPaginator(null, 3, 2);
        paginator.apply();
        store.publish();
        expect(view.length).to.equal(3);
        expect(paginator.getTotalPages(store.length)).to.equal(3);
        expect(view.models[0].get('name')).to.equal('Ed');

        paginator.setCurrentPage(1, true);
        expect(paginator.page).to.equal(1);
        expect(view.length).to.equal(3);
        expect(view.models[0].get('name')).to.equal('Ralph');

        paginator.setCurrentPage(3, false);
        expect(paginator.page).to.equal(3);
        expect(view.length).to.equal(3);
        paginator.apply();
        expect(view.length).to.equal(1);
        expect(view.models[0].get('name')).to.equal('Frank');
    });

    it('Should implement collection methods', function () {
        var Store = Backbone.Prism.Store.extend({
            name: 'store'
        });

        var store = new Store([
            {name: 'Ralph', specie: 'dog', age: 3},
            {name: 'Lucy', specie: 'cat', age: 5},
            {name: 'Ed', specie: 'horse', age: 7},
            {name: 'Go', specie: 'gopher', age: 2}
        ]);
        var view = store.createView({
            name: 'test'
        });
        store.publish();

        // forEach
        expect(view.forEach).to.exists;
        expect(typeof view.forEach).to.equal('function');
        var result = [];
        view.forEach(function(model) {
            result.push(model.get('name'));
        });
        expect(result.length).to.equal(4);
        expect(result[0]).to.equal('Ralph');
        expect(result[1]).to.equal('Lucy');
        expect(result[2]).to.equal('Ed');
        expect(result[3]).to.equal('Go');

        // each
        expect(view.each).to.exists;
        expect(typeof view.each).to.equal('function');
        var eachCallback = sinon.spy();
        view.each(eachCallback);
        expect(eachCallback.callCount).to.equal(4);
        expect(eachCallback.getCall(0).args[0]).to.equal(view.models[0]);
        expect(eachCallback.getCall(1).args[0]).to.equal(view.models[1]);
        expect(eachCallback.getCall(2).args[0]).to.equal(view.models[2]);
        expect(eachCallback.getCall(3).args[0]).to.equal(view.models[3]);

        // map
        expect(view.map).to.exists;
        expect(typeof view.map).to.equal('function');
        var object = { method: function (model) { return model.get('name') } };
        var mapCallback = sinon.spy(object,  'method');
        var result = view.map(mapCallback);
        expect(mapCallback.callCount).to.equal(4);
        expect(result.length).to.equal(4);
        expect(result[0]).to.equal('Ralph');
        expect(result[1]).to.equal('Lucy');
        expect(result[2]).to.equal('Ed');
        expect(result[3]).to.equal('Go');

        // collect
        expect(view.collect).to.exists;
        expect(typeof view.collect).to.equal('function');
        var object = { method: function (model) { return model.get('name') } };
        var collectCallback = sinon.spy(object,  'method');
        var result = view.collect(collectCallback);
        expect(collectCallback.callCount).to.equal(4);
        expect(result.length).to.equal(4);
        expect(result[0]).to.equal('Ralph');
        expect(result[1]).to.equal('Lucy');
        expect(result[2]).to.equal('Ed');
        expect(result[3]).to.equal('Go');

        // reduce
        expect(view.reduce).to.exists;
        expect(typeof view.reduce).to.equal('function');
        var object = { method: function (memo, model) { return memo + model.get('name'); }};
        var reduceCallback = sinon.spy(object, 'method');
        var result = view.reduce(reduceCallback, '');
        expect(reduceCallback.callCount).to.equal(4);
        expect(result).to.equal('RalphLucyEdGo');

        // foldl (alias of reduce)
        expect(view.foldl).to.exists;
        expect(typeof view.foldl).to.equal('function');
        var object = { method: function (memo, model) { return memo + model.get('name'); }};
        var foldlCallback = sinon.spy(object, 'method');
        var result = view.foldl(foldlCallback, '');
        expect(foldlCallback.callCount).to.equal(4);
        expect(result).to.equal('RalphLucyEdGo');

        // inject (alias of reduce)
        expect(view.inject).to.exists;
        expect(typeof view.inject).to.equal('function');
        var object = { method: function (memo, model) { return memo + model.get('name'); }};
        var injectCallback = sinon.spy(object, 'method');
        var result = view.inject(injectCallback, '');
        expect(injectCallback.callCount).to.equal(4);
        expect(result).to.equal('RalphLucyEdGo');

        // reduceRight
        expect(view.reduceRight).to.exists;
        expect(typeof view.reduceRight).to.equal('function');
        var object = { method: function (memo, model) { return memo + model.get('name'); }};
        var reduceRightCallback = sinon.spy(object, 'method');
        var result = view.reduceRight(reduceRightCallback, '');
        expect(reduceRightCallback.callCount).to.equal(4);
        expect(result).to.equal('GoEdLucyRalph');

        // foldr
        expect(view.foldr).to.exists;
        expect(typeof view.foldr).to.equal('function');
        var object = { method: function (memo, model) { return memo + model.get('name'); }};
        var foldrCallback = sinon.spy(object, 'method');
        var result = view.foldr(foldrCallback, '');
        expect(foldrCallback.callCount).to.equal(4);
        expect(result).to.equal('GoEdLucyRalph');

        // find
        expect(view.find).to.exists;
        expect(typeof view.find).to.equal('function');
        var result = view.find(function(model) {
            return model.get('name') == 'Lucy';
        });
        expect(result).to.equal(view.models[1]);

        // detect
        expect(view.detect).to.exists;
        expect(typeof view.detect).to.equal('function');
        var result = view.detect(function(model) {
            return model.get('name') == 'Lucy';
        });
        expect(result).to.equal(view.models[1]);

        // filter
        expect(view.filter).to.exists;
        expect(typeof view.filter).to.equal('function');
        var result = view.filter(function(model) {
            return model.get('name').length != 5;
        });
        expect(result.length).to.equal(3);
        expect(result[0]).to.equal(view.models[1]);
        expect(result[1]).to.equal(view.models[2]);
        expect(result[2]).to.equal(view.models[3]);

        // select (alias of filter)
        expect(view.select).to.exists;
        expect(typeof view.select).to.equal('function');
        var result = view.select(function(model) {
            return model.get('name').length != 5;
        });
        expect(result.length).to.equal(3);
        expect(result[0]).to.equal(view.models[1]);
        expect(result[1]).to.equal(view.models[2]);
        expect(result[2]).to.equal(view.models[3]);

        // reject
        expect(view.reject).to.exists;
        expect(typeof view.reject).to.equal('function');
        var result = view.reject(function(model) {
            return model.get('name').length == 2;
        });
        expect(result.length).to.equal(2);
        expect(result[0]).to.equal(view.models[0]);
        expect(result[1]).to.equal(view.models[1]);

        // every
        expect(view.every).to.exists;
        expect(typeof view.every).to.equal('function');
        var result = view.every(function(model) {
            return model.get('name').length < 6;
        });
        expect(result).to.be.true;

        // all (alias of every)
        expect(view.all).to.exists;
        expect(typeof view.all).to.equal('function');
        var result = view.all(function(model) {
            return model.get('name').length < 6;
        });
        expect(result).to.be.true;

        // some
        expect(view.some).to.exists;
        expect(typeof view.some).to.equal('function');
        var result = view.some(function (model) {
            return model.get('name') == 'Nick';
        });
        expect(result).to.be.false;

        // any (alias of some)
        expect(view.any).to.exists;
        expect(typeof view.any).to.equal('function');
        var result = view.any(function (model) {
            return model.get('name') == 'Nick';
        });
        expect(result).to.be.false;

        // contains
        expect(view.contains).to.exists;
        expect(typeof view.contains).to.equal('function');
        var result = view.contains(view.models[0]);
        expect(result).to.be.true;

        // include (alias of contains)
        expect(view.include).to.exists;
        expect(typeof view.include).to.equal('function');
        var result = view.include(view.models[0]);
        expect(result).to.be.true;

        // includes (alias of contains)
        expect(view.includes).to.exists;
        expect(typeof view.includes).to.equal('function');
        var result = view.includes(view.models[0]);
        expect(result).to.be.true;

        // invoke
        expect(view.invoke).to.exists;
        expect(typeof view.invoke).to.equal('function');
        var result = view.invoke('pick', 'age');
        expect(result.length).to.equal(4);
        expect(typeof result[0]).to.equal('object');
        expect(result[0].age).to.equal(3);
        expect(typeof result[1]).to.equal('object');
        expect(result[1].age).to.equal(5);
        expect(typeof result[2]).to.equal('object');
        expect(result[2].age).to.equal(7);
        expect(typeof result[3]).to.equal('object');
        expect(result[3].age).to.equal(2);

        // max
        expect(view.max).to.exists;
        expect(typeof view.max).to.equal('function');
        var result = view.max(function (model) {
            return model.get('age');
        });
        expect(result.get('age')).to.equal(7);

        // min
        expect(view.min).to.exists;
        expect(typeof view.min).to.equal('function');
        var result = view.min(function (model) {
            return model.get('age');
        });
        expect(result.get('age')).to.equal(2);

        // size
        expect(view.size).to.exists;
        expect(typeof view.size).to.equal('function');
        expect(view.size()).to.equal(4);

        // first
        expect(view.first).to.exists;
        expect(typeof view.first).to.equal('function');
        var result = view.first();
        expect(result.get('age')).to.equal(3);

        // head (alias of first)
        expect(view.head).to.exists;
        expect(typeof view.head).to.equal('function');
        var result = view.head();
        expect(result.get('age')).to.equal(3);

        // take (alias of first)
        expect(view.take).to.exists;
        expect(typeof view.take).to.equal('function');
        var result = view.take();
        expect(result.get('age')).to.equal(3);

        // initial
        expect(view.initial).to.exists;
        expect(typeof view.initial).to.equal('function');
        var result = view.initial();
        expect(result.length).to.equal(3);
        expect(result[0]).to.equal(view.models[0]);
        expect(result[1]).to.equal(view.models[1]);
        expect(result[2]).to.equal(view.models[2]);

        // rest
        expect(view.rest).to.exists;
        expect(typeof view.rest).to.equal('function');
        var result = view.rest();
        expect(result.length).to.equal(3);
        expect(result[0]).to.equal(view.models[1]);
        expect(result[1]).to.equal(view.models[2]);
        expect(result[2]).to.equal(view.models[3]);

        // tail (alias of rest)
        expect(view.tail).to.exists;
        expect(typeof view.tail).to.equal('function');
        var result = view.tail();
        expect(result.length).to.equal(3);
        expect(result[0]).to.equal(view.models[1]);
        expect(result[1]).to.equal(view.models[2]);
        expect(result[2]).to.equal(view.models[3]);

        // drop
        expect(view.drop).to.exists;
        expect(typeof view.drop).to.equal('function');
        var result = view.drop();
        expect(result.length).to.equal(3);
        expect(result[0]).to.equal(view.models[1]);
        expect(result[1]).to.equal(view.models[2]);
        expect(result[2]).to.equal(view.models[3]);

        // last
        expect(view.last).to.exists;
        expect(typeof view.last).to.equal('function');
        var result = view.last();
        expect(result.get('age')).to.equal(2);

        // without
        expect(view.without).to.exists;
        expect(typeof view.without).to.equal('function');
        var result = view.without(view.models[1]);
        expect(result.length).to.equal(3);

        // difference
        expect(view.difference).to.exists;
        expect(typeof view.difference).to.equal('function');
        var result = view.difference([view.models[1]]);
        expect(result.length).to.equal(3);

        // indexOf
        expect(view.indexOf).to.exists;
        expect(typeof view.indexOf).to.equal('function');
        expect(view.indexOf(view.models[1])).to.equal(1);

        // shuffle
        expect(view.shuffle).to.exists;
        expect(typeof view.shuffle).to.equal('function');

        // lastIndexOf
        expect(view.lastIndexOf).to.exists;
        expect(typeof view.lastIndexOf).to.equal('function');
        expect(view.lastIndexOf(view.models[1])).to.equal(1);

        // isEmpty
        expect(view.isEmpty).to.exists;
        expect(typeof view.isEmpty).to.equal('function');
        expect(view.isEmpty()).to.be.false;

        // chain
        expect(view.chain).to.exists;
        expect(typeof view.chain).to.equal('function');
        var result = view.chain().map(function(model) {
            return model.get('name');
        }).first().value();
        expect(result).to.equal('Ralph');

        // sample
        expect(view.sample).to.exists;
        expect(typeof view.sample).to.equal('function');

        // partition
        expect(view.partition).to.exists;
        expect(typeof view.partition).to.equal('function');
        var result = view.partition(function(model) {
            return model.get('name').length == 5;
        });
        expect(result.length).to.equal(2);

        // groupBy
        expect(view.groupBy).to.exists;
        expect(typeof view.groupBy).to.equal('function');
        var result = view.groupBy(function(model) {
            return model.get('name').length;
        });
        expect(result[4]).to.exists;
        expect(result[2]).to.exists;
        expect(result[5]).to.exists;
        expect(result[4][0]).to.equal(view.models[1]);
        expect(result[2][0]).to.equal(view.models[2]);
        expect(result[2][1]).to.equal(view.models[3]);
        expect(result[5][0]).to.equal(view.models[0]);

        // countBy
        expect(view.countBy).to.exists;
        expect(typeof view.countBy).to.equal('function');
        var result = view.countBy(function(model) {
            return model.get('name').length;
        });
        expect(result[2]).to.exists;
        expect(result[4]).to.exists;
        expect(result[5]).to.exists;
        expect(result[2]).to.equal(2);
        expect(result[4]).to.equal(1);
        expect(result[5]).to.equal(1);

        // sortBy
        expect(view.sortBy).to.exists;
        expect(typeof view.sortBy).to.equal('function');
        var result = view.sortBy(function(model) {
            return model.get('name').substring(1);
        });
        expect(result[0].get('name')).to.equal('Ralph');
        expect(result[1].get('name')).to.equal('Ed');
        expect(result[2].get('name')).to.equal('Go');
        expect(result[3].get('name')).to.equal('Lucy');

        // indexBy
        expect(view.indexBy).to.exists;
        expect(typeof view.indexBy).to.equal('function');
        var result = view.indexBy(function(model) {
            return model.get('name');
        });
        expect(result['Ralph']).to.equal(view.models[0]);
        expect(result['Lucy']).to.equal(view.models[1]);
        expect(result['Ed']).to.equal(view.models[2]);
        expect(result['Go']).to.equal(view.models[3]);

        // findIndex
        expect(view.findIndex).to.exists;
        expect(typeof view.findIndex).to.equal('function');
        var result = view.findIndex(function(model) {
            return model.get('name') == 'Lucy';
        });
        expect(result).to.equal(1);

        // findLastIndex
        expect(view.findLastIndex).to.exists;
        expect(typeof view.findLastIndex).to.equal('function');
        var result = view.findLastIndex(function(model) {
            return model.get('name').length == 2;
        });
        expect(result).to.equal(3);
    });
});


text:
<!DOCTYPE html>

    <title>Keycapture Ruby Test</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
    <META HTTP-Equiv="SIPButton" content="visibility:Visible;top:30 " >
    <META HTTP-Equiv="quitbutton" Content="visibility:visible">
    <META HTTP-Equiv="ReloadButton" Content="visibility:visible">

    <link type="image/png" rel="shortcut icon" href="../../public/jasmine/jasmine_favicon.png">
    <link type="text/css" rel="stylesheet" href="../../public/jasmine/jasmine.css">

  <textarea rows="2" cols="10" tabindex="1">
  </textarea>
  <textarea rows="2" cols="10" tabindex="2">
  </textarea>

KeyCapture Ruby Compliance Tests

    Test Objective:

    Test Running:

    Expected Result:

    Key or Tirgger Data:

    Key Data2:

    <input type="button" value="Test Passed" onclick="captureResult(true)" id="oldpass" />
    <input type="button" value="Test Failed" onclick="captureResult(false)" id="oldfail" />

    <input type="button" value="Run Test" onclick="_result.runTest();" id="runtest"/>
    <input type="button" value="Test Passed" onclick="_result.passed();" id="pass" />
    <input type="button" value="Test Failed" onclick="_result.failed();" id="fail" />

init


text:
"""add ti job_id index

Revision ID: 947454bf1dff
Revises: bdaa763e6c56
Create Date: 2017-08-15 15:12:13.845074

"""
from alembic import op

# revision identifiers, used by Alembic.
revision = '947454bf1dff'
down_revision = 'bdaa763e6c56'
branch_labels = None
depends_on = None

def upgrade():
    op.create_index('ti_job_id', 'task_instance', ['job_id'], unique=False)

def downgrade():
    op.drop_index('ti_job_id', table_name='task_instance')


text:
node-node-sensor
================

[![Analytics](https://ga-beacon.appspot.com/UA-56089547-1/sandeepmistry/node-node-sensor?pixel)](https://github.com/igrigorik/ga-beacon)

node.js lib for [Variable Inc.'s](http://variableinc.com) [NODE sensor](http://variableinc.com/product/ios-platform-node/)

Supported modules:

 * Kore
 * [Luma](http://variableinc.com/luma-led-flashlight/)
 * [Clima](http://variableinc.com/product/new-clima-climate-and-weather-sensor/)
 * [Therma](http://variableinc.com/therma-temperature-sensor/)
 * [Themocouple](http://variableinc.com/product/thermocouple/)
 * [Barcode](http://variableinc.com/product/node-barcode/)

Unsupported modules:

 * [Oxa](http://variableinc.com/oxa-gas-sensors/)
   * Need to understand data
 * [Chroma](http://variableinc.com/chroma-color-sensor/)
   * Need to understand calibration
 * [CO2](http://variableinc.com/product/node-co2/)
   * No access to module

Install
-------

    npm install node-sensor

Usage
-----

    var NodeSensor = require('node-sensor');

__Discover__

    NodeSensor.discover(callback(nodeSensor));

__Connect__

    nodeSensor.connect(callback);

__Disconnect__

    nodeSensor.disconnect(callback);

__Discover Services and Characteristics__

    nodeSensor.discoverServicesAndCharacteristics(callback);

__Setup__

    nodeSensor.setup(callback);

__Kore__

    nodeSensor.readDeviceName(callback(deviceName));

    nodeSensor.readVersion(callback(firmware, model));

    nodeSensor.readStatus(callback(batteryLevel, moduleA, moduleB));

    nodeSensor.readModuleSubtypes(callback(moduleASubtype, moduleBSubtype));

    nodeSensor.readSerials(callback(core, moduleA, moduleB));

    nodeSensor.readModuleVersions(callback(moduleAVersion, moduleBVersion));

    nodeSensor.readQuietMode(callback(on));

    // accelerometer, gyroscope, magnetometer are true/false
    // period in ms
    nodeSensor.writeKoreMode(accelerometer, gyroscope, magnetometer, period, callback);

Events:

    nodeSensor.on('buttonPush', callback);
    nodeSensor.on('buttonRelease', callback);

    nodeSensor.on('koreAccelerometerReading', callabck(x, y, z));
    nodeSensor.on('koreGyroscopeReading', callabck(x, y, z));
    nodeSensor.on('koreMagnetometerReading', callabck(x, y, z));

__Luma__

    // mode 0 - 255, 1 bit per LED
    nodeSensor.writeLumaMode(mode, callback);

    // strobe in Hz
    nodeSensor.writeLumaStrobe(strobe, callback);

__Clima__

    // temperaturePressure, humidity, lightProximity are true/false
    // period in ms
    nodeSensor.writeClimaMode(temperaturePressure, humidity, lightProximity, period, callback)

Events:

    // temperature in °C
    nodeSensor.on('climaTemperatureReading', callback(temperature));

    // pressure in kPa
    nodeSensor.on('climaPressureReading', callback(pressure));

    // humidity in %
    nodeSensor.on('climaHumidityReading', callback(humidity));

    // light in lx
    nodeSensor.on('climaLightReading', callback(light));

__Therma__

    // ir, led are true/false
    // period in ms
    nodeSensor.writeThermaMode(ir, led, period, callback);

Events:

    // temperature in °C
    nodeSensor.on('thermaTemperatureReading', callback(temperature));

__Thermocouple__

    // enable is true/false
    // period in ms
    nodeSensor.writeThermocoupleMode(enable, period, callback);

Events:

    // temperature in °C
    nodeSensor.on('thermocoupleTemperatureReading', callback(temperature));

__Barcode__

Press button to scan barcode.

Events:

    nodeSensor.on('barCodeReading', callback(barCode));


text:
using CatSkald.Roguelike.Core.Terrain;

namespace CatSkald.Roguelike.Test.Core.UnitTests.TestHelpers
{
    public class FakeBaseContainer : BaseContainer<object>
    {
        public FakeBaseContainer(int width, int height)
             : base(width, height)
        {
        }
    }
}


text:
/**
 *  @author dgeorge
 *
 *  $Id: TOCManager.java,v 1.4 2008-08-14 16:38:49 pandyas Exp $
 *
 *  $Log: not supported by cvs2svn $
 *  Revision 1.3  2007/08/08 16:38:33  pandyas
 *  removed reference to camod_dev - project name change to camod
 *
 *  Revision 1.2  2006/05/08 13:33:54  georgeda
 *  Clean up warnings
 *
 *  Revision 1.1  2005/10/20 19:28:58  georgeda
 *  Added TOC functionality
 *
 *  Revision 1.5  2005/09/19 13:09:00  georgeda
 *  Slight change to interface
 *
 *
 */
package gov.nih.nci.camod.service.impl;

import gov.nih.nci.camod.webapp.form.SearchForm;

import java.util.ArrayList;
import java.util.List;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.*;

/**
 * CurationManager implementation.
 */
public class TOCManager {

    protected final Log log = LogFactory.getLog(TOCManager.class);

    private String myQueryFile;

    /**
     * Constructor. Takes in a query definition XML
     *
     * @param inQueryFile
     *            the XML file defining the TOC queries
     */
    public TOCManager(String inQueryFile) {
        myQueryFile = inQueryFile;
    }

    public List process() {

        List<TOCQueryGroup> theQueryGroups = new ArrayList<TOCQueryGroup>();

        Document theQueryConfig = null;

        // ///////////////////////////////////////////////////
        // Read in query config file.
        // ///////////////////////////////////////////////////
        try {

            // Create an instance of the DocumentBuilderFactory
            DocumentBuilderFactory theDocumentBuilderFactory = DocumentBuilderFactory.newInstance();

            theDocumentBuilderFactory.setValidating(false);
            theDocumentBuilderFactory.setNamespaceAware(true);

            // Retrieve the DocumentBuilder from the factory.
            DocumentBuilder theDocumentBuilder = theDocumentBuilderFactory.newDocumentBuilder();

            // Turn it into an in-memory object
            theQueryConfig = theDocumentBuilder.parse(myQueryFile);

            Element theQueryGroupElements = theQueryConfig.getDocumentElement();
            NodeList theQueryGroupList = theQueryGroupElements.getElementsByTagName("query_group");

            for (int i = 0; i < theQueryGroupList.getLength(); i++) {

                Element theQueryElement = (Element) theQueryGroupList.item(i);
                TOCQueryGroup theGroup = createQueryGroup(theQueryElement);
                theQueryGroups.add(theGroup);
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
        return theQueryGroups;
    }

    private TOCQueryGroup createQueryGroup(Element inElement) throws Exception {

        TOCQueryGroup theGroup = new TOCQueryGroup();

        NodeList theQueryList = inElement.getElementsByTagName("query");
        String theGroupDescription = (String) inElement.getElementsByTagName("description").item(0).getFirstChild()
                .getNodeValue();

        theGroup.setDescription(theGroupDescription);

        for (int i = 0; i < theQueryList.getLength(); i++) {

            Element theQueryElement = (Element) theQueryList.item(i);

            SearchForm theSearchForm = new SearchForm();

            // Note, these will always be there
            String theDescription = (String) theQueryElement.getElementsByTagName("description").item(0)
                    .getFirstChild().getNodeValue();
            String theKey = (String) theQueryElement.getElementsByTagName("key").item(0).getFirstChild().getNodeValue();

            NodeList theParametersList = theQueryElement.getElementsByTagName("parameters");

            // Should only be one
            if (theParametersList.getLength() == 1) {

                NodeList theParameterNodes = theParametersList.item(0).getChildNodes();

                for (int j = 0; j < theParameterNodes.getLength(); j++) {

                    if ("parameter".equals(theParameterNodes.item(j).getNodeName())) {
                        NodeList theChildNodes = theParameterNodes.item(j).getChildNodes();

                        String theParameterKey = null;
                        String theParameterValue = null;
                        for (int k = 0; k < theChildNodes.getLength(); k++) {

                            if ("name".equals(theChildNodes.item(k).getNodeName())) {
                                theParameterKey = theChildNodes.item(k).getFirstChild().getNodeValue();
                            }

                            if ("value".equals(theChildNodes.item(k).getNodeName())) {
                                theParameterValue = theChildNodes.item(k).getFirstChild().getNodeValue();
                            }
                        }
                        BeanUtils.setProperty(theSearchForm, theParameterKey, theParameterValue);
                    }
                }
            }

            try {
                int theSize = QueryManagerSingleton.instance().countMatchingAnimalModels(theSearchForm);
                theGroup.addQuery(new TOCQuery(theDescription, theKey, theSearchForm, theSize));
            } catch (Exception e) {
                log.error("Unable to generate results for query: " + theDescription, e);
            }
        }

        return theGroup;
    }

    /**
     * Test main
     */
    public static void main(java.lang.String[] args) {
        TOCManager theTOCManager = new TOCManager("C:/dev/workspace/camod/WebRoot/config/TOCQueryConfig.xml");

        List theResults = theTOCManager.process();

        try {

            TOCQueryGroup theTOCQueryGroup = (TOCQueryGroup) theResults.get(0);

            List theQueries = theTOCQueryGroup.getQueries();
            TOCQuery theQuery = (TOCQuery) theQueries.get(0);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}


text:
title: "Making an origami whale with Needham Market"
location-display-name: Needham Market Library
format: recording
link: KZU-QTu2sKw
category: crafts
service: youtube
---


text:
using System;
using System.Linq;
using System.Text;

namespace TheMovieDbNet.Models.Common
{
	/// <summary>
	/// Represents settings used to dicover media.
	/// </summary>
	public class DiscoverSettings
	{
		/// <summary>
		/// Gets or Sets the language of the media.
		/// </summary>
		public string Language { get; set; }
		/// <summary>
		/// Gets or Sets the page of dicover.
		/// </summary>
		public int Page { get; set; }
		/// <summary>
		/// Gets or Sets the minimal vote count.
		/// </summary>
		public int MinVoteCount { get; set; }
		/// <summary>
		/// Gets or Sets the genres to include in discover.
		/// </summary>
		public int[] Genres { get; set; }
		/// <summary>
		/// Gets or Sets the genres to exclude in discover.
		/// </summary>
		public int[] ExcludeGenres { get; set; }
		/// <summary>
		/// Gets or Sets the minimal runtime.
		/// </summary>
		public int MinRuntime { get; set; }
		/// <summary>
		/// Gets or Sets the maximal runtime.
		/// </summary>
		public int MaxRuntime { get; set; }
		/// <summary>
		/// Gets or Sets the original language.
		/// </summary>
		public string OriginalLanguage { get; set; }

		/// <summary>
		/// Gets or Sets the minimal vote avergae.
		/// </summary>
		public int MinVoteAverage { get; set; }

		/// <summary>
		/// Converts enum to the underscore query text for sorting.
		/// </summary>
		protected string ConvertEnum(Enum @enum)
		{
			if (@enum == null)
				throw new ArgumentNullException(nameof(@enum));

			string text = @enum.ToString();
			if (text.EndsWith("Descending"))
				text = text.Substring(0, text.Length - 10);

			StringBuilder result = new StringBuilder();

			result.Append(char.ToLower(text[0]));
			for (int i = 1; i < text.Length; i++)
			{
				if (char.IsLower(text[i]))
					result.Append(text[i]);
				else
				{
					result.Append('_');
					result.Append(char.ToLower(text[i]));
				}
			}

			if (@enum.ToString().EndsWith("Descending"))
				result.Append(".desc");
			else
				result.Append(".asc");
			return result.ToString();
		}

		/// <summary>
		/// Converts the settings to the query string representation.
		/// </summary>
		/// <returns>Query string.</returns>
		public override string ToString()
		{
			var query = new StringBuilder();
			if (!string.IsNullOrWhiteSpace(Language))
				query.Append($"&language={Language}");
			if (!string.IsNullOrWhiteSpace(OriginalLanguage))
				query.Append($"&with_original_language={OriginalLanguage}");
			if (Page > 0)
				query.Append($"&page={Page}");
			if (MinVoteCount > 0)
				query.Append($"&vote_count.gte={MinVoteCount}");
			if (MinRuntime > 0)
				query.Append($"&with_runtime.gte={MinRuntime}");
			if (MaxRuntime > 0)
				query.Append($"&with_runtime.lte={MaxRuntime}");
			if (MinVoteAverage > 0)
				query.Append($"&vote_average.gte={MinVoteAverage}");
			if (Genres?.Any() == true)
				query.Append($"&with_genres={String.Join(",", Genres)}");
			if (ExcludeGenres?.Any() == true)
				query.Append($"&without_genres={String.Join(",", ExcludeGenres)}");

			return query.ToString();
		}
	}

}


text:
from sys import argv
import codecs

print "Start."

if len(argv) < 5:
  print "Usage :   " + argv[0] + " CoordinatesFilename LocationNamePrefix countryName CityName"
  print "Example : ./gen_jv_xml.py raw.txt FakePrefix Taiwan Taipei"
  print "NOTE :    In the input file raw.txt, lines prefix with '#' will be ignored"
  exit(0)

currentScript, inputFilename, inputLocationNamePrefix, inputCountry, inputCity = argv
print "currentScript: %r" % currentScript
print "inputFilename: %r" % inputFilename
print "inputLocationNamePrefix: %r" % inputLocationNamePrefix
print "inputCountry: %r" % inputCountry
print "inputCity: %r" % inputCity

print "Opening the rawfile..."
rawfile = codecs.open(inputFilename, 'r', encoding='utf-8')
xmlfile = codecs.open(inputFilename + ".xml.txt", 'w', encoding='utf-8')

currentDataState = 0; # 0:Initialize state; 1: We are now handling departure data; 2: We are now handling destination data;
departureLatList = []
departureLonList = []
destinationLatList = []
destinationLonList = []

# Processing all lines in rawfile
lineCount=0
ignoredLineCount=0
writedLineCount=0
for string in rawfile:
  lineCount = lineCount + 1
  #print "Processing[%d]:%s" % (lineCount, string)

  if (string[0] == '#') :
    print "Ignored line[%d] : %s" % (lineCount, string)
    ignoredLineCount+=1
    continue

  # Skip the header (first line)
  if (lineCount == 1) :
    continue

  strtmp1 = string

  # Find '('
  keyIdxNext = strtmp1.find('(', 0)
  while (keyIdxNext != -1):
    # Initialize departure/destination state
    if (currentDataState == 0) :
      currentDataState = 1

    startIdx = keyIdxNext + 1
    # Find ','
    keyIdxEnd = strtmp1.find(',', startIdx)
    endIdx = keyIdxEnd
    strtmp2 = strtmp1[startIdx:endIdx]
    #print "Found latitute:%s" % (strtmp2)

    # Save latitute
    if (currentDataState == 1) :
      departureLatList.append(strtmp2);
    elif (currentDataState == 2) :
      destinationLatList.append(strtmp2);

    # Find ','
    keyIdxNext = strtmp1.find(',', endIdx)
    startIdx = keyIdxNext + 2
    # Find ')'
    keyIdxEnd = strtmp1.find(')', startIdx)
    endIdx = keyIdxEnd
    strtmp2 = strtmp1[startIdx:endIdx]
    #print "Found longitute:%s" % (strtmp2)

    # Save longitute
    if (currentDataState == 1) :
      departureLonList.append(strtmp2);
    elif (currentDataState == 2) :
      destinationLonList.append(strtmp2);

    # Try to find next keyIdxNext
    keyIdxNext = strtmp1.find('(', endIdx)

    # Toggle departure/destination state
    if (currentDataState == 1) :
      currentDataState = 2
    elif (currentDataState == 2) :
      currentDataState = 1

# After all lines in rawfile was parsed
for index in range(len(departureLatList)):
  depLat = departureLatList[index] + "0"
  depLon = departureLonList[index] + "0"
  desLat = destinationLatList[index] + "0"
  desLon = destinationLonList[index] + "0"
  #print "%s,%s\t%s,%s" % (depLat, depLon, desLat, desLon)

  # Write xml results to xmlfile
  # Prepare datas
  locationNameDeparture = inputLocationNamePrefix + "_Departure_" + str(index+1)
  locationNameDestination = inputLocationNamePrefix + "_Destination_" + str(index+1)
  country = inputCountry
  city = inputCity
  postalCode=""
  street=""
  houseNumber=""
  crossing=""
  # Write departure
  print "Writing :[%d]%s(%s,%s), %s(%s,%s)" % (index+1, locationNameDeparture, depLat, depLon, locationNameDestination, desLat, desLon)
  xmlfile.write("  <!-- For " + country + "." + city + " JunctionView Test -->\n")
  xmlfile.write("  <Location name=\"" + locationNameDeparture + "\">\n")
  xmlfile.write("    <address country=\"" + country + "\" city=\"" + city + "\" postalCode=\"" + postalCode + "\" street=\"" + street + "\" houseNumber=\"" + houseNumber + "\" crossing=\"" + crossing + "\" />\n")
  xmlfile.write("    <position latitude=\"" + depLat + "\" longitude=\"" + depLon + "\" />\n")
  xmlfile.write("  </Location>\n")
  # Write destination
  xmlfile.write("  <Location name=\"" + locationNameDestination + "\">\n")
  xmlfile.write("    <address country=\"" + country + "\" city=\"" + city + "\" postalCode=\"" + postalCode + "\" street=\"" + street + "\" houseNumber=\"" + houseNumber + "\" crossing=\"" + crossing + "\" />\n")
  xmlfile.write("    <position latitude=\"" + desLat + "\" longitude=\"" + desLon + "\" />\n")
  xmlfile.write("  </Location>\n")
  writedLineCount+=1

xmlfile.close()
rawfile.close()

print "writedLineCount:[%d], ignoredLineCount:[%d]" % (writedLineCount, ignoredLineCount)
print "Done."


text:
/**
 * Error responses
 */

'use strict';

module.exports[404] = _pageNotFound;
module.exports[401] = _unauthorized;

// private functions

function _pageNotFound(req, res) {
    var viewFilePath = '404';
    var statusCode = 404;
    var result = {
        status: statusCode
    };

    res.status(result.status);
    res.render(viewFilePath, function (err) {
        if (err) {
            return res.json(result, result.status);
        }

        res.render(viewFilePath);
    });
}

function _unauthorized(err, req, res, next) {
    if (err.name === 'UnauthorizedError') {
        return res.send(401, 'invalid token...');
    }
    next(err);
}


text:
package org.apache.kafka.jmh.record;

import kafka.api.ApiVersion;
import kafka.common.LongRef;
import kafka.log.AppendOrigin;
import kafka.log.LogValidator;
import kafka.message.CompressionCodec;
import kafka.server.BrokerTopicStats;
import org.apache.kafka.common.TopicPartition;
import org.apache.kafka.common.record.AbstractRecords;
import org.apache.kafka.common.record.BufferSupplier;
import org.apache.kafka.common.record.CompressionType;
import org.apache.kafka.common.record.MemoryRecords;
import org.apache.kafka.common.record.MemoryRecordsBuilder;
import org.apache.kafka.common.record.MutableRecordBatch;
import org.apache.kafka.common.record.Record;
import org.apache.kafka.common.record.RecordBatch;
import org.apache.kafka.common.record.TimestampType;
import org.apache.kafka.common.utils.CloseableIterator;
import org.apache.kafka.common.utils.Time;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.OperationsPerInvocation;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Warmup;
import org.openjdk.jmh.infra.Blackhole;

import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Random;

import static org.apache.kafka.common.record.RecordBatch.CURRENT_MAGIC_VALUE;

@State(Scope.Benchmark)
@Fork(value = 1)
@Warmup(iterations = 5)
@Measurement(iterations = 15)
public class RecordBatchIterationBenchmark {

    private final Random random = new Random(0);
    private final int batchCount = 100;

    public enum Bytes {
        RANDOM, ONES
    }

    @Param(value = {"1", "2", "10", "50", "200", "500"})
    private int maxBatchSize = 200;

    @Param(value = {"LZ4", "SNAPPY", "GZIP", "ZSTD", "NONE"})
    private CompressionType compressionType = CompressionType.NONE;

    @Param(value = {"1", "2"})
    private byte messageVersion = CURRENT_MAGIC_VALUE;

    @Param(value = {"100", "1000", "10000", "100000"})
    private int messageSize = 1000;

    @Param(value = {"RANDOM", "ONES"})
    private Bytes bytes = Bytes.RANDOM;

    @Param(value = {"NO_CACHING", "CREATE"})
    private String bufferSupplierStr;

    // zero starting offset is much faster for v1 batches, but that will almost never happen
    private int startingOffset;

    // Used by measureSingleMessage
    private ByteBuffer singleBatchBuffer;

    // Used by measureVariableBatchSize
    private ByteBuffer[] batchBuffers;
    private int[] batchSizes;
    private BufferSupplier bufferSupplier;
    private BrokerTopicStats brokerTopicStats = new BrokerTopicStats();

    @Setup
    public void init() {
        brokerTopicStats = new BrokerTopicStats();

        // For v0 batches a zero starting offset is much faster but that will almost never happen.
        // For v2 batches we use starting offset = 0 as these batches are relative to the base
        // offset and measureValidation will mutate these batches between iterations
        startingOffset = messageVersion == 2 ? 0 : 42;

        if (bufferSupplierStr.equals("NO_CACHING")) {
            bufferSupplier = BufferSupplier.NO_CACHING;
        } else if (bufferSupplierStr.equals("CREATE")) {
            bufferSupplier = BufferSupplier.create();
        } else {
            throw new IllegalArgumentException("Unsupported buffer supplier " + bufferSupplierStr);
        }
        singleBatchBuffer = createBatch(1);

        batchBuffers = new ByteBuffer[batchCount];
        batchSizes = new int[batchCount];
        for (int i = 0; i < batchCount; ++i) {
            int size = random.nextInt(maxBatchSize) + 1;
            batchBuffers[i] = createBatch(size);
            batchSizes[i] = size;
        }
    }

    private ByteBuffer createBatch(int batchSize) {
        byte[] value = new byte[messageSize];
        final ByteBuffer buf = ByteBuffer.allocate(
            AbstractRecords.estimateSizeInBytesUpperBound(messageVersion, compressionType, new byte[0], value,
                    Record.EMPTY_HEADERS) * batchSize
        );

        final MemoryRecordsBuilder builder =
            MemoryRecords.builder(buf, messageVersion, compressionType, TimestampType.CREATE_TIME, startingOffset);

        for (int i = 0; i < batchSize; ++i) {
            switch (bytes) {
                case ONES:
                    Arrays.fill(value, (byte) 1);
                    break;
                case RANDOM:
                    random.nextBytes(value);
                    break;
            }

            builder.append(0, null, value);
        }
        return builder.build().buffer();
    }

    @Benchmark
    public void measureValidation(Blackhole bh) throws IOException {
        MemoryRecords records = MemoryRecords.readableRecords(singleBatchBuffer.duplicate());
        LogValidator.validateMessagesAndAssignOffsetsCompressed(records, new TopicPartition("a", 0),
                new LongRef(startingOffset), Time.SYSTEM, System.currentTimeMillis(),
                CompressionCodec.getCompressionCodec(compressionType.id),
                CompressionCodec.getCompressionCodec(compressionType.id),
                false,  messageVersion, TimestampType.CREATE_TIME, Long.MAX_VALUE, 0,
                new AppendOrigin.Client$(),
                ApiVersion.latestVersion(),
                brokerTopicStats);
    }

    @Benchmark
    public void measureIteratorForBatchWithSingleMessage(Blackhole bh) throws IOException {
        for (RecordBatch batch : MemoryRecords.readableRecords(singleBatchBuffer.duplicate()).batches()) {
            try (CloseableIterator<Record> iterator = batch.streamingIterator(bufferSupplier)) {
                while (iterator.hasNext())
                    bh.consume(iterator.next());
            }
        }
    }

    @OperationsPerInvocation(value = batchCount)
    @Fork(jvmArgsAppend = "-Xmx8g")
    @Benchmark
    public void measureStreamingIteratorForVariableBatchSize(Blackhole bh) throws IOException {
        for (int i = 0; i < batchCount; ++i) {
            for (RecordBatch batch : MemoryRecords.readableRecords(batchBuffers[i].duplicate()).batches()) {
                try (CloseableIterator<Record> iterator = batch.streamingIterator(bufferSupplier)) {
                    while (iterator.hasNext())
                        bh.consume(iterator.next());
                }
            }
        }
    }

    @OperationsPerInvocation(value = batchCount)
    @Fork(jvmArgsAppend = "-Xmx8g")
    @Benchmark
    public void measureSkipIteratorForVariableBatchSize(Blackhole bh) throws IOException {
        for (int i = 0; i < batchCount; ++i) {
            for (MutableRecordBatch batch : MemoryRecords.readableRecords(batchBuffers[i].duplicate()).batches()) {
                try (CloseableIterator<Record> iterator = batch.skipKeyValueIterator(bufferSupplier)) {
                    while (iterator.hasNext())
                        bh.consume(iterator.next());
                }
            }
        }
    }
}


text:
class FavouritesController < ApplicationController
  respond_to :json
  # before_filter :authenticate_user!

  def index
  	respond_with current_user.favourites
  end

  def create
    resond_with status:404, message: 'you must provide a subject id' unless params[:subject_id]
    subject    = Subject.find(params[:subject_id])
    favourite  = current_user.favourites.create(subject: subject)
    if favourite
      respond_with favourite
    else
      respond_with status:404
    end
  end

  def destroy

    favourite = current_user.favourites.find_by(id: params[:id]) || current_user.favourites.find_by(subject_id: params[:subject_id])

    if favourite
      subject = favourite.subject
      favourite.destroy
      respond_with subject, status: 200
    else
      respond_with status: 404, message:'you must provide a subject id or a favourite id'
    end
  end

end


text:
package org.elasticsearch.client.cluster;

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

public class SniffModeInfo implements RemoteConnectionInfo.ModeInfo {
    public static final String NAME = "sniff";
    static final String SEEDS = "seeds";
    static final String NUM_NODES_CONNECTED = "num_nodes_connected";
    static final String MAX_CONNECTIONS_PER_CLUSTER = "max_connections_per_cluster";
    final List<String> seedNodes;
    final int maxConnectionsPerCluster;
    final int numNodesConnected;

    SniffModeInfo(List<String> seedNodes, int maxConnectionsPerCluster, int numNodesConnected) {
        this.seedNodes = seedNodes;
        this.maxConnectionsPerCluster = maxConnectionsPerCluster;
        this.numNodesConnected = numNodesConnected;
    }

    @Override
    public boolean isConnected() {
        return numNodesConnected > 0;
    }

    @Override
    public String modeName() {
        return NAME;
    }

    public List<String> getSeedNodes() {
        return seedNodes;
    }

    public int getMaxConnectionsPerCluster() {
        return maxConnectionsPerCluster;
    }

    public int getNumNodesConnected() {
        return numNodesConnected;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SniffModeInfo sniff = (SniffModeInfo) o;
        return maxConnectionsPerCluster == sniff.maxConnectionsPerCluster
            && numNodesConnected == sniff.numNodesConnected
            && Objects.equals(seedNodes, sniff.seedNodes);
    }

    @Override
    public int hashCode() {
        return Objects.hash(seedNodes, maxConnectionsPerCluster, numNodesConnected);
    }
}


text:
require 'nokogiri'

module OmniAuth
  module Hattrick
    class XmlParser

      attr_reader :xml

      def initialize(xml)
        @doc = Nokogiri::XML(xml)
        @manager_details = {}
      end

      def parse
        add_user_id
        add_username
        manager_details
      end

      private

      attr_accessor :manager_details
      attr_reader :doc

      def add_user_id
        manager_details[:user_id] = doc.xpath('//UserId').text
      end

      def add_username
        manager_details[:username] = doc.xpath('//Loginname').text
      end

    end
  end
end


text:
import fetch from 'isomorphic-fetch';
import { REQUEST_POSTS, RECEIVE_POSTS } from '../constants/ActionType';
import { GET_DATA_START, GET_DATA_SUCCESS } from '../constants/ActionType';
import { BASIC_URL } from '../constants/Config';
import { Tool } from '../constants/Tools';
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
const requestPosts = path => {
    return {
        type: REQUEST_POSTS,
        path
    }
}
const receivePosts = (path, json) => {
    return {
        type: RECEIVE_POSTS,
        path,
        json
    }
}
export const fetchPosts = options => {
    let url = '';
    if (options && options.url) {
         url = `${BASIC_URL}/${options.url}?type=${options.type||'all'}&limit=${options.limit||12}&page=${options.page|| 1}`;
    }
    return dispatch => {

        dispatch(requestPosts(options.url))
        return fetch(url)
            .then(response => {
                if(response.ok){
                    response.json().then(json => dispatch(receivePosts(options.url, json)))
                } else {
                    console.log(response.status);
                }
            })
            .catch(error => console.log(error))
    }
}
export const fetchPost = (path, id, mode) => {
    const url = path && `${BASIC_URL}/${path}/${id}`
    const modeUrl = mode && `${BASIC_URL}/modules/${mode}`
    const results = {topic: {}, replies: {}}
    return dispatch => {
        dispatch(requestPosts(path + '/' + id))
        return  fetch(url)
                .then(response =>response.json())
                .then(json => {
                    results.topic = json.data
                    fetch(modeUrl)
                    .then(response => response.json())
                    .then(json => {
                        results.replies = json.data
                        dispatch(receivePosts((path + '/' + id), results))
                    })
                })
                .catch(error => console.log(error))
    }
}
export const fetchMoudle = (mode,type) => {
    const url = type ? `${BASIC_URL}/modules/${mode}?type=${type}` : `${BASIC_URL}/modules/${mode}`
    return dispatch => {
        dispatch(requestPosts(mode))
        return  fetch(url)
                .then(response => response.json())
                .then(json => dispatch(receivePosts(mode, json)))
                .catch(error => console.log(error))
    }
}
const getDataStart = path => {
  return {
    type: GET_DATA_START,
    path
  }
}
const getDataSuccess = (path, json, success, name) => {
  return {
    type: GET_DATA_SUCCESS,
    path ,
    json ,
    success,
    name
  }
}
export const getDate = (path, postData, success, name) => {
    let url = BASIC_URL + path + Tool.paramType(postData);
    return dispatch => {
        dispatch(getDataStart(path));
        return fetch(url)
                .then(response => {
                    if(response.ok) {
                        response.json().then(json => dispatch(getDataSuccess(path, json, success, name)))
                    } else {
                        console.error("Looks like the response wasn't perfect, got status", response.status);
                    }
                })
                .catch(error => console.log(error))
    }
}


text:
// Generated by Haxe 3.3.0
#ifndef INCLUDED_openfl_errors_ArgumentError
#define INCLUDED_openfl_errors_ArgumentError

#ifndef HXCPP_H
#include <hxcpp.h>
#endif

#ifndef INCLUDED_openfl_errors_Error
#include <openfl/errors/Error.h>
#endif
HX_DECLARE_CLASS2(openfl,errors,ArgumentError)
HX_DECLARE_CLASS2(openfl,errors,Error)

namespace openfl{
namespace errors{

class HXCPP_CLASS_ATTRIBUTES ArgumentError_obj : public  ::openfl::errors::Error_obj
{
	public:
		typedef  ::openfl::errors::Error_obj super;
		typedef ArgumentError_obj OBJ_;
		ArgumentError_obj();

	public:
		void __construct(::String __o_message);
		inline void *operator new(size_t inSize, bool inContainer=true,const char *inName="openfl.errors.ArgumentError")
			{ return hx::Object::operator new(inSize,inContainer,inName); }
		inline void *operator new(size_t inSize, int extra)
			{ return hx::Object::operator new(inSize+extra,true,"openfl.errors.ArgumentError"); }
		static hx::ObjectPtr< ArgumentError_obj > __new(::String __o_message);
		static Dynamic __CreateEmpty();
		static Dynamic __Create(hx::DynamicArray inArgs);
		//~ArgumentError_obj();

		HX_DO_RTTI_ALL;
		static void __register();
		::String __ToString() const { return HX_HCSTRING("ArgumentError","\xeb","\x77","\x4b","\x60"); }

};

} // end namespace openfl
} // end namespace errors

#endif /* INCLUDED_openfl_errors_ArgumentError */


text:
package com.tngtech.archunit.testutil.assertion;

import java.lang.annotation.Annotation;
import java.util.Collection;
import java.util.Map;
import java.util.Set;

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.tngtech.archunit.core.domain.JavaAnnotation;
import org.assertj.core.api.AbstractIterableAssert;

import static com.tngtech.archunit.testutil.Assertions.assertThat;
import static com.tngtech.archunit.testutil.Assertions.assertThatAnnotation;

public class JavaAnnotationsAssertion extends AbstractIterableAssert<JavaAnnotationsAssertion, Set<JavaAnnotation<?>>, JavaAnnotation<?>, JavaAnnotationAssertion> {
    @SuppressWarnings({"unchecked", "rawtypes"})
    public JavaAnnotationsAssertion(Set<? extends JavaAnnotation<?>> javaAnnotations) {
        super((Set) javaAnnotations, JavaAnnotationsAssertion.class);
    }

    public JavaAnnotationsAssertion match(Collection<Annotation> annotations) {
        assertThat(actual).hasSameSizeAs(annotations);

        Map<String, JavaAnnotation<?>> actualByClassName = annotationsByClassName(actual);
        Map<String, Annotation> reflectionByClassName = reflectionByClassName(annotations);
        assertThat(actualByClassName.keySet())
                .as("annotation type names")
                .containsExactlyInAnyOrderElementsOf(reflectionByClassName.keySet());

        for (Map.Entry<String, JavaAnnotation<?>> entry : actualByClassName.entrySet()) {
            Annotation reflectionAnnotation = reflectionByClassName.get(entry.getKey());
            assertThatAnnotation(entry.getValue()).matches(reflectionAnnotation);
        }

        return myself;
    }

    private Map<String, JavaAnnotation<?>> annotationsByClassName(Iterable<JavaAnnotation<?>> annotations) {
        ImmutableMap.Builder<String, JavaAnnotation<?>> result = ImmutableMap.builder();
        for (JavaAnnotation<?> annotation : annotations) {
            result.put(annotation.getRawType().getName(), annotation);
        }
        return result.build();
    }

    private Map<String, Annotation> reflectionByClassName(Iterable<Annotation> annotations) {
        ImmutableMap.Builder<String, Annotation> result = ImmutableMap.builder();
        for (Annotation annotation : annotations) {
            result.put(annotation.annotationType().getName(), annotation);
        }
        return result.build();
    }

    @Override
    protected JavaAnnotationAssertion toAssert(JavaAnnotation<?> value, String description) {
        return assertThatAnnotation(value).as(description);
    }

    @Override
    protected JavaAnnotationsAssertion newAbstractIterableAssert(Iterable<? extends JavaAnnotation<?>> iterable) {
        return new JavaAnnotationsAssertion(ImmutableSet.copyOf(iterable));
    }
}


text:
@interface MaxFriendTrendsViewController : UIViewController

@end


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.deploymentmanager.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Defines a specific step on a target service unit. */
@Fluent
public final class RolloutStep {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(RolloutStep.class);

    /*
     * Name of the step.
     */
    @JsonProperty(value = "name", required = true)
    private String name;

    /*
     * Current state of the step.
     */
    @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
    private String status;

    /*
     * The step group the current step is part of.
     */
    @JsonProperty(value = "stepGroup")
    private String stepGroup;

    /*
     * Detailed information of specific action execution.
     */
    @JsonProperty(value = "operationInfo", access = JsonProperty.Access.WRITE_ONLY)
    private StepOperationInfo operationInfo;

    /*
     * Set of resource operations that were performed, if any, on an Azure
     * resource.
     */
    @JsonProperty(value = "resourceOperations", access = JsonProperty.Access.WRITE_ONLY)
    private List<ResourceOperation> resourceOperations;

    /*
     * Supplementary informative messages during rollout.
     */
    @JsonProperty(value = "messages", access = JsonProperty.Access.WRITE_ONLY)
    private List<Message> messages;

    /**
     * Get the name property: Name of the step.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: Name of the step.
     *
     * @param name the name value to set.
     * @return the RolloutStep object itself.
     */
    public RolloutStep withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the status property: Current state of the step.
     *
     * @return the status value.
     */
    public String status() {
        return this.status;
    }

    /**
     * Get the stepGroup property: The step group the current step is part of.
     *
     * @return the stepGroup value.
     */
    public String stepGroup() {
        return this.stepGroup;
    }

    /**
     * Set the stepGroup property: The step group the current step is part of.
     *
     * @param stepGroup the stepGroup value to set.
     * @return the RolloutStep object itself.
     */
    public RolloutStep withStepGroup(String stepGroup) {
        this.stepGroup = stepGroup;
        return this;
    }

    /**
     * Get the operationInfo property: Detailed information of specific action execution.
     *
     * @return the operationInfo value.
     */
    public StepOperationInfo operationInfo() {
        return this.operationInfo;
    }

    /**
     * Get the resourceOperations property: Set of resource operations that were performed, if any, on an Azure
     * resource.
     *
     * @return the resourceOperations value.
     */
    public List<ResourceOperation> resourceOperations() {
        return this.resourceOperations;
    }

    /**
     * Get the messages property: Supplementary informative messages during rollout.
     *
     * @return the messages value.
     */
    public List<Message> messages() {
        return this.messages;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (name() == null) {
            throw logger
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property name in model RolloutStep"));
        }
        if (operationInfo() != null) {
            operationInfo().validate();
        }
        if (resourceOperations() != null) {
            resourceOperations().forEach(e -> e.validate());
        }
        if (messages() != null) {
            messages().forEach(e -> e.validate());
        }
    }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Class FlexibleDateTimeConverter
   </title>
    <meta name="viewport" content="width=device-width">
    <meta name="title" content="Class FlexibleDateTimeConverter
   ">
    <meta name="generator" content="docfx 2.48.0.0">

    <link rel="shortcut icon" href="../images/logo.png">
    <link rel="stylesheet" href="../styles/docfx.vendor.css">
    <link rel="stylesheet" href="../styles/docfx.css">
    <link rel="stylesheet" href="../styles/main.css">
    <meta property="docfx:navrel" content="../toc.html">
    <meta property="docfx:tocrel" content="toc.html">

              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                Toggle navigation

              </button>

              <form class="navbar-form navbar-right" role="search" id="search">

                  <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">

              </form>

          Show / Hide Table of Contents

Class FlexibleDateTimeConverter

A JSON date converter that reads both ISO 8601 and epoch dates.

Inheritance

System.Object

Newtonsoft.Json.JsonConverter

Newtonsoft.Json.Converters.DateTimeConverterBase

Newtonsoft.Json.Converters.IsoDateTimeConverter

FlexibleDateTimeConverter

Inherited Members

      Newtonsoft.Json.Converters.IsoDateTimeConverter.DateTimeStyles

      Newtonsoft.Json.Converters.IsoDateTimeConverter.DateTimeFormat

      Newtonsoft.Json.Converters.IsoDateTimeConverter.Culture

      Newtonsoft.Json.Converters.DateTimeConverterBase.CanConvert(System.Type)

      Newtonsoft.Json.JsonConverter.CanRead

      System.Object.Equals(System.Object)

      System.Object.Equals(System.Object, System.Object)

      System.Object.GetHashCode()

      System.Object.GetType()

      System.Object.MemberwiseClone()

      System.Object.ReferenceEquals(System.Object, System.Object)

      System.Object.ToString()

Namespace: Auth0.Core.Serialization

Assembly: Auth0.Core.dll

Syntax

public class FlexibleDateTimeConverter : IsoDateTimeConverter

Properties

CanWrite

Declaration

public override bool CanWrite { get; }

Property Value

        Type
        Description

        System.Boolean

Overrides

Newtonsoft.Json.JsonConverter.CanWrite

Methods

ReadJson(JsonReader, Type, Object, JsonSerializer)

Declaration

public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)

Parameters

        Type
        Name
        Description

        Newtonsoft.Json.JsonReader
        reader

        System.Type
        objectType

        System.Object
        existingValue

        Newtonsoft.Json.JsonSerializer
        serializer

Returns

        Type
        Description

        System.Object

Overrides

Newtonsoft.Json.Converters.IsoDateTimeConverter.ReadJson(Newtonsoft.Json.JsonReader, System.Type, System.Object, Newtonsoft.Json.JsonSerializer)

WriteJson(JsonWriter, Object, JsonSerializer)

Declaration

public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)

Parameters

        Type
        Name
        Description

        Newtonsoft.Json.JsonWriter
        writer

        System.Object
        value

        Newtonsoft.Json.JsonSerializer
        serializer

Overrides

Newtonsoft.Json.Converters.IsoDateTimeConverter.WriteJson(Newtonsoft.Json.JsonWriter, System.Object, Newtonsoft.Json.JsonSerializer)

              Back to top

            Generated by DocFX