text:
@phdthesis{Peotta2012,
 author = {Laerte Peotta de Melo},
 title  = {DAP (Dynamic Authorization Protocol): Uma Abordagem Segura Out-Of-Band
Para E-Bank Com Um Segundo Fator De Autenticação Visual},
 school = {University of Brasília},
 year   = {2012},
 month  = Aug,
 url    = {http://repositorio.unb.br/handle/10482/12963}
},

@article{Burrows90,
 author = {Michael Burrows and Martin Abadi and Roger Needham},
 title = {A Logic of Authentication},
 journal = {ACM Trans. Comput. Syst.},
 issue_date = {Feb. 1990},
 volume = {8},
 number = {1},
 month = feb,
 year = {1990},
 issn = {0734-2071},
 pages = {18--36},
 numpages = {19},
 doi = {10.1145/77648.77649},
 publisher = {ACM},
 address = {New York, NY, USA}
},

@article{AbadiNeedham96,
 author = {Martín Abadi and Roger Needham},
 title = {Prudent Engineering Practice for Cryptographic Protocols},
 journal = {IEEE Trans. Softw. Eng.},
 issue_date = {January 1996},
 volume = {22},
 number = {1},
 month = jan,
 year = {1996},
 issn = {0098-5589},
 pages = {6--15},
 numpages = {10},
 url = {http://dx.doi.org/10.1109/32.481513},
 doi = {10.1109/32.481513},
 acmid = {229714},
 publisher = {IEEE Press},
 address = {Piscataway, NJ, USA}
},

@article{Diffie92,
 author = {Whitfield Diffie and Paul C. Van Oorschot and Michael J. Wiener},
 title = {Authentication and Authenticated Key Exchanges},
 journal = {Des. Codes Cryptography},
 issue_date = {June 1992},
 volume = {2},
 number = {2},
 month = jun,
 year = {1992},
 issn = {0925-1022},
 pages = {107--125},
 numpages = {19},
 url = {http://dx.doi.org/10.1007/BF00124891},
 doi = {10.1007/BF00124891},
 publisher = {Kluwer Academic Publishers},
 address = {Norwell, MA, USA}
},

@inproceedings{Bellare96,
 author = {Mihir Bellare and Ran Canetti and Hugo Krawczyk},
 title = {Keying Hash Functions for Message Authentication},
 booktitle = {Proceedings of the 16th Annual International Cryptology Conference on Advances in Cryptology},
 series = {CRYPTO '96},
 year = {1996},
 isbn = {3-540-61512-1},
 pages = {1--15},
 numpages = {15},
 url = {http://dl.acm.org/citation.cfm?id=646761.706031},
 acmid = {706031},
 publisher = {Springer-Verlag},
 address = {London, UK, UK},
},

@misc{AES,
  title = {Specification for the Advanced Encryption Standard (AES)},
  howpublished = {Federal Information Processing Standards Publication 197},
  year = {2001},
  url = {http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf}
}

@misc{RodopoulosGithub,
  title = {Formal Verification of the Dynamic Authorization Protocol},
  howpublished = {Github},
  year = {2019},
  url = {https://github.com/rodopoulos/dap-verification}
},

@article{Gollmann2000,
  author  = {Dieter Gollmann},
  title   = {On the Verification of Cryptographic Protocols},
  journal = {Electronic Notes in Theoretical Computer Science},
  volume  = {32},
  pages   = {42 -- 58},
  year    = {2000},
  note    = {Workshop on secure architectures and information flow},
  issn    = {1571-0661},
  doi     = {http://dx.doi.org/10.1016/S1571-0661(04)00094-5},
},

@article{BellaPaulson2006,
 author = {Giampaolo Bella and Lawrence C. Paulson},
 title = {Accountability Protocols: Formalized and Verified},
 journal = {ACM Trans. Inf. Syst. Secur.},
 issue_date = {May 2006},
 volume = {9},
 number = {2},
 month = may,
 year = {2006},
 issn = {1094-9224},
 pages = {138--161},
 numpages = {24},
 doi = {10.1145/1151414.1151416},
 acmid = {1151416},
 publisher = {ACM},
 address = {New York, NY, USA}
},

@article{Bella2003,
 author = {Giampaolo Bella},
 title = {Inductive Verification of Smart Card Protocols},
 journal = {J. Comput. Secur.},
 issue_date = {February 2003},
 volume = {11},
 number = {1},
 month = feb,
 year = {2003},
 issn = {0926-227X},
 pages = {87--132},
 numpages = {46},
 url = {http://dl.acm.org/citation.cfm?id=773065.773068},
 acmid = {773068},
 publisher = {IOS Press},
 address = {Amsterdam, The Netherlands, The Netherlands},
},

@inproceedings{DolevYao81,
 author = {Danny Dolev and Andrew C. Yao},
 title = {On the Security of Public Key Protocols},
 booktitle = {Proceedings of the 22nd Annual Symposium on Foundations of Computer Science},
 series = {SFCS '81},
 year = {1981},
 pages = {350--357},
 numpages = {8},
 doi = {10.1109/SFCS.1981.32},
 acmid = {1382728},
 publisher = {IEEE Computer Society},
 address = {Washington, DC, USA}
},

@article{Paulson98,
 author  = {Lawrence C. Paulson},
 title   = {The Inductive Approach to Verifying Cryptographic Protocols},
 journal = {Journal of Computer Security},
 volume  = {6},
 number  = {1-2},
 month   = Jan,
 year    = {1998},
 issn    = {0926-227X},
 pages   = {85--128},
 url     = {http://dl.acm.org/citation.cfm?id=353677.353681},
 publisher = {IOS Press},
 address   = {Amsterdam, The Netherlands}
},

@article{Paulson99,
 author = {Lawrence C. Paulson},
 title = {Inductive Analysis of the Internet Protocol TLS},
 journal = {ACM Trans. Inf. Syst. Secur.},
 issue_date = {Aug. 1999},
 volume = {2},
 number = {3},
 month = aug,
 year = {1999},
 issn = {1094-9224},
 pages = {332--351},
 numpages = {20},
 url = {http://doi.acm.org/10.1145/322510.322530},
 doi = {10.1145/322510.322530},
 acmid = {322530},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {Isabelle, TLS, authentication, inductive method, proof tools},
}

@inproceedings{Meadows94,
 author     = {Catherine Meadows},
 title      = {Formal Verification of Cryptographic Protocols: A Survey},
 booktitle  = {Proceedings of the 4th International Conference on the Theory and Applications of Cryptology: Advances in Cryptology},
 series     = {ASIACRYPT '94},
 year       = {1995},
 isbn       = {3-540-59339-X},
 pages      = {135--150},
 numpages   = {16},
 url        = {http://dl.acm.org/citation.cfm?id=647092.714095},
 publisher  = {Springer-Verlag},
 address    = {London, UK, UK}
},

@article{Meadows96,
  author = {Catherine Meadows},
  year = {1996},
  month = {02},
  pages = {113-131},
  title = {The NRL Protocol Analyzer: An Overview},
  volume = {26},
  journal = {The Journal of Logic Programming}
}

@article{NeedhamSchroeder78,
 author     = {Roger Needham and Michael D. Schr{\"o}eder},
 title      = {Using encryption for authentication in large networks of computers},
 journal    = {Commun. ACM},
 volume     = {21},
 number     = {12},
 year       = {1978},
 issn       = {0001-0782},
 pages      = {993--999},
 publisher  = {ACM},
 address    = {New York, NY, USA}
},

@article{RSA,
 author = {Ronald L. Rivest and Adi Shamir and Leonard M. Adleman},
 title = {A Method for Obtaining Digital Signatures and Public-key Cryptosystems},
 journal = {Commun. ACM},
 issue_date = {Feb. 1978},
 volume = {21},
 number = {2},
 month = feb,
 year = {1978},
 issn = {0001-0782},
 pages = {120--126},
 numpages = {7},
 url = {http://doi.acm.org/10.1145/359340.359342},
 doi = {10.1145/359340.359342},
 acmid = {359342},
 publisher = {ACM},
 address = {New York, NY, USA},
} ,

@inproceedings{Lowe96,
  author    = {Gavin Lowe},
  title     = {Breaking and Fixing the {N}eedham-{S}chr{\"o}eder Public-Key Protocol
               Using FDR},
  booktitle = {TACAS},
  year      = {1996},
  pages     = {147--166}
},

@article{Avalle2014,
 author    = {Matteo Avalle and Alfredo Pironti and Riccardo Sisto},
 title     = {Formal verification of security protocol implementations: a survey},
 journal   = {Formal Aspects of Computing},
 year      = {2014},
 month     = {Jan},
 volume    = {26},
 number    = {1},
 pages     = {99--123},
 issn      = {1433-299X},
 publisher = {IOS Press},
 doi       = {10.1007/s00165-012-0269-9},
 url       = {https://doi.org/10.1007/s00165-012-0269-9}
},

@inproceedings{BellareRogaway93,
 author = {Mihir Bellare and Phillip Rogaway},
 title = {Entity Authentication and Key Distribution},
 booktitle = {Proceedings of the 13th Annual International Cryptology Conference on Advances in Cryptology},
 series = {CRYPTO '93},
 year = {1994},
 isbn = {0-387-57766-1},
 location = {Santa Barbara, California, USA},
 pages = {232--249},
 numpages = {18},
 url = {http://dl.acm.org/citation.cfm?id=188105.188164},
 acmid = {188164},
 publisher = {Springer-Verlag New York, Inc.},
 address = {New York, NY, USA},
},

@inproceedings{ShoupRubin96,
 author = {Victor Shoup and Avi Rubin},
 title = {Session Key Distribution Using Smart Cards},
 booktitle = {Proceedings of the 15th Annual International Conference on Theory and Application of Cryptographic Techniques},
 series = {EUROCRYPT'96},
 year = {1996},
 isbn = {3-540-61186-X},
 location = {Saragossa, Spain},
 pages = {321--331},
 numpages = {11},
 url = {http://dl.acm.org/citation.cfm?id=1754495.1754534},
 acmid = {1754534},
 publisher = {Springer-Verlag},
 address = {Berlin, Heidelberg},
},

@article{Abadi99,
  author   = {Martín Abadi},
  title    = {Security Protocols and Their Properties},
  journal  = {Foundations of Secure Computation},
  year     = {1999},
  month    = {Jan},
  volume   = {26},
  number   = {1},
  pages    = {39--60}
},

@article{Kemmerer94,
  author = {Richard A. Kemmerer and Catherine Meadows and Jonathan K. Millen},
  title = {Three Systems for Cryptographic Protocol Analysis},
  journal = {Journal of Cryptology},
  volume = {7},
  number = {2},
  month = Jun,
  year = {1994},
  issn = {0933-2790},
  pages = {79--130},
  url = {http://dx.doi.org/10.1007/BF00197942},
  doi = {10.1007/BF00197942},
  publisher = {Springer-Verlag New York, Inc.},
  address = {Secaucus, NJ, USA}
},

@article{Hutchinson2003,
  author    = {Damien Hutchinson and Matthew Warren},
  title     = {Security for Internet Banking: a Framework},
  journal   = {Journal of Enterprise Information Management},
  year      = {2003},
  volume    = {16},
  number    = {1},
  pages     = {64--73},
  issn      = {1741-0398},
  doi       = {10.1108/09576050310453750},
},

@article{Peotta2011,
  author = {Laerte Peotta de Melo and Marcelo Holtz and Bernardo David and Flavio Deus and Rafael de Sousa Junior},
  year = {2011},
  month = {02},
  pages = {},
  title = {A Formal Classification of Internet Banking Attacks and Vulnerabilities},
  volume = {3},
  journal = {International Journal of Computer Science and Information Technology}
},

@article{Adham2013,
  author = {Manal Adham and Amir Azodi and Yvo Desmedt and Ioannis Karaolis},
  title = {How to Attack Two-Factor Authentication Internet Banking},
  year = {2013},
  publisher = {Springer},
  pages = {322--328},
  isbn = {978-3-642-39884-1},
  journal = {17th International Conference on Financial Cryptography and Data Security}
},

@inproceedings{ZhouJiang2012,
  author = {Y. Zhou and X. Jiang},
  title = {Dissecting Android Malware: Characterization and Evolution},
  booktitle = {2012 IEEE Symposium on Security and Privacy},
  year = {2012},
  pages={95-109},
  doi={10.1109/SP.2012.16},
  ISSN={1081-6011},
  month={May}
},

@inproceedings{Han2013,
  title = {Launching Generic Attacks on iOS with Approved Third-party Applications},
  author = {Han, Jin and Kywe, Su Mon and Yan, Qiang and Bao, Feng and Deng, Robert and Gao, Debin and Li, Yingjiu and Zhou, Jianying},
  booktitle = {Proceedings of the 11th International Conference on Applied Cryptography and Network Security},
  series = {ACNS'13},
  year = {2013},
  isbn = {978-3-642-38979-5},
  location = {Banff, AB, Canada},
  pages = {272--289},
  numpages = {18},
  url = {http://dx.doi.org/10.1007/978-3-642-38980-1_17},
  doi = {10.1007/978-3-642-38980-1_17},
  publisher = {Springer-Verlag},
  address = {Berlin, Heidelberg},
}

@techreport{ISO13586,
  type = {Standard},
  key = {ISO/IEC 18004:2015},
  month = {02},
  year = {2015},
  title = {{Information technology -- Automatic identification and data capture techniques -- QR Code bar code symbology specification}},
  address = {Geneva, CH},
  institution = {International Organization for Standardization}
}

@TechReport{NewzooReport2018,
  author = {Newzoo},
  title = {Global Mobile Market Report},
  institution = {Newzoo},
  year = {2018}
}

@INPROCEEDINGS{Rao2015,
  author={S. P. {Rao} and S. {Holtmanns} and I. {Oliver} and T. {Aura}},
  booktitle={2015 IEEE Trustcom/BigDataSE/ISPA},
  title={Unblocking Stolen Mobile Devices Using SS7-MAP Vulnerabilities: Exploiting the Relationship between IMEI and IMSI for EIR Access},
  year={2015},
  volume={1},
  number={},
  pages={1171-1176},
  doi={10.1109/Trustcom.2015.500},
  month={Aug}
}

@article{Starnberger2009,
  author = {Guenther Starnberger and Lorenz Froihofer and Karl M. Göschka},
  title = {QR-TAN: Secure Mobile Transaction Authentication},
  journal = {Proceedings of the 4th International Conference on Availability, Reliability and Security, ARES 2009},
  year = {2009},
  month = {03},
  pages = {578-583},
  publisher = {IEEE}
}

@inproceedings{LeeHyunLim2010,
  author = {Young Sil Lee and Nack Hyun Kim and Hyotaek Lim and HeungKuk Jo and Hoon Jae Lee},
  booktitle = {5th International Conference on Computer Sciences and Convergence Information Technology},
  title = {Online banking authentication system using mobile-OTP with QR-code},
  year = {2010},
  pages = {644-648},
  doi = {10.1109/ICCIT.2010.5711134},
  month = {Nov}
}

@book{BoydMathuria2008,
  author =    {Colin Boyd and Anish Mathuria},
  title =     {Protocols for Authentication and Key Establishment},
  publisher = {Springer},
  isbn =      {3540431071,9783540431077},
  year =      {2008},
  edition =   {2003},
},

@book{Bella2007,
  title = {Formal Correctness of Security Protocols},
  author = {Giampaolo Bella},
  isbn = {978-3-540-68134-2},
  publisher = {Springer},
  year = {2007}
},

@book{RyanSchneider2010,
 author = {Peter Ryan and Steve Schneider},
 title = {The Modelling and Analysis of Security Protocols: The Csp Approach},
 year = {2010},
 isbn = {0-201-67471-8},
 edition = {2nd},
 publisher = {Addison-Wesley Professional},
},

@book{ross-security,
 author = {Ross J. Anderson},
 title = {Security Engineering: A Guide to Building Dependable Distributed Systems},
 year = {2008},
 isbn = {9780470068526},
 edition = {2},
 publisher = {Wiley Publishing},
},

@book{isabelle,
	author    = {Lawrence C. Paulson and Tobias Nipkow},
	title     = {Isabelle: A Generic Theorem Prover},
	year      = {1994},
  publisher = {Springer}
}

@book{isabelle-hol,
  author	  = {Tobias Nipkow and Lawrence C. Paulson and Markus Wenzel},
  title		  = {Isabelle/HOL --- A Proof Assistant for Higher-Order Logic},
  publisher	= {Springer},
  series	  = {LNCS},
  volume	  = 2283,
  year		  = 2002
},

@misc{isabelle-hol-auth,
  author = {Lawrence C. Paulson},
  title = {Isabelle HOL-Auth Libraries},
  year = 1993,
  url = {http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/library/HOL/HOL-Auth/index.html},
  urldate = {2017-10-08}
},

@INPROCEEDINGS{Bonneau2012,
  author = {J. Bonneau and C. Herley and P. C. v. Oorschot and F. Stajano},
  booktitle = {2012 IEEE Symposium on Security and Privacy},
  title = {The Quest to Replace Passwords: A Framework for Comparative Evaluation of Web Authentication Schemes},
  year = {2012},
  month = {May},
  pages = {553-567},
  doi = {10.1109/SP.2012.44},
  ISSN = {1081-6011},
},

@article{Claessens2002,
  author = {Joris Claessens and Valentin Dem and Danny De Cock and Bart Preneel and Joos Vandewalle},
  title = {On the Security of Today’s Online Electronic Banking Systems},
  journal = {Computers \& Security},
  volume = {21},
  number = {3},
  pages = {253 - 265},
  year = {2002},
  issn = {0167-4048},
  doi = {https://doi.org/10.1016/S0167-4048(02)00312-7},
  url = {http://www.sciencedirect.com/science/article/pii/S0167404802003127},
},

@article{Ellison07,
  author = {M. Ellison, Carl},
  year = {2007},
  month = {01},
  pages = {399},
  title = {Ceremony Design and Analysis.},
  volume = {2007},
  journal = {IACR Cryptology ePrint Archive}
},

@inproceedings{Bella2012,
  author = {Bella, Giampaolo and Coles-Kemp, Lizzie},
  year = {2012},
  month = {06},
  pages = {273-286},
  title = {Layered Analysis of Security Ceremonies},
  volume = {376},
  booktitle = {IFIP Advances in Information and Communication Technology},
  doi = {10.1007/978-3-642-30436-1_23}
},

repository: rodopoulos/dap-verification

repo_name: rodopoulos/dap-verification


text:
DESCRIPTION = "GNU Transport Layer Security Library"
DEPENDS = "zlib libgcrypt lzo"
MAINTAINER = "Eric Shattow <lucent@gmail.com>"
HOMEPAGE = "http://www.gnu.org/software/gnutls/"
LICENSE = "LGPL"
PR = "r1"

SRC_URI = "ftp://ftp.gnutls.org/pub/gnutls/gnutls-${PV}.tar.bz2 \
           file://gnutls-openssl.patch;patch=1 \
           file://gnutls-texinfo-euro.patch;patch=1"

inherit autotools binconfig

PACKAGES =+ "${PN}-openssl ${PN}-extra ${PN}-bin"
PACKAGES_DYNAMIC = "libgnutls*"
FILES_${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
FILES_${PN}-extra = "${libdir}/libgnutls-extra.so.*"
FILES_${PN} = "${libdir}/libgnutls.so.*"
FILES_${PN}-bin = "${bindir}/gnutls-serv \
		   ${bindir}/gnutls-cli \
		   ${bindir}/srptool \
		   ${bindir}/certtool \
		   ${bindir}/gnutls-srpcrypt \
		   ${bindir}/psktool"

FILES_${PN}-dev += "${bindir}/*-config ${bindir}/gnutls-cli-debug"

EXTRA_OECONF="--with-included-opencdk --with-included-libtasn1"

do_stage() {
	oe_libinstall -C lib/.libs -so -a libgnutls ${STAGING_LIBDIR}
	oe_libinstall -C libextra/.libs -so -a libgnutls-extra ${STAGING_LIBDIR}
	oe_libinstall -C libextra/.libs -so -a libgnutls-openssl ${STAGING_LIBDIR}
	autotools_stage_includes

	install -d ${STAGING_DATADIR}/aclocal
	cp ${S}/lib/libgnutls.m4 ${STAGING_DATADIR}/aclocal/
}

license: MIT

license_type: permissive

branch_name: refs/heads/master

extension: bb


text:
DESCRIPTION = "A library for accessing a CDDB server"
HOMEPAGE = "http://libcddb.sourceforge.net"
SECTION = "libs"
PRIORITY = "optional"
LICENSE = "LGPL-2"
MAINTAINER = "Andreas Frisch <andreas.frisch@multimedia-labs.de>"

SRC_URI = "http://downloads.sourceforge.net/${PN}/${PN}-${PV}.tar.bz2\
	    file://${P}-asneeded-nonglibc.patch;patch=1"

inherit autotools

DEPEND="doc? ( app-doc/doxygen )"

repository: demsey/openembedded

repo_name: demsey/openembedded

branch_name: HEAD


text:
SUMMARY = "A pure Unix shell script implementing ACME client protocol."
DESCRIPTION = "A pure Unix shell script implementing ACME client protocol."
LICENSE = "GPL-3.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891"

SRC_URI = "file://get_acme_sh"

#SRC_URI = "git://github.com/acmesh-official/acme.sh.git;protocol=https"
#SRCREV = "2.8.5"

#S = "${WORKDIR}/git"

RDEPENDS_${PN} = " bash openssl-bin cronie useradd-beekeeper"

do_install(){
#
#    # install acme.sh script to beekeeper's home
#    install -m 0755 ${S}/acme.sh ${D}/tmp

     install -d -m 755 ${D}${bindir}

     install -m 0755 ${WORKDIR}/get_acme_sh ${D}${bindir}/get_acme_sh
}

#pkg_postinst_ontarget_${PN}(){
#
#    cd /home/beekeeper
#    curl https://get.acme.sh | sh
#
#}


text:
SUMMARY = "C++/Qt5 wrapper around multiple MIDI interfaces"
HOMEPAGE = "http://drumstick.sourceforge.net"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d9d415d3d8c5523e5586ff7b785095f1"

inherit cmake_qt5 pkgconfig mime mime-xdg gtk-icon-cache

DEPENDS += " \
    qtbase \
    qtsvg \
    fluidsynth \
"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${PV}/${BPN}-${PV}.tar.bz2"
SRC_URI[sha256sum] = "75aca4281da25fe0186b44c07772c5f0b4d1f2bba875c4667e7e6e9fcedb3cd9"

FILES_${PN} += " \
    ${datadir}/mime \
    ${datadir}/icons \
"

branch_name: refs/heads/nilrt/master/hardknott

gha_license_id: MIT

gha_language: BitBake


text:
// -*- Mode: C++; -*-
//                            Package   : omniORB
// CORBA.h                    Created on: 30/1/96
//                            Author    : Sai Lai Lo (sll)
//
//    Copyright (C) 2003-2011 Apasphere Ltd
//    Copyright (C) 1996-1999 AT&T Laboratories Cambridge
//
//    This file is part of the omniORB library
//
//    The omniORB library is free software; you can redistribute it and/or
//    modify it under the terms of the GNU Library General Public
//    License as published by the Free Software Foundation; either
//    version 2 of the License, or (at your option) any later version.
//
//    This library is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//    Library General Public License for more details.
//
//    You should have received a copy of the GNU Library General Public
//    License along with this library; if not, write to the Free
//    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
//    02111-1307, USA
//
//
// Description:
//    A complete set of C++ definitions for the CORBA module.
//

#ifndef __CORBA_H__
#define __CORBA_H__

#ifndef __CORBA_H_EXTERNAL_GUARD__
# define __CORBA_H_EXTERNAL_GUARD__
#endif

#ifdef _core_attr
# error "A local CPP macro _core_attr has already been defined."
#endif

#ifdef _dyn_attr
# error "A local CPP macro _dyn_attr has already been defined."
#endif

#if defined(_OMNIORB_LIBRARY) && defined(_OMNIORB_DYNAMIC_LIBRARY)
# error "_OMNIORB_LIBRARY and _OMNIORB_DYNAMIC_LIBRARY are both defined."
#endif

#if    defined(_OMNIORB_LIBRARY)
#         define _core_attr
#         define _dyn_attr  _OMNIORB_NTDLL_IMPORT
#elif  defined(_OMNIORB_DYNAMIC_LIBRARY)
#         define _core_attr _OMNIORB_NTDLL_IMPORT
#         define _dyn_attr
#else
#         define _core_attr _OMNIORB_NTDLL_IMPORT
#         define _dyn_attr  _OMNIORB_NTDLL_IMPORT
#endif

#ifndef USE_omniORB_logStream
# define USE_omniORB_logStream
#endif

#include <omniORB4/omniInternal.h>

// Forward declarations.
class omniOrbBoaServant;
class _omni_ValueFactoryManager;
struct _omni_ValueIds;
class cdrAnyMemoryStream;

_CORBA_MODULE CORBA

_CORBA_MODULE_BEG

# define INSIDE_OMNIORB_CORBA_MODULE

  //////////////////////////////////////////////////////////////////////
  ////////////////////////////// Forward decls /////////////////////////
  //////////////////////////////////////////////////////////////////////

  class Object;
  class Object_var;
  class Object_OUT_arg;
  typedef Object* Object_ptr;
  typedef Object_ptr ObjectRef;

  class TypeCode;
  typedef TypeCode* TypeCode_ptr;
  typedef TypeCode_ptr TypeCodeRef;

  class Fixed;
  class Any;
  class ValueBase;

  class AbstractBase;
  typedef AbstractBase* AbstractBase_ptr;

  //////////////////////////////////////////////////////////////////////
  ////////////////////// Definitions ///////////////////////////////////
  //////////////////////////////////////////////////////////////////////

# include "CORBA_primitive_types.h"
# include "CORBA_String.h"
# include "CORBA_Exception.h"
# include "CORBA_Environment.h"
# include "CORBA_NamedValue.h"
# include "CORBA_Context.h"
# include "CORBA_Principal.h"
# include "CORBA_ExceptionList.h"
# include "CORBA_TypeCode_member.h"
# include "CORBA_Object.h"
# include "CORBA_Object_vartypes.h"
# include "CORBA_LocalObject.h"
# include "CORBA_LocalObject_vartypes.h"
# include "CORBA_Any.h"
# include "CORBA_Any_vartypes.h"

  //////////////////////////////////////////////////////////////////////
  ////////////////////// Generated from corbaidl.idl ///////////////////
  //////////////////////////////////////////////////////////////////////

# include <omniORB4/corbaidl_defs.hh>

  //////////////////////////////////////////////////////////////////////
  ////////////////////// More Definitions //////////////////////////////
  //////////////////////////////////////////////////////////////////////

# include "CORBA_TypeCode.h"
# include "CORBA_Request.h"
# include "CORBA_ServerRequest.h"
# include "CORBA_ValueBase.h"
# include "CORBA_ValueBase_vartypes.h"
# include "CORBA_AbstractBase.h"
# include "CORBA_UnknownUserException.h"
# include "CORBA_Policy.h"
# include "CORBA_Current.h"
# include "CORBA_DomainManager.h"
# include "CORBA_BOA.h"
# include "CORBA_ORB.h"
# include "CORBA_Fixed.h"
# include "CORBA_static_fns.h"
# include "CORBA_vartypes.h"

  //////////////////////////////////////////////////////////////////////
  ////////////////////// Generated code ////////////////////////////////
  //////////////////////////////////////////////////////////////////////

  // "core" attributes in these headers are exported by the dynamic library

# if defined(_OMNIORB_LIBRARY)
#    undef   _core_attr
#    define  _core_attr  _OMNIORB_NTDLL_IMPORT
# elif defined(_OMNIORB_DYNAMIC_LIBRARY)
#    undef   _core_attr
#    define  _core_attr
# endif

# if defined(ENABLE_CLIENT_IR_SUPPORT)
#    include <omniORB4/ir_defs.hh>
# endif

# include <omniORB4/boxes_defs.hh>
# include <omniORB4/pollable_defs.hh>

# if defined(_OMNIORB_LIBRARY)
#    undef   _core_attr
#    define  _core_attr
# elif defined(_OMNIORB_DYNAMIC_LIBRARY)
#    undef   _core_attr
#    define  _core_attr  _OMNIORB_NTDLL_IMPORT
# endif

  //////////////////////////////////////////////////////////////////////
  ////////////////////// End of CORBA module ///////////////////////////
  //////////////////////////////////////////////////////////////////////

#  undef INSIDE_OMNIORB_CORBA_MODULE

_CORBA_MODULE_END

//?? These really want to be renamed and put elsewhere.
extern CORBA::Boolean
_omni_callTransientExceptionHandler(omniObjRef*             obj,
                                    CORBA::ULong            retries,
				    const CORBA::TRANSIENT& ex,
                                    const char*             op);
extern CORBA::Boolean
_omni_callTimeoutExceptionHandler(omniObjRef*           obj,
                                  CORBA::ULong          retries,
				  const CORBA::TIMEOUT& ex,
                                  const char*           op);
extern CORBA::Boolean
_omni_callCommFailureExceptionHandler(omniObjRef*                obj,
				      CORBA::ULong               retries,
				      const CORBA::COMM_FAILURE& ex,
                                      const char*                op);
extern CORBA::Boolean
_omni_callSystemExceptionHandler(omniObjRef*                   obj,
                                 CORBA::ULong                  retries,
				 const CORBA::SystemException& ex,
                                 const char*                   op);

extern void _omni_set_NameService(CORBA::Object_ptr);

#include <omniORB4/omniIOR.h>
#include <omniORB4/omniORB.h>
#include <omniORB4/proxyFactory.h>
#include <omniORB4/valueType.h>

#include <omniORB4/templatedefns.h>
#include <omniORB4/corba_operators.h>
#include <omniORB4/poa.h>
#include <omniORB4/fixed.h>
#include <omniORB4/BiDirPolicy.h>
#include <omniORB4/omniPolicy.h>
#include <omniORB4/dynAny.h>

#include <omniORB4/minorCode.h>

#include <omniORB4/omniAsyncInvoker.h>

#include <omniORB4/corbaidl_operators.hh>

#if defined(ENABLE_CLIENT_IR_SUPPORT)
#  include <omniORB4/ir_operators.hh>
#endif

#include <omniORB4/boxes_operators.hh>
#include <omniORB4/pollable_operators.hh>

_CORBA_MODULE POA_CORBA
_CORBA_MODULE_BEG

#include <omniORB4/corbaidl_poa.hh>
#if defined(ENABLE_CLIENT_IR_SUPPORT)
#  include <omniORB4/ir_poa.hh>
#endif
#include <omniORB4/boxes_poa.hh>
#include <omniORB4/pollable_poa.hh>

_CORBA_MODULE_END

#include <omniORB4/boa.h>

#undef _core_attr
#undef _dyn_attr

// Define external guards for CORBA module IDL files.
#ifndef __corbaidl_hh_EXTERNAL_GUARD__
#  define __corbaidl_hh_EXTERNAL_GUARD__
#endif

#ifdef ENABLE_CLIENT_IR_SUPPORT
#  ifndef __ir_hh_EXTERNAL_GUARD__
#    define __ir_hh_EXTERNAL_GUARD__
#  endif
#endif

#ifndef __boxes_hh_EXTERNAL_GUARD__
#  define __boxes_hh_EXTERNAL_GUARD__
#endif

#ifndef __pollable_hh_EXTERNAL_GUARD__
#  define __pollable_hh_EXTERNAL_GUARD__
#endif

// Include headers for generated code outside the CORBA module

#if !defined(_OMNIORB_LIBRARY) && !defined(_OMNIORB_DYNAMIC_LIBRARY)
#  ifndef USE_core_stub_in_nt_dll
#    define USE_core_stub_in_nt_dll
#    define USE_core_stub_in_nt_dll_NOT_DEFINED
#  endif
#  ifndef USE_dyn_stub_in_nt_dll
#    define USE_dyn_stub_in_nt_dll
#    define USE_dyn_stub_in_nt_dll_NOT_DEFINED
#  endif
#  include <omniORB4/Naming.hh>
#  include <omniORB4/messaging.hh>
#  ifdef  USE_core_stub_in_nt_dll_NOT_DEFINED
#    undef  USE_core_stub_in_nt_dll
#    undef  USE_core_stub_in_nt_dll_NOT_DEFINED
#  endif
#  ifdef  USE_dyn_stub_in_nt_dll_NOT_DEFINED
#    undef  USE_dyn_stub_in_nt_dll
#    undef  USE_dyn_stub_in_nt_dll_NOT_DEFINED
#  endif
#endif

// OMG COS IDLs refer to CosNaming IDL as "CosNaming.idl".
// omniORB uses the file name "Naming.idl". Any IDLs that include
// CosNaming.idl will have in their stubs #include "CosNaming.hh".
// Define the external guard for CosNaming to stop include to have
// any effect. This works because the stubs generated by omniidl
// put external guards around the include.
#ifndef __CosNaming_hh_EXTERNAL_GUARD__
#  define __CosNaming_hh_EXTERNAL_GUARD__
#endif

// Define __CosNaming_hh__ in case application code tries to import a
// header generated from CosNaming.idl.
#ifndef __CosNaming_hh__
#  define __CosNaming_hh__
#endif

#ifndef __messaging_hh_EXTERNAL_GUARD__
#  define __messaging_hh_EXTERNAL_GUARD__
#endif

#endif // __CORBA_H__

repository: tango-controls/igorpro-binding

repo_name: tango-controls/igorpro-binding

extension: h


text:
DESCRIPTION = "Visual Boy Advance - A fork of VBA-M with libretro integration"

LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://doc/License.txt;md5=ad8ac3e11cc39f83fcaa6cd492075985"

inherit libretro

LIBRETRO_GIT_REPO = "github.com/libretro/vbam-libretro.git"

LIBRETRO_MAKEFILE_PREFIX = "src/libretro"
LIBRETRO_CORE = "src/libretro/vbam"


text:
SUMMARY = "Krita is a free digital painting application"
LICENSE = "GPLv3 & BSD"
HOMEPAGE = "https://krita.org/"
LIC_FILES_CHKSUM = " \
    file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
    file://COPYING-CMAKE-SCRIPTS;md5=3775480a712fc46a69647678acb234cb \
"

inherit kde-apps python3native gtk-icon-cache

DEPENDS += " \
    qtmultimedia \
    curl \
    poppler \
    boost \
    libraw \
    libeigen \
    exiv2 \
    fftw \
    \
    kauth-native \
    karchive \
    kconfig-native \
    kwidgetsaddons \
    kcompletion \
    kcoreaddons-native \
    kguiaddons \
    ki18n \
    kitemmodels \
    kitemviews \
    kwindowsystem \
    kio \
    kcrash \
"

PV = "4.1.8"
PVEXT = ""
SRC_URI = " \
    ${KDE_MIRROR}/stable/${BPN}/${PV}/${BPN}-${PV}${PVEXT}.tar.gz \
"
SRC_URI[md5sum] = "995192161d98489d7ced1fd493fe150e"
SRC_URI[sha256sum] = "0476c9e2279f0ae690c2ed02e1aa9c3d491943643f9859355a02657318bd5940"
S = "${WORKDIR}/${BPN}-${PV}${PVEXT}"

OECMAKE_GENERATOR="Unix Makefiles"

# krita has lots of include_directories(SYSTEM ${FOO_DIR})
# have no better way to make gcc6 happy
do_configure_append() {
     for makefile in `find ${B} -name *.make` ; do
         sed -i 's:-isystem:-I:g' $makefile
     done
}

# HACK - but overidable by BSP
LDFLAGSGL = "-lGLESv2"
LDFLAGS += "${LDFLAGSGL}"

FILES_${PN} += " \
    ${datadir}/color \
    ${datadir}/color-schemes \
    ${datadir}/icons \
    ${datadir}/kritaplugins \
    ${libdir}/kritaplugins \
    ${OE_QMAKE_PATH_QML}/org/krita \
"


text:
package co

import (
	"reflect"
	"strings"
)

// 合并给定的2个map
// ignoreCase 过滤重复的键
func MergeStringMap(src, dst map[string]string, ignoreCase bool) map[string]string {
	for k, v := range src {
		if ignoreCase {
			k = strings.ToLower(k)
		}

		dst[k] = v
	}

	return dst
}

// 将给定的map键名转换为小写
func KeyToLower(src map[string]string) map[string]string {
	newMp := make(map[string]string, len(src))
	for k, v := range src {
		k = strings.ToLower(k)
		newMp[k] = v
	}

	return newMp
}

// 给定key获取value, 支持递归获取
// eg "top" "top.sub"
func GetByPath(key string, mp map[string]interface{}) (val interface{}, ok bool) {
	if val, ok := mp[key]; ok {
		return val, true
	}

	// has sub key? eg. "top.sub"
	if !strings.ContainsRune(key, '.') {
		return nil, false
	}

	keys := strings.Split(key, ".")
	topK := keys[0]

	// find top item data based on top key
	var item interface{}
	if item, ok = mp[topK]; !ok {
		return
	}

	for _, k := range keys[1:] {
		switch tData := item.(type) {
		case map[string]string: // is simple map
			item, ok = tData[k]
			if !ok {
				return
			}
		case map[string]interface{}: // is map(decode from toml/json)
			if item, ok = tData[k]; !ok {
				return
			}
		case map[interface{}]interface{}: // is map(decode from yaml)
			if item, ok = tData[k]; !ok {
				return
			}
		default: // error
			ok = false
			return
		}
	}

	return item, true
}

// 获取给定map的所有键
func Keys(mp interface{}) (keys []string) {
	rftVal := reflect.ValueOf(mp)
	if rftVal.Type().Kind() == reflect.Ptr {
		rftVal = rftVal.Elem()
	}

	if rftVal.Kind() != reflect.Map {
		return
	}

	for _, key := range rftVal.MapKeys() {
		keys = append(keys, key.String())
	}
	return
}

// 获取给定map的所有值
func Values(mp interface{}) (values []interface{}) {
	rftTyp := reflect.TypeOf(mp)
	if rftTyp.Kind() == reflect.Ptr {
		rftTyp = rftTyp.Elem()
	}

	if rftTyp.Kind() != reflect.Map {
		return
	}

	rftVal := reflect.ValueOf(mp)
	for _, key := range rftVal.MapKeys() {
		values = append(values, rftVal.MapIndex(key).Interface())
	}
	return
}

repository: telanflow/co

repo_name: telanflow/co

extension: go


text:
@proceedings{ws-2013-nlp,
    title = "Proceedings of the Workshop on {NLP} for Medicine and Biology associated with {RANLP} 2013",
    editor = "Savova, Guergana  and
      Cohen, Kevin Bretonnel  and
      Angelova, Galia",
    month = sep,
    year = "2013",
    address = "Hissar, Bulgaria",
    publisher = "INCOMA Ltd. Shoumen, BULGARIA",
    url = "https://www.aclweb.org/anthology/W13-5100",
}
@inproceedings{dligach-etal-2013-active,
    title = "Active Learning for Phenotyping Tasks",
    author = "Dligach, Dmitriy  and
      Miller, Timothy  and
      Savova, Guergana",
    booktitle = "Proceedings of the Workshop on {NLP} for Medicine and Biology associated with {RANLP} 2013",
    month = sep,
    year = "2013",
    address = "Hissar, Bulgaria",
    publisher = "INCOMA Ltd. Shoumen, BULGARIA",
    url = "https://www.aclweb.org/anthology/W13-5101",
    pages = "1--8",
}
@inproceedings{gorrell-etal-2013-finding,
    title = "Finding Negative Symptoms of Schizophrenia in Patient Records",
    author = "Gorrell, Genevieve  and
      Roberts, Angus  and
      Jackson, Richard  and
      Stewart, Robert",
    booktitle = "Proceedings of the Workshop on {NLP} for Medicine and Biology associated with {RANLP} 2013",
    month = sep,
    year = "2013",
    address = "Hissar, Bulgaria",
    publisher = "INCOMA Ltd. Shoumen, BULGARIA",
    url = "https://www.aclweb.org/anthology/W13-5102",
    pages = "9--17",
}
@inproceedings{scheurwegs-etal-2013-de,
    title = "De-Identification of Clinical Free Text in {D}utch with Limited Training Data: A Case Study",
    author = "Scheurwegs, Elyne  and
      Luyckx, Kim  and
      Van der Schueren, Filip  and
      Van den Bulcke, Tim",
    booktitle = "Proceedings of the Workshop on {NLP} for Medicine and Biology associated with {RANLP} 2013",
    month = sep,
    year = "2013",
    address = "Hissar, Bulgaria",
    publisher = "INCOMA Ltd. Shoumen, BULGARIA",
    url = "https://www.aclweb.org/anthology/W13-5103",
    pages = "18--23",
}
@inproceedings{sokolova-etal-2013-nlp,
    title = "{NLP} can help parents to understand rare diseases",
    author = "Sokolova, Marina  and
      Ioshikhes, Ilya  and
      Poursepanj, Hamid  and
      MacKenzie, Alex",
    booktitle = "Proceedings of the Workshop on {NLP} for Medicine and Biology associated with {RANLP} 2013",
    month = sep,
    year = "2013",
    address = "Hissar, Bulgaria",
    publisher = "INCOMA Ltd. Shoumen, BULGARIA",
    url = "https://www.aclweb.org/anthology/W13-5104",
    pages = "24--33",
}

repository: emorynlp/nlprankings

repo_name: emorynlp/nlprankings

gha_license_id: NOASSERTION

gha_language: TeX

extension: bib


text:
import { findIndex } from 'lodash';

const items = new Map();

function checkItems() {
  items.forEach((item, node) => {
    const offsetWidth = node.offsetWidth;
    const offsetHeight = node.offsetHeight;

    if (
      (item.offsetWidth !== offsetWidth) ||
      (item.offsetHeight !== offsetHeight)
    ) {
      item.offsetWidth = offsetWidth;
      item.offsetHeight = offsetHeight;
      item.callback(node);
    }
  });

  setTimeout(checkItems, 50);
}

checkItems(); // ensure it was called only once!

function resizeEvent() {
  return {
    restrict: 'A',
    link($scope, $element, attrs) {
      const node = $element[0];
      if (!items.has(node)) {
        items.set(node, {
          callback: () => {
            $scope.$evalAsync(attrs.resizeEvent);
          },
        });

        $scope.$on('$destroy', () => {
          const index = findIndex(items, item => item.node === node);
          if (index >= 0) {
            items.splice(index, 1); // remove item
          }
        });
      }
    },
  };
}

export default function init(ngModule) {
  ngModule.directive('resizeEvent', resizeEvent);
}

repository: xu-bin-bin/redash

repo_name: xu-bin-bin/redash

extension: js


text:
SUMMARY = "Graphical trace viewer for Ftrace"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
                    file://kernel-shark.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e"
DEPENDS = "gtk+"
SRCREV = "79e08f8edb38c4c5098486caaa87ca90ba00f547"
PV = "2.3.2"

SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=trace-cmd-stable-v2.3"

S = "${WORKDIR}/git"

do_install() {
    ${MAKE} NO_PYTHON=1 prefix=${prefix} plugin_dir=${libdir}/trace-cmd/plugins DESTDIR=${D} install_gui
    # remove files already shipped in trace-cmd package
    rm -f ${D}${bindir}/trace-cmd
    rm -rf ${D}${libdir}/trace-cmd
    rmdir ${D}${libdir}
}

RDEPENDS:${PN} = "trace-cmd"

FILESPATH = "${FILE_DIRNAME}/trace-cmd"

repository: lgirdk/meta-linaro

repo_name: lgirdk/meta-linaro


text:
package volume

import (
	"fmt"
	e "github.com/lastbackend/lastbackend/libs/errors"
	"github.com/lastbackend/lastbackend/libs/model"
	"github.com/lastbackend/lastbackend/pkg/daemon/context"
	"github.com/lastbackend/lastbackend/pkg/util/generator"
	"k8s.io/client-go/1.5/pkg/api"
	"k8s.io/client-go/1.5/pkg/api/v1"
)

type Volume struct {
	config *v1.PersistentVolume
}

type VolumeList []Volume

func Get(name string) (*v1.PersistentVolume, *e.Err) {

	var (
		er  error
		ctx = context.Get()
	)

	volume, er := ctx.K8S.Core().PersistentVolumes().Get(name)
	if er != nil {
		return nil, e.New("volume").Unknown(er)
	}

	return volume, nil
}

func List() (*v1.PersistentVolumeList, *e.Err) {

	var (
		er  error
		ctx = context.Get()
	)

	pv, er := ctx.K8S.Core().PersistentVolumes().List(api.ListOptions{})
	if er != nil {
		return nil, e.New("volume").Unknown(er)
	}

	return pv, nil
}

func Create(user, project string, config *v1.PersistentVolume) (*Volume, *e.Err) {

	var (
		ctx    = context.Get()
		volume = new(model.Volume)
		pv     = new(Volume)
	)

	volume.User = user
	volume.Project = project
	volume.Name = fmt.Sprintf("%s-%s", config.Name, generator.GetUUIDV4()[0:12])

	volume, err := ctx.Storage.Volume().Insert(volume)
	if err != nil {
		return nil, err
	}

	pv.config = config
	pv.config.Name = volume.Name

	return pv, nil
}

func (v *Volume) Deploy() *e.Err {

	var (
		er  error
		ctx = context.Get()
	)

	_, er = ctx.K8S.Core().PersistentVolumes().Create(v.config)
	if er != nil {
		return e.New("volume").Unknown(er)
	}

	return nil
}

repository: mtojek/lastbackend

repo_name: mtojek/lastbackend


text:
@Article{Franceschi2019,
author="Franceschi, Valentina
and Prandi, Dario
and Rizzi, Luca",
title="On the Essential Self-Adjointness of Singular Sub-Laplacians",
journal="Potential Analysis",
year="2019",
month="Jan",
day="14",
abstract="We prove a general essential self-adjointness criterion for sub-Laplacians on complete sub-Riemannian manifolds, defined with respect to singular measures. We also show that, in the compact case, this criterion implies discreteness of the sub-Laplacian spectrum even though the total volume of the manifold is infinite. As a consequence of our result, the intrinsic sub-Laplacian (i.e. defined w.r.t. Popp's measure) is essentially self-adjoint on the equiregular connected components of a sub-Riemannian manifold. This settles a conjecture formulated by Boscain and Laurent (Ann. Inst. Fourier (Grenoble) 63(5), 1739--1770, 2013), under mild regularity assumptions on the singular region, and when the latter does not contain characteristic points.",
issn="1572-929X",
doi="10.1007/s11118-018-09760-w",
url="https://doi.org/10.1007/s11118-018-09760-w"
}

repository: dprn/academic-kickstart

repo_name: dprn/academic-kickstart


text:
// Copyright 2013 Flo Lauber <dev@qatfy.at>.  All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// TODO(flo):
//   - support password protected MUC rooms
//   - cleanup signatures of join/leave functions

//
// XEP-0045: Multi-User Chat
//

package xmpp

import (
	"errors"
	"fmt"
	"strings"
	"time"
)

const (
	nsMUC      = "http://jabber.org/protocol/muc"
	nsMUCUser  = "http://jabber.org/protocol/muc#user"
	nsMUCAdmin = "http://jabber.org/protocol/muc#admin"
	nsMUCOwner = "http://jabber.org/protocol/muc#owner"

	NoHistory      = 0
	CharHistory    = 1
	StanzaHistory  = 2
	SecondsHistory = 3
	SinceHistory   = 4
)

// Send sends room topic wrapped inside an XMPP message stanza body.
func (c *Client) SendTopic(room, topic string) (n int, err error) {
	// return c.SendString(fmt.Sprintf(
	// 	`<message to='%s' type='%s' xml:lang='en'><subject>%s</subject></message>`,
	// 	xmlEscape(room), "groupchat", xmlEscape(topic),
	// ))
	msg := new(Message)
	msg.To = room
	msg.Type = "groupchat"
	msg.Subject = topic

	return c.SendMessage(msg)
}

func (c *Client) JoinMUCNoHistory(room, nick string) (n int, err error) {
	if nick == "" {
		nick = strings.Split(c.jid, "@")[0]
	}
	return c.SendString(fmt.Sprintf(
		`<presence to='%s/%s'>
			<x xmlns='%s'>"
				<history maxchars='0'/>
			</x>
		</presence>`,
		xmlEscape(room), xmlEscape(nick), nsMUC,
	))
}

// xep-0045 7.2
func (c *Client) JoinMUC(room, nick string, history_type, history int, history_date *time.Time) (n int, err error) {
	if nick == "" {
		nick = strings.Split(c.jid, "@")[0]
	}
	switch history_type {
	case NoHistory:
		return c.SendString(fmt.Sprintf(
			`<presence to='%s/%s'>
				<x xmlns='%s' />
			</presence>`,
			xmlEscape(room), xmlEscape(nick), nsMUC,
		))
	case CharHistory:
		return c.SendString(fmt.Sprintf(
			`<presence to='%s/%s'>
				<x xmlns='%s'><history maxchars='%d'/></x>
			</presence>`,
			xmlEscape(room), xmlEscape(nick), nsMUC, history,
		))
	case StanzaHistory:
		return c.SendString(fmt.Sprintf(
			`<presence to='%s/%s'>
				<x xmlns='%s'><history maxstanzas='%d'/></x>
			</presence>`,
			xmlEscape(room), xmlEscape(nick), nsMUC, history,
		))
	case SecondsHistory:
		return c.SendString(fmt.Sprintf(
			`<presence to='%s/%s'>
				<x xmlns='%s'><history seconds='%d'/></x>
			</presence>`,
			xmlEscape(room), xmlEscape(nick), nsMUC, history,
		))
	case SinceHistory:
		if history_date != nil {
			return c.SendString(fmt.Sprintf(
				`<presence to='%s/%s'>
					<x xmlns='%s'><history since='%s'/></x>
				</presence>`,
				xmlEscape(room), xmlEscape(nick), nsMUC, history_date.Format(time.RFC3339),
			))
		}
	}
	return 0, errors.New("Unknown history option")
}

// xep-0045 7.2.6
func (c *Client) JoinProtectedMUC(jid, nick string, password string, history_type, history int, history_date *time.Time) (n int, err error) {
	if nick == "" {
		nick = strings.Split(c.jid, "@")[0]
	}
	switch history_type {
	case NoHistory:
		return c.SendString(fmt.Sprintf(
			`<presence to='%s/%s'>
				<x xmlns='%s'><password>%s</password></x>
			</presence>`,
			xmlEscape(jid), xmlEscape(nick), nsMUC, xmlEscape(password),
		))
	case CharHistory:
		return c.SendString(fmt.Sprintf(
			`<presence to='%s/%s'>
				<x xmlns='%s'><password>%s</password><history maxchars='%d'/></x>
			</presence>`,
			xmlEscape(jid), xmlEscape(nick), nsMUC, xmlEscape(password), history,
		))
	case StanzaHistory:
		return c.SendString(fmt.Sprintf(
			`<presence to='%s/%s'>
				<x xmlns='%s'><password>%s</password><history maxstanzas='%d'/></x>
			</presence>`,
			xmlEscape(jid), xmlEscape(nick), nsMUC, xmlEscape(password), history,
		))
	case SecondsHistory:
		return c.SendString(fmt.Sprintf(
			`<presence to='%s/%s'>
				<x xmlns='%s'><password>%s</password><history seconds='%d'/></x>
			</presence>`,
			xmlEscape(jid), xmlEscape(nick), nsMUC, xmlEscape(password), history,
		))
	case SinceHistory:
		if history_date != nil {
			return c.SendString(fmt.Sprintf(
				`<presence to='%s/%s'>
				<x xmlns='%s'><password>%s</password><history since='%s'/></x>
				</presence>`,
				xmlEscape(jid), xmlEscape(nick), nsMUC, xmlEscape(password), history_date.Format(time.RFC3339),
			))
		}
	}
	return 0, fmt.Errorf("Unknown history option: %d", history_type)
}

// xep-0045 7.14
func (c *Client) LeaveMUC(room string) (n int, err error) {
	return c.SendString(fmt.Sprintf(
		`<presence from='%s' to='%s' type='unavailable' />`,
		c.jid, xmlEscape(room),
	))
}

func (c *Client) SetRoomAffiliation(room, jid, affiliation, reason string) error {
	_, err := c.SendString(fmt.Sprintf(
		`<iq from='%s' id='ban1' to='%s' type='set'>
			<query xmlns='%s'>
				<item affiliation='%s' jid='%s'>
		  			<reason>%s</reason>
				</item>
			</query>
		</iq>`,
		c.jid, xmlEscape(room), nsMUCAdmin, xmlEscape(affiliation), xmlEscape(jid), xmlEscape(reason),
	))
	return err
}

func (c *Client) Ban(room, jid, reason string) error {
	return c.SetRoomAffiliation(room, jid, "outcast", reason)
}

func (c *Client) ChangeNick(room, nick string) error {
	p := new(Presence)
	p.From = c.jid
	p.To = room + "/" + nick
	_, err := c.SendPresence(p)
	return err
}

type MUCForm struct {
}

func (c *Client) ConfigureRoom(room string, form MUCForm) error {
	return nil
}

// XEP-0249: Direct MUC Invitations
func (c *Client) DirectInvite(room, jid, password, reason string) error {
	_, err := c.SendString(fmt.Sprintf(
		`<message from='%s' to='%s'>
			<x xmlns='jabber:x:conference'
				continue='true'
				jid='%s'
				password='%s'
				reason='%s'
				thread='e0ffe42b28561960c6b12b944a092794b9683a38'/>
		</message>`,
		c.jid, xmlEscape(jid), xmlEscape(room), xmlEscape(password), xmlEscape(reason),
	))
	return err
}

// A user MAY have a reserved room nickname, for example through explicit room registration,
// database integration, or nickname "lockdown".
// A user SHOULD discover his or her reserved nickname before attempting to enter the room.
// This is done by sending a Service Discovery information request to the room JID
// while specifying a well-known Service Discovery node of "x-roomuser-item".
func (c *Client) DiscoverReservedNick(room string) error {
	_, err := c.SendString(fmt.Sprintf(
		`<iq from='%s' id='getnick1' to='%s' type='get'>
			<query xmlns='http://jabber.org/protocol/disco#info' node='x-roomuser-item'/>
		</iq>`,
		c.jid, xmlEscape(room),
	))
	return err
}

// XER-0045 10.2 Subsequent Room Configuration
func (c *Client) GetRoomConfig(room string) error {
	_, err := c.SendString(fmt.Sprintf(
		`<iq from='%s' id='ik3vs715' to='%s' type='get'>
			<query xmlns='http://jabber.org/protocol/muc#owner'/>
		</iq>`,
		c.jid, xmlEscape(room),
	))
	return err
}

func (c *Client) GetRoomMembers(room string) error {
	_, err := c.SendString(fmt.Sprintf(
		`<iq from='%s' id='member3'	to='%s' type='get'>
			<query xmlns='http://jabber.org/protocol/muc#admin'>
				<item affiliation='member'/>
			</query>
		</iq>`,
		c.jid, xmlEscape(room),
	))
	return err
}

func (c *Client) Invite(room string) error {
	return nil
}

func (c *Client) Kick(room, nick, reason string) error {
	_, err := c.SendString(fmt.Sprintf(
		`<iq from='%s' id='kick1' to='harfleur@chat.shakespeare.lit' type='set'>
			<query xmlns='http://jabber.org/protocol/muc#admin'>
				<item nick='%s' role='none'>
					<reason>%s</reason>
				</item>
			</query>
		</iq>`,
		c.jid, xmlEscape(nick), xmlEscape(reason),
	))
	return err
}

func (c *Client) RequestRoomVoice(room string) error {
	_, err := c.SendString(fmt.Sprintf(
		`<message from='%s'	id='yd53c486' to='%s'>
			<x xmlns='jabber:x:data' type='submit'>
				<field var='FORM_TYPE'>
					<value>http://jabber.org/protocol/muc#request</value>
				</field>
				<field var='muc#role' type='list-single' label='Requested role'>
					<value>participant</value>
				</field>
			</x>
		</message>`,
		c.jid, xmlEscape(room),
	))
	return err
}

func (c *Client) SetRoomRole(room, nick, role, reason string) error {
	_, err := c.SendString(fmt.Sprintf(
		`<iq from='%s' id='voice1' to='%s' type='set'>
			<query xmlns='http://jabber.org/protocol/muc#admin'>
				<item nick='%s' role='%s'>
					<reason>%s</reason>
				</item>
			</query>
		</iq>`,
		c.jid, xmlEscape(room), xmlEscape(nick), xmlEscape(role), xmlEscape(reason),
	))
	return err
}


text:
require sqlite3.inc
PR = "${INC_PR}.0"

SRC_URI[md5sum] = "0faf8fc8ccff5297513c6532b2b4ce23"
SRC_URI[sha256sum] = "c172ce97dc7201f38acdff22df467e1514e7225b88c636145e72a66a4ca6d07d"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty


text:
package database

import (
	"context"
	"fmt"
	"net/http"
	"os"
	"time"

	log "github.com/sirupsen/logrus"

	"gorm.io/driver/postgres"
	"gorm.io/gorm"

	"github.com/iot-for-tillgenglighet/api-problemreport/pkg/models"
)

type Datastore interface {
	Create(entity *models.ProblemReport) (*models.ProblemReport, error)
	GetAll() ([]models.ProblemReport, error)
	GetAllByPeriod(startDate time.Time, endDate time.Time) ([]models.ProblemReport, error)
	GetCategories() ([]models.ProblemReportCategory, error)
}

var dbCtxKey = &databaseContextKey{"database"}

type databaseContextKey struct {
	name string
}

// Middleware packs a pointer to the datastore into context
func Middleware(db Datastore) func(http.Handler) http.Handler {
	return func(next http.Handler) http.Handler {
		return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
			ctx := context.WithValue(r.Context(), dbCtxKey, db)

			// and call the next with our new context
			r = r.WithContext(ctx)
			next.ServeHTTP(w, r)
		})
	}
}

type myDB struct {
	impl *gorm.DB
}

func getEnv(key, fallback string) string {
	if value, ok := os.LookupEnv(key); ok {
		return value
	}
	return fallback
}

//ConnectToDB extracts connection information from environment variables and
//initiates a connection to the database.
func ConnectToDB() (Datastore, error) {
	db := &myDB{}

	dbHost := os.Getenv("PROBLEMREPORT_DB_HOST")
	username := os.Getenv("PROBLEMREPORT_DB_USER")
	dbName := os.Getenv("PROBLEMREPORT_DB_NAME")
	password := os.Getenv("PROBLEMREPORT_DB_PASSWORD")
	applicationMode := os.Getenv("PROBLEMREPORT_APP_MODE")
	sslMode := getEnv("PROBLEMREPORT_DB_SSLMODE", "require")

	dbURI := fmt.Sprintf("host=%s user=%s dbname=%s sslmode=%s password=%s", dbHost, username, dbName, sslMode, password)

	for {
		log.Printf("Connecting to database host %s ...\n", dbHost)
		conn, err := gorm.Open(postgres.Open(dbURI), &gorm.Config{})
		if err != nil {
			log.Fatalf("Failed to connect to database %s \n", err)
			time.Sleep(3 * time.Second)
		} else {
			db.impl = conn
			db.impl.Debug().AutoMigrate(&models.ProblemReport{})
			db.impl.Debug().AutoMigrate(&models.ProblemReportCategory{})
			if applicationMode == "debug" {
				db.impl.Debug().Exec("TRUNCATE TABLE problem_report_categories RESTART IDENTITY; INSERT INTO problem_report_categories(created_at, updated_at, label,report_type,enabled) VALUES(NOW(),NOW(),'Halka','TYPE_ICE', true),(NOW(),NOW(),'Vägskada', 'TYPE_ROAD', true), (NOW(),NOW(),'Otrygghet', 'TYPE_SAFETY', true)")
			}
			break
		}
	}

	return db, nil
}

//Create creates a report
func (db *myDB) Create(entity *models.ProblemReport) (*models.ProblemReport, error) {

	currentTime := time.Now().UTC()

	entity.Timestamp = currentTime.Format(time.RFC3339)

	db.impl.Create(entity)

	return entity, nil
}

//GetAll Fetches all problemreports
func (db *myDB) GetAll() ([]models.ProblemReport, error) {

	entities := []models.ProblemReport{}
	db.impl.Table("problem_reports").Select("*").Find(&entities)

	return entities, nil
}

//GetAllByPeriod Fetches all problem reports by period
func (db *myDB) GetAllByPeriod(startDate time.Time, endDate time.Time) ([]models.ProblemReport, error) {
	entities := []models.ProblemReport{}
	db.impl.Table("problem_reports").Where("updated_at BETWEEN ? AND ?", startDate, endDate).Find(&entities)

	return entities, nil
}

//GetCategories fetches all categories
func (db *myDB) GetCategories() ([]models.ProblemReportCategory, error) {
	entities := []models.ProblemReportCategory{}
	db.impl.Table("problem_report_categories").Where("enabled = ?", true).Find(&entities)

	return entities, nil
}

gha_language: Go


text:
require ${PN}.inc

PR = "r1"

SRC_URI = "http://sources.openembedded.org/opie-1.2.4-split_noncore_apps_confedit.tar.bz2;name=split_noncore_apps_confedit \
           http://sources.openembedded.org/opie-1.2.4-split_pics.tar.bz2;name=split_pics \
           http://sources.openembedded.org/opie-1.2.4-split_apps.tar.bz2;name=split_apps"
SRC_URI[split_noncore_apps_confedit.md5sum] = "fbcebf15d8a95f47380110ed9becd1a3"
SRC_URI[split_noncore_apps_confedit.sha256sum] = "8674dd94d76eb7a3b4064ceb86e93e48776b3e4e55310249cfbdddb12d8ffd69"
SRC_URI[split_pics.md5sum] = "5499dc84b65395ab99bda6ed9d01ff0f"
SRC_URI[split_pics.sha256sum] = "f22781f36e84e12d51fff1eb68cc3fb98221c7d807a82226813b7e974a604109"
SRC_URI[split_apps.md5sum] = "67a43e8e4bcd9e63b884ea25deea5b34"
SRC_URI[split_apps.sha256sum] = "a33a55efb4ae4c15a8c2c5d6faba6d671a5652da8e216ce35088896fe597215b"


text:
#
#  CPackProperties.cmake.in
#  cmake/templates
#
#  Copyright 2016 High Fidelity, Inc.
#  Created by Stephen Birarda on January 11, 2016
#
#  Distributed under the Apache License, Version 2.0.
#  See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#

set(INTERFACE_DISPLAY_NAME "Interface")
set(INTERFACE_SHORTCUT_NAME "@INTERFACE_SHORTCUT_NAME@")
set(INTERFACE_HF_SHORTCUT_NAME "@INTERFACE_HF_SHORTCUT_NAME@")
set(INTERFACE_WIN_EXEC_NAME "@INTERFACE_EXEC_PREFIX@.exe")
set(CONSOLE_DISPLAY_NAME "Sandbox")
set(CONSOLE_INSTALL_SUBDIR "@CONSOLE_INSTALL_DIR@")
set(CONSOLE_SHORTCUT_NAME "@CONSOLE_SHORTCUT_NAME@")
set(CONSOLE_HF_SHORTCUT_NAME "@CONSOLE_HF_SHORTCUT_NAME@")
set(CONSOLE_WIN_EXEC_NAME "@CONSOLE_EXEC_NAME@")
set(PRE_SANDBOX_INTERFACE_SHORTCUT_NAME "@PRE_SANDBOX_INTERFACE_SHORTCUT_NAME@")
set(PRE_SANDBOX_CONSOLE_SHORTCUT_NAME "@PRE_SANDBOX_CONSOLE_SHORTCUT_NAME@")
set(DS_DISPLAY_NAME "Domain Server")
set(DS_EXEC_NAME "@DS_EXEC_NAME@")
set(AC_DISPLAY_NAME "Assignment Client")
set(AC_EXEC_NAME "@AC_EXEC_NAME@")
set(HIGH_FIDELITY_PROTOCOL "@HIGH_FIDELITY_PROTOCOL@")
set(PRODUCTION_BUILD "@PRODUCTION_BUILD@")
set(PR_BUILD "@PR_BUILD@")
set(BUILD_ORGANIZATION "@BUILD_ORGANIZATION@")
set(POST_INSTALL_OPTIONS_PATH "@POST_INSTALL_OPTIONS_PATH@")
set(CLIENT_COMPONENT_NAME "@CLIENT_COMPONENT@")
set(SERVER_COMPONENT_NAME "@SERVER_COMPONENT@")
set(SIGNTOOL_EXECUTABLE "@SIGNTOOL_EXECUTABLE@")
set(UNINSTALLER_NAME "@GENERATED_UNINSTALLER_EXEC_NAME@")
set(REGISTRY_HKLM_INSTALL_ROOT "@REGISTRY_HKLM_INSTALL_ROOT@")
set(POST_INSTALL_OPTIONS_REG_GROUP "@POST_INSTALL_OPTIONS_REG_GROUP@")
set(CLIENT_DESKTOP_SHORTCUT_REG_KEY "@CLIENT_DESKTOP_SHORTCUT_REG_KEY@")
set(CONSOLE_DESKTOP_SHORTCUT_REG_KEY "@CONSOLE_DESKTOP_SHORTCUT_REG_KEY@")
set(CONSOLE_STARTUP_REG_KEY "@CONSOLE_STARTUP_REG_KEY@")
set(SERVER_LAUNCH_NOW_REG_KEY "@SERVER_LAUNCH_NOW_REG_KEY@")
set(CLIENT_LAUNCH_NOW_REG_KEY "@CLIENT_LAUNCH_NOW_REG_KEY@")
set(INSTALLER_HEADER_IMAGE "@INSTALLER_HEADER_IMAGE@")
set(UNINSTALLER_HEADER_IMAGE "@UNINSTALLER_HEADER_IMAGE@")
set(ADD_REMOVE_ICON_PATH "@ADD_REMOVE_ICON_PATH@")

repository: zzmp/hifi

repo_name: zzmp/hifi

extension: in


text:
@inproceedings{adam_convergence,
    title={On the Convergence of Adam and Beyond},
    author={Sashank J. Reddi and Satyen Kale and Sanjiv Kumar},
    booktitle={International Conference on Learning Representations},
    year={2018},
    url={https://openreview.net/forum?id=ryQu7f-RZ},
}

repository: mlbench/mlbench-core

repo_name: mlbench/mlbench-core

branch_name: refs/heads/develop

gha_language: Python


text:
package main

import (
	"context"
	"fmt"
	"log"
	"net"
	"os"
	"os/signal"
	"strconv"
	"strings"
	"sync"
	"syscall"
	"time"

	"github.com/tidwall/buntdb"
)

func main() {

	sigChan := make(chan os.Signal, 1)
	// Ignore all signals
	signal.Ignore()
	signal.Notify(sigChan, syscall.SIGINT)

	s := NewServer()

	s.Start()

	select {
	case sig := <-sigChan:
		switch sig {
		case syscall.SIGINT:
			log.Println("Start Server Shutdown")
			s.Stop()
			log.Println("End Server Shutdown")
		default:
			panic("unexpected signal has been received")
		}
	}
}

// Server ...
type Server struct {
	ctx      context.Context
	cancel   context.CancelFunc
	wg       *sync.WaitGroup
	db       *Database
	listener net.Listener
}

// NewServer ...
func NewServer() *Server {
	s := &Server{}
	return s
}

// Start ...
func (s *Server) Start() {
	var wg sync.WaitGroup
	ctx, cancel := context.WithCancel(context.Background())

	s.ctx = ctx
	s.cancel = cancel
	s.wg = &wg
	s.db = NewDatabase()
	s.db.Open()

	listener, err := net.Listen("tcp", "localhost:8888")
	if err != nil {
		panic(err)
	}
	s.listener = listener
	go s.startServer()
}

func (s *Server) startServer() {

	fmt.Println("Server is running at localhost:8888")
	for {
		conn, err := s.listener.Accept()
		if err != nil {
			fmt.Println("Error ", err)
			return
		}
		s.wg.Add(1)
		connection := NewConnection(s.ctx, s.wg, s.db)
		go connection.Start(conn)
	}
}

// Stop ...
func (s *Server) Stop() {
	s.cancel()
	s.wg.Wait()
	s.listener.Close()
	s.db.Close()
}

// Connection ...
type Connection struct {
	ctx context.Context
	wg  *sync.WaitGroup
	db  *Database
}

// NewConnection ...
func NewConnection(ctx context.Context, wg *sync.WaitGroup, db *Database) *Connection {
	c := &Connection{ctx, wg, db}
	return c
}

// Start ...
func (c *Connection) Start(conn net.Conn) {

	remoteAddr := conn.RemoteAddr()
	errCh := make(chan error, 1)
	defer func() {
		fmt.Println("Closing", remoteAddr)
		time.Sleep(1 * time.Second)
		conn.Close()
		c.wg.Done()
		fmt.Println("Closed", remoteAddr)
	}()
	go func() {
		fmt.Printf("Accept %v\n", remoteAddr)
		cp := NewCommandParser()
		for {
			buf := make([]byte, 4*1024)
			n, err := conn.Read(buf)
			if err != nil {
				errCh <- err
				fmt.Println("Error ", err)
				return
			}

			if cp.Add(buf[:n]) == false {
				continue
			}
			fmt.Println(cp.commands)

			switch strings.ToUpper(cp.commands[0]) {
			case "GET":
				v := c.db.Read(cp.commands[1])
				conn.Write([]byte(TokenizeBulkString(v)))
			case "KEYS":
				v, _ := c.db.ReadKyes()
				conn.Write([]byte(TokenizeBulkStrings(v)))
			case "SET":
				c.db.Write(cp.commands[1], cp.commands[2])
				conn.Write([]byte(TokenizeSimpleString("OK")))
			case "PING":
				conn.Write([]byte(TokenizeSimpleString("PONG")))
			}
			cp.Reset()

		}
	}()
	select {
	case <-errCh:
	case <-c.ctx.Done():
	}
}

// CommandParser ...
//
// https://redis.io/topics/protocol
//
type CommandParser struct {
	s        []byte
	commands []string
}

// NewCommandParser ...
func NewCommandParser() *CommandParser {
	cp := &CommandParser{
		make([]byte, 0),
		make([]string, 0),
	}
	return cp
}

// Add ...
func (cp *CommandParser) Add(s []byte) bool {
	cp.s = append(cp.s, s...)
	parseSuccess, _, _ := cp.parse(0)
	return parseSuccess
}

// Reset ...
func (cp *CommandParser) Reset() {
	cp.s = []byte{}
	cp.commands = []string{}
}

func (cp *CommandParser) parse(seek int) (bool, []byte, int) {

	crlfLength := 2

	var commands []string
	seekEnd := strings.Index(string(cp.s[seek:]), "\r\n")

	if seekEnd < 0 {
		return false, nil, -1
	}

	seekEnd += seek

	typeStr := string(cp.s[seek])
	length, _ := strconv.Atoi(string(cp.s[seek+1 : seekEnd]))

	switch typeStr {
	case "*": //Array
		seek = seekEnd + crlfLength
		for length > 0 {
			ok, cmd, newSeek := cp.parse(seek)
			if ok == false {
				return false, nil, -1
			}
			commands = append(commands, string(cmd))
			seek = newSeek
			length--
		}
	case "$": //Bulk String
		if len(cp.s) < seekEnd+crlfLength+length+crlfLength {
			return false, nil, -1
		}
		command := cp.s[seekEnd+crlfLength : seekEnd+crlfLength+length]
		return true, command, seekEnd + crlfLength + length + crlfLength
	default:
		panic("Incorrect format")
	}

	cp.commands = commands
	return true, nil, seek + crlfLength
}

// CommandTokenizer ...
type CommandTokenizer struct {
	//TODO
}

// TokenizeBulkStrings ...
func TokenizeBulkStrings(in []string) string {
	out := "*" + strconv.Itoa(len(in)) + "\r\n"
	for _, v := range in {
		out += TokenizeBulkString(v)
	}
	return out
}

// TokenizeBulkString ...
func TokenizeBulkString(in string) string {
	out := "$" + strconv.Itoa(len(in)) + "\r\n" + in + "\r\n"
	return out
}

// TokenizeSimpleString ...
func TokenizeSimpleString(in string) string {
	out := "+" + in + "\r\n"
	return out
}

// Database ...
type Database struct {
	buntdb *buntdb.DB
}

// NewDatabase ...
func NewDatabase() *Database {
	db := &Database{}
	return db
}

// Open ...
func (db *Database) Open() {
	buntdb, err := buntdb.Open(":memory:")
	db.buntdb = buntdb
	if err != nil {
		panic(err)
	}
}

// Close ...
func (db *Database) Close() {
	db.buntdb.Close()
}

func (db *Database) Write(key, value string) {
	if err := db.buntdb.Update(func(tx *buntdb.Tx) error {
		_, _, err := tx.Set(fmt.Sprintf("%s", key), fmt.Sprintf("%s", value), nil)
		if err != nil {
			return err
		}
		return nil
	}); err != nil {
		panic(err)
	}
}

// Read ...
func (db *Database) Read(key string) string {
	var val string
	if err := db.buntdb.View(func(tx *buntdb.Tx) error {
		var err error
		val, err = tx.Get(key)
		if err != nil {
			return err
		}
		return nil
	}); err != nil {
		panic(err)
	}
	return val
}

// Indexes ...
func (db *Database) Indexes() []string {
	names, err := db.buntdb.Indexes()
	if err != nil {
		panic(err)
	}
	return names
}

// ReadKyes ...
func (db *Database) ReadKyes() ([]string, error) {

	results := []string{}
	err := db.buntdb.View(func(tx *buntdb.Tx) error {
		err2 := tx.Ascend("", func(key, value string) bool {
			fmt.Printf("key: %s, value: %s\n", key, value)
			results = append(results, key)
			return true
		})
		if err2 != nil {
			panic(err2)
		}
		return nil
	})
	if err != nil {
		panic(err)
	}
	return results, err

}

func openDb() *buntdb.DB {
	db, err := buntdb.Open("data.db")
	if err != nil {
		panic(err)
	}
	defer db.Close()
	if err := db.Update(func(tx *buntdb.Tx) error {
		for i := 0; i < 20; i++ {
			_, _, err := tx.Set(fmt.Sprintf("key:%d", i), fmt.Sprintf("planet:%d", i), nil)
			if err != nil {
				return err
			}
		}
		return nil
	}); err != nil {
		panic(err)
	}
	if err := db.View(func(tx *buntdb.Tx) error {
		val, err := tx.Get("key:13")
		if err != nil {
			return err
		}
		fmt.Println(val)
		return nil
	}); err != nil {
		panic(err)
	}

	return db
}

repository: demouth/orenodb

repo_name: demouth/orenodb


text:
/*
 * Copyright 2009-2017 Alibaba Cloud All rights reserved.
 *
 * 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.
 */

#include <alibabacloud/videosearch/model/AddSearchVideoTaskRequest.h>

using AlibabaCloud::Videosearch::Model::AddSearchVideoTaskRequest;

AddSearchVideoTaskRequest::AddSearchVideoTaskRequest() :
	RpcServiceRequest("videosearch", "2020-02-25", "AddSearchVideoTask")
{
	setMethod(HttpRequest::Method::Post);
}

AddSearchVideoTaskRequest::~AddSearchVideoTaskRequest()
{}

std::string AddSearchVideoTaskRequest::getClientToken()const
{
	return clientToken_;
}

void AddSearchVideoTaskRequest::setClientToken(const std::string& clientToken)
{
	clientToken_ = clientToken;
	setParameter("ClientToken", clientToken);
}

int AddSearchVideoTaskRequest::getStorageType()const
{
	return storageType_;
}

void AddSearchVideoTaskRequest::setStorageType(int storageType)
{
	storageType_ = storageType;
	setBodyParameter("StorageType", std::to_string(storageType));
}

std::string AddSearchVideoTaskRequest::getRegionId()const
{
	return regionId_;
}

void AddSearchVideoTaskRequest::setRegionId(const std::string& regionId)
{
	regionId_ = regionId;
	setParameter("RegionId", regionId);
}

std::string AddSearchVideoTaskRequest::getVideoTags()const
{
	return videoTags_;
}

void AddSearchVideoTaskRequest::setVideoTags(const std::string& videoTags)
{
	videoTags_ = videoTags;
	setBodyParameter("VideoTags", videoTags);
}

int AddSearchVideoTaskRequest::getReturnVideoNumber()const
{
	return returnVideoNumber_;
}

void AddSearchVideoTaskRequest::setReturnVideoNumber(int returnVideoNumber)
{
	returnVideoNumber_ = returnVideoNumber;
	setBodyParameter("ReturnVideoNumber", std::to_string(returnVideoNumber));
}

std::string AddSearchVideoTaskRequest::getVideoId()const
{
	return videoId_;
}

void AddSearchVideoTaskRequest::setVideoId(const std::string& videoId)
{
	videoId_ = videoId;
	setBodyParameter("VideoId", videoId);
}

float AddSearchVideoTaskRequest::getReplaceStorageThreshold()const
{
	return replaceStorageThreshold_;
}

void AddSearchVideoTaskRequest::setReplaceStorageThreshold(float replaceStorageThreshold)
{
	replaceStorageThreshold_ = replaceStorageThreshold;
	setBodyParameter("ReplaceStorageThreshold", std::to_string(replaceStorageThreshold));
}

std::string AddSearchVideoTaskRequest::getInstanceId()const
{
	return instanceId_;
}

void AddSearchVideoTaskRequest::setInstanceId(const std::string& instanceId)
{
	instanceId_ = instanceId;
	setBodyParameter("InstanceId", instanceId);
}

std::string AddSearchVideoTaskRequest::getVideoUrl()const
{
	return videoUrl_;
}

void AddSearchVideoTaskRequest::setVideoUrl(const std::string& videoUrl)
{
	videoUrl_ = videoUrl;
	setBodyParameter("VideoUrl", videoUrl);
}

std::string AddSearchVideoTaskRequest::getQueryTags()const
{
	return queryTags_;
}

void AddSearchVideoTaskRequest::setQueryTags(const std::string& queryTags)
{
	queryTags_ = queryTags;
	setBodyParameter("QueryTags", queryTags);
}

std::string AddSearchVideoTaskRequest::getCallbackUrl()const
{
	return callbackUrl_;
}

void AddSearchVideoTaskRequest::setCallbackUrl(const std::string& callbackUrl)
{
	callbackUrl_ = callbackUrl;
	setBodyParameter("CallbackUrl", callbackUrl);
}

repository: aliyun/aliyun-openapi-cpp-sdk

repo_name: aliyun/aliyun-openapi-cpp-sdk

extension: cc


text:
package stmt

import (
	"unicode"
)

// max returns the maximum of a, b.
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

// min returns the maximum of a, b.
func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

// IsSpaceOrControl is a special test for either a space or a control (ie, \b)
// characters.
func IsSpaceOrControl(r rune) bool {
	return unicode.IsSpace(r) || unicode.IsControl(r)
}

// RunesLastIndex returns the last index in r of needle, or -1 if not found.
func RunesLastIndex(r []rune, needle rune) int {
	i := len(r) - 1
	for ; i >= 0; i-- {
		if r[i] == needle {
			return i
		}
	}
	return i
}


text:
///////////////////////////////////////////////////////////////////////////////////
// Copyright(c) 2016, Lin Koon Wing Macgyver, macgyvercct@yahoo.com.hk			 //
//																				 //
// Author : Mac Lin									                             //
// Module : Magnum Engine v1.0.0												 //
// Date   : 14/Jun/2016											                 //
//																				 //
///////////////////////////////////////////////////////////////////////////////////
//----------------------------------------------------------------------------
inline
AABB3::AABB3 ()
{
    // uninitialized
}
//----------------------------------------------------------------------------
inline AABB3::AABB3 (float fXMin, float fXMax, float fYMin, float fYMax, float fZMin, float fZMax)
{
    Min[0] = fXMin;
    Min[1] = fYMin;
    Min[2] = fZMin;

    Max[0] = fXMax;
    Max[1] = fYMax;
    Max[2] = fZMax;
}
//----------------------------------------------------------------------------
inline bool AABB3::HasXOverlap (const AABB3& rkBox) const
{
    return Max[0] >= rkBox.Min[0] && Min[0] <= rkBox.Max[0];
}
//----------------------------------------------------------------------------
inline bool AABB3::HasYOverlap (const AABB3& rkBox) const
{
    return Max[1] >= rkBox.Min[1] && Min[1] <= rkBox.Max[1];
}
//----------------------------------------------------------------------------
inline bool AABB3::HasZOverlap (const AABB3& rkBox) const
{
    return Max[2] >= rkBox.Min[2] && Min[2] <= rkBox.Max[2];
}
//----------------------------------------------------------------------------
inline bool AABB3::TestIntersection (const AABB3& rkBox) const
{
    for (int i = 0; i < 3; i++)
    {
        if (Max[i] < rkBox.Min[i] || Min[i] > rkBox.Max[i])
        {
            return false;
        }
    }
    return true;
}
//----------------------------------------------------------------------------
inline bool AABB3::FindIntersection (const AABB3& rkBox, AABB3& rkIntr) const
{
    int i;
    for (i = 0; i < 3; i++)
    {
        if (Max[i] < rkBox.Min[i] || Min[i] > rkBox.Max[i])
        {
            return false;
        }
    }

    for (i = 0; i < 3; i++)
    {
        if (Max[i] <= rkBox.Max[i])
        {
            rkIntr.Max[i] = Max[i];
        }
        else
        {
            rkIntr.Max[i] = rkBox.Max[i];
        }

        if (Min[i] <= rkBox.Min[i])
        {
            rkIntr.Min[i] = rkBox.Min[i];
        }
        else
        {
            rkIntr.Min[i] = Min[i];
        }
    }
    return true;
}
//----------------------------------------------------------------------------

repository: MacgyverLin/MagnumEngine

repo_name: MacgyverLin/MagnumEngine

extension: inl


text:
@Inbook{Costello2016,
author="Costello, Craig
and Longa, Patrick
and Naehrig, Michael",
editor="Robshaw, Matthew
and Katz, Jonathan",
title="Efficient Algorithms for Supersingular Isogeny Diffie-Hellman",
bookTitle="Advances in Cryptology -- CRYPTO 2016: 36th Annual International Cryptology Conference, Santa Barbara, CA, USA, August 14-18, 2016, Proceedings, Part I",
year="2016",
publisher="Springer Berlin Heidelberg",
address="Berlin, Heidelberg",
pages="572--601",
isbn="978-3-662-53018-4",
doi="10.1007/978-3-662-53018-4_21",
url="http://dx.doi.org/10.1007/978-3-662-53018-4_21"
}

repository: dconnolly/isogenysignature

repo_name: dconnolly/isogenysignature


text:
// Copyright 2021 Fugue, Inc.
//
// 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 loader_test

import (
	"testing"

	"github.com/fugue/regula/v3/pkg/loader"
	inputs "github.com/fugue/regula/v3/pkg/loader/test_inputs"
	"github.com/fugue/regula/v3/pkg/mocks"
	"github.com/golang/mock/gomock"
	"github.com/stretchr/testify/assert"
)

func TestTfPlanDetector(t *testing.T) {
	ctrl := gomock.NewController(t)
	testInputs := []struct {
		path     string
		ext      string
		contents []byte
	}{
		{path: "tfplan.json", ext: ".json", contents: inputs.Contents(t, "tfplan.0.12.json")},
		{path: "tfplan.json", ext: ".json", contents: inputs.Contents(t, "tfplan.0.13.json")},
		{path: "tfplan.json", ext: ".json", contents: inputs.Contents(t, "tfplan.0.14.json")},
		{path: "tfplan.json", ext: ".json", contents: inputs.Contents(t, "tfplan.0.15.json")},
	}
	detector := &loader.TfPlanDetector{}

	for _, i := range testInputs {
		f := makeMockFile(ctrl, i.path, i.ext, i.contents)
		loader, err := detector.DetectFile(f, loader.DetectOptions{
			IgnoreExt: false,
		})
		assert.Nil(t, err)
		assert.NotNil(t, loader)
		assert.Equal(t, loader.LoadedFiles(), []string{i.path})
	}
}

func TestTfPlanDetectorNotTfContents(t *testing.T) {
	ctrl := gomock.NewController(t)
	detector := &loader.TfPlanDetector{}
	f := makeMockFile(ctrl, "other.json", ".json", inputs.Contents(t, "other.json"))
	loader, err := detector.DetectFile(f, loader.DetectOptions{
		IgnoreExt: false,
	})
	assert.NotNil(t, err)
	assert.Nil(t, loader)
}

func TestTfPlanDetectorNotJsonExt(t *testing.T) {
	ctrl := gomock.NewController(t)
	detector := &loader.TfPlanDetector{}
	f := mocks.NewMockInputFile(ctrl)
	f.EXPECT().Ext().Return(".tfplan")
	f.EXPECT().Path().Return("plan.tfplan")
	loader, err := detector.DetectFile(f, loader.DetectOptions{
		IgnoreExt: false,
	})
	assert.NotNil(t, err)
	assert.Nil(t, loader)
}

func TestTfPlanDetectorIgnoreExt(t *testing.T) {
	ctrl := gomock.NewController(t)
	detector := &loader.TfPlanDetector{}
	f := mocks.NewMockInputFile(ctrl)
	f.EXPECT().Path().Return("plan.tfplan")
	f.EXPECT().Contents().Return(inputs.Contents(t, "tfplan.0.15.json"), nil)
	loader, err := detector.DetectFile(f, loader.DetectOptions{
		IgnoreExt: true,
	})
	assert.Nil(t, err)
	assert.NotNil(t, loader)
	assert.Equal(t, loader.LoadedFiles(), []string{"plan.tfplan"})
}

func TestTfPlanDetectorNotYAML(t *testing.T) {
	ctrl := gomock.NewController(t)
	detector := &loader.TfPlanDetector{}
	f := makeMockFile(ctrl, "not_tfplan.json", ".json", inputs.Contents(t, "text.txt"))
	loader, err := detector.DetectFile(f, loader.DetectOptions{
		IgnoreExt: false,
	})
	assert.NotNil(t, err)
	assert.Nil(t, loader)
}

repository: fugue/regula

repo_name: fugue/regula

gha_language: Open Policy Agent


text:
SUMMARY = "D-Bus service daemon for Clear Linux swupd-client"
DESCRIPTION = "Daemon providing system-bus D-Bus API for utilizing Clear Linux swupd-client functionality."

DEPENDS = "glib-2.0"
RDEPENDS_${PN} = "glib-2.0"

LICENSE = "LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"

SRC_URI = "git://github.com/ostroproject/swupd-daemon.git;protocol=https"
SRCREV = "0cca14cc3298ee804c414da7ed65863e91c171bc"

S = "${WORKDIR}/git"

inherit pkgconfig autotools

repository: ostroproject/meta-ostro

repo_name: ostroproject/meta-ostro


text:
package libk8s

import (
	"testing"
)

func TestNamespace(t *testing.T) {
	runScriptFile(t, "testdata/namespace_test.js")
}

repository: teamhephy/quokka

repo_name: teamhephy/quokka


text:
SUMMARY = "log4cplus provides a simple C++ logging API for log management"
SECTION = "libs"
HOMEPAGE = "http://sourceforge.net/projects/log4cplus/"
BUGTRACKER = "http://sourceforge.net/p/log4cplus/bugs/"

LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://INSTALL;md5=fd3fffde3e364ca1fb46c81b741a766a"

SRC_URI = "${SOURCEFORGE_MIRROR}/project/log4cplus/log4cplus-stable/${PV}/log4cplus-${PV}.tar.gz"

SRC_URI[md5sum] = "104bd6dd07ee71bc52ee9adca4d4d5fc"
SRC_URI[sha256sum] = "96905e763fc6f1e3a854c3d1964c21e877de909bdddd0aed99806c62a68be838"

inherit autotools pkgconfig

BBCLASSEXTEND += "native"

repository: ExorEmbedded/exor-workspace

repo_name: ExorEmbedded/exor-workspace