# translation of pg_resetxlog-tr.po to Turkish
# Devrim GUNDUZ <devrim@CommandPrompt.com>, 2004, 2005, 2006, 2007.
# Nicolai TUFAR <ntufar@gmail.com>, 2004, 2005, 2006, 2007.
msgid ""
msgstr ""
"Project-Id-Version: pg_resetxlog-tr\n"
"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
"POT-Creation-Date: 2010-08-31 20:07+0000\n"
"PO-Revision-Date: 2010-09-01 10:15+0200\n"
"Last-Translator: Devrim GÜNDÜZ <devrim@gunduz.org>\n"
"Language-Team: Turkish <ceviri@postgresql.org.tr>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.9.1\n"
"X-Poedit-Language: Turkish\n"
"X-Poedit-Country: TURKEY\n"
"X-Poedit-Basepath: /home/ntufar/pg/pgsql/src/bin/pg_resetxlog/\n"

#: pg_resetxlog.c:135
#, c-format
msgid "%s: invalid argument for option -e\n"
msgstr "%s: -e seçeneği için geçersiz argüman\n"

#: pg_resetxlog.c:136
#: pg_resetxlog.c:151
#: pg_resetxlog.c:166
#: pg_resetxlog.c:181
#: pg_resetxlog.c:196
#: pg_resetxlog.c:211
#: pg_resetxlog.c:218
#: pg_resetxlog.c:225
#: pg_resetxlog.c:231
#: pg_resetxlog.c:239
#, c-format
msgid "Try \"%s --help\" for more information.\n"
msgstr "Daha fazla bilgi için \"%s --help\" parametresini kullanınız.\n"

#: pg_resetxlog.c:141
#, c-format
msgid "%s: transaction ID epoch (-e) must not be -1\n"
msgstr "%s: transaction ID epoch (-e) -1 olamaz\n"

#: pg_resetxlog.c:150
#, c-format
msgid "%s: invalid argument for option -x\n"
msgstr "%s: -x seçeneği için geçersiz argüman\n"

#: pg_resetxlog.c:156
#, c-format
msgid "%s: transaction ID (-x) must not be 0\n"
msgstr "%s: transaction ID (-x) 0 olamaz\n"

#: pg_resetxlog.c:165
#, c-format
msgid "%s: invalid argument for option -o\n"
msgstr "%s: -o seçeneği için geçersiz argüman\n"

#: pg_resetxlog.c:171
#, c-format
msgid "%s: OID (-o) must not be 0\n"
msgstr "%s: OID (-o) 0 olamaz\n"

#: pg_resetxlog.c:180
#, c-format
msgid "%s: invalid argument for option -m\n"
msgstr "%s: -m seçeneği için geçersiz argüman\n"

#: pg_resetxlog.c:186
#, c-format
msgid "%s: multitransaction ID (-m) must not be 0\n"
msgstr "%s: multitransaction ID (-m) 0 olamaz\n"

#: pg_resetxlog.c:195
#, c-format
msgid "%s: invalid argument for option -O\n"
msgstr "%s: -O seçeneği için geçersiz argüman\n"

#: pg_resetxlog.c:201
#, c-format
msgid "%s: multitransaction offset (-O) must not be -1\n"
msgstr "%s: multitransaction offset (-O) değeri -1 olamaz\n"

#: pg_resetxlog.c:210
#: pg_resetxlog.c:217
#: pg_resetxlog.c:224
#, c-format
msgid "%s: invalid argument for option -l\n"
msgstr "%s: -l seçeneği için geçersiz argüman\n"

#: pg_resetxlog.c:238
#, c-format
msgid "%s: no data directory specified\n"
msgstr "%s: veri dizini belirtilmedi\n"

#: pg_resetxlog.c:252
#, c-format
msgid "%s: cannot be executed by \"root\"\n"
msgstr "%s: \"root\" tarafından çalıştırılamaz\n"

#: pg_resetxlog.c:254
#, c-format
msgid "You must run %s as the PostgreSQL superuser.\n"
msgstr "%s komutunu PostgreSQL superuser olarak çalıştırmalısınız.\n"

#: pg_resetxlog.c:264
#, c-format
msgid "%s: could not change directory to \"%s\": %s\n"
msgstr "%s:  \"%s\" dizine geçilemedi: %s\n"

#: pg_resetxlog.c:279
#: pg_resetxlog.c:407
#, c-format
msgid "%s: could not open file \"%s\" for reading: %s\n"
msgstr "%s: \"%s\" dosyası okunmak için açılamadı: %s\n"

#: pg_resetxlog.c:285
#, c-format
msgid ""
"%s: lock file \"%s\" exists\n"
"Is a server running?  If not, delete the lock file and try again.\n"
msgstr ""
"%s: \"%s\" lock dosyası mevcut\n"
"Bir sunucu çalışıyor mu? Eğer çalışmıyorsa, lock dosyasını silin ve yeniden deneyin.\n"

#: pg_resetxlog.c:355
#, c-format
msgid ""
"\n"
"If these values seem acceptable, use -f to force reset.\n"
msgstr ""
"\n"
"Bu değerler uygun görünüyorsa, reset zorlamak için -f kullanın.\n"

#: pg_resetxlog.c:367
#, c-format
msgid ""
"The database server was not shut down cleanly.\n"
"Resetting the transaction log might cause data to be lost.\n"
"If you want to proceed anyway, use -f to force reset.\n"
msgstr ""
"Veritabanı sunucusu düzgün kapatılmadı.\n"
"Transaction kayıt dosyasını sıfırlamak veri kaybına neden olabilir.\n"
"Yine de devam etmek istiyorsanız, sıfırlama işlemini zorlamak için -f parametresini kullanınız.\n"

#: pg_resetxlog.c:381
#, c-format
msgid "Transaction log reset\n"
msgstr "Transaction kayıt dosyası sıfırlandı\n"

#: pg_resetxlog.c:410
#, c-format
msgid ""
"If you are sure the data directory path is correct, execute\n"
"  touch %s\n"
"and try again.\n"
msgstr ""
"Eğer veri dizininin doğru olduğuna eminseniz\n"
"  touch %s\n"
"komutunu çalıştırın ve tekrar deneyin.\n"

#: pg_resetxlog.c:423
#, c-format
msgid "%s: could not read file \"%s\": %s\n"
msgstr "%s: \"%s\" dosyası okunamadı: %s\n"

#: pg_resetxlog.c:446
#, c-format
msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
msgstr "%s: pg_control mevcut ancak geçersiz CRC'ye sahip, dikkat ederek devam ediniz\n"

#: pg_resetxlog.c:455
#, c-format
msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
msgstr "%s: pg_control mevcut ama bozuk ya da bilinmeyen bir sürüme sahip; gözardı ediliyor\n"

#: pg_resetxlog.c:549
#, c-format
msgid ""
"Guessed pg_control values:\n"
"\n"
msgstr ""
"Tahmin edilen pg_control değerleri:\n"
"\n"

#: pg_resetxlog.c:551
#, c-format
msgid ""
"pg_control values:\n"
"\n"
msgstr ""
"pg_control değerleri:\n"
"\n"

#: pg_resetxlog.c:560
#, c-format
msgid "First log file ID after reset:        %u\n"
msgstr "Sıfırlamadan sonraki ilk kayıt dosyası ID'si:       %u\n"

#: pg_resetxlog.c:562
#, c-format
msgid "First log file segment after reset:   %u\n"
msgstr "Sıfırlamadan sonraki ilk kayıt dosyası segmenti  %u\n"

#: pg_resetxlog.c:564
#, c-format
msgid "pg_control version number:            %u\n"
msgstr "pg_control sürüm numarası:            %u\n"

#: pg_resetxlog.c:566
#, c-format
msgid "Catalog version number:               %u\n"
msgstr "Katalog sürüm numarası:               %u\n"

#: pg_resetxlog.c:568
#, c-format
msgid "Database system identifier:           %s\n"
msgstr "Veritabanı sistem tanımlayıcısı:           %s\n"

#: pg_resetxlog.c:570
#, c-format
msgid "Latest checkpoint's TimeLineID:       %u\n"
msgstr "Son checkpoint''in TimeLineID değeri:          %u\n"

#: pg_resetxlog.c:572
#, c-format
msgid "Latest checkpoint's NextXID:          %u/%u\n"
msgstr "Son checkpoint'in NextXID değeri:          %u.%u\n"

#: pg_resetxlog.c:575
#, c-format
msgid "Latest checkpoint's NextOID:          %u\n"
msgstr "Son checkpoint''in NextOID değeri:          %u\n"

#: pg_resetxlog.c:577
#, c-format
msgid "Latest checkpoint's NextMultiXactId:  %u\n"
msgstr "Son checkpoint''in NextMultiXactId değeri:  %u\n"

#: pg_resetxlog.c:579
#, c-format
msgid "Latest checkpoint's NextMultiOffset:  %u\n"
msgstr "Son checkpoint''in NextMultiOffset değeri:  %u\n"

#: pg_resetxlog.c:581
#, c-format
msgid "Latest checkpoint's oldestXID:        %u\n"
msgstr "Son checkpoint'in oldestXID değeri:          %u\n"

#: pg_resetxlog.c:583
#, c-format
msgid "Latest checkpoint's oldestXID's DB:   %u\n"
msgstr "Son checkpoint'in oldestXID değeri'nin DB'si:          %u\n"

#: pg_resetxlog.c:585
#, c-format
msgid "Latest checkpoint's oldestActiveXID:  %u\n"
msgstr "Son checkpoint'in oldestActiveXID değeri:  %u\n"

#: pg_resetxlog.c:587
#, c-format
msgid "Maximum data alignment:               %u\n"
msgstr "Azami veri hizalama:               %u\n"

