text:
@inproceedings{stoerrle:fish:vl2a:pon,
  title = {{Towards an Operationalization of the ``Physics of Notations'' for the Analysis of Visual Languages}},
  author = {St{\"o}rrle, Harald and Fish, Andrew},
  NNpages = {135--142},
  crossref = "vlhcc:12",
  note = {submitted for review}
 }

@inproceedings{ad:20??:xxx,
  note = {to be written},
  title = {{Defining the Semantics of Complex Activities by Unrolling}},
  author = {St{\"o}rrle, Harald},
  crossref = "models:14"
 }

@inproceedings{ms:1:xxx,
  note = {to be written},
  title = {{Model Modules}},
  author = {St{\"o}rrle, Harald},
  crossref = "models:14"
 }

@article{mq:2b:adhoc,
  note = {submitted to OCL-Workshop at Models'12},
  title = {{Querying Domain Models with OCL}},
  author = {St{\"o}rrle, Harald},
  NNeditor = {Cabot, Jordi and Clark, Tony and Clavel, Manuel and Gogolla, Martin},
  booktitle = {{Ws.\ OCL and Textual Modelling}},
  publisher = {??},
  pages = {??--??}
 }

@inproceedings{stoerrle:mvc4:presentation,
  author = {St{\"o}rrle, Harald},
  title = {{Making Sense to Modelers - Presenting UML Class Model Differences in Prose}},
  crossref = "modelsward:2013",
  pages = {39--48}
}

@inproceedings{stoerrle:ld1:layers,
  author = {St{\"o}rrle, Harald},
  title = {{Improving Modeling with Layered UML Diagrams}},
  crossref = "modelsward:2013",
  pages = {206--209}
}

@proceedings{modelsward:2013,
  booktitle = {{Proc.\ 1st Intl.\ Conf.\ Model-Driven Engineering and Software Development}},
  title = {{Proc.\ 1st Intl.\ Conf.\ Model-Driven Engineering and Software Development}},
  editor = {Filipe, Joaquim and {das Neves}, Rui César and Hammoudi, Slimane and Ferreira Pires, Luís},
  year = 2013,
  publisher = {SCITEPRESS}
}

@INPROCEEDINGS{stoerrle:mvc3f:making:sense,
  author = {St{\"o}rrle, Harald},
  title = {{Making Sense of UML Class Model Changes by Textual Difference Presentation}},
  pages = {1--6},
  crossref = "me:12"
}

@proceedings{me:12,
  title = {{Proc.\ Ws.\ Models and Evolution (ME)}},
  booktitle = {{Proc.\ Ws.\ Models and Evolution (ME)}},
  year = 2012,
  editor = {Tamzalit, Dalila and Schätz, Bernhard and Sprinkle, Jonathan and Pierantonio, Alfonso},
  publisher = {ACM DL}
}

@inproceedings{acretoaie:stoerrle:mq2,
  author = {Acretoaie, Vlad and St{\"o}rrle, Harald},
  title = {{MQ-2: A Tool for Prolog-based Model Querying}},
  pages = {328--331},
  crossref= "ecmfa:2012"
}

@conference{ecmfa:2012,
  title={{Eur.\ Conf.\ Proc.\ Modelling Foundations and Applications (ECMFA)}},
  booktitle={{Eur.\ Conf.\ Proc.\ Modelling Foundations and Applications (ECMFA)}},
  series = lncs,
  year= 2012,
  Volume =7349,
  publisher=Springer
}

@inproceedings{stoerrle:vl4c:design,
  title = {{On the Impact of Layout Quality to Unterstanding UML Diagrams: Diagram Type and Expertise}},
  author = {St{\"o}rrle, Harald},
  pages = {195--202},
  crossref = "vlhcc:12"
 }

@proceedings{vlhcc:12,
  title = {{Proc.\ IEEE Symp.\ Visual Languages and Human-Centric Computing (VL/HCC'12)}},
  booktitle = {{Proc.\ IEEE Symp.\ Visual Languages and Human-Centric Computing (VL/HCC'12)}},
  year = 2012,
  editor = {Costagliola, Gennaro and Ko, Andrew and Cypher, Allen and Nichols, Jeffrey and Scaffidi, Christopher and Kelleher, Caitlin and Myers, Brad},
  publisher = {IEEE Computer Society}
}

@inproceedings{stoerrle:edp1:survey,
  title = {{What are the Characteristics of Engineering Desing Processes?}},
  author = {Maier, Anja and St{\"o}rrle, Harald},
  pages = {135--142},
  booktitle={{Proc.\ 18th Intl.\ Conf.\ Engineering Design (ICED), Vol. 1}},
  pages={188--198},
  year=2011
}

@article{stoerrle:mc1b:jsosym,
  title={{Towards Clone Detection in UML Domain Models}},
  author={St{\"o}rrle, Harald},
  journal=jsosym,
  NOnumber={tba},
  NOvolume={tba},
  year=2011,
  publisher = springer,
  NOissn = {1619-1366},
  NOpages = {1--23},
  NOurl = {http://dx.doi.org/10.1007/s10270-011-0217-9},
  note = {(in print)}
}

@inproceedings{stoerrle:vl4a:layout:impact,
  title = {{On the Impact of Layout Quality to Unterstanding UML Diagrams}},
  author = {St{\"o}rrle, Harald},
  pages = {135--142},
  crossref = "vlhcc:11b"
 }

@proceedings{stoerrle:mq4b:expressing:vlhcc,
  title = {{Expressing Model Constraints Visually with VMQL}},
  author = {St{\"o}rrle, Harald},
  pages = {195--202},
  crossref = "vlhcc:11b"
 }

% this is a copy fo the other bib db sometime, it needs to be here...
@proceedings{vlhcc:11b,
  key = {Myers},
  title = {{Proc.\ IEEE Symp.\ Visual Languages and Human-Centric Computing (VL/HCC'11)}},
  booktitle = {{Proc.\ IEEE Symp.\ Visual Languages and Human-Centric Computing (VL/HCC'11)}},
  year = 2011,
  Alleditor = {Costagliola, Gennaro and Ko, Andrew and Cypher, Allen and Nichols, Jeffrey and Scaffidi, Christopher and Kelleher, Caitlin and Myers, Brad},
  editor = {{G.\ Costagliola et al.}},
  author = {Myers, Brad and Costagliola, Gennaro and Ko, Andrew and Cypher, Allen and Nichols, Jeffrey and Scaffidi, Christopher and Lin, James and Kelleher, Caitlin},
  publisher = {IEEE Computer Society}
}

@inproceedings{stoerrle:wed3a:nosa,
  title={{Model driven development of user interface prototypes: an integrated approach}},
  author={St{\"o}rrle, Harald},
  pages={261--268},
  crossref="nwmode:10"
}

@inproceedings{stoerrle:mc1a:nosa,
  title={{Towards clone detection in UML domain models}},
  author={St{\"o}rrle, Harald},
  pages={285--293},
  crossref="nwmode:10"
}

@inproceedings{stoerrle:ms1:ecsa,
  author = {St{\"o}rrle, Harald},
  title = {{Structuring very large domain models: experiences from industrial MDSD projects}},
  pages = {49--54},
  year=2010,
  crossref ="nwmode:10"
}

@proceedings{nwmode:10,
  booktitle = {{Proc. 4th Eur.\ Conf.\ Sw.\ Architecture (ECSA'10): Companion Volume}},
  title     = {{Proc. 4th Eur.\ Conf.\ Sw.\ Architecture (ECSA'10): Companion Volume}},
  LONGbooktitle = {{Proc.\ 8th Nordic Ws.\ Model Driven Engineering (NW-MODE'10). Appeared as Proc. 4th Eur.\ Conf.\ Sw.\ Architecture (ECSA'10): Companion Volume}},
  WSeditor={Wasowski, Andrzej and Truscan, Dragos and Kuzniarz, Ludwik},
  THEnote = {{appeared as Proc. 4th Eur.\ Conf.\ Sw.\ Architecture (ECSA'10): Companion Volume, I.\ Gorton, C.E.\ Cuesta, M.A.\  Babar (eds.)}},
  editor={Gorton, Ian and Cuesta, Carlos E.\ and Babar, Muhammad Ali},
  year=2010,
  publisher={ACM}
}

@article{stoerrle:mq3b:jvlc,
  title = {{VMQL: A Visual Language for Ad-Hoc Model Querying}},
  author = {St{\"o}rrle, Harald},
  journal = {J.\ Visual Languages and Computing},
  publisher = {Elsevier},
  year = 2011,
  month = FEB,
  number = 1,
  volume = 22,
  nopages = {3--29}
 }

@inproceedings{stoerrle:mq2a:vll09,
  title = {{A logical model query interface}},
  author = {St{\"o}rrle, Harald},
  pages = {18--36},
  crossref = "vll:09"
 }

@conference{vll:09,
  editor = {Cox, Philip and Fish, Andrew and Howse, John},
  booktitle = {{Intl.\ Ws.\ Visual Languages and Logic (VLL'09)}},
  title = {{Intl.\ Ws.\ Visual Languages and Logic (VLL'09)}},
  year = 2009,
  publisher = {CEUR},
  volume = 510,
  extra = {Available at \url{ftp.informatik.rwthaachen.de/Publications/CEUR-WS}}
  }

@inproceedings{stoerrle:mq3:vlhcc09,
  title = {{VMQL: A Generic Visual Model Query Language}},
  author = {St{\"o}rrle, Harald},
  pages = {199--206},
  crossref = "vlhcc:09"
 }

@CONFERENCE{vlhcc:09,
  title = {{Proc.\ IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC'09)}},
  booktitle = {{Proc.\ IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC'09)}},
  year = 2009,
  editor = {Erwig, Martin and DeLine, Robert and Minas, Mark},
  publisher = {IEEE Computer Society}
}

@inproceedings{stoerrle:mq1:vll07,
  title = {{A PROLOG-based Approach to Representing and Querying UML Models}},
  author = {St{\"o}rrle, Harald},
  pages = {71--84},
  series = {CEUR-WS},
  OLDcrossref = {vll:07},
  editor = {Cox, Philip and Fish, Andrew and Howse, John},
  booktitle = {{Intl.\ Ws.\ Visual Languages and Logic (VLL'07)}},
  year = 2007,
  publisher = {CEUR},
  volume = 274,
  mynote = {Available at \url{ftp.informatik.rwthaachen.de/Publications/CEUR-WS}}
 }

@conference{vll:07,
  editor = {Cox, Philip and Fish, Andrew and Howse, John},
  booktitle = {{Intl.\ Ws.\ Visual Languages and Logic (VLL'07)}},
  title = {{Intl.\ Ws.\ Visual Languages and Logic (VLL'07)}},
  year = 2007,
  publisher = {CEUR},
  volume = 274,
  note = {Available at \url{ftp.informatik.rwthaachen.de/Publications/CEUR-WS/}}
  }

@inproceedings{fish:stoerrle:visual,
  title={{Visual qualities of the Unified Modeling Language: Deficiencies and Improvements}},
  author={Fish, Andrew and St{\"o}rrle, Harald},
  pages = {41--49},
  crossref = "vlhcc:07"
}

@CONFERENCE{vlhcc:07,
  title = {{Proc.\ IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC'07)}},
  booktitle = {{Proc.\ IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC'07)}},
  year = 2007,
  editor = {Cox, Phil and Hosking, John},
  publisher = {IEEE Computer Society}
}

@INPROCEEDINGS{stoerrle:mlm3:iasted,
  author = {St{\"o}rrle, Harald},
  title = {{Large Scale Modeling Efforts: A Survey on Challenges and Best Practices}},
  pages = {382--389},
  crossref = {iasted-se:07}
}

@PROCEEDINGS{iasted-se:07,
  year = 2007,
  editor = {Hasselbring, Wilhelm},
  publisher = {Acta Press},
  booktitle = {{Proc.\ IASTED Intl.\ Conf.\ Software Engineering}},
  isbn = {978-0-88986-641-6}
}

@inproceedings{stoerrle:mvc3a:hamburg,
  OLDKEY=stoerrle:cm3:approach,
  title = {{An approach to cross-language model versioning}},
  author = {St{\"o}rrle, Harald},
  NOpages = {--},
  crossref = "vvuu:07"
}

@proceedings{vvuu:07,
  editor = {Udo Kelter},
  title = {{Proc.\ Ws.\ Versionierung und Vergleich von UML Modellen (VVUU'07)}},
  booktitle = {{Proc.\ Ws.\ Versionierung und Vergleich von UML Modellen (VVUU'07)}},
  publisher = {Gesellschaft f\"ur Informatik},
  month = May,
  year = 2007,
  note = {appeared in Softwaretechnik-Trends 2(27)2007}
}

@INPROCEEDINGS{glock:stoerrle:agile,
  author = {Glock, Wolfgang and St{\"o}rrle, Harald},
  title = {{Agile Steuerung eines Großprojektes über fachliche Anforderungen}},
  pages = {{??--??}},
  crossref = {GI-FG-RE-2006}
}

@CONFERENCE{vlhcc:05,
  booktitle = {{Proc.\ IEEE Symp.\ Visual Languages and Human Centric Computing (VL/HCC'05)}},
  title = {{Proc.\ IEEE Symp.\ Visual Languages and Human Centric Computing (VL/HCC'05)}},
  year = 2005,
  editor = {Erwig, Martin and Sch{\"u}rr, Andy},
  author = {Erwig, Martin and Sch{\"u}rr, Andy},
  publisher = ieee
}

@INPROCEEDINGS{stoerrle:ad:controlflow,
  author = {St{\"o}rrle, Harald},
  title = {{Semantics of Control-Flow in UML 2.0 Activities}},
  pages = {235--242},
  crossref = {vlhcc:04}
}

@ARTICLE{stoerrle:cm3:approach:stt,
  author = {St{\"o}rrle, Harald},
  title = {{An approach to cross-language model versioning}},
  journal = stt,
  volume = {27},
  NOpages = {--},
  number = {2},
  month = MAY,
  crossref = {se07-ws:07}
}

@INPROCEEDINGS{stoerrle:mvc3d:formal,
  oldIdWas={cm4},
  author = {St{\"o}rrle, Harald},
  title = {{A formal approach to the cross-language version management of models}},
  pages = {83--97},
  crossref = {nwmode:07}
}

@inproceedings{stoerrle:pad17:comparison,
  author = {St{\"o}rrle, Harald},
  title = {{A Comparison of (e)EPCs and UML 2 Activity Diagrams}},
  pages ={177--189},
  crossref = {epk:06}
}

@INPROCEEDINGS{stoerrle:fbvs,
  author = {St{\"o}rrle, Harald},
  title = {{A Petri-Net Semantics for Sequence Diagrams}},
  crossref = {fbvs:99}
}

@INPROCEEDINGS{stoerrle:group,
  author = {St{\"o}rrle, Harald},
  title = {{Group Exercises for the Design and Validation of Graphical User
	Interfaces}},
  pages = {135--146},
  crossref = {modellierung:02}
}

@INPROCEEDINGS{stoerrle:iad:negative,
  author = {St{\"o}rrle, Harald},
  title = {{Assert, Negate and Refinement in UML-2 Interactions}},
  pages = {79-94},
  crossref = {csduml:03}
}

@INPROCEEDINGS{stoerrle:iad:positive,
  author = {St{\"o}rrle, Harald},
  title = {{Semantics of Interactions in UML 2.0}},
  pages = {129-136},
  crossref = {vlfm:03}
}

@INPROCEEDINGS{stoerrle:momat:3,
  author = {St{\"o}rrle, Harald},
  title = {{A Lightweight Platform for Experimenting with Model Driven Development}},
  pages = {??--??},
  crossref = {??}
}

@INPROCEEDINGS{stoerrle:nosa,
  author = {St{\"o}rrle, Harald},
  title = {{Architectural modeling with the UML}},
  crossref = {nosa:99}
}

@INPROCEEDINGS{stoerrle:omer,
  author = {St{\"o}rrle, Harald},
  title = {{A different notion of components}},
  crossref = {omer:99}
}

@INPROCEEDINGS{stoerrle:pp-1,
  author = {St{\"o}rrle, Harald},
  title = {{Describing Process Patterns with UML}},
  pages = {173--181},
  crossref = {ewspt:01}
}

@INPROCEEDINGS{stoerrle:pp-2,
  author = {St{\"o}rrle, Harald},
  title = {{Describing Fractal Processes with UML}},
  pages = {282--296},
  crossref = {profes:01}
}

@INPROCEEDINGS{stoerrle:turning,
  author = {St{\"o}rrle, Harald},
  title = {{Turning UML Subsystems into Architectural Units}},
  crossref = {icse:01:amws}
}

@INPROCEEDINGS{stoerrle:uml00,
  author = {St{\"o}rrle, Harald},
  title = {{Some Questions Concerning Interactions and State Machines}},
  pages = {106-111},
  crossref = {reggio:et:al:dynamic}
}

@INPROCEEDINGS{stoerrle:ad:dataflow,
  author = {St{\"o}rrle, Harald},
  title = {{Semantics and Verification of Data-Flow in UML 2.0 Activities}},
  year = {2004},
  pages = {38--52},
  note = {available at \url{www.pst.ifi.lmu.de/~stoerrle}},
  crossref = {vlfm:04}
}

@INPROCEEDINGS{stoerrle:ad:expansion,
  author = {St{\"o}rrle, Harald},
  title = {{Semantics of Expansion Nodes in UML 2.0 Activities}},
  year = {2004},
  pages = {19--32},
  crossref = {nwuml:04}
}

@INPROCEEDINGS{stoerrle:mosaic:overview,
  author = {St{\"o}rrle, Harald},
  title = {{MOSAIC -- A Method Of System Architecture Inception and Construction}},
  year = {2004},
  note = {submitted to WITSE'04, June, $21^{st}$, available at \url{www.pst.ifi.lmu.de/~stoerrle}},
  crossref = {witse:04},
  optpages = {??}
}

@INPROCEEDINGS{stoerrle:hausmann:ad:limits,
  author = {St{\"o}rrle, Harald and Hausmann, Jan Hendrik},
  title = {{Obstacles on the Way Towards a Formal Semantics of UML 2.0 Activities}},
  pages = {117--128},
  crossref = "se:05"
}

@INPROCEEDINGS{wirsing:stoerrle:debugging,
  author = {Wirsing, Martin and St{\"o}rrle, Harald},
  title = {{Debugging ROOM Designs using High-Level-Petri-Nets}},
  crossref = {cptmcbs:99},
  optpages = {??}
}

@CONFERENCE{modellierung:02,
  author = {Glinz, Martin and M{\"u}ller-Luschnat, G{\"u}nther},
  title = {{Proc.\ Modellierung 2002}},
  booktitle = {{Proc.\ Modellierung 2002}},
  year = {2002},
  editor = {Glinz, Martin and M{\"u}ller-Luschnat, G{\"u}nther},
  number = {P-12},
  series = {{Lecture Notes in Informatics}},
  publisher = {{Gesellschaft f\"ur Informatik}}
}

@INBOOK{glock:stoerrle:gpm,
  title = {{Geschäftsprozessmodellierung f{\"u}r Service-Orientierte Architekturen}},
  publisher = {{Deutscher Universitätsverlag/Gabler Edition Wissenschaft}},
  year = {2007},
  editor = {Nissen, V. and Petsch, M. and Schorcht, H.},
  author = {Glock, Wolfgang and St{\"o}rrle, Harald},
  booktitle = {{Service-orientierte Architekturen}}
}

@CONFERENCE{vlfm:04,
  author = {Minas, Mark},
  title = {{Proc.\ Intl.\ Ws.\ on Visual Languages and Formal Methods (VLFM'04)}},
  booktitle = {{Proc.\ Intl.\ Ws.\ on Visual Languages and Formal Methods (VLFM'04)}},
  year = {2004},
  editor = {Minas, Mark},
  publisher = IEEE,
  note = {to appear also as an ENTCS issue},
  optnumber = {t.b.d.},
  optseries = {{ENTCS}}
}

@CONFERENCE{vlfm:04:entcs,
  author = {Minas, Mark},
  title = {{Proc.\ Intl.\ Ws.\ on Visual Languages and Formal Methods (VLFM'04)}},
  booktitle = {{Proc.\ Intl.\ Ws.\ on Visual Languages and Formal Methods (VLFM'04)}},
  year = {2004},
  editor = {Minas, Mark},
  series = {{ENTCS}},
  publisher = kluwer,
  optnumber = {t.b.d.}
}

@CONFERENCE{witse:04,
  author = {N.N.},
  title = {{Proc.\ Ws.\ on Intelligent Technologies for Software Engineering
	(WITSE)}},
  booktitle = {{Proc.\ Ws.\ on Intelligent Technologies for Software Engineering
	(WITSE)}},
  year = {2004},
  editor = {N.N.},
  number = {t.b.d.}
}

@TECHREPORT{stoerrle:momat:0,
  author = {St\"orrle, Harald},
  title = {{MoMaT –- A Lightweight Platform for Experimenting with Model Driven Development}},
  institution = lmu,
  year = {2005},
  number = {0504},
  month = MAR,
  annnote = {downloadable from \url{www.pst.ifi.lmu.de/~stoerrle}},
  annote = {ziel ist die möglichst weite Verbreitung}
}

@TECHREPORT{stoerrle:diplom,
  author = {St\"orrle, Harald},
  title = {Strukturbisimulation auf h\"oheren {P}etrinetzen},
  institution = fbi,
  year = {1997},
  type = {Diplomarbeit}
}

@PROCEEDINGS{nwmode:07,
  title = {{Proc.\ 5th Nordic Ws.\ Model Driven Engineering (NW-MODE'07)}},
  editor={Kuzniarz, Ludwik and Staron, Miroslaw and Syst{\"a}, Tarja and Persson, Mia},
  publisher = {Blekkinge Tekniska Högskolan},
  EXTRAauthor = {Staron, Miroslaw},
  booktitle = {{Proc.\ 5th Nordic Ws.\ Model Driven Engineering (NW-MODE'07)}},
  EXTRAisbn = {978-91-7295-985-9},
  month = Aug,
  year = 2007
}

@INPROCEEDINGS{stoerrle:awpn,
  author = { St{\"o}rrle, Harald},
  title = {{Erfahrungen aus einer Vergleichsstudie {\"u}ber Petri-Netz-Werkzeuge}},
  booktitle = {Proc.\ {A}lgorithmen und {W}erkzeuge f{\"u}r {P}etri-{N}etze (AWPN'98)},
  year = {1998},
  editor = {Desel, J{\"o}rg and Kemper, Peter and Kindler, Ekkart and Oberweis,
	Andreas},
  note = {appeared as {R}esearch {R}eport {N}o. 694 of {F}achbereich {I}nformatik,
	{U}niversit{\"a}t {D}ortmund}
}

@INPROCEEDINGS{stoerrle:pp-3,
  author = {St{\"o}rrle, Harald},
  title = {{Describing Process Patterns with UML}},
  booktitle = {{Software Process Improvement. CMM \& SPICE in Practice}},
  year = {2002},
  editor = {Koch, Nora},
  number = {13},
  series = {Reihe Softwaretechnik},
  pages = {89--109},
  address = {{M\"unchen}},
  publisher = {ASQF Uni-Druck}
}

@ARTICLE{stoerrle:ad:dataflow:entcs,
  author = {St{\"o}rrle, Harald},
  title = {{Semantics and Verification of Dataflow in UML 2.0 Activities}},
  journal = entcs,
  year = {2005},
  volume = {127},
  number = {4},
  optpages = {1--24},
  publisher = {{Elsevier}}
}

@BOOK{stoerrle:uml2ee,
  title = {{UML 2 erfolgreich einsetzen}},
  publisher = aw,
  year = {2005},
  author = {St{\"o}rrle, Harald}
}

@BOOK{stoerrle:uml2fs,
  title = {{UML 2 f\"ur Studenten}},
  publisher = {{Pearson Studium}},
  year = {2005},
  author = {St{\"o}rrle, Harald}
}

@ARTICLE{stoerrle:ad:exceptions,
  author = {St{\"o}rrle, Harald},
  title = {{Semantics of Exceptions in UML 2.0 Activities}},
  year = {2004},
  note = {submitted to Journal of Software and Systems Modeling, May, $9^\mathit{th}$,
	available at \url{www.pst.ifi.lmu.de/~stoerrle}},
  optjournal = {{Journal of Software and Systems Modeling}},
  optnumber = {t.b.d.},
  optvolume = {t.b.d.}
}

@TECHREPORT{stoerrle:ad:exceptions-tr,
  author = {St{\"o}rrle, Harald},
  title = {{Semantics of Exceptions in UML 2.0 Activities}},
  institution = lmu2,
  year = {2004},
  number = {0403},
  note = {available at \url{www.pst.ifi.lmu.de/~stoerrle}}
}

@ARTICLE{stoerrle:ad:expansion:njc,
  author = {St{\"o}rrle, Harald},
  title = {{Semantics of Expansion Nodes in UML 2.0 Activities}},
  journal = njc,
  year = {2004},
  volume = {11},
  pages = {1--24},
  number = {3},
  publisher = {{Publishing Association Nordic Journal of Computing}}
}

@ARTICLE{stoerrle:iad:jvlc,
  author = {St{\"o}rrle, Harald},
  title = {{Trace Semantics of Interactions in UML 2.0}},
  year = {2004},
  note = {submitted to J.\ Visual Languages and Computing, February, $13^{th}$,
	available at \url{www.pst.ifi.lmu.de/~stoerrle}},
  opteditor = {N.N.},
  optjournal = {{J.\ Visual Languages and Computing}},
  optmonth = {t.b.d.},
  optpublisher = {#elsevier#}
}

@TECHREPORT{stoerrle:iad:techreport,
  author = {St{\"o}rrle, Harald},
  title = {{Towards a complete Semantics of Interactions in UML 2.0}},
  institution = lmu2,
  year = {2003},
  number = {0304}
}

@TECHREPORT{stoerrle:ewspt-full,
  author = {St{\"o}rrle, Harald},
  title = {{Describing Process Patterns with UML}},
  institution = pst,
  year = {2001}
}

@PHDTHESIS{stoerrle:diss,
  author = {St{\"o}rrle, Harald},
  title = {{Models of Software Architecture. Design and Analysis with UML and
	Petri-nets}},
  school = lmu,
  year = {2000},
  month = DEC,
  note = {ISBN 3-8311-1330-0},
  optaddress = {Stoerrle@web.de},
  publisher = {BoD}
}

@UNPUBLISHED{stoerrle:esec99,
  author = {St{\"o}rrle, Harald},
  title = {Analyzing Behavioural Designs},
  note = {submitted to ESEC},
  year = {1999},
  institution = pst,
  school = pst
}

@UNPUBLISHED{stoerrle:uml99,
  author = {St{\"o}rrle, Harald},
  title = {Towards a denotational semantics of dynamic aspect of {UML/RT}},
  note = {submitted to {UML}},
  year = {1999},
  institution = pst,
  school = pst
}

@TECHREPORT{stoerrle:umlrt,
  author = {St{\"o}rrle, Harald},
  title = {{UML} for {R}eal-{T}ime: a different approach},
  institution = pst,
  year = {1999},
  annote = {hab ich den je veröffentlicht?!}
}

@TECHREPORT{stoerrle:survey,
  author = {St{\"o}rrle, Harald},
  title = {{An Evaluation of High-End Tools for Petri-Nets}},
  institution = lmu,
  year = {1998},
  number = {9802}
}

@OTHER{GI-FG-RE2006,
  booktitle = {{Jahrestreffen der GI Fachgruppe Requirements Engineering (GI-FG
	RE'06)}},
  editor = {??},
  month = NOV,
  note = {{also appeared in Softwaretechnik-Trends 27(1)2007}},
  publisher = {??},
  year = {2006}
}

@PROCEEDINGS{profes:01,
  title = {{Proc.\ Intl.\ conf.\ Product Focused Software Process Improvement
	(Profes'01)}},
  year = {2001},
  editor = {Bomarius, Frank and Komi-Sirvi{\"o}, Seija},
  number = {2188},
  series = lncs,
  publisher = springer,
  booktitle = {{Proc.\ Intl.\ conf.\ Product Focused Software Process Improvement
	(Profes'01)}}
}

@CONFERENCE{nosa:99,
  booktitle = {{Nordic Workshop on Software Architectures (NOSA'99)}},
  year = {1999},
  editor = {Bosch, Jan}
}

@CONFERENCE{vlhcc:04,
  title = {{Proc.\ IEEE Symposium on Visual Languages and Human-Centric Computing
	(VL/HCC)}},
  booktitle = {{Proc.\ IEEE Symposium on Visual Languages and Human-Centric Computing
	(VL/HCC)}},
  year = {2004},
  editor = {Bottoni, Paolo and Hundhausen, Chris and Levialdi, Stefano and Tortora,
	Genny},
  publisher = {IEEE Computer Society}
}

@CONFERENCE{ewspt:01,
  booktitle = {{Proc.\ Eur. Ws.\ Software Process Technology}},
  year = {2001},
  editor = {Cignioni, Giovanni A.},
  number = {2077},
  series = lncs,
  publisher = springer
}

@CONFERENCE{vlfm:03,
  title = {{Human Centric Computing Languages and Environments}},
  booktitle = {{Human Centric Computing Languages and Environments}},
  year = {2003},
  editor = {Hosking, John and Cox, Philip},
  publisher = {IEEE Computer Society},
  annote = {ISBN 0-7803-8225-0}
}

@CONFERENCE{csduml:03,
  title = {{Proc.\ Ws.\ Critical Systems Development with UML}},
  booktitle = {{Proc.\ Ws.\ Critical Systems Development with UML}},
  year = {2003},
  editor = {J{\"u}rjens, Jan and Rumpe, Bernhard and France, Robert and Fernandey,
	Eduardo B.},
  annote = {2766},
  institution = tum
}

@PROCEEDINGS{se:05_clone,
  title = {{Proc.\ Natl.\ Germ.\ Conf.\ Software-Engineering 2005 (SE'05)}},
  year = 2005,
  editor = {Pohl, Klaus},
  number = {P-64},
  series = lni,
  publisher = gi,
  booktitle = {{Proc.\ Natl.\ Germ.\ Conf.\ Software-Engineering 2005 (SE'05)}}
}

@CONFERENCE{nwuml:04,
  title = {{Proc.\ $2^\mathit{nd}$ Nordic Ws.\ on UML, Modeling, Methods and
	Tools (NWUML'04))}},
  booktitle = {{Proc.\ $2^\mathit{nd}$ Nordic Ws.\ on UML, Modeling, Methods and
	Tools (NWUML'04)}},
  year = {2004},
  editor = {Porres, Ivan},
  optnumber = {t.b.d.}
}

@CONFERENCE{omer:99,
  booktitle = {{Object-Oriented Modelling of Real-Time Systems (OMER'99)}},
  year = {1999},
  editor = {Sch{\"u}rr, Andreas and Hofmann, Peter},
  publisher = {Universit{\"a}t der Bundeswehr, M{\"u}nchen, Fakult{\"a}t f{\"u}r
	Informatik, Bericht Nr.~1999-01}
}

@CONFERENCE{fbvs:99,
  title = {{9. GI/ITG Fachgespr{\"a}ch Formale Beschreibungstechniken f{\"u}r
	verteilte Systeme (FBT'99)}},
  booktitle = {{9. GI/ITG Fachgespr{\"a}ch Formale Beschreibungstechniken f{\"u}r
	verteilte Systeme (FBT'99)}},
  year = {1999},
  editor = {Spies, Katharina and Sch{\"a}tz, Bernhard},
  month = {June}
}

@PROCEEDINGS{icse:01:amws,
  title = {{Intl.\ Ws.\ on Describing Software Architectures with UML (at ICSE)}},
  year = {2001},
  publisher = {IEEE},
  note = {WAR DAS NICHT EIN TECHREPORT DER TUM?},
  booktitle = {{Intl.\ Ws.\ on Describing Software Architectures with UML (at ICSE)}}
}

@CONFERENCE{cptmcbs:99,
  title = {Proc.\ $1^\mathit{st}$ Colloquium on Petri Net Technologies for Modelling
	Communication Based Systems},
  year = {1999},
  month = oct,
  publisher = {Fraunhofer Gesellschaft, ISST}
}

repository: JQYZ/lncs

repo_name: JQYZ/lncs


text:
include recipes-core/images/rpi-test-image.bb

IMAGE_FEATURES += "\
    package-management \
    dbg-pkgs \
    tools-debug \
"

IMAGE_INSTALL += "\
    qt-multimedia-omxil \
    qtbase \
    qtbase-plugins \
    qtdeclarative \
    qtdeclarative-plugins \
    qtdeclarative-qmlplugins \
    qtdeclarative-tools \
    qtmultimedia \
    qtmultimedia-plugins \
    qtmultimedia-qmlplugins \
    nodejs \
"

license: MIT

repository: onotole/meta-qml-rtsp

license_type: permissive

repo_name: onotole/meta-qml-rtsp

branch_name: refs/heads/master

extension: bb


text:
package api

import (
	"net/http"

	"github.com/stretchr/testify/mock"
	"github.com/wcsanders1/MockApiHub/config"
)

// FakeAPI is a mockable API.
type FakeAPI struct {
	mock.Mock
}

// Start is a mockable api.Start().
func (api *FakeAPI) Start(dir, defaultCert, defaultKey string) error {
	args := api.Called(dir, defaultCert, defaultKey)
	return args.Error(0)
}

// Shutdown is a mockable api.Shutdown().
func (api *FakeAPI) Shutdown() error {
	args := api.Called()
	return args.Error(0)
}

// ServeHTTP is a mockable api.ServeHTTP().
func (api *FakeAPI) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	return
}

// GetPort is a mockable api.GetPort().
func (api *FakeAPI) GetPort() int {
	args := api.Called()
	return args.Int(0)
}

// GetBaseURL is a mockable api.GetBaseURL().
func (api *FakeAPI) GetBaseURL() string {
	args := api.Called()
	return args.String(0)
}

// GetEndpoints is a mockable api.GetEndpoints().
func (api *FakeAPI) GetEndpoints() map[string]config.Endpoint {
	args := api.Called()
	return args.Get(0).(map[string]config.Endpoint)
}

extension: go


text:
package cluster

import (
	"fmt"
	"github.com/coreos/etcd-operator/pkg/apis/etcd/v1beta2"
	tanxv1 "github.com/kok-stack/kok/api/v1"
	"github.com/kok-stack/kok/controllers"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/util/validation/field"
	"reflect"
)

func NewEtcdModules(cfg *controllers.InitConfig) {
	var etcdCRD = &controllers.Module{
		GetObj: func() controllers.Object {
			return &v1beta2.EtcdCluster{}
		},
		Render: func(c *tanxv1.Cluster) controllers.Object {
			name := fmt.Sprintf("%s-etcd", c.Name)
			var out = &v1beta2.EtcdCluster{
				ObjectMeta: metav1.ObjectMeta{
					Name:      name,
					Namespace: c.Namespace,
				},
				Spec: v1beta2.ClusterSpec{
					Size:       c.Spec.EtcdSpec.Count,
					Repository: cfg.EtcdRepository,
					Version:    cfg.EtcdVersion,
					TLS: &v1beta2.TLSPolicy{
						Static: &v1beta2.StaticTLS{
							Member: &v1beta2.MemberSecret{
								PeerSecret:   c.Status.Init.EtcdPkiPeerName,
								ServerSecret: c.Status.Init.EtcdPkiServerName,
							},
							OperatorSecret: c.Status.Init.EtcdPkiClientName,
						},
					},
				},
			}
			return out
		},
		SetStatus: func(c *tanxv1.Cluster, target, now controllers.Object) (bool, controllers.Object) {
			obj := now.(*v1beta2.EtcdCluster)
			c.Status.Etcd.SvcName = obj.Status.ServiceName
			c.Status.Etcd.Name = obj.Name
			c.Status.Etcd.Status = obj.Status

			t := target.(*v1beta2.EtcdCluster)
			n := now.(*v1beta2.EtcdCluster)
			if !reflect.DeepEqual(t.Spec, n.Spec) {
				n.Spec = t.Spec
				return true, n
			}
			return false, n
		},
		Next: func(c *tanxv1.Cluster) bool {
			if len(c.Status.Etcd.Status.Members.Ready) == c.Status.Etcd.Status.Size && (c.Status.Etcd.Status.Size == c.Spec.EtcdSpec.Count) {
				return true
			}
			return false
		},
		SetDefault: func(r *tanxv1.Cluster) {
			if r.Spec.EtcdSpec.Count == 0 {
				r.Spec.EtcdSpec.Count = 3
			}
		},
		ValidateCreateModule: func(r *tanxv1.Cluster) field.ErrorList {
			var allErrs field.ErrorList
			if r.Spec.EtcdSpec.Count%2 == 0 || r.Spec.EtcdSpec.Count < 3 {
				allErrs = append(allErrs, field.Invalid(field.NewPath("spec.etcdSpec.count"), r.Spec.EtcdSpec.Count, "不能为奇数且必须>=3"))
			}
			return allErrs
		},
		ValidateUpdateModule: func(now *tanxv1.Cluster, old *tanxv1.Cluster) field.ErrorList {
			var allErrs field.ErrorList
			if now.Spec.EtcdSpec.Count%2 == 0 || old.Spec.EtcdSpec.Count < 3 {
				allErrs = append(allErrs, field.Invalid(field.NewPath("spec.etcdSpec.count"), now.Spec.EtcdSpec.Count, "不能为奇数且必须>=3"))
			}
			return allErrs
		},
	}
	var etcdModule = &controllers.Module{
		Order: 20,
		Name:  "etcd-crd",
		Sub:   []*controllers.Module{etcdCRD},
	}
	controllers.AddModules(cfg.Version, etcdModule)
}

repository: jackios/kok

repo_name: jackios/kok

branch_name: refs/heads/main


text:
package timer

import (
	"math"
	"time"

	"github.com/gin-gonic/gin"
	"github.com/vidar-team/Cardinal/conf"
	"github.com/vidar-team/Cardinal/internal/asteroid"
	"github.com/vidar-team/Cardinal/internal/locales"
	"github.com/vidar-team/Cardinal/internal/logger"
	"github.com/vidar-team/Cardinal/internal/misc/webhook"
	"github.com/vidar-team/Cardinal/internal/utils"
	log "unknwon.dev/clog/v2"
)

var t = new(timer)

// timer is the time data struct of the Cardinal.
type timer struct {
	BeginTime       time.Time     // init
	EndTime         time.Time     // init
	Duration        uint          // init
	RestTime        [][]time.Time // init
	RunTime         [][]time.Time // init
	TotalRound      int           // init
	NowRound        int
	RoundRemainTime int
	Status          string
}

// Get returns the timer.
func Get() *timer {
	return t
}

// GetTime is the HTTP Handler of the time.
func GetTime(c *gin.Context) (int, interface{}) {
	return utils.MakeSuccessJSON(gin.H{
		"BeginTime":       t.BeginTime.Unix(),
		"EndTime":         t.EndTime.Unix(),
		"Duration":        t.Duration,
		"NowRound":        t.NowRound,
		"NowTime":         time.Now().Unix(),
		"RoundRemainTime": t.RoundRemainTime,
		"Status":          t.Status,
	})
}

func Init() {
	// Check the bridge.
	if SetRankListTitle == nil ||
		SetRankList == nil ||
		CleanGameBoxStatus == nil ||
		GetLatestScoreRound == nil ||
		RefreshFlag == nil ||
		CalculateRoundScore == nil {

		log.Fatal("Timer bridge error, the function should be not nil.")
	}

	t = &timer{
		BeginTime: conf.Get().BeginTime,
		EndTime:   conf.Get().EndTime,
		Duration:  conf.Get().Duration,
		RestTime:  conf.Get().RestTime,
		NowRound:  -1,
	}
	checkTimeConfig()

	// Calculate the rest time cycle.
	for i := 0; i < len(t.RestTime)-1; i++ {
		j := i + 1
		if t.RestTime[i][1].Unix() >= t.RestTime[j][0].Unix() {
			if t.RestTime[i][1].Unix() >= t.RestTime[j][1].Unix() {
				t.RestTime[j] = t.RestTime[i]
			} else {
				t.RestTime[j][0] = t.RestTime[i][0]
			}
			t.RestTime[i] = nil
		} else {
			i++
		}
	}

	// Remove the empty element.
	for i := 0; i < len(t.RestTime); i++ {
		if t.RestTime[i] == nil {
			t.RestTime = append(t.RestTime[:i], t.RestTime[i+1:]...)
			i++
		}
	}

	// Set the competition time cycle.
	if len(t.RestTime) != 0 {
		t.RunTime = append(t.RunTime, []time.Time{t.BeginTime, t.RestTime[0][0]})
		for i := 0; i < len(t.RestTime)-1; i++ {
			t.RunTime = append(t.RunTime, []time.Time{t.RestTime[i][1], t.RestTime[i+1][0]})
		}
		t.RunTime = append(t.RunTime, []time.Time{t.RestTime[len(t.RestTime)-1][1], t.EndTime})

	} else {
		t.RunTime = append(t.RunTime, []time.Time{t.BeginTime, t.EndTime})
	}

	// Calculate the total round.
	var totalTime int64
	for _, dur := range t.RunTime {
		totalTime += dur[1].Unix() - dur[0].Unix()
	}
	t.TotalRound = int(totalTime / 60 / int64(t.Duration))

	log.Trace(string(locales.I18n.T(conf.Get().SystemLanguage, "timer.total_round", gin.H{
		"round": t.TotalRound,
	})))

	log.Trace(string(locales.I18n.T(conf.Get().SystemLanguage, "timer.total_time", gin.H{
		"time": int(totalTime / 60),
	})))

	go timerProcess()
}

func timerProcess() {
	beginTime := t.BeginTime.Unix()
	endTime := t.EndTime.Unix()
	lastRoundCalculate := false // A sign for the last round score calculate.

	{
		SetRankListTitle() // Refresh ranking list table header.
		SetRankList()
	}

	for {
		nowTime := time.Now().Unix()
		t.RoundRemainTime = -1

		if nowTime > beginTime && nowTime < endTime {
			nowRunTimeIndex := -1
			for index, dur := range t.RunTime {
				if nowTime > dur[0].Unix() && nowTime < dur[1].Unix() {
					nowRunTimeIndex = index // Get which time cycle now.
					break
				}
			}

			if nowRunTimeIndex == -1 {
				// Suspended
				if t.Status != "pause" {
					go webhook.Add(webhook.PAUSE_HOOK, nil)
				}
				t.Status = "pause"
			} else {
				// In progress
				t.Status = "on"
				var nowRound int
				var workTime int64 // Cumulative time until now.

				for index, dur := range t.RunTime {
					if index < nowRunTimeIndex {
						workTime += dur[1].Unix() - dur[0].Unix()
					} else {
						workTime += nowTime - dur[0].Unix()
						break
					}
				}
				nowRound = int(math.Ceil(float64(workTime) / float64(t.Duration*60))) // Calculate current round.
				t.RoundRemainTime = nowRound*int(t.Duration)*60 - int(workTime)       // Calculate the time to next round.

				// Check if it is a new round.
				if t.NowRound < nowRound {
					t.NowRound = nowRound
					if t.NowRound == 1 {
						// Game start hook
						go webhook.Add(webhook.BEGIN_HOOK, nil)
					}

					// New round hook
					go webhook.Add(webhook.BEGIN_HOOK, t.NowRound)

					// Clean the status of the gameboxes.
					CleanGameBoxStatus()
					SetRankList()

					// Calculate scores.
					// Get the latest score record.
					latestScoreRound := GetLatestScoreRound()

					// If Cardinal has been restart by unexpected error, get the latest round score and chick if need calculate the scores of previous round.
					if latestScoreRound < t.NowRound-1 {
						CalculateRoundScore(t.NowRound - 1)
					}

					// Auto refresh flag
					RefreshFlag()

					// Asteroid Unity3D refresh.
					asteroid.NewRoundAction()

					log.Trace("New round: %d", t.NowRound)
				}
			}

		} else if nowTime < beginTime {
			// Not started.
			t.Status = "wait"
		} else {
			// Over.
			// Calculate the score of the last round when the competition is over.
			if !lastRoundCalculate {
				lastRoundCalculate = true
				go CalculateRoundScore(t.TotalRound)
				// Game over hook
				go webhook.Add(webhook.END_HOOK, nil)
				logger.New(logger.IMPORTANT, "system", string(locales.I18n.T(conf.Get().SystemLanguage, "timer.end")))
			}

			t.Status = "end"
		}

		time.Sleep(1 * time.Second)
	}
}

func checkTimeConfig() {
	if t.BeginTime.Unix() > t.EndTime.Unix() {
		log.Fatal(string(locales.I18n.T(conf.Get().SystemLanguage, "timer.start_time_error")))
	}

	// Check the RestTime in config file is correct.
	for key, dur := range t.RestTime {
		if len(dur) != 2 {
			log.Fatal(string(locales.I18n.T(conf.Get().SystemLanguage, "timer.single_rest_time_error")))
		}
		if dur[0].Unix() >= dur[1].Unix() {
			log.Fatal(string(locales.I18n.T(conf.Get().SystemLanguage, "timer.rest_time_start_error",
				gin.H{
					"from": dur[0].String(),
					"to":   dur[1].String(),
				},
			)))
		}
		if dur[0].Unix() <= t.BeginTime.Unix() || dur[1].Unix() >= t.EndTime.Unix() {
			log.Fatal(string(locales.I18n.T(conf.Get().SystemLanguage, "timer.rest_time_overflow_error",
				gin.H{
					"from": dur[0].String(),
					"to":   dur[1].String(),
				},
			)))
		}
		// RestTime should in order.
		if key != 0 && dur[0].Unix() <= t.RestTime[key-1][0].Unix() {
			log.Fatal(string(locales.I18n.T(conf.Get().SystemLanguage, "timer.rest_time_order_error",
				gin.H{
					"from": dur[0].String(),
					"to":   dur[1].String(),
				},
			)))
		}
	}
}

repository: xalxl/Cardinal

repo_name: xalxl/Cardinal


text:
# Copyright (c) 2019 LG Electronics, Inc.

SECTION = "devel"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"

SRCREV = "32713d30b479690d199b3f02163a832b09b309a5"
SRC_URI = "git://github.com/awslabs/${BPN}.git;protocol=https"
S = "${WORKDIR}/git"

inherit cmake

DEPENDS += "aws-c-common aws-checksums"

EXTRA_OECMAKE += "-DCMAKE_MODULE_PATH=${STAGING_DIR_HOST}${libdir}/cmake"

EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON"

repository: jianchangfeng/meta-ros

repo_name: jianchangfeng/meta-ros

gha_license_id: MIT


text:
package ha

import (
	"testing"
	"time"

	"golang.org/x/net/context"

	"github.com/stretchr/testify/assert"
)

func TestRestartTimes(t *testing.T) {
	times := 0
	Watch(func() {
		times += 1
		panic("")
	}, RestartTimes(100))
	assert.Equal(t, 100, times)
}

func TestRestartDelay(t *testing.T) {
	const num = 100
	var tps []time.Time
	Watch(func() {
		tps = append(tps, time.Now())
		panic("")
	}, RestartDelay(num*time.Millisecond), RestartTimes(10))

	for i := range tps {
		if i == 0 {
			continue
		}
		assert.Equal(t, int(tps[i].Sub(tps[i-1]).Seconds()*1000/num), 1)
	}
}

func TestOnStop(t *testing.T) {
	errLogged := false
	Watch(func() {
		panic("")
	}, RestartTimes(1), OnStop(func(err error) {
		errLogged = true
	}))

	assert.True(t, errLogged)
}

func TestCancelCtx(t *testing.T) {
	ctx, _ := context.WithTimeout(context.Background(), 2*time.Second)
	start := time.Now()
	Watch(func() {
		panic("")
	}, CancelCtx(ctx))
	assert.Equal(t, int(time.Now().Sub(start).Seconds()), 2)
}


text:
DESCRIPTION = "Replacement syslog API"
LICENSE = "BSD"
PR = "r1"

SRC_URI = "http://www.balabit.com/downloads/files/eventlog/0.2/${P}.tar.gz"

inherit autotools pkgconfig

SRC_URI[md5sum] = "a6bdba91f88540cc69b398fd138d86cd"
SRC_URI[sha256sum] = "914319726bcd01a4055b1c5e09671085875af6de2b0d8589841916139574ee11"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD


text:
package maths

import (
	"SimpleOpenGL-Go/SeparateTexturesWithProjection/api"
	"fmt"
	"math"
)

//    2x3          3x3            4x4         OpenGL Array Index      M(Cell/Row)
// | a c e |    | a c e |      | a c 0 e |      |00 04 08 12|     |M00 M01 M02 M03|
// | b d f |    | b d f |  =>  | b d 0 f | ==>  |01 05 09 13| ==> |M10 M11 M12 M13|
// 	            | 0 0 1 |      | 0 0 1 0 |      |02 06 10 14|     |M20 M21 M22 M23|
// 	                           | 0 0 0 1 |      |03 07 11 15|     |M30 M31 M32 M33|

// Array indices
const (
	// M00 XX: Typically the unrotated X component for scaling, also the cosine of the
	// angle when rotated on the Y and/or Z axis. On
	// Vector3 multiplication this value is multiplied with the source X component
	// and added to the target X component.
	M00 = 0
	// M01 XY: Typically the negative sine of the angle when rotated on the Z axis.
	// On Vector3 multiplication this value is multiplied
	// with the source Y component and added to the target X component.
	M01 = 4
	// M02 XZ: Typically the sine of the angle when rotated on the Y axis.
	// On Vector3 multiplication this value is multiplied with the
	// source Z component and added to the target X component.
	M02 = 8
	// M03 XW: Typically the translation of the X component.
	// On Vector3 multiplication this value is added to the target X component.
	M03 = 12

	// M10 YX: Typically the sine of the angle when rotated on the Z axis.
	// On Vector3 multiplication this value is multiplied with the
	// source X component and added to the target Y component.
	M10 = 1
	// M11 YY: Typically the unrotated Y component for scaling, also the cosine
	// of the angle when rotated on the X and/or Z axis. On
	// Vector3 multiplication this value is multiplied with the source Y
	// component and added to the target Y component.
	M11 = 5
	// M12 YZ: Typically the negative sine of the angle when rotated on the X axis.
	// On Vector3 multiplication this value is multiplied
	// with the source Z component and added to the target Y component.
	M12 = 9
	// M13 YW: Typically the translation of the Y component.
	// On Vector3 multiplication this value is added to the target Y component.
	M13 = 13

	// M20 ZX: Typically the negative sine of the angle when rotated on the Y axis.
	// On Vector3 multiplication this value is multiplied
	// with the source X component and added to the target Z component.
	M20 = 2
	// M21 ZY: Typical the sine of the angle when rotated on the X axis.
	// On Vector3 multiplication this value is multiplied with the
	// source Y component and added to the target Z component.
	M21 = 6
	// M22 ZZ: Typically the unrotated Z component for scaling, also the cosine of the
	// angle when rotated on the X and/or Y axis.
	// On Vector3 multiplication this value is multiplied with the source Z component
	// and added to the target Z component.
	M22 = 10
	// M23 ZW: Typically the translation of the Z component.
	// On Vector3 multiplication this value is added to the target Z component.
	M23 = 14

	// M30 WX: Typically the value zero. On Vector3 multiplication this value is ignored.
	M30 = 3
	// M31 WY: Typically the value zero. On Vector3 multiplication this value is ignored.
	M31 = 7
	// M32 WZ: Typically the value zero. On Vector3 multiplication this value is ignored.
	M32 = 11
	// M33 WW: Typically the value one. On Vector3 multiplication this value is ignored.
	M33 = 15
)

// matrix4 represents a column major opengl array.
type matrix4 struct {
	e [16]float32
}

// A temporary matrix for multiplication
var tempM0 = NewMatrix4()
var mulM = NewMatrix4()

// NewMatrix4 creates a Matrix4 initialized to an identity matrix
func NewMatrix4() api.IMatrix4 {
	m := new(matrix4)
	m.ToIdentity()
	return m
}

// E returns the internal 4x4 matrix
func (m *matrix4) Matrix() *([16]float32) {
	return &m.e
}

// --------------------------------------------------------------------------
// Translation
// --------------------------------------------------------------------------

// TranslateBy adds a translational component to the matrix in the 4th column.
// The other columns are unmodified.
func (m *matrix4) Translate(v api.IVector3) {
	m.TranslateBy3Comps(v.X(), v.Y(), v.Z())
}

// TranslateBy2Comps adds a translational component to the matrix in the 4th column.
// Z is unmodified. The other columns are unmodified.
func (m *matrix4) TranslateBy2Comps(x, y float32) {
	m.TranslateBy3Comps(x, y, 0.0)
}

// TranslateBy3Comps adds a translational component to the matrix in the 4th column.
// The other columns are unmodified.
func (m *matrix4) TranslateBy3Comps(x, y, z float32) {
	e := tempM0.Matrix()
	e[M00] = 1.0
	e[M01] = 0.0
	e[M02] = 0.0
	e[M03] = x
	e[M10] = 0.0
	e[M11] = 1.0
	e[M12] = 0.0
	e[M13] = y
	e[M20] = 0.0
	e[M21] = 0.0
	e[M22] = 1.0
	e[M23] = z
	e[M30] = 0.0
	e[M31] = 0.0
	e[M32] = 0.0
	e[M33] = 1.0

	Multiply4(m, tempM0, mulM)
	m.Set(mulM)
}

// SetTranslateByVector sets the translational component to the matrix in the 4th column.
// The other columns are unmodified.
func (m *matrix4) SetTranslateUsingVector(v api.IVector3) {
	m.ToIdentity()
	m.e[M03] = v.X()
	m.e[M13] = v.Y()
	m.e[M23] = v.Z()
}

// SetTranslate3Comp sets the translational component to the matrix in the 4th column.
// The other columns are unmodified.
func (m *matrix4) SetTranslate3Comp(x, y, z float32) {
	m.ToIdentity()

	m.e[M03] = x
	m.e[M13] = y
	m.e[M23] = z
}

// GetTranslation returns the translational components in 'out' Vector3 field.
func (m *matrix4) GetTranslation(out api.IVector3) {
	out.Set3Components(m.e[M03], m.e[M13], m.e[M23])
}

// --------------------------------------------------------------------------
// Rotation
// --------------------------------------------------------------------------

// SetRotation set a rotation matrix about Z axis. 'angle' is specified
// in radians.
//
//      [  M00  M01   _    _   ]
//      [  M10  M11   _    _   ]
//      [   _    _    _    _   ]
//      [   _    _    _    _   ]
func (m *matrix4) SetRotation(angle float64) {
	if angle == 0 {
		return
	}

	m.ToIdentity()

	// Column major
	c := float32(math.Cos(angle))
	s := float32(math.Sin(angle))

	m.e[M00] = c
	m.e[M01] = -s
	m.e[M10] = s
	m.e[M11] = c
}

// Rotate postmultiplies this matrix with a (counter-clockwise) rotation matrix whose
// angle is specified in radians.
// |M00 M01 M02 M03|
// |M10 M11 M12 M13|
// |M20 M21 M22 M23|
// |M30 M31 M32 M33|
func (m *matrix4) Rotate(angle float64) {
	if angle == 0.0 {
		return
	}

	// Column major
	c := float32(math.Cos(angle))
	s := float32(math.Sin(angle))

	e := tempM0.Matrix()
	e[M00] = c
	e[M01] = -s
	e[M02] = 0.0
	e[M03] = 0.0
	e[M10] = s
	e[M11] = c
	e[M12] = 0.0
	e[M13] = 0.0
	e[M20] = 0.0
	e[M21] = 0.0
	e[M22] = 1.0
	e[M23] = 0.0
	e[M30] = 0.0
	e[M31] = 0.0
	e[M32] = 0.0
	e[M33] = 1.0

	Multiply4(m, tempM0, mulM)
	m.Set(mulM)
}

// --------------------------------------------------------------------------
// Scale
// --------------------------------------------------------------------------

// SetScale sets the scale components of an identity matrix and captures
// scale values into Scale property.
func (m *matrix4) SetScale(v api.IVector3) {
	m.ToIdentity()

	m.e[M00] = v.X()
	m.e[M11] = v.Y()
	m.e[M22] = v.Z()
}

// SetScale3Comp sets the scale components of an identity matrix and captures
// scale values into Scale property.
func (m *matrix4) SetScale3Comp(sx, sy, sz float32) {
	m.ToIdentity()

	m.e[M00] = sx
	m.e[M11] = sy
	m.e[M22] = sz
}

// SetScale2Comp sets the scale components of an identity matrix and captures
// scale values into Scale property where Z component = 1.0.
func (m *matrix4) SetScale2Comp(sx, sy float32) {
	m.ToIdentity()

	m.e[M00] = sx
	m.e[M11] = sy
	m.e[M22] = 1.0
}

// Scale scales the scale components.
func (m *matrix4) Scale(v api.IVector3) {
	e := tempM0.Matrix()

	e[M00] = v.X()
	e[M01] = 0
	e[M02] = 0
	e[M03] = 0
	e[M10] = 0
	e[M11] = v.Y()
	e[M12] = 0
	e[M13] = 0
	e[M20] = 0
	e[M21] = 0
	e[M22] = v.Z()
	e[M23] = 0
	e[M30] = 0
	e[M31] = 0
	e[M32] = 0
	e[M33] = 1

	Multiply4(m, tempM0, mulM)
	m.Set(mulM)
}

// ScaleByComp scales the scale components.
func (m *matrix4) ScaleByComp(sx, sy, sz float32) {
	e := tempM0.Matrix()

	e[M00] = sx
	e[M01] = 0
	e[M02] = 0
	e[M03] = 0
	e[M10] = 0
	e[M11] = sy
	e[M12] = 0
	e[M13] = 0
	e[M20] = 0
	e[M21] = 0
	e[M22] = sz
	e[M23] = 0
	e[M30] = 0
	e[M31] = 0
	e[M32] = 0
	e[M33] = 1

	Multiply4(m, tempM0, mulM)
	m.Set(mulM)
}

func (m *matrix4) GetPsuedoScale() float32 {
	return m.e[M00]
}

// --------------------------------------------------------------------------
// Transforms
// --------------------------------------------------------------------------

// --------------------------------------------------------------------------
// Matrix methods
// --------------------------------------------------------------------------
func (m *matrix4) SetFromAffine(src api.IAffineTransform) {
	s := src.Matrix()
	m.e[0] = s[0]
	m.e[1] = s[1]
	m.e[2] = s[2]
	m.e[3] = s[3]
	m.e[4] = s[4]
	m.e[5] = s[5]
	m.e[6] = s[6]
	m.e[7] = s[7]
	m.e[8] = s[8]
	m.e[9] = s[9]
	m.e[10] = s[10]
	m.e[11] = s[11]
	m.e[12] = s[12]
	m.e[13] = s[13]
	m.e[14] = s[14]
	m.e[15] = s[15]
}

func multiply4(a, b, out *([16]float32)) {
	out[M00] = a[M00]*b[M00] + a[M01]*b[M10] + a[M02]*b[M20] + a[M03]*b[M30]
	out[M01] = a[M00]*b[M01] + a[M01]*b[M11] + a[M02]*b[M21] + a[M03]*b[M31]
	out[M02] = a[M00]*b[M02] + a[M01]*b[M12] + a[M02]*b[M22] + a[M03]*b[M32]
	out[M03] = a[M00]*b[M03] + a[M01]*b[M13] + a[M02]*b[M23] + a[M03]*b[M33]
	out[M10] = a[M10]*b[M00] + a[M11]*b[M10] + a[M12]*b[M20] + a[M13]*b[M30]
	out[M11] = a[M10]*b[M01] + a[M11]*b[M11] + a[M12]*b[M21] + a[M13]*b[M31]
	out[M12] = a[M10]*b[M02] + a[M11]*b[M12] + a[M12]*b[M22] + a[M13]*b[M32]
	out[M13] = a[M10]*b[M03] + a[M11]*b[M13] + a[M12]*b[M23] + a[M13]*b[M33]
	out[M20] = a[M20]*b[M00] + a[M21]*b[M10] + a[M22]*b[M20] + a[M23]*b[M30]
	out[M21] = a[M20]*b[M01] + a[M21]*b[M11] + a[M22]*b[M21] + a[M23]*b[M31]
	out[M22] = a[M20]*b[M02] + a[M21]*b[M12] + a[M22]*b[M22] + a[M23]*b[M32]
	out[M23] = a[M20]*b[M03] + a[M21]*b[M13] + a[M22]*b[M23] + a[M23]*b[M33]
	out[M30] = a[M30]*b[M00] + a[M31]*b[M10] + a[M32]*b[M20] + a[M33]*b[M30]
	out[M31] = a[M30]*b[M01] + a[M31]*b[M11] + a[M32]*b[M21] + a[M33]*b[M31]
	out[M32] = a[M30]*b[M02] + a[M31]*b[M12] + a[M32]*b[M22] + a[M33]*b[M32]
	out[M33] = a[M30]*b[M03] + a[M31]*b[M13] + a[M32]*b[M23] + a[M33]*b[M33]
}

// Multiply4 multiplies a * b and places result into 'out', (i.e. out = a * b)
func Multiply4(a, b, out api.IMatrix4) {
	oe := out.Matrix()
	ae := a.Matrix()
	be := b.Matrix()
	multiply4(ae, be, oe)
}

// MultiplyAffineM4 multiplies: affine x 4x4.
func MultiplyAffineM4(a api.IAffineTransform, b, out api.IMatrix4) {
	oe := out.Matrix()
	ae := a.Matrix()
	be := b.Matrix()
	multiply4(ae, be, oe)
}

// MultiplyM4Affine multiplies: 4x4 x affine
func MultiplyM4Affine(a api.IMatrix4, b api.IAffineTransform, out api.IMatrix4) {
	oe := out.Matrix()
	ae := a.Matrix()
	be := b.Matrix()
	multiply4(ae, be, oe)
}

// Multiply multiplies a * b and places result into this matrix, (i.e. m = a * b)
func (m *matrix4) Multiply(a, b api.IMatrix4) {
	Multiply4(a, b, m)
}

// PreMultiply pre-multiplies 'b' matrix with 'm' and places the result into 'm' matrix.
// (i.e. m = m * b)
func (m *matrix4) PreMultiply(b api.IMatrix4) {
	Multiply4(m, b, mulM)
	m.Set(mulM)
}

// PostMultiply post-multiplies 'm' matrix with 'b' and places the result into 'm' matrix.
// (i.e. m = b * m)
func (m *matrix4) PostMultiply(b api.IMatrix4) {
	Multiply4(b, m, mulM)
	m.Set(mulM)
}

// MultiplyIntoA multiplies a * b and places result into 'a', (i.e. a = a * b)
func MultiplyIntoA(a, b api.IMatrix4) {
	Multiply4(a, b, mulM)
	a.Set(mulM)
}

// PostTranslate postmultiplies this matrix by a translation matrix.
// Postmultiplication is also used by OpenGL ES.
func (m *matrix4) PostTranslate(tx, ty, tz float32) {
	te := tempM0.Matrix()

	te[M00] = 1.0
	te[M01] = 0.0
	te[M02] = 0.0
	te[M03] = tx
	te[M10] = 0.0
	te[M11] = 1.0
	te[M12] = 0.0
	te[M13] = ty
	te[M20] = 0.0
	te[M21] = 0.0
	te[M22] = 1.0
	te[M23] = tz
	te[M30] = 0.0
	te[M31] = 0.0
	te[M32] = 0.0
	te[M33] = 1.0

	m.PostMultiply(tempM0)
}

// --------------------------------------------------------------------------
// Projections
// --------------------------------------------------------------------------

// SetToOrtho sets the matrix for a 2d ortho graphic projection
//  |M00 M01 M02 M03|
//  |M10 M11 M12 M13|
//  |M20 M21 M22 M23|
//  |M30 M31 M32 M33|
//
//  [M00,M10,M20,M30,M01,M11,M21,M31,M02,M12,M22,M32,M03,M13,M23,M33]
func (m *matrix4) SetToOrtho(left, right, bottom, top, near, far float32) {
	xorth := 2.0 / (right - left)
	yorth := 2.0 / (top - bottom)
	zorth := 2.0 / (near - far)

	tx := (right + left) / (left - right)
	ty := (top + bottom) / (bottom - top)
	tz := (far + near) / (far - near)

	m.e[M00] = xorth
	m.e[M10] = 0.0
	m.e[M20] = 0.0
	m.e[M30] = 0.0
	m.e[M01] = 0.0
	m.e[M11] = yorth
	m.e[M21] = 0.0
	m.e[M31] = 0.0
	m.e[M02] = 0.0
	m.e[M12] = 0.0
	m.e[M22] = zorth
	m.e[M32] = 0.0
	m.e[M03] = tx
	m.e[M13] = ty
	m.e[M23] = tz
	m.e[M33] = 1.0
}

// --------------------------------------------------------------------------
// Misc
// --------------------------------------------------------------------------

// Eq does an epsilon compare
func (m *matrix4) Eq(other api.IMatrix4) bool {
	eq := true
	o := other.Matrix()

	eq = eq && (m.e[M00] == o[M00])
	eq = eq && (m.e[M01] == o[M01])
	eq = eq && (m.e[M02] == o[M02])
	eq = eq && (m.e[M03] == o[M03])

	eq = eq && (m.e[M10] == o[M10])
	eq = eq && (m.e[M11] == o[M11])
	eq = eq && (m.e[M12] == o[M12])
	eq = eq && (m.e[M13] == o[M13])

	eq = eq && (m.e[M20] == o[M20])
	eq = eq && (m.e[M21] == o[M21])
	eq = eq && (m.e[M22] == o[M22])
	eq = eq && (m.e[M23] == o[M23])

	eq = eq && (m.e[M30] == o[M30])
	eq = eq && (m.e[M31] == o[M31])
	eq = eq && (m.e[M32] == o[M32])
	eq = eq && (m.e[M33] == o[M33])

	return eq
}

// C returns a cell value based on Mxx index
func (m *matrix4) C(i int) float32 {
	return m.e[i]
}

// Clone returns a clone of this matrix
func (m *matrix4) Clone() api.IMatrix4 {
	c := new(matrix4)
	c.Set(m)
	return c
}

// Set copies src into this matrix
func (m *matrix4) Set(src api.IMatrix4) {
	se := src.Matrix()

	m.e[M00] = se[M00]
	m.e[M01] = se[M01]
	m.e[M02] = se[M02]
	m.e[M03] = se[M03]

	m.e[M10] = se[M10]
	m.e[M11] = se[M11]
	m.e[M12] = se[M12]
	m.e[M13] = se[M13]

	m.e[M20] = se[M20]
	m.e[M21] = se[M21]
	m.e[M22] = se[M22]
	m.e[M23] = se[M23]

	m.e[M30] = se[M30]
	m.e[M31] = se[M31]
	m.e[M32] = se[M32]
	m.e[M33] = se[M33]
}

// ToIdentity set this matrix to the identity matrix
func (m *matrix4) ToIdentity() {
	m.e[M00] = 1.0
	m.e[M01] = 0.0
	m.e[M02] = 0.0
	m.e[M03] = 0.0

	m.e[M10] = 0.0
	m.e[M11] = 1.0
	m.e[M12] = 0.0
	m.e[M13] = 0.0

	m.e[M20] = 0.0
	m.e[M21] = 0.0
	m.e[M22] = 1.0
	m.e[M23] = 0.0

	m.e[M30] = 0.0
	m.e[M31] = 0.0
	m.e[M32] = 0.0
	m.e[M33] = 1.0
}

func (m *matrix4) Invert() bool {
	inv := tempM0.Matrix()

	inv[0] = m.e[5]*m.e[10]*m.e[15] -
		m.e[5]*m.e[11]*m.e[14] -
		m.e[9]*m.e[6]*m.e[15] +
		m.e[9]*m.e[7]*m.e[14] +
		m.e[13]*m.e[6]*m.e[11] -
		m.e[13]*m.e[7]*m.e[10]

	inv[4] = -m.e[4]*m.e[10]*m.e[15] +
		m.e[4]*m.e[11]*m.e[14] +
		m.e[8]*m.e[6]*m.e[15] -
		m.e[8]*m.e[7]*m.e[14] -
		m.e[12]*m.e[6]*m.e[11] +
		m.e[12]*m.e[7]*m.e[10]

	inv[8] = m.e[4]*m.e[9]*m.e[15] -
		m.e[4]*m.e[11]*m.e[13] -
		m.e[8]*m.e[5]*m.e[15] +
		m.e[8]*m.e[7]*m.e[13] +
		m.e[12]*m.e[5]*m.e[11] -
		m.e[12]*m.e[7]*m.e[9]

	inv[12] = -m.e[4]*m.e[9]*m.e[14] +
		m.e[4]*m.e[10]*m.e[13] +
		m.e[8]*m.e[5]*m.e[14] -
		m.e[8]*m.e[6]*m.e[13] -
		m.e[12]*m.e[5]*m.e[10] +
		m.e[12]*m.e[6]*m.e[9]

	inv[1] = -m.e[1]*m.e[10]*m.e[15] +
		m.e[1]*m.e[11]*m.e[14] +
		m.e[9]*m.e[2]*m.e[15] -
		m.e[9]*m.e[3]*m.e[14] -
		m.e[13]*m.e[2]*m.e[11] +
		m.e[13]*m.e[3]*m.e[10]

	inv[5] = m.e[0]*m.e[10]*m.e[15] -
		m.e[0]*m.e[11]*m.e[14] -
		m.e[8]*m.e[2]*m.e[15] +
		m.e[8]*m.e[3]*m.e[14] +
		m.e[12]*m.e[2]*m.e[11] -
		m.e[12]*m.e[3]*m.e[10]

	inv[9] = -m.e[0]*m.e[9]*m.e[15] +
		m.e[0]*m.e[11]*m.e[13] +
		m.e[8]*m.e[1]*m.e[15] -
		m.e[8]*m.e[3]*m.e[13] -
		m.e[12]*m.e[1]*m.e[11] +
		m.e[12]*m.e[3]*m.e[9]

	inv[13] = m.e[0]*m.e[9]*m.e[14] -
		m.e[0]*m.e[10]*m.e[13] -
		m.e[8]*m.e[1]*m.e[14] +
		m.e[8]*m.e[2]*m.e[13] +
		m.e[12]*m.e[1]*m.e[10] -
		m.e[12]*m.e[2]*m.e[9]

	inv[2] = m.e[1]*m.e[6]*m.e[15] -
		m.e[1]*m.e[7]*m.e[14] -
		m.e[5]*m.e[2]*m.e[15] +
		m.e[5]*m.e[3]*m.e[14] +
		m.e[13]*m.e[2]*m.e[7] -
		m.e[13]*m.e[3]*m.e[6]

	inv[6] = -m.e[0]*m.e[6]*m.e[15] +
		m.e[0]*m.e[7]*m.e[14] +
		m.e[4]*m.e[2]*m.e[15] -
		m.e[4]*m.e[3]*m.e[14] -
		m.e[12]*m.e[2]*m.e[7] +
		m.e[12]*m.e[3]*m.e[6]

	inv[10] = m.e[0]*m.e[5]*m.e[15] -
		m.e[0]*m.e[7]*m.e[13] -
		m.e[4]*m.e[1]*m.e[15] +
		m.e[4]*m.e[3]*m.e[13] +
		m.e[12]*m.e[1]*m.e[7] -
		m.e[12]*m.e[3]*m.e[5]

	inv[14] = -m.e[0]*m.e[5]*m.e[14] +
		m.e[0]*m.e[6]*m.e[13] +
		m.e[4]*m.e[1]*m.e[14] -
		m.e[4]*m.e[2]*m.e[13] -
		m.e[12]*m.e[1]*m.e[6] +
		m.e[12]*m.e[2]*m.e[5]

	inv[3] = -m.e[1]*m.e[6]*m.e[11] +
		m.e[1]*m.e[7]*m.e[10] +
		m.e[5]*m.e[2]*m.e[11] -
		m.e[5]*m.e[3]*m.e[10] -
		m.e[9]*m.e[2]*m.e[7] +
		m.e[9]*m.e[3]*m.e[6]

	inv[7] = m.e[0]*m.e[6]*m.e[11] -
		m.e[0]*m.e[7]*m.e[10] -
		m.e[4]*m.e[2]*m.e[11] +
		m.e[4]*m.e[3]*m.e[10] +
		m.e[8]*m.e[2]*m.e[7] -
		m.e[8]*m.e[3]*m.e[6]

	inv[11] = -m.e[0]*m.e[5]*m.e[11] +
		m.e[0]*m.e[7]*m.e[9] +
		m.e[4]*m.e[1]*m.e[11] -
		m.e[4]*m.e[3]*m.e[9] -
		m.e[8]*m.e[1]*m.e[7] +
		m.e[8]*m.e[3]*m.e[5]

	inv[15] = m.e[0]*m.e[5]*m.e[10] -
		m.e[0]*m.e[6]*m.e[9] -
		m.e[4]*m.e[1]*m.e[10] +
		m.e[4]*m.e[2]*m.e[9] +
		m.e[8]*m.e[1]*m.e[6] -
		m.e[8]*m.e[2]*m.e[5]

	det := m.e[0]*inv[0] + m.e[1]*inv[4] + m.e[2]*inv[8] + m.e[3]*inv[12]

	if det == 0 {
		return false
	}

	det = 1.0 / det

	for i := 0; i < 16; i++ {
		m.e[i] = inv[i] * det
	}

	return true
}
func (m matrix4) String() string {
	s := fmt.Sprintf("[%7.3f, %7.3f, %7.3f, %7.3f]\n", m.e[M00], m.e[M01], m.e[M02], m.e[M03])
	s += fmt.Sprintf("[%7.3f, %7.3f, %7.3f, %7.3f]\n", m.e[M10], m.e[M11], m.e[M12], m.e[M13])
	s += fmt.Sprintf("[%7.3f, %7.3f, %7.3f, %7.3f]\n", m.e[M20], m.e[M21], m.e[M22], m.e[M23])
	s += fmt.Sprintf("[%7.3f, %7.3f, %7.3f, %7.3f]", m.e[M30], m.e[M31], m.e[M32], m.e[M33])
	return s
}

repository: wdevore/SimpleOpenGL-Go

repo_name: wdevore/SimpleOpenGL-Go


text:
package main

import "strings"

func groomCustomerData(customer *CUSTOMER) {

	customer.FirstName = strings.TrimSpace(customer.FirstName)
	customer.LastName = strings.TrimSpace(customer.LastName)
	customer.CustomerID = strings.TrimSpace(customer.CustomerID)
	customer.Email = strings.TrimSpace(customer.Email)

	for i, phoneNumber := range customer.PhoneNumbers {
		customer.PhoneNumbers[i] = strings.TrimSpace(phoneNumber)
	}

	customer.Password = strings.TrimSpace(customer.Password)

	for i, address := range customer.AddressBook {

		customer.AddressBook[i].FirstName = strings.TrimSpace(address.FirstName)
		customer.AddressBook[i].LastName = strings.TrimSpace(address.LastName)
		customer.AddressBook[i].AddressLineOne = strings.TrimSpace(address.AddressLineOne)
		customer.AddressBook[i].AddressLineTwo = strings.TrimSpace(address.AddressLineTwo)
		customer.AddressBook[i].City = strings.TrimSpace(address.City)
		customer.AddressBook[i].State = strings.TrimSpace(address.State)
		customer.AddressBook[i].Country = strings.TrimSpace(address.Country)
		customer.AddressBook[i].Pincode = strings.TrimSpace(address.Pincode)

	}

	for i, paymentOption := range customer.PaymentOptions {

		customer.PaymentOptions[i].Name = strings.TrimSpace(paymentOption.Name)
		customer.PaymentOptions[i].CardNumber = strings.TrimSpace(paymentOption.CardNumber)
		customer.PaymentOptions[i].CardExpiryMM = strings.TrimSpace(paymentOption.CardExpiryMM)
		customer.PaymentOptions[i].CardExpiryYY = strings.TrimSpace(paymentOption.CardExpiryYY)
		customer.PaymentOptions[i].SecurityCode = strings.TrimSpace(paymentOption.SecurityCode)
		customer.PaymentOptions[i].ZipCode = strings.TrimSpace(paymentOption.ZipCode)

	}

	return

}

repository: viveknarang/krama-AI

repo_name: viveknarang/krama-AI

gha_language: Go


text:
package initcards

import (
	"github.com/golang/glog"
	"landlords/helper/conv"
	"math/rand"
	"time"
)

var cards = make([]string, 54)

//初始化一副牌
func InitNewCards() {
	start := 0
	for i := 3; i <= 16; i++ {
		if i == 16 {
			//大小王
			cards[start] = "Q88"
			cards[start+1] = "K99"
		} else {
			cards[start] = "A" + conv.FormatInt(i)
			cards[start+1] = "B" + conv.FormatInt(i)
			cards[start+2] = "C" + conv.FormatInt(i)
			cards[start+3] = "D" + conv.FormatInt(i)
			start += 4
		}
	}
	glog.Info("初始化牌完成")
}

func ShuffCards() []string {
	r := rand.New(rand.NewSource(time.Now().UnixNano()))
	n := len(cards)
	for n > 0 {
		randIndex := r.Intn(n)
		cards[n-1], cards[randIndex] = cards[randIndex], cards[n-1]
		n--
	}
	return cards
}

repository: Jun-Gin/landlords

repo_name: Jun-Gin/landlords


text:
package main

import (
	"encoding/json"
	"gopkg.in/olivere/elastic.v3"
	"log"
	"net/url"
	"os"
	"time"
)

// ElasticsearchTextClient is the ES client to the main index.
var ElasticsearchTextClient *elastic.Client

// ElasticsearchDocsClient is the ES client to the document store.
var ElasticsearchDocsClient *elastic.Client

// ElasticsearchConnect sets up persistent connections to both ES servers.
func ElasticsearchConnect() {

	ElasticsearchTextClient = ElasticsearchConnectServer(Config.ElasticsearchText)

	ElasticsearchDocsClient = ElasticsearchConnectServer(Config.ElasticsearchDocs)

}

// ElasticsearchConnectServer connects one single client to its ES server.
func ElasticsearchConnectServer(url string) *elastic.Client {

	client, err := elastic.NewClient(
		elastic.SetSniff(false),
		elastic.SetURL(url),
		elastic.SetHealthcheck(false),
		elastic.SetSniff(false),
		elastic.SetErrorLog(log.New(os.Stderr, "ELASTIC: ", log.LstdFlags)))

	// elastic.SetTraceLog(log.New(os.Stderr, "ELASTIC: ", log.LstdFlags)),
	// elastic.SetInfoLog(log.New(os.Stdout, "", log.LstdFlags))

	if err != nil {
		// Don't panic, this might be a temporary failure.
		log.Println("Connection to Elasticsearch failed:", err)
	}

	// We must do this to allow having an unconnected client instance,
	// and throw proper errors instead of panicking at startup.
	client.Stop()
	_ = elastic.SetHealthcheck(true)(client)
	_ = elastic.SetSniff(true)(client)
	client.Start()

	return client

}

// ElasticsearchRequest sends a POST request to an ES server and parses the returned JSON.
func ElasticsearchRequest(client *elastic.Client, path string, body string) (*elastic.SearchResult, time.Duration, error) {

	if client == nil {
		return nil, 0, elastic.ErrNoClient
	}

	// This is measured on our side in addition to the ElasticSearch-provided SearchResult.TookInMillis
	// It is a good measure of the network & deserialization overhead.
	start := time.Now()

	params := make(url.Values)
	res, err := client.PerformRequest("POST", path, params, body)
	if err != nil {
		return nil, time.Since(start), err
	}

	ret := new(elastic.SearchResult)

	if err := json.Unmarshal(res.Body, ret); err != nil {
		return nil, time.Since(start), err
	}
	return ret, time.Since(start), nil
}

repository: aleph-zero/cosr-front

repo_name: aleph-zero/cosr-front


text:
---
---

@unpublished{goemans2023counterexample,
  bibtex_show={true},
  title={A Counterexample to Box-Half-Integrality of the Intersection of Crossing Submodular Flow Systems},
  author={Goemans, Michel X. and Pan, Yuchong},
  year={2023},
  pdf={goemans2023counterexample.pdf},
  selected={true}
}

extension: bib


text:
if(MSVC)
  set(example_compile_flags "-D_CRT_SECURE_NO_WARNINGS")
else()
  set(function_test_compile_flags "")
endif(MSVC)

function(add_no_run_example name)
  add_executable(example-${name}
    EXCLUDE_FROM_ALL
    ${ARGN}
  )

  set_target_properties(example-${name}
    PROPERTIES
    BUILD_RPATH "${CMAKE_CURRENT_BINARY_DIR}"
    COMPILE_FLAGS "${example_compile_flags}"
  )

  target_link_libraries(example-${name}
    stumpless
  )

  target_include_directories(example-${name}
    PRIVATE
    ${PROJECT_SOURCE_DIR}/include
    ${CMAKE_BINARY_DIR}/include
  )
endfunction(add_no_run_example)

macro(add_example name)
  add_no_run_example(${name} ${ARGN})

  list(APPEND STUMPLESS_EXAMPLE_RUNNERS run-example-${name})
  add_custom_target(run-example-${name}
    COMMAND "example-${name}"
    DEPENDS example-${name}
  )
endmacro(add_example)

repository: goatshriek/stumpless

repo_name: goatshriek/stumpless

branch_name: refs/heads/latest

gha_language: C

extension: cmake


text:
@InProceedings{wu16,
  supplementary = {Supplementary:wu16-supp.zip},
  title = {Conservative Bandits},
  author = {Yifan Wu and Roshan Shariff and Tor Lattimore and Csaba Szepesvari},
  pages = {1254-1262},
  abstract = {We study a novel multi-armed bandit problem that models the challenge faced by a company wishing to explore new strategies to maximize revenue whilst simultaneously maintaining their revenue above a fixed baseline, uniformly over time. While previous work addressed the problem under the weaker requirement of maintaining the revenue constraint only at a given fixed time in the future, the design of those algorithms makes them unsuitable under the more stringent constraints. We consider both the stochastic and the adversarial settings, where we propose natural yet novel strategies and analyze the price for maintaining the constraints. Amongst other things, we prove both high probability and expectation bounds on the regret, while we also consider both the problem of maintaining the constraints with high probability or expectation. For the adversarial setting the price of maintaining the constraint appears to be higher, at least for the algorithm considered. A lower bound is given showing that the algorithm for the stochastic setting is almost optimal. Empirical results obtained in synthetic environments complement our theoretical findings.},
}

repository: mreid/papersite

repo_name: mreid/papersite

gha_language: TeX


text:
DESCRIPTION = "FFI bindings to libudev"
HOMEPAGE = "https://github.com/dcuddeback/libudev-sys"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=bbd2acd29c4ba5d4591b03e2757c04a3"
DEPENDS = "libc-rs udev"

inherit rust-bin

SRC_URI = "git://github.com/dcuddeback/libudev-sys.git;protocol=https"
SRCREV = "14c24afc61e3315dffddab2c7f36999a16a002d8"

S = "${WORKDIR}/git"

RUSTC_FLAGS += "-ludev"

do_compile () {
	oe_compile_rust_lib
}

do_install () {
	oe_install_rust_lib
}

repository: agherzan/meta-rust

repo_name: agherzan/meta-rust


text:
package main

import(
  "log"
  "net/http"
  "os"
  "encoding/json"
  "fmt"
)

type Response struct {
  RouteDesc string
  StopDesc string
  List []struct {
    Sched string
    Est string
  }
}

func printResults(r Response) {
  fmt.Println("Route:", r.RouteDesc)
  fmt.Println("Stop:", r.StopDesc)
  if len(r.List) > 0 {
    for i, list := range r.List {
      fmt.Printf("Trip #%d\n", i+1)
      fmt.Printf("\tScheduled Time: %s\n", list.Sched)
      fmt.Printf("\tEstimated Time: %s\n", list.Est)
    }
  } else {
    fmt.Println("No available trips found")
  }
}

func checkArgs(args []string) {
  if len(args) < 2 {
    log.Fatal("Usage: cm-nextbus StopID")
  }
}

func main() {

  checkArgs(os.Args)

  stopID := os.Args[1]

  url := "http://www.capmetro.org/planner/s_nextbus2.asp?stopid=" + stopID + "&opt=2"

  resp, err := http.Get(url)
  if err != nil {
    log.Fatal(err)
  }

  if resp.StatusCode != http.StatusOK {
    log.Fatal(resp.Status)
  }

  r := new(Response)
  err = json.NewDecoder(resp.Body).Decode(r)

  if err != nil {
    log.Fatal(err)
  }

  printResults(*r)
}

repository: rkrdo/nextbus

repo_name: rkrdo/nextbus


text:
%-  BibTeX "database" file

%-  bibliography.bib ~~
%
%   This is based on the one our group used for the eScience 2017 paper.
%
%                                                   ~~ last updated 18 Jan 2019

@inproceedings{cug-2016,
    title     = {Executing dynamic heterogeneous workloads on {Blue Waters} with {RADICAL-P}ilot},
    author    = {Mark Santcroos and Ralph Castain and Andre Merzky and Iain Bethune and Shantenu Jha},
    booktitle = {Cray User Group 2016},
    year      = {2016},
    pages={1--14}
}
@InProceedings{castain05:_open_rte,
  author={R. H. Castain and T. S. Woodall and D. J. Daniel and J. M. Squyres and B. Barrett and G .E. Fagg},
  title={The Open Run-Time Environment ({OpenRTE}): A Transparent Multi-Cluster Environment for High-Performance Computing},
  booktitle    = {Proc. 12th European PVM/MPI Users' Group Meeting},
  year	       = 2005,
  pages = {225--232}
}

@techreport{Alice1995,
  title={ALICE Technical Proposal for A Large Ion Collider Experiment at the {CERN LHC}},
  year={1995},
  institution={CERN/LHCC/95-71}
}

@online{oral2013olcf,
  title={{OLCF}’s 1 {TB}/s, next-generation lustre file system},
  author={Oral, Sarp and Dillow, David A and Fuller, Douglas and Hill, Jason and Leverman, Dustin and Vazhkudai, Sudharshan S and Wang, Feiyi and Kim, Youngjae and Rogers, James and Simmons, James and others},
  booktitle={Proc. {CUG}},
  year={2013}
}

@inproceedings{titan,
  Author = {Bland, Arthur S. and Wells, Jack C. and Messer, Otis E. and Hernandez, Oscar R. and Rogers, James H.},
  Booktitle = {Proc. {CUG}},
  Title = {Titan: Early experience with the {Cray XK6 at Oak Ridge National Laboratory}},
  Year = {2012}
}

@misc{top500,
  Author = {Jack Dongarra and Hans Meuer and Erich Strohmaier},
  Howpublished = {\url{http://www.top500.org}},
  Title = {Top500 Supercomputing Sites},
  Year = {2016}
}

@misc{lustre,
  Author = {Intel Inc.},
  Howpublished = {\url{http://lustre.org/getting-started-with-lustre/}},
  Title = {Lustre File System, Getting Started with Lustre},
  Year = {2016}
}

@techreport{Pacini2006,
  author={Pacini, F and Maraschini, A},
  title={Job description language ({JDL}) attributes specification},
  year={2006},
  institution={Tech. Rep. 590869}
}

@article{Sfiligoi2008,
  author={Sfiligoi, I},
  journal={J. Phys.: Conf. Ser.},
  number={6},
  pages={062044},
  title={glidein{WMS}—a generic pilot-based workload management system},
  volume={119},
  year={2008}
}

@article{Aad:2008,
  author={Aad, G. and others},
  title={The {ATLAS} Experiment at the {CERN} Large Hadron Collider},
  collaboration={ATLAS},
  journal={JINST},
  volume={3},
  year={2008},
  pages={S08003},
}

@article{Bagnasco2004,
  author={Bagnasco, S and Betev, L and Buncic, P and Carminati, F and Furano, F and Grigoras, A and Grigoras, C and Lorenzo, P Mendez and Peters, A J and Saiz, P},
  journal={J. Phys.: Conf. Ser.},
  pages={062004},
  title={The {ALICE} Workload Management System: Status before the real data taking},
  volume={219},
  number={6},
  year={2010}
}

@article{Paterson2010,
  author={Paterson, Stuart and Closier, Joel and Team, the Lhcb Dirac},
  title={Performance of combined production and analysis {WMS} in {DIRAC}},
  journal={J. Phys.: Conf. Ser.},
  pages={072015},
  volume={219},
  number={7},
  year={2010}
}

@article{Casajus2010,
  author={Adrian Casajus and Ricardo Graciani and Stuart Paterson and Andrei Tsaregorodtsev and the Lhcb Dirac Team},
  title={{DIRAC} pilot framework and the {DIRAC} Workload Management System},
  journal={J. Phys.: Conf. Ser.},
  volume={219},
  number={6},
  pages={062049},
  year={2010},
}

@article{Tsaregorodtsev2006,
  author={Tsaregorodtsev, Andrei and Brook, Nicholas and Sanchez, Manuel and   Smith, Andrew Cameron and Stokes-Rees, Ian and Casajus, Adria and Charpentier, Philippe and Closier, Joel and Garonne, Vincent and Graciani, Ricardo and Kuznetsov, Gennady and Paterson, Stuart and Saborido Silva, Juan},
  title={{DIRAC}, the {LHCb} Data Production and Distributed Analysis ystem},
  year={2006},
  reportNumber={LHCb-TALK-2006-014},
}

@inproceedings{Tsaregorodtsev2004,
  author = {Tsaregorodtsev, Andrei and Garonne, Vincent and Stokes-Rees, Ian},
  title = {{DIRAC}: A Scalable Lightweight Architecture for High Throughput Computing},
  booktitle = {Proc. 5th {IEEE/ACM} IWGC},
  series = {GRID '04},
  year = {2004},
  pages = {19--25},
}

@article{Saiz2003,
  author  = {Pablo Saiz and
         Predrag Buncic and
         Andreas J. Peters},
  title   = {{AliEn} Resource Brokers},
  journal   = {CoRR},
  volume  = {cs.DC/0306068},
  year    = {2003},
}

@article{Bagnasco2010,
  author    = {Bagnasco, S and Betev, L and Buncic, P and Carminati, F
             and Furano, F and Grigoras, A and Grigoras, C and
             Mendez-Lorenzo, P and Peters, A J and Saiz, P},
  title     = {The {ALICE} workload management system: Status before the
           real data taking},
  journal     = {J. Phys.: Conf. Ser.},
  volume    = 219,
  pages     = {062004. 6p},
  year      = 2010,
}

@inproceedings{jones2008atlas,
  title={The {ATLAS} computing model},
  author={Jones, Roger and Barberis, Dario},
  booktitle={J. Phys.: Conf. Ser.},
  volume={119},
  issue={7},
  pages={072020},
  year={2008}
}

@article{McClatechey2003,
  author  = {Richard McClatchey and
         Predrag Buncic and
         David Manset and
         Tamas Hauer and
         Florida Estrella and
         Pablo Saiz and
         Dmitri Rogulin},
  title   = {The {MammoGrid} Project Grids Architecture},
  journal   = {MOAT005},
  volume  = {cs.DC/0306095},
  year    = {2003},
}

@article{GPCALMA,
  author  = {Cerello, P and Cheram, S and Lopez Torres, E and GPCALMA Project and Alice Collaboration},
  title   = {Use of {HEP} software for medical applications},
  journal   = {MOCT007},
}

@book{foster2003grid,
  title={The Grid 2: Blueprint for a new computing infrastructure},
  author={Foster, Ian and Kesselman, Carl},
  year={2003},
  publisher={Elsevier},
  address={Amsterdam, Netherlands}
}

@article{Maeno2011,
  author={Maeno, T},
  title={Overview of {ATLAS PanDA} workload management},
  journal={J. Phys.: Conf. Ser},
  volume={331},
  number={7},
  pages={072024},
  year={2011}
}

@article{Nilsson2010,
  author={Nilsson P.},
  title={The {ATLAS PanDA} Pilot in Operation},
  journal={Proc. 18th CHEP},
  year={2010}
}

@article{SAGA,
  title={The {SAGA} Framework website \url{http://saga-project.github.io}}
}

@inproceedings{garonne2012atlas,
  title={The atlas distributed data management project: Past and future},
  author={Garonne, Vincent and Stewart, Graeme A and Lassnig, Mario and Molfetas, Angelos and Barisits, Martin and Beermann, Thomas and Nairz, Armin and Goossens, Luc and Megino, Fernando Barreiro and Serfon, Cedric and others},
  booktitle={J. Phys.: Conf. Ser.},
  volume={396},
  issue={3},
  pages={032045},
  year={2012},
}

@inproceedings{caballero2012autopyfactory,
  title={{AutoPyFactory}: a scalable flexible pilot factory implementation},
  author={Caballero, J and Hover, J and Love, P and Stewart, GA},
  booktitle={J. Phys.: Conf. Ser.},
  volume={396},
  issue={3},
  pages={032016},
  year={2012},
}

@article{frey2002condor,
  title={{Condor-G}: A computation management agent for multi-institutional grids},
  author={Frey, James and Tannenbaum, Todd and Livny, Miron and Foster, Ian and Tuecke, Steven},
  journal={Cluster Computing},
  volume={5},
  number={3},
  pages={237--246},
  year={2002},
}

@inproceedings{klimentov2011atlas,
  title={The {ATLAS PanDA} Monitoring System and its Evolution},
  author={Klimentov, A and Nevski, P and Potekhin, M and Wenaus, T},
  booktitle={J. Phys.: Conf. Ser.},
  volume={331},
  issue={7},
  pages={072058},
  year={2011},
}

@inproceedings{borodin2015scaling,
  title={Scaling up {ATLAS} production system for the {LHC} Run 2 and beyond: project {ProdSys2}},
  author={Borodin, Mikhail and De, K and Garcia, J and Golubkov, Dmitry and Klimentov, A and Maeno, T and Vaniachine, A and others},
  booktitle={J. Phys.: Conf. Ser.},
  volume={664},
  issue={6},
  pages={062005},
  year={2015},
}

@online{borodin2015unified,
  title={Unified System for Processing Real and Simulated Data in the {ATLAS} Experiment},
  author={Borodin, Mikhail and De, Kaushik and Navarro, Jose Garcia and Golubkov, Dmitry and Klimentov, Alexei and Maeno, Tadashi and South, David and others},
  year={2015},
  archivePrefix={arXiv},
  eprint={1508.07174},
}

@online{de2013delphes,
  title={{DELPHES} 3, A modular framework for fast simulation of a generic collider experiment},
  author={De Favereau, J and Delaere, C and Demin, P and Giammanco, A and Lema{\^\i}tre, V and Mertens, A and Selvaggi, M},
  year={2013},
  archivePrefix={arXiv},
  eprint={1307.6346},
}

@inproceedings{rimoldi2006atlas,
  title={Atlas Detector Simulation: Status and Outlook},
  author={Rimoldi, A and Dell'Acqua, A and di Simone, A and Gallas, M and Nairz, A and Boudreau, J and Tsulaia, V and Costanzo, D},
  booktitle={Astroparticle, Particle and Space Physics, Detectors and Medical Physics Applications},
  volume={1},
  pages={551--555},
  year={2006}
}

@phdthesis{ritsch2014atlas,
  title={{ATLAS} Detector Simulation in the Integrated Simulation Framework applied to the {W Boson} Mass Measurement},
  author={Ritsch, Elmar},
  year={2014},
  school={Innsbruck U.}
}

@article{sjostrand2006pythia,
  title={PYTHIA 6.4 physics and manual},
  author={Sj{\"o}strand, Torbj{\"o}rn and Mrenna, Stephen and Skands, Peter},
  journal={Journal of High Energy Physics},
  volume={2006},
  number={05},
  pages={026},
  year={2006},
}

@article{corcella2001herwig,
  title={{HERWIG} 6: an event generator for hadron emission reactions with interfering gluons (including supersymmetric processes)},
  author={Corcella, Gennaro and Knowles, Ian G and Marchesini, Giuseppe and Moretti, Stefano and Odagiri, Kosuke and Richardson, Peter and Seymour, Michael H and Webber, Bryan R},
  journal={Journal of High Energy Physics},
  volume={2001},
  number={01},
  pages={010},
  year={2001},
}

@article{agostinelli2003geant4,
  title={{GEANT4—a} simulation toolkit},
  author={Agostinelli, Sea and Allison, John and Amako, K al and Apostolakis, J and Araujo, H and Arce, P and Asai, M and Axen, D and Banerjee, S and Barrand, G and others},
  journal={Nuclear instruments and methods in physics research section A: Accelerators, Spectrometers, Detectors and Associated Equipment},
  volume={506},
  number={3},
  pages={250--303},
  year={2003},
}

@article{aad2010atlas,
  title={The {ATLAS} simulation infrastructure},
  author={Aad, Georges and Abbott, B and Abdallah, J and Abdelalim, AA and Abdesselam, A and Abdinov, O and Abi, B and Abolins, M and Abramowicz, H and Abreu, H and others},
  journal={The European Physical Journal C},
  volume={70},
  number={3},
  pages={823--874},
  year={2010},
}

@inproceedings{marco2009glite,
  title={The {G-LITE} workload management system},
  author={Marco, Cecchi and Fabio, Capannini and Alvise, Dorigo and Antonia, Ghiselli and Francesco, Giacomini and Alessandro, Maraschini and Moreno, Marzolla and Salvatore, Monforte and Luca, Petronzio and Francesco, Prelz},
  booktitle={International Conference on Grid and Pervasive Computing},
  pages={256--268},
  year={2009},
}

@inproceedings{sfiligoi2008glideinwms,
  title={glideinWMS—a generic pilot-based workload management system},
  author={Sfiligoi, Igor},
  booktitle={J. Phys.: Conf. Ser.},
  volume={119},
  issue={6},
  pages={062044},
  year={2008}
}

@inproceedings{maeno2014evolution,
  title={Evolution of the {ATLAS PanDA} workload management system for exascale computational science},
  author={Maeno, T and De, K and Klimentov, A and Nilsson, P and Oleynik, D and Panitkin, S and Petrosyan, A and Schovancova, J and Vaniachine, A and Wenaus, T and others},
  booktitle={J. Phys.: Conf. Ser.},
  volume={513},
  issue={3},
  pages={032062},
  year={2014}
}

@article{thain2005distributed,
  title={Distributed computing in practice: the {Condor} experience},
  author={Thain, Douglas and Tannenbaum, Todd and Livny, Miron},
  journal={Concurrency and computation: practice and experience},
  volume={17},
  number={2-4},
  pages={323--356},
  year={2005}
}

@inproceedings{crooks2012multi,
  title={Multi-core job submission and grid resource scheduling for {ATLAS AthenaMP}},
  author={Crooks, D and Calafiura, P and Harrington, R and Jha, M and Maeno, T and Purdie, S and Severini, H and Skipsey, S and Tsulaia, V and Walker, R and others},
  booktitle={J. Phys.: Conf. Ser.},
  volume={396},
  issue={3},
  pages={032115},
  year={2012}
}

@online{radical-saga_url,
  author={{RADICAL} Team},
  year={2017},
  title={{RADICAL-SAGA} Software Toolkit},
  url={https://github.com/radical-cybertools/radical-saga},
  lastaccessed={March 21, 2017},
}

@online{panda-wiki_url,
  author={ATLAS PanDA Team},
  year={2017},
  title={The {PanDA} Production and Distributed Analysis System},
  url={https://twiki.cern.ch/twiki/bin/view/PanDA/PanDA},
  lastaccessed={March 25, 2017},
}

@misc{goodale2008simple,
  title={A Simple {API} for Grid Applications ({SAGA}). {OGF} Document Series 90},
  author={Goodale, T and Jha, S and Kaiser, H and Kielmann, T and al Kleijer, P and Merzky, A and Shalf, J and Smith, C},
  year={2008}
}

@inproceedings{calafiura2015atlas,
  title={The {ATLAS} Event Service: A new approach to event processing},
  author={Calafiura, Paolo and De, K and Guan, W and Maeno, T and Nilsson, P and Oleynik, D and Panitkin, S and Tsulaia, V and Van Gemmeren, P and Wenaus, T},
  booktitle={J. Phys.: Conf. Ser.},
  volume={664},
  issue={6},
  pages={062065},
  year={2015}
}

@inproceedings{maeno2011overview,
  title={Overview of {ATLAS PanDA} workload management},
  author={Maeno, Tadashi and De, K and Wenaus, T and Nilsson, P and Stewart, GA and Walker, R and Stradling, A and Caballero, J and Potekhin, M and Smith, D and others},
  booktitle={J. Phys.: Conf. Ser.},
  volume={331},
  issue={7},
  pages={072024},
  year={2011}
}

@inproceedings{nilsson2011atlas,
  title={The {ATLAS PanDA} pilot in operation},
  author={Nilsson, P and Caballero, J and De, K and Maeno, T and Stradling, A and Wenaus, T and Atlas Collaboration and others},
  booktitle={J. Phys.: Conf. Ser.},
  volume={331},
  issue={6},
  pages={062040},
  year={2011}
}

@techreport{barker2016us,
  title={High Performance Computing Facility Operational Assessment 2015: Oak Ridge Leadership Computing Facility},
  author={Ashley D. Barker and  David E. Bernholdt and Arthur S. Bland and  Jeff D. Gary and James J. Hack and Stephen T. McNally and James H. Rogers and Brian Smith and T.P. Straatsma  and Sreenivas R. Sukumar  and Kevin G. Thach  and Suzy Tichenor  and Sudharshan S. Vazhkudai  and Jack C. Wells},
  number={ORNL/SPR--2016/110},
  url={http://www.osti.gov/scitech/servlets/purl/1324094}, DOI={10.2172/1324094},
  year={2016},
  month={Mar},
  institution={Oak Ridge National Laboratory (ORNL), Oak Ridge, TN (United States). Oak Ridge Leadership Computing Facility (OLCF)}
}

@online{maui_backfill_url,
  author={Adaptive Computing Enterprises, Inc},
  year={2014},
  title={Maui Scheduler Administrator's Guide: Backfill},
  url={http://docs.adaptivecomputing.com/maui/8.2backfill.php},
  lastaccessed={Apr 2, 2017},
}

@online{hepcloud,
  author = {Gabriele Garzoglio and Burt Holzman},
  year={2016},
  title = {{HEP C}loud: How to add thousands of computers to your data center},
  url =  {https://goo.gl/IP8Jqi},
  lastaccessed={Apr 3, 2017},
}

@online{googlehep,
  author = "Paul Rossman",
  year={2016},
  title = "Google {C}loud, {HEP C}loud and probing the nature of {N}ature",
  url={https://goo.gl/MLKjsv},
  lastaccessed={Apr 3, 2017},
}

@online{foap-url,
  author={Argonne National Laboratory, Argonne National Laboratory},
  year={2017},
  title={Future Online Analysis Platform: BUILDING A RESEARCH ROADMAP FOR FUTURE SCIENCE PLATFORMS},
  url={https://press3.mcs.anl.gov/futureplatform/},
  lastaccessed={Apr 3, 2017},
}

@online{bw-sucks,
  author = "XDMoD - Blue Waters",
  title = "XDMoD - Blue Waters",
  url={http://xdmod.ncsa.illinois.edu/\#tg_usage:statistic_Jobs_none_utilization},
  year={2017},
  lastaccessed={Apr 3, 2017},
}

@techreport{barreiro2016panda,
  title={{PanDA} for {ATLAS} Distributed Computing in the Next Decade},
  author={Barreiro Megino, Fernando Harald and Padolski, Siarhei and Oleynik, Danila and Maeno, Tadashi and Panitkin, Sergey and De, Kaushik and Wenaus, Torre and Klimentov, Alexei and Nilsson, Paul},
  year={2016},
  number={ATL-COM-SOFT-2016-049},
  institution={The ATLAS collaboration},
}

@inproceedings{belyaev2015integration,
  title={Integration of Russian Tier-1 Grid Center with High Performance Computers at {NRC-KI} for {LHC} experiments and beyond {HENP}},
  author={Belyaev, A and Berezhnaya, A and Betev, L and Buncic, P and De, K and Drizhuk, D and Klimentov, A and Lazin, Y and Lyalin, I and Mashinistov, R and others},
  booktitle={J. Phys.: Conf. Ser.},
  volume={664},
  issue={9},
  pages={092018},
  year={2015}
}

@article{foster2001anatomy,
  title={The anatomy of the grid: Enabling scalable virtual organizations},
  author={Foster, Ian and Kesselman, Carl and Tuecke, Steven},
  journal={International journal of high performance computing applications},
  volume={15},
  number={3},
  pages={200--222},
  year={2001}
}

@inproceedings{Babich:2010:PQL:1884643.1884695,
  author = {Babich, Ronald and Clark, Michael A. and Jo\'{o}, B\'{a}lint},
  title = {Parallelizing the QUDA Library for Multi-GPU Calculations in Lattice Quantum Chromodynamics},
  booktitle = {Proceedings of the 2010 ACM/IEEE International Conference for High Performance Computing, Networking, Storage and Analysis},
  series = {SC '10},
  year = {2010},
  isbn = {978-1-4244-7559-9},
  pages = {1--11},
  numpages = {11},
  url = {https://doi.org/10.1109/SC.2010.40},
  doi = {10.1109/SC.2010.40},
  acmid = {1884695},
  publisher = {IEEE Computer Society},
  address = {Washington, DC, USA},
}

% nEDM
@article{Sakharov:1967dj,
      author         = "Sakharov, A. D.",
      title          = "{Violation of CP Invariance, C asymmetry, and baryon
                        asymmetry of the universe}",
      journal        = "Pisma Zh. Eksp. Teor. Fiz.",
      volume         = "5",
      year           = "1967",
      pages          = "32-35",
      doi            = "10.1070/PU1991v034n05ABEH002497",
      note           = "[Usp. Fiz. Nauk161,no.5,61(1991)]",
      SLACcitation   = "%%CITATION = ZFPRA,5,32;%%"
}

@article{0954-3899-36-10-104002,
  author={S K Lamoreaux and R Golub},
  title={Experimental searches for the neutron electric dipole moment},
  journal={Journal of Physics G: Nuclear and Particle Physics},
  volume={36},
  number={10},
  pages={104002},
  url={http://stacks.iop.org/0954-3899/36/i=10/a=104002},
  year={2009},
  abstract={The possible existence of a neutron electric dipole (EDM) was put forward as an experimental question in 1949, 60 years ago, and still remains an outstanding question in modern physics. A review of the technical innovations that allowed for improving the experimental limit by nearly eight orders of magnitude (approximately a decade per decade) will be presented, along with a discussion of the prospects for further improvement.}
}

% GridPP
@article{0954-3899-32-1-N01,
  author={The GridPP Collaboration  and P J W Faulkner and L S Lowe and C L A Tan and P M Watkins and D S Bailey and T A Barrass and N H
Brook and R J H Croft and M P Kelly and C K Mackay and S Metson and O J E Maroney and D M Newbold and F F Wilson and P R Hobson and A
Khan and P Kyberd and J J Nebrensky and M Bly and C Brew and S Burke and R Byrom and J Coles and L A Cornwall and A Djaoui and L Field and S M
Fisher and G T Folkes and N I Geddes and J C Gordon and S J C Hicks and J G Jensen and G Johnson and D Kant and D P Kelsey and G
Kuznetsov and J Leake and R P Middleton and G N Patrick and G Prassas and B J Saunders and D Ross and R A Sansum and T Shah and B
Strong and O Synge and R Tam and M Thorpe and S Traylen and J F Wheeler and N G H White and A J Wilson and I Antcheva and E Artiaga and J
Beringer and I G Bird and J Casey and A J Cass and R Chytracek and M V Gallas Torreira and J Generowicz and M Girone and G Govi and F
Harris and M Heikkurinen and A Horvath and E Knezo and M Litmaath and M Lubeck and J Moscicki and I Neilson and E Poinsignon and W
Pokorski and A Ribon and Z Sekera and D H Smith and W L Tomlin and J E van Eldik and J Wojcieszuk and F M Brochu and S Das and K
Harrison and M Hayes and J C Hill and C G Lester and M J Palmer and M A Parker and M Nelson and M R Whalley and E W N Glover and P
Anderson and P J Clark and A D Earl and A Holt and A Jackson and B Joo and R D Kenway and C M Maynard and J Perry and L Smith and S Thorn and A
S Trew and W H Bell and M Burgon-Lyon and D G Cameron and A T Doyle and A Flavell and S J Hanlon and D J Martin and G McCance and A P
Millar and C Nicholson and S K Paterson and A Pickford and P Soler and F Speirs and R St Denis and A S Thompson and D Britton and W
Cameron and D Colling and G Davies and P Dornan and U Egede and K Georgiou and P Lewis and B MacEvoy and S Marr and J Martyniak and H
Tallini and S Wakefield and R Walker and I A Bertram and E Bouhova-Thacker and D Evans and R C W Henderson and R W L Jones and P
Love and S Downing and M P George and A C Irving and C McNeile and Z Sroczynski and M Tobin and A J Washbrook and R J Barlow and S
Dallison and G Fairey and A Forti and R E Hughes-Jones and M A S Jones and S Kaushal and R Marshall and A McNab and S Salih and J C
Werner and V Bartsch and C Cioffi and P Gronbech and N Harnew and J F Harris and B T Huffman and M Leslie and I McArthur and R Newman and A
Soroko and I Stokes-Rees and S Stonjek and J Tseng and D Waters and G Wilkinson and T R Arter and R A Cordenonsi and A S Datta and T
Hartin and S L Lloyd and A J Martin and S E Pearce and C J Williams and M Gardner and S George and B J Green and S Johal and G Rybkine and J
A Strong and P Teixeira-Dias and P Hodgson and M Robinson and D R Tovey and N J C Spooner and C R Allton and W Armour and P Clarke and P
Mealor and D Waters and B Waugh and B West},
  title={GridPP: development of the UK computing Grid for particle physics},
  journal={Journal of Physics G: Nuclear and Particle Physics},
  volume={32},
  number={1},
  pages={N1},
  url={http://stacks.iop.org/0954-3899/32/i=1/a=N01},
  year={2006},
  }

% OSG
@article{1742-6596-78-1-012057,
  author={Ruth Pordes and Don Petravick and Bill Kramer and Doug Olson and Miron Livny and Alain Roy and Paul Avery and Kent
Blackburn and Torre Wenaus and Frank Würthwein and Ian Foster and Rob Gardner and Mike Wilde and Alan Blatecky and John
McGee and Rob Quick},
  title={The open science grid},
  journal={Journal of Physics: Conference Series},
  volume={78},
  number={1},
  pages={012057},
  url={http://stacks.iop.org/1742-6596/78/i=1/a=012057},
  year={2007},
  }

@article{GBOOST,
    author = {Yung, Ling Sing and Yang, Can and Wan, Xiang and Yu, Weichuan},
    title = "{GBOOST: a GPU-based tool for detecting gene?~@~Sgene interactions in genome?~@~Swide case control studies}",
    journal = {Bioinformatics},
    volume = {27},
    number = {9},
    pages = {1309-1310},
    year = {2011},
    month = {03},
    issn = {1367-4803},
    doi = {10.1093/bioinformatics/btr114},
    url = {https://doi.org/10.1093/bioinformatics/btr114},
    eprint = {http://oup.prod.sis.lan/bioinformatics/article-pdf/27/9/1309/16902475/btr114.pdf},
}

%MD
@article{Brooks2009CHARMM,
   added-at = {2016-01-25T23:09:25.000+0100},
  author = {Brooks, B. R. and Brooks, C. L. and Mackerell, A. D. and Nilsson, L. and Petrella, R. J. and Roux, B. and Won, Y. and Archontis, G. and Bartels, C. and Boresch, S. and Caflisch, A. and Caves, L. and Cui, Q. and Dinner, A. R. and Feig, M. and Fischer, S. and Gao, J. and Hodoscek, M. and Im, W. and Kuczera, K. and Lazaridis, T. and Ma, J. and Ovchinnikov, V. and Paci, E. and Pastor, R. W. and Post, C. B. and Pu, J. Z. and Schaefer, M. and Tidor, B. and Venable, R. M. and Woodcock, H. L. and Wu, X. and Yang, W. and York, D. M. and Karplus, M.},
  biburl = {https://www.bibsonomy.org/bibtex/2b1230baab4b2d8720980dfeb1a9fa22d/salotz},
  description = {CHARMM: The biomolecular simulation program - Brooks - 2009 - Journal of Computational Chemistry - Wiley Online Library},
  doi = {10.1002/jcc.21287},
  interhash = {d893d73d512bbe29ae7a15724a3d080e},
  intrahash = {b1230baab4b2d8720980dfeb1a9fa22d},
  issn = {1096-987X},
  journal = {Journal of Computational Chemistry},
  keywords = {charmm computational-biology molecular-dynamics software},
  number = 10,
  pages = {1545--1614},
  publisher = {Wiley Subscription Services, Inc., A Wiley Company},
  timestamp = {2016-01-25T23:09:25.000+0100},
  title = {CHARMM: The biomolecular simulation program},
  url = {http://dx.doi.org/10.1002/jcc.21287},
  volume = 30,
  year = 2009
}

% BlueBrain
@article{citeulike:472727,
    abstract = {{IBM's Blue Gene supercomputer allows a quantum leap in the level of detail at which the brain can be modelled. I argue that the time is right to begin assimilating the wealth of data that has been accumulated over the past century and start building biologically accurate models of the brain from first principles to aid our understanding of brain function and dysfunction.}},
    author = {Markram, Henry},
    citeulike-article-id = {472727},
    citeulike-linkout-0 = {http://dx.doi.org/10.1038/nrn1848},
    citeulike-linkout-1 = {http://dx.doi.org/10.1038/nrn1848},
    citeulike-linkout-2 = {http://view.ncbi.nlm.nih.gov/pubmed/16429124},
    citeulike-linkout-3 = {http://www.hubmed.org/display.cgi?uids=16429124},
    day = {01},
    doi = {10.1038/nrn1848},
    issn = {1471-003X},
    journal = {Nat Rev Neurosci},
    keywords = {connectionism-essay},
    month = feb,
    number = {2},
    pages = {153--160},
    pmid = {16429124},
    posted-at = {2009-05-15 00:34:06},
    priority = {2},
    publisher = {Nature Publishing Group},
    title = {{The Blue Brain Project}},
    url = {http://dx.doi.org/10.1038/nrn1848},
    volume = {7},
    year = {2006}
}

@article{Markram,
author = {Markram, Henry},
year = {2006},
month = {03},
pages = {153-60},
title = {The Blue Brain project},
volume = {7},
booktitle = {Nature reviews. Neuroscience}
}

% IceCube
@article{Halzen:2010yj,
      author         = "Halzen, Francis and Klein, Spencer R.",
      title          = "{IceCube: An Instrument for Neutrino Astronomy}",
      journal        = "Rev. Sci. Instrum.",
      volume         = "81",
      year           = "2010",
      pages          = "081101",
      doi            = "10.1063/1.3480478",
      eprint         = "1007.1247",
      archivePrefix  = "arXiv",
      primaryClass   = "astro-ph.HE",
      SLACcitation   = "%%CITATION = ARXIV:1007.1247;%%"
}

@article{Gazizov:2004va,
      author         = "Gazizov, Askhat and Kowalski, Marek P.",
      title          = "{ANIS: High energy neutrino generator for neutrino
                        telescopes}",
      journal        = "Comput. Phys. Commun.",
      volume         = "172",
      year           = "2005",
      pages          = "203-213",
      doi            = "10.1016/j.cpc.2005.03.113",
      eprint         = "astro-ph/0406439",
      archivePrefix  = "arXiv",
      primaryClass   = "astro-ph",
      reportNumber   = "DESY-04-101",
      SLACcitation   = "%%CITATION = ASTRO-PH/0406439;%%"
}

% GridFTP
@inproceedings{Allcock:2005:GSG:1105760.1105819,
 author = {Allcock, William and Bresnahan, John and Kettimuthu, Rajkumar and Link, Michael and Dumitrescu, Catalin and Raicu, Ioan and Foster, Ian},
 title = {The Globus Striped GridFTP Framework and Server},
 booktitle = {Proceedings of the 2005 ACM/IEEE Conference on Supercomputing},
 series = {SC '05},
 year = {2005},
 isbn = {1-59593-061-2},
 pages = {54--},
 url = {https://doi.org/10.1109/SC.2005.72},
 doi = {10.1109/SC.2005.72},
 acmid = {1105819},
 publisher = {IEEE Computer Society},
 address = {Washington, DC, USA},
}

@techreport{borodin2016atlas,
  title={ATLAS production system},
  author={Borodin, Mikhail and Padolski, Siarhei and Wenaus, Torre and Maeno, Tadashi and De, Kaushik and Golubkov, Dmitry and Mashinistov, Ruslan and Barreiro Megino, Fernando Harald and Klimentov, Alexei},
  year={2016},
  institution={ATL-COM-SOFT-2016-021}
}

@article{nilsson2008panda,
  title={The PanDA system in the Atlas experiment},
  author={Nilsson, Paul and Potekhin, Maxim and Maeno, Tadashi and Caballero, Jose and De, Kaushik and Wenaus, Torre},
  journal={PoS},
  pages={027},
  year={2008}
}

@inproceedings{anisenkov2014agis,
  title={AGIS: the ATLAS grid information system},
  author={Anisenkov, Alexey and Di Girolamo, A and Klimentov, A and Oleynik, D and Petrosyan, A and Atlas Collaboration and others},
  booktitle={Journal of Physics: Conference Series},
  volume={513},
  number={3},
  pages={032001},
  year={2014},
  organization={IOP Publishing}
}

@misc{Kubernetes,
  title = {Kubernetes web site},
  howpublished = {\url{https://kubernetes.io/}},
  note = {Accessed: 2019-01-18}
}

@misc{RH_OpenShift,
  title = {Red Hat OpenShift web site},
  howpublished = {\url{https://www.openshift.com}},
  note = {Accessed: 2019-01-18}
}

@online{titan_sched,
	author = {OLCF},
	title = {Titan Scheduling Policy},
	url={https://www.olcf.ornl.gov/for-users/system-user-guides/titan/running-jobs},
	year={2018},
	urldate = {2018-10-30}
}
@online{moab,
	author = {Adaptive Computing},
	title = {Adaptive Computing Administrator's Guide, 6.1.2},
	url={http://docs.adaptivecomputing.com/9-1-2/MWM/Moab-9.1.2.pdf},
	year={2018},
	urldate = {2018-10-30}
}
@online{titan_man,
	author = {OLCF},
	title = {Titan Scheduling Policy},
	url={https://www.olcf.ornl.gov/for-users/system-user-guides/titan},
	year={2018},
	urldate = {2018-10-30}
}

@article{osti_1086656,
    title = {Production Experiences with the Cray-Enabled TORQUE Resource
                Manager},
    author = {Ezell, Matthew A and Maxwell, Don E and Beer, David},
    doi = {},
    journal = {},
    number = {},
    volume = {},
    place = {United States},
    year = {2013},
    month = {1}
}

repository: ATLAS-Titan/CSW-BigScience

repo_name: ATLAS-Titan/CSW-BigScience


text:
@ARTICLE{Horton2015-kv,
title       = "Contribution of changes in atmospheric circulation patterns to
extreme temperature trends",
author      = "Horton, Daniel E and Johnson, Nathaniel C and Singh, Deepti
and Swain, Daniel L and Rajaratnam, Bala and Diffenbaugh, Noah
S",
affiliation = "1] Department of Earth System Science, Stanford University,
Stanford, California 94305, USA [2] Woods Institute for the
Environment, Stanford University, Stanford, California 94305,
USA. 1] International Pacific Research Center, University of
Hawaii at Manoa, Honolulu, Hawaii 96822, USA [2] Scripps
Institution of Oceanography, University of California San
Diego, La Jolla, California 92093, USA [3] Cooperative
Institute for Climate Science, Princeton University,
Princeton, New Jersey 08540, USA. Department of Earth System
Science, Stanford University, Stanford, California 94305, USA.
Department of Earth System Science, Stanford University,
Stanford, California 94305, USA. 1] Department of Earth System
Science, Stanford University, Stanford, California 94305, USA
[2] Woods Institute for the Environment, Stanford University,
Stanford, California 94305, USA [3] Department of Statistics,
Stanford University, Stanford, California 94305, USA. 1]
Department of Earth System Science, Stanford University,
Stanford, California 94305, USA [2] Woods Institute for the
Environment, Stanford University, Stanford, California 94305,
USA.",
journal     = "Nature",
volume      =  522,
number      =  7557,
pages       = "465--469",
month       =  "25~" # jun,
year        =  2015,
url         = "http://dx.doi.org/10.1038/nature14550",
keywords    = "Climate Extremes",
language    = "en",
issn        = "0028-0836, 1476-4687",
pmid        = "26108856",
doi         = "10.1038/nature14550"
}


text:
DESCRIPTION = "A cross platform audio visualization library"
HOMEPAGE = "http://libvisual.sf.net"
SECTION = "libs"
PRIORITY = "optional"
LICENSE = "GPL"
# FIXME: current depends dont support versioned deps well
# DEPENDS = "libvisual (${PV})"
DEPENDS = "libvisual"

SRC_URI = "${SOURCEFORGE_MIRROR}/libvisual/libvisual-plugins-${PV}.tar.gz"

inherit autotools

FILES_${PN} += "${libdir}/libvisual/actor/*.so ${libdir}/libvisual/morph/*.so"

SRC_URI[md5sum] = "9c3012e7a648540ac8c7053a0801830f"
SRC_URI[sha256sum] = "7f681c64c5940a757a636281915d170d715fc4936e294052957f635ea1af0d67"


text:
DESCRIPTION = "The eGenix.com mx Extensions for Python are a collection of professional quality Python software \
tools which enhance Python's usability in many important areas such as ODBC database connectivity, fast text \
processing, date/time processing and web site programming."
SECTION = "devel/python"
PRIORITY = "optional"
LICENSE = "EGENIX"
SRCNAME = "egenix-mx-base"
PR = "ml0"

SRC_URI = "http://downloads.egenix.com/python/${SRCNAME}-${PV}.tar.gz"
S = "${WORKDIR}/${SRCNAME}-${PV}"

inherit distutils

export INCLUDE = "${STAGING_INCDIR}/${PYTHON_DIR}"
export LIB = "${STAGING_LIBDIR}"

FILES_${PN} += "${datadir}"
FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/mx/*/*/.debug"

SRC_URI[md5sum] = "d0f3b1adca33a68867bf50f000060cd6"
SRC_URI[sha256sum] = "a0d03208e335610defc3049d8dd03f4ec7fcf477f44c4897b3f68adc478237ee"