text:
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

# Apache Airflow (Incubating)

[![PyPI version](https://badge.fury.io/py/apache-airflow.svg)](https://badge.fury.io/py/apache-airflow)
[![Build Status](https://travis-ci.org/apache/incubator-airflow.svg?branch=master)](https://travis-ci.org/apache/incubator-airflow)
[![Coverage Status](https://img.shields.io/codecov/c/github/apache/incubator-airflow/master.svg)](https://codecov.io/github/apache/incubator-airflow?branch=master)
[![Documentation Status](https://readthedocs.org/projects/airflow/badge/?version=latest)](https://airflow.readthedocs.io/en/latest/?badge=latest)
[![License](http://img.shields.io/:license-Apache%202-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.txt)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/apache-airflow.svg)](https://pypi.org/project/apache-airflow/)
[![Twitter Follow](https://img.shields.io/twitter/follow/ApacheAirflow.svg?style=social&label=Follow)](https://twitter.com/ApacheAirflow)

Apache Airflow (or simply Airflow) is a platform to programmatically author, schedule, and monitor workflows.

When workflows are defined as code, they become more maintainable,
versionable, testable, and collaborative.

Use Airflow to author workflows as directed acyclic graphs (DAGs) of tasks. The Airflow scheduler executes your tasks on an array of workers while following the specified dependencies. Rich command line utilities make performing complex surgeries on DAGs a snap. The rich user interface makes it easy to visualize pipelines running in production, monitor progress, and troubleshoot issues when needed.

## Getting started

Please visit the Airflow Platform documentation (latest **stable** release) for help with [installing Airflow](https://airflow.incubator.apache.org/installation.html), getting a [quick start](https://airflow.incubator.apache.org/start.html), or a more complete [tutorial](https://airflow.incubator.apache.org/tutorial.html).

Documentation of GitHub master (latest development branch): [ReadTheDocs Documentation](https://airflow.readthedocs.io/en/latest/)

For further information, please visit the [Airflow Wiki](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Home).

## Beyond the Horizon

Airflow **is not** a data streaming solution. Tasks do not move data from
one to the other (though tasks can exchange metadata!). Airflow is not
in the [Spark Streaming](http://spark.apache.org/streaming/)
or [Storm](https://storm.apache.org/) space, it is more comparable to
[Oozie](http://oozie.apache.org/) or
[Azkaban](https://azkaban.github.io/).

Workflows are expected to be mostly static or slowly changing. You can think
of the structure of the tasks in your workflow as slightly more dynamic
than a database structure would be. Airflow workflows are expected to look
similar from a run to the next, this allows for clarity around
unit of work and continuity.

## Principles

- **Dynamic**:  Airflow pipelines are configuration as code (Python), allowing for dynamic pipeline generation. This allows for writing code that instantiates pipelines dynamically.
- **Extensible**:  Easily define your own operators, executors and extend the library so that it fits the level of abstraction that suits your environment.
- **Elegant**:  Airflow pipelines are lean and explicit. Parameterizing your scripts is built into the core of Airflow using the powerful **Jinja** templating engine.
- **Scalable**:  Airflow has a modular architecture and uses a message queue to orchestrate an arbitrary number of workers.

## User Interface

- **DAGs**: Overview of all DAGs in your environment.

  ![](/docs/img/dags.png)

- **Tree View**: Tree representation of a DAG that spans across time.

  ![](/docs/img/tree.png)

- **Graph View**: Visualization of a DAG's dependencies and their current status for a specific run.

  ![](/docs/img/graph.png)

- **Task Duration**: Total time spent on different tasks over time.

  ![](/docs/img/duration.png)

- **Gantt View**: Duration and overlap of a DAG.

  ![](/docs/img/gantt.png)

- **Code View**:  Quick way to view source code of a DAG.

  ![](/docs/img/code.png)

## Contributing

Want to help build Apache Airflow? Check out our [contributing documentation](https://github.com/apache/incubator-airflow/blob/master/CONTRIBUTING.md).

## Who uses Apache Airflow?

As the Apache Airflow community grows, we'd like to keep track of who is using
the platform. Please send a PR with your company name and @githubhandle
if you may.

Currently **officially** using Airflow:

1. [6play](https://www.6play.fr) [[@lemourA](https://github.com/lemoura), [@achaussende](https://github.com/achaussende), [@d-nguyen](https://github.com/d-nguyen), [@julien-gm](https://github.com/julien-gm)]
1. [8fit](https://8fit.com/) [[@nicor88](https://github.com/nicor88), [@frnzska](https://github.com/frnzska)]
1. [90 Seconds](https://90seconds.tv/) [[@aaronmak](https://github.com/aaronmak)]
1. [99](https://99taxis.com) [[@fbenevides](https://github.com/fbenevides), [@gustavoamigo](https://github.com/gustavoamigo) & [@mmmaia](https://github.com/mmmaia)]
1. [AdBOOST](https://www.adboost.sk) [[AdBOOST](https://github.com/AdBOOST)]
1. [Adobe](https://www.adobe.com/) [[@mishikaSingh](https://github.com/mishikaSingh), [@ramandumcs](https://github.com/ramandumcs), [@vardancse](https://github.com/vardancse)]
1. [Agari](https://github.com/agaridata) [[@r39132](https://github.com/r39132)]
1. [Airbnb](http://airbnb.io/) [[@mistercrunch](https://github.com/mistercrunch), [@artwr](https://github.com/artwr)]
1. [AirDNA](https://www.airdna.co)
1. [Airtel](https://www.airtel.in/) [[@harishbisht](https://github.com/harishbisht)]
1. [Alan](https://alan.eu) [[@charles-go](https://github.com/charles-go)]
1. [allegro.pl](http://allegro.tech/) [[@kretes](https://github.com/kretes)]
1. [AltX](https://www.getaltx.com/about) [[@pedromduarte](https://github.com/pedromduarte)]
1. [Apigee](https://apigee.com) [[@btallman](https://github.com/btallman)]
1. [ARGO Labs](http://www.argolabs.org) [[California Data Collaborative](https://github.com/California-Data-Collaborative)]
1. [ARMEDANGELS](https://www.armedangels.de) [[@swiffer](https://github.com/swiffer)]
1. [Arquivei](https://www.arquivei.com.br/) [[@arquivei](https://github.com/arquivei)]
1. [Astronomer](http://www.astronomer.io) [[@schnie](https://github.com/schnie), [@andscoop](https://github.com/andscoop), [@tedmiston](https://github.com/tedmiston), [@benjamingregory](https://github.com/benjamingregory)]
1. [Auth0](https://auth0.com) [[@sicarul](https://github.com/sicarul)]
1. [Away](https://awaytravel.com) [[@trunsky](https://github.com/trunsky)]
1. [Azri Solutions](http://www.azrisolutions.com/) [[@userimack](https://github.com/userimack)]
1. [BalanceHero](http://truebalance.io/) [[@swalloow](https://github.com/swalloow)]
1. [Banco de Formaturas](https://www.bancodeformaturas.com.br) [[@guiligan](https://github.com/guiligan)]
1. [BandwidthX](http://www.bandwidthx.com) [[@dineshdsharma](https://github.com/dineshdsharma)]
1. [BBM](https://www.bbm.com/)
1. [Bellhops](https://github.com/bellhops)
1. [BelugaDB](https://belugadb.com) [[@fabio-nukui](https://github.com/fabio-nukui) & [@joao-sallaberry](http://github.com/joao-sallaberry) & [@lucianoviola](https://github.com/lucianoviola) & [@tmatuki](https://github.com/tmatuki)]
1. [Betterment](https://www.betterment.com/) [[@betterment](https://github.com/Betterment)]
1. [BlaBlaCar](https://www.blablacar.com) [[@puckel](https://github.com/puckel) & [@wmorin](https://github.com/wmorin)]
1. [Bloc](https://www.bloc.io) [[@dpaola2](https://github.com/dpaola2)]
1. [Blue Yonder](http://www.blue-yonder.com) [[@blue-yonder](https://github.com/blue-yonder)]
1. [BlueApron](https://www.blueapron.com) [[@jasonjho](https://github.com/jasonjho) & [@matthewdavidhauser](https://github.com/matthewdavidhauser)]
1. [Bluecore](https://www.bluecore.com) [[@JLDLaughlin](https://github.com/JLDLaughlin)]
1. [Boda Telecom Suite - CE](https://github.com/bodastage/bts-ce) [[@erssebaggala](https://github.com/erssebaggala), [@bodastage](https://github.com/bodastage)]
1. [Bodastage Solutions](http://bodastage.com) [[@erssebaggala](https://github.com/erssebaggala), [@bodastage](https://github.com/bodastage)]
1. [Bombora Inc](https://bombora.com/) [[@jeffkpayne](https://github.com/jeffkpayne), [@TheOriginalAlex](https://github.com/TheOriginalAlex)]
1. [Bonnier Broadcasting](http://www.bonnierbroadcasting.com) [[@wileeam](https://github.com/wileeam)]
1. [BounceX](http://www.bouncex.com) [[@JoshFerge](https://github.com/JoshFerge), [@hudsonrio](https://github.com/hudsonrio), [@ronniekritou](https://github.com/ronniekritou)]
1. [Branch](https://branch.io) [[@sdebarshi](https://github.com/sdebarshi), [@dmitrig01](https://github.com/dmitrig01)]
1. [California Data Collaborative](https://github.com/California-Data-Collaborative) powered by [ARGO Labs](http://www.argolabs.org)
1. [Carbonite](https://www.carbonite.com) [[@ajbosco](https://github.com/ajbosco)]
1. [CarLabs](https://www.carlabs.ai/) [[@sganz](https://github.com/sganz) & [@odannyc](https://github.com/odannyc)]
1. [CAVA](https://www.cava.com) [[@minh5](http://github.com/minh5)]
1. [Celect](http://www.celect.com) [[@superdosh](https://github.com/superdosh) & [@chadcelect](https://github.com/chadcelect)]
1. [Censys](https://censys.io) [[@zakird](https://github.com/zakird), [@dadrian](https://github.com/dadrian), & [@andrewsardone](https://github.com/andrewsardone)]
1. [Change.org](https://www.change.org) [[@change](https://github.com/change), [@vijaykramesh](https://github.com/vijaykramesh)]
1. [Chartboost](https://www.chartboost.com) [[@cgelman](https://github.com/cgelman) & [@dclubb](https://github.com/dclubb)]
1. [Checkr](https://checkr.com) [[@tongboh](https://github.com/tongboh)]
1. [Children's Hospital of Philadelphia Division of Genomic Diagnostics](http://www.chop.edu/centers-programs/division-genomic-diagnostics) [[@genomics-geek]](https://github.com/genomics-geek/)
1. [Cinimex DataLab](http://cinimex.ru) [[@kdubovikov](https://github.com/kdubovikov)]
1. [City of San Diego](http://sandiego.gov) [[@MrMaksimize](https://github.com/mrmaksimize), [@andrell81](https://github.com/andrell81) & [@arnaudvedy](https://github.com/arnaudvedy)]
1. [Civey](https://civey.com/) [[@WesleyBatista](https://github.com/WesleyBatista)]
1. [Clairvoyant](https://clairvoyantsoft.com) [@shekharv](https://github.com/shekharv)
1. [Clover Health](https://www.cloverhealth.com) [[@gwax](https://github.com/gwax) & [@vansivallab](https://github.com/vansivallab)]
1. [Collectivehealth Inc.](https://www.collectivehealth.com) [@retornam](https://github.com/retornam)
1. [Compass](https://www.compass.com) [[@wdhorton](https://github.com/wdhorton)]
1. [ContaAzul](https://www.contaazul.com) [[@bern4rdelli](https://github.com/bern4rdelli), [@renanleme](https://github.com/renanleme) & [@sabino](https://github.com/sabino)]
1. [Cotap](https://github.com/cotap/) [[@maraca](https://github.com/maraca) & [@richardchew](https://github.com/richardchew)]
1. [Craig@Work](https://www.craigatwork.com)
1. [Credit Karma](https://www.creditkarma.com/) [[@preete-dixit-ck](https://github.com/preete-dixit-ck) & [@harish-gaggar-ck](https://github.com/harish-gaggar-ck) & [@greg-finley-ck](https://github.com/greg-finley-ck)]
1. [Creditas](https://www.creditas.com.br) [[@dcassiano](https://github.com/dcassiano)]
1. [CreditCards.com](https://www.creditcards.com/)[[@vmAggies](https://github.com/vmAggies) &  [@jay-wallaby](https://github.com/jay-wallaby)]
1. [Custom Ink](https://www.customink.com/) [[@david-dalisay](https://github.com/david-dalisay), [@dmartin11](https://github.com/dmartin11) & [@mpeteuil](https://github.com/mpeteuil)]
1. [Dailymotion](http://www.dailymotion.com/fr) [[@germaintanguy](https://github.com/germaintanguy) & [@hc](https://github.com/hc)]
1. [Danamica](https://www.danamica.dk) [[@testvinder](https://github.com/testvinder)]
1. [Data Reply](https://www.datareply.co.uk/) [[@kaxil](https://github.com/kaxil)]
1. [DataCamp](https://datacamp.com/) [[@dgrtwo](https://github.com/dgrtwo)]
1. [DataFox](https://www.datafox.com/) [[@sudowork](https://github.com/sudowork)]
1. [Digital First Media](http://www.digitalfirstmedia.com/) [[@duffn](https://github.com/duffn) & [@mschmo](https://github.com/mschmo) & [@seanmuth](https://github.com/seanmuth)]
1. [DigitalOcean](https://digitalocean.com/) [[@ajbosco](https://github.com/ajbosco)]
1. [DocuTAP](https://www.docutap.com/) [[@jshvrsn](https://github.com/jshvrsn) & [@lhvphan](https://github.com/lhvphan) & [@cloneluke](https://github.com/cloneluke)]
1. [DoorDash](https://www.doordash.com/)
1. [Dotmodus](http://dotmodus.com) [[@dannylee12](https://github.com/dannylee12)]
1. [Drivy](https://www.drivy.com) [[@AntoineAugusti](https://github.com/AntoineAugusti)]
1. [Easy Taxi](http://www.easytaxi.com/) [[@caique-lima](https://github.com/caique-lima) & [@diraol](https://github.com/diraol)]
1. [Enigma](https://www.enigma.com) [[@hydrosquall](https://github.com/hydrosquall)]
1. [eRevalue](https://www.datamaran.com) [[@hamedhsn](https://github.com/hamedhsn)]
1. [Etsy](https://www.etsy.com) [[@mchalek](https://github.com/mchalek)]
1. [evo.company](https://evo.company/) [[@orhideous](https://github.com/orhideous)]
1. [Fathom Health](https://www.fathomhealth.co/)
1. [Flipp](https://www.flipp.com) [[@sethwilsonwishabi](https://github.com/sethwilsonwishabi)]
1. [Format](https://www.format.com) [[@format](https://github.com/4ormat) & [@jasonicarter](https://github.com/jasonicarter)]
1. [FreshBooks](https://github.com/freshbooks) [[@DinoCow](https://github.com/DinoCow)]
1. [Fundera](https://fundera.com) [[@andyxhadji](https://github.com/andyxhadji)]
1. [G Adventures](https://gadventures.com) [[@samuelmullin](https://github.com/samuelmullin)]
1. [GameWisp](https://gamewisp.com) [[@tjbiii](https://github.com/TJBIII) & [@theryanwalls](https://github.com/theryanwalls)]
1. [GeneCards](https://www.genecards.org) [[@oferze](https://github.com/oferze)]
1. [Gentner Lab](http://github.com/gentnerlab) [[@neuromusic](https://github.com/neuromusic)]
1. [Get Simpl](https://getsimpl.com/) [[@rootcss](https://github.com/rootcss)]
1. [Glassdoor](https://github.com/Glassdoor) [[@syvineckruyk](https://github.com/syvineckruyk) & [@sid88in](https://github.com/sid88in)]
1. [Global Fashion Group](http://global-fashion-group.com) [[@GFG](https://github.com/GFG)]
1. [GovTech GDS](https://gds-gov.tech) [[@chrissng](https://github.com/chrissng) & [@datagovsg](https://github.com/datagovsg)]
1. [Gradeup](https://gradeup.co) [[@gradeup](https://github.com/gradeup)]
1. [Grand Rounds](https://www.grandrounds.com/) [[@richddr](https://github.com/richddr), [@timz1290](https://github.com/timz1290), [@wenever](https://github.com/@wenever), & [@runongirlrunon](https://github.com/runongirlrunon)]
1. [Groupalia](http://es.groupalia.com) [[@jesusfcr](https://github.com/jesusfcr)]
1. [Groupon](https://groupon.com) [[@stevencasey](https://github.com/stevencasey)]
1. [Gusto](https://gusto.com) [[@frankhsu](https://github.com/frankhsu)]
1. [Handshake](https://joinhandshake.com/) [[@mhickman](https://github.com/mhickman)]
1. [Handy](http://www.handy.com/careers/73115?gh_jid=73115&gh_src=o5qcxn) [[@marcintustin](https://github.com/marcintustin) / [@mtustin-handy](https://github.com/mtustin-handy)]
1. [happn](https://www.happn.com) [[@PierreCORBEL](https://github.com/PierreCORBEL)]
1. [HAVAN](https://www.havan.com.br) [[@botbiz](https://github.com/botbiz)]
1. [HBC Digital](http://tech.hbc.com) [[@tmccartan](https://github.com/tmccartan) & [@dmateusp](https://github.com/dmateusp)]
1. [HBO](http://www.hbo.com/)[[@yiwang](https://github.com/yiwang)]
1. [Healthjump](http://www.healthjump.com/) [[@miscbits](https://github.com/miscbits)]
1. [HelloFresh](https://www.hellofresh.com) [[@tammymendt](https://github.com/tammymendt) & [@davidsbatista](https://github.com/davidsbatista) & [@iuriinedostup](https://github.com/iuriinedostup)]
1. [Hipages](https://www.hipages.com.au/) [[@arihantsurana](https://github.com/arihantsurana)]
1. [Holimetrix](http://holimetrix.com/) [[@thibault-ketterer](https://github.com/thibault-ketterer)]
1. [Hootsuite](https://github.com/hootsuite)
1. [Hostnfly](https://www.hostnfly.com/) [[@CyrilLeMat](https://github.com/CyrilLeMat) & [@pierrechopin](https://github.com/pierrechopin) & [@alexisrosuel](https://github.com/alexisrosuel)]
1. [HotelQuickly](https://github.com/HotelQuickly) [[@zinuzoid](https://github.com/zinuzoid)]
1. [Iflix](https://piay.iflix.com) [[@ChaturvediSulabh](https://github.com/ChaturvediSulabh)]
1. [IFTTT](https://www.ifttt.com/) [[@apurvajoshi](https://github.com/apurvajoshi)]
1. [iHeartRadio](http://www.iheart.com/)[[@yiwang](https://github.com/yiwang)]
1. [imgix](https://www.imgix.com/) [[@dclubb](https://github.com/dclubb)]
1. [ING](http://www.ing.com/)
1. [Intercom](http://www.intercom.com/) [[@fox](https://github.com/fox) & [@paulvic](https://github.com/paulvic)]
1. [Investorise](https://investorise.com/) [[@svenvarkel](https://github.com/svenvarkel)]
1. [Jampp](https://github.com/jampp)
1. [Jeitto](https://www.jeitto.com.br) [[@BrennerPablo](https://github.com/BrennerPablo) & [@ds-mauri](https://github.com/ds-mauri)]
1. [Jetlore](http://www.jetlore.com/)
1. [JobTeaser](https://www.jobteaser.com) [[@stefani75](https://github.com/stefani75) &  [@knil-sama](https://github.com/knil-sama)]
1. [Kalibrr](https://www.kalibrr.com/) [[@charlesverdad](https://github.com/charlesverdad)]
1. [Karmic](https://karmiclabs.com) [[@hyw](https://github.com/hyw)]
1. [King](https://king.com) [[@nathadfield](https://github.com/nathadfield)]
1. [Kiwi.com](https://kiwi.com/) [[@underyx](https://github.com/underyx)]
1. [Kogan.com](https://github.com/kogan) [[@geeknam](https://github.com/geeknam)]
1. [KPN B.V.](https://www.kpn.com/) [[@biyanisuraj](https://github.com/biyanisuraj) & [@gmic](https://github.com/gmic)]
1. [Lemann Foundation](http://fundacaolemann.org.br) [[@fernandosjp](https://github.com/fernandosjp)]
1. [LeMans Corporation](https://www.parts-unlimited.com/) [[@alloydwhitlock](https://github.com/alloydwhitlock)] & [[@tinyrye](https://github.com/tinyrye)]
1. [LendUp](https://www.lendup.com/) [[@lendup](https://github.com/lendup)]
1. [LetsBonus](http://www.letsbonus.com) [[@jesusfcr](https://github.com/jesusfcr) & [@OpringaoDoTurno](https://github.com/OpringaoDoTurno)]
1. [Liberty Global](https://www.libertyglobal.com/) [[@LibertyGlobal](https://github.com/LibertyGlobal/)]
1. [liligo](http://liligo.com/) [[@tromika](https://github.com/tromika)]
1. [LingoChamp](http://www.liulishuo.com/) [[@haitaoyao](https://github.com/haitaoyao)]
1. [Lucid](http://luc.id) [[@jbrownlucid](https://github.com/jbrownlucid) & [@kkourtchikov](https://github.com/kkourtchikov)]
1. [Lumos Labs](https://www.lumosity.com/) [[@rfroetscher](https://github.com/rfroetscher/) & [@zzztimbo](https://github.com/zzztimbo/)]
1. [Lyft](https://www.lyft.com/)[[@feng-tao](https://github.com/feng-tao)]
1. [M4U](https://www.m4u.com.br/) [[@msantino](https://github.com/msantino)]
1. [Madrone](http://madroneco.com/) [[@mbreining](https://github.com/mbreining) & [@scotthb](https://github.com/scotthb)]
1. [Markovian](https://markovian.com/) [[@al-xv](https://github.com/al-xv), [@skogsbaeck](https://github.com/skogsbaeck), [@waltherg](https://github.com/waltherg)]
1. [Mercadoni](https://www.mercadoni.com.co) [[@demorenoc](https://github.com/demorenoc)]
1. [Mercari](http://www.mercari.com/) [[@yu-iskw](https://github.com/yu-iskw)]
1. [MFG Labs](https://github.com/MfgLabs)
1. [MiNODES](https://www.minodes.com) [[@dice89](https://github.com/dice89), [@diazcelsa](https://github.com/diazcelsa)]
1. [Modernizing Medicine](https://www.modmed.com/)[[@kehv1n](https://github.com/kehv1n), [@dalupus](https://github.com/dalupus)]
1. [Multiply](https://www.multiply.com) [[@nrhvyc](https://github.com/nrhvyc)]
1. [mytaxi](https://mytaxi.com) [[@mytaxi](https://github.com/mytaxi)]
1. [Neoway](https://www.neoway.com.br/) [[@neowaylabs](https://github.com/orgs/NeowayLabs/people)]
1. [Nerdwallet](https://www.nerdwallet.com)
1. [New Relic](https://www.newrelic.com) [[@marcweil](https://github.com/marcweil)]
1. [Newzoo](https://www.newzoo.com) [[@newzoo-nexus](https://github.com/newzoo-nexus)]
1. [NEXT Trucking](https://www.nexttrucking.com/) [[@earthmancash2](https://github.com/earthmancash2), [@kppullin](https://github.com/kppullin)]
1. [Nextdoor](https://nextdoor.com) [[@SivaPandeti](https://github.com/SivaPandeti), [@zshapiro](https://github.com/zshapiro) & [@jthomas123](https://github.com/jthomas123)]
1. [OdysseyPrime](https://www.goprime.io/) [[@davideberdin](https://github.com/davideberdin)]
1. [OfferUp](https://offerupnow.com)
1. [OneFineStay](https://www.onefinestay.com) [[@slangwald](https://github.com/slangwald)]
1. [Open Knowledge International](https://okfn.org) [@vitorbaptista](https://github.com/vitorbaptista)
1. [Overstock](https://www.github.com/overstock) [[@mhousley](https://github.com/mhousley) & [@mct0006](https://github.com/mct0006)]
1. [Pagar.me](https://pagar.me/) [[@pagarme](https://github.com/pagarme)
1. [Pandora Media](https://www.pandora.com/) [[@Acehaidrey](https://github.com/Acehaidrey) & [@wolfier](https://github.com/wolfier)]
1. [PAYMILL](https://www.paymill.com/) [[@paymill](https://github.com/paymill) & [@matthiashuschle](https://github.com/matthiashuschle)]
1. [PayPal](https://www.paypal.com/) [[@r39132](https://github.com/r39132) & [@jhsenjaliya](https://github.com/jhsenjaliya)]
1. [Pernod-Ricard](https://www.pernod-ricard.com/) [[@romain-nio](https://github.com/romain-nio)]
1. [Plaid](https://www.plaid.com/) [[@plaid](https://github.com/plaid), [@AustinBGibbons](https://github.com/AustinBGibbons) & [@jeeyoungk](https://github.com/jeeyoungk)]
1. [Playbuzz](https://www.playbuzz.com/) [[@clintonboys](https://github.com/clintonboys) & [@dbn](https://github.com/dbn)]
1. [PMC](https://pmc.com/) [[@andrewm4894](https://github.com/andrewm4894)]
1. [Poshmark](https://www.poshmark.com)
1. [Postmates](http://www.postmates.com) [[@syeoryn](https://github.com/syeoryn)]
1. [Pronto Tools](http://www.prontotools.io/) [[@zkan](https://github.com/zkan) & [@mesodiar](https://github.com/mesodiar)]
1. [Publicis Pixelpark](https://www.publicispixelpark.de/) [[@feluelle](https://github.com/feluelle)]
1. [PubNub](https://pubnub.com) [[@jzucker2](https://github.com/jzucker2)]
1. [Qplum](https://qplum.co) [[@manti](https://github.com/manti)]
1. [Quantopian](https://www.quantopian.com/) [[@eronarn](http://github.com/eronarn)]
1. [Qubole](https://qubole.com) [[@msumit](https://github.com/msumit)]
1. [Quizlet](https://quizlet.com) [[@quizlet](https://github.com/quizlet)]
1. [Quora](https://www.quora.com/)
1. [REA Group](https://www.rea-group.com/)
1. [Reddit](https://www.reddit.com/) [[@reddit](https://github.com/reddit/)]
1. [Robinhood](https://robinhood.com) [[@vineet-rh](https://github.com/vineet-rh)]
1. [Scaleway](https://scaleway.com) [[@kdeldycke](https://github.com/kdeldycke)]
1. [Sense360](https://github.com/Sense360) [[@kamilmroczek](https://github.com/KamilMroczek)]
1. [Shopkick](https://shopkick.com/) [[@shopkick](https://github.com/shopkick)]
1. [Sidecar](https://hello.getsidecar.com/) [[@getsidecar](https://github.com/getsidecar)]
1. [SimilarWeb](https://www.similarweb.com/) [[@similarweb](https://github.com/similarweb)]
1. [SmartNews](https://www.smartnews.com/) [[@takus](https://github.com/takus)]
1. [SocialCops](https://www.socialcops.com/) [[@vinayak-mehta](https://github.com/vinayak-mehta) & [@sharky93](https://github.com/sharky93)]
1. [Société générale](https://www.societegenerale.fr/) [[@medmrgh](https://github.com/medmrgh) & [@s83](https://github.com/s83)]
1. [Spotahome](https://www.spotahome.com/) [[@spotahome](https://github.com/spotahome)]
1. [Spotify](https://github.com/spotify) [[@znichols](https://github.com/znichols)]
1. [Square](https://squareup.com/)
1. [Stackspace](https://beta.stackspace.io/)
1. [Strava](https://strava.com) [[@strava](https://github.com/strava), [@dhuang](https://github.com/dhuang) & [@liamstewart](https://github.com/liamstewart)]
1. [Stripe](https://stripe.com) [[@jbalogh](https://github.com/jbalogh)]
1. [Strongmind](https://www.strongmind.com) [[@tomchapin](https://github.com/tomchapin) & [@wongstein](https://github.com/wongstein)]
1. [Surfline](https://www.surfline.com/) [[@jawang35](https://github.com/jawang35)]
1. [T2 Systems](http://t2systems.com) [[@unclaimedpants](https://github.com/unclaimedpants)]
1. [Tails.com](https://tails.com/) [[@alanmcruickshank](https://github.com/alanmcruickshank)]
1. [TEK](https://www.tek.fi/en) [[@telac](https://github.com/telac)]
1. [Tesla](https://www.tesla.com/) [[@thoralf-gutierrez](https://github.com/thoralf-gutierrez)]
1. [The Home Depot](https://www.homedepot.com/)[[@apekshithr](https://github.com/apekshithr)]
1. [THE ICONIC](https://www.theiconic.com.au/) [[@revathijay](https://github.com/revathijay)] [[@ilikedata](https://github.com/ilikedata)]
1. [Thinking Machines](https://thinkingmachin.es) [[@marksteve](https://github.com/marksteve)]
1. [Thinknear](https://www.thinknear.com/) [[@d3cay1](https://github.com/d3cay1), [@ccson](https://github.com/ccson), & [@ababian](https://github.com/ababian)]
1. [ThoughtWorks](https://www.thoughtworks.com/) [[@sann3](https://github.com/sann3)]
1. [Thumbtack](https://www.thumbtack.com/) [[@natekupp](https://github.com/natekupp)]
1. [Tictail](https://tictail.com/)
1. [Tile](https://tile.com/) [[@ranjanmanish](https://github.com/ranjanmanish)]
1. [Tokopedia](https://www.tokopedia.com/) [@topedmaria](https://github.com/topedmaria)
1. [Twine Labs](https://www.twinelabs.com/) [[@ivorpeles](https://github.com/ivorpeles)]
1. [Twitter](https://www.twitter.com/) [[@aoen](https://github.com/aoen)]
1. [Ubisoft](https://www.ubisoft.com/) [[@Walkoss](https://github.com/Walkoss)]
1. [United Airlines](https://www.united.com/) [[@ilopezfr](https://github.com/ilopezfr)]
1. [Upsight](https://www.upsight.com)
1. [VeeR VR](https://veer.tv) [[@pishilong](https://github.com/pishilong)]
1. [Vente-Exclusive.com](http://www.vente-exclusive.com/) [[@alexvanboxel](https://github.com/alexvanboxel)]
1. [Vevo](https://www.vevo.com/) [[@csetiawan](https://github.com/csetiawan) & [@jerrygillespie](https://github.com/jerrygillespie)]
1. [Vidio](https://www.vidio.com/)
1. [Ville de Montréal](http://ville.montreal.qc.ca/)[@VilledeMontreal](https://github.com/VilledeMontreal/)]
1. [Vnomics](https://github.com/vnomics) [[@lpalum](https://github.com/lpalum)]
1. [WePay](http://www.wepay.com) [[@criccomini](https://github.com/criccomini) & [@mtagle](https://github.com/mtagle)]
1. [WeTransfer](https://github.com/WeTransfer) [[@jochem](https://github.com/jochem)]
1. [Whistle Labs](http://www.whistle.com) [[@ananya77041](https://github.com/ananya77041)]
1. [WiseBanyan](https://wisebanyan.com/)
1. [Wooga](https://www.wooga.com/)
1. [Xero](https://www.xero.com/) [[@yan9yu](https://github.com/yan9yu)]
1. [Xoom](https://www.xoom.com/)
1. [Yahoo!](https://www.yahoo.com/)
1. [Yieldr](https://www.yieldr.com/) [[@ggeorgiadis](https://github.com/ggeorgiadis)]
1. [Zapier](https://www.zapier.com) [[@drknexus](https://github.com/drknexus) & [@statwonk](https://github.com/statwonk)]
1. [Zego](https://www.zego.com/) [[@ruimffl](https://github.com/ruimffl)]
1. [Zendesk](https://www.github.com/zendesk)
1. [Zenly](https://zen.ly) [[@cerisier](https://github.com/cerisier) & [@jbdalido](https://github.com/jbdalido)]
1. [Zymergen](https://www.zymergen.com/)

## Who Maintains Apache Airflow?

Airflow is the work of the [community](https://github.com/apache/incubator-airflow/graphs/contributors),
but the [core committers/maintainers](https://people.apache.org/committers-by-project.html#airflow)
are responsible for reviewing and merging PRs as well as steering conversation around new feature requests.
If you would like to become a maintainer, please review the Apache Airflow
[committer requirements](https://cwiki.apache.org/confluence/display/AIRFLOW/Committers).

## Links

- [Documentation](https://airflow.incubator.apache.org/)
- [Chat](https://apache-airflow-slack.herokuapp.com/)
- [Apache Airflow Incubation Status](http://incubator.apache.org/projects/airflow.html)
- [More](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Links)


text:
<?php

namespace PHP_CodeSniffer\Reports;

use PHP_CodeSniffer\Config;
use PHP_CodeSniffer\Files\File;

class Checkstyle implements Report
{

    /**
     * Generate a partial report for a single processed file.
     *
     * Function should return TRUE if it printed or stored data about the file
     * and FALSE if it ignored the file. Returning TRUE indicates that the file and
     * its data should be counted in the grand totals.
     *
     * @param array                 $report      Prepared report data.
     * @param \PHP_CodeSniffer\File $phpcsFile   The file being reported on.
     * @param bool                  $showSources Show sources?
     * @param int                   $width       Maximum allowed line width.
     *
     * @return bool
     */
    public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80)
    {
        $out = new \XMLWriter;
        $out->openMemory();
        $out->setIndent(true);

        if ($report['errors'] === 0 && $report['warnings'] === 0) {
            // Nothing to print.
            return false;
        }

        $out->startElement('file');
        $out->writeAttribute('name', $report['filename']);

        foreach ($report['messages'] as $line => $lineErrors) {
            foreach ($lineErrors as $column => $colErrors) {
                foreach ($colErrors as $error) {
                    $error['type'] = strtolower($error['type']);
                    if ($phpcsFile->config->encoding !== 'utf-8') {
                        $error['message'] = iconv($phpcsFile->config->encoding, 'utf-8', $error['message']);
                    }

                    $out->startElement('error');
                    $out->writeAttribute('line', $line);
                    $out->writeAttribute('column', $column);
                    $out->writeAttribute('severity', $error['type']);
                    $out->writeAttribute('message', $error['message']);
                    $out->writeAttribute('source', $error['source']);
                    $out->endElement();
                }
            }
        }//end foreach

        $out->endElement();
        echo $out->flush();

        return true;

    }//end generateFileReport()

    /**
     * Prints all violations for processed files, in a Checkstyle format.
     *
     * @param string $cachedData    Any partial report data that was returned from
     *                              generateFileReport during the run.
     * @param int    $totalFiles    Total number of files processed during the run.
     * @param int    $totalErrors   Total number of errors found during the run.
     * @param int    $totalWarnings Total number of warnings found during the run.
     * @param int    $totalFixable  Total number of problems that can be fixed.
     * @param bool   $showSources   Show sources?
     * @param int    $width         Maximum allowed line width.
     * @param bool   $interactive   Are we running in interactive mode?
     * @param bool   $toScreen      Is the report being printed to screen?
     *
     * @return void
     */
    public function generate(
        $cachedData,
        $totalFiles,
        $totalErrors,
        $totalWarnings,
        $totalFixable,
        $showSources=false,
        $width=80,
        $interactive=false,
        $toScreen=true
    ) {
        echo '<?xml version="1.0" encoding="UTF-8"?>'.PHP_EOL;
        echo '<checkstyle version="'.Config::VERSION.'">'.PHP_EOL;
        echo $cachedData;
        echo '</checkstyle>'.PHP_EOL;

    }//end generate()

}//end class

redpajama_set_name: RedPajamaGithub


text:
<?php

/**
 * Connect to a datasource
 *
 * @phpstub
 *
 * @param string $dsn
 * @param string $user
 * @param string $password
 * @param int $cursor_type
 *
 * @return resource Returns an ODBC connection id or 0 (false) on
 *                  error.
 */
function odbc_connect($dsn, $user, $password, $cursor_type = NULL)
{
}


text:
<?php

namespace Enhavo\Bundle\NewsletterBundle\Entity;

use Enhavo\Bundle\BlockBundle\Entity\AbstractBlock;

class SubscribeBlock extends AbstractBlock
{
    /** @var string|null */
    private $subscription;

    /**
     * @return string|null
     */
    public function getSubscription(): ?string
    {
        return $this->subscription;
    }

    /**
     * @param string|null $subscription
     */
    public function setSubscription(?string $subscription): void
    {
        $this->subscription = $subscription;
    }

}


text:
#import <UIKit/UIKit.h>

@interface IPNavSwitchTableViewCell : UITableViewCell {
	UISwitch *_valueSwitch;
}

@property (nonatomic, retain) UISwitch *valueSwitch;

- (id)initWithIdentifier:(NSString *)identifier;
- (void)updateWithSettingInfo:(NSDictionary *)settingInfo;

@end


text:
if ENV['RUBYOPT'].to_s.include?('-rdotopts')
  abort "Remove `-rdotopts` from RUBYOPT environment first."
end

require 'spectroscope'
require 'ae'

#if ENV['cov']
#  require 'simplecov'
#  SimpleCov.command_name File.basename($0)
#  SimpleCov.start do
#    add_filter "spec/"
#    coverage_dir 'log/coverage'
#  end
#end

require 'dotopts/api'

module Kernel

  def with_env(hash)
    hold = {}
    hash.each do |name, value|
      name, value = name.to_s, value.to_s
      hold[name], ENV[name] = ENV[name], value
    end
    begin
      yield
    ensure
      hold.each do |name, value|
        ENV[name] = value
      end
    end
  end

end


text:
package com.tyczj.extendedcalendarview;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

import com.beacat.calendar.ladycal.BuildConfig;

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

/**
 * Class that manage the database.
 * This is a singleton class, so we can be sure that the same database is used
 * by every part of the application.
 */

public class PeriodDatabase extends SQLiteOpenHelper{

     private final String TAG = PeriodDatabase.class.getSimpleName();
    private static PeriodDatabase instance;
    private int periodLength;
    private int cycleLength;

    public static synchronized PeriodDatabase getInstance(Context context) {
        if (instance == null) {
            instance = new PeriodDatabase(context);
        }
        return instance;
    }

    private PeriodDatabase(Context context) {
        super(context, DatabaseStructure.DATABASE_NAME, null, DatabaseStructure.DATABASE_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL("CREATE TABLE " + DatabaseStructure.PeriodEntry.TABLE_NAME + "(" +
                DatabaseStructure.PeriodEntry._ID + " integer primary key autoincrement, " +
                DatabaseStructure.PeriodEntry.COLUMN_NAME_START + " INTEGER, "+
                DatabaseStructure.PeriodEntry.COLUMN_NAME_PERIOD_LENGTH + " INTEGER, "+
                DatabaseStructure.PeriodEntry.COLUMN_NAME_CYCLE_LENGTH + " INTEGER, "+
                DatabaseStructure.PeriodEntry.COLUMN_NAME_END + " INTEGER);");
        db.execSQL("CREATE TABLE " + DatabaseStructure.MedEntry.TABLE_NAME + "(" +
                DatabaseStructure.MedEntry._ID + " integer primary key autoincrement, " +
                DatabaseStructure.MedEntry.COLUMN_NAME_PERIOD_ID + " INTEGER, "+
                DatabaseStructure.MedEntry.COLUMN_NAME_QUANTITY + " INTEGER, " +
                DatabaseStructure.MedEntry.COLUMN_NAME_DAY_UTC + " INTEGER);");
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        // Called when the constructor is called with a newer version for the db. In such case,
        // you have to update the existing db with new tables/columns. See ALTER TABLE.
    }

    /**
     * Insert a new period into the database
     * @param period
     */
    public void addPeriod(Period period){
        if(searchPeriodId(period) == -1 ) {

            // Create and/or open the database for writing
            SQLiteDatabase db = getWritableDatabase();

            // Sometimes I experienced a wrong insertion, probably due to the fact that it reads the db,
            // calculates and then updates. If a useful entry is inserted after the first query, it'll insert
            // a non consistent info because the calculation is based on an old value.
            db.beginTransaction();
            try {

                // cycle length: difference between the starting day and the starting day of the NEXT period
                if (period.getCycleLength() == -1) {
                    long nextStart = 0;
                    // search the next period (history insertion)
                    String query = String.format(
                            "SELECT MIN(%s) FROM %s WHERE %s > %s",
                            DatabaseStructure.PeriodEntry.COLUMN_NAME_START,
                            DatabaseStructure.PeriodEntry.TABLE_NAME,
                            DatabaseStructure.PeriodEntry.COLUMN_NAME_START,
                            String.valueOf(period.getStartDay()));

                    Cursor c = db.rawQuery(query, null);
                    if (c.getCount() > 0) {
                        c.moveToFirst();
                        nextStart = c.getLong(0);
                    }
                    c.close();
                    if (nextStart == 0) {
                        // apparently MIN returns 0 if nothing was found by the query.
                        // Set the default in this case.
                        period.setCycleLength(cycleLength);
                    }
                    else{
                        period.setCycleLength(ExtendedCalendarView.getDifferenceInDays(nextStart, period.getStartDay()));
                    }
                }

                // update the previous period with the real value
                long prevPeriodId = -1;
                long days = -1;
                String query = String.format(
                        "SELECT %s, %s FROM %s WHERE %s = (SELECT MAX(%s) FROM %s WHERE %s < %s)",
                        DatabaseStructure.PeriodEntry._ID,
                        DatabaseStructure.PeriodEntry.COLUMN_NAME_START,
                        DatabaseStructure.PeriodEntry.TABLE_NAME,
                        DatabaseStructure.PeriodEntry.COLUMN_NAME_START,
                        DatabaseStructure.PeriodEntry.COLUMN_NAME_START,
                        DatabaseStructure.PeriodEntry.TABLE_NAME,
                        DatabaseStructure.PeriodEntry.COLUMN_NAME_START,
                        String.valueOf(period.getStartDay()));
                Cursor c = db.rawQuery(query, null);
                if (c.getCount() > 0) {
                    c.moveToFirst();
                    prevPeriodId = c.getLong(0);
                    days = ExtendedCalendarView.getDifferenceInDays(period.getStartDay(), c.getLong(1));
                }
                c.close();

                    long r = db.insertOrThrow(DatabaseStructure.PeriodEntry.TABLE_NAME, null, period.toDbEntry());
                    if (prevPeriodId != -1) {
                        ContentValues v = new ContentValues();
                        v.put(DatabaseStructure.PeriodEntry.COLUMN_NAME_CYCLE_LENGTH, days);
                        db.update(DatabaseStructure.PeriodEntry.TABLE_NAME, v, "_id = ?", new String[]{String.valueOf(prevPeriodId)});
                    }
                    db.setTransactionSuccessful();

            } catch (Exception e) {
                if(BuildConfig.DEBUG) {
                    Log.e(TAG, "Error while trying to add period to database");
                }
            } finally {
                db.endTransaction();
            }
        }
    }

    /**
     * Insert a new medicine record or update if necessary
     * @param day
     */
    public void addMed (Day day){
        // Create and/or open the database for writing
        SQLiteDatabase db = getWritableDatabase();
        long id = -1;

        // Check if this day already exists in the db
        String query = String.format(
                "SELECT %s FROM %s WHERE %s = %s",
                DatabaseStructure.MedEntry._ID,
                DatabaseStructure.MedEntry.TABLE_NAME,
                DatabaseStructure.MedEntry.COLUMN_NAME_DAY_UTC,
                String.valueOf(day.getDayUTC()));

        Cursor c = db.rawQuery(query, null);

        if(c.moveToFirst()) {
            id = c.getLong(0);
        }
        c.close();

        db.beginTransaction();
        try {
            if(id == -1) {
                long m = db.insertOrThrow(DatabaseStructure.MedEntry.TABLE_NAME, null, day.getMedicineDbEntry());
                if(BuildConfig.DEBUG) {
                    Log.d(TAG, String.format("add med medId=%d: pId=%d", m, day.getPeriodId()));
                }
            }
            else{
                int r = db.update(DatabaseStructure.MedEntry.TABLE_NAME, day.getMedicineDbEntry(), "_id = ?", new String[]{String.valueOf(id)});
                if(BuildConfig.DEBUG) {
                    Log.d(TAG, String.format("add med #row=%d, medId=%d", r, id));
                }
            }
            db.setTransactionSuccessful();

        } catch (Exception e) {
            if(BuildConfig.DEBUG) {
                Log.e(TAG, "Error while trying to add medicine to database");
            }
        } finally {
            db.endTransaction();
        }
    }

    /**
     * Delete a period from the database
     * @param period
     */
    public void deletePeriod(Period period){
        // Create and/or open the database for writing
        SQLiteDatabase db = getWritableDatabase();

        // It's a good idea to wrap our insert in a transaction. This helps with performance and ensures
        // consistency of the database.
        db.beginTransaction();
        try {
            long id = searchPeriodId(period);
            if( id != -1 ) {
                int p = db.delete(DatabaseStructure.PeriodEntry.TABLE_NAME, "_id = ?", new String[]{String.valueOf(id)});
                int m = db.delete(DatabaseStructure.MedEntry.TABLE_NAME, DatabaseStructure.MedEntry.COLUMN_NAME_PERIOD_ID + " = ?", new String[]{String.valueOf(id)});
                db.setTransactionSuccessful();
            }
        } catch (Exception e) {
            if(BuildConfig.DEBUG) {
                Log.e(TAG, "Error while trying to delete period from database");
            }
        } finally {
            db.endTransaction();
        }
    }

    /**
     * Update a period dates from the database
     * @param old
     * @param updated
     */
    public void updatePeriod(Period old, Period updated){
        long id = searchPeriodId(old);
        if( id != -1 ) {
            // Create and/or open the database for writing
            SQLiteDatabase db = getWritableDatabase();

            // See comments for addPeriod()...
            db.beginTransaction();
            try {

                long prevPeriodId = -1;
                long prevCycleLength = cycleLength;

                // cycle length: only the start days count
                if (old.getStartDay() != updated.getStartDay()) {
                    // offset between the changes
                    // positive = old > updated -> current cycle longer, previous shorter
                    // negative = old < updated -> current cycle shorter, previous longer
                    long offset = ExtendedCalendarView.getDifferenceInDays(old.getStartDay(), updated.getStartDay());

                    // in case is the last period inserted, the current cycle length is a guess, so must remain the same
                    String query = String.format(
                            "SELECT MAX(%s) FROM %s",
                            DatabaseStructure.PeriodEntry.COLUMN_NAME_START,
                            DatabaseStructure.PeriodEntry.TABLE_NAME);
                    Cursor c = db.rawQuery(query, null);
                    if (c.moveToFirst()) {
                        if(c.getLong(0) != old.getStartDay()){
                            // not the last period, so update the length
                            updated.setCycleLength(old.getCycleLength() + offset);
                        }
                        else{
                            // last period, so insert the guess
                            updated.setCycleLength(cycleLength);
                        }
                    }
                    c.close();

                    // get the value of the PREVIOUS
                    query = String.format(
                            "SELECT %s, %s FROM %s WHERE %s = (SELECT MAX(%s) FROM %s WHERE %s < %s)",
                            DatabaseStructure.PeriodEntry._ID,
                            DatabaseStructure.PeriodEntry.COLUMN_NAME_CYCLE_LENGTH,
                            DatabaseStructure.PeriodEntry.TABLE_NAME,
                            DatabaseStructure.PeriodEntry.COLUMN_NAME_START,
                            DatabaseStructure.PeriodEntry.COLUMN_NAME_START,
                            DatabaseStructure.PeriodEntry.TABLE_NAME,
                            DatabaseStructure.PeriodEntry.COLUMN_NAME_START,
                            String.valueOf(old.getStartDay()));
                    c = db.rawQuery(query, null);
                    if (c.moveToFirst()) {
                        prevPeriodId = c.getLong(0);
                        prevCycleLength = c.getLong(1);
                        prevCycleLength -= offset;
                    }
                    c.close();
                }

                db.update(DatabaseStructure.PeriodEntry.TABLE_NAME, updated.toDbEntry(), "_id = ?", new String[]{String.valueOf(id)});
                if (prevPeriodId != -1) {
                    ContentValues v = new ContentValues();
                    v.put(DatabaseStructure.PeriodEntry.COLUMN_NAME_CYCLE_LENGTH, prevCycleLength);
                    db.update(DatabaseStructure.PeriodEntry.TABLE_NAME, v, "_id = ?", new String[]{String.valueOf(prevPeriodId)});
                }

                // check if the meds tab needs to be updated: delete all days that are not period anymore
                String whereClause = DatabaseStructure.MedEntry.COLUMN_NAME_PERIOD_ID + " = ? AND (" +
                        DatabaseStructure.MedEntry.COLUMN_NAME_DAY_UTC + " < ? OR " +
                        DatabaseStructure.MedEntry.COLUMN_NAME_DAY_UTC + " > ?)";
                db.delete(DatabaseStructure.MedEntry.TABLE_NAME, whereClause,
                        new String[]{String.valueOf(id), String.valueOf(updated.getStartDay()), String.valueOf(updated.getEndDay())});

                db.setTransactionSuccessful();
            } catch (Exception e) {
                if(BuildConfig.DEBUG) {
                    Log.e(TAG, "Error while trying to update period to database");
                }
            } finally {
                db.endTransaction();
            }
        }
    }

    /**
     * Search the id of the specified period
     * @param period
     * @return the id of the entry or -1 if it not exists
     */
    public long searchPeriodId(Period period){
        long id = -1;
        SQLiteDatabase db = getReadableDatabase();

        String query = String.format(
                "SELECT %s FROM %s WHERE %s = %s AND %s = %s",
                DatabaseStructure.PeriodEntry._ID,
                DatabaseStructure.PeriodEntry.TABLE_NAME,
                DatabaseStructure.PeriodEntry.COLUMN_NAME_START,
                String.valueOf(period.getStartDay()),
                DatabaseStructure.PeriodEntry.COLUMN_NAME_END,
                String.valueOf(period.getEndDay()));

        Cursor c = db.rawQuery(query, null);

        if(c.moveToFirst()) {
            id = c.getLong(0);
        }
        c.close();
        return id;
    }

    /**
     * Search the number of meds for a given day (in UTC)
     * @param day
     * @return
     */
    public int searchMeds(long day){
        int meds = 0;

        SQLiteDatabase db = getReadableDatabase();

        String query = String.format(
                "SELECT %s FROM %s WHERE %s = %s",
                DatabaseStructure.MedEntry.COLUMN_NAME_QUANTITY,
                DatabaseStructure.MedEntry.TABLE_NAME,
                DatabaseStructure.MedEntry.COLUMN_NAME_DAY_UTC,
                String.valueOf(day));

        Cursor c = db.rawQuery(query, null);
        if(c.moveToFirst()){
            meds = c.getInt(0);
        }
        c.close();
        return meds;
    }
    /**
     * Check if the day is part of a period
     * @param day
     * @return the id of the period or -1 if the day does not belong to any period
     */
    public long isPeriod(Day day){
        long id = -1;
        SQLiteDatabase db = getReadableDatabase();

        String date = String.valueOf(day.getDayUTC());

        String query = String.format(
                "SELECT %s FROM %s WHERE %s >= %s AND %s <= %s",
                DatabaseStructure.PeriodEntry._ID,
                DatabaseStructure.PeriodEntry.TABLE_NAME,
                date,
                DatabaseStructure.PeriodEntry.COLUMN_NAME_START,
                date,
                DatabaseStructure.PeriodEntry.COLUMN_NAME_END);

        Cursor c = db.rawQuery(query, null);
        if(c.moveToFirst()) {
            id = c.getLong(0);
        }
        c.close();
        return id;
    }

    /**
     * Search in the database for the given period id
     * @param id
     * @return the period object or null
     */
    public Period getPeriod(long id){
        Period p = null;

        SQLiteDatabase db = getReadableDatabase();

        String query = String.format(
                "SELECT * FROM %s WHERE _id = %s",
                DatabaseStructure.PeriodEntry.TABLE_NAME,
                id);

        Cursor c = db.rawQuery(query, null);
        if(c.moveToFirst()) {
            p = new Period(c.getLong(c.getColumnIndex(DatabaseStructure.PeriodEntry.COLUMN_NAME_START)),
                    c.getLong(c.getColumnIndex(DatabaseStructure.PeriodEntry.COLUMN_NAME_END)),
                    c.getLong(c.getColumnIndex(DatabaseStructure.PeriodEntry.COLUMN_NAME_PERIOD_LENGTH)),
                    c.getLong(c.getColumnIndex(DatabaseStructure.PeriodEntry.COLUMN_NAME_CYCLE_LENGTH)));
        }
        c.close();

        return p;
    }

    /**
    * Get all periods from the db
    * @param orderBy is the ordering flag (ASC or DESC)
    * @return the list with all the periods or null if no period was found
    * */
    public List<Period> getAllPeriods(String orderBy){
        List<Period> list = null;

        String query = String.format("SELECT * FROM %s ORDER BY %s %s",
                DatabaseStructure.PeriodEntry.TABLE_NAME,
                DatabaseStructure.PeriodEntry.COLUMN_NAME_START,
                orderBy);
        SQLiteDatabase db = getReadableDatabase();
        Cursor c = db.rawQuery(query, null);
        if(c.moveToFirst()){
            list = new ArrayList<>(c.getCount());
            do{
                Period p = new Period(c.getLong(c.getColumnIndex(DatabaseStructure.PeriodEntry.COLUMN_NAME_START)),
                        c.getLong(c.getColumnIndex(DatabaseStructure.PeriodEntry.COLUMN_NAME_END)),
                        c.getLong(c.getColumnIndex(DatabaseStructure.PeriodEntry.COLUMN_NAME_PERIOD_LENGTH)),
                        c.getLong(c.getColumnIndex(DatabaseStructure.PeriodEntry.COLUMN_NAME_CYCLE_LENGTH)));
                list.add(p);
            }while(c.moveToNext());
        }
        c.close();
        return list;
    }

    /**
     * Get all medicine from the db
     * @return the list with the data or null if no med was found
     * */
    public List<Med> getAllMeds(){
        List<Med> list = null;

        // Select all period with medical records
        String query = String.format("SELECT %s, %s, %s  FROM %s WHERE %s IN(SELECT %s FROM %s) ORDER BY %s ASC",
                DatabaseStructure.PeriodEntry.COLUMN_NAME_START,
                DatabaseStructure.PeriodEntry.COLUMN_NAME_PERIOD_LENGTH,
                DatabaseStructure.PeriodEntry._ID,
                DatabaseStructure.PeriodEntry.TABLE_NAME,
                DatabaseStructure.PeriodEntry._ID,
                DatabaseStructure.MedEntry.COLUMN_NAME_PERIOD_ID,
                DatabaseStructure.MedEntry.TABLE_NAME,
                DatabaseStructure.PeriodEntry.COLUMN_NAME_START);
        SQLiteDatabase db = getReadableDatabase();
        Cursor p = db.rawQuery(query, null);
        if(p.moveToFirst()){
            list = new ArrayList<>(p.getCount());
            do{
                Med med = new Med(p.getLong(0), p.getInt(1));

                // select all medical record for the specified period
                query = String.format("SELECT %s, %s FROM %s WHERE %s = %s",
                        DatabaseStructure.MedEntry.COLUMN_NAME_DAY_UTC,
                        DatabaseStructure.MedEntry.COLUMN_NAME_QUANTITY,
                        DatabaseStructure.MedEntry.TABLE_NAME,
                        DatabaseStructure.MedEntry.COLUMN_NAME_PERIOD_ID,
                        p.getLong(2));
                Cursor m = db.rawQuery(query, null);
                if(m.getCount() > 0){
                    m.moveToFirst();
                    do{
                        // day_of_medicine - first_day_of_period = day_in_period
                        long d = ExtendedCalendarView.getDifferenceInDays(m.getLong(0), med.getDate());
                        med.setDay((int)d, m.getInt(1));
                    }while (m.moveToNext());
                }
                m.close();

                list.add(med);

            }while (p.moveToNext());
        }
        p.close();

        return list;
    }

    public int getMaxPeriodLength(){
        int l = 0;
        // Select all period with medical records
        String query = String.format("SELECT MAX(%s) FROM %s WHERE %s IN(SELECT %s FROM %s)",
                DatabaseStructure.PeriodEntry.COLUMN_NAME_PERIOD_LENGTH,
                DatabaseStructure.PeriodEntry.TABLE_NAME,
                DatabaseStructure.PeriodEntry._ID,
                DatabaseStructure.MedEntry.COLUMN_NAME_PERIOD_ID,
                DatabaseStructure.MedEntry.TABLE_NAME);
        SQLiteDatabase db = getReadableDatabase();
        Cursor p = db.rawQuery(query, null);
        if(p.moveToFirst()){
            l = p.getInt(0);
        }
        p.close();
        return l;
    }

    public void resetDB(){
        SQLiteDatabase db = getWritableDatabase();
        db.beginTransaction();
        try {
            db.delete(DatabaseStructure.PeriodEntry.TABLE_NAME, null, null);
            db.delete(DatabaseStructure.MedEntry.TABLE_NAME, null, null);
            db.setTransactionSuccessful();
        } catch (Exception e) {
            if(BuildConfig.DEBUG) {
                Log.e(TAG, "Error while trying to delete tables");
            }
        } finally {
            db.endTransaction();
        }
    }

    /**
     * Search the last period in time
     * @return the starting day of the last period in UTC format
     */
    public long getLastPeriod(){
        long last = 0;
        String query = String.format("SELECT MAX(%s) FROM %s",
                DatabaseStructure.PeriodEntry.COLUMN_NAME_START,
                DatabaseStructure.PeriodEntry.TABLE_NAME);
        SQLiteDatabase db = getReadableDatabase();
        Cursor c = db.rawQuery(query, null);
        if(c.moveToFirst()){
            last = c.getLong(0);
        }
        c.close();
        return last;
    }

    /* Getters and setters for the two lengths. They are used at the beginning (to init the db if is empty)
     * and to derive expected periods based on the preference of the user (if she wants to use fixed value,
     * it's not used the avg. The avg is shown anyway in the statistics)
     */
    public void setPeriodLength(int defaultLength, boolean useDefaultValue){
        if(useDefaultValue)
            periodLength = defaultLength;
        else{
            int l = getPeriodLengthAvg();
            if(l != 0)
                periodLength = l;
            else
                periodLength = defaultLength;
        }
    }

    public void setCycleLength(int defaultLength, boolean useDefaultValue){
        if(useDefaultValue)
            cycleLength = defaultLength;
        else {
            int l = getCycleLengthAvg();
            if(l != 0)
                cycleLength = l;
            else
                cycleLength = defaultLength;
        }
    }

    public int getPeriodLength(){return periodLength;}

    public int getCycleLength(){return cycleLength;}

    /** Calculate the avg basing on the db values
     * @return the avg or 0 if the db is empty or an error occur */
    public int getPeriodLengthAvg(){
        int retval = 0;
        String query = String.format("SELECT AVG(%s) FROM %s",
                DatabaseStructure.PeriodEntry.COLUMN_NAME_PERIOD_LENGTH,
                DatabaseStructure.PeriodEntry.TABLE_NAME);
        SQLiteDatabase db = getReadableDatabase();
        Cursor c = db.rawQuery(query, null);
        if (c.moveToFirst()) {
            int l = c.getInt(0);
            if (l > 0)
                retval = l;
        }
        c.close();
        return retval;
    }

    /** Calculate the avg basing on the db values
     * @return the avg or 0 if the db is empty or an error occur */
    public int getCycleLengthAvg(){
        int retval = 0;
        String query = String.format("SELECT AVG(%s) FROM %s WHERE %s > 0",
                DatabaseStructure.PeriodEntry.COLUMN_NAME_CYCLE_LENGTH,
                DatabaseStructure.PeriodEntry.TABLE_NAME,
                DatabaseStructure.PeriodEntry.COLUMN_NAME_CYCLE_LENGTH);
        SQLiteDatabase db = getReadableDatabase();
        Cursor c = db.rawQuery(query, null);
        if (c.moveToFirst()) {
            int l = c.getInt(0);
            if (l > 0)
                retval = l;
        }
        c.close();
        return retval;
    }

    public void deleteMed(Day day) {
        SQLiteDatabase db = getWritableDatabase();
        long id = -1;
        String query = String.format(
                "SELECT %s FROM %s WHERE %s = %s",
                DatabaseStructure.MedEntry._ID,
                DatabaseStructure.MedEntry.TABLE_NAME,
                DatabaseStructure.MedEntry.COLUMN_NAME_DAY_UTC,
                String.valueOf(day.getDayUTC()));

        Cursor c = db.rawQuery(query, null);

        if(c.moveToFirst()) {
            id = c.getLong(0);
        }
        c.close();

        db.beginTransaction();
        try {
            if( id != -1 ) {
                db.delete(DatabaseStructure.MedEntry.TABLE_NAME, "_id = ?", new String[]{String.valueOf(id)});
                db.setTransactionSuccessful();
            }
        } catch (Exception e) {
            if(BuildConfig.DEBUG) {
                Log.e(TAG, "Error while trying to delete period from database");
            }
        } finally {
            db.endTransaction();
        }
    }

    /**
     * Delete all entry from Period and Med older than the limit.
     * @param limit
     */
    public void deleteHistory(long limit) {
        SQLiteDatabase db = getWritableDatabase();
        db.beginTransaction();
        try{
            int p = db.delete(DatabaseStructure.PeriodEntry.TABLE_NAME, DatabaseStructure.PeriodEntry.COLUMN_NAME_START + " <= ?",
                    new String[]{String.valueOf(limit)});
            int m = db.delete(DatabaseStructure.MedEntry.TABLE_NAME, DatabaseStructure.MedEntry.COLUMN_NAME_DAY_UTC + " <= ?",
                    new String[]{String.valueOf(limit)});
            db.setTransactionSuccessful();
        }catch (Exception e) {
            if(BuildConfig.DEBUG) {
                Log.e(TAG, "Error while trying to delete old entries from database");
            }
        } finally {
            db.endTransaction();
        }
    }
}


text:
@interface STSearchBar ()

- (void)_privateSetup;

@end

@implementation STSearchBar

- (void)_privateSetup {
    self.autoresizingMask = UIViewAutoresizingFlexibleWidth;
}

- (id)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self _privateSetup];
    }
    return self;
}

- (id)initWithCoder:(NSCoder *)aDecoder {
    self = [super initWithCoder:aDecoder];
    if (self) {
        [self _privateSetup];
    }
    return self;
}

- (void)didMoveToSuperview {
    self.frame = CGRectMake(self.frame.origin.x,
                            self.frame.origin.y,
                            self.superview.bounds.size.width,
                            self.frame.size.height);
}

@end


text:
package org.ms2ms.math;

public class Erlang
{
	public static final double DEFAULT_RET_VAL=99999;

	public static double factorial(long n) {
		double prod = 1;
		for (long k = 1; k <= n; ++k) prod *= k;
		return prod;
	}

	public static double ln_factorial(long n) {
	  double prod;

	  if (n > 15) prod = 0.5 * Math.log((double )(2 * n * Math.PI)) + n * Math.log((double )n) - n;
	  else        prod = Math.log((double )factorial(n));

	  return prod;
	}

	public static double ln_combination(long n, long k) {

	  double comb = ln_factorial(n) - ln_factorial(k) - ln_factorial(n-k);
	  return comb;
	}

	public static double erlangPValue(double lambda, int k, double x){
		// = IncompleteGamma(k, x*lambda) / Gamma(k)

		// = e^-b . Summation (for i=0 to k-1) (b^i / i!)  ... where b = x*lambda

		double result=0;
		double b= x*lambda;
		if(b < 0.00001){return DEFAULT_RET_VAL;}
		for(int i=0; i<k; i++){
			double log_b_raisedto_i = i*Math.log(b);
			double log_i_factorial = ln_factorial((long) i);
			result+= Math.exp(log_b_raisedto_i - log_i_factorial);
		}

		result = result* Math.exp(-1*b);
		return result;
	}

}


text:
'use strict';

// var manifoldjsLib = require('manifoldjs-lib');

// var validationConstants = manifoldjsLib.constants.validation,
//     imageValidation =  manifoldjsLib.manifestTools.imageValidation,
//     imageGroupValidation =  manifoldjsLib.manifestTools.imageGroupValidation;

// var constants = require('../constants');

module.exports = function (manifestContent, callback) {
  return callback();

  //  returning a single result (example: issues with icons):
  //--------------------------------
  // return callback(undefined, {
  //   'description': 'You may want to add the X icon',
  //   'platform': constants.platform.id,
  //   'level': validationConstants.levels.suggestion,
  //   'members': validationConstants.manifestMembers.icons,
  //   'code': validationConstants.codes.missingImage
  // });

  //  returning multiple results (example: issues with icons):
  //--------------------------------
  // return callback(undefined, [{
  //   'description': 'You may want to add the X icon',
  //   'platform': constants.platform.id,
  //   'level': validationConstants.levels.suggestion,
  //   'members': validationConstants.manifestMembers.icons,
  //   'code': validationConstants.codes.missingImage
  // },
  // {
  //   'description': 'An issue with the icons format',
  //   'platform': constants.platform.id,
  //   'level': validationConstants.levels.suggestion,
  //   'members': validationConstants.manifestMembers.icons,
  //   'code': validationConstants.codes.missingImage
  // }]);
};


text:
class CImageICO : public CImageFmt {
 public:
  static CImageICO *getInstance() {
    static CImageICO *instance;

    if (! instance)
      instance = new CImageICO;

    return instance;
  }

  bool read(CFile *file, CImagePtr &image);
  bool readHeader(CFile *file, CImagePtr &image);

  bool write(CFile *file, CImagePtr image);

 private:
  CImageICO() :
    CImageFmt(CFILE_TYPE_IMAGE_ICO) {
  }

 ~CImageICO() { }

  CImageICO(const CImageICO &ico);

  CImageICO &operator=(const CImageICO &ico);

 private:
  void writeInteger(CFile *file, int data);
  void writeShort(CFile *file, int data);
  void writeByte(CFile *file, int data);
};

#endif


text:
#pragma once

#include "il2cpp-config.h"

#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif

#include <stdint.h>
#include <assert.h>
#include <exception>

// UnityEngine.iOS.LocalNotification
struct LocalNotification_t1344855248;
// System.String
struct String_t;
// System.Collections.IDictionary
struct IDictionary_t537317817;

#include "codegen/il2cpp-codegen.h"
#include "mscorlib_System_DateTime4283661327.h"
#include "mscorlib_System_String7231557.h"
#include "UnityEngine_UnityEngine_iOS_CalendarUnit3375281836.h"
#include "UnityEngine_UnityEngine_iOS_CalendarIdentifier514511185.h"

// System.Void UnityEngine.iOS.LocalNotification::.ctor()
extern "C"  void LocalNotification__ctor_m2361357092 (LocalNotification_t1344855248 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UnityEngine.iOS.LocalNotification::.cctor()
extern "C"  void LocalNotification__cctor_m4000496905 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Double UnityEngine.iOS.LocalNotification::GetFireDate()
extern "C"  double LocalNotification_GetFireDate_m3226659871 (LocalNotification_t1344855248 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UnityEngine.iOS.LocalNotification::SetFireDate(System.Double)
extern "C"  void LocalNotification_SetFireDate_m1553477818 (LocalNotification_t1344855248 * __this, double ___dt0, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.DateTime UnityEngine.iOS.LocalNotification::get_fireDate()
extern "C"  DateTime_t4283661327  LocalNotification_get_fireDate_m2185968852 (LocalNotification_t1344855248 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UnityEngine.iOS.LocalNotification::set_fireDate(System.DateTime)
extern "C"  void LocalNotification_set_fireDate_m3705017239 (LocalNotification_t1344855248 * __this, DateTime_t4283661327  ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.String UnityEngine.iOS.LocalNotification::get_timeZone()
extern "C"  String_t* LocalNotification_get_timeZone_m2940284639 (LocalNotification_t1344855248 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UnityEngine.iOS.LocalNotification::set_timeZone(System.String)
extern "C"  void LocalNotification_set_timeZone_m2670784108 (LocalNotification_t1344855248 * __this, String_t* ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// UnityEngine.iOS.CalendarUnit UnityEngine.iOS.LocalNotification::get_repeatInterval()
extern "C"  int32_t LocalNotification_get_repeatInterval_m2938542676 (LocalNotification_t1344855248 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UnityEngine.iOS.LocalNotification::set_repeatInterval(UnityEngine.iOS.CalendarUnit)
extern "C"  void LocalNotification_set_repeatInterval_m2284412131 (LocalNotification_t1344855248 * __this, int32_t ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// UnityEngine.iOS.CalendarIdentifier UnityEngine.iOS.LocalNotification::get_repeatCalendar()
extern "C"  int32_t LocalNotification_get_repeatCalendar_m916891826 (LocalNotification_t1344855248 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UnityEngine.iOS.LocalNotification::set_repeatCalendar(UnityEngine.iOS.CalendarIdentifier)
extern "C"  void LocalNotification_set_repeatCalendar_m599340503 (LocalNotification_t1344855248 * __this, int32_t ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.String UnityEngine.iOS.LocalNotification::get_alertBody()
extern "C"  String_t* LocalNotification_get_alertBody_m3216658234 (LocalNotification_t1344855248 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UnityEngine.iOS.LocalNotification::set_alertBody(System.String)
extern "C"  void LocalNotification_set_alertBody_m3334455103 (LocalNotification_t1344855248 * __this, String_t* ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.String UnityEngine.iOS.LocalNotification::get_alertAction()
extern "C"  String_t* LocalNotification_get_alertAction_m4064597262 (LocalNotification_t1344855248 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UnityEngine.iOS.LocalNotification::set_alertAction(System.String)
extern "C"  void LocalNotification_set_alertAction_m860676139 (LocalNotification_t1344855248 * __this, String_t* ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Boolean UnityEngine.iOS.LocalNotification::get_hasAction()
extern "C"  bool LocalNotification_get_hasAction_m3802604239 (LocalNotification_t1344855248 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UnityEngine.iOS.LocalNotification::set_hasAction(System.Boolean)
extern "C"  void LocalNotification_set_hasAction_m3331895596 (LocalNotification_t1344855248 * __this, bool ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.String UnityEngine.iOS.LocalNotification::get_alertLaunchImage()
extern "C"  String_t* LocalNotification_get_alertLaunchImage_m3685756786 (LocalNotification_t1344855248 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UnityEngine.iOS.LocalNotification::set_alertLaunchImage(System.String)
extern "C"  void LocalNotification_set_alertLaunchImage_m2289744825 (LocalNotification_t1344855248 * __this, String_t* ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Int32 UnityEngine.iOS.LocalNotification::get_applicationIconBadgeNumber()
extern "C"  int32_t LocalNotification_get_applicationIconBadgeNumber_m598051564 (LocalNotification_t1344855248 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UnityEngine.iOS.LocalNotification::set_applicationIconBadgeNumber(System.Int32)
extern "C"  void LocalNotification_set_applicationIconBadgeNumber_m4106546993 (LocalNotification_t1344855248 * __this, int32_t ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.String UnityEngine.iOS.LocalNotification::get_soundName()
extern "C"  String_t* LocalNotification_get_soundName_m2126669654 (LocalNotification_t1344855248 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UnityEngine.iOS.LocalNotification::set_soundName(System.String)
extern "C"  void LocalNotification_set_soundName_m870364323 (LocalNotification_t1344855248 * __this, String_t* ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.String UnityEngine.iOS.LocalNotification::get_defaultSoundName()
extern "C"  String_t* LocalNotification_get_defaultSoundName_m2358493375 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Collections.IDictionary UnityEngine.iOS.LocalNotification::get_userInfo()
extern "C"  Il2CppObject * LocalNotification_get_userInfo_m4128471802 (LocalNotification_t1344855248 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UnityEngine.iOS.LocalNotification::set_userInfo(System.Collections.IDictionary)
extern "C"  void LocalNotification_set_userInfo_m3850714959 (LocalNotification_t1344855248 * __this, Il2CppObject * ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UnityEngine.iOS.LocalNotification::Destroy()
extern "C"  void LocalNotification_Destroy_m3155596668 (LocalNotification_t1344855248 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UnityEngine.iOS.LocalNotification::Finalize()
extern "C"  void LocalNotification_Finalize_m22293182 (LocalNotification_t1344855248 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UnityEngine.iOS.LocalNotification::InitWrapper()
extern "C"  void LocalNotification_InitWrapper_m910277669 (LocalNotification_t1344855248 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;


text:
<?php namespace Jralison\Galpao\Components;

use Cms\Classes\ComponentBase;

class Noticia extends ComponentBase {

    public function componentDetails() {
        return [
            'name' => 'Notícia',
            'description' => '',
        ];
    }

    public function defineProperties() {
        return [
            'slug' => [
                'title'       => 'Slug da Notícia',
                'description' => 'Procure a notícia pelo slug.',
                'default'     => '{{ :slug }}',
                'type'        => 'string'
            ],
        ];
    }
}


text:
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models

class Migration(SchemaMigration):

    def forwards(self, orm):
        # Adding field 'Image.reviewed'
        db.add_column(u'programs_image', 'reviewed',
                      self.gf('django.db.models.fields.BooleanField')(default=False),
                      keep_default=False)

        # Adding field 'Program.reviewed'
        db.add_column(u'programs_program', 'reviewed',
                      self.gf('django.db.models.fields.BooleanField')(default=False),
                      keep_default=False)

    def backwards(self, orm):
        # Deleting field 'Image.reviewed'
        db.delete_column(u'programs_image', 'reviewed')

        # Deleting field 'Program.reviewed'
        db.delete_column(u'programs_program', 'reviewed')

    models = {
        u'programs.detail': {
            'Meta': {'ordering': "(u'_order',)", 'object_name': 'Detail'},
            '_order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'program': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['programs.Program']"}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
        },
        u'programs.image': {
            'Meta': {'ordering': "['program__title', '-created']", 'object_name': 'Image'},
            'alt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'changed': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
            'program': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['programs.Program']"}),
            'reviewed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'status': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
        },
        u'programs.program': {
            'Meta': {'ordering': "['title']", 'object_name': 'Program'},
            'abbr': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'body': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'changed': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'lead': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'reviewed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'status': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
        }
    }

    complete_apps = ['programs']


text:
package coal

import (
	"context"
	"io"
	"sync"
	"testing"

	"github.com/256dpi/xo"
	"github.com/stretchr/testify/assert"
	"go.mongodb.org/mongo-driver/bson"
)

func TestConnect(t *testing.T) {
	store := MustConnect("mongodb://0.0.0.0/test-fire-coal", xo.Panic)
	assert.NotNil(t, store.Client)

	assert.Equal(t, "posts", store.C(&postModel{}).Native().Name())

	err := store.Close()
	assert.NoError(t, err)

	assert.Panics(t, func() {
		MustConnect("mongodb://0.0.0.0/test-fire-coal?authMechanism=fail", xo.Panic)
	})
}

func TestOpen(t *testing.T) {
	store := MustOpen(nil, "test-fire-coal", xo.Panic)
	assert.NotNil(t, store.Client)

	assert.Equal(t, "posts", store.C(&postModel{}).Native().Name())

	err := store.Close()
	assert.NoError(t, err)
}

func TestStoreLungo(t *testing.T) {
	assert.True(t, lungoStore.Lungo())
	assert.False(t, mongoStore.Lungo())
}

func TestStoreT(t *testing.T) {
	withTester(t, func(t *testing.T, tester *Tester) {
		assert.False(t, HasTransaction(nil))

		ok, store := GetTransaction(nil)
		assert.False(t, ok)
		assert.Nil(t, store)

		assert.NoError(t, tester.Store.T(nil, false, func(tc context.Context) error {
			assert.True(t, HasTransaction(tc))

			ok, store := GetTransaction(tc)
			assert.True(t, ok)
			assert.Equal(t, tester.Store, store)

			return nil
		}))

		assert.Error(t, tester.Store.T(nil, false, func(tc context.Context) error {
			assert.True(t, HasTransaction(tc))

			ok, store := GetTransaction(tc)
			assert.True(t, ok)
			assert.Equal(t, tester.Store, store)

			return io.EOF
		}))

		tester.Insert(&postModel{})

		assert.Equal(t, 1, tester.Count(&postModel{}))

		assert.NoError(t, tester.Store.T(nil, false, func(tc context.Context) error {
			assert.True(t, HasTransaction(tc))

			ok, store := GetTransaction(tc)
			assert.True(t, ok)
			assert.Equal(t, tester.Store, store)

			_, err := tester.Store.C(&postModel{}).InsertOne(tc, &postModel{
				Base:  B(),
				Title: "foo",
			})
			return err
		}))

		assert.Equal(t, 2, tester.Count(&postModel{}))

		assert.Error(t, tester.Store.T(nil, false, func(tc context.Context) error {
			assert.True(t, HasTransaction(tc))

			ok, store := GetTransaction(tc)
			assert.True(t, ok)
			assert.Equal(t, tester.Store, store)

			_, err := tester.Store.C(&postModel{}).InsertOne(tc, &postModel{
				Base:  B(),
				Title: "bar",
			})
			if err != nil {
				panic(err)
			}

			return io.EOF
		}))

		assert.Equal(t, 2, tester.Count(&postModel{}))

		assert.NoError(t, tester.Store.T(nil, true, func(tc context.Context) error {
			assert.True(t, HasTransaction(tc))

			ok, store := GetTransaction(tc)
			assert.True(t, ok)
			assert.Equal(t, tester.Store, store)

			_, err := tester.Store.C(&postModel{}).DeleteMany(tc, bson.M{})
			if err != nil {
				panic(err)
			}

			return nil
		}))

		assert.Equal(t, 2, tester.Count(&postModel{}))
	})
}

func TestStoreRT(t *testing.T) {
	withTester(t, func(t *testing.T, tester *Tester) {
		if tester.Store.Lungo() {
			return
		}

		post := tester.Insert(&postModel{
			Base:  B(),
			Title: "foo",
		}).(*postModel)

		var attempts int
		var wg sync.WaitGroup
		wg.Add(5)
		for i := 0; i < 5; i++ {
			go func() {
				err := tester.Store.RT(nil, 5, func(ctx context.Context) error {
					attempts++
					var p postModel
					_, err := tester.Store.M(&p).Find(ctx, &p, post.ID(), false)
					if err != nil {
						return err
					}
					_, err = tester.Store.M(post).Update(ctx, post, post.ID(), bson.M{
						"$set": bson.M{
							"Title": p.Title + "-bar",
						},
					}, false)
					if err != nil {
						return err
					}
					return nil
				})
				assert.NoError(t, err)
				wg.Done()
			}()
		}
		wg.Wait()
		assert.True(t, attempts > 5)

		tester.Refresh(post)
		assert.Equal(t, "foo-bar-bar-bar-bar-bar", post.Title)
	})
}


text:
using System.Collections.Generic;
using System.Linq;
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.NRefactory.TypeSystem;

namespace OmniSharp.CurrentFileMembers {

    public class CurrentFileMembersAsTreeResponse {
        public CurrentFileMembersAsTreeResponse() {}

        public CurrentFileMembersAsTreeResponse
            ( IEnumerable<IUnresolvedTypeDefinition> types
            , IDocument document) {

            this.TopLevelTypeDefinitions = types
                .Select(tld => Node.AsTree(tld, document));
        }

        /// <summary>
        ///   The types defined in a file. They contain their members
        ///   in a tree structure.
        /// </summary>
        public IEnumerable<Node> TopLevelTypeDefinitions {get; set;}
    }
}


text:
'''Arsenal network_interfaces UI'''
#  Copyright 2015 CityGrid Media, LLC
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
#
import logging
from pyramid.view import view_config
from arsenalweb.views import (
    _api_get,
    get_authenticated_user,
    get_nav_urls,
    get_pag_params,
    site_layout,
    )

LOG = logging.getLogger(__name__)

@view_config(route_name='network_interface', permission='view', renderer='arsenalweb:templates/network_interface.pt')
def view_network_interface(request):
    '''Handle requests for network_interface UI route.'''

    page_title_type = 'objects/'
    page_title_name = 'network_interface'
    auth_user = get_authenticated_user(request)

    uri = '/api/network_interfaces/{0}'.format(request.matchdict['id'])
    network_interface = _api_get(request, uri)

    return {
        'au': auth_user,
        'network_interface': network_interface['results'][0],
        'page_title_name': page_title_name,
        'page_title_type': page_title_type,
    }

@view_config(route_name='network_interfaces', permission='view', renderer='arsenalweb:templates/network_interfaces.pt')
def view_network_interfaces(request):
    '''Handle requests for network_interfaces UI route.'''

    page_title_type = 'objects/'
    page_title_name = 'network_interfaces'
    auth_user = get_authenticated_user(request)
    (perpage, offset) = get_pag_params(request)

    payload = {}
    for k in request.GET:
        payload[k] = request.GET[k]

    # Force the UI to 50 results per page
    if not perpage:
        perpage = 50

    payload['perpage'] = perpage

    uri = '/api/network_interfaces'
    LOG.info('UI requesting data from API={0},payload={1}'.format(uri, payload))

    resp = _api_get(request, uri, payload)

    total = 0
    network_interfaces = []

    if resp:
        total = resp['meta']['total']
        network_interfaces = resp['results']

    nav_urls = get_nav_urls(request.path, offset, perpage, total, payload)

    # Used by the columns menu to determine what to show/hide.
    column_selectors = [
        {'name': 'bond_master', 'pretty_name': 'Bond Master'},
        {'name': 'created', 'pretty_name': 'Date Created'},
        {'name': 'ip_address', 'pretty_name': 'IP Address'},
        {'name': 'name', 'pretty_name': 'Name'},
        {'name': 'network_interface_id', 'pretty_name': 'Network Interface ID'},
        {'name': 'port_description', 'pretty_name': 'Port Description'},
        {'name': 'port_number', 'pretty_name': 'Port Number'},
        {'name': 'port_switch', 'pretty_name': 'Switch'},
        {'name': 'port_vlan', 'pretty_name': 'VLAN'},
        {'name': 'unique_id', 'pretty_name': 'Unique ID'},
        {'name': 'updated', 'pretty_name': 'Date Updated'},
        {'name': 'updated_by', 'pretty_name': 'Updated By'},
    ]

    return {
        'au': auth_user,
        'column_selectors': column_selectors,
        'layout': site_layout('max'),
        'nav_urls': nav_urls,
        'network_interfaces': network_interfaces,
        'offset': offset,
        'page_title_name': page_title_name,
        'page_title_type': page_title_type,
        'perpage': perpage,
        'total': total,
    }