#: pg_resetxlog.c:590
#, c-format
msgid "Database block size:                  %u\n"
msgstr "Veritabanı blok büyüklüğü:                  %u\n"

#: pg_resetxlog.c:592
#, c-format
msgid "Blocks per segment of large relation: %u\n"
msgstr "büyük nesnenin bölümü başına blok sayısı: %u\n"

#: pg_resetxlog.c:594
#, c-format
msgid "WAL block size:                       %u\n"
msgstr "WAL blok büyüklüğü:                  %u\n"

#: pg_resetxlog.c:596
#, c-format
msgid "Bytes per WAL segment:                %u\n"
msgstr "WAL segment başına WAL bayt sayısı:                %u\n"

#: pg_resetxlog.c:598
#, c-format
msgid "Maximum length of identifiers:        %u\n"
msgstr "Tanımlayıcıların en yüksek sayısı:        %u\n"

#: pg_resetxlog.c:600
#, c-format
msgid "Maximum columns in an index:          %u\n"
msgstr "Bir indexteki en fazla kolon sayısı:        %u\n"

#: pg_resetxlog.c:602
#, c-format
msgid "Maximum size of a TOAST chunk:        %u\n"
msgstr "TOAST parçasının en büyük uzunluğu:        %u\n"

#: pg_resetxlog.c:604
#, c-format
msgid "Date/time type storage:               %s\n"
msgstr "Tarih/zaman tipi saklanması:               %s\n"

#: pg_resetxlog.c:605
msgid "64-bit integers"
msgstr "64-bit tamsayılar"

#: pg_resetxlog.c:605
msgid "floating-point numbers"
msgstr "kayan nokta sayılar"

#: pg_resetxlog.c:606
#, c-format
msgid "Float4 argument passing:              %s\n"
msgstr "Float4 argument passing:              %s\n"

#: pg_resetxlog.c:607
#: pg_resetxlog.c:609
msgid "by value"
msgstr "değer ils"

#: pg_resetxlog.c:607
#: pg_resetxlog.c:609
msgid "by reference"
msgstr "referans ile"

#: pg_resetxlog.c:608
#, c-format
msgid "Float8 argument passing:              %s\n"
msgstr "Float8 argument passing:              %s\n"

#: pg_resetxlog.c:671
#, c-format
msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
msgstr "%s: iç hata -- sizeof(ControlFileData) çok büyük ... PG_CONTROL_SIZE değerini düzeltiniz\n"

#: pg_resetxlog.c:686
#, c-format
msgid "%s: could not create pg_control file: %s\n"
msgstr "%s: pg_control dosyası yaratılamadı: %s\n"

#: pg_resetxlog.c:697
#, c-format
msgid "%s: could not write pg_control file: %s\n"
msgstr "%s: pg_control dosyasına yazılamadı: %s\n"

#: pg_resetxlog.c:704
#: pg_resetxlog.c:1011
#, c-format
msgid "%s: fsync error: %s\n"
msgstr "%s: fsync hatası: %s\n"

#: pg_resetxlog.c:742
#: pg_resetxlog.c:817
#: pg_resetxlog.c:873
#, c-format
msgid "%s: could not open directory \"%s\": %s\n"
msgstr "%s:  \"%s\" dizini açılamadı: %s\n"

#: pg_resetxlog.c:786
#: pg_resetxlog.c:850
#: pg_resetxlog.c:907
#, c-format
msgid "%s: could not read from directory \"%s\": %s\n"
msgstr "%s:  \"%s\" dizini okunamadı: %s\n"

#: pg_resetxlog.c:831
#: pg_resetxlog.c:888
#, c-format
msgid "%s: could not delete file \"%s\": %s\n"
msgstr "%s:  \"%s\" dosyası silinemedi: %s\n"

#: pg_resetxlog.c:978
#, c-format
msgid "%s: could not open file \"%s\": %s\n"
msgstr "%s: \"%s\" dosyası açılamadı: %s\n"

#: pg_resetxlog.c:989
#: pg_resetxlog.c:1003
#, c-format
msgid "%s: could not write file \"%s\": %s\n"
msgstr "%s: \"%s\" dosyasına yazılamadı: %s\n"

#: pg_resetxlog.c:1022
#, c-format
msgid ""
"%s resets the PostgreSQL transaction log.\n"
"\n"
msgstr ""
"%s PostgreSQL transaction kayıt dosyasını sıfırlar.\n"
"\n"

#: pg_resetxlog.c:1023
#, c-format
msgid ""
"Usage:\n"
"  %s [OPTION]... DATADIR\n"
"\n"
msgstr ""
"Kullanımı:\n"
"  %s [SEÇENEK]... VERİ_DİZİNİ\n"
"\n"

#: pg_resetxlog.c:1024
#, c-format
msgid "Options:\n"
msgstr "Seçenekler:\n"

#: pg_resetxlog.c:1025
#, c-format
msgid "  -e XIDEPOCH     set next transaction ID epoch\n"
msgstr "  -e XIDEPOCH          sıradaki transaction ID epoch ayarla\n"

#: pg_resetxlog.c:1026
#, c-format
msgid "  -f              force update to be done\n"
msgstr "  -f              güncellemenin yapılmasını zorla\n"

#: pg_resetxlog.c:1027
#, c-format
msgid "  -l TLI,FILE,SEG force minimum WAL starting location for new transaction log\n"
msgstr "  -l TLI,FILE,SEG   Yeni transaction kayıt dosyası için en düşük WAL başlama yerini belirt\n"

#: pg_resetxlog.c:1028
#, c-format
msgid "  -m XID          set next multitransaction ID\n"
msgstr "  -x XID          sıradaki multitransaction ID'sini ayarla\n"

#: pg_resetxlog.c:1029
#, c-format
msgid "  -n              no update, just show extracted control values (for testing)\n"
msgstr "  -n              bir şey değiştirmeden sadece çıkartılan kontrol değerleri göster (test için).\n"

#: pg_resetxlog.c:1030
#, c-format
msgid "  -o OID          set next OID\n"
msgstr "  -o OID          sıradaki OID'i ayarla\n"

#: pg_resetxlog.c:1031
#, c-format
msgid "  -O OFFSET       set next multitransaction offset\n"
msgstr "  -O OFFSET  sıradaki multitransaction offseti ayarla\n"

#: pg_resetxlog.c:1032
#, c-format
msgid "  -x XID          set next transaction ID\n"
msgstr "  -x XID          sıradaki transaction ID'sini ayarla\n"

#: pg_resetxlog.c:1033
#, c-format
msgid "  --help          show this help, then exit\n"
msgstr "  --help          bu yardımı göster ve çık\n"

#: pg_resetxlog.c:1034
#, c-format
msgid "  --version       output version information, then exit\n"
msgstr "  --version       sürüm bilgisini göster ve çık\n"

#: pg_resetxlog.c:1035
#, c-format
msgid ""
"\n"
"Report bugs to <pgsql-bugs@postgresql.org>.\n"
msgstr ""
"\n"
"Hataları <pgsql-bugs@postgresql.org> adresine bildiriniz.\n"

#~ msgid "%s: invalid LC_COLLATE setting\n"
#~ msgstr "%s: Geçersiz LC_COLLATE ayarı\n"

#~ msgid "%s: invalid LC_CTYPE setting\n"
#~ msgstr "%s: geçersiz LC_CTYPE ayarı\n"

#~ msgid "Maximum length of locale name:        %u\n"
#~ msgstr "Yerel adının en büyük uzunluğu:        %u\n"

#~ msgid "LC_COLLATE:                           %s\n"
#~ msgstr "LC_COLLATE:                           %s\n"

#~ msgid "LC_CTYPE:                             %s\n"
#~ msgstr "LC_CTYPE:                             %s\n"

{'repo_name': 'postgres-x2/postgres-x2', 'stars': '256', 'repo_language': 'C', 'file_name': 'create_extension.sgml', 'mime_type': 'text/html', 'hash': 6763119779425446351, 'source_dataset': 'data'}


<!--

    DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

    Copyright (c) 2012-2017 Oracle and/or its affiliates. All rights reserved.

    The contents of this file are subject to the terms of either the GNU
    General Public License Version 2 only ("GPL") or the Common Development
    and Distribution License("CDDL") (collectively, the "License").  You
    may not use this file except in compliance with the License.  You can
    obtain a copy of the License at
    https://oss.oracle.com/licenses/CDDL+GPL-1.1
    or LICENSE.txt.  See the License for the specific
    language governing permissions and limitations under the License.

    When distributing the software, include this License Header Notice in each
    file and include the License file at LICENSE.txt.

    GPL Classpath Exception:
    Oracle designates this particular file as subject to the "Classpath"
    exception as provided by Oracle in the GPL Version 2 section of the License
    file that accompanied this code.

    Modifications:
    If applicable, add the following below the License Header, with the fields
    enclosed by brackets [] replaced by your own identifying information:
    "Portions Copyright [year] [name of copyright owner]"

    Contributor(s):
    If you wish your version of this file to be governed by only the CDDL or
    only the GPL Version 2, indicate your decision by adding "[Contributor]
    elects to include this software in this distribution under the [CDDL or GPL
    Version 2] license."  If you don't indicate a single choice of license, a
    recipient has the option to distribute your version of this file under
    either the CDDL, the GPL Version 2 or to extend the choice of license to
    its licensees as provided above.  However, if you add GPL Version 2 code
    and therefore, elected the GPL Version 2 license, then the option applies
    only if the new code is made subject to such option by the copyright
    holder.

-->

<definitions name="AddNumbers"  targetNamespace="http://example.com/" xmlns:tns="http://example.com/"
    xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl">
	<types>
            <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://example.com/">

                <complexType name="addNumbersResponse">
                    <sequence>
                        <element name="return" type="xsd:int" />
                    </sequence>
                </complexType>
                <element name="addNumbersResponse" type="tns:addNumbersResponse" />
                <element name="addNumbers2Response" type="tns:addNumbersResponse" />
                <element name="addNumbers3Response" type="tns:addNumbersResponse" />

                <complexType name="addNumbers">
                    <sequence>
                        <element name="number1" type="xsd:int" />
                        <element name="number2" type="xsd:int" />
                    </sequence>
                </complexType>
                <element name="addNumbers" type="tns:addNumbers" />
                <element name="addNumbers2" type="tns:addNumbers" />
                <element name="addNumbers3" type="tns:addNumbers" />

                <element name="AddNumbersFault" type="tns:AddNumbersFault" />
                <complexType name="AddNumbersFault">
                    <sequence>
                        <element name="detail" type="xsd:string" />
                        <element name="message" type="xsd:string" />
                    </sequence>
                </complexType>
            </xsd:schema>
	</types>
	<message name="addNumbers">
            <part name="parameters" element="tns:addNumbers" />
	</message>
	<message name="addNumbersResponse">
            <part name="result" element="tns:addNumbersResponse" />
	</message>
	<message name="addNumbersFault">
            <part name="AddNumbersFault" element="tns:AddNumbersFault" />
	</message>
	<message name="addNumbers2">
            <part name="parameters" element="tns:addNumbers2" />
	</message>
	<message name="addNumbers2Response">
            <part name="result" element="tns:addNumbers2Response" />
	</message>
	<message name="addNumbers3">
            <part name="parameters" element="tns:addNumbers3" />
	</message>
	<message name="addNumbers3Response">
            <part name="result" element="tns:addNumbers3Response" />
	</message>
	<portType name="AddNumbersPortType">
            <operation name="addNumbers">
                <input message="tns:addNumbers"/>
                <output message="tns:addNumbersResponse"/>
                <fault name="addNumbersFault" message="tns:addNumbersFault"/>
            </operation>
            <operation name="addNumbers2">
                <input message="tns:addNumbers2" name="add2In"/>
                <output message="tns:addNumbers2Response" name="add2Out"/>
                <fault name="addNumbersFault" message="tns:addNumbersFault"/>
            </operation>
            <operation name="addNumbers3">
                <input message="tns:addNumbers3" wsaw:Action="3in"/>
                <output message="tns:addNumbers3Response" wsaw:Action="3out"/>
                <fault name="addNumbersFault" message="tns:addNumbersFault" wsaw:Action="3fault"/>
            </operation>
	</portType>
	<binding name="AddNumbersBinding" type="tns:AddNumbersPortType">
            <wsaw:UsingAddressing wsdl:required="false" />
            <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
            <operation name="addNumbers">
                <soap:operation soapAction="" />
                <input>
                    <soap:body use="literal" />
                </input>
                <output>
                    <soap:body use="literal" />
                </output>
                <fault name="addNumbersFault">
                    <soap:fault name="addNumbersFault" use="literal" />
                </fault>
            </operation>
            <operation name="addNumbers2">
                <soap:operation soapAction="" />
                <input>
                    <soap:body use="literal" />
                </input>
                <output>
                    <soap:body use="literal" />
                </output>
                <fault name="addNumbersFault">
                    <soap:fault name="addNumbersFault" use="literal" />
                </fault>
            </operation>
            <operation name="addNumbers3">
                <soap:operation soapAction="" />
                <input>
                    <soap:body use="literal" />
                </input>
                <output>
                    <soap:body use="literal" />
                </output>
                <fault name="addNumbersFault">
                    <soap:fault name="addNumbersFault" use="literal" />
                </fault>
            </operation>
	</binding>
	<service name="AddNumbersService">
            <port name="AddNumbersPort" binding="tns:AddNumbersBinding">
                <soap:address location="REPLACE_WITH_ACTUAL_URL" />
            </port>
	</service>
</definitions>

{'repo_name': 'javaee/metro-jax-ws', 'stars': '108', 'repo_language': 'Java', 'file_name': 'UpdateEmpResponseElementImpl.java', 'mime_type': 'text/x-java', 'hash': 4789656530233382850, 'source_dataset': 'data'}


define(
"dojox/widget/nls/ar/ColorPicker", ({
huePickerTitle: "محدد تدرج اللون",
saturationPickerTitle: "محدد درجة التشبع"
})
);

{'repo_name': 'dotCMS/core', 'stars': '553', 'repo_language': 'Java', 'file_name': 'seed.source', 'mime_type': 'text/plain', 'hash': 3340083961426227773, 'source_dataset': 'data'}


FROM alpine

COPY tmp/build/toxiproxy-server-linux-amd64 /go/bin/toxiproxy
COPY tmp/build/toxiproxy-cli-linux-amd64 /go/bin/toxiproxy-cli

EXPOSE 8474
ENTRYPOINT ["/go/bin/toxiproxy"]
CMD ["-host=0.0.0.0"]

{'repo_name': 'Shopify/toxiproxy', 'stars': '4650', 'repo_language': 'Go', 'file_name': 'toxiproxy.go', 'mime_type': 'text/x-c', 'hash': 7419384103635102655, 'source_dataset': 'data'}


const util = require('./util')

module.exports = function stringify (value, replacer, space) {
    const stack = []
    let indent = ''
    let propertyList
    let replacerFunc
    let gap = ''
    let quote

    if (
        replacer != null &&
        typeof replacer === 'object' &&
        !Array.isArray(replacer)
    ) {
        space = replacer.space
        quote = replacer.quote
        replacer = replacer.replacer
    }

    if (typeof replacer === 'function') {
        replacerFunc = replacer
    } else if (Array.isArray(replacer)) {
        propertyList = []
        for (const v of replacer) {
            let item

            if (typeof v === 'string') {
                item = v
            } else if (
                typeof v === 'number' ||
                v instanceof String ||
                v instanceof Number
            ) {
                item = String(v)
            }

            if (item !== undefined && propertyList.indexOf(item) < 0) {
                propertyList.push(item)
            }
        }
    }

    if (space instanceof Number) {
        space = Number(space)
    } else if (space instanceof String) {
        space = String(space)
    }

    if (typeof space === 'number') {
        if (space > 0) {
            space = Math.min(10, Math.floor(space))
            gap = '          '.substr(0, space)
        }
    } else if (typeof space === 'string') {
        gap = space.substr(0, 10)
    }

    return serializeProperty('', {'': value})

    function serializeProperty (key, holder) {
        let value = holder[key]
        if (value != null) {
            if (typeof value.toJSON5 === 'function') {
                value = value.toJSON5(key)
            } else if (typeof value.toJSON === 'function') {
                value = value.toJSON(key)
            }
        }

        if (replacerFunc) {
            value = replacerFunc.call(holder, key, value)
        }

        if (value instanceof Number) {
            value = Number(value)
        } else if (value instanceof String) {
            value = String(value)
        } else if (value instanceof Boolean) {
            value = value.valueOf()
        }

        switch (value) {
        case null: return 'null'
        case true: return 'true'
        case false: return 'false'
        }

        if (typeof value === 'string') {
            return quoteString(value, false)
        }

        if (typeof value === 'number') {
            return String(value)
        }

        if (typeof value === 'object') {
            return Array.isArray(value) ? serializeArray(value) : serializeObject(value)
        }

        return undefined
    }

    function quoteString (value) {
        const quotes = {
            "'": 0.1,
            '"': 0.2,
        }

        const replacements = {
            "'": "\\'",
            '"': '\\"',
            '\\': '\\\\',
            '\b': '\\b',
            '\f': '\\f',
            '\n': '\\n',
            '\r': '\\r',
            '\t': '\\t',
            '\v': '\\v',
            '\0': '\\0',
            '\u2028': '\\u2028',
            '\u2029': '\\u2029',
        }

        let product = ''

        for (let i = 0; i < value.length; i++) {
            const c = value[i]
            switch (c) {
            case "'":
            case '"':
                quotes[c]++
                product += c
                continue

            case '\0':
                if (util.isDigit(value[i + 1])) {
                    product += '\\x00'
                    continue
                }
            }

            if (replacements[c]) {
                product += replacements[c]
                continue
            }

            if (c < ' ') {
                let hexString = c.charCodeAt(0).toString(16)
                product += '\\x' + ('00' + hexString).substring(hexString.length)
                continue
            }

            product += c
        }

        const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b)

        product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar])

        return quoteChar + product + quoteChar
    }

    function serializeObject (value) {
        if (stack.indexOf(value) >= 0) {
            throw TypeError('Converting circular structure to JSON5')
        }

        stack.push(value)

        let stepback = indent
        indent = indent + gap

        let keys = propertyList || Object.keys(value)
        let partial = []
        for (const key of keys) {
            const propertyString = serializeProperty(key, value)
            if (propertyString !== undefined) {
                let member = serializeKey(key) + ':'
                if (gap !== '') {
                    member += ' '
                }
                member += propertyString
                partial.push(member)
            }
        }

        let final
        if (partial.length === 0) {
            final = '{}'
        } else {
            let properties
            if (gap === '') {
                properties = partial.join(',')
                final = '{' + properties + '}'
            } else {
                let separator = ',\n' + indent
                properties = partial.join(separator)
                final = '{\n' + indent + properties + ',\n' + stepback + '}'
            }
        }

        stack.pop()
        indent = stepback
        return final
    }

    function serializeKey (key) {
        if (key.length === 0) {
            return quoteString(key, true)
        }

        const firstChar = String.fromCodePoint(key.codePointAt(0))
        if (!util.isIdStartChar(firstChar)) {
            return quoteString(key, true)
        }

        for (let i = firstChar.length; i < key.length; i++) {
            if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) {
                return quoteString(key, true)
            }
        }

        return key
    }

    function serializeArray (value) {
        if (stack.indexOf(value) >= 0) {
            throw TypeError('Converting circular structure to JSON5')
        }

        stack.push(value)

        let stepback = indent
        indent = indent + gap

        let partial = []
        for (let i = 0; i < value.length; i++) {
            const propertyString = serializeProperty(String(i), value)
            partial.push((propertyString !== undefined) ? propertyString : 'null')
        }

        let final
        if (partial.length === 0) {
            final = '[]'
        } else {
            if (gap === '') {
                let properties = partial.join(',')
                final = '[' + properties + ']'
            } else {
                let separator = ',\n' + indent
                let properties = partial.join(separator)
                final = '[\n' + indent + properties + ',\n' + stepback + ']'
            }
        }

        stack.pop()
        indent = stepback
        return final
    }
}

{'repo_name': 'ChromeDevTools/devtools-frontend', 'stars': '1492', 'repo_language': 'JavaScript', 'file_name': 'timestamp.ts', 'mime_type': 'text/plain', 'hash': -6146208252575732205, 'source_dataset': 'data'}


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

package com.jolbox.bonecp;

import java.sql.SQLException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Periodically sends a keep-alive statement to idle threads
 * and kills off any connections that have been unused for a long time (or broken).
 * @author wwadge
 *
 */
public class ConnectionTesterThread implements Runnable {

	/** Connections used less than this time ago are not keep-alive tested. */
	private long idleConnectionTestPeriodInMs;
	/** Max no of ms to wait before a connection that isn't used is killed off. */
	private long idleMaxAgeInMs;
	/** Partition being handled. */
	private ConnectionPartition partition;
	/** Handle to connection pool. */
	private BoneCP pool;
	/** If true, we're operating in a LIFO fashion. */
	private boolean lifoMode;
	/** Logger handle. */
	private static final Logger logger = LoggerFactory.getLogger(ConnectionTesterThread.class);

	/** Constructor
	 * @param connectionPartition partition to work on
	 * @param pool pool handle
	 * @param idleMaxAgeInMs Threads older than this are killed off
	 * @param idleConnectionTestPeriodInMs Threads that are idle for more than this time are sent a keep-alive.
	 * @param lifoMode if true, we're running under a lifo fashion.
	 */
	protected ConnectionTesterThread(ConnectionPartition connectionPartition,
			BoneCP pool, long idleMaxAgeInMs, long idleConnectionTestPeriodInMs, boolean lifoMode){
		this.partition = connectionPartition;
		this.idleMaxAgeInMs = idleMaxAgeInMs;
		this.idleConnectionTestPeriodInMs = idleConnectionTestPeriodInMs;
		this.pool = pool;
		this.lifoMode = lifoMode;
	}

	/** Invoked periodically. */
	public void run() {
		ConnectionHandle connection = null;
		long tmp;
		try {
				long nextCheckInMs = this.idleConnectionTestPeriodInMs;
				if (this.idleMaxAgeInMs > 0){
					if (this.idleConnectionTestPeriodInMs == 0){
						nextCheckInMs = this.idleMaxAgeInMs;
					} else {
						nextCheckInMs = Math.min(nextCheckInMs, this.idleMaxAgeInMs);
					}
				}

				int partitionSize= this.partition.getAvailableConnections();
				long currentTimeInMs = System.currentTimeMillis();
				// go thru all partitions
				for (int i=0; i < partitionSize; i++){
					// grab connections one by one.
					connection = this.partition.getFreeConnections().poll();
					if (connection != null){
						connection.setOriginatingPartition(this.partition);

						// check if connection has been idle for too long (or is marked as broken)
						if (connection.isPossiblyBroken() ||
								((this.idleMaxAgeInMs > 0) && ( System.currentTimeMillis()-connection.getConnectionLastUsedInMs() > this.idleMaxAgeInMs))){
							// kill off this connection - it's broken or it has been idle for too long
							closeConnection(connection);
							continue;
						}

						// check if it's time to send a new keep-alive test statement.
						if (this.idleConnectionTestPeriodInMs > 0 && (currentTimeInMs-connection.getConnectionLastUsedInMs() > this.idleConnectionTestPeriodInMs) &&
								(currentTimeInMs-connection.getConnectionLastResetInMs() >= this.idleConnectionTestPeriodInMs)) {
							// send a keep-alive, close off connection if we fail.
							if (!this.pool.isConnectionHandleAlive(connection)){
								closeConnection(connection);
								continue;
							}
							// calculate the next time to wake up
							tmp = this.idleConnectionTestPeriodInMs;
							if (this.idleMaxAgeInMs > 0){ // wake up earlier for the idleMaxAge test?
								tmp = Math.min(tmp, this.idleMaxAgeInMs);
							}
						} else {
							// determine the next time to wake up (connection test time or idle Max age?)
							tmp = Math.abs(this.idleConnectionTestPeriodInMs-(currentTimeInMs - connection.getConnectionLastResetInMs()));
							long tmp2 = Math.abs(this.idleMaxAgeInMs - (currentTimeInMs-connection.getConnectionLastUsedInMs()));
							if (this.idleMaxAgeInMs > 0){
								tmp = Math.min(tmp, tmp2);
							}

						}
						if (tmp < nextCheckInMs){
							nextCheckInMs = tmp;
						}

						if (this.lifoMode){
							// we can't put it back normally or it will end up in front again.
							if (!(connection.getOriginatingPartition().getFreeConnections().offer(connection))){
								connection.internalClose();
							}
						} else {
							this.pool.putConnectionBackInPartition(connection);
						}

						Thread.sleep(20L); // test slowly, this is not an operation that we're in a hurry to deal with (avoid CPU spikes)...
					}

				} // throw it back on the queue
				// offset by a bit to avoid firing a lot for slightly offset connections
//				logger.debug("Next check in "+nextCheckInMs);

		} catch (Throwable e) {
				logger.error("Connection tester thread interrupted", e);
		}
	}

	/** Closes off this connection
	 * @param connection to close
	 */
	protected void closeConnection(ConnectionHandle connection) {

		if (connection != null && !connection.isClosed()) {
			try {
				connection.internalClose();
			} catch (SQLException e) {
				logger.error("Destroy connection exception", e);
			} finally {
				this.pool.postDestroyConnection(connection);
				connection.getOriginatingPartition().getPoolWatchThreadSignalQueue().offer(new Object()); // item being pushed is not important.
			}
		}
	}

}

{'repo_name': 'wwadge/bonecp', 'stars': '544', 'repo_language': 'Java', 'file_name': 'CustomHook.java', 'mime_type': 'text/x-java', 'hash': -2037208485644689036, 'source_dataset': 'data'}


#include "maplab-common/internal/unique-id.h"

#include <atomic>
#include <chrono>

namespace common {
namespace internal {
void generateUnique128BitHash(uint64_t hash[2]) {
  static_assert(
      sizeof(size_t) == sizeof(uint64_t),
      "Please adapt the below to your non-64-bit system.");

  static std::atomic<int> counter;
  hash[0] =
      common::internal::UniqueIdHashSeed::instance().seed() ^
      std::hash<int>()(
          std::chrono::high_resolution_clock::now().time_since_epoch().count());
  // Increment must happen here, otherwise the sampling is not atomic.
  hash[1] = std::hash<int>()(++counter);
}
}  // namespace internal
}  // namespace common

{'repo_name': 'ethz-asl/maplab', 'stars': '1411', 'repo_language': 'C++', 'file_name': 'viz-data-collector-inl.h', 'mime_type': 'text/x-c++', 'hash': 1337257722467761389, 'source_dataset': 'data'}


/**
 * editor_plugin_src.js
 *
 * Copyright 2009, Moxiecode Systems AB
 * Released under LGPL License.
 *
 * License: http://tinymce.moxiecode.com/license
 * Contributing: http://tinymce.moxiecode.com/contributing
 */

(function() {
	var DOM = tinymce.DOM;

	tinymce.create('tinymce.plugins.FullScreenPlugin', {
		init : function(ed, url) {
			var t = this, s = {}, vp, posCss;

			t.editor = ed;

			// Register commands
			ed.addCommand('mceFullScreen', function() {
				var win, de = DOM.doc.documentElement;

				if (ed.getParam('fullscreen_is_enabled')) {
					if (ed.getParam('fullscreen_new_window'))
						closeFullscreen(); // Call to close in new window
					else {
						DOM.win.setTimeout(function() {
							tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc);
							tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent({format : 'raw'}), {format : 'raw'});
							tinyMCE.remove(ed);
							DOM.remove('mce_fullscreen_container');
							de.style.overflow = ed.getParam('fullscreen_html_overflow');
							DOM.setStyle(DOM.doc.body, 'overflow', ed.getParam('fullscreen_overflow'));
							DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'), ed.getParam('fullscreen_scrolly'));
							tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
						}, 10);
					}

					return;
				}

				if (ed.getParam('fullscreen_new_window')) {
					win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
					try {
						win.resizeTo(screen.availWidth, screen.availHeight);
					} catch (e) {
						// Ignore
					}
				} else {
					tinyMCE.oldSettings = tinyMCE.settings; // Store old settings
					s.fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto';
					s.fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1);
					vp = DOM.getViewPort();
					s.fullscreen_scrollx = vp.x;
					s.fullscreen_scrolly = vp.y;

					// Fixes an Opera bug where the scrollbars doesn't reappear
					if (tinymce.isOpera && s.fullscreen_overflow == 'visible')
						s.fullscreen_overflow = 'auto';

					// Fixes an IE bug where horizontal scrollbars would appear
					if (tinymce.isIE && s.fullscreen_overflow == 'scroll')
						s.fullscreen_overflow = 'auto';

					// Fixes an IE bug where the scrollbars doesn't reappear
					if (tinymce.isIE && (s.fullscreen_html_overflow == 'visible' || s.fullscreen_html_overflow == 'scroll'))
						s.fullscreen_html_overflow = 'auto';

					if (s.fullscreen_overflow == '0px')
						s.fullscreen_overflow = '';

					DOM.setStyle(DOM.doc.body, 'overflow', 'hidden');
					de.style.overflow = 'hidden'; //Fix for IE6/7
					vp = DOM.getViewPort();
					DOM.win.scrollTo(0, 0);

					if (tinymce.isIE)
						vp.h -= 1;

					// Use fixed position if it exists
					if (tinymce.isIE6)
						posCss = 'absolute;top:' + vp.y;
					else
						posCss = 'fixed;top:0';

					n = DOM.add(DOM.doc.body, 'div', {
						id : 'mce_fullscreen_container',
						style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'});
					DOM.add(n, 'div', {id : 'mce_fullscreen'});

					tinymce.each(ed.settings, function(v, n) {
						s[n] = v;
					});

					s.id = 'mce_fullscreen';
					s.width = n.clientWidth;
					s.height = n.clientHeight - 15;
					s.fullscreen_is_enabled = true;
					s.fullscreen_editor_id = ed.id;
					s.theme_advanced_resizing = false;
					s.save_onsavecallback = function() {
						ed.setContent(tinyMCE.get(s.id).getContent({format : 'raw'}), {format : 'raw'});
						ed.execCommand('mceSave');
					};

					tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) {
						s[k] = v;
					});

					if (s.theme_advanced_toolbar_location === 'external')
						s.theme_advanced_toolbar_location = 'top';

					t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s);
					t.fullscreenEditor.onInit.add(function() {
						t.fullscreenEditor.setContent(ed.getContent());
						t.fullscreenEditor.focus();
					});

					t.fullscreenEditor.render();

					t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container');
					t.fullscreenElement.update();
					//document.body.overflow = 'hidden';

					t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() {
						var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize;

						// Get outer/inner size to get a delta size that can be used to calc the new iframe size
						outerSize = fed.dom.getSize(fed.getContainer().firstChild);
						innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]);

						fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h);
					});
				}
			});

			// Register buttons
			ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'});

			ed.onNodeChange.add(function(ed, cm) {
				cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled'));
			});
		},

		getInfo : function() {
			return {
				longname : 'Fullscreen',
				author : 'Moxiecode Systems AB',
				authorurl : 'http://tinymce.moxiecode.com',
				infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',
				version : tinymce.majorVersion + "." + tinymce.minorVersion
			};
		}
	});

	// Register plugin
	tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin);
})();

{'repo_name': 'centurion-project/Centurion', 'stars': '201', 'repo_language': 'PHP', 'file_name': 'fr.php', 'mime_type': 'text/x-php', 'hash': -6713699840237088019, 'source_dataset': 'data'}


/*
 * 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.
 */

package org.apache.hudi.exception;

import org.apache.hadoop.fs.Path;

/**
 * An exception thrown when hoodie path is invalid.
 */
public class InvalidHoodiePathException extends HoodieException {

  public InvalidHoodiePathException(Path path, String type) {
    super("Invalid path " + path + " of type " + type);
  }
}

{'repo_name': 'apache/hudi', 'stars': '1296', 'repo_language': 'Java', 'file_name': 'TestHoodieSnapshotCopier.java', 'mime_type': 'text/x-java', 'hash': 564854958740378774, 'source_dataset': 'data'}


program JsonWorkbench;

uses
  System.StartUpCopy,
  FMX.Forms,
  Unit1 in 'Unit1.pas' {Form1},
  Converter in 'Converter.pas',
  Unit2 in 'Unit2.pas';

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.

{'repo_name': 'FMXExpress/Firemonkey', 'stars': '137', 'repo_language': 'Pascal', 'file_name': 'ExplorerDevicesLECppPCH1.h', 'mime_type': 'text/x-c', 'hash': 8676482552061137083, 'source_dataset': 'data'}


    <link rel="stylesheet" type="text/css" href="css/tips.css">

If you place the caret at certain symbol and press &shortcut:Refactorings.QuickListPopupAction;,
you will see the list of refactorings applicable to the current context.

{'repo_name': 'pingfangx/TranslatorX', 'stars': '4814', 'repo_language': 'HTML', 'file_name': 'project_save.tmx', 'mime_type': 'text/xml', 'hash': 8015909850562399741, 'source_dataset': 'data'}


'label':'person' 'bounding box':(974,354,982,380)
'label':'person' 'bounding box':(1007,354,1031,383)
'label':'person' 'bounding box':(1043,350,1055,376)
'label':'car' 'bounding box':(864,358,894,403)
'label':'car' 'bounding box':(883,357,963,428)
'label':'person' 'bounding box':(814,358,836,411)
'label':'person' 'bounding box':(814,358,824,382)
'label':'person' 'bounding box':(788,352,806,395)
'label':'person' 'bounding box':(766,366,789,428)
'label':'person' 'bounding box':(803,373,830,447)
'label':'person' 'bounding box':(780,368,815,463)
'label':'person' 'bounding box':(842,377,870,448)
'label':'person' 'bounding box':(1105,356,1116,381)
'label':'person' 'bounding box':(1117,350,1131,379)
'label':'person' 'bounding box':(1142,363,1154,382)
'label':'person' 'bounding box':(1157,351,1166,371)
'label':'person' 'bounding box':(1161,364,1174,394)
'label':'person' 'bounding box':(1182,356,1198,403)
'label':'person' 'bounding box':(1202,373,1210,411)
'label':'person' 'bounding box':(1199,361,1218,414)
'label':'person' 'bounding box':(1216,361,1233,413)
'label':'person' 'bounding box':(1231,368,1251,420)
'label':'bicycle' 'bounding box':(1037,376,1055,409)
'label':'person' 'bounding box':(1149,350,1163,379)
'label':'motorcycle' 'bounding box':(1134,369,1188,417)
'label':'motorcycle' 'bounding box':(1147,381,1207,420)
'label':'person' 'bounding box':(1268,367,1285,390)
'label':'person' 'bounding box':(1265,369,1295,426)
'label':'person' 'bounding box':(1449,363,1467,387)
'label':'person' 'bounding box':(1477,368,1485,385)
'label':'person' 'bounding box':(1508,366,1520,390)
'label':'person' 'bounding box':(1686,349,1732,422)
'label':'person' 'bounding box':(1695,349,1767,424)
'label':'person' 'bounding box':(1765,359,1800,409)
'label':'person' 'bounding box':(1823,363,1857,413)
'label':'person' 'bounding box':(1867,357,1915,422)
'label':'person' 'bounding box':(1960,334,2025,420)
'label':'person' 'bounding box':(1972,342,2047,492)
'label':'person' 'bounding box':(1988,357,2047,477)
'label':'car' 'bounding box':(1259,366,1345,481)
'label':'car' 'bounding box':(1292,363,1455,500)
'label':'car' 'bounding box':(1331,376,1496,528)
'label':'car' 'bounding box':(1400,374,1689,577)
'label':'car' 'bounding box':(1546,390,2045,694)
'label':'car' 'bounding box':(1857,441,2047,801)
'label':'person' 'bounding box':(1007,355,1014,380)
'label':'person' 'bounding box':(1023,354,1031,382)
'label':'person' 'bounding box':(953,350,963,377)
'label':'person' 'bounding box':(961,348,970,377)
'label':'person' 'bounding box':(986,354,996,382)
'label':'person' 'bounding box':(978,355,987,380)
'label':'bicycle' 'bounding box':(717,417,770,460)
'label':'bicycle' 'bounding box':(710,417,758,463)
'label':'bicycle' 'bounding box':(671,418,717,462)
'label':'bicycle' 'bounding box':(663,413,702,463)
'label':'motorcycle' 'bounding box':(583,370,675,462)

{'repo_name': 'wuzheng-sjtu/FastFPN', 'stars': '103', 'repo_language': 'Python', 'file_name': 'hanover_000000_002357.txt', 'mime_type': 'text/plain', 'hash': -2639524038944202192, 'source_dataset': 'data'}


// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

using System.Collections.Immutable;

namespace Microsoft.CodeAnalysis.Semantics
{
    /// <summary>
    /// Represents an await expression.
    /// </summary>
    /// <remarks>
    /// This interface is reserved for implementation by its associated APIs. We reserve the right to
    /// change it in the future.
    /// </remarks>
    public interface IAwaitExpression : IOperation
    {
        /// <summary>
        /// Value to be awaited.
        /// </summary>
        IOperation AwaitedValue { get; }
    }
}

{'repo_name': 'ASDAlexander77/cs2cpp', 'stars': '140', 'repo_language': 'C#', 'file_name': '__ConsoleStream.cs', 'mime_type': 'text/plain', 'hash': -337241559103193700, 'source_dataset': 'data'}


// @file nnsubsample.cu
// @brief Subsampling block
// @author Andrea Vedaldi

/*
Copyright (C) 2014-16 Andrea Vedaldi and Karel Lenc.
All rights reserved.

This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/

#include "nnsubsample.hpp"
#include "impl/subsample.hpp"
#include "impl/blashelper.hpp"
#include <assert.h>

using namespace vl ;

/* ---------------------------------------------------------------- */
/* Implementations                                                  */
/* ---------------------------------------------------------------- */

template<vl::DeviceType deviceType, vl::DataType dataType> vl::ErrorCode
nnsubsample_forward_impl(Context& context,
                         Tensor output,
                         Tensor data,
                         Tensor biases,
                         int strideY, int strideX,
                         int padTop, int padBottom,
                         int padLeft, int padRight)
{
  assert(output) ;
  assert(data) ;

  vl::ErrorCode error ;
  typedef typename vl::DataTypeTraits<dataType>::type type ;

  ptrdiff_t numOutputPixels = output.getHeight() * output.getWidth() ;
  type const* allOnesMemory = (type*) context.getAllOnes(deviceType, dataType, numOutputPixels) ;

  if (allOnesMemory == NULL) {
    error = context.getLastError() ;
    goto done ;
  }

  for (int image = 0 ; image < data.getSize() ; ++image) {
    ptrdiff_t dataOffset = (data.getHeight()*data.getWidth()*data.getDepth()) * image ;
    ptrdiff_t outputOffset = (output.getHeight()*output.getWidth()*output.getDepth()) * image ;
    error = vl::impl::subsample<deviceType,type>::forward
    (context,
     (type*)output.getMemory() + outputOffset,
     (type const*)data.getMemory() + dataOffset,
     data.getHeight(), data.getWidth(), data.getDepth(),
     strideY, strideX,
     padTop, padBottom, padLeft, padRight) ;
    if (error != vl::VLE_Success) { goto done ; }
    if (biases) {
      type alpha = 1 ;
      type beta = 1 ;
      error = vl::impl::blas<deviceType, dataType>::gemm
      (context,
       'n', 'n',
       numOutputPixels, biases.getNumElements(), 1,
       alpha,
       allOnesMemory, numOutputPixels,
       (type*)biases.getMemory(), 1,
       beta,
       (type*)output.getMemory() + outputOffset, numOutputPixels) ;
      if (error != vl::VLE_Success) { goto done ; }
    }
  }
done:
  return context.passError(error, __func__) ;
}

template<vl::DeviceType deviceType, vl::DataType dataType> vl::ErrorCode
nnsubsample_backward_impl(Context& context,
                          Tensor derData,
                          Tensor derBiases,
                          Tensor derOutput,
                          int strideY, int strideX,
                          int padTop, int padBottom,
                          int padLeft, int padRight)
{
  assert(derOutput) ;

  vl::ErrorCode error ;
  typedef typename vl::DataTypeTraits<dataType>::type type ;

  ptrdiff_t numOutputPixels = derOutput.getHeight() * derOutput.getWidth() ;
  type const* allOnesMemory = (type*) context.getAllOnes(deviceType, dataType, numOutputPixels) ;

  if (allOnesMemory == NULL) {
    error = context.getLastError() ;
    goto done ;
  }

  for (int image = 0 ; image < derData.getSize() ; ++image) {
    ptrdiff_t derOutputOffset = (derOutput.getHeight()*derOutput.getWidth()*derOutput.getDepth()) * image ;

    /* compute derBiases = dz/dbias */
    if (derBiases) {
      type alpha = 1 ;
      type beta = (image > 0) ; /* this saves init. the output array with 0 */
      error = vl::impl::blas<deviceType,dataType>::gemv
      (context,
       't',
       numOutputPixels, derOutput.getDepth(),
       alpha,
       (type const*)derOutput.getMemory() + derOutputOffset, numOutputPixels,
       allOnesMemory, 1,
       beta,
       (type*)derBiases.getMemory(), 1) ;
      if (error != vl::VLE_Success) { goto done ; }
    }

    /* compute derData = dz/dx */
    if (derData) {
      ptrdiff_t derDataOffset = (derData.getHeight()*derData.getWidth()*derData.getDepth()) * image ;
      error = vl::impl::subsample<deviceType,type>::backward
      (context,
       (type*)derData.getMemory() + derDataOffset,
       (type const*)derOutput.getMemory() + derOutputOffset,
       derData.getHeight(), derData.getWidth(), derData.getDepth(),
       strideY, strideX,
       padTop, padBottom, padLeft, padRight) ;
      if (error != vl::VLE_Success) { goto done ; }
    }
  }
done:
  return context.passError(error, __func__) ;
}

/* ---------------------------------------------------------------- */
/* Dispatchers                                                      */
/* ---------------------------------------------------------------- */

#define DISPATCH(deviceType, dataType) \
error = nnsubsample_forward_impl<deviceType, dataType> \
(context, output, data, biases, \
 strideY, strideX, \
 padTop, padBottom, \
 padLeft, padRight) ;

#define DISPATCH2(deviceType) \
switch (dataType) { \
case VLDT_Float : DISPATCH(deviceType, VLDT_Float) ; break ; \
IF_DOUBLE(case VLDT_Double : DISPATCH(deviceType, VLDT_Double) ; break ;) \
default: assert(false) ; return VLE_Unknown ; \
}

vl::ErrorCode
vl::nnsubsample_forward(Context& context,
                        Tensor output,
                        Tensor data,
                        Tensor biases,
                        int strideY, int strideX,
                        int padTop, int padBottom,
                        int padLeft, int padRight)
{
  vl::ErrorCode error = vl::VLE_Success ;
  vl::DeviceType deviceType = output.getDeviceType() ;
  vl::DataType dataType = output.getDataType() ;

  switch (deviceType) {
    default:
      assert(false) ;
      error = vl::VLE_Unknown ;
      break ;

    case vl::VLDT_CPU:
      DISPATCH2(vl::VLDT_CPU) ;
      break ;

#ifdef ENABLE_GPU
    case vl::VLDT_GPU:
      DISPATCH2(vl::VLDT_GPU) ;
      if (error == VLE_Cuda) {
        context.setError(context.getCudaHelper().catchCudaError("GPU")) ;
      }
      break ;
#endif
  }
  return context.passError(error, __func__) ;
}

#undef DISPATCH
#define DISPATCH(deviceType, dataType) \
error = nnsubsample_backward_impl<deviceType, dataType> \
(context, derData, derBiases, derOutput, \
strideY, strideX, \
padTop, padBottom, \
padLeft, padRight) ;

vl::ErrorCode
vl::nnsubsample_backward(vl::Context& context,
                         vl::Tensor derData,
                         vl::Tensor derBiases,
                         vl::Tensor derOutput,
                         int strideY, int strideX,
                         int padTop, int padBottom,
                         int padLeft, int padRight)
{
  vl::ErrorCode error = vl::VLE_Success ;
  vl::DeviceType deviceType = derOutput.getDeviceType() ;
  vl::DataType dataType = derOutput.getDataType() ;

  switch (deviceType) {
    default:
      assert(false) ;
      error = vl::VLE_Unknown ;
      break ;

    case vl::VLDT_CPU:
      DISPATCH2(vl::VLDT_CPU) ;
      break ;

#ifdef ENABLE_GPU
    case vl::VLDT_GPU:
      DISPATCH2(vl::VLDT_GPU) ;
      if (error == VLE_Cuda) {
        context.setError(context.getCudaHelper().catchCudaError("GPU")) ;
      }
      break ;
#endif
  }
  return context.passError(error, __func__) ;
}

{'repo_name': 'jbhuang0604/CF2', 'stars': '200', 'repo_language': 'Matlab', 'file_name': 'showColorLayer.m', 'mime_type': 'text/plain', 'hash': -2951398398761621216, 'source_dataset': 'data'}


<?xml version="1.0" encoding="UTF-8"?>
<gmd:MD_Metadata xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://www.isotc211.org/2005/gmd/gmd.xsd">
  <gmd:fileIdentifier>
    <gco:CharacterString>None</gco:CharacterString>
  </gmd:fileIdentifier>
  <gmd:language>
    <gmd:LanguageCode codeList="http://www.loc.gov/standards/iso639-2/" codeListValue="eng" codeSpace="ISO 639-2">eng</gmd:LanguageCode>
  </gmd:language>
  <gmd:characterSet>
    <gmd:MD_CharacterSetCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_CharacterSetCode" codeListValue="utf8" codeSpace="ISOTC211/19115">utf8</gmd:MD_CharacterSetCode>
  </gmd:characterSet>
  <gmd:hierarchyLevel>
    <gmd:MD_ScopeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode" codeListValue="dataset" codeSpace="ISOTC211/19115">dataset</gmd:MD_ScopeCode>
  </gmd:hierarchyLevel>
  <gmd:contact>
    <gmd:CI_ResponsibleParty>
      <gmd:organisationName>
        <gco:CharacterString/>
      </gmd:organisationName>
      <gmd:contactInfo>
        <gmd:CI_Contact>
          <gmd:address>
            <gmd:CI_Address>
              <gmd:electronicMailAddress>
                <gco:CharacterString/>
              </gmd:electronicMailAddress>
            </gmd:CI_Address>
          </gmd:address>
        </gmd:CI_Contact>
      </gmd:contactInfo>
      <gmd:role>
        <gmd:CI_RoleCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="pointOfContact" codeSpace="ISOTC211/19115">pointOfContact</gmd:CI_RoleCode>
      </gmd:role>
    </gmd:CI_ResponsibleParty>
  </gmd:contact>
  <gmd:dateStamp>
    <gco:Date/>
  </gmd:dateStamp>
  <gmd:metadataStandardName>
    <gco:CharacterString>ISO 19115:2003 - Geographic information - Metadata</gco:CharacterString>
  </gmd:metadataStandardName>
  <gmd:metadataStandardVersion>
    <gco:CharacterString>ISO 19115:2003</gco:CharacterString>
  </gmd:metadataStandardVersion>
  <gmd:identificationInfo>
    <gmd:MD_DataIdentification>
      <gmd:citation>
        <gmd:CI_Citation>
          <gmd:title>
            <gco:CharacterString>analysis</gco:CharacterString>
          </gmd:title>
          <gmd:date>
            <gmd:CI_Date>
              <gmd:date>
                <gco:Date/>
              </gmd:date>
              <gmd:dateType>
                <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="publication" codeSpace="ISOTC211/19115">publication</gmd:CI_DateTypeCode>
              </gmd:dateType>
            </gmd:CI_Date>
          </gmd:date>
          <gmd:date>
            <gmd:CI_Date>
              <gmd:date>
                <gco:Date/>
              </gmd:date>
              <gmd:dateType>
                <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="revision" codeSpace="ISOTC211/19115">revision</gmd:CI_DateTypeCode>
              </gmd:dateType>
            </gmd:CI_Date>
          </gmd:date>
          <gmd:date>
            <gmd:CI_Date>
              <gmd:date>
                <gco:Date/>
              </gmd:date>
              <gmd:dateType>
                <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="creation" codeSpace="ISOTC211/19115">creation</gmd:CI_DateTypeCode>
              </gmd:dateType>
            </gmd:CI_Date>
          </gmd:date>
          <gmd:identifier>
            <gmd:RS_Identifier>
              <gmd:code>
                <gco:CharacterString>None</gco:CharacterString>
              </gmd:code>
            </gmd:RS_Identifier>
          </gmd:identifier>
        </gmd:CI_Citation>
      </gmd:citation>
      <gmd:abstract>
        <gco:CharacterString/>
      </gmd:abstract>
      <gmd:credit>
        <gco:CharacterString/>
      </gmd:credit>
      <gmd:status>
        <gmd:MD_ProgressCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ProgressCode" codeListValue="revision" codeSpace="ISOTC211/19115">revision</gmd:MD_ProgressCode>
      </gmd:status>
      <gmd:pointOfContact>
        <gmd:CI_ResponsibleParty>
          <gmd:organisationName>
            <gco:CharacterString/>
          </gmd:organisationName>
          <gmd:contactInfo>
            <gmd:CI_Contact>
              <gmd:address>
                <gmd:CI_Address>
                  <gmd:electronicMailAddress>
                    <gco:CharacterString/>
                  </gmd:electronicMailAddress>
                </gmd:CI_Address>
              </gmd:address>
            </gmd:CI_Contact>
          </gmd:contactInfo>
          <gmd:role>
            <gmd:CI_RoleCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="pointOfContact" codeSpace="ISOTC211/19115">pointOfContact</gmd:CI_RoleCode>
          </gmd:role>
        </gmd:CI_ResponsibleParty>
      </gmd:pointOfContact>
      <gmd:resourceMaintenance>
        <gmd:MD_MaintenanceInformation>
          <gmd:maintenanceAndUpdateFrequency>
            <gmd:MD_MaintenanceFrequencyCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_MaintenanceFrequencyCode" codeListValue="continual" codeSpace="ISOTC211/19115">continual</gmd:MD_MaintenanceFrequencyCode>
          </gmd:maintenanceAndUpdateFrequency>
        </gmd:MD_MaintenanceInformation>
      </gmd:resourceMaintenance>
      <gmd:descriptiveKeywords>
        <gmd:MD_Keywords>
          <gmd:keyword>
            <gco:CharacterString>Human health and safety</gco:CharacterString>
          </gmd:keyword>
          <gmd:type>
            <gmd:MD_KeywordTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_KeywordTypeCode" codeListValue="theme" codeSpace="ISOTC211/19115">theme</gmd:MD_KeywordTypeCode>
          </gmd:type>
          <gmd:thesaurusName>
            <gmd:CI_Citation>
              <gmd:title>
                <gco:CharacterString>GEMET - INSPIRE themes, version 1.0</gco:CharacterString>
              </gmd:title>
              <gmd:date>
                <gmd:CI_Date>
                  <gmd:date>
                    <gco:Date>2008-06-01</gco:Date>
                  </gmd:date>
                  <gmd:dateType>
                    <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="publication" codeSpace="ISOTC211/19115">publication</gmd:CI_DateTypeCode>
                  </gmd:dateType>
                </gmd:CI_Date>
              </gmd:date>
            </gmd:CI_Citation>
          </gmd:thesaurusName>
        </gmd:MD_Keywords>
      </gmd:descriptiveKeywords>
      <gmd:resourceConstraints>
        <gmd:MD_Constraints>
          <gmd:useLimitation>
            <gco:CharacterString/>
          </gmd:useLimitation>
        </gmd:MD_Constraints>
      </gmd:resourceConstraints>
      <gmd:language>
        <gmd:LanguageCode codeList="http://www.loc.gov/standards/iso639-2/" codeListValue="eng" codeSpace="ISO 639-2">eng</gmd:LanguageCode>
      </gmd:language>
      <gmd:topicCategory>
        <gmd:MD_TopicCategoryCode>geoscientificInformation</gmd:MD_TopicCategoryCode>
      </gmd:topicCategory>
      <gmd:extent>
        <gmd:EX_Extent>
                </gmd:EX_Extent>
      </gmd:extent>
      <gmd:supplementalInformation>
        <inasafe>
          <scale>
            <gco:CharacterString/>
          </scale>
          <multipart_polygon>
            <gco:Boolean/>
          </multipart_polygon>
          <datatype>
            <gco:CharacterString/>
          </datatype>
          <keyword_version>
            <gco:CharacterString>3.5</gco:CharacterString>
          </keyword_version>
          <layer_mode>
            <gco:CharacterString/>
          </layer_mode>
          <layer_geometry>
            <gco:CharacterString/>
          </layer_geometry>
          <source>
            <gco:CharacterString/>
          </source>
          <layer_purpose>
            <gco:CharacterString>analysis</gco:CharacterString>
          </layer_purpose>
          <report>
            <gco:CharacterString/>
          </report>
          <inasafe_fields>
            <gco:Dictionary>{"analysis_id_field": "analysis_id", "analysis_name_field": "analysis_name"}</gco:Dictionary>
          </inasafe_fields>
          <inasafe_default_values>
            <gco:Dictionary/>
          </inasafe_default_values>
          <resolution>
            <gco:FloatTuple/>
          </resolution>
        </inasafe>
      </gmd:supplementalInformation>
    </gmd:MD_DataIdentification>
  </gmd:identificationInfo>
  <gmd:distributionInfo>
    <gmd:MD_Distribution>
      <gmd:distributionFormat>
        <gmd:MD_Format>
          <gmd:name>
            <gco:CharacterString>unknown</gco:CharacterString>
          </gmd:name>
          <gmd:version>
            <gco:CharacterString>unknown</gco:CharacterString>
          </gmd:version>
        </gmd:MD_Format>
      </gmd:distributionFormat>
      <gmd:transferOptions>
        <gmd:MD_DigitalTransferOptions>
          <gmd:onLine>
            <gmd:CI_OnlineResource>
              <gmd:linkage>
                <gmd:URL/>
              </gmd:linkage>
            </gmd:CI_OnlineResource>
          </gmd:onLine>
        </gmd:MD_DigitalTransferOptions>
      </gmd:transferOptions>
    </gmd:MD_Distribution>
  </gmd:distributionInfo>
  <gmd:dataQualityInfo>
    <gmd:DQ_DataQuality>
      <gmd:scope>
        <gmd:DQ_Scope>
          <gmd:level>
            <gmd:MD_ScopeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode" codeListValue="dataset" codeSpace="ISOTC211/19115">dataset</gmd:MD_ScopeCode>
          </gmd:level>
        </gmd:DQ_Scope>
      </gmd:scope>
      <gmd:report>
        <gmd:DQ_DomainConsistency>
          <gmd:result>
            <gmd:DQ_ConformanceResult>
              <gmd:specification>
                <gmd:CI_Citation>
                  <gmd:title>
                    <gco:CharacterString/>
                  </gmd:title>
                  <gmd:date>
                    <gmd:CI_Date>
                      <gmd:date>
                        <gco:Date/>
                      </gmd:date>
                      <gmd:dateType>
                        <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="creation" codeSpace="ISOTC211/19115">creation</gmd:CI_DateTypeCode>
                      </gmd:dateType>
                    </gmd:CI_Date>
                  </gmd:date>
                </gmd:CI_Citation>
              </gmd:specification>
              <gmd:explanation>
                <gco:CharacterString>See the referenced specification</gco:CharacterString>
              </gmd:explanation>
              <gmd:pass>
                <gco:Boolean>true</gco:Boolean>
              </gmd:pass>
            </gmd:DQ_ConformanceResult>
          </gmd:result>
        </gmd:DQ_DomainConsistency>
      </gmd:report>
      <gmd:lineage>
        <gmd:LI_Lineage>
          <gmd:statement>
            <gco:CharacterString/>
          </gmd:statement>
        </gmd:LI_Lineage>
      </gmd:lineage>
    </gmd:DQ_DataQuality>
  </gmd:dataQualityInfo>
  <gmd:metadataMaintenance>
    <gmd:MD_MaintenanceInformation>
      <gmd:maintenanceAndUpdateFrequency>
        <gmd:MD_MaintenanceFrequencyCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_MaintenanceFrequencyCode" codeListValue="continual" codeSpace="ISOTC211/19115">continual</gmd:MD_MaintenanceFrequencyCode>
      </gmd:maintenanceAndUpdateFrequency>
      <gmd:maintenanceNote>
        <gco:CharacterString>This record was generated by InaSAFE (http://inasafe.org)</gco:CharacterString>
      </gmd:maintenanceNote>
    </gmd:MD_MaintenanceInformation>
  </gmd:metadataMaintenance>
</gmd:MD_Metadata>

{'repo_name': 'inasafe/inasafe', 'stars': '201', 'repo_language': 'Python', 'file_name': 'data_audit_wrapper.py', 'mime_type': 'text/x-python', 'hash': -4666230449739043331, 'source_dataset': 'data'}


/* global Vue */
$(function() {
  "use strict";

  var getScheduledVacuumsTimeout;
  var getScheduledAnalyzesTimeout;
  var getScheduledReindexesTimeout;

  new Vue({
    el: '#app',
    data: {
      table: {
        indexes: []
      },
      loading: true,
      indexSortCriteria: 'total_bytes',
      indexSortCriterias: {
        name: ['Name'],
        total_bytes: ['Size', 'desc'],
        bloat_ratio: ['Bloat', 'desc']
      },
      vacuumWhen: 'now',
      vacuumScheduledTime: moment(),
      scheduledVacuums: [],
      analyzeWhen: 'now',
      analyzeScheduledTime: moment(),
      scheduledAnalyzes: [],
      reindexWhen: 'now',
      reindexScheduledTime: moment(),
      scheduledReindexes: [],
      reindexElementType: null,
      reindexElementName: null
    },
    computed: {
      indexSortOrder: function() {
        return this.indexSortCriterias[this.indexSortCriteria][1];
      },
      indexesSorted: function() {
        return _.orderBy(this.table.indexes, this.indexSortCriteria, this.indexSortOrder);
      },
      filteredScheduledReindexes: function() {
        return _.filter(this.scheduledReindexes, function(reindex) {
          // only reindexes with defined table
          // others are for indexes
          return reindex.table != null;
        });
      }
    },
    created: function() {
      this.fetchData();
    },
    methods: {
      fetchData: function() {
        getData.call(this);
        getScheduledVacuums.call(this);
        getScheduledAnalyzes.call(this);
        getScheduledReindexes.call(this);
      },
      indexSortBy: indexSortBy,
      doVacuum: doVacuum,
      cancelVacuum: cancelVacuum,
      doAnalyze: doAnalyze,
      cancelAnalyze: cancelAnalyze,
      getLatestVacuum: getLatestX('vacuum'),
      getLatestAnalyze: getLatestX('analyze'),
      doReindex: doReindex,
      cancelReindex: cancelReindex,
      checkSession: checkSession
    }
  });

  function getData() {
    $.ajax({
      url: apiUrl,
      contentType: "application/json",
      success: (function(data) {
        this.table = data;
        this.table.indexes.forEach(function(index) {
          index.bloat_ratio = 0;
          if (index.total_bytes) {
            index.bloat_ratio = parseFloat((100 * (index.bloat_bytes / index.total_bytes)).toFixed(1));
          }
        });
        window.setTimeout(postCreated.bind(this), 1);
      }).bind(this),
      error: onError,
      complete: function() {
        this.loading = false;
      }.bind(this)
    });
  }

  function postCreated() {
    $('pre code.sql').each(function(i, block) {
      hljs.highlightBlock(block);
    });
    var options = {
      singleDatePicker: true,
      timePicker: true,
      timePicker24Hour: true,
      timePickerSeconds: false
    };
    $('#vacuumScheduledTime').daterangepicker($.extend({
      startDate: this.vacuumScheduledTime
    }, options), function(start) {
      this.vacuumScheduledTime = start;
    }.bind(this));
    $('#analyzeScheduledTime').daterangepicker($.extend({
      startDate: this.analyzeScheduledTime
    }, options), function(start) {
      this.analyzeScheduledTime = start;
    }.bind(this));
    $('#reindexScheduledTime').daterangepicker($.extend({
      startDate: this.reindexScheduledTime
    }, options), function(start) {
      this.reindexScheduledTime = start;
    }.bind(this));
    $('[data-toggle="popover"]').popover();
  }

  function getScheduledVacuums() {
    window.clearTimeout(getScheduledVacuumsTimeout);
    var count = this.scheduledVacuums.length;
    $.ajax({
      url: apiUrl + '/vacuum/scheduled',
      contentType: "application/json",
      success: (function(data) {
        this.scheduledVacuums = data;
        // refresh list
        getScheduledVacuumsTimeout = window.setTimeout(function() {
          getScheduledVacuums.call(this);
        }.bind(this), 5000);

        // There are less vacuums than before
        // It may mean that a vacuum is finished
        if (data.length < count) {
          getData.call(this);
        }
      }).bind(this),
      error: onError
    });
  }

  function doVacuum() {

    var fields = $('#vacuumForm').serializeArray();
    var mode = fields.filter(function(field) {
      return field.name == 'mode';
    }).map(function(field) {
      return field.value;
    }).join(',');
    var data = {};
    if (mode) {
      data['mode'] = mode;
    }
    var datetime = fields.filter(function(field) {
      return field.name == 'datetime';
    }).map(function(field) {
      return field.value;
    }).join('');
    if (datetime) {
      data['datetime'] = datetime;
    }
    $.ajax({
      method: 'POST',
      url: apiUrl + '/vacuum',
      beforeSend: function(xhr){xhr.setRequestHeader('X-Session', xsession);},
      data: JSON.stringify(data),
      contentType: "application/json",
      success: (function(data) {
        getScheduledVacuums.call(this);
      }).bind(this),
      error: onError
    });
  }

  function cancelVacuum(id) {
    if (!checkSession()) {
      return;
    }
    $.ajax({
      method: 'DELETE',
      url: maintenanceBaseUrl + '/vacuum/' + id,
      beforeSend: function(xhr){xhr.setRequestHeader('X-Session', xsession);},
      contentType: "application/json",
      success: (function(data) {
        getScheduledVacuums.call(this);
      }).bind(this),
      error: onError
    });
  }

  function getScheduledAnalyzes() {
    window.clearTimeout(getScheduledAnalyzesTimeout);
    var count = this.scheduledAnalyzes.length;
    $.ajax({
      url: apiUrl + '/analyze/scheduled',
      contentType: "application/json",
      success: (function(data) {
        this.scheduledAnalyzes = data;
        // refresh list
        getScheduledAnalyzesTimeout = window.setTimeout(function() {
          getScheduledAnalyzes.call(this);
        }.bind(this), 5000);

        // There are less analyzes than before
        // It may mean that a analyze is finished
        if (data.length < count) {
          getData.call(this);
        }
      }).bind(this),
      error: onError
    });
  }

  function doAnalyze() {

    var fields = $('#analyzeForm').serializeArray();
    var mode = fields.filter(function(field) {
      return field.name == 'mode';
    }).map(function(field) {
      return field.value;
    }).join(',');
    var data = {};
    if (mode) {
      data['mode'] = mode;
    }
    var datetime = fields.filter(function(field) {
      return field.name == 'datetime';
    }).map(function(field) {
      return field.value;
    }).join('');
    if (datetime) {
      data['datetime'] = datetime;
    }
    $.ajax({
      method: 'POST',
      url: apiUrl + '/analyze',
      beforeSend: function(xhr){xhr.setRequestHeader('X-Session', xsession);},
      data: JSON.stringify(data),
      contentType: "application/json",
      success: (function(data) {
        getScheduledAnalyzes.call(this);
      }).bind(this),
      error: onError
    });
  }

  function cancelAnalyze(id) {
    if (!checkSession()) {
      return;
    }
    $.ajax({
      method: 'DELETE',
      url: maintenanceBaseUrl + '/analyze/' + id,
      beforeSend: function(xhr){xhr.setRequestHeader('X-Session', xsession);},
      contentType: "application/json",
      success: (function(data) {
        getScheduledAnalyzes.call(this);
      }).bind(this),
      error: onError
    });
  }

  function getScheduledReindexes() {
    window.clearTimeout(getScheduledReindexesTimeout);
    var count = this.scheduledReindexes.length;
    $.ajax({
      url: apiUrl + '/reindex/scheduled',
      beforeSend: function(xhr){xhr.setRequestHeader('X-Session', xsession);},
      contentType: "application/json",
      success: (function(data) {
        this.scheduledReindexes = data;
        // refresh list
        getScheduledReindexesTimeout = window.setTimeout(function() {
          getScheduledReindexes.call(this);
        }.bind(this), 5000);

        // There are less reindexes than before
        // It may mean that a reindex is finished
        if (data.length < count) {
          getData.call(this);
        }
      }).bind(this),
      error: onError
    });
  }

  function doReindex() {

    var fields = $('#reindexForm').serializeArray();
    var data = {};
    var datetime = fields.filter(function(field) {
      return field.name == 'datetime';
    }).map(function(field) {
      return field.value;
    }).join('');
    if (datetime) {
      data['datetime'] = datetime;
    }
    // get the element type (either table or index)
    var elementType = fields.filter(function(field) {
      return field.name == 'elementType';
    }).map(function(field) {
      return field.value;
    }).join('');
    // get the element name
    var element = fields.filter(function(field) {
      return field.name == elementType;
    }).map(function(field) {
      return field.value;
    }).join('');
    $.ajax({
      method: 'POST',
      url: [schemaApiUrl, elementType, element, 'reindex'].join('/'),
      beforeSend: function(xhr){xhr.setRequestHeader('X-Session', xsession);},
      data: JSON.stringify(data),
      contentType: "application/json",
      success: (function(data) {
        getScheduledReindexes.call(this);
      }).bind(this),
      error: onError
    });
  }

  function cancelReindex(id) {
    if (!checkSession()) {
      return;
    }
    $.ajax({
      method: 'DELETE',
      url: maintenanceBaseUrl + '/reindex/' + id,
      beforeSend: function(xhr){xhr.setRequestHeader('X-Session', xsession);},
      contentType: "application/json",
      success: (function(data) {
        getScheduledReindexes.call(this);
      }).bind(this),
      error: onError
    });
  }

  // x is either 'vacuum' or 'analyze'
  function getLatestX(x) {
    return function() {
      var auto = false;
      var date = null;
      var last_x = this.table['last_' + x];
      var last_autox = this.table['last_auto' + x];
      if (!last_x && last_autox) {
        auto = true;
        date = last_autox;
      } else if (last_x && !last_autox) {
        date = last_x;
      } else {
        auto = last_autox > last_x;
        date = auto ? last_autox : last_x
      }
      return {
        auto: auto,
        date: date
      }
    }
  }

  function indexSortBy(criteria, order) {
    this.indexSortCriteria = criteria;
    this.indexSortOrder = order || 'asc';
  }
});

{'repo_name': 'dalibo/temboard', 'stars': '193', 'repo_language': 'Python', 'file_name': '__init__.py', 'mime_type': 'text/x-python', 'hash': -3334480186287399428, 'source_dataset': 'data'